All pages
Powered by GitBook
1 of 77

Optimism (OP)

Optimism Network API Reference for efficient interaction with OP nodes, enabling scalable, low-cost transactions and fast finality through Layer 2 solutions on the Ethereum blockchain.

db_getHex {disallowed} - Optimism

Example code for the db_getHex {disallowed} json-rpc method. Сomplete guide on how to use db_getHex {disallowed} json-rpc in GetBlock.io Web3 documentation.

Parameters

database - string

Database name

key - string

key name

Request

curl --location --request POST 'https://go.getblock.io/<ACCESS-TOKEN>/' \
--header 'Content-Type: application/json' \
--data-raw '{"jsonrpc": "2.0",
"method": "db_getHex",
"params": [null, null],
"id": "getblock.io"}'

Response

{
    "result": "null",
    "id": "getblock.io",
    "status_code": 405,
    "message": "Method not allowed"
}

db_getString {disallowed} - Optimism

Example code for the db_getString {disallowed} json-rpc method. Сomplete guide on how to use db_getString {disallowed} json-rpc in GetBlock.io Web3 documentation.

Parameters

database - string

database name

key - string

key name

Request

curl --location --request POST 'https://go.getblock.io/<ACCESS-TOKEN>/' \
--header 'Content-Type: application/json' \ 
--data-raw '{"jsonrpc": "2.0",
"method": "db_getString",
"params": [null, null],
"id": "getblock.io"}'

Response

{
    "result": "null",
    "id": "getblock.io",
    "status_code": 405,
    "message": "Method not allowed"
}

db_putHex {disallowed} - Optimism

Example code for the db_putHex {disallowed} json-rpc method. Сomplete guide on how to use db_putHex {disallowed} json-rpc in GetBlock.io Web3 documentation.

Parameters

database - string

database name

key - string

key name

data - data

data to store.

Request

curl --location --request POST 'https://go.getblock.io/<ACCESS-TOKEN>/' \
--header 'Content-Type: application/json' \
--data-raw '{"jsonrpc": "2.0",
"method": "db_putHex",
"params": [null, null, null],
"id": "getblock.io"}'

Response

{
    "result": "null",
    "id": "getblock.io",
    "status_code": 405,
    "message": "Method not allowed"
}

db_putString {disallowed} - Optimism

Example code for the db_putString {disallowed} json-rpc method. Сomplete guide on how to use db_putString {disallowed} json-rpc in GetBlock.io Web3 documentation.

Parameters

database - string

database name

key - string

key name

string - string

string to store.

Request

curl --location --request POST 'https://go.getblock.io/<ACCESS-TOKEN>/' \
--header 'Content-Type: application/json' \
--data-raw '{"jsonrpc": "2.0",
"method": "db_putString",
"params": [null, null, null],
"id": "getblock.io"}'

Response

{
    "result": "null",
    "id": "getblock.io",
    "status_code": 405,
    "message": "Method not allowed"
}

eth_accounts - Optimism

Example code for the eth_accounts json-rpc method. Сomplete guide on how to use eth_accounts json-rpc in GetBlock.io Web3 documentation.

Parameters

-

Request

curl --location --request POST 'https://go.getblock.io/<ACCESS-TOKEN>/' \
--header 'Content-Type: application/json' \ 
--data-raw '{"jsonrpc": "2.0",
"method": "eth_accounts",
"params": [],
"id": "getblock.io"}'

Response

{
    "id": "getblock.io",
    "jsonrpc": "2.0",
    "result": [
        "0x00000398232e2064f896018496b4b44b3d62751f"
    ]
}

eth_blockNumber - Optimism

Example code for the eth_blockNumber json-rpc method. Сomplete guide on how to use eth_blockNumber json-rpc in GetBlock.io Web3 documentation.

Parameters

-

Request

curl --location --request POST 'https://go.getblock.io/<ACCESS-TOKEN>/' \
--header 'Content-Type: application/json' \
--data-raw '{"jsonrpc": "2.0",
"method": "eth_blockNumber",
"params": [],
"id": "getblock.io"}'

Response

{
    "id": "getblock.io",
    "jsonrpc": "2.0",
    "result": "0x6255702"
}

eth_call - Optimism

Example code for the eth_call json-rpc method. Сomplete guide on how to use eth_call json-rpc in GetBlock.io Web3 documentation.

Parameters

object - json object

The transacion call object in format: { "from": "address" (optional, string) - The address the transaction is sent from. "to": "address" (optional, string) - The address the transaction is directed to. "gas": "quantity" (optional, string) - Integer of the gas provided for the transaction execution. eth_call consumes zero gas, but this parameter may be needed by some executions. "gasPrice": "quantity" (optional, string) - Integer of the gasPrice used for each paid gas "value": "quantity" (optional, string) - Integer of the value sent with this transaction "data": "data" (optional, string) - Hash of the method signature and encoded parameters. }

QUANTITY|TAG - string

integer block number, or the string "latest", "earliest" or "pending".

Request

curl --location --request POST 'https://go.getblock.io/<ACCESS-TOKEN>/' \
--header 'Content-Type: application/json' \
--data-raw '{"jsonrpc": "2.0",
"method": "eth_call",
"params": [{"from": "0xb60e8dd61c5d32be8058bb8eb970870f07233155", "to": "0xd46e8dd67c5d32be8058bb8eb970870f07244567", "gas": "0x76c0", "gasPrice": "0x9184e72a000", "value": "0x9184e72a", "data": "0xd46e8dd67c5d32be8d46e8dd67c5d32be8058bb8eb970870f072445675058bb8eb970870f072445675"}, "latest"],
"id": "getblock.io"}'

Response

{
    "error": {
        "code": -32000,
        "message": "insufficient balance to pay for gas"
    },
    "id": "getblock.io",
    "jsonrpc": "2.0"
}

eth_chainId - Optimism

Example code for the eth_chainId json-rpc method. Сomplete guide on how to use eth_chainId json-rpc in GetBlock.io Web3 documentation.

Parameters

-

Request

curl --location --request POST 'https://go.getblock.io/<ACCESS-TOKEN>/' \
--header 'Content-Type: application/json' \ 
--data-raw '{"jsonrpc": "2.0",
"method": "eth_chainId",
"params": [],
"id": "getblock.io"}'

Response

{
    "id": "getblock.io",
    "jsonrpc": "2.0",
    "result": "0xa"
}

eth_coinbase - Optimism

Example code for the eth_coinbase json-rpc method. Сomplete guide on how to use eth_coinbase json-rpc in GetBlock.io Web3 documentation.

Parameters

-

Request

curl --location --request POST 'https://go.getblock.io/<ACCESS-TOKEN>/' \
--header 'Content-Type: application/json' \
--data-raw '{"jsonrpc": "2.0",
"method": "eth_coinbase",
"params": [],
"id": "getblock.io"}'

Response

{
    "id": "getblock.io",
    "jsonrpc": "2.0",
    "result": "0x00000398232e2064f896018496b4b44b3d62751f"
}

eth_compileLLL {disallowed} - Optimism

Example code for the eth_compileLLL {disallowed} json-rpc method. Сomplete guide on how to use eth_compileLLL {disallowed} json-rpc in GetBlock.io Web3 documentation.

Parameters

code - string

The source code.

Request

curl --location --request POST 'https://go.getblock.io/<ACCESS-TOKEN>/' \
--header 'Content-Type: application/json' \
--data-raw '{"jsonrpc": "2.0",
"method": "eth_compileLLL",
"params": [null],
"id": "getblock.io"}'

Response

{
    "result": "null",
    "id": "getblock.io",
    "status_code": 405,
    "message": "Method not allowed"
}

eth_compileSerpent {disallowed} - Optimism

Example code for the eth_compileSerpent {disallowed} json-rpc method. Сomplete guide on how to use eth_compileSerpent {disallowed} json-rpc in GetBlock.io Web3 documentation.

Parameters

code - string

The source code.

Request

curl --location --request POST 'https://go.getblock.io/<ACCESS-TOKEN>/' \
--header 'Content-Type: application/json' \ 
--data-raw '{"jsonrpc": "2.0",
"method": "eth_compileSerpent",
"params": [null],
"id": "getblock.io"}'

Response

{
    "result": "null",
    "id": "getblock.io",
    "status_code": 405,
    "message": "Method not allowed"
}

eth_compileSolidity {disallowed} - Optimism

Example code for the eth_compileSolidity {disallowed} json-rpc method. Сomplete guide on how to use eth_compileSolidity {disallowed} json-rpc in GetBlock.io Web3 documentation.

Parameters

code - string

The source code.

Request

curl --location --request POST 'https://go.getblock.io/<ACCESS-TOKEN>/' \
--header 'Content-Type: application/json' \
--data-raw '{"jsonrpc": "2.0",
"method": "eth_compileSolidity",
"params": [null],
"id": "getblock.io"}'

Response

{
    "result": "null",
    "id": "getblock.io",
    "status_code": 405,
    "message": "Method not allowed"
}

eth_estimateExecutionGas - Optimism

Example code for the eth_estimateExecutionGas json-rpc method. Сomplete guide on how to use eth_estimateExecutionGas json-rpc in GetBlock.io Web3 documentation.

Parameters

object - json object

The transacion call object in format: { "from": "address" (optional, string) - The address the transaction is sent from. "to": "address" (optional, string) - The address the transaction is directed to. "gas": "quantity" (optional, string) - Integer of the gas provided for the transaction execution. eth_call consumes zero gas, but this parameter may be needed by some executions. "gasPrice": "quantity" (optional, string) - Integer of the gasPrice used for each paid gas "value": "quantity" (optional, string) - Integer of the value sent with this transaction "data": "data" (optional, string) - Hash of the method signature and encoded parameters. }

QUANTITY|TAG - string

Optional.

