Are you an LLM? Read llms.txt for a summary of the docs, or llms-full.txt for the full context.
Skip to content

TxEVM JSON-RPC

TxEVM speaks standard Ethereum JSON-RPC, so wallets, Foundry, Hardhat, viem, and ethers work without plugins. A few behaviors differ from Ethereum because TxEVM blocks are sealed inside TxCore consensus. This page lists those differences and the methods available.

Network

Testnet
Chain ID25110
HTTP RPChttps://testnet-api.txflow-testnet.xyz/evm
WebSocket RPCwss://testnet-api.txflow-testnet.xyz/evm
Explorerscanner.txflow-testnet.xyz
Block timeAbout 0.25 s (one EVM block per 5 TxCore commits)
FinalityA block is final once sealed. There are no reorgs.

Sending transactions

Submit with eth_sendRawTransaction as usual. Gas is paid in USDC on TxCore today, and value must be 0; see Gas.

What differs from Ethereum:

  • The call returns after execution. eth_sendRawTransaction answers once the transaction has run in the open block. If it is refused before execution (nonce, insufficient USDC for gas, block full), you get an error instead of a hash, and no receipt will ever exist. If the result is not ready in time, the hash is returned and you poll for the receipt.
  • No mempool. Transactions execute in the order they reach TxCore. Priority fees do not buy ordering, and newPendingTransactions never fires.
  • Nonces. Read the next nonce with eth_getTransactionCount(address, "pending"), which counts transactions already executed in the open block. Send in nonce order: with no mempool to hold it, a transaction that skips a nonce is refused rather than queued.
  • Gas limit. A single transaction may use at most 10,000,000 gas, which fits a full-size contract deployment.

Reading state

  • Everything returned is final. latest, safe, finalized, and pending all mean the chain head; earliest means genesis.
  • Only the latest state is kept. eth_getBalance, eth_getCode, eth_getStorageAt, eth_call, and eth_estimateGas accept a block parameter but always answer at the head. The exception is eth_getTransactionCount with "pending", described above. Blocks, transactions, receipts, and logs can be read for any past block.
  • State proofs. eth_getProof (EIP-1186) returns account and storage proofs that verify against the block header's stateRoot. Unlike the other state methods, it honors the block parameter for the head and up to 128 blocks behind it. One call accepts at most 1,000 storage keys.
  • Log queries. eth_getLogs scans at most 10,000 blocks per call, returns at most 10,000 logs (16 MiB), accepts at most 1,000 address and topics entries in total, and times out after 5 s. Calls over any limit fail with -32005 instead of truncating.
  • eth_call supports state overrides as its third parameter, as in geth.
  • Funds from TxCore appear on TxEVM when the block carrying the credit is sealed, usually within one or two blocks. See Transfers.

Subscriptions

Over WebSocket, the same JSON-RPC is available plus eth_subscribe / eth_unsubscribe.

SubscriptionBehavior
newHeadsOne notification per sealed block
logsLogs matching the filter, per sealed block
newPendingTransactions, syncingAccepted, never fire

Notifications are sent once the block is readable over RPC, so a receipt or log you are told about can be fetched immediately. A connection may hold up to 1,024 subscriptions. A connection that falls too far behind is closed; reconnect and subscribe again, since subscriptions are not replayed.

Supported methods

GroupMethods
Chaineth_chainId, net_version, net_listening, web3_clientVersion, eth_syncing, eth_blockNumber, eth_accounts
Gaseth_gasPrice, eth_maxPriorityFeePerGas, eth_feeHistory, eth_estimateGas, txflow_usdcGasPrice
Stateeth_getBalance, eth_getTransactionCount, eth_getCode, eth_getStorageAt, eth_call, eth_getProof
Blockseth_getBlockByNumber, eth_getBlockByHash, eth_getBlockTransactionCountByNumber, eth_getBlockTransactionCountByHash, eth_getBlockReceipts, eth_getUncleCountByBlockNumber, eth_getUncleCountByBlockHash
Transactionseth_sendRawTransaction, eth_getTransactionByHash, eth_getTransactionByBlockNumberAndIndex, eth_getTransactionByBlockHashAndIndex, eth_getTransactionReceipt
Logseth_getLogs
WebSocket onlyeth_subscribe, eth_unsubscribe

Methods not listed return -32601 Method not found. TxEVM-specific additions are txflow_usdcGasPrice and the usdcGasFee field on receipts, both described in Gas.

Example: deploy with Foundry

Deploy the CoreDepositor contract from Transfers. The signer needs spot USDC on TxCore to pay for gas.

export RPC_URL=https://testnet-api.txflow-testnet.xyz/evm
 
forge create src/CoreDepositor.sol:CoreDepositor \
  --rpc-url $RPC_URL \
  --private-key $PRIVATE_KEY \
  --broadcast

Then read the caller's txUSDC balance:

cast call 0x2100000000000000000000000000000000000001 \
  "balanceOf(address)(uint256)" <YOUR_ADDRESS> \
  --rpc-url $RPC_URL

Errors

Besides the standard JSON-RPC errors:

CodeMeaning
-32000transaction rejected: <reason>. The transaction was refused before execution; the reason names the check, such as insufficient USDC for gas or value ... is not allowed.
-32000transaction rejected: the sender must have at least 100 USDC in total equity on mainnet. Testnet only; see the requirement above.
-32000historical state for block … is not available. An eth_getProof request for a block more than 128 blocks behind the head.
-32001The RPC is busy or temporarily unavailable, including sender eligibility check unavailable. Retry later.
-32005Limit exceeded on eth_getLogs (block range, result count, response size, filter items, or 5 s timeout). Narrow the block range or filter.

Next

PageFor
GasHow transactions are charged
TransfersMoving USDC between TxCore and TxEVM
CoreReadReading Core prices from contracts
OverviewAccess requirements, testnet parameters, roadmap