Skip to main content

CrossFi Transaction Messages Reference

This comprehensive guide describes all possible fields for transaction messages supported by CrossFi Chain. The platform integrates multiple modules from Cosmos SDK, Ethermint, and CrossFi-specific implementations.

Overview

CrossFi Chain supports multiple transaction message types across different modules:

  • Cosmos Base: Fundamental coin operations
  • Cosmos SDK Modules: Authz, Bank, Distribution, Gov, Feegrant, Staking, Slashing, Vesting
  • Ethermint EVM: Ethereum-compatible transactions
  • CrossFi Modules: Native CrossFi functionality

Total message types covered: 35+

Each message type includes:

  • Complete parameter descriptions
  • Field types and constraints
  • Usage examples
  • Failure conditions

Table of Contents


Cosmos Base

cosmos.base.v1beta1.Coin

The fundamental coin structure used across all modules for representing token amounts.

ParameterTypeDescription
denomstringToken denomination (e.g., mpx, xfi). Must match registered denominations.
amountstringToken amount as string representing integer (e.g., 1000000). Must be non-negative.

Usage Context:

  • Used in MsgSend, MsgMultiSend for transfers
  • Used in MsgDeposit for governance deposits
  • Used in staking operations for delegation amounts

Example:

{
"denom": "mpx",
"amount": "1000000"
}

Authz Module

Authorization module allows one account (granter) to authorize another account (grantee) to execute certain actions on their behalf.

cosmos.authz.v1beta1.MsgGrant

Grants authorization from granter to grantee for specific message types.

ParameterTypeDescription
granterstringAddress of the account granting permission (e.g., mx1x7...).
granteestringAddress of the account receiving permission (e.g., mx1y2...).
grantcosmos.authz.v1beta1.GrantGrant object containing authorization details and expiration.

Grant Structure:

ParameterTypeDescription
authorizationgoogle.protobuf.AnyAuthorization type (GenericAuthorization, SendAuthorization, etc.).
expirationgoogle.protobuf.TimestampOptional expiration time in UTC format (e.g., 2025-12-31T23:59:59Z).

Authorization Types:

  1. GenericAuthorization

    • Provides unlimited permission for specified message type
    • msg: string - Full message type URL (e.g., /cosmos.bank.v1beta1.MsgSend)
  2. SendAuthorization

    • Allows grantee to send coins with spending limits
    • spend_limit: repeated Coin - Maximum coins that can be sent
    • allow_list: repeated string - Optional list of allowed recipient addresses
  3. StakeAuthorization

    • Permits staking operations with validator restrictions
    • validators: repeated string - List of validator addresses
    • authorization_type: AuthorizationType - Type of staking action (DELEGATE, UNDELEGATE, REDELEGATE)

cosmos.authz.v1beta1.MsgRevoke

Revokes previously granted authorization for specific message type.

ParameterTypeDescription
granterstringAddress of account revoking permission.
granteestringAddress of account losing permission.
msg_type_urlstringMessage type URL to revoke (e.g., /cosmos.bank.v1beta1.MsgSend).

cosmos.authz.v1beta1.MsgExec

Executes messages on behalf of granter using granted authorizations.

ParameterTypeDescription
granteestringAddress of account executing messages.
msgsrepeated google.protobuf.AnyList of messages to execute (e.g., MsgSend).

Bank Module

The bank module handles token transfers and balance management.

cosmos.bank.v1beta1.MsgSend

Transfers coins from one address to another.

ParameterTypeDescription
from_addressstring (cosmos.AddressString)Sender address (e.g., mx1x7...).
to_addressstring (cosmos.AddressString)Recipient address (e.g., mx1y2...).
amountrepeated cosmos.base.v1beta1.CoinCoins to transfer. Cannot be null.

Example:

{
"from_address": "mx1x7...sender",
"to_address": "mx1y2...recipient",
"amount": [{"denom": "mpx", "amount": "1000000"}]
}

Failure Conditions:

  • Insufficient balance in sender account
  • Recipient address is blacklisted
  • Invalid coin denomination

cosmos.bank.v1beta1.MsgMultiSend

Sends coins from one or multiple inputs to multiple outputs.

ParameterTypeDescription
inputsrepeated InputInput sources. Cannot be null.
outputsrepeated OutputOutput destinations.

