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

OnDeploy operation #1932

Closed
devhawk opened this issue Sep 14, 2020 · 3 comments · Fixed by #1933
Closed

OnDeploy operation #1932

devhawk opened this issue Sep 14, 2020 · 3 comments · Fixed by #1933
Labels
discussion Initial issue state - proposed but not yet accepted
Milestone

Comments

@devhawk
Copy link
Contributor

devhawk commented Sep 14, 2020

Summary or problem description
Contacts often have a deploy method the owner has to invoke after deployment

Do you have any solution you want to propose?
Contacts should be able to specify an on deploy operation that is invoked automatically by the system on deployment (including update scenarios)

Neo Version

  • Neo 3

Where in the software does this update applies to?

  • SDK
  • VM
@devhawk devhawk added the discussion Initial issue state - proposed but not yet accepted label Sep 14, 2020
@shargon
Copy link
Member

shargon commented Sep 14, 2020

Maybe we can call _initialize

@devhawk
Copy link
Contributor Author

devhawk commented Sep 14, 2020

As I understand it, _initialize is runtime initialization, so that won't accomplish what I'm suggesting.

The NEP-5 template contract has a Deploy method that the contract owner is expected to invoke after deployment. I'm suggesting there should be a mechanism to optionally invoke this operation during deployment

@shargon
Copy link
Member

shargon commented Sep 14, 2020

I thought that it was easier to do it in the constructor, but it won't be faster, please take a look again.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
discussion Initial issue state - proposed but not yet accepted
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants