Transactions
This section defines the sdk.Msg concrete types that result in the state transitions defined on the previous section.
RegisterCoinProposal
RegisterCoinProposalA gov Content type to register a token pair from a Cosmos Coin. Governance users vote on this proposal and it automatically executes the custom handler for RegisterCoinProposal when the vote passes.
type RegisterCoinProposal struct {
// title of the proposal
Title string `protobuf:"bytes,1,opt,name=title,proto3" json:"title,omitempty"`
// proposal description
Description string `protobuf:"bytes,2,opt,name=description,proto3" json:"description,omitempty"`
// token pair of Cosmos native denom and ERC20 token address
Metadata types.Metadata `protobuf:"bytes,3,opt,name=metadata,proto3" json:"metadata"`
}The proposal content stateless validation fails if:
Title is invalid (length or char)
Description is invalid (length or char)
Metadata is invalid
Name and Symbol are not blank
Base and Display denominations are valid coin denominations
Base and Display denominations are present in the DenomUnit slice
Base denomination has exponent 0
Denomination units are sorted in ascending order
Denomination units not duplicated
RegisterERC20Proposal
RegisterERC20ProposalA gov Content type to register a token pair from an ERC20 Token. Governance users vote on this proposal and it automatically executes the custom handler for RegisterERC20Proposal when the vote passes.
The proposal Content stateless validation fails if:
Title is invalid (length or char)
Description is invalid (length or char)
ERC20Address is invalid
MsgConvertCoin
MsgConvertCoinA user broadcasts a MsgConvertCoin message to convert a Cosmos Coin to a ERC20 token.
Message stateless validation fails if:
Coin is invalid (invalid denom or non-positive amount)
Receiver hex address is invalid
Sender bech32 address is invalid
MsgConvertERC20
MsgConvertERC20A user broadcasts a MsgConvertERC20 message to convert a ERC20 token to a native Cosmos coin.
Message stateless validation fails if:
Contract address is invalid
Amount is not positive
Receiver bech32 address is invalid
Sender hex address is invalid
ToggleTokenConversionProposal
ToggleTokenConversionProposalA gov Content type to toggle the internal conversion of a token pair.
Last updated