Contract ID
For a transaction of type TransactionType.Create
, tx
, the contract ID is sha256(0x4655454C ++ tx.data.salt ++ root(tx.data.witnesses[bytecodeWitnessIndex].data) ++ root_smt(tx.storageSlots))
, where root
is the Merkle root of the binary Merkle tree with each leaf being an 8-byte word of two instructions, and root_smt
is the Sparse Merkle tree root of the provided key-value pairs. If the bytecode is not a multiple of 8 bytes (i.e. if there are an odd number of instructions), the last instruction is padded with 4-byte zero.