> For a complete page index, fetch https://docs.conduit.xyz/llms.txt # eth_getBlockByNumber POST https://rpc.plume.org/YOUR_API_KEY Content-Type: application/json Returns information about a block by block number. If fullTransactions is true, it returns the full transaction objects, otherwise only the transaction hashes. ⚡ Compute Units: [15 CU](https://docs.conduit.xyz/rpc-nodes/information/compute-units) Reference: https://docs.conduit.xyz/rpc-nodes/json-rpc-reference/eth-get-block-by-number ## Request ### Body (application/json) This endpoint expects an object. - `blockIdentifier` (BlockNumberOrTag, required) — Block number, or one of "latest", "earliest", "pending", "finalized", "safe" - `fullTransactions` (boolean, required) — If true, returns the full transaction objects, if false only the hashes ## Response ### 200 Block object, or null if the block doesn't exist - `parentHash` (string, required) — 32-byte hash of the parent block - `nonce` (string, required) — 8-byte value used in proof-of-work mining. On post-Merge chains (all Conduit rollups) this is always `"0x0000000000000000"` — the field is retained for header-shape backwards compatibility. - `sha3Uncles` (string, required) — SHA3 of the uncles data in the block - `logsBloom` (string, required) — Bloom filter for the logs of the block - `transactionsRoot` (string, required) — Root of the transaction trie - `stateRoot` (string, required) — Root of the final state trie - `receiptsRoot` (string, required) — Root of the receipts trie - `mixHash` (string, required) — 32-byte hash. Post-Merge this field carries the prevRandao value (the beacon chain randomness) rather than a proof-of-work mix hash. - `miner` (string, required) — 20-byte address of the beneficiary - `difficulty` (string, required) — Integer of the difficulty for this block - `extraData` (string, required) — Extra data field of this block - `size` (string, required) — Integer the size of this block in bytes - `gasLimit` (string, required) — Maximum gas allowed in this block - `gasUsed` (string, required) — Total gas used by all transactions in this block - `timestamp` (string, required) — Unix timestamp for when the block was collated - `transactions` (BlockTransactions, required) — Array of transaction objects or hashes - `uncles` (list of string, required) — Array of uncle hashes. Always empty on post-Merge chains (including all Conduit rollups), which no longer produce uncle blocks. - `number` (string, optional) — The block number, hex-encoded - `hash` (string, optional) — 32-byte block hash - `totalDifficulty` (string, optional) — Integer of the total difficulty of the chain until this block - `baseFeePerGas` (string, optional) — Base fee per gas in wei, hex-encoded. Introduced by EIP-1559 (London). Absent on pre-London blocks. - `withdrawals` (list of Withdrawal, optional) — Array of validator withdrawal objects. Introduced by EIP-4895 (Shanghai). Absent on pre-Shanghai blocks. - `withdrawalsRoot` (string, optional) — Root of the withdrawals trie. Introduced by EIP-4895 (Shanghai). Absent on pre-Shanghai blocks. - `blobGasUsed` (string, optional) — Total blob gas used by the transactions in this block, hex-encoded. Introduced by EIP-4844 (Cancun). Absent on pre-Cancun blocks. - `excessBlobGas` (string, optional) — Running total of blob gas consumed in excess of the target, used to compute the blob gas price, hex-encoded. Introduced by EIP-4844 (Cancun). Absent on pre-Cancun blocks. - `parentBeaconBlockRoot` (string, optional) — Parent beacon block root hash. Introduced by EIP-4788 (Cancun). Absent on pre-Cancun blocks. ## Types ### BlockNumberOrTag ### BlockTransactions Array of transaction objects or hashes ### Withdrawal A validator withdrawal object, as introduced by EIP-4895 (Shanghai) - `index` (string, required) — Monotonically increasing withdrawal index, hex-encoded - `validatorIndex` (string, required) — Index of the validator that generated the withdrawal, hex-encoded - `address` (string, required) — 20-byte recipient address for the withdrawn ether - `amount` (string, required) — Withdrawal amount in gwei, hex-encoded ## Examples **Request** ```json [ "latest", false ] ``` **Response** ```json { "id": "1", "jsonrpc": "2.0", "result": { "baseFeePerGas": "0xe8d4a51000", "difficulty": "0x1", "extraData": "0x2e7312f2ca373866f5266f0efb1d37f681088cad1ca26cf74fcfa0fb46f6dae5", "gasLimit": "0x4000000000000", "gasUsed": "0x1574f", "hash": "0x7b99b97aa538547a6e4e38f011f250da6d05675461e92d25819f08c756872f83", "l1BlockNumber": "0x16e1bd9", "logsBloom": "0x00000000000000000000008000000000000000000000000000000000000000000000000000000000000000040000000000000000000000000000010000000000000000000004000000000008880000082000000800000000000000000000000000000000000000000000000000000000000020000000002000000010000400000000000000000000000000000000000008000000000000000000000000000000000000000000000000000000000000000000000000000000200000000000000000000002000000000000000000000000000000000080000000800000000000000000010000000000000000040000000000000000000000000000000000000000", "miner": "0xa4b000000000000000000073657175656e636572", "mixHash": "0x000000000000878900000000016e1bd900000000000000200000000000000000", "nonce": "0x0000000000000720", "number": "0x28401d2", "parentHash": "0xfdd282bf07344d884e9cfcb242c657510c7101a3aac5d7d2b60e055473666cf4", "receiptsRoot": "0x8ac95bd431e3d47f06c59d2d6d617e6ca15e70b597e10e34e0214407b02052dd", "sendCount": "0x8789", "sendRoot": "0x2e7312f2ca373866f5266f0efb1d37f681088cad1ca26cf74fcfa0fb46f6dae5", "sha3Uncles": "0x1dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347", "size": "0x4eb", "stateRoot": "0x2621180ad41c918105db9f9a9b4bb4704439b97c97de6f983cbf9052a75fb90c", "timestamp": "0x693b7000", "transactions": [ "0x809db1d96a2a7f42ba7736e691c5c8f22940c2e2072f2bf54dab3776934714cf", "0x85681434491f687150b2ff934554f149b284839eafc579b6abffb54f7df3b42c", "0x4e85bcc5c314352bb64377eb4ce23b35b427783e2ebe06402e6c51a842760b7d" ], "transactionsRoot": "0xe87d88992052a67bdf2088bb09a0d29f6430447f5c72d6922c74000342910300", "uncles": [] } } ``` **SDK Code** ```python import requests url = "https://rpc.plume.org/YOUR_API_KEY" payload = ["latest", False] headers = {"Content-Type": "application/json"} response = requests.post(url, json=payload, headers=headers) print(response.json()) ``` ```javascript const url = 'https://rpc.plume.org/YOUR_API_KEY'; const options = { method: 'POST', headers: {'Content-Type': 'application/json'}, body: '["latest",false]' }; try { const response = await fetch(url, options); const data = await response.json(); console.log(data); } catch (error) { console.error(error); } ``` ```go package main import ( "fmt" "strings" "net/http" "io" ) func main() { url := "https://rpc.plume.org/YOUR_API_KEY" payload := strings.NewReader("[\n \"latest\",\n false\n]") req, _ := http.NewRequest("POST", url, payload) req.Header.Add("Content-Type", "application/json") res, _ := http.DefaultClient.Do(req) defer res.Body.Close() body, _ := io.ReadAll(res.Body) fmt.Println(res) fmt.Println(string(body)) } ``` ```ruby require 'uri' require 'net/http' url = URI("https://rpc.plume.org/YOUR_API_KEY") http = Net::HTTP.new(url.host, url.port) http.use_ssl = true request = Net::HTTP::Post.new(url) request["Content-Type"] = 'application/json' request.body = "[\n \"latest\",\n false\n]" response = http.request(request) puts response.read_body ``` ```java import com.mashape.unirest.http.HttpResponse; import com.mashape.unirest.http.Unirest; HttpResponse response = Unirest.post("https://rpc.plume.org/YOUR_API_KEY") .header("Content-Type", "application/json") .body("[\n \"latest\",\n false\n]") .asString(); ``` ```php request('POST', 'https://rpc.plume.org/YOUR_API_KEY', [ 'body' => '[ "latest", false ]', 'headers' => [ 'Content-Type' => 'application/json', ], ]); echo $response->getBody(); ``` ```csharp using RestSharp; var client = new RestClient("https://rpc.plume.org/YOUR_API_KEY"); var request = new RestRequest(Method.POST); request.AddHeader("Content-Type", "application/json"); request.AddParameter("application/json", "[\n \"latest\",\n false\n]", ParameterType.RequestBody); IRestResponse response = client.Execute(request); ``` ```swift import Foundation let headers = ["Content-Type": "application/json"] let parameters = ["latest", false] as [String : Any] let postData = JSONSerialization.data(withJSONObject: parameters, options: []) let request = NSMutableURLRequest(url: NSURL(string: "https://rpc.plume.org/YOUR_API_KEY")! as URL, cachePolicy: .useProtocolCachePolicy, timeoutInterval: 10.0) request.httpMethod = "POST" request.allHTTPHeaderFields = headers request.httpBody = postData as Data let session = URLSession.shared let dataTask = session.dataTask(with: request as URLRequest, completionHandler: { (data, response, error) -> Void in if (error != nil) { print(error as Any) } else { let httpResponse = response as? HTTPURLResponse print(httpResponse) } }) dataTask.resume() ```