-
Notifications
You must be signed in to change notification settings - Fork 113
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
Destroy standard #182
base: master
Are you sure you want to change the base?
Destroy standard #182
Conversation
@ixje Done. |
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.
Just 2 suggestions on wording.
Co-authored-by: ixje <[email protected]>
Co-authored-by: ixje <[email protected]>
@ixje Can I add your name and email on |
No need. You authored it, I just gave some feedback. |
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.
👍
Co-authored-by: Anna Shaleva <[email protected]>
Co-authored-by: Anna Shaleva <[email protected]>
Co-authored-by: Anna Shaleva <[email protected]>
Co-authored-by: Anna Shaleva <[email protected]>
Co-authored-by: Anna Shaleva <[email protected]>
@AnnaShaleva All done. |
nep-X1.mediawiki
Outdated
</pre> | ||
This method MUST invoke the <code>destroy</code> method of <code>ContractManagement</code> contract when the contract is destroyed. | ||
|
||
<code>destroy</code> method can have multi parameters for any specific purpose since it's an operation only for contract owner. |
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 think we can avoid this and have a specific (parameterless) interface just like for update
. Suppose I want to create a NEP-DESTROY-compatible CLI command, it'd be harder to do this if one contract has parameters and the other does not.
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.
Should we strictly require zero parameters in the standard, or it is just a "SHOULD" requirement?
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.
What's the practical value of parameters here? I can only imagine moving tokens from contract address before deletion (which might require some address), but likely they'll be sent to owner or this can be handled in a different manner by contract. Conditional (based on parameters) destroy? Not likely to be useful, owner can do anything already, so if he decides to destroy he will do this. So I'd go with MUST here.
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.
Still relevant, this NEP doesn't make much sense if parameters are not fixed.
@vncoelho @roman-khimov All done. |
@roman-khimov Done |
Co-authored-by: Christopher Schuchardt <[email protected]>
Co-authored-by: Christopher Schuchardt <[email protected]>
Co-authored-by: Christopher Schuchardt <[email protected]>
Co-authored-by: Christopher Schuchardt <[email protected]>
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 have any more comments/suggestions, the proposal itself LGTM, let's update the status to Accepted and wait for the rest of conversations to be resolved.
@cschuchardt88 @Jim8y @shargon @roman-khimov @AnnaShaleva All done. |
|
||
==Specification== | ||
|
||
Neo N3 has the native <code>ContractManagement</code> contract that is responsible for contract destruction via its <code>destroy</code> method. When <code>destroy</code> is executed, it will delete all storage entries of calling contract. It will block the calling contract address using the native <code>Policy</code> contract to prevent redeployment or calling any methods on the contract from that point forward. Contracts that want to be destroyable MUST implement the <code>destroy</code> method as described below. |
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.
s/MUST/SHOULD/
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.
Not addressed.
nep-X1.mediawiki
Outdated
</pre> | ||
This method MUST invoke the <code>destroy</code> method of <code>ContractManagement</code> contract when the contract is destroyed. | ||
|
||
<code>destroy</code> method can have multi parameters for any specific purpose since it's an operation only for contract owner. |
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.
Still relevant, this NEP doesn't make much sense if parameters are not fixed.
All done. @roman-khimov @cschuchardt88 |
No description provided.