Search code examples
substrateparityrust-ink

Generated code hash at ink smart contract deployment


After placing an ink! smart contract on canvas-node using https://paritytech.github.io/canvas-ui, what does the created code hash represent and what is it used for?


Solution

  • This is used to identify the WASM stored on chain, and as hashmap to retrieve it from storage. Commonly this is used to instantiate a new instance of the contract: https://paritytech.github.io/ink-docs/getting-started/deploy-your-contract