POST
/
#particle_getLatestBlock

Contextualizing getLatestBlock

  • getlatestBlock returns a highly detailed response containing both standard and extraneous information about the latest block on the chain associated with chainId.

    This response includes full receipts of transactions contained within the latest block. This is non-toggleable.


Returned receipts contain the following attributes

JSON
// Example receipt

"blockHash":"0x9468f7e44e89921b38eb4812ec5dc7900ceffc454aecb0a452d9477952062efc",
"blockNumber":"0x11868d0",
"contractAddress":null,
"cumulativeGasUsed":"0x9e0096",
"effectiveGasPrice":"0x3094e55d9",
"from":"0x3527439923a63f8c13cf72b8fe80a77f6e572092",
"gasUsed":"0xbbad2",
"logs":[
   {
      "address":"0x32400084c286cf3e17e7b677ea9583e60a000324",
      "blockHash":"0x9468f7e44e89921b38eb4812ec5dc7900ceffc454aecb0a452d9477952062efc",
      "blockNumber":"0x11868d0",
      "data":"0x",
      "logIndex":"0x1b",
      "removed":false,
      "topics":[
         "0x22c9005dd88c18b552a1cd7e8b3b937fcde9ca69213c1f658f54d572e4877a81",
         "0x0000000000000000000000000000000000000000000000000000000000042fc4",
         "0x0000000000000000000000000000000000000000000000000000000000042fc5"
      ],
      "transactionHash":"0x373c6917650568746f2cb9a99c9250ef5c5fdda380ac0e322779e9532c0d5153",
      "transactionIndex":"0x10"
   }
],
"logsBloom":"0x00000000000000000000000000000000000000000000000000000000000010020000000000000000000002020000000000000000000000000000000000000000100000400000000000000000000000000000000000000000000000000000000000000000000000010000000000000000001000000000000000000000000000000000000000000000000000000000008000000000000000000000000000000000000000400000000000000000000000000000000000000000000000000000000000001000000002000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000",
"status":"0x1",
"to":"0x3db52ce065f728011ac6732222270b3f2360d919",
"transactionHash":"0x373c6917650568746f2cb9a99c9250ef5c5fdda380ac0e322779e9532c0d5153",
"transactionIndex":"0x10",
"type":"0x2"

Authorizations

Authorization
string
headerrequired

Basic authentication header of the form Basic <encoded-value>, where <encoded-value> is the base64-encoded string username:password.

Body

application/json
jsonrpc
string
default: 2required

Version of the JSON-RPC protocol, should be 2.0.

id
integer
default: 1required

The request identifier.

method
enum<string>
default: particle_getLatestBlockrequired

API method being called.

Available options:
particle_getLatestBlock
chainId
integer
required

The chain ID.

params
any[]
required

Parameters for the API method call.

Response

200 - application/json
jsonrpc
string

Version of the JSON-RPC protocol, should be 2.0.

id
integer

The request identifier.

result
object

Result of the API call.