The code ID key is used as the key where to store the contract's byte code during genesis import. However, the code ID key can be generated automatically: hash the contract byte code + prepend codeId key prefix. Therefore it's not really needed in GenesisContract, which the contract byte code is enough.
Proposal
Remove code_id_key from GenesisContract.
Generate the code ID key automatically when importing the contracts.
Surfaced from Interchain IBC team's review of 08-wasm at hash https://github.com/strangelove-ventures/ibc-go/commit/96e9930ab87a171a3ae6ac9717ee25bfda77212b
Summary
Remove
code_id_key
fromGenesisContract
.Problem Definition
The code ID key is used as the key where to store the contract's byte code during genesis import. However, the code ID key can be generated automatically: hash the contract byte code + prepend
codeId
key prefix. Therefore it's not really needed inGenesisContract
, which the contract byte code is enough.Proposal
code_id_key
fromGenesisContract
.For Admin Use