Difference between revisions of "Ethereum API"

From wikieduonline
Jump to navigation Jump to search
 
Line 12: Line 12:
 
== Examples ==
 
== Examples ==
 
* <code>[[web3_clientVersion]]</code>
 
* <code>[[web3_clientVersion]]</code>
 +
* <code>[[eth_chainId]]</code>
 
* <code>[[eth_call]]</code>
 
* <code>[[eth_call]]</code>
 
* <code>[[eth_blockNumber]]</code>
 
* <code>[[eth_blockNumber]]</code>
Line 19: Line 20:
 
* <code>[[eth_gasPrice]]</code>
 
* <code>[[eth_gasPrice]]</code>
 
* <code>[[eth_sendRawTransaction]]</code>
 
* <code>[[eth_sendRawTransaction]]</code>
* [[eth_chainId]]
+
 
  
 
  HEX String - an integer block number
 
  HEX String - an integer block number

Latest revision as of 13:11, 27 October 2024

wikipedia:Ethereum API

curl -X POST --data
cast
curl -X POST -H "Content-Type: application/json" --data '{"jsonrpc":"2.0","method":"eth_blockNumber","params":[],"id":1}' localhost:8545


Examples[edit]


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[edit]

See also[edit]

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