Input Structure:

ParameterTypeDescription
addressstringSender address.
coinsrepeated cosmos.base.v1beta1.CoinCoins to send.

Output Structure:

ParameterTypeDescription
addressstringRecipient address.
coinsrepeated cosmos.base.v1beta1.CoinCoins to receive.

Example:

{
"inputs": [
{
"address": "mx1x7...sender",
"coins": [{"denom": "mpx", "amount": "2000000"}]
}
],
"outputs": [
{
"address": "mx1y2...recipient1",
"coins": [{"denom": "mpx", "amount": "1000000"}]
},
{
"address": "mx1z3...recipient2",
"coins": [{"denom": "mpx", "amount": "1000000"}]
}
]
}

Distribution Module

Manages reward distribution between validators and delegators.

cosmos.distribution.v1beta1.MsgFundCommunityPool

Funds the community pool directly from an account.

ParameterTypeDescription
amountrepeated cosmos.base.v1beta1.CoinCoins to transfer to community pool.
depositorstringBech32 address funding the pool (e.g., mx1x7...).

cosmos.distribution.v1beta1.MsgSetWithdrawAddress

Sets a different address for reward withdrawals.

ParameterTypeDescription
delegator_addressstringBech32 address of delegator setting withdraw address.
withdraw_addressstringBech32 address where rewards will be sent. Cannot be module address.

cosmos.distribution.v1beta1.MsgWithdrawDelegatorReward

Withdraws accumulated rewards from a specific validator.

ParameterTypeDescription
delegator_addressstringBech32 address of delegator withdrawing rewards.
validator_addressstringBech32 address of validator (e.g., mxvaloper1z3...).

cosmos.distribution.v1beta1.MsgWithdrawValidatorCommission

Allows validator to withdraw accumulated commission.

ParameterTypeDescription
validator_addressstringBech32 address of validator (e.g., mxvaloper1z3...).

Gov Module

Governance module enables on-chain proposals and voting.

cosmos.gov.v1.MsgDeposit

Deposits coins into a proposal to help it reach voting period.

ParameterTypeDescription
proposal_iduint64Unique proposal identifier.
depositorstringBech32 address making deposit (e.g., mx1x7...).
amountrepeated CoinDeposit amount.

cosmos.gov.v1.MsgSubmitProposal

Creates a new governance proposal.

ParameterTypeDescription
messagesrepeated AnyMessages to execute if proposal passes.
initial_depositrepeated CoinInitial deposit for proposal.
proposerstringBech32 address of proposer (e.g., mx1x7...).
metadatastringOptional metadata for proposal.
titlestringProposal title.
summarystringBrief proposal description.

cosmos.gov.v1.MsgVote

Casts a vote on a proposal.

ParameterTypeDescription
proposal_iduint64Proposal identifier.
voterstringBech32 address of voter (e.g., mx1x7...).
optionVoteOptionVote choice: YES, ABSTAIN, NO, NO_WITH_VETO.
metadatastringOptional vote metadata.

cosmos.gov.v1.MsgVoteWeighted

Casts weighted votes across multiple options.

ParameterTypeDescription
proposal_iduint64Proposal identifier.
voterstringBech32 address of voter.
optionsrepeated WeightedVoteOptionVote options with weights.
metadatastringOptional metadata.

WeightedVoteOption:

ParameterTypeDescription
optionVoteOptionVote choice.
weightstringVote weight as decimal (e.g., "0.5"). Sum must equal 1.

Feegrant Module

Allows accounts to pay transaction fees on behalf of others.

cosmos.feegrant.v1beta1.MsgGrantAllowance

Grants fee allowance from granter to grantee.

ParameterTypeDescription
granterstringAddress providing fee allowance (e.g., mx1x7...).
granteestringAddress receiving fee allowance (e.g., mx1y2...).
allowancegoogle.protobuf.AnyFee allowance type (BasicAllowance, PeriodicAllowance).

Allowance Types:

  1. BasicAllowance - Simple spending limit allowance:

    • spend_limit: repeated Coin - Maximum fee amount
    • expiration: Timestamp - Optional expiration time
  2. PeriodicAllowance - Allowance that resets periodically:

    • basic: BasicAllowance - Base allowance
    • period: Duration - Reset period
    • period_spend_limit: repeated Coin - Per-period limit

