-
Notifications
You must be signed in to change notification settings - Fork 6
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
feat(api/nonfungibles): destroy collection witness data & weights #383
Merged
chungquantin
merged 7 commits into
chungquantin/feat-nonfungibles
from
chugnquantin/feat-nonfungibles/destroy_collection_weights
Nov 16, 2024
Merged
feat(api/nonfungibles): destroy collection witness data & weights #383
chungquantin
merged 7 commits into
chungquantin/feat-nonfungibles
from
chugnquantin/feat-nonfungibles/destroy_collection_weights
Nov 16, 2024
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
chungquantin
changed the title
feat(api/nonfungibles): destroy collection weights
feat(api/nonfungibles): add new Nov 14, 2024
CollectionDetails
fields to handle destroy collection weights
chungquantin
changed the title
feat(api/nonfungibles): add new
feat(api/nonfungibles): add new Nov 14, 2024
CollectionDetails
fields to handle destroy collection weightsCollectionDetails
fields to handle destroy collection
chungquantin
changed the title
feat(api/nonfungibles): add new
feat(api/nonfungibles): destroy collection witness data & weights
Nov 14, 2024
CollectionDetails
fields to handle destroy collectionfeat: add item_holders field in collection details
chungquantin
force-pushed
the
chugnquantin/feat-nonfungibles/destroy_collection_weights
branch
from
November 14, 2024 07:16
159f245
to
c7d0c35
Compare
Codecov ReportAttention: Patch coverage is
@@ Coverage Diff @@
## chungquantin/feat-nonfungibles #383 +/- ##
==================================================================
+ Coverage 70.40% 70.87% +0.47%
==================================================================
Files 73 72 -1
Lines 12921 12970 +49
Branches 12921 12970 +49
==================================================================
+ Hits 9097 9193 +96
+ Misses 3548 3496 -52
- Partials 276 281 +5
|
chungquantin
merged commit Nov 16, 2024
5dccecb
into
chungquantin/feat-nonfungibles
11 of 13 checks passed
chungquantin
deleted the
chugnquantin/feat-nonfungibles/destroy_collection_weights
branch
November 16, 2024 10:53
5 tasks
chungquantin
added a commit
that referenced
this pull request
Nov 17, 2024
chore: rename nfts instance feat(api/nonfungibles): destroy collection witness data & weights (#383) chore: rename nfts instance fix(api/nonfungibles): pallet weight testing
chungquantin
added a commit
that referenced
this pull request
Nov 18, 2024
chore: rename nfts instance feat(api/nonfungibles): destroy collection witness data & weights (#383) chore: rename nfts instance fix(api/nonfungibles): pallet weight testing
chungquantin
added a commit
that referenced
this pull request
Nov 19, 2024
chore: rename nfts instance feat(api/nonfungibles): destroy collection witness data & weights (#383) chore: rename nfts instance fix(api/nonfungibles): pallet weight testing
chungquantin
added a commit
that referenced
this pull request
Nov 19, 2024
chore: rename nfts instance feat(api/nonfungibles): destroy collection witness data & weights (#383) chore: rename nfts instance fix(api/nonfungibles): pallet weight testing
chungquantin
added a commit
that referenced
this pull request
Nov 19, 2024
chore: rename nfts instance feat(api/nonfungibles): destroy collection witness data & weights (#383) chore: rename nfts instance fix(api/nonfungibles): pallet weight testing
4 tasks
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Checklist
✅ fn destroy()
: See the implementation breakdown below✅ fn approve_transfer()
: Weight is adjusted to account for branch logic whenitem = None
.✅ fn cancel_approval()
: Weight is adjusted to account for branch logic whenitem = None
.destroy
implementation breakdownPull requests add new fields to
CollectionDetails
as discussed here #335 (comment) for witnessing data on collection destroyed and correct weight calculation.item_holders
: Keep track of number of unique holders of the collection items. (Required forAccountBalance
). Updated when:✅ fn do_mint()
): New collection item is minted which owned by the holder withaccount_balance = 0
.✅ fn do_burn()
): Existing collection item is burnt which owned by the holder withaccount_balance = 1
.✅ fn do_transfer()
): Existing collection item is transferred that reduces the balance of sender to0
or increase the account balance of receiver from0
. (to1
)allowances
: Keep track of total number of allowances to spend the items within the collection. (Required forAllowances
)✅ fn do_approve_collection()
):allowances
is increased when the item is increased when a newAllowances
record set.✅ fn do_cancel_collection()
):allowances
is increased when the item is increased when an existingAllowances
record removed.allowances
field is not reset. It counts all the allowances made by all past owners and the current owner.