Messages

MsgSend

Send coins from one address to another.

// MsgSend represents a message to send coins from one account to another.
message MsgSend {
  option (cosmos.msg.v1.signer) = "from_address";

  option (gogoproto.equal)           = false;
  option (gogoproto.goproto_getters) = false;

  string   from_address                    = 1 [(cosmos_proto.scalar) = "cosmos.AddressString"];
  string   to_address                      = 2 [(cosmos_proto.scalar) = "cosmos.AddressString"];
  repeated cosmos.base.v1beta1.Coin amount = 3
      [(gogoproto.nullable) = false, (gogoproto.castrepeated) = "github.com/cosmos/cosmos-sdk/types.Coins"];
}

The message will fail under the following conditions:

  • The coins do not have sending enabled

  • The to address is restricted

MsgMultiSend

Send coins from and to a series of different address. If any of the receiving addresses do not correspond to an existing account, a new account is created.

The message will fail under the following conditions:

  • Any of the coins do not have sending enabled

  • Any of the to addresses are restricted

  • Any of the coins are locked

  • The inputs and outputs do not correctly correspond to one another

MsgUpdateParams

The bank module params can be updated through MsgUpdateParams, which can be done using governance proposal. The signer will always be the gov module account address.

The message handling can fail if:

  • signer is not the gov module account address.

Last updated