Linea
GetBlock provides fast and reliable access to Linea nodes via JSON-RPC API. Connect to the Linea network without running your own infrastructure.
Linea is an Ethereum Layer 2 zkEVM developed by Consensys, the team behind MetaMask and Infura. It executes standard EVM bytecode natively, uses ETH for gas, and settles security to Ethereum Layer 1 through zero-knowledge validity proofs. As a Type 2, EVM-equivalent zkEVM, Linea runs existing Ethereum contracts and tooling — Hardhat, Foundry, ethers.js, viem, and web3.py — without modification.
Because Linea settles proofs to Ethereum, it inherits Ethereum's security while offering lower fees and faster soft finality than Layer 1. This documentation targets Linea Mainnet (Chain ID 59144) and covers the standard Ethereum JSON-RPC method set plus Linea-specific extensions such as linea_estimateGas and linea_getProof.
Key Features
Full EVM Equivalence (Type 2 zkEVM): Runs standard EVM bytecode; deploy Solidity contracts and use Hardhat, Foundry, ethers.js, viem, and web3.py without modification
Zero-Knowledge Validity Proofs: State is proven to Ethereum L1 with zk proofs rather than fraud proofs, avoiding optimistic challenge windows
Ethereum Security: Settles to Ethereum L1 and inherits its security guarantees
ETH for Gas: Transaction fees are paid in ETH, the same asset as Ethereum mainnet
Consensys Ecosystem: First-class integration with MetaMask and Infura tooling
Linea Gas Extensions:
linea_estimateGasreturns an L1-cost-aware gas price for accurate fee estimationState Proof Extension:
linea_getProofreturns Sparse Merkle Trie proofs for verifying Linea state on L1Ethereum Upgrade Parity: Tracks Ethereum network upgrades to keep EVM behavior current
TECHNICAL DISCLAIMER: AUTHORITATIVE JSON-RPC SPECIFICATION
GetBlock's Linea API reference documentation is provided exclusively for informational purposes and to optimize the developer experience. The canonical and normative specification for the Ethereum JSON-RPC API is maintained by the Ethereum community and published at ethereum.org/en/developers/docs/apis/json-rpc/. For Linea-specific methods and protocol details, consult the official documentation at docs.linea.build.
Network Information
Network Name
Linea Mainnet
Stage
Mainnet (live)
Chain ID
59144 (0xe708)
Native Currency
ETH
Decimals
18
Layer
Layer 2 (zkEVM rollup on Ethereum)
Consensus
Zero-knowledge validity proofs settled to Ethereum
Smart Contract VM
EVM (Type 2, EVM-equivalent)
Address Format
Ethereum-style (0x…, 20 bytes)
Block Explorer
Testnet
Linea Sepolia (Chain ID 59141)
Base URL
All Linea JSON-RPC methods are called by sending a POST request to the base URL with a standard JSON-RPC 2.0 body. For a WebSocket connection, use the WebSocket scheme: wss://go.getblock.io/<ACCESS-TOKEN>/.
Supported Networks
Mainnet
✅
✅
✅
✅
Sepolia
✅
✅
✅
✅
Linea Sepolia (Chain ID 59141) is the test environment for staging contracts before mainnet. Confirm testnet endpoint availability from the GetBlock dashboard.
Quickstart
In this section, you will learn how to make your first call with either:
Axios (JavaScript / Node.js)
Python (Requests library)
Before you begin, you must have already installed npm or yarn on your local machine (for the Axios example) or Python and pip (for the Python example).
Available API Methods
Linea exposes the standard Ethereum JSON-RPC method set plus Linea-specific extensions. All methods are POST-only and called against the base URL above.
Block & Chain Information
eth_blockNumber
Returns the current latest block number
eth_chainId
Returns the chain ID (0xe708 = 59144 for Linea Mainnet)
eth_getBlockByNumber
Returns block information by block number
eth_getBlockByHash
Returns block information by block hash
eth_getBlockTransactionCountByNumber
Returns the number of transactions in a block by block number
eth_getBlockTransactionCountByHash
Returns the number of transactions in a block by block hash
eth_getBlockReceipts
Returns all transaction receipts for a given block
eth_syncing
Returns sync status or false if the node is fully synced
Account & State
eth_getBalance
Returns the native ETH balance of an account (in wei)
eth_getCode
Returns the contract bytecode at a given address
eth_getStorageAt
Returns the value at a specific storage slot
eth_getTransactionCount
Returns the transaction count (nonce) for an account
Transactions
eth_sendRawTransaction
Broadcasts a signed transaction
eth_getTransactionByHash
Returns a transaction by its hash
eth_getTransactionByBlockHashAndIndex
Returns a transaction by block hash and index
eth_getTransactionByBlockNumberAndIndex
Returns a transaction by block number and index
eth_getTransactionReceipt
Returns the receipt for a transaction by hash
eth_call
Executes a read-only call against contract state
eth_estimateGas
Estimates gas required for a transaction
Gas & Fee Market
eth_gasPrice
Returns the current gas price in wei
eth_maxPriorityFeePerGas
Returns the suggested max priority fee per gas (EIP-1559)
eth_feeHistory
Returns historical base fees and priority fees
linea_estimateGas
Returns an L1-cost-aware gas estimate (gasLimit, base, tip)
Logs
eth_getLogs
Returns logs matching a given filter
Debug & Trace
debug_traceTransaction
Replays a transaction and returns an execution trace
debug_traceBlockByNumber
Traces every transaction in a block by block number
debug_traceBlockByHash
Traces every transaction in a block by block hash
Network & Client Info
net_version
Returns the network ID (59144 for Linea Mainnet)
web3_clientVersion
Returns the client software version
Support
For technical support and questions:
Support Email: support@getblock.io
See Also
Last updated
Was this helpful?