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.
transfer — Record<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
inoperator to narrow:if ("transfer" in msg) { ... }. - For one-off construction, the typed wrappers (
transfer,execute, etc.) are simpler. BuildMessagevalues directly only when batching multiple kinds in one tx viasignAndBroadcastTx.