Skip to content
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

refactor: remove CollectionApprovalCount storage item #396

Merged

Conversation

chungquantin
Copy link
Collaborator

No description provided.

@chungquantin chungquantin merged commit 7f7a40f into chungquantin/feat-nfts Nov 29, 2024
5 checks passed
@chungquantin chungquantin deleted the chungquantin/fix-nfts_approval_count branch November 29, 2024 05:25
@codecov-commenter
Copy link

Codecov Report

Attention: Patch coverage is 20.34884% with 137 lines in your changes missing coverage. Please review.

Project coverage is 69.76%. Comparing base (6ef07eb) to head (cf9a029).
Report is 1 commits behind head on chungquantin/feat-nfts.

Files with missing lines Patch % Lines
pallets/nfts/src/weights.rs 7.53% 135 Missing ⚠️
pallets/nfts/src/features/approvals.rs 93.33% 1 Missing ⚠️
pallets/nfts/src/lib.rs 75.00% 1 Missing ⚠️
@@                    Coverage Diff                     @@
##           chungquantin/feat-nfts     #396      +/-   ##
==========================================================
- Coverage                   69.96%   69.76%   -0.20%     
==========================================================
  Files                          70       70              
  Lines                       12523    12431      -92     
  Branches                    12523    12431      -92     
==========================================================
- Hits                         8762     8673      -89     
  Misses                       3493     3493              
+ Partials                      268      265       -3     
Files with missing lines Coverage Δ
...lets/nfts/src/features/create_delete_collection.rs 84.88% <100.00%> (ø)
pallets/nfts/src/features/create_delete_item.rs 89.13% <100.00%> (ø)
pallets/nfts/src/features/transfer.rs 84.28% <100.00%> (ø)
pallets/nfts/src/tests.rs 99.89% <ø> (-0.01%) ⬇️
pallets/nfts/src/features/approvals.rs 95.07% <93.33%> (+1.19%) ⬆️
pallets/nfts/src/lib.rs 72.39% <75.00%> (-0.23%) ⬇️
pallets/nfts/src/weights.rs 3.41% <7.53%> (-0.01%) ⬇️

@@ -139,12 +139,12 @@ impl<T: frame_system::Config> WeightInfo for SubstrateWeight<T> {
/// The range of component `a` is `[0, 1000]`.
fn destroy(_m: u32, _c: u32, a: u32, ) -> Weight {
Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Weight diff destroy

/// Storage: `Nfts::Item` (r:1 w:1)
/// Proof: `Nfts::Item` (`max_values`: None, `max_size`: Some(861), added: 3336, mode: `MaxEncodedLen`)
/// Storage: `Nfts::CollectionApprovals` (r:21 w:20)
/// Storage: `Nfts::CollectionApprovals` (r:1 w:0)
/// Proof: `Nfts::CollectionApprovals` (`max_values`: None, `max_size`: Some(137), added: 2612, mode: `MaxEncodedLen`)
/// The range of component `i` is `[0, 1]`.
/// The range of component `n` is `[0, 20]`.
fn clear_all_transfer_approvals(i: u32, n: u32, ) -> Weight {
Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Weight diff clear_all_transfer_approvals

.saturating_add(Weight::from_parts(0, 2163).saturating_mul(i.into()))
}
/// Storage: `Nfts::Item` (r:1 w:1)
/// Proof: `Nfts::Item` (`max_values`: None, `max_size`: Some(861), added: 3336, mode: `MaxEncodedLen`)
/// Storage: `Nfts::CollectionApprovals` (r:1 w:0)
/// Proof: `Nfts::CollectionApprovals` (`max_values`: None, `max_size`: Some(137), added: 2612, mode: `MaxEncodedLen`)
/// Storage: `Nfts::CollectionApprovalCount` (r:2 w:2)
/// Proof: `Nfts::CollectionApprovalCount` (`max_values`: None, `max_size`: Some(73), added: 2548, mode: `MaxEncodedLen`)
/// The range of component `i` is `[0, 1]`.
fn cancel_approval(i: u32, ) -> Weight {
Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Weight diff cancel_approval

@@ -542,56 +542,49 @@ impl<T: frame_system::Config> WeightInfo for SubstrateWeight<T> {
/// Proof: `Nfts::CollectionConfigOf` (`max_values`: None, `max_size`: Some(73), added: 2548, mode: `MaxEncodedLen`)
/// Storage: `Nfts::CollectionApprovals` (r:1 w:1)
/// Proof: `Nfts::CollectionApprovals` (`max_values`: None, `max_size`: Some(137), added: 2612, mode: `MaxEncodedLen`)
/// Storage: `Nfts::CollectionApprovalCount` (r:2 w:2)
/// Proof: `Nfts::CollectionApprovalCount` (`max_values`: None, `max_size`: Some(73), added: 2548, mode: `MaxEncodedLen`)
/// The range of component `i` is `[0, 1]`.
fn approve_transfer(i: u32, ) -> Weight {
Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Weight diff approve_transfer

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants