Skip to content
This repository has been archived by the owner on May 15, 2024. It is now read-only.

[Staking] Pallet enhancements #341

Merged
merged 3 commits into from
Aug 29, 2023
Merged

Conversation

DidacSF
Copy link
Contributor

@DidacSF DidacSF commented Aug 29, 2023

Description

This PR adds the following features to the nft-staking pallet:

  • Adds target_index to the ContractClause struct
  • Adds nft_staking_amount and nft_fee_amount to the Contract struct
  • Adds checks for both stake and fee NFTs to check the amount of unique values in the extrinsic call of accept
  • Adds ContractsMetadata storage, used to pair each contract with a string bytes of metadata.

Type of changes

  • build: Changes that affect the build system or external dependencies (eg, Cargo, Docker)
  • ci: Changes to CI configuration
  • docs: Changes to documentation only
  • feat: Changes to add a new feature
  • fix: Changes to fix a bug
  • refactor: Changes that do not alter functionality
  • style: Changes to format the code
  • test: Changes to add missing tests or correct existing tests

Checklist

  • Tests for the changes have been added
  • Necessary documentation is added (if appropriate)
  • Formatted with cargo fmt --all
  • Linted with cargo clippy --all-features --all-targets
  • Tested with cargo test --workspace --all-features --all-targets

* Added metadata
* Added stake/fee checks
@DidacSF DidacSF requested a review from darkfriend77 August 29, 2023 09:53
@codecov
Copy link

codecov bot commented Aug 29, 2023

Codecov Report

Patch coverage: 58.62% and project coverage change: -0.18% ⚠️

Comparison is base (3188a40) 74.99% compared to head (429dc87) 74.81%.

Additional details and impacted files
@@             Coverage Diff             @@
##           develop     #341      +/-   ##
===========================================
- Coverage    74.99%   74.81%   -0.18%     
===========================================
  Files           33       33              
  Lines         3427     3443      +16     
===========================================
+ Hits          2570     2576       +6     
- Misses         857      867      +10     
Files Changed Coverage Δ
pallets/ajuna-nft-staking/benchmarking/src/lib.rs 0.00% <0.00%> (ø)
pallets/ajuna-nft-staking/src/lib.rs 80.00% <50.00%> (-1.70%) ⬇️
pallets/ajuna-nft-staking/src/contracts.rs 93.54% <100.00%> (+0.44%) ⬆️

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

Copy link
Contributor

@darkfriend77 darkfriend77 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

good, let's go

@darkfriend77 darkfriend77 merged commit f1bd4c1 into develop Aug 29, 2023
@darkfriend77 darkfriend77 deleted the ds/staking-enhancements branch August 29, 2023 11:33
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants