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

Upload and Instantiate Workflow #39

Open
HCastano opened this issue Nov 9, 2023 · 0 comments
Open

Upload and Instantiate Workflow #39

HCastano opened this issue Nov 9, 2023 · 0 comments
Labels
discussion pre-backlog material up for discussion; idea dump; pseudo-notes enhancement New feature or request

Comments

@HCastano
Copy link
Contributor

HCastano commented Nov 9, 2023

Substrate's Contracts pallet has a distinction between uploading code and
instantiating code.

The upload stage simply puts bytecode on chain, whereas the instantiate state takes
existing bytecode and creates a usable/callable instance of it. Once code is uploaded it
may be instantiated many times using different constructor parameters.

This provides a few advantages, like being able to upload an ERC-20 contract once and
instantiating many contracts with differing token names, decimal amounts, etc. from it.

It's still a bit early for me to think about some concrete use cases here, but it may be
advantageous to have this flow for Programs as well.

@HCastano HCastano added enhancement New feature or request discussion pre-backlog material up for discussion; idea dump; pseudo-notes labels Nov 9, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
discussion pre-backlog material up for discussion; idea dump; pseudo-notes enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

1 participant