Skip to content

Contract instantiation permissions

Some protocols (DAODAO, Perps, Rujira Streams) utilise a "factory" architecture where one contract emits a MsgInstantiateContract. DADAO in particular allows "SubDAOs", where these newly created contracts in turn emit their own MsgInstantiateContract. This second order of creation is impossible in the current wasm permissions, as the contract addresses cannot be known ahead of time.

This change simply skips the permissions check when the deployer is already a smart contract address itself. The permission to store code is unchanged, this must be explicitly whitelisted in the wasm permissions file.

Merge request reports

Loading