cosmos.feegrant.v1beta1.MsgRevokeAllowance

Revokes previously granted fee allowance.

ParameterTypeDescription
granterstringAddress revoking allowance (e.g., mx1x7...).
granteestringAddress losing allowance (e.g., mx1y2...).

Staking Module

Implements Proof-of-Stake consensus mechanism.

cosmos.staking.v1beta1.MsgBeginRedelegate

Redelegates tokens from one validator to another.

ParameterTypeDescription
delegator_addressstringDelegator address (e.g., mx1x7...).
validator_src_addressstringSource validator (e.g., mxvaloper1y2...).
validator_dst_addressstringDestination validator (e.g., mxvaloper1z3...).
amountcosmos.base.v1beta1.CoinAmount to redelegate.

cosmos.staking.v1beta1.MsgCreateValidator

Creates a new validator.

ParameterTypeDescription
descriptioncosmos.staking.v1beta1.DescriptionValidator description.
commissioncosmos.staking.v1beta1.CommissionRatesCommission rates.
min_self_delegationstringMinimum self-delegation in mpx.
delegator_addressstringDelegator creating validator (e.g., mx1x7...).
validator_addressstringValidator address (e.g., mxvaloper1y2...).
pubkeygoogle.protobuf.AnyValidator public key.
valuecosmos.base.v1beta1.CoinInitial stake amount.

Description Structure:

ParameterTypeDescription
monikerstringValidator name.
identitystringOptional identity (e.g., Keybase ID).
websitestringValidator website.
security_contactstringSecurity contact email.
detailsstringAdditional validator details.

CommissionRates Structure:

ParameterTypeDescription
ratestringCurrent commission rate (e.g., "0.1" for 10%).
max_ratestringMaximum commission rate (e.g., "0.2").
max_change_ratestringMaximum daily commission change (e.g., "0.01").

cosmos.staking.v1beta1.MsgDelegate

Delegates tokens to a validator.

ParameterTypeDescription
delegator_addressstringDelegator address (e.g., mx1x7...).
validator_addressstringValidator address (e.g., mxvaloper1y2...).
amountcosmos.base.v1beta1.CoinAmount to delegate.

cosmos.staking.v1beta1.MsgEditValidator

Updates validator description and commission.

ParameterTypeDescription
descriptioncosmos.staking.v1beta1.DescriptionUpdated validator description.
validator_addressstringValidator address (e.g., mxvaloper1y2...).
commission_ratestringNew commission rate (optional).
min_self_delegationstringNew minimum self-delegation (optional).

cosmos.staking.v1beta1.MsgUndelegate

Undelegates tokens from a validator.

ParameterTypeDescription
delegator_addressstringDelegator address (e.g., mx1x7...).
validator_addressstringValidator address (e.g., mxvaloper1y2...).
amountcosmos.base.v1beta1.CoinAmount to undelegate.

Slashing Module

cosmos.slashing.v1beta1.MsgUnjail

Unjails a previously jailed validator.

ParameterTypeDescription
validator_addrstringValidator address to unjail.

Requirements:

  • Validator must exist and be jailed
  • Jail period must have expired
  • Validator must have self-delegation > 0
  • Validator must not be tombstoned

Vesting Module

cosmos.vesting.v1beta1.MsgCreateVestingAccount

Creates a vesting account with locked tokens.

ParameterTypeDescription
from_addressstringAddress creating vesting account.
to_addressstringNew vesting account address (uninitialized).
amountrepeated cosmos.base.v1beta1.CoinTokens to vest.
end_timeint64UNIX timestamp when vesting ends.
delayedbooltrue=delayed vesting, false=continuous.

Vesting Types:

  1. Delayed Vesting - All tokens unlock at once when end_time is reached:

    • Tokens remain fully locked until end time
    • Suitable for cliff vesting scenarios
    • Simple unlock mechanism
  2. Continuous Vesting - Tokens unlock linearly from creation time to end_time:

    • Gradual token release over time
    • Proportional unlocking
    • Suitable for employee vesting


Ethermint EVM Module

Ethereum Virtual Machine compatibility layer.

