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

Destroy standard #182

Open
wants to merge 20 commits into
base: master
Choose a base branch
from
Open

Destroy standard #182

wants to merge 20 commits into from

Conversation

superboyiii
Copy link
Member

No description provided.

nep-X1.mediawiki Outdated Show resolved Hide resolved
nep-X1.mediawiki Outdated Show resolved Hide resolved
@superboyiii
Copy link
Member Author

@ixje Done.

Copy link
Contributor

@ixje ixje left a 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.

nep-X1.mediawiki Outdated Show resolved Hide resolved
nep-X1.mediawiki Outdated Show resolved Hide resolved
@superboyiii
Copy link
Member Author

@ixje Can I add your name and email on Author?

@ixje
Copy link
Contributor

ixje commented Sep 12, 2024

No need. You authored it, I just gave some feedback.

Copy link
Contributor

@ixje ixje left a comment

Choose a reason for hiding this comment

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

👍

nep-X1.mediawiki Outdated Show resolved Hide resolved
nep-X1.mediawiki Outdated Show resolved Hide resolved
nep-X1.mediawiki Outdated Show resolved Hide resolved
nep-X1.mediawiki Outdated Show resolved Hide resolved
nep-X1.mediawiki Show resolved Hide resolved
nep-X1.mediawiki Show resolved Hide resolved
nep-X1.mediawiki Outdated Show resolved Hide resolved
nep-X1.mediawiki Show resolved Hide resolved
nep-X1.mediawiki Show resolved Hide resolved
shargon and others added 5 commits September 13, 2024 01:11
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]>
@superboyiii
Copy link
Member Author

@AnnaShaleva All done.

shargon
shargon previously approved these changes Sep 27, 2024
Jim8y
Jim8y previously approved these changes Sep 27, 2024
nep-X1.mediawiki Outdated Show resolved Hide resolved
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.
Copy link
Contributor

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.

Copy link
Member

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?

Copy link
Contributor

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.

Copy link
Contributor

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.

nep-X1.mediawiki Outdated Show resolved Hide resolved
nep-X1.mediawiki Show resolved Hide resolved
@superboyiii superboyiii dismissed stale reviews from Jim8y and shargon via 6b86a9a November 28, 2024 07:21
@superboyiii
Copy link
Member Author

@vncoelho @roman-khimov All done.

nep-X1.mediawiki Outdated Show resolved Hide resolved
nep-X1.mediawiki Outdated Show resolved Hide resolved
nep-X1.mediawiki Outdated Show resolved Hide resolved
nep-X1.mediawiki Outdated Show resolved Hide resolved
@superboyiii
Copy link
Member Author

@roman-khimov Done

nep-X1.mediawiki Outdated Show resolved Hide resolved
nep-X1.mediawiki Outdated Show resolved Hide resolved
nep-X1.mediawiki Outdated Show resolved Hide resolved
nep-X1.mediawiki Outdated Show resolved Hide resolved
Jim8y and others added 3 commits December 4, 2024 19:42
Co-authored-by: Christopher Schuchardt <[email protected]>
Co-authored-by: Christopher Schuchardt <[email protected]>
Co-authored-by: Christopher Schuchardt <[email protected]>
nep-X1.mediawiki Outdated Show resolved Hide resolved
nep-X1.mediawiki Outdated Show resolved Hide resolved
Co-authored-by: Christopher Schuchardt <[email protected]>
nep-X1.mediawiki Outdated Show resolved Hide resolved
Copy link
Member

@AnnaShaleva AnnaShaleva left a 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.

nep-X1.mediawiki Outdated Show resolved Hide resolved
nep-X1.mediawiki Outdated Show resolved Hide resolved
@superboyiii
Copy link
Member Author

nep-X1.mediawiki Outdated Show resolved Hide resolved

==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.
Copy link
Contributor

Choose a reason for hiding this comment

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

s/MUST/SHOULD/

Copy link
Contributor

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.
Copy link
Contributor

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.

nep-X1.mediawiki Outdated Show resolved Hide resolved
nep-X1.mediawiki Outdated Show resolved Hide resolved
@superboyiii
Copy link
Member Author

All done. @roman-khimov @cschuchardt88

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

Successfully merging this pull request may close these issues.

9 participants