Upload and Instantiate Workflow
HCastano opened this issue · 0 comments
HCastano commented
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.