Are you an LLM? Read llms.txt for a summary of the docs, or llms-full.txt for the full context.
Skip to content

Message

A discriminated union of the seven transaction-level messages Dango accepts.

Definition

type Message =
  | { configure: MsgConfigure }
  | { upgrade: MsgUpgrade }
  | { transfer: MsgTransfer }
  | { upload: MsgStoreCode }
  | { instantiate: MsgInstantiate }
  | { execute: MsgExecute }
  | { migrate: MsgMigrate }

Variants

configure — update chain or app config.

upgrade — schedule a chain upgrade.

transferRecord<Address, Coins>. Send funds to one or more recipients.

upload — store a Wasm code blob ({ code: Base64 }).

instantiate — create a new contract ({ codeHash, msg, salt, funds?, admin? }).

execute — call a deployed contract ({ contract, msg, funds? }).

migrate — change a contract's code hash ({ contract, newCodeHash, msg }).

Notes

  • Use the in operator to narrow: if ("transfer" in msg) { ... }.
  • For one-off construction, the typed wrappers (transfer, execute, etc.) are simpler. Build Message values directly only when batching multiple kinds in one tx via signAndBroadcastTx.

See also