Sei: Transaction builder icon

Sei: Transaction builder

Generate Sei EVM transaction data

Overview

This node generates transaction data for the Sei EVM blockchain networks. It is designed to build and sign Ethereum-compatible transactions using a provided private key credential, targeting either predefined Sei networks or a custom RPC endpoint.

Typical use cases include:

  • Preparing signed transactions for sending SEI tokens or interacting with smart contracts on Sei EVM.
  • Automating token transfers or contract method calls without broadcasting them immediately.
  • Generating raw transaction data for further processing or submission via other services.

For example, you can use this node to create a signed transaction that transfers SEI tokens to a recipient address or calls a smart contract method like transfer or mint with specified arguments.

Properties

Name Meaning
Blockchain Target Sei EVM network. Options: "Sei Mainnet EVM (Pacific-1)", "Sei Testnet EVM (Atlantic-2)", or "Custom". Default RPC endpoints are highly throttled; consider using a custom RPC URL for better reliability.
Custom RPC Custom Sei EVM RPC endpoint URL. Required if "Custom" blockchain option is selected.
Recipient Address The recipient's Ethereum-format address (0x...). This is the target of the transaction if no smart contract address is specified.
Value Amount of SEI tokens to send in the transaction, expressed as a decimal number.
Additional Fields Collection of optional fields:
- ABI JSON ABI array describing the smart contract interface, including method signatures and error types.
- Smart Contract Address Address of the smart contract to interact with. If set, the transaction targets this contract instead of a direct transfer.
- Smart Contract Method Name of the smart contract method to call.
- Smart Contract Method Arguments List of arguments for the contract method, preserving order and count as per the ABI definition.
- Token Decimals Number of decimals used by the token for amount conversion (default 18). Used to convert human-readable amounts to wei units.
- Convert Token Amounts Boolean flag indicating whether to automatically convert token amounts from human-readable format to wei. Enabled by default. Recommended for ERC-20 token transfers like transfer or mint.

Output

The node outputs an array of JSON objects, each representing a built transaction with the following structure:

  • success: Boolean indicating if the transaction was successfully built and signed.
  • recipient: The recipient address or smart contract address.
  • signature: The signed transaction hex string.
  • nonce: The transaction nonce fetched from the wallet.
  • data: Encoded transaction data (e.g., encoded smart contract method call).
  • value: The SEI value sent with the transaction.
  • contractAddress: The smart contract address if applicable.
  • contractMethod: The called smart contract method name if applicable.
  • contractArgs: Array of arguments passed to the contract method.
  • txData: The full transaction object before signing.
  • rpcUrl: The RPC endpoint used.
  • chainId: Identifier of the targeted blockchain network.
  • timestamp: ISO timestamp when the transaction was generated.

If an error occurs during transaction building or signing, the output includes:

  • success: false
  • error: true
  • errorMessage: Description of the error encountered
  • Other relevant input parameters for context

The node does not output binary data.

Dependencies

  • Requires an API key credential containing a private key for signing transactions.
  • Uses the ethers library for Ethereum-compatible transaction encoding and signing.
  • Needs access to a Sei EVM RPC endpoint, either one of the predefined URLs or a user-provided custom RPC URL.
  • No additional environment variables are required beyond the API key credential.

Troubleshooting

  • Missing Custom RPC URL: When selecting the "Custom" blockchain option, a custom RPC URL must be provided. Otherwise, the node throws an error.
  • Unknown Network Error: Selecting a blockchain network not recognized by the node results in an error.
  • Invalid Token Amount Conversion: If token amount conversion fails (e.g., invalid numeric format), the node logs a warning and uses the original value.
  • Signing Errors: Issues with the private key credential or RPC connectivity may cause transaction signing to fail.
  • ABI Mismatch: Providing an incorrect or incomplete ABI may lead to improperly encoded contract calls or errors.

To resolve these issues:

  • Ensure the custom RPC URL is valid and reachable.
  • Verify the private key credential is correct and has sufficient permissions.
  • Confirm the ABI matches the target smart contract.
  • Use proper argument ordering and types matching the ABI.
  • Check network connectivity to the RPC endpoint.

Links and References

Discussion