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

[Suggestion] automatically add permissions? #475

Closed
chenzhitong opened this issue Mar 11, 2021 · 1 comment · Fixed by #478
Closed

[Suggestion] automatically add permissions? #475

chenzhitong opened this issue Mar 11, 2021 · 1 comment · Fixed by #478

Comments

@chenzhitong
Copy link
Member

If permission is not added, an error will occur when the contract is upgraded and destroyed.
This is because it calls the ContractManagement native contract, but does not declare permissions.

Solutions:

  1. The compiler automatically adds permissions when it detects code that calls a native contract.
  2. Add ContractManagement to the permissions by default.
  3. Do nothing, Let the developer add it manually.
  4. Let the developer add it manually. And permissions supports adding the contract name of the native contract, because there is no guarantee that the hash of the native contract will not change (it has already changed n times).

Which is better?

@shargon
Copy link
Member

shargon commented Mar 11, 2021

I think that option 2 it's good

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 a pull request may close this issue.

2 participants