CODEHASH
codeHash is a cryptographic fingerprint that identifies a piece of on-chain contract code. It represents the hash of the compiled Wasm bytecode of a contract and is stored in the blockchain’s code storage as a persistent, referenceable identifier. The concept is commonly used in platforms that separate contract code from contract instances, such as the Contracts module in Substrate-based networks.
When code is uploaded to the chain, the runtime computes the codeHash from the Wasm bytes and
Technical details vary by platform, but the hash is typically a 256-bit digest (for example, Blake2b-256 or
Security and reliability considerations include ensuring the integrity of the code being hashed, guarding against accidental
Related concepts include contract addresses, on-chain code storage, and platform-specific APIs for deploying and instantiating contracts.