-
Notifications
You must be signed in to change notification settings - Fork 48
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
NFT Royalty SC #1570
NFT Royalty SC #1570
Conversation
…asset_metadata_value, get_royalty_amount, new
… first draft of NFTArtistRules
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## develop #1570 +/- ##
===========================================
+ Coverage 58.65% 58.67% +0.01%
===========================================
Files 142 142
Lines 32236 32236
===========================================
+ Hits 18909 18915 +6
+ Misses 13327 13321 -6 |
* Write extrinsic error to output buffer * Remove support for FuncId::OldCallRuntime; Add CallRuntimeWithError * Split contract tests; Change test to use call_runtime instead of old_call_runtime * Add InkDelegateCallError back * Update polymesh-api dependency * Add use_call_runtime_with_error * Add use_call_runtime_with_error as a feature flag
contracts/nft_royalty/lib.rs
Outdated
debug_println!("Retrieving contract's identity"); | ||
self.contract_identity = PolymeshInk::get_our_did()?; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I don't think we need to support the contract's identity changing after initialization.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I have removed this, but what if the contract is initialized and then the contract's identity changes (e.g the create_child_identity
extrisinc is called after initialization)? I also think this is an issue for the venue owner if we only allow initialize_contract
to be called once.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
All of the portfolios would have the wrong custodian (old identity). So this contract shouldn't be moved to a different identity. I think in general deployed contracts shouldn't have their identity changed on them. Supporting that would be difficult.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
To use child identities I would recommend this workflow:
- Deploy contract (not initialized).
- Call
create_child_identity
with the contract's address to move the contract into it's own identity as the primary key. - Call
initialize_contract
.
Adds an example for a smart contract that handles NFT Royalty.
changelog