⌨️Usage Examples
Examples on how to deploy or migrate contracts
Deploy a contract with an Admin
secretcli tx compute instantiate <code_id> <init_msg> --from a --label <label> --admin <address>Move a contract to Governance+Admin Migration
Use the following command to change the migration mode to Governance + Admin. In this mode, the contract can be upgraded by the Admin after a governance vote that allows such upgrade is passed.
secretcli tx compute set-contract-governance <contract-address> --from <admin>Move a contract to Governance Only Migration
Use the following command to change the migration mode to Governance Only. In this mode, the contract can be migrated to a new version after a Governance Vote allows such upgrade. Anyone can issue the migration command after the voting is concluded.
To achieve this, the Admin of the contract should be updated to a custom Proxy contract that was deployed for that purpose.
Update the admin
secretcli tx compute set-contract-admin [contract_addr_bech32] [new_admin_addr_bech32] --from <admin>Remove the admin
secretcli tx compute clear-contract-admin [contract_addr_bech32] --from <admin>Batch Proposal Example
The example below shows a Governance Proposal that updates two
Last updated
Was this helpful?