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 ID | 25110 |
| HTTP RPC | https://testnet-api.txflow-testnet.xyz/evm |
| WebSocket RPC | wss://testnet-api.txflow-testnet.xyz/evm |
| Explorer | scanner.txflow-testnet.xyz |
| Block time | About 0.25 s (one EVM block per 5 TxCore commits) |
| Finality | A 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_sendRawTransactionanswers 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
newPendingTransactionsnever 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, andpendingall mean the chain head;earliestmeans genesis. - Only the latest state is kept.
eth_getBalance,eth_getCode,eth_getStorageAt,eth_call, andeth_estimateGasaccept a block parameter but always answer at the head. The exception iseth_getTransactionCountwith"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'sstateRoot. 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_getLogsscans at most 10,000 blocks per call, returns at most 10,000 logs (16 MiB), accepts at most 1,000addressandtopicsentries in total, and times out after 5 s. Calls over any limit fail with-32005instead of truncating. eth_callsupports 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.
| Subscription | Behavior |
|---|---|
newHeads | One notification per sealed block |
logs | Logs matching the filter, per sealed block |
newPendingTransactions, syncing | Accepted, 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
| Group | Methods |
|---|---|
| Chain | eth_chainId, net_version, net_listening, web3_clientVersion, eth_syncing, eth_blockNumber, eth_accounts |
| Gas | eth_gasPrice, eth_maxPriorityFeePerGas, eth_feeHistory, eth_estimateGas, txflow_usdcGasPrice |
| State | eth_getBalance, eth_getTransactionCount, eth_getCode, eth_getStorageAt, eth_call, eth_getProof |
| Blocks | eth_getBlockByNumber, eth_getBlockByHash, eth_getBlockTransactionCountByNumber, eth_getBlockTransactionCountByHash, eth_getBlockReceipts, eth_getUncleCountByBlockNumber, eth_getUncleCountByBlockHash |
| Transactions | eth_sendRawTransaction, eth_getTransactionByHash, eth_getTransactionByBlockNumberAndIndex, eth_getTransactionByBlockHashAndIndex, eth_getTransactionReceipt |
| Logs | eth_getLogs |
| WebSocket only | eth_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 \
--broadcastThen read the caller's txUSDC balance:
cast call 0x2100000000000000000000000000000000000001 \
"balanceOf(address)(uint256)" <YOUR_ADDRESS> \
--rpc-url $RPC_URLErrors
Besides the standard JSON-RPC errors:
| Code | Meaning |
|---|---|
-32000 | transaction rejected: <reason>. The transaction was refused before execution; the reason names the check, such as insufficient USDC for gas or value ... is not allowed. |
-32000 | transaction rejected: the sender must have at least 100 USDC in total equity on mainnet. Testnet only; see the requirement above. |
-32000 | historical state for block … is not available. An eth_getProof request for a block more than 128 blocks behind the head. |
-32001 | The RPC is busy or temporarily unavailable, including sender eligibility check unavailable. Retry later. |
-32005 | Limit exceeded on eth_getLogs (block range, result count, response size, filter items, or 5 s timeout). Narrow the block range or filter. |
Next
| Page | For |
|---|---|
| Gas | How transactions are charged |
| Transfers | Moving USDC between TxCore and TxEVM |
| CoreRead | Reading Core prices from contracts |
| Overview | Access requirements, testnet parameters, roadmap |