Skip to main content

Ethereum Module

The Ethereum module handles transactions for Ethereum and EVM-compatible chains, including native transfers, token operations, and smart contract interactions.

Architecture Overview

Transaction Model

  • Encoding: RLP (Recursive Length Prefix)
  • Account Model: Account-based with nonce tracking
  • Gas System: Dynamic pricing with base fee + priority fee (EIP-1559)

Key Components

The Ethereum parser handles:

  • Native ETH transfers
  • ERC-20/721/1155 token standards
  • Smart contract method calls via ABI decoding
  • DeFi protocol interactions
  • ENS name resolution

Transaction Types

1. Simple Transfer

Basic ETH transfer between addresses with gas calculation.

2. Token Operations

  • ERC-20: Transfer, Approve, TransferFrom
  • ERC-721: NFT transfers and approvals
  • ERC-1155: Multi-token standard

3. Smart Contract Calls

Decode function calls using contract ABI to show:

  • Method name and parameters
  • Token amounts in human-readable format
  • Contract verification status

4. DeFi Protocols

Special handling for common protocols:

  • Uniswap (swaps, liquidity)
  • Compound (lending/borrowing)
  • Aave (deposits, withdrawals)
  • OpenSea (NFT trades)

Visualization Strategy

Primary Information

{
"Title": "Swap ETH for USDC",
"Fields": [
{
"Type": "amount_v2",
"Label": "You Pay",
"AmountV2": { "Amount": "1.5", "Currency": "ETH" }
},
{
"Type": "amount_v2",
"Label": "You Receive",
"AmountV2": { "Amount": "2,850", "Currency": "USDC" }
}
]
}

Gas Information

Always shown as expandable preview:

  • Condensed: Total fee in ETH and USD
  • Expanded: Gas price, limit, max fee breakdown

Risk Indicators

  • First-time recipient addresses
  • Unverified contracts
  • Unlimited token approvals
  • High-value transfers

Name Resolution

The module integrates with:

  • ENS: Ethereum Name Service
  • Contract Registry: Known verified contracts
  • Token Lists: Popular token databases

Implementation Details

Full source code available at:

Chain Support

Compatible with all EVM chains:

  • Ethereum Mainnet
  • Polygon
  • Arbitrum
  • Optimism
  • BSC
  • Avalanche C-Chain

Configuration adjustments may be needed for:

  • Native token symbols
  • Block explorers
  • Gas token decimals

Example Outputs

ETH Transfer

Shows sender, recipient, amount, and gas fee in a clear layout.

Token Swap

Displays input/output tokens, exchange rate, slippage, and protocol used.

NFT Transfer

Shows collection name, token ID, visual preview (if available), and recipient.

Resources