ethermint.evm.v1.MsgEthereumTx

Wraps Ethereum transaction for Cosmos execution.

ParameterTypeDescription
datagoogle.protobuf.AnyTransaction data (LegacyTx, AccessListTx, DynamicFeeTx).
sizedoubleCached transaction size (deprecated).
hashstringTransaction hash in hex format.
fromstringSender address in Ethereum format.

ethermint.evm.v1.LegacyTx

Legacy Ethereum transaction format (pre-EIP-1559).

ParameterTypeDescription
nonceuint64Account sequence number.
gas_pricestringGas price in wei as string.
gasuint64Gas limit for transaction.
tostringRecipient address (empty for contract creation).
valuestringAmount to transfer in wei.
databytesTransaction data or contract code.
vbytesSignature recovery parameter.
rbytesSignature parameter r.
sbytesSignature parameter s.

ethermint.evm.v1.AccessListTx

EIP-2930 transaction with access list optimization.

ParameterTypeDescription
chain_idstringEthereum chain ID.
nonceuint64Account sequence number.
gas_pricestringGas price in wei.
gasuint64Gas limit.
tostringRecipient address.
valuestringTransfer amount in wei.
databytesTransaction data.
accessesrepeated AccessTupleAccess list for gas optimization.
vbytesSignature v parameter.
rbytesSignature r parameter.
sbytesSignature s parameter.

AccessTuple Structure:

ParameterTypeDescription
addressstringContract address to access.
storage_keysrepeated stringStorage keys to access in hex format.

ethermint.evm.v1.DynamicFeeTx

EIP-1559 transaction with dynamic fees.

ParameterTypeDescription
chain_idstringEthereum chain ID.
nonceuint64Account sequence number.
gas_tip_capstringMaximum priority fee per gas in wei.
gas_fee_capstringMaximum fee per gas in wei.
gasuint64Gas limit.
tostringRecipient address.
valuestringTransfer amount in wei.
databytesTransaction data.
accessesrepeated AccessTupleAccess list.
vbytesSignature v parameter.
rbytesSignature r parameter.
sbytesSignature s parameter.

CrossFi Modules

CrossFi-specific functionality.

crossfi.erc20.v1.MsgConvertCoin

Converts native Cosmos coins to ERC20 tokens.

ParameterTypeDescription
coincosmos.base.v1beta1.CoinNative coin to convert.
receiverstringERC20 token recipient address.
senderstringNative coin sender address.

crossfi.treasury.MsgMint

Mints new tokens in CrossFi treasury.

ParameterTypeDescription
creatorstringBech32 address authorized to mint tokens.
amountCoinAmount and denomination to mint.

Requirements:

  • Creator must have minting permissions
  • Amount must be positive
  • Denomination must be supported

crossfi.treasury.MsgBurn

Burns tokens from circulation.

ParameterTypeDescription
creatorstringBech32 address initiating burn.
amountCoinAmount and denomination to burn.

Requirements:

  • Creator must own sufficient tokens
  • Amount must be positive
  • Burn operation is irreversible

Usage Examples

Basic Transfer

Simple token transfer using MsgSend:

{
"@type": "/cosmos.bank.v1beta1.MsgSend",
"from_address": "mx1x7...sender",
"to_address": "mx1y2...recipient",
"amount": [
{
"denom": "mpx",
"amount": "1000000"
}
]
}

Governance Vote

Voting on a governance proposal:

{
"@type": "/cosmos.gov.v1.MsgVote",
"proposal_id": "1",
"voter": "mx1x7...voter",
"option": "VOTE_OPTION_YES",
"metadata": "Supporting this proposal"
}

Staking Delegation

Delegating tokens to a validator:

{
"@type": "/cosmos.staking.v1beta1.MsgDelegate",
"delegator_address": "mx1x7...delegator",
"validator_address": "mxvaloper1y2...validator",
"amount": {
"denom": "mpx",
"amount": "5000000"
}
}

Error Handling

Common failure scenarios and their causes:

Transaction Validation Errors
Module-Specific Errors

Additional Resources


info

This reference covers all major transaction message types supported by CrossFi Chain. For the latest updates and additional message types, refer to the XFI Scan API documentation or explore transactions directly on XFI Scan.