Transactions
Transactions are fundamental operations on the Sei blockchain and are required for any state updates on chain such as token transfers, account creation, and smart contract execution. Transactions are cryptographically signed by the sender’s private key to ensure authenticity and ownership. For more information on private keys, refer to the advanced section on HD Paths and Coin Types
Transaction Types
Since Sei supports both EVM and Cosmos SDK transactions, there are different transaction types based on the execution environment. The following sections provide an overview of Cosmos and EVM transactions on Sei.
Cosmos Transactions
Cosmos transactions are used for interacting with Cosmos based RPC's and tooling. They consist of the body, auth info, and signatures.
Signing Cosmos Transactions
Cosmos transactions on the Sei blockchain follow the standard Cosmos SDK format. They include various types of messages that can be included in the transaction body.
Using the seid
CLI, you can use the --generate-only
flag to generate an unsigned transaction in JSON format. The transaction can then be signed and broadcasted to the network.
Assuming you have an unsigned JSON transaction file, you can sign it using the seid tx sign
command. The signed transaction will be in JSON format and can be broadcasted to the network.
seid tx sign unsigned_tx.json --chain-id my-test-chain --keyring-backend test --from $SIGNER_ADDRESS
EVM Transactions
The Sei blockchain supports Ethereum Virtual Machine (EVM) transactions, allowing compatibility with Ethereum-based tools and contracts. EVM transactions follow a different structure compared to Cosmos transactions.