Documentation Index
Fetch the complete documentation index at: https://injectivelabs-mintlify-jp-developers-first-half-1777019423.mintlify.app/llms.txt
Use this file to discover all available pages before exploring further.
Transactions
This section defines thesdk.Msg concrete types that result in the state transitions defined on the previous section.
MsgEthereumTx
An EVM state transition can be achieved by using the MsgEthereumTx. This message encapsulates an Ethereum transaction data (TxData) as a sdk.Msg. It contains the necessary transaction data fields. Note, that the MsgEthereumTx implements both the sdk.Msg and sdk.Tx interfaces. Normally, SDK messages only implement the former, while the latter is a group of messages bundled together.
Fromfield is defined and the address is invalidTxDatastateless validation fails
- Any of the custom
AnteHandlerEthereum decorators checks fail:- Minimum gas amount requirements for transaction
- Tx sender account doesn’t exist or hasn’t enough balance for fees
- Account sequence doesn’t match the transaction
Data.AccountNonce - Message signature verification fails
- EVM contract creation (i.e
evm.Create) fails, orevm.Callfails
Conversion
TheMsgEthreumTx can be converted to the go-ethereum Transaction and Message types in order to create and call evm contracts.
Signing
In order for the signature verification to be valid, theTxData must contain the v | r | s values from the Signer. Sign calculates a secp256k1 ECDSA signature and signs the transaction. It takes a keyring signer and the chainID to sign an Ethereum transaction according to EIP155 standard. This method mutates the transaction as it populates the V, R, S fields of the Transaction’s Signature. The function will fail if the sender address is not defined for the msg or if the sender is not registered on the keyring.
TxData
TheMsgEthereumTx supports the 3 valid Ethereum transaction data types from go-ethereum: LegacyTx, AccessListTx and DynamicFeeTx. These types are defined as protobuf messages and packed into a proto.Any interface type in the MsgEthereumTx field.
LegacyTx: EIP-155 transaction typeDynamicFeeTx: EIP-1559 transaction type. Enabled by London hard fork blockAccessListTx: EIP-2930 transaction type. Enabled by Berlin hard fork block
LegacyTx
The transaction data of regular Ethereum transactions.
GasPriceis invalid (nil, negaitve or out of int256 bound)Fee(gasprice * gaslimit) is invalidAmountis invalid (negaitve or out of int256 bound)Toaddress is invalid (non valid ethereum hex address)
DynamicFeeTx
The transaction data of EIP-1559 dynamic fee transactions.
GasTipCapis invalid (nil, negative or overflows int256)GasFeeCapis invalid (nil, negative or overflows int256)GasFeeCapis less thanGasTipCapFee(gas price * gas limit) is invalid (overflows int256)Amountis invalid (negative or overflows int256)Toaddress is invalid (non-valid ethereum hex address)ChainIDisnil
AccessListTx
The transaction data of EIP-2930 access list transactions.
GasPriceis invalid (nil, negative or overflows int256)Fee(gas price * gas limit) is invalid (overflows int256)Amountis invalid (negative or overflows int256)Toaddress is invalid (non-valid ethereum hex address)ChainIDisnil
