Difference between revisions of "Ethereum API"

From wikieduonline
Jump to navigation Jump to search
Line 5: Line 5:
 
  [[curl -X POST --data]]
 
  [[curl -X POST --data]]
 
  [[cast]]
 
  [[cast]]
 +
 +
curl -X POST --data '{"jsonrpc":"2.0","method":"[[eth_blockNumber]]","params":[],"id":1}' https://[[mainnet.infura.io]]/v3/Y
 +
OUR_INFURA_PROJECT_ID
  
 
== Examples ==
 
== Examples ==

Revision as of 12:23, 27 October 2024

wikipedia:Ethereum API

curl -X POST --data
cast
curl -X POST --data '{"jsonrpc":"2.0","method":"eth_blockNumber","params":[],"id":1}' https://mainnet.infura.io/v3/Y

OUR_INFURA_PROJECT_ID

Examples

HEX String - an integer block number
String "earliest" for the earliest/genesis block
String "latest" - for the latest mined block
String "safe" - for the latest safe head block
String "finalized" - for the latest finalized block
String "pending" - for the pending state/transactions


Related

See also

  • https://www.quicknode.com/docs/ethereum/debug_traceBlockByNumber
  • Advertising: