Transaction Types
Legacy, EIP-2930, EIP-1559, EIP-7702, and Deposit transaction options.
mega-evme supports five transaction types via the --tx-type flag. The transaction type determines which additional options are available and how the transaction is encoded.
Common Transaction Options
These options apply to all transaction types in the run and tx commands.
--tx-type <TYPE>
0
--type, --ty
Transaction type number
--gas <AMOUNT>
10000000
--gas-limit
Gas limit
--basefee <AMOUNT>
0
--gas-price, --price, --base-fee
Gas price (Legacy) or max fee per gas (EIP-1559)
--priority-fee <AMOUNT>
N/A
--priorityfee, --tip
EIP-1559 max priority fee per gas
--sender <ADDRESS>
0xf39Fd6e51aad88F6F4ce6aB8827279cffFb92266
--from
Transaction sender
--receiver <ADDRESS>
0x0000…0000
--to
Transaction receiver
--nonce <NONCE>
0
—
Transaction nonce
--create
false
—
Execute in create mode (deploy contract). Requires explicit true.
--value <AMOUNT>
0
—
ETH value in wei (supports 1ether, 100gwei, 1000wei suffixes)
--input <HEX>
N/A
--data
Transaction calldata as hex
--inputfile <PATH>
N/A
--datafile, --input-file, --data-file
Calldata from file (- for stdin)
Type 0 — Legacy
The default transaction type. Uses a single gas price (--basefee) for all gas costs.
mega-evme tx --tx-type 0 \
--sender.balance 1ether \
--receiver 0x4200000000000000000000000000000000000006 \
--gas 100000 \
--basefee 1000000000 \
--input 0x06fdde03A transaction with a non-zero --basefee requires the sender to hold enough balance to cover gas × basefee; fund it with --sender.balance (or run against forked/prestate state).
Type 1 — EIP-2930 (Access List)
Adds an access list to declare which addresses and storage slots the transaction will touch. Pre-warming the access list reduces gas costs for those accesses from cold to warm.
Additional Options
--access <ENTRY>
N/A
--accesslist, --access-list
Access list entry (repeatable)
Access list entry format:
ADDRESS— pre-warm an address (no storage keys)ADDRESS:KEY1,KEY2,...— pre-warm an address and specific storage keys (comma-separated)
Storage keys are full 32-byte hex values (64 hex digits, 0x-prefixed); abbreviated forms like 0x0 are rejected.
Type 2 — EIP-1559
Uses a base fee + priority fee model instead of a flat gas price. Also supports access lists.
Type 4 — EIP-7702 (Authorization)
Allows an EOA to temporarily delegate its execution to a contract via authorization tuples. Also supports access lists.
Additional Options
--auth <AUTH>
N/A
--authorization
Authorization tuple (repeatable)
Authorization format: AUTHORITY:NONCE->DELEGATION
AUTHORITY— address of the EOA delegating controlNONCE— authorization nonce (decimal or0x-prefixed hex)DELEGATION— address of the contract to delegate to
Type 126 — Deposit (Optimism)
A deposit transaction mints ETH from L1 and optionally executes a call. These are system-level transactions used by the Optimism bridge.
Additional Options
--source-hash <HASH>
N/A
--sourcehash
Source hash identifying the deposit origin (B256)
--mint <AMOUNT>
N/A
—
Amount of ETH to mint to the sender (in wei)
Last updated