Skip to main content

terra_sdk.core.wasm.msgs

Wasm module messages.

MsgStoreCode Objects


_2
@attr.s
_2
class MsgStoreCode(Msg)

Upload a new smart contract WASM binary to the blockchain.

Arguments:

  • sender - address of sender
  • wasm_byte_code - base64-encoded string containing bytecode
  • instantiate_permission - access control to apply on contract creation, optional

MsgInstantiateContract Objects


_2
@attr.s
_2
class MsgInstantiateContract(Msg)

Creates a new instance of a smart contract from existing code on the blockchain.

Arguments:

  • sender - address of sender
  • admin - address of contract admin
  • code_id int - code ID to use for instantiation
  • label str - label for the contract.
  • msg dict|str - InitMsg to initialize contract
  • funds Coins - initial amount of coins to be sent to contract

MsgExecuteContract Objects


_2
@attr.s
_2
class MsgExecuteContract(Msg)

Execute a state-mutating function on a smart contract.

Arguments:

  • sender - address of sender
  • contract - address of contract to execute function on
  • msg dict|str - ExecuteMsg to pass
  • coins - coins to be sent, if needed by contract to execute. Defaults to empty Coins()

MsgMigrateContract Objects


_2
@attr.s
_2
class MsgMigrateContract(Msg)

Migrate the contract to a different code ID.

Arguments:

  • sender - address of contract admin
  • contract - address of contract to migrate
  • code_id int - new code ID to migrate to
  • msg dict|str - MigrateMsg to execute

MsgUpdateAdmin Objects


_2
@attr.s
_2
class MsgUpdateAdmin(Msg)

Update a smart contract's admin.

Arguments:

  • sender - address of current admin (sender)
  • new_admin - address of new admin
  • contract - address of contract to change

MsgClearAdmin Objects


_2
@attr.s
_2
class MsgClearAdmin(Msg)

Clears the contract's admin field.

Arguments:

  • admin - address of current admin (sender)
  • contract - address of contract to change