integer block number, or the string "latest", "earliest" or "pending".

Request

curl --location --request POST 'https://go.getblock.io/<ACCESS-TOKEN>/' \
--header 'Content-Type: application/json' \ 
--data-raw '{"jsonrpc": "2.0",
"method": "eth_estimateExecutionGas",
"params": [{"from": "0xb60e8dd61c5d32be8058bb8eb970870f07233155", "to": "0xd46e8dd67c5d32be8058bb8eb970870f07244567", "gas": "0x76c0", "gasPrice": "0x9184e72a000", "value": "0x9184e72a", "data": "0xd46e8dd67c5d32be8d46e8dd67c5d32be8058bb8eb970870f072445675058bb8eb970870f072445675"}, "latest"],
"id": "getblock.io"}'

Response

{
    "error": {
        "code": -32601,
        "message": "the method eth_estimateExecutionGas does not exist/is not available"
    },
    "id": "getblock.io",
    "jsonrpc": "2.0"
}

eth_estimateGas - Optimism

Example code for the eth_estimateGas json-rpc method. Сomplete guide on how to use eth_estimateGas json-rpc in GetBlock.io Web3 documentation.

Parameters

object - json object

The transacion call object in format: { "from": "address" (optional, string) - The address the transaction is sent from. "to": "address" (optional, string) - The address the transaction is directed to. "gas": "quantity" (optional, string) - Integer of the gas provided for the transaction execution. eth_call consumes zero gas, but this parameter may be needed by some executions. "gasPrice": "quantity" (optional, string) - Integer of the gasPrice used for each paid gas "value": "quantity" (optional, string) - Integer of the value sent with this transaction "data": "data" (optional, string) - Hash of the method signature and encoded parameters. }

QUANTITY|TAG - string

Optional.

integer block number, or the string "latest", "earliest" or "pending".

Request

curl --location --request POST 'https://go.getblock.io/<ACCESS-TOKEN>/' \
--header 'Content-Type: application/json' \ 
--data-raw '{"jsonrpc": "2.0",
"method": "eth_estimateGas",
"params": [{"from": "0xb60e8dd61c5d32be8058bb8eb970870f07233155", "to": "0xd46e8dd67c5d32be8058bb8eb970870f07244567", "gas": "0x76c0", "gasPrice": "0x9184e72a000", "value": "0x9184e72a", "data": "0xd46e8dd67c5d32be8d46e8dd67c5d32be8058bb8eb970870f072445675058bb8eb970870f072445675"}, "latest"],
"id": "getblock.io"}'

Response

{
    "error": {
        "code": -32000,
        "message": "gas required exceeds allowance (30400)"
    },
    "id": "getblock.io",
    "jsonrpc": "2.0"
}

eth_gasPrice - Optimism

Example code for the eth_gasPrice json-rpc method. Сomplete guide on how to use eth_gasPrice json-rpc in GetBlock.io Web3 documentation.

Parameters

-

Request

curl --location --request POST 'https://go.getblock.io/<ACCESS-TOKEN>/' \
--header 'Content-Type: application/json' \ 
--data-raw '{"jsonrpc": "2.0",
"method": "eth_gasPrice",
"params": [],
"id": "getblock.io"}'

Response

{
    "id": "getblock.io",
    "jsonrpc": "2.0",
    "result": "0xf4240"
}

eth_getBalance - Optimism

Example code for the eth_getBalance json-rpc method. Сomplete guide on how to use eth_getBalance json-rpc in GetBlock.io Web3 documentation.

Parameters

DATA - string

address to check for balance.

QUANTITY|TAG - string

block number or "latest", "earliest" or "pending"

Request

curl --location --request POST 'https://go.getblock.io/<ACCESS-TOKEN>/' \
--header 'Content-Type: application/json' \ 
--data-raw '{"jsonrpc": "2.0",
"method": "eth_getBalance",
"params": ["0xbec4e80531dad6a9989828d174cc2878b1e3123d", "latest"],
"id": "getblock.io"}'

Response

{
    "id": "getblock.io",
    "jsonrpc": "2.0",
    "result": "0x0"
}

eth_getBlockByHash - Optimism

Example code for the eth_getBlockByHash json-rpc method. Сomplete guide on how to use eth_getBlockByHash json-rpc in GetBlock.io Web3 documentation.

Parameters

DATA - string

Hash of a block.

Boolean - Boolean

If true it returns the full transaction objects, if false only the hashes of the transactions.

Request

curl --location --request POST 'https://go.getblock.io/<ACCESS-TOKEN>/' \
--header 'Content-Type: application/json' \
--data-raw '{"jsonrpc": "2.0",
"method": "eth_getBlockByHash",
"params": ["0x56436a935370b8decda78cf4a60e0668a882764af1cdec3a6d6967f944f4dace", false],
"id": "getblock.io"}'

Response

{
    "id": "getblock.io",
    "jsonrpc": "2.0",
    "result": null
}

eth_getBlockByNumber - Optimism

Example code for the eth_getBlockByNumber json-rpc method. Сomplete guide on how to use eth_getBlockByNumber json-rpc in GetBlock.io Web3 documentation.

Parameters

QUANTITY|TAG - string

block number or "latest", "earliest" or "pending"

Boolean - Boolean

If true it returns the full transaction objects, if false only the hashes of the transactions.

Request

curl --location --request POST 'https://go.getblock.io/<ACCESS-TOKEN>/' \
--header 'Content-Type: application/json' \ 
--data-raw '{"jsonrpc": "2.0",
"method": "eth_getBlockByNumber",
"params": ["latest", false],
"id": "getblock.io"}'

Response

{
    "id": "getblock.io",
    "jsonrpc": "2.0",
    "result": {
        "difficulty": "0x2",
        "extraData": "0xd98301090a846765746889676f312e31352e3133856c696e7578000000000000ca05166737d2fb2999d6ed01b4e652dd355340bb162bdcf8993c22593b226308620a53e3270ad738ff5d9cd8acb70d7dc3ea31f0a7ac067b1ae6845fc68cd0a901",
        "gasLimit": "0xe4e1c0",
        "gasUsed": "0x3dd27",
        "hash": "0x5ab832e53a19377023f58e567f79fe87729a5480242271d8734b31d4604872d3",
        "logsBloom": "0x0400000008000000000000800000000000000000000000000000000000000000000000000000000100000000001000000000004000000000040000000000000000004000080000000000000c00000000008000000000000000000000000000000000000000000000000000000000000000000000000000000200001008000000000200000000000008000000000000000000000002000000000000000000000000c000000000000020000004000000020000000000090000000000000000000080000002000000000000000000000000000000000000000000010000000000000000810000000000000000000000000000000000005000000000000000010000",
        "miner": "0x0000000000000000000000000000000000000000",
        "mixHash": "0x0000000000000000000000000000000000000000000000000000000000000000",
        "nonce": "0x0000000000000000",
        "number": "0x6255716",
        "parentHash": "0x70e1864b1aa72bcf8a77e1dba1dda06043ced980783edd2ab7f6a79fa257b0f3",
        "receiptsRoot": "0xf7dc481d3d3fcf8125b5735bdf2ea8898230f6d1cd132753c7dc81f471a4b79b",
        "sha3Uncles": "0x1dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347",
        "size": "0x65c",
        "stateRoot": "0xc5c06dd5e98b3f7a90d89fbc044c54317cca0faf5ee09345f407e397aa221d91",
        "timestamp": "0x6476c7ca",
        "totalDifficulty": "0xc4aae2d",
        "transactions": [
            "0xd0d214d179e2764b361dd2713f69b7623b693f34a72b2a4edeb609a0244fc9dc"
        ],
        "transactionsRoot": "0x2360c6d3f10377f01728ad4637822ea66d22fbc9ba8ad6eb9f96df1a1d88ceb9",
        "uncles": []
    }
}

eth_getBlockRange {disallowed} - Optimism

Example code for the eth_getBlockRange {disallowed} json-rpc method. Сomplete guide on how to use eth_getBlockRange {disallowed} json-rpc in GetBlock.io Web3 documentation.

Parameters

QUANTITY|TAG - string

integer of the starting block number for the range, or the string "earliest", "latest" or "pending"

QUANTITY|TAG - string

integer of the ending block number for the range, or the string "earliest", "latest" or "pending"

Boolean - Boolean

If true it returns the full transaction objects, if false only the hashes of the transactions.

Request

curl --location --request POST 'https://go.getblock.io/<ACCESS-TOKEN>/' \
--header 'Content-Type: application/json' \
--data-raw '{"jsonrpc": "2.0",
"method": "eth_getBlockRange",
"params": ["earliest", "latest", false],
"id": "getblock.io"}'

Response

{
    "result": "null",
    "id": "getblock.io",
    "status_code": 405,
    "message": "Method not allowed"
}

eth_getBlockReceipts {disallowed} - Optimism

Example code for the eth_getBlockReceipts {disallowed} json-rpc method. Сomplete guide on how to use eth_getBlockReceipts {disallowed} json-rpc in GetBlock.io Web3 documentation.

Parameters

DATA, 32 Bytes - None

Block number in hex format or tag.

Request

curl --location --request POST 'https://go.getblock.io/<ACCESS-TOKEN>/' \
--header 'Content-Type: application/json' \
--data-raw '{"jsonrpc": "2.0",
"method": "eth_getBlockReceipts",
"params": ["0xacffc1"],
"id": "getblock.io"}'

Response

{
    "result": "null",
    "id": "getblock.io",
    "status_code": 405,
    "message": "Method not allowed"
}

eth_getBlockTransactionCountByHash - Optimism

Example code for the eth_getBlockTransactionCountByHash json-rpc method. Сomplete guide on how to use eth_getBlockTransactionCountByHash json-rpc in GetBlock.io Web3 documentation.

Parameters

DATA - string

hash of the block.

Request

curl --location --request POST 'https://go.getblock.io/<ACCESS-TOKEN>/' \
--header 'Content-Type: application/json' \ 
--data-raw '{"jsonrpc": "2.0",
"method": "eth_getBlockTransactionCountByHash",
"params": ["0x56436a935370b8decda78cf4a60e0668a882764af1cdec3a6d6967f944f4dace"],
"id": "getblock.io"}'

Response

{
    "id": "getblock.io",
    "jsonrpc": "2.0",
    "result": null
}

eth_getBlockTransactionCountByNumber - Optimism

Example code for the eth_getBlockTransactionCountByNumber json-rpc method. Сomplete guide on how to use eth_getBlockTransactionCountByNumber json-rpc in GetBlock.io Web3 documentation.

Parameters

QUANTITY|TAG - string

block number or "latest", "earliest" or "pending"

Request

curl --location --request POST 'https://go.getblock.io/<ACCESS-TOKEN>/' \
--header 'Content-Type: application/json' \
--data-raw '{"jsonrpc": "2.0",
"method": "eth_getBlockTransactionCountByNumber",
"params": ["0xc6f437"],
"id": "getblock.io"}'

Response

{
    "id": "getblock.io",
    "jsonrpc": "2.0",
    "result": "0x1"
}

eth_getCode - Optimism

Example code for the eth_getCode json-rpc method. Сomplete guide on how to use eth_getCode json-rpc in GetBlock.io Web3 documentation.

Parameters

DATA - string

address.

QUANTITY|TAG - string

block number or "latest", "earliest" or "pending"

Request

curl --location --request POST 'https://go.getblock.io/<ACCESS-TOKEN>/' \
--header 'Content-Type: application/json' \ 
--data-raw '{"jsonrpc": "2.0",
"method": "eth_getCode",
"params": ["0xbec4e80531dad6a9989828d174cc2878b1e3123d", "latest"],
"id": "getblock.io"}'

Response

{
    "id": "getblock.io",
    "jsonrpc": "2.0",
    "result": "0x"
}

eth_getCompilers {disallowed} - Optimism

Example code for the eth_getCompilers {disallowed} json-rpc method. Сomplete guide on how to use eth_getCompilers {disallowed} json-rpc in GetBlock.io Web3 documentation.

Parameters

-

Request

curl --location --request POST 'https://go.getblock.io/<ACCESS-TOKEN>/' \
--header 'Content-Type: application/json' \ 
--data-raw '{"jsonrpc": "2.0",
"method": "eth_getCompilers",
"params": [],
"id": "getblock.io"}'

Response

{
    "result": "null",
    "id": "getblock.io",
    "status_code": 405,
    "message": "Method not allowed"
}

eth_getFilterChanges - Optimism

Example code for the eth_getFilterChanges json-rpc method. Сomplete guide on how to use eth_getFilterChanges json-rpc in GetBlock.io Web3 documentation.

Parameters

QUANTITY - string

The filter id.

Request

curl --location --request POST 'https://go.getblock.io/<ACCESS-TOKEN>/' \
--header 'Content-Type: application/json' \ 
--data-raw '{"jsonrpc": "2.0",
"method": "eth_getFilterChanges",
"params": ["0x16"],
"id": "getblock.io"}'

Response

{
    "error": {
        "code": -32000,
        "message": "filter not found"
    },
    "id": "getblock.io",
    "jsonrpc": "2.0"
}

eth_getFilterLogs - Optimism

Example code for the eth_getFilterLogs json-rpc method. Сomplete guide on how to use eth_getFilterLogs json-rpc in GetBlock.io Web3 documentation.

Parameters

QUANTITY - string

The filter id.

Request

curl --location --request POST 'https://go.getblock.io/<ACCESS-TOKEN>/' \
--header 'Content-Type: application/json' \ 
--data-raw '{"jsonrpc": "2.0",
"method": "eth_getFilterLogs",
"params": ["0x16"],
"id": "getblock.io"}'

Response

{
    "error": {
        "code": -32000,
        "message": "filter not found"
    },
    "id": "getblock.io",
    "jsonrpc": "2.0"
}

eth_getLogs - Optimism

Example code for the eth_getLogs json-rpc method. Сomplete guide on how to use eth_getLogs json-rpc in GetBlock.io Web3 documentation.

Parameters

Object - object

The filter options

Request

curl --location --request POST 'https://go.getblock.io/<ACCESS-TOKEN>/' \
--header 'Content-Type: application/json' \
--data-raw '{"jsonrpc": "2.0",
"method": "eth_getLogs",
"params": [{"topics": []}],
"id": "getblock.io"}'

Response

{
    "id": "getblock.io",
    "jsonrpc": "2.0",
    "result": [
        {
            "address": "0x7c56d3650f9acd992b3aa635c04a311c54ad264c",
            "blockHash": "0x8c0682143a415f8fddb84a32f13875c530dd83f398f0aa5aff5c73f397b92c67",
            "blockNumber": "0x625571c",
            "data": "0x0000000000000000000000000000000000000000000000000000000004f82d450000000000000000000000002bdf9249c350c68a43a9714c1b9153af54751b1c00000000000000000000000000000000000000000000000000000000000000a000000000000000000000000000000000000000000000000000000000000002000000000000000000000000ac3b0b1bf185a08cea9febc7cfdcbe0a0002edfd01000000000000000000000000000000000000000000000000000000000000000a0000000000000000000000000000000000000000000000000000000004f774830000000000000000000000000000000000000000000000000000000004f774830000000000000000000000000000000000000000000000000000000004f774830000000000000000000000000000000000000000000000000000000004f82d450000000000000000000000000000000000000000000000000000000004f82d450000000000000000000000000000000000000000000000000000000004f82d450000000000000000000000000000000000000000000000000000000004f82d450000000000000000000000000000000000000000000000000000000004f86e300000000000000000000000000000000000000000000000000000000004f86e300000000000000000000000000000000000000000000000000000000004f86e30000000000000000000000000000000000000000000000000000000000000000a0102090003040506070800000000000000000000000000000000000000000000",
            "logIndex": "0x0",
            "removed": false,
            "topics": [
                "0xf6a97944f31ea060dfde0566e4167c1a1082551e64b60ecb14d599a9d023d451",
                "0x000000000000000000000000000000000000000000000000000000000001cd6f"
            ],
            "transactionHash": "0xc897147b372787d6e3969e4a4c843d8a08fc6b430ae9c4a2a322de385f7a9a90",
            "transactionIndex": "0x0"
        },
        {
            "address": "0x7c56d3650f9acd992b3aa635c04a311c54ad264c",
            "blockHash": "0x8c0682143a415f8fddb84a32f13875c530dd83f398f0aa5aff5c73f397b92c67",
            "blockNumber": "0x625571c",
            "data": "0x000000000000000000000000000000000000000000000000000000006476c7ca",
            "logIndex": "0x1",
            "removed": false,
            "topics": [
                "0x0109fc6f55cf40689f02fbaad7af7fe7bbac8a3d2186600afc7d3e10cac60271",
                "0x000000000000000000000000000000000000000000000000000000000001cd6f",
                "0x0000000000000000000000000000000000000000000000000000000000000000"
            ],
            "transactionHash": "0xc897147b372787d6e3969e4a4c843d8a08fc6b430ae9c4a2a322de385f7a9a90",
            "transactionIndex": "0x0"
        },
        {
            "address": "0x7c56d3650f9acd992b3aa635c04a311c54ad264c",
            "blockHash": "0x8c0682143a415f8fddb84a32f13875c530dd83f398f0aa5aff5c73f397b92c67",
            "blockNumber": "0x625571c",
            "data": "0x000000000000000000000000000000000000000000000000000000006476c7ca",
            "logIndex": "0x2",
            "removed": false,
            "topics": [
                "0x0559884fd3a460db3073b7fc896cc77986f16e378210ded43186175bf646fc5f",
                "0x0000000000000000000000000000000000000000000000000000000004f82d45",
                "0x000000000000000000000000000000000000000000000000000000000001cd6f"
            ],
            "transactionHash": "0xc897147b372787d6e3969e4a4c843d8a08fc6b430ae9c4a2a322de385f7a9a90",
            "transactionIndex": "0x0"
        }
    ]
}

eth_getProof - Optimism

Example code for the eth_getProof json-rpc method. Сomplete guide on how to use eth_getProof json-rpc in GetBlock.io Web3 documentation.

Parameters

DATA - None

20-byte address of the account or contract.

ARRAY - None

Array of 32-byte storage keys to generate proofs for.

QUANTITY|TAG - None

Integer representing a block number or one of the string tags latest, earliest, or pending, as described in Block Parameter.

Request

curl --location --request POST 'https://go.getblock.io/<ACCESS-TOKEN>/' \
--header 'Content-Type: application/json' \
--data-raw '{"jsonrpc": "2.0",
"method": "eth_getProof",
"params": ["0x0a8156e7ee392d885d10eaa86afd0e323afdcd95", ["0xc48fb64230a82f65a08e7280bd8745e7fea87bc7c206309dee32209fe9a985f7"], "latest"],
"id": "getblock.io"}'

Response

{
    "id": "getblock.io",
    "jsonrpc": "2.0",
    "result": {
        "accountProof": [
            "0xf90211a0c70e2b796fa99cac34dbb88700b5f1244016c4b0658d2a5b756172d09e3004fca00be3f80f8b5120871ba2d12150ba304c6b9a4274dbfd3b66f32a0cfd260a8887a02a9568888a9000ed6d129c5c909f0ff59eec2674d035971e441611892798d237a0acc9845a4df7facca6df805cb8e1321d1f5565bdcab03dec284fc72ee585ee9ea0883faa01179a88d69747863c0eabc42fd4973e80e3f5db51bf4f1908dc59fe35a0da92ef05be1d12972cb3c721fb24ffa8b8e50bd6f3234c14466ccbee24323d38a04606663c85c9979243703252aa9c3026ddb323d5f11fdddba1c072edb148fab3a0087d6db65d0f0a21787ee8f844005da73092a14717aed0951bd7ae864a1198f7a0b43e072ea4e0326c339a0bb1eff1619a1e5474412a7ce9e0c86b6e46065d165ba011df089dad77026df0568057bfa53df66dfd31c998b6b4ebf30b770131dc9d05a04d679999511717caff5faf41a0f97b5e93d2a6e2879519fca58eb1a1e9d66666a0962b07e3e9860b54d5c844d79abc75b212d826de8839e3eebdb575e9023d512da0e257b4dd84cea5b844792772bd7293c190c555ec29b76cdeba9acbd39efa46faa07583cd1712771de2335991249e54e8fd543665667df3626fdfff6873c3f25e58a03870a76edce8c5358e26659b5f077c30bfefa11965a8305794485d7b857a1d61a0129c4ca27eeea1504e128632ddb356d74735bb4444020646fa9a8b7bcb05034480",
            "0xf90211a0567c25bc3beae05d03909816f161548e991ec84fadd9a82cdf22f695e23a88f1a08c02b14ce92295fbef079e19bbfdc91b9cc240e939b5d528ec89787aa33df72aa01c0264442a197a27cd005e651473ef08086cb3c874d7ba9b87800315e3deac4ca062bdb12198ef548bfd0f20f5fcaba7c74997f71d38b71322738ba82fe5ead895a0d99743c118cdb4f67077dcd71dedf51c69c496f4e1e9a5f75643b91aec178c7da078459603c18808b2c45178623b06168950ee69a90c0f48aae2fa7f964bb7bb6ba07cfcd54bf44846435f8564bafe2a4fcbce50a5e7014df5742fac199afa6b5a4aa0e3a13327f648ee3a67b1fc349011139c8cb016e6157be48aa881aae764eb3397a0d544da59feb8765dbaa3000a00f29cb175db5fce5b755050f300f94aecf18fd4a0ef31ade233bffa3f7accd7bedf4764b09416acb1f0af0d7cf5d585ec903c8cb7a0df5a2b6c8c80c6331968db6404b0b5d8ab483a32d5e8c1fe9eab0dbd14cfc2a8a0924e6138b2b950c41888cb8266b535c1f175a05758ac4aacd1062d2c06e9cb0aa0bc0f46db3044b6cc9a07c03c6f283eb9db3a78f4bb2b75aa258f7010c9fd4e59a0be31abe4453591ac92c48e9bccdafcd25c1634d22388fbaa440f9dd2ee79e9f5a0d26f3195c4650a09ac18ec2cfb72342ce6edf2fe9cd3be83e02d30f0e6d0031ca08cc134b44de503e6ca5bfdc1a00189bcb588e0fb413447469b5c206c43f4d09e80",
            "0xf90211a0bab1bd4a719a6dddef24b88e7d624734010c683ffc41da5af4940f82aa83c6b1a0d579b8fd82a5fcbae768e7b9ef8283bd0b6e6a200f21dba288b41246058c0e4ca0bbabf8b2951fb67ec16c2966abef64c6a15a975d1fe6f5a876d5a418da8fb5e1a0b419efb1e7a470d145d67f304c7bbe07d50cbfbddc8d281ea971c2502ce88474a00423163cf612dbe8256f61b4a91a2a5a6ebaac18845d3c8f1850ccdc19750505a00dc0b111ac207570f4c6b6073e3d9611887e3fa3a5c393c70dd9417e00eeaaf9a02545a5b6ba9b3e15d4efc1fc3a54ff6038523b479fc60fcba133c8ce35e1c348a01acdaf8df2aa6f03dcfa4349da379eb2a4b2ec2295bd0debab812c7d67de6868a03e16ca906fd5cd3b5511b60cf634796e9f742de9c5b55bb6fb478b2ef4257622a02b7257dc379687ecea44f055487416e8d9ed902176aa1f15ce8c90f41ddbc3f6a0bf9d59f9b0c6e50d6f409c644d3f404fa68b23c24b9b0e6cbf9d3842d94c74b5a0cac5134fc085c16fd569de1676a1ef940f6f01153c37e7f738effc9a6091da5fa0a9711427d8f6441a1b7cb47a05d29cf8a17edebb495d539778c8ad5e61e4e7d5a00e2ab533a2ac9ae472064fb8729174d897584354189f0ffee49336ca3f4eb6c1a00ea2bc10114b354de3724f664db3710acd727a3a698167e529580ad223be9dc6a0d6317846d840886d4cb23364a8a3494d39fa14f12e38628b23e04c186220658a80",
            "0xf90211a0239158e0775c93e3f31bad79536f0e5cca7135d0f45aa418833de3032f7889eca0a5c5b4890d01a820478f1a32a4f8f7b425fbe50520aa60443da6010831d0b606a07c79412c127bf98af01a87d40d0ebc8223957a53ea91040adfd20b8ce43698a7a022ab300d700e7f9daf2bf2c5be9f4b4ecd7da71899418116f353671546b2abf7a005b9df250c3a6cebfd6bc95f209c385c22324a4b64c93d869649d96b79ff233da09f40d10a7a592f0e843304e6b956852a83323d7b416f3710418652dcd7e30aafa098563a4e8c592836c830006348760c32db40e37660c106a479e332f78a6f5fe2a00e129e3a7874944be34a2d996cce3d65f5e53318d82d2efb79d2a0b988ed2366a023775b964cf45111a6f73dc535d99802f67b9483c329b235a771cd2b25937e6ba08ef375a20c280b89b28a9de38a8ff43759ceccf244f794c0c82a5439251c9559a0a321c368a134c10f81eac136ff79b0546806d4b891b5cdb4f317022490f45d20a0d24ab619bab804ed0313f702631f4d8e2c2b0f498493f8e8d71bc942d88590b4a0343f1379e363152e8e1e106ea3589a7c14c24665e8a45ff9d38c32f8ddd5534ea09823cc5cf15f2083de77e02a6fae0710958f0c11b354737984b4e39ce836a084a07b5afce67f86fec0715ee3004a87754634e3462fc1e9e581dc92e8c6cb3ff4e1a0e6f304b5f51fe6d9edbdcd2fb7509a3501b20087906c7773bcdcb2915510029c80",
            "0xf90211a0c52c20c92d18ac19d0eece7ca3434d0148e737a2ec2adeb731be20bb10a76775a0192cbc7cd86823706c9d64e0275a84b851ce6000a0248b5282b27d90ff0157fea0cd858e052c30ba575736de346af926383db3e87d1a9e5658f400234287345cb8a09e696bc19a894bc514b5a6fb891ed96667fb25240470c3cf82fddef1a74161eca002eb90131516480a1fb8b9b2bf460afb9dfe32091763821329a01cf6fc25a26aa039f1a7f66534b11acab3de5ca8da1126966d2b6d6e5d85c980bf16f37f29e7a6a08e647c224ada756bec14a9852bfb5ff3dde0bafade8daee6b4b6c967bafff5faa09211df22ce34de07358a3d40ab398dba2e587b5cf678320c44dcb4422bcf654ba004a4c23b3111e0b13f54a64b21440a6fa6a2baeb6c5d370eef663f46875ce0f4a081dec6fae9dba02f2475a8dd3ac6cf55a3e7dc2ecd3489e7afca9e2e12fca008a0825dd394e683330b90281431e7b41984f43d2cbb484e64101852c6dd98c1687fa03a5d22876a800039187e4cd784f1021d745b054d8fcd4660746c6fb285372f71a04e6c1ad09980b4e19ec13ab03f04fb13144112faa7ef0cb90db85008f65d9402a02814e65ca4b2f09b26894b32a7ed113bca53aaac32f81974f8488fd64636e87fa0b3aae6ba83fe29159962aa7fb3975af57f671114c8babb4455d9f9e390f25e64a0b7162c401c5d2dd13d304cfa245b4040c3daf47aaffcae3849e5e8b90da10d4d80",
            "0xf891808080a0c55e8c89869890f1b44e2aa568a9a70f960fb6d469dd213fc0f880f62dc44395808080a058e168e25a5fdac211d06d2b1a0effc1c8b5c92b2aceec6c36d4e5b94ede586d80a0b62e5032b5b6a6d6d3a802970c46040bd2c4e030a21941f43a8ffc76e1f5adce8080a06474290c1f4ffb0565af1b6b128378b53face143cca598e33811e3e78dfc514480808080"
        ],
        "address": "0x0a8156e7ee392d885d10eaa86afd0e323afdcd95",
        "balance": "0x0",
        "codeHash": "0xc5d2460186f7233c927e7db2dcc703c0e500b653ca82273b7bfad8045d85a470",
        "nonce": "0x0",
        "storageHash": "0x56e81f171bcc55a6ff8345e692c0f86e5b48e01b996cadc001622fb5e363b421",
        "storageProof": [
            {
                "key": "0xc48fb64230a82f65a08e7280bd8745e7fea87bc7c206309dee32209fe9a985f7",
                "proof": [],
                "value": "0x0"
            }
        ]
    }
}

eth_getStorageAt - Optimism

Example code for the eth_getStorageAt json-rpc method. Сomplete guide on how to use eth_getStorageAt json-rpc in GetBlock.io Web3 documentation.

Parameters

DATA - string

address to check for balance.

QUANTITY - integer

Position in the storage.

QUANTITY|TAG - string

block number or "latest", "earliest" or "pending"

Request

curl --location --request POST 'https://go.getblock.io/<ACCESS-TOKEN>/' \
--header 'Content-Type: application/json' \ 
--data-raw '{"jsonrpc": "2.0",
"method": "eth_getStorageAt",
"params": ["0xbec4e80531dad6a9989828d174cc2878b1e3123d", "0x0", "earliest"],
"id": "getblock.io"}'

Response

{
    "id": "getblock.io",
    "jsonrpc": "2.0",
    "result": "0x0000000000000000000000000000000000000000000000000000000000000000"
}

eth_getTransactionByBlockHashAndIndex - Optimism

Example code for the eth_getTransactionByBlockHashAndIndex json-rpc method. Сomplete guide on how to use eth_getTransactionByBlockHashAndIndex json-rpc in GetBlock.io Web3 documentation.

Parameters

DATA - string

Hash of a block.

QUANTITY - string

Transaction index position.

Request

curl --location --request POST 'https://go.getblock.io/<ACCESS-TOKEN>/' \
--header 'Content-Type: application/json' \ 
--data-raw '{"jsonrpc": "2.0",
"method": "eth_getTransactionByBlockHashAndIndex",
"params": ["0x56436a935370b8decda78cf4a60e0668a882764af1cdec3a6d6967f944f4dace", "0x0"],
"id": "getblock.io"}'

Response

{
    "id": "getblock.io",
    "jsonrpc": "2.0",
    "result": null
}

eth_getTransactionByBlockNumberAndIndex - Optimism

Example code for the eth_getTransactionByBlockNumberAndIndex json-rpc method. Сomplete guide on how to use eth_getTransactionByBlockNumberAndIndex json-rpc in GetBlock.io Web3 documentation.

Parameters

QUANTITY|TAG - string

block number or "latest", "earliest" or "pending"

QUANTITY - string

Transaction index position.

Request

curl --location --request POST 'https://go.getblock.io/<ACCESS-TOKEN>/' \
--header 'Content-Type: application/json' \
--data-raw '{"jsonrpc": "2.0",
"method": "eth_getTransactionByBlockNumberAndIndex",
"params": ["0xc6f437", "0x0"],
"id": "getblock.io"}'

Response

{
    "id": "getblock.io",
    "jsonrpc": "2.0",
    "result": {
        "blockHash": "0xc4c7200bfc5fd0b52dc6af319820269bcdab29da859da2657922f57e1de35ca0",
        "blockNumber": "0xc6f437",
        "from": "0x0ef629d2b5bcab52293ba2cb5e42088bfe755ffa",
        "gas": "0x435b9",
        "gasPrice": "0xf4240",
        "hash": "0xf722d4c6c9fbef0b8ef72216f10d84123466705d970f7bb0e82f99d7dc5b746a",
        "index": "0xc6f436",
        "input": "0xeea0d7b2000000000000000000000000000000000000000000000000000000000000a4b10000000000000000000000000ef629d2b5bcab52293ba2cb5e42088bfe755ffa000000000000000000000000000000000000000000000000026a2c13feeb0000000000000000000000000000000000000000000000000000000193fd1edc42d300000000000000000000000000000000000000000000000002662a419c0b338e0000000000000000000000000000000000000000000000000000000062c03feb0000000000000000000000000000000000000000000000000259d66702bd9add0000000000000000000000000000000000000000000000000000000062c03feb",
        "l1BlockNumber": "0xe53e76",
        "l1Timestamp": "0x62b7058c",
        "l1TxOrigin": null,
        "nonce": "0x9",
        "queueIndex": null,
        "queueOrigin": "sequencer",
        "r": "0xf6509cbf93d184009993958a8b2f5967e6b5fb792e12385f2d9c4dc8f8d24740",
        "rawTransaction": "0xf9017109830f4240830435b99486ca30bef97fb651b8d866d45503684b90cb331288026a2c13feeb0000b90104eea0d7b2000000000000000000000000000000000000000000000000000000000000a4b10000000000000000000000000ef629d2b5bcab52293ba2cb5e42088bfe755ffa000000000000000000000000000000000000000000000000026a2c13feeb0000000000000000000000000000000000000000000000000000000193fd1edc42d300000000000000000000000000000000000000000000000002662a419c0b338e0000000000000000000000000000000000000000000000000000000062c03feb0000000000000000000000000000000000000000000000000259d66702bd9add0000000000000000000000000000000000000000000000000000000062c03feb38a0f6509cbf93d184009993958a8b2f5967e6b5fb792e12385f2d9c4dc8f8d24740a042d899f25c72c4ce8ba6eb0056f17f9a8ffabe5067d374e9d0d64306b54bcaf0",
        "s": "0x42d899f25c72c4ce8ba6eb0056f17f9a8ffabe5067d374e9d0d64306b54bcaf0",
        "to": "0x86ca30bef97fb651b8d866d45503684b90cb3312",
        "transactionIndex": "0x0",
        "v": "0x38",
        "value": "0x26a2c13feeb0000"
    }
}

eth_getTransactionByHash - Optimism

Example code for the eth_getTransactionByHash json-rpc method. Сomplete guide on how to use eth_getTransactionByHash json-rpc in GetBlock.io Web3 documentation.

Parameters

DATA - string

Hash of a transaction.

Request

curl --location --request POST 'https://go.getblock.io/<ACCESS-TOKEN>/' \
--header 'Content-Type: application/json' \
--data-raw '{"jsonrpc": "2.0",
"method": "eth_getTransactionByHash",
"params": ["0xb036e4ff7e7f596615d121d3a1c923c618bd3c2d3745c512346d7d8e583f01f7"],
"id": "getblock.io"}'

Response

{
    "id": "getblock.io",
    "jsonrpc": "2.0",
    "result": null
}

eth_getTransactionCount - Optimism

Example code for the eth_getTransactionCount json-rpc method. Сomplete guide on how to use eth_getTransactionCount json-rpc in GetBlock.io Web3 documentation.

Parameters

DATA - string

address.

QUANTITY|TAG - string

block number or "latest", "earliest" or "pending"

Request

curl --location --request POST 'https://go.getblock.io/<ACCESS-TOKEN>/' \
--header 'Content-Type: application/json' \
--data-raw '{"jsonrpc": "2.0",
"method": "eth_getTransactionCount",
"params": ["0xbec4e80531dad6a9989828d174cc2878b1e3123d", "earliest"],
"id": "getblock.io"}'

Response

{
    "id": "getblock.io",
    "jsonrpc": "2.0",
    "result": "0x0"
}

eth_getTransactionReceipt - Optimism

Example code for the eth_getTransactionReceipt json-rpc method. Сomplete guide on how to use eth_getTransactionReceipt json-rpc in GetBlock.io Web3 documentation.

Parameters

DATA - string

Hash of a transaction.

Request

curl --location --request POST 'https://go.getblock.io/<ACCESS-TOKEN>/' \
--header 'Content-Type: application/json' \
--data-raw '{"jsonrpc": "2.0",
"method": "eth_getTransactionReceipt",
"params": ["0xb036e4ff7e7f596615d121d3a1c923c618bd3c2d3745c512346d7d8e583f01f7"],
"id": "getblock.io"}'

Response

{
    "id": "getblock.io",
    "jsonrpc": "2.0",
    "result": null
}

eth_getUncleByBlockHashAndIndex - Optimism

Example code for the eth_getUncleByBlockHashAndIndex json-rpc method. Сomplete guide on how to use eth_getUncleByBlockHashAndIndex json-rpc in GetBlock.io Web3 documentation.

Parameters

DATA - string

Hash of a block.

QUANTITY - string

the uncle’s index position.

Request

curl --location --request POST 'https://go.getblock.io/<ACCESS-TOKEN>/' \
--header 'Content-Type: application/json' \
--data-raw '{"jsonrpc": "2.0",
"method": "eth_getUncleByBlockHashAndIndex",
"params": ["0x56436a935370b8decda78cf4a60e0668a882764af1cdec3a6d6967f944f4dace", "0x0"],
"id": "getblock.io"}'

Response

{
    "id": "getblock.io",
    "jsonrpc": "2.0",
    "result": null
}

eth_getUncleByBlockNumberAndIndex - Optimism

Example code for the eth_getUncleByBlockNumberAndIndex json-rpc method. Сomplete guide on how to use eth_getUncleByBlockNumberAndIndex json-rpc in GetBlock.io Web3 documentation.

Parameters

QUANTITY|TAG - string

block number or "latest", "earliest" or "pending"

QUANTITY - string

the uncle’s index position.

Request

curl --location --request POST 'https://go.getblock.io/<ACCESS-TOKEN>/' \
--header 'Content-Type: application/json' \ 
--data-raw '{"jsonrpc": "2.0",
"method": "eth_getUncleByBlockNumberAndIndex",
"params": ["latest", "0x0"],
"id": "getblock.io"}'

Response

{
    "id": "getblock.io",
    "jsonrpc": "2.0",
    "result": null
}

eth_getUncleCountByBlockHash - Optimism

Example code for the eth_getUncleCountByBlockHash json-rpc method. Сomplete guide on how to use eth_getUncleCountByBlockHash json-rpc in GetBlock.io Web3 documentation.

Parameters

DATA - string

hash of the block.

Request

curl --location --request POST 'https://go.getblock.io/<ACCESS-TOKEN>/' \
--header 'Content-Type: application/json' \
--data-raw '{"jsonrpc": "2.0",
"method": "eth_getUncleCountByBlockHash",
"params": ["0x56436a935370b8decda78cf4a60e0668a882764af1cdec3a6d6967f944f4dace"],
"id": "getblock.io"}'

Response

{
    "id": "getblock.io",
    "jsonrpc": "2.0",
    "result": null
}

eth_getUncleCountByBlockNumber - Optimism

Example code for the eth_getUncleCountByBlockNumber json-rpc method. Сomplete guide on how to use eth_getUncleCountByBlockNumber json-rpc in GetBlock.io Web3 documentation.

Parameters

QUANTITY|TAG - string

block number or "latest", "earliest" or "pending"

Request

curl --location --request POST 'https://go.getblock.io/<ACCESS-TOKEN>/' \
--header 'Content-Type: application/json' \
--data-raw '{"jsonrpc": "2.0",
"method": "eth_getUncleCountByBlockNumber",
"params": ["0xc6f437"],
"id": "getblock.io"}'

Response

{
    "id": "getblock.io",
    "jsonrpc": "2.0",
    "result": "0x0"
}

eth_getWork {disallowed} - Optimism

Example code for the eth_getWork {disallowed} json-rpc method. Сomplete guide on how to use eth_getWork {disallowed} json-rpc in GetBlock.io Web3 documentation.

Parameters

-

Request

curl --location --request POST 'https://go.getblock.io/<ACCESS-TOKEN>/' \
--header 'Content-Type: application/json' \ 
--data-raw '{"jsonrpc": "2.0",
"method": "eth_getWork",
"params": [],
"id": "getblock.io"}'

Response

{
    "result": "null",
    "id": "getblock.io",
    "status_code": 405,
    "message": "Method not allowed"
}

eth_hashrate - Optimism

Example code for the eth_hashrate json-rpc method. Сomplete guide on how to use eth_hashrate json-rpc in GetBlock.io Web3 documentation.

Parameters

-

Request

curl --location --request POST 'https://go.getblock.io/<ACCESS-TOKEN>/' \
--header 'Content-Type: application/json' \
--data-raw '{"jsonrpc": "2.0",
"method": "eth_hashrate",
"params": [],
"id": "getblock.io"}'

Response

{
    "id": "getblock.io",
    "jsonrpc": "2.0",
    "result": "0x0"
}

eth_mining - Optimism

Example code for the eth_mining json-rpc method. Сomplete guide on how to use eth_mining json-rpc in GetBlock.io Web3 documentation.

Parameters

-

Request

curl --location --request POST 'https://go.getblock.io/<ACCESS-TOKEN>/' \
--header 'Content-Type: application/json' \ 
--data-raw '{"jsonrpc": "2.0",
"method": "eth_mining",
"params": [],
"id": "getblock.io"}'

Response

{
    "id": "getblock.io",
    "jsonrpc": "2.0",
    "result": true
}

eth_newBlockFilter - Optimism

Example code for the eth_newBlockFilter json-rpc method. Сomplete guide on how to use eth_newBlockFilter json-rpc in GetBlock.io Web3 documentation.

Parameters

-

Request

curl --location --request POST 'https://go.getblock.io/<ACCESS-TOKEN>/' \
--header 'Content-Type: application/json' \
--data-raw '{"jsonrpc": "2.0",
"method": "eth_newBlockFilter",
"params": [],
"id": "getblock.io"}'

Response

{
    "id": "getblock.io",
    "jsonrpc": "2.0",
    "result": "0x98d721c37066e89109bd912419634b37"
}

eth_newFilter - Optimism

Example code for the eth_newFilter json-rpc method. Сomplete guide on how to use eth_newFilter json-rpc in GetBlock.io Web3 documentation.

Parameters

Object - object

Filter options

Request

curl --location --request POST 'https://go.getblock.io/<ACCESS-TOKEN>/' \
--header 'Content-Type: application/json' \ 
--data-raw '{"jsonrpc": "2.0",
"method": "eth_newFilter",
"params": [{"fromBlock": "earliest", "toBlock": "latest", "topics": []}],
"id": "getblock.io"}'

Response

{
    "id": "getblock.io",
    "jsonrpc": "2.0",
    "result": "0xb2606b603984895b191e20dc8e1f8cf4"
}

eth_newPendingTransactionFilter - Optimism

Example code for the eth_newPendingTransactionFilter json-rpc method. Сomplete guide on how to use eth_newPendingTransactionFilter json-rpc in GetBlock.io Web3 documentation.

Parameters

-

Request

curl --location --request POST 'https://go.getblock.io/<ACCESS-TOKEN>/' \
--header 'Content-Type: application/json' \ 
--data-raw '{"jsonrpc": "2.0",
"method": "eth_newPendingTransactionFilter",
"params": [],
"id": "getblock.io"}'

Response

{
    "id": "getblock.io",
    "jsonrpc": "2.0",
    "result": "0xc1174f6beddcf45dd8dfa305f4b8eeca"
}

eth_protocolVersion - Optimism

Example code for the eth_protocolVersion json-rpc method. Сomplete guide on how to use eth_protocolVersion json-rpc in GetBlock.io Web3 documentation.

Parameters

-

Request

curl --location --request POST 'https://go.getblock.io/<ACCESS-TOKEN>/' \
--header 'Content-Type: application/json' \ 
--data-raw '{"jsonrpc": "2.0",
"method": "eth_protocolVersion",
"params": [],
"id": "getblock.io"}'

Response

{
    "id": "getblock.io",
    "jsonrpc": "2.0",
    "result": "0x40"
}

eth_sendRawTransaction - Optimism

Example code for the eth_sendRawTransaction json-rpc method. Сomplete guide on how to use eth_sendRawTransaction json-rpc in GetBlock.io Web3 documentation.

Parameters

DATA - string

The signed transaction data.

Request

curl --location --request POST 'https://go.getblock.io/<ACCESS-TOKEN>/' \
--header 'Content-Type: application/json' \
--data-raw '{"jsonrpc": "2.0",
"method": "eth_sendRawTransaction",
"params": ["0xf86b8184843b9aca00830164e694d7ac544f8a570c4d8764c3aabcf6870cbd960d0d80844e71d92d820118a011f7e0056924be24f37b634d67dee23ef432130444cb05f7540ee03c8ce16e3ca0228e09888bc26a748ace1392d37661e90d56ec7730368ca2d55dcdb73aa69351"],
"id": "getblock.io"}'

Response

{
    "error": {
        "code": -32000,
        "message": "invalid transaction: invalid sender"
    },
    "id": "getblock.io",
    "jsonrpc": "2.0"
}

eth_sendTransaction {disallowed} - Optimism

Example code for the eth_sendTransaction {disallowed} json-rpc method. Сomplete guide on how to use eth_sendTransaction {disallowed} json-rpc in GetBlock.io Web3 documentation.

Parameters

object - json object

The transacion call object in format: { "from": "address" (optional, string) - The address the transaction is sent from. "to": "address" (optional, string) - The address the transaction is directed to. "gas": "quantity" (optional, string) - Integer of the gas provided for the transaction execution. eth_call consumes zero gas, but this parameter may be needed by some executions. "gasPrice": "quantity" (optional, string) - Integer of the gasPrice used for each paid gas "value": "quantity" (optional, string) - Integer of the value sent with this transaction "data": "data" (optional, string) - Hash of the method signature and encoded parameters. "nonce": "quantity" (optional, string) - Integer of a nonce. This allows to overwrite your own pending transactions that use the same nonce. }

Request

curl --location --request POST 'https://go.getblock.io/<ACCESS-TOKEN>/' \
--header 'Content-Type: application/json' \
--data-raw '{"jsonrpc": "2.0",
"method": "eth_sendTransaction",
"params": [{"from": "0xb60e8dd61c5d32be8058bb8eb970870f07233155", "to": "0xd46e8dd67c5d32be8058bb8eb970870f07244567", "gas": "0x76c0", "gasPrice": "0x9184e72a000", "value": "0x9184e72a", "data": "0xd46e8dd67c5d32be8d46e8dd67c5d32be8058bb8eb970870f072445675058bb8eb970870f072445675"}],
"id": "getblock.io"}'

Response

{
    "result": "null",
    "id": "getblock.io",
    "status_code": 405,
    "message": "Method not allowed"
}

eth_sign {disallowed} - Optimism

Example code for the eth_sign {disallowed} json-rpc method. Сomplete guide on how to use eth_sign {disallowed} json-rpc in GetBlock.io Web3 documentation.

Parameters

DATA - string

address.

DATA - string

message to sign.

Request

curl --location --request POST 'https://go.getblock.io/<ACCESS-TOKEN>/' \
--header 'Content-Type: application/json' \ 
--data-raw '{"jsonrpc": "2.0",
"method": "eth_sign",
"params": ["0xbec4e80531dad6a9989828d174cc2878b1e3123d", "0xdeadbeaf"],
"id": "getblock.io"}'

Response

{
    "result": "null",
    "id": "getblock.io",
    "status_code": 405,
    "message": "Method not allowed"
}

eth_signTransaction {disallowed} - Optimism

Example code for the eth_signTransaction {disallowed} json-rpc method. Сomplete guide on how to use eth_signTransaction {disallowed} json-rpc in GetBlock.io Web3 documentation.

Parameters

object - json object

The transacion call object in format: { "from": "address" (optional, string) - The address the transaction is sent from. "to": "address" (optional, string) - The address the transaction is directed to. "gas": "quantity" (optional, string) - Integer of the gas provided for the transaction execution. eth_call consumes zero gas, but this parameter may be needed by some executions. "gasPrice": "quantity" (optional, string) - Integer of the gasPrice used for each paid gas "value": "quantity" (optional, string) - Integer of the value sent with this transaction "data": "data" (optional, string) - Hash of the method signature and encoded parameters. "nonce": "quantity" (optional, string) - Integer of a nonce. This allows to overwrite your own pending transactions that use the same nonce. }

Request

curl --location --request POST 'https://go.getblock.io/<ACCESS-TOKEN>/' \
--header 'Content-Type: application/json' \ 
--data-raw '{"jsonrpc": "2.0",
"method": "eth_signTransaction",
"params": [{"from": "0xb60e8dd61c5d32be8058bb8eb970870f07233155", "to": "0xd46e8dd67c5d32be8058bb8eb970870f07244567", "gas": "0x76c0", "gasPrice": "0x9184e72a000", "value": "0x9184e72a", "data": "0xd46e8dd67c5d32be8d46e8dd67c5d32be8058bb8eb970870f072445675058bb8eb970870f072445675"}],
"id": "getblock.io"}'

Response

{
    "result": "null",
    "id": "getblock.io",
    "status_code": 405,
    "message": "Method not allowed"
}

eth_submitHashrate {disallowed} - Optimism

Example code for the eth_submitHashrate {disallowed} json-rpc method. Сomplete guide on how to use eth_submitHashrate {disallowed} json-rpc in GetBlock.io Web3 documentation.

Parameters

hashrate - string

Hexadecimal string representation of the hash rate.

id - string

Random hexadecimal ID identifying the client.

Request

curl --location --request POST 'https://go.getblock.io/<ACCESS-TOKEN>/' \
--header 'Content-Type: application/json' \
--data-raw '{"jsonrpc": "2.0",
"method": "eth_submitHashrate",
"params": ["0x0000000000000000000000000000000000000000000000000000000000500000", "0x59daa26581d0acd1fce254fb7e85952f4c09d0915afd33d3886cd914bc7d283c"],
"id": "getblock.io"}'

Response

{
    "result": "null",
    "id": "getblock.io",
    "status_code": 405,
    "message": "Method not allowed"
}

eth_submitWork {disallowed} - Optimism

Example code for the eth_submitWork {disallowed} json-rpc method. Сomplete guide on how to use eth_submitWork {disallowed} json-rpc in GetBlock.io Web3 documentation.

Parameters

data - string

The nonce found (64 bits)

data - string

The header’s pow-hash (256 bits)

data - string

The mix digest (256 bits)

Request

curl --location --request POST 'https://go.getblock.io/<ACCESS-TOKEN>/' \
--header 'Content-Type: application/json' \
--data-raw '{"jsonrpc": "2.0",
"method": "eth_submitWork",
"params": [null, null, null],
"id": "getblock.io"}'

Response

{
    "result": "null",
    "id": "getblock.io",
    "status_code": 405,
    "message": "Method not allowed"
}

eth_subscribe - Optimism

Example code for the eth_subscribe json-rpc method. Сomplete guide on how to use eth_subscribe json-rpc in GetBlock.io Web3 documentation.

Parameters

type - string

A subscription type, such as newHeads (new headers appended to the chain, including chain reorganizations), logs (logs that are included in new imported blocks and match the given filter criteria) or newPendingTransactions (hashes for all transactions that are added to the pending state and are signed with a key that is available in the node).

objects - hex string

Optional argumants such as an address, multiple addresses, and topics.

Request

curl --location --request POST 'https://go.getblock.io/<ACCESS-TOKEN>/' \
--header 'Content-Type: application/json' \
--data-raw '{"jsonrpc": "2.0",
"method": "eth_subscribe",
"params": ["newHeads", null],
"id": "getblock.io"}'

Response

{
    "error": {
        "code": -32000,
        "message": "notifications not supported"
    },
    "id": "getblock.io",
    "jsonrpc": "2.0"
}

eth_syncing - Optimism

Example code for the eth_syncing json-rpc method. Сomplete guide on how to use eth_syncing json-rpc in GetBlock.io Web3 documentation.

Parameters

-

Request

curl --location --request POST 'https://go.getblock.io/<ACCESS-TOKEN>/' \
--header 'Content-Type: application/json' \
--data-raw '{"jsonrpc": "2.0",
"method": "eth_syncing",
"params": [],
"id": "getblock.io"}'

Response

{
    "id": "getblock.io",
    "jsonrpc": "2.0",
    "result": false
}

eth_uninstallFilter - Optimism

Example code for the eth_uninstallFilter json-rpc method. Сomplete guide on how to use eth_uninstallFilter json-rpc in GetBlock.io Web3 documentation.

Parameters

QUANTITY - string

The filter id.

Request

curl --location --request POST 'https://go.getblock.io/<ACCESS-TOKEN>/' \
--header 'Content-Type: application/json' \
--data-raw '{"jsonrpc": "2.0",
"method": "eth_uninstallFilter",
"params": ["0xb"],
"id": "getblock.io"}'

Response

{
    "id": "getblock.io",
    "jsonrpc": "2.0",
    "result": false
}

eth_unsubscribe - Optimism

Example code for the eth_unsubscribe json-rpc method. Сomplete guide on how to use eth_unsubscribe json-rpc in GetBlock.io Web3 documentation.

Parameters

data - hex string

A subscription ID previously generated with eth_subscribe method.

Request

curl --location --request POST 'https://go.getblock.io/<ACCESS-TOKEN>/' \
--header 'Content-Type: application/json' \
--data-raw '{"jsonrpc": "2.0",
"method": "eth_unsubscribe",
"params": ["0xe5af64ddfd365b4632988c5935cfedb7"],
"id": "getblock.io"}'

Response

{
    "error": {
        "code": -32000,
        "message": "subscription not found"
    },
    "id": "getblock.io",
    "jsonrpc": "2.0"
}

net_listening - Optimism

Example code for the net_listening json-rpc method. Сomplete guide on how to use net_listening json-rpc in GetBlock.io Web3 documentation.

Parameters

-

Request

curl --location --request POST 'https://go.getblock.io/<ACCESS-TOKEN>/' \
--header 'Content-Type: application/json' \ 
--data-raw '{"jsonrpc": "2.0",
"method": "net_listening",
"params": [],
"id": "getblock.io"}'

Response

{
    "id": "getblock.io",
    "jsonrpc": "2.0",
    "result": true
}

net_peerCount - Optimism

Example code for the net_peerCount json-rpc method. Сomplete guide on how to use net_peerCount json-rpc in GetBlock.io Web3 documentation.

Parameters

-

Request

curl --location --request POST 'https://go.getblock.io/<ACCESS-TOKEN>/' \
--header 'Content-Type: application/json' \
--data-raw '{"jsonrpc": "2.0",
"method": "net_peerCount",
"params": [],
"id": "getblock.io"}'

Response

{
    "id": "getblock.io",
    "jsonrpc": "2.0",
    "result": "0x0"
}

net_version - Optimism

Example code for the net_version json-rpc method. Сomplete guide on how to use net_version json-rpc in GetBlock.io Web3 documentation.

Parameters

-

Request

curl --location --request POST 'https://go.getblock.io/<ACCESS-TOKEN>/' \
--header 'Content-Type: application/json' \
--data-raw '{"jsonrpc": "2.0",
"method": "net_version",
"params": [],
"id": "getblock.io"}'

Response

{
    "id": "getblock.io",
    "jsonrpc": "2.0",
    "result": "10"
}

rollup_gasPrices - Optimism

Example code for the rollup_gasPrices json-rpc method. Сomplete guide on how to use rollup_gasPrices json-rpc in GetBlock.io Web3 documentation.

Parameters

-

Request

curl --location --request POST 'https://go.getblock.io/<ACCESS-TOKEN>/' \
--header 'Content-Type: application/json' \ 
--data-raw '{"jsonrpc": "2.0",
"method": "rollup_gasPrices",
"params": [],
"id": "getblock.io"}'

Response

{
    "id": "getblock.io",
    "jsonrpc": "2.0",
    "result": {
        "l1GasPrice": "0x6ed35542d",
        "l2GasPrice": "0xf4240"
    }
}

rollup_getInfo - Optimism

Example code for the rollup_getInfo json-rpc method. Сomplete guide on how to use rollup_getInfo json-rpc in GetBlock.io Web3 documentation.

Parameters

-

Request

curl --location --request POST 'https://go.getblock.io/<ACCESS-TOKEN>/' \
--header 'Content-Type: application/json' \
--data-raw '{"jsonrpc": "2.0",
"method": "rollup_getInfo",
"params": [],
"id": "getblock.io"}'

Response

{
    "id": "getblock.io",
    "jsonrpc": "2.0",
    "result": {
        "ethContext": {
            "blockNumber": 17376329,
            "timestamp": 1685506009
        },
        "mode": "verifier",
        "rollupContext": {
            "index": 103110437,
            "queueIndex": 354301,
            "verifiedIndex": 0
        },
        "syncing": false
    }
}

rpc_modules - Optimism

Example code for the rpc_modules json-rpc method. Сomplete guide on how to use rpc_modules json-rpc in GetBlock.io Web3 documentation.

Parameters

-

Request

curl --location --request POST 'https://go.getblock.io/<ACCESS-TOKEN>/' \
--header 'Content-Type: application/json' \
--data-raw '{"jsonrpc": "2.0",
"method": "rpc_modules",
"params": [],
"id": "getblock.io"}'

Response

{
    "id": "getblock.io",
    "jsonrpc": "2.0",
    "result": {
        "debug": "1.0",
        "eth": "1.0",
        "net": "1.0",
        "rollup": "1.0",
        "rpc": "1.0",
        "web3": "1.0"
    }
}

shh_addToGroup {disallowed} - Optimism

Example code for the shh_addToGroup {disallowed} json-rpc method. Сomplete guide on how to use shh_addToGroup {disallowed} json-rpc in GetBlock.io Web3 documentation.

Parameters

address - data

The identity address to add to a group

Request

curl --location --request POST 'https://go.getblock.io/<ACCESS-TOKEN>/' \
--header 'Content-Type: application/json' \
--data-raw '{"jsonrpc": "2.0",
"method": "shh_addToGroup",
"params": [null],
"id": "getblock.io"}'

Response

{
    "result": "null",
    "id": "getblock.io",
    "status_code": 405,
    "message": "Method not allowed"
}

shh_getFilterChanges {disallowed} - Optimism

Example code for the shh_getFilterChanges {disallowed} json-rpc method. Сomplete guide on how to use shh_getFilterChanges {disallowed} json-rpc in GetBlock.io Web3 documentation.

Parameters

id - string

the filter id.

Request

curl --location --request POST 'https://go.getblock.io/<ACCESS-TOKEN>/' \
--header 'Content-Type: application/json' \
--data-raw '{"jsonrpc": "2.0",
"method": "shh_getFilterChanges",
"params": [null],
"id": "getblock.io"}'

Response

{
    "result": "null",
    "id": "getblock.io",
    "status_code": 405,
    "message": "Method not allowed"
}

shh_getMessages {disallowed} - Optimism

Example code for the shh_getMessages {disallowed} json-rpc method. Сomplete guide on how to use shh_getMessages {disallowed} json-rpc in GetBlock.io Web3 documentation.

Parameters

id - string

the filter id.

Request

curl --location --request POST 'https://go.getblock.io/<ACCESS-TOKEN>/' \
--header 'Content-Type: application/json' \
--data-raw '{"jsonrpc": "2.0",
"method": "shh_getMessages",
"params": [null],
"id": "getblock.io"}'

Response

{
    "result": "null",
    "id": "getblock.io",
    "status_code": 405,
    "message": "Method not allowed"
}

shh_hasIdentity {disallowed} - Optimism

Example code for the shh_hasIdentity {disallowed} json-rpc method. Сomplete guide on how to use shh_hasIdentity {disallowed} json-rpc in GetBlock.io Web3 documentation.

Parameters

address - data

the address of the new identiy.

Request

curl --location --request POST 'https://go.getblock.io/<ACCESS-TOKEN>/' \
--header 'Content-Type: application/json' \ 
--data-raw '{"jsonrpc": "2.0",
"method": "shh_hasIdentity",
"params": [null],
"id": "getblock.io"}'

Response

{
    "result": "null",
    "id": "getblock.io",
    "status_code": 405,
    "message": "Method not allowed"
}

shh_newFilter {disallowed} - Optimism

Example code for the shh_newFilter {disallowed} json-rpc method. Сomplete guide on how to use shh_newFilter {disallowed} json-rpc in GetBlock.io Web3 documentation.

Parameters

filters - json object

filter object: { "to": "address" (string, optional) - Identity of the receiver. When present it will try to decrypt any incoming message if the client holds the private key to this identity. "topics": ["topic"] (array of string) - Array of topics which the incoming message’s topics should match. }

Request

curl --location --request POST 'https://go.getblock.io/<ACCESS-TOKEN>/' \
--header 'Content-Type: application/json' \
--data-raw '{"jsonrpc": "2.0",
"method": "shh_newFilter",
"params": [null],
"id": "getblock.io"}'

Response

{
    "result": "null",
    "id": "getblock.io",
    "status_code": 405,
    "message": "Method not allowed"
}

shh_newGroup {disallowed} - Optimism

Example code for the shh_newGroup {disallowed} json-rpc method. Сomplete guide on how to use shh_newGroup {disallowed} json-rpc in GetBlock.io Web3 documentation.

Parameters

-

Request

curl --location --request POST 'https://go.getblock.io/<ACCESS-TOKEN>/' \
--header 'Content-Type: application/json' \
--data-raw '{"jsonrpc": "2.0",
"method": "shh_newGroup",
"params": [],
"id": "getblock.io"}'

Response

{
    "result": "null",
    "id": "getblock.io",
    "status_code": 405,
    "message": "Method not allowed"
}

shh_newIdentity {disallowed} - Optimism

Example code for the shh_newIdentity {disallowed} json-rpc method. Сomplete guide on how to use shh_newIdentity {disallowed} json-rpc in GetBlock.io Web3 documentation.

Parameters

-

Request

curl --location --request POST 'https://go.getblock.io/<ACCESS-TOKEN>/' \
--header 'Content-Type: application/json' \
--data-raw '{"jsonrpc": "2.0",
"method": "shh_newIdentity",
"params": [],
"id": "getblock.io"}'

Response

{
    "result": "null",
    "id": "getblock.io",
    "status_code": 405,
    "message": "Method not allowed"
}

shh_post {disallowed} - Optimism

Example code for the shh_post {disallowed} json-rpc method. Сomplete guide on how to use shh_post {disallowed} json-rpc in GetBlock.io Web3 documentation.

Parameters

None - None

None

Request

curl --location --request POST 'https://go.getblock.io/<ACCESS-TOKEN>/' \
--header 'Content-Type: application/json' \
--data-raw '{"jsonrpc": "2.0",
"method": "shh_post",
"params": [null],
"id": "getblock.io"}'

Response

{
    "result": "null",
    "id": "getblock.io",
    "status_code": 405,
    "message": "Method not allowed"
}

shh_uninstallFilter {disallowed} - Optimism

Example code for the shh_uninstallFilter {disallowed} json-rpc method. Сomplete guide on how to use shh_uninstallFilter {disallowed} json-rpc in GetBlock.io Web3 documentation.

Parameters

id - string

the filter id.

Request

curl --location --request POST 'https://go.getblock.io/<ACCESS-TOKEN>/' \
--header 'Content-Type: application/json' \
--data-raw '{"jsonrpc": "2.0",
"method": "shh_uninstallFilter",
"params": [null],
"id": "getblock.io"}'

Response

{
    "result": "null",
    "id": "getblock.io",
    "status_code": 405,
    "message": "Method not allowed"
}

shh_version {disallowed} - Optimism

Example code for the shh_version {disallowed} json-rpc method. Сomplete guide on how to use shh_version {disallowed} json-rpc in GetBlock.io Web3 documentation.

Parameters

-

Request

curl --location --request POST 'https://go.getblock.io/<ACCESS-TOKEN>/' \
--header 'Content-Type: application/json' \
--data-raw '{"jsonrpc": "2.0",
"method": "shh_version",
"params": [],
"id": "getblock.io"}'

Response

{
    "result": "null",
    "id": "getblock.io",
    "status_code": 405,
    "message": "Method not allowed"
}

trace_block - Optimism

Example code for the trace_block json-rpc method. Сomplete guide on how to use trace_block json-rpc in GetBlock.io Web3 documentation.

Parameters

quantity|tag - string

Integer representing a block number or one of the string tags latest, earliest, or pending, as described in Block Parameter.

Request

curl --location --request POST 'https://go.getblock.io/<ACCESS-TOKEN>/' \
--header 'Content-Type: application/json' \
--data-raw '{"jsonrpc": "2.0",
"method": "trace_block",
"params": ["latest"],
"id": "getblock.io"}'

Response

{
    "error": {
        "code": -32601,
        "message": "the method trace_block does not exist/is not available"
    },
    "id": "getblock.io",
    "jsonrpc": "2.0"
}

trace_replayBlockTransactions - Optimism

Example code for the trace_replayBlockTransactions json-rpc method. Сomplete guide on how to use trace_replayBlockTransactions json-rpc in GetBlock.io Web3 documentation.

Parameters

blockNumber - string

Integer representing a block number or one of the string tags latest, earliest, or pending, as described in Block Parameter.

options - list of string

list of tracing options; tracing options are trace, vmTrace, and stateDiff. Specify any combination of the three options including none of them.

Request

curl --location --request POST 'https://go.getblock.io/<ACCESS-TOKEN>/' \
--header 'Content-Type: application/json' \
--data-raw '{"jsonrpc": "2.0",
"method": "trace_replayBlockTransactions",
"params": ["latest", ["trace", "vmTrace", "vmTrace"]],
"id": "getblock.io"}'

Response

{
    "error": {
        "code": -32601,
        "message": "the method trace_replayBlockTransactions does not exist/is not available"
    },
    "id": "getblock.io",
    "jsonrpc": "2.0"
}

trace_transaction - Optimism

Example code for the trace_transaction json-rpc method. Сomplete guide on how to use trace_transaction json-rpc in GetBlock.io Web3 documentation.

Parameters

data - string

Transaction hash

Request

curl --location --request POST 'https://go.getblock.io/<ACCESS-TOKEN>/' \
--header 'Content-Type: application/json' \
--data-raw '{"jsonrpc": "2.0",
"method": "trace_transaction",
"params": ["0x01736b023300e297e3b3c7c13ab5db49c7c0be768d48790f46dd7baeefa7b047"],
"id": "getblock.io"}'

Response

{
    "error": {
        "code": -32601,
        "message": "the method trace_transaction does not exist/is not available"
    },
    "id": "getblock.io",
    "jsonrpc": "2.0"
}

web3_clientVersion - Optimism

Example code for the web3_clientVersion json-rpc method. Сomplete guide on how to use web3_clientVersion json-rpc in GetBlock.io Web3 documentation.

Parameters

-

Request

curl --location --request POST 'https://go.getblock.io/<ACCESS-TOKEN>/' \
--header 'Content-Type: application/json' \
--data-raw '{"jsonrpc": "2.0",
"method": "web3_clientVersion",
"params": [],
"id": "getblock.io"}'

Response

{
    "id": "getblock.io",
    "jsonrpc": "2.0",
    "result": "Geth/v1.9.10-stable/linux-amd64/go1.13.8"
}

web3_sha3 - Optimism

Example code for the web3_sha3 json-rpc method. Сomplete guide on how to use web3_sha3 json-rpc in GetBlock.io Web3 documentation.

Parameters

DATA - array of string

the data to convert into a SHA3 hash.

Request

curl --location --request POST 'https://go.getblock.io/<ACCESS-TOKEN>/' \
--header 'Content-Type: application/json' \
--data-raw '{"jsonrpc": "2.0",
"method": "web3_sha3",
"params": ["0xf2a2b854721d4372474fc76cc13445a73369c0c334f4935c88bde3c310f28c9a"],
"id": "getblock.io"}'

Response

{
    "id": "getblock.io",
    "jsonrpc": "2.0",
    "result": "0xf5d3389b32cee33308ce9af2d8aefa1517aa90ccb7b1d2eb29c61f13e1fd3cea"
}