OP (Optimism)
eth_accounts
Returns array of all accounts owned by the client.
Method: POST
https://optimism.nownodes.io
Example body (raw)
{"jsonrpc": "2.0", "method": "eth_accounts", "id": 1, "params": []}
Example response: 200
{
"jsonrpc": "2.0",
"id": 1,
"result": []
}
eth_chainId
Returns the currently configured chain ID, a value used in replay-protected transaction signing as introduced by EIP-155.
Method: POST
https://optimism.nownodes.io
Example body (raw)
{ "id": 1,"jsonrpc": "2.0","method": "eth_chainId" }
Example response: 200
{
"jsonrpc": "2.0",
"id": 1,
"result": "0xa"
}
eth_blockNumber
Returns the number of most recent block.
Method: POST
https://optimism.nownodes.io
Example body (raw)
{"jsonrpc": "2.0", "method": "eth_blockNumber", "id": 1, "params": []}
Example response: 200
{
"jsonrpc": "2.0",
"id": 1,
"result": "0x723b2be"
}
eth_call
Executes a new message call immediately without creating a transaction on the block chain.
Method: POST
https://optimism.nownodes.io
Example body (raw)
{"jsonrpc":"2.0","method":"eth_call","params":[{ "to": "0xd46e8dd67c5d32be8058bb8eb970870f07244567" }, "latest"],"id":1}
Example response: 200
{
"jsonrpc": "2.0",
"id": 1,
"result": "0x"
}
eth_estimateGas
Generates and returns an estimate of how much gas is necessary to allow the transaction to complete. The transaction will not be added to the blockchain. Note that the estimate may be significantly more than the amount of gas actually used by the transaction, for a variety of reasons including EVM mechanics and node performance.
Method: POST
https://optimism.nownodes.io
Example body (raw)
{"jsonrpc":"2.0","method":"eth_estimateGas","params":[{ "to": "0xd46e8dd67c5d32be8058bb8eb970870f07244567" }, "latest"],"id":1}
Example response: 200
{
"jsonrpc": "2.0",
"id": 1,
"result": "0x5208"
}
eth_gasPrice
Returns the current gas price in the default EVM denomination parameter.
Method: POST
https://optimism.nownodes.io
Example body (raw)
{"jsonrpc": "2.0", "method": "eth_gasPrice", "id": 1, "params": []}
Example response: 200
{
"jsonrpc": "2.0",
"id": 1,
"result": "0x3a55ddc"
}
eth_getBalance
Returns the balance of the account of given address.
Method: POST
https://optimism.nownodes.io
Example body (raw)
{"jsonrpc":"2.0","method":"eth_getBalance","params":["0x407d73d8a49eeb85d32cf465507dd71d507100c1", "latest"],"id":1}
Example response: 200
{
"jsonrpc": "2.0",
"id": 1,
"result": "0x0"
}
eth_getBlockByHash
Returns information about a block by hash.
Method: POST
https://optimism.nownodes.io
Example body (raw)
{"jsonrpc":"2.0","method":"eth_getBlockByHash","params":["0x996821278e31b2ccb497246173acfa4d804ed94d5b8e990d6e90e976f89c8637", false],"id":1}
Example response: 200
{
"jsonrpc": "2.0",
"id": 1,
"result": {
"difficulty": "0x2",
"extraData": "0xd98301090a846765746889676f312e31352e3133856c696e7578000000000000ac392470212a204b47693fd08f7a42d450879d099bd98b5b9800643d8461471704a4603f710513e0dd93f8314aed440bd38ecdc7bda9b8b64d48d5afa4cba96501",
"gasLimit": "0xe4e1c0",
"gasUsed": "0x264fc",
"hash": "0x996821278e31b2ccb497246173acfa4d804ed94d5b8e990d6e90e976f89c8637",
"logsBloom": "0x00000000000000000000000000000000000000004000000000000080008000000000000000000000000000000000004000000002000200000000000000000000100000000000000000000000000000000000000020000000000000000000000080000000000000000000002000000000400800000400000000000000100000000000020000000000000000000000000000000480000000000008000000000000000000000000000000000000000000000000000000000000000000000000000000400000000040002000010000000008000000000000000000020000000010000000000000000000000000000000000004000000080000000000000000000000",
"miner": "0x0000000000000000000000000000000000000000",
"mixHash": "0x0000000000000000000000000000000000000000000000000000000000000000",
"nonce": "0x0000000000000000",
"number": "0x1b4",
"parentHash": "0x7325274b195e929ed242616ed2f361d84f4abf39028a825b4478d8f70f9e6dc1",
"receiptsRoot": "0xa1c2cb56854baef80cf29f80fdf133df9dff97d121d30d09a981ee4e2d6dad12",
"sha3Uncles": "0x1dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347",
"size": "0x311",
"stateRoot": "0x6610d04afc00d207590cafa5433b32992977a699accd8f529f028b4e60965342",
"timestamp": "0x618da441",
"totalDifficulty": "0x369",
"transactions": [
"0xdec4abf7c622235ee41097dcf83da3f4b8f12f3edb4656955fd4e59ace3f4a17"
],
"transactionsRoot": "0xbbaee7ca2973d255c78185200eefa6cae3c6617195a818461d0d581fa2370ae8",
"uncles": []
}
}
eth_getBlockByNumber
Returns information about a block by block number.
Method: POST
https://optimism.nownodes.io/
Example body (raw)
{"jsonrpc":"2.0","method":"eth_getBlockByNumber","params":["0x1b4", true],"id":1}
Example response: 200
{
"jsonrpc": "2.0",
"id": 1,
"result": {
"difficulty": "0x2",
"extraData": "0xd98301090a846765746889676f312e31352e3133856c696e7578000000000000ac392470212a204b47693fd08f7a42d450879d099bd98b5b9800643d8461471704a4603f710513e0dd93f8314aed440bd38ecdc7bda9b8b64d48d5afa4cba96501",
"gasLimit": "0xe4e1c0",
"gasUsed": "0x264fc",
"hash": "0x996821278e31b2ccb497246173acfa4d804ed94d5b8e990d6e90e976f89c8637",
"logsBloom": "0x00000000000000000000000000000000000000004000000000000080008000000000000000000000000000000000004000000002000200000000000000000000100000000000000000000000000000000000000020000000000000000000000080000000000000000000002000000000400800000400000000000000100000000000020000000000000000000000000000000480000000000008000000000000000000000000000000000000000000000000000000000000000000000000000000400000000040002000010000000008000000000000000000020000000010000000000000000000000000000000000004000000080000000000000000000000",
"miner": "0x0000000000000000000000000000000000000000",
"mixHash": "0x0000000000000000000000000000000000000000000000000000000000000000",
"nonce": "0x0000000000000000",
"number": "0x1b4",
"parentHash": "0x7325274b195e929ed242616ed2f361d84f4abf39028a825b4478d8f70f9e6dc1",
"receiptsRoot": "0xa1c2cb56854baef80cf29f80fdf133df9dff97d121d30d09a981ee4e2d6dad12",
"sha3Uncles": "0x1dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347",
"size": "0x311",
"stateRoot": "0x6610d04afc00d207590cafa5433b32992977a699accd8f529f028b4e60965342",
"timestamp": "0x618da441",
"totalDifficulty": "0x369",
"transactions": [
"0xdec4abf7c622235ee41097dcf83da3f4b8f12f3edb4656955fd4e59ace3f4a17"
],
"transactionsRoot": "0xbbaee7ca2973d255c78185200eefa6cae3c6617195a818461d0d581fa2370ae8",
"uncles": []
}
}
eth_getBlockTransactionCountByHash
Returns the number of transactions in a block matching the given block hash.
Method: POST
https://optimism.nownodes.io/
Example body (raw)
{"jsonrpc":"2.0","method":"eth_getBlockTransactionCountByHash","params":["0x996821278e31b2ccb497246173acfa4d804ed94d5b8e990d6e90e976f89c8637"],"id":1}
Example response: 200
{
"jsonrpc": "2.0",
"id": 1,
"result": "0x1"
}
eth_getBlockTransactionCountByNumber
Returns the number of transactions in a block from a block matching the given block number.
Method: POST
https://optimism.nownodes.io/
Example body (raw)
{"jsonrpc":"2.0","method":"eth_getBlockTransactionCountByNumber","params":["0xe8"],"id":1}
Example response: 200
{
"jsonrpc": "2.0",
"id": 1,
"result": "0x1"
}
eth_getCode
Returns code at a given address.
Method: POST
https://optimism.nownodes.io/
Example body (raw)
{"jsonrpc":"2.0","method":"eth_getCode","params":["0xa94f5374fce5edbc8e2a8697c15331677e6ebf0b", "latest"],"id":1}
Example response: 200
{
"jsonrpc": "2.0",
"id": 1,
"result": "0x"
}
eth_getFilterChanges
Polling method for a filter, which returns an array of logs which occurred since last poll.
Method: POST
https://optimism.nownodes.io/
Example body (raw)
{"jsonrpc":"2.0","method":"eth_getFilterChanges","params":["0x16"],"id":73}
Example response: 200
{
"jsonrpc": "2.0",
"id": 73,
"error": {
"code": -32000,
"message": "filter not found"
}
}
eth_getFilterLogs
Returns an array of all logs matching filter with given id.
Method: POST
https://optimism.nownodes.io/
Example body (raw)
{"jsonrpc":"2.0","method":"eth_getFilterLogs","params":["0x16"],"id":74}
Example response: 200
{
"jsonrpc": "2.0",
"id": 74,
"error": {
"code": -32000,
"message": "filter not found"
}
}
eth_getLogs
Returns an array of all logs matching a given filter object.
Method: POST
https://optimism.nownodes.io/
Example body (raw)
{"jsonrpc":"2.0","method":"eth_getLogs","params":[{"topics":["0x000000000000000000000000a94f5374fce5edbc8e2a8697c15331677e6ebf0b"]}],"id":74}
Example response: 200
{
"jsonrpc": "2.0",
"id": 74,
"result": []
}
eth_getStorageAt
Returns the value from a storage position at a given address.
Method: POST
https://optimism.nownodes.io/
Example body (raw)
{"jsonrpc":"2.0", "method": "eth_getStorageAt","params": ["0x295a70b2de5e3953354a6a8344e616ed314d7251", "0x0", "latest"],"id": 1}
Example response: 200
{
"jsonrpc": "2.0",
"id": 1,
"result": "0x0000000000000000000000000000000000000000000000000000000000000000"
}
eth_getTransactionByBlockHashAndIndex
Returns information about a transaction by block hash and transaction index position.
Method: POST
https://optimism.nownodes.io/
Example body (raw)
{"jsonrpc":"2.0","method":"eth_getTransactionByBlockHashAndIndex","params":["0x996821278e31b2ccb497246173acfa4d804ed94d5b8e990d6e90e976f89c8637", "0x0"],"id":1}
Example response: 200
{
"jsonrpc": "2.0",
"id": 1,
"result": {
"blockHash": "0x996821278e31b2ccb497246173acfa4d804ed94d5b8e990d6e90e976f89c8637",
"blockNumber": "0x1b4",
"from": "0x57fe8051b897a14b4cbf84c22e7eeea0b30ba903",
"gas": "0x7a120",
"gasPrice": "0xf4240",
"hash": "0xdec4abf7c622235ee41097dcf83da3f4b8f12f3edb4656955fd4e59ace3f4a17",
"input": "0x202ee0ed000000000000000000000000000000000000000000000000000000000001507b000000000000000000000000000000000000000000000000000000003b958680",
"nonce": "0x29c51",
"to": "0x2e4a187732166a0282e52527b931c96146ac7c58",
"transactionIndex": "0x0",
"value": "0x0",
"type": "0x0",
"chainId": "0xa",
"v": "0x37",
"r": "0x12145a15cd29d83f8002e18f494af3d9d2530f6227f6d4e62d5994b183c00d6",
"s": "0x1b9a646e99c7e5ccb32878550a272953d5e83deae7499001acfbaa280653da35"
}
}
eth_getTransactionByBlockNumberAndIndex
Returns information about a transaction by block number and transaction index position.
Method: POST
https://optimism.nownodes.io/
Example body (raw)
{"jsonrpc":"2.0","method":"eth_getTransactionByBlockNumberAndIndex","params":["0x29c", "0x0"],"id":1}
Example response: 200
{
"jsonrpc": "2.0",
"id": 1,
"result": {
"blockHash": "0x640b0cfbad0cdd29beee92f03f17d1a2f99414d48f8fab93e80099fac1e0a2aa",
"blockNumber": "0x29c",
"from": "0xfa011d8d6c26f13abe2cefed38226e401b2b8a99",
"gas": "0x7a120",
"gasPrice": "0xf4240",
"hash": "0xefee7fef22bdef35bc7ed0cd42c2f501ec519f3fc113cb1d5a35fb58e8f72c2c",
"input": "0x202ee0ed0000000000000000000000000000000000000000000000000000000000015086000000000000000000000000000000000000000000000000000000003abf0fe1",
"nonce": "0x34117",
"to": "0x2e4a187732166a0282e52527b931c96146ac7c58",
"transactionIndex": "0x0",
"value": "0x0",
"type": "0x0",
"chainId": "0xa",
"v": "0x38",
"r": "0x99a2f05c1cd1c8978b94bd5f7a6df93aa84e63e15e3845ebc9965c79e6720c72",
"s": "0x17311cd756d5633e5de24943a82186779f18ed44074c30bd2532d6de83fba48c"
}
}
eth_getTransactionByHash
Returns the information about a transaction requested by transaction hash.
Method: POST
https://optimism.nownodes.io/
Example body (raw)
{"jsonrpc":"2.0","method":"eth_getTransactionByHash","params":["0x1346f3b05e328e4f17e8a18bbc458d930fa13885aa9e664b818f3c70c9179711"],"id":1}
Example response: 200
{
"jsonrpc": "2.0",
"id": 1,
"result": {
"blockHash": "0x2baaeda52b6a9961689fcc0a160bd73838095f197df406566ed66a5ac88bd48a",
"blockNumber": "0x723b359",
"from": "0x29f4c68ea70585c1298c5bd258f01870e8407d8c",
"gas": "0x3967b",
"gasPrice": "0x3b21ab6",
"hash": "0x1346f3b05e328e4f17e8a18bbc458d930fa13885aa9e664b818f3c70c9179711",
"input": "0x",
"nonce": "0x17b",
"to": "0x328337fddad9b7138eb0eca989ae976ace3917db",
"transactionIndex": "0x4",
"value": "0x11696075bd299",
"type": "0x0",
"chainId": "0xa",
"v": "0x38",
"r": "0x1ba7b609547ef44f57c914dc9f3b20b25e53b39ece73a9192cd4c19ca2c47c50",
"s": "0x728321a3b902cf5496466e1d5a7845002b8e8953b9916f5a03d2f51646a11def"
}
}
eth_getTransactionCount
Returns the number of transactions sent from an address.
Method: POST
https://optimism.nownodes.io/
Example body (raw)
{"jsonrpc":"2.0","method":"eth_getTransactionCount","params":["0x29f4c68ea70585c1298c5bd258f01870e8407d8c","latest"],"id":1}
Example response: 200
{
"jsonrpc": "2.0",
"id": 1,
"result": "0x17c"
}
eth_getTransactionReceipt
Returns the receipt of a transaction by transaction hash.
Method: POST
https://optimism.nownodes.io/
Example body (raw)
{"jsonrpc":"2.0","method":"eth_getTransactionReceipt","params":["0x1346f3b05e328e4f17e8a18bbc458d930fa13885aa9e664b818f3c70c9179711"],"id":1}
Example response: 200
{
"jsonrpc": "2.0",
"id": 1,
"result": {
"blockHash": "0x2baaeda52b6a9961689fcc0a160bd73838095f197df406566ed66a5ac88bd48a",
"blockNumber": "0x723b359",
"contractAddress": null,
"cumulativeGasUsed": "0x3a60d",
"effectiveGasPrice": "0x3b21ab6",
"from": "0x29f4c68ea70585c1298c5bd258f01870e8407d8c",
"gasUsed": "0x5208",
"l1Fee": "0x28fd253e9",
"l1GasPrice": "0x10fc50adb",
"l1GasUsed": "0x6e4",
"logs": [],
"logsBloom": "0x00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000",
"status": "0x1",
"to": "0x328337fddad9b7138eb0eca989ae976ace3917db",
"transactionHash": "0x1346f3b05e328e4f17e8a18bbc458d930fa13885aa9e664b818f3c70c9179711",
"transactionIndex": "0x4",
"type": "0x0"
}
}
eth_getUncleByBlockHashAndIndex
Returns information about a uncle of a block by hash and uncle index position.
Method: POST
https://optimism.nownodes.io/
Example body (raw)
{"jsonrpc":"2.0","method":"eth_getUncleByBlockHashAndIndex","params":["0xc6ef2fc5426d6ad6fd9e2a26abeab0aa2411b7ab17f30a99d3cb96aed1d1055b","0x0"],"id":1}
Example response: 200
{
"jsonrpc": "2.0",
"id": 1,
"result": null
}
eth_getUncleByBlockNumberAndIndex
Returns information about a uncle of a block by number and uncle index position.
Method: POST
https://optimism.nownodes.io/
Example body (raw)
{"jsonrpc":"2.0","method":"eth_getUncleByBlockNumberAndIndex","params":["0x29c", "0x0"],"id":1}
Example response: 200
{
"jsonrpc": "2.0",
"id": 1,
"result": null
}
eth_getUncleCountByBlockHash
Returns the number of uncles in a block matching the given block hash.
Method: POST
https://optimism.nownodes.io/
Example body (raw)
{"jsonrpc":"2.0","method":"eth_getUncleCountByBlockHash","params":["0xc6ef2fc5426d6ad6fd9e2a26abeab0aa2411b7ab17f30a99d3cb96aed1d1055b"],"id":1}
Example response: 200
{
"jsonrpc": "2.0",
"id": 1,
"result": null
}
eth_getUncleCountByBlockNumber
Returns the number of uncles in a block from a block matching the given block number.
Method: POST
https://optimism.nownodes.io/
Example body (raw)
{"jsonrpc":"2.0","method":"eth_getUncleCountByBlockNumber","params":["0xe8"],"id":1}
Example response: 200
{
"jsonrpc": "2.0",
"id": 1,
"result": "0x0"
}
eth_newBlockFilter
Creates a filter in the node, to notify when a new block arrives.
Method: POST
https://optimism.nownodes.io/
Example body (raw)
{"jsonrpc": "2.0", "method": "eth_newBlockFilter", "id": 1, "params": []}
Example response: 200
{
"jsonrpc": "2.0",
"id": 1,
"result": "0xdd7090255d1cd3164083c9925d2087c7"
}
eth_newFilter
Creates a filter object, based on filter options, to notify when the state changes (logs).
Method: POST
https://optimism.nownodes.io/
Example body (raw)
{"jsonrpc":"2.0","method":"eth_newFilter","params":[{ "fromBlock": "0x1", "toBlock": "0x2", "address": "0x8888f1f195afa192cfee860698584c030f4c9db1", "topics": ["0x000000000000000000000000a94f5374fce5edbc8e2a8697c15331677e6ebf0b", null, ["0x000000000000000000000000a94f5374fce5edbc8e2a8697c15331677e6ebf0b", "0x0000000000000000000000000aff3454fce5edbc8cca8697c15331677e6ebccc"]] }],"id":73}
Example response: 200
{
"jsonrpc": "2.0",
"id": 73,
"result": "0x16420aa1cd148b4a828c1ff9abaac115"
}
eth_newPendingTransactionFilter
Creates a filter in the node, to notify when new pending transactions arrive.
Method: POST
https://optimism.nownodes.io/
Example body (raw)
{"jsonrpc": "2.0", "method": "eth_newPendingTransactionFilter", "id": 1, "params": []}
Example response: 200
{
"jsonrpc": "2.0",
"id": 1,
"result": "0x5b3cc71717dea769651a39e577e746e7"
}
eth_pendingTransactions
Creates a filter in the node, to notify when new pending transactions arrive.
Method: POST
https://optimism.nownodes.io/
Example body (raw)
{
"jsonrpc": "2.0",
"method": "eth_pendingTransactions",
"id": 1,
"params": []
}
Example response: 200
{
"jsonrpc": "2.0",
"id": 1,
"result": []
}
eth_sendRawTransaction
Creates new message call transaction or a contract creation for signed transactions.
Method: POST
https://optimism.nownodes.io/
Example body (raw)
{"jsonrpc":"2.0","method":"eth_sendRawTransaction","params":["0xd46e8dd67c5d32be8d46e8dd67c5d32be8058bb8eb970870f072445675058bb8eb970870f072445675"],"id":1}
Example response: 200
{
"jsonrpc": "2.0",
"id": 1,
"error": {
"code": -32000,
"message": "rlp: element is larger than containing list"
}
}
eth_sendTransaction
Creates new message call transaction or a contract creation, if the data field contains code.
Method: POST
https://optimism.nownodes.io/
Example body (raw)
{ "id": 1, "jsonrpc": "2.0", "method": "eth_sendTransaction", "params": [{ "from": "0xb60e8dd61c5d32be8058bb8eb970870f07233155", "data": "0xd46e8dd67c5d32be8d46e8dd67c5d32be8058bb8eb970870f072445675058bb8eb970870f072445675" }] }
Example response: 200
{
"jsonrpc": "2.0",
"id": 1,
"error": {
"code": -32000,
"message": "unknown account"
}
}
eth_sign
The sign method calculates an Ethereum specific signature with: sign(keccak256("\x19Ethereum Signed Message:\n" + len(message) + message))).
Method: POST
https://optimism.nownodes.io/
Example body (raw)
{"jsonrpc":"2.0","method":"eth_sign","params":["0x9b2055d370f73ec7d8a03e965129118dc8f5bf83", "0xdeadbeaf"],"id":1}
Example response: 200
{
"jsonrpc": "2.0",
"id": 1,
"error": {
"code": -32000,
"message": "unknown account"
}
}
eth_syncing
The sync status object may need to be different depending on the details of Tendermint's sync protocol. However, the 'synced' result is simply a boolean, and can easily be derived from Tendermint's internal sync state.
Method: POST
https://optimism.nownodes.io/
Example body (raw)
{"jsonrpc": "2.0", "method": "eth_syncing", "id": 1, "params": []}
Example response: 200
{
"jsonrpc": "2.0",
"id": 1,
"result": false
}
eth_uninstallFilter
Uninstalls a filter with given id. Should always be called when watch is no longer needed.
Method: POST
https://optimism.nownodes.io/
Example body (raw)
{"jsonrpc":"2.0","method":"eth_uninstallFilter","params":["0xb"],"id":73}
Example response: 200
{
"jsonrpc": "2.0",
"id": 73,
"result": false
}
eth_createAccessList
Returns list of addresses and storage keys that are read and written by the transaction (except the sender account and precompiles), plus the estimated gas consumed when the access list is added.
Method: POST
https://optimism.nownodes.io/
Example body (raw)
{"id": 1,"jsonrpc": "2.0","method": "eth_createAccessList","params": [{"to": "0xd46e8dd67c5d32be8058bb8eb970870f07244567","gas": "0x0","gasPrice": "0x9184e72a000","value": "0x0","data": "0x"}]}
Example response: 200
{
"jsonrpc": "2.0",
"id": 1,
"error": {
"code": -32000,
"message": "failed to apply transaction: 0x271dfc4cbe91242312dfc19b8f6fcf8197d5d20d7816336be94cc725f3472e7c err: intrinsic gas too low: have 0, want 21000"
}
}
eth_maxPriorityFeePerGas
Returns a fee per gas that is an estimate of how much you can pay as a priority fee, or 'tip', to get a transaction included in the current block.
Method: POST
https://optimism.nownodes.io/
Example body (raw)
{"id": 1,"jsonrpc": "2.0","method": "eth_maxPriorityFeePerGas"}
Example response: 200
{
"jsonrpc": "2.0",
"id": 1,
"result": "0xf4240"
}
eth_feeHistory
Returns a collection of historical gas information.
Method: POST
https://optimism.nownodes.io/
Example body (raw)
{"id": 1,"jsonrpc": "2.0","method": "eth_feeHistory","params": [4,4,4]}
Example response: 200
{
"jsonrpc": "2.0",
"id": 1,
"error": {
"code": -32602,
"message": "invalid argument 1: hex string without 0x prefix"
}
}
eth_getProof
Returns the account and storage values of the specified accoun.
Method: POST
https://optimism.nownodes.io/
Example body (raw)
{"id": 1,"jsonrpc": "2.0","method": "eth_getProof","params": ["0xe5cB067E90D5Cd1F8052B83562Ae670bA4A211a8"]}
Example response: 200
{
"jsonrpc": "2.0",
"id": 1,
"error": {
"code": -32602,
"message": "missing value for required argument 1"
}
}
eth_mining
Method: POST
https://optimism.nownodes.io/
Example body (raw)
{
"jsonrpc": "2.0",
"method": "eth_mining",
"params": [],
"id": 71
}
Example response: 200
{
"jsonrpc": "2.0",
"id": 71,
"result": false
}
eth_coinbase
Method: POST
https://optimism.nownodes.io/
Example body (raw)
{
"jsonrpc": "2.0",
"method": "eth_coinbase",
"params": [],
"id": 64
}
Example response: 200
{
"jsonrpc": "2.0",
"id": 64,
"error": {
"code": -32000,
"message": "etherbase must be explicitly specified"
}
}
eth_signTransaction
Method: POST
https://optimism.nownodes.io/
Example body (raw)
{
"id": 1,
"jsonrpc": "2.0",
"method": "eth_signTransaction",
"params": [
{
"data": "0xd46e8dd67c5d32be8d46e8dd67c5d32be8058bb8eb970870f072445675058bb8eb970870f072445675",
"from": "0xb60e8dd61c5d32be8058bb8eb970870f07233155",
"gas": "0x76c0",
"gasPrice": "0x9184e72a000",
"to": "0xd46e8dd67c5d32be8058bb8eb970870f07244567",
"value": "0x9184e72a"
}
]
}
Example response: 200
{
"jsonrpc": "2.0",
"id": 1,
"error": {
"code": -32000,
"message": "nonce not specified"
}
}
eth_sign
Method: POST
https://optimism.nownodes.io/
Example body (raw)
{
"jsonrpc": "2.0",
"method": "eth_sign",
"params": [
"0x9b2055d370f73ec7d8a03e965129118dc8f5bf83",
"0xdeadbeaf"
],
"id": 1
}
Example response: 200
{
"jsonrpc": "2.0",
"id": 1,
"error": {
"code": -32000,
"message": "unknown account"
}
}
eth_hashrate
Method: POST
https://optimism.nownodes.io/
Example body (raw)
{
"jsonrpc": "2.0",
"method": "eth_hashrate",
"params": [],
"id": 71
}
Example response: 200
{
"jsonrpc": "2.0",
"id": 71,
"result": "0x0"
}
net_version
Returns the current network id.
Method: POST
https://optimism.nownodes.io/
Example body (raw)
{"jsonrpc": "2.0", "method": "net_version", "id": 1, "params": []}
Example response: 200
{
"jsonrpc": "2.0",
"id": 1,
"result": "10"
}
net_listening
Returns true if client is actively listening for network connections.
Method: POST
https://optimism.nownodes.io/
Example body (raw)
{
"id": 1,
"jsonrpc": "2.0",
"method": "net_listening"
}
Example response: 200
{
"jsonrpc": "2.0",
"id": 1,
"result": true
}
net_peerCount
Returns the number of peers currently connected to the client.
Method: POST
https://optimism.nownodes.io/
Example body (raw)
{
"jsonrpc": "2.0",
"method": "net_peerCount",
"params": [],
"id": 74
}
Example response: 200
{
"jsonrpc": "2.0",
"id": 74,
"result": "0x0"
}
web3_clientVersion
Get the web3 client version.
Method: POST
https://optimism.nownodes.io/
Example body (raw)
{"jsonrpc": "2.0", "method": "web3_clientVersion", "id": 1, "params": []}
Example response: 200
{
"jsonrpc": "2.0",
"id": 1,
"result": "Geth/v0.1.0-unstable/linux-amd64/go1.21.8"
}
web3_sha3
Returns Keccak-256 (not the standardized SHA3-256) of the given data.
Method: POST
https://optimism.nownodes.io/
Example body (raw)
{"jsonrpc":"2.0","method":"web3_sha3","params":["0x67656c6c6f20776f726c64"],"id":1}
Example response: 200
{
"jsonrpc": "2.0",
"id": 1,
"result": "0x1b84adea42d5b7d192fd8a61a85b25abe0757e9a65cab1da470258914053823f"
}
eth_subscribe
Subscribe to different Optimism event types like newHeads, logs, and syncing using WebSockets.
Method: POST
wss://optimism.nownodes.io/wss/{{api_key}}
Example body (raw)
{"jsonrpc": "2.0", "id": 1, "method": "eth_subscribe", "params": ["newHeads"]}
Example response: 200
{
"jsonrpc": "2.0",
"id": 1,
"result": "0x4e083017790a4b75186f1ce018a3fe95"
}
eth_unsubscribe
Unsubscribe from different Optimism event types with a regular RPC call with eth_unsubscribe as the method and the subscriptionId
as the first parameter. It returns a bool indicating if the subscription was canceled successfully.
Method: POST
wss://optimism.nownodes.io/wss/{{api_key}}
Example body (raw)
{"jsonrpc": "2.0", "id": 1, "method": "eth_unsubscribe", "params": ["0xa4bdc92f3cef6452f6b0205719c2469d"]}
Example response: 200
{
"jsonrpc": "2.0",
"id": 1,
"result": true
}
Last updated