diff --git a/pages/rpc-service/chains/chains-api/_meta.json b/pages/rpc-service/chains/chains-api/_meta.json index 359b3704e..f1a5c2e70 100644 --- a/pages/rpc-service/chains/chains-api/_meta.json +++ b/pages/rpc-service/chains/chains-api/_meta.json @@ -14,6 +14,7 @@ "bttc": "BitTorrent Chain", "blast": "Blast", "bnb-smart-chain": "BNB Smart Chain", + "botanix": "Botanix", "celo": "Celo", "chiliz": "Chiliz", "core": "Core", @@ -31,9 +32,9 @@ "heco": "Huobi ECO Chain", "horizen-eon": "Horizen EON", "iotex": "IoTeX", + "kaia": "Kaia", "kava": "Kava", "kinto": "Kinto", - "klaytn": "Klaytn", "kusama": "Kusama", "linea": "Linea", "mantle": "Mantle", diff --git a/pages/rpc-service/chains/chains-api/botanix.mdx b/pages/rpc-service/chains/chains-api/botanix.mdx new file mode 100644 index 000000000..e0079d3d5 --- /dev/null +++ b/pages/rpc-service/chains/chains-api/botanix.mdx @@ -0,0 +1,1749 @@ +import { Callout } from "components"; + +# Botanix + +> Botanix API is available on [Web3 API platform](https://www.ankr.com/rpc/botanix). + +*Botanix* is a decentralized Turing-complete Layer 2 EVM built on the native currency of bitcoin. It operates using two core components: + + * **Ethereum Virtual Machine**: Fortified by a Proof-of-Stake consensus protocol that leverages Bitcoin's Proof-of-Work for superior security. Stakes are represented by actual bitcoin stored securely within multi-signature wallets on the Bitcoin network. By supporting EVM, Botanix allows developers to seamlessly port existing Ethereum dApps to the Bitcoin ecosystem. + * **Spiderchain Protocol**: At the core of Botanix is the Spiderchain, a series of successive multisignature (multisig) wallets managed by randomized sets of orchestrators. This structure secures user funds and facilitates the movement of Bitcoin within the network, effectively separating Bitcoin "the asset" from Bitcoin "the blockchain." By securing the Bitcoin present on Botanix in a decentralized chain of multisigs, it separates Bitcoin from the EVM. This allows for a transition from Bitcoin’s UTXO model to an account model used in the EVM. + +In order for your Web3 application to interact with Botanix — either by reading blockchain data or sending transactions to the network — it must connect to a Botanix node. Developers interact with the blockchain using the methods provided by the API. + +The API interaction follows the [JSON-RPC](https://www.jsonrpc.org/specification) which is a stateless, light-weight remote procedure call (RPC) protocol. It defines several data structures and the rules around their processing. It is transport agnostic in that the concepts can be used within the same process, over sockets, over HTTP, or in other message-passing environments. It uses JSON (RFC 4627) as data format. + +--- + +## Methods supported +
+ + * [`web3_clientVersion`](/rpc-service/chains/chains-api/botanix/#web3_clientversion) — returns the current client version. + * [`web3_sha3`](/rpc-service/chains/chains-api/botanix/#web3_sha3) — returns Keccak-256 (not the standardized SHA3-256) of the given data. + * [`net_version`](/rpc-service/chains/chains-api/botanix/#net_version) — returns the current network ID. + * [`net_listening`](/rpc-service/chains/chains-api/botanix/#net_listening) — returns true if client is actively listening for network connections. + * [`eth_protocolVersion`](/rpc-service/chains/chains-api/botanix/#eth_protocolversion) — returns the current protocol version. + * [`eth_syncing`](/rpc-service/chains/chains-api/botanix/#eth_syncing) — returns data on the sync status or false. + * [`eth_gasPrice`](/rpc-service/chains/chains-api/botanix/#eth_gasprice) — returns the current price per gas in wei. + * [`eth_accounts`](/rpc-service/chains/chains-api/botanix/#eth_accounts) — returns a list of addresses owned by client. + * [`eth_blockNumber`](/rpc-service/chains/chains-api/botanix/#eth_blocknumber) — returns the number of most recent block. + * [`eth_getBalance`](/rpc-service/chains/chains-api/botanix/#eth_getbalance) — returns the balance of the account specified by address. + * [`eth_getStorageAt`](/rpc-service/chains/chains-api/botanix/#eth_getstorageat) — returns the value from a storage position at an address specified. + * [`eth_getTransactionCount`](/rpc-service/chains/chains-api/botanix/#eth_gettransactioncount) — returns the number of transactions sent from an address. + * [`eth_getBlockTransactionCountByHash`](/rpc-service/chains/chains-api/botanix/#eth_getblocktransactioncountbyhash) — returns the number of transactions in a block specified by block hash. + * [`eth_getBlockTransactionCountByNumber`](/rpc-service/chains/chains-api/botanix/#eth_getblocktransactioncountbynumber) — returns the number of transactions in the block specified by number. + * [`eth_getUncleCountByBlockHash`](/rpc-service/chains/chains-api/botanix/#eth_getunclecountbyblockhash) — returns the number of uncles in a block specified by block hash. + * [`eth_getUncleCountByBlockNumber`](/rpc-service/chains/chains-api/botanix/#eth_getunclecountbyblocknumber) — returns the number of uncles in a block specified by block number. + * [`eth_getCode`](/rpc-service/chains/chains-api/botanix/#eth_getcode) — returns code at an address specified. + * [`eth_sendRawTransaction`](/rpc-service/chains/chains-api/botanix/#eth_sendrawtransaction) — creates a new message call transaction or a contract creation for signed transactions. + * [`eth_call`](/rpc-service/chains/chains-api/botanix/#eth_call) — executes a new message call immediately without creating a transaction on the blockchain. + * [`eth_estimateGas`](/rpc-service/chains/chains-api/botanix/#eth_estimategas) — generates and returns an estimate of how much gas is necessary to allow the transaction to complete. + * [`eth_getBlockByHash`](/rpc-service/chains/chains-api/botanix/#eth_getblockbyhash) — returns information for the block specified by block hash. + * [`eth_getBlockByNumber`](/rpc-service/chains/chains-api/botanix/#eth_getblockbynumber) — returns information for the block specified by block number. + * [`eth_getTransactionByHash`](/rpc-service/chains/chains-api/botanix/#eth_gettransactionbyhash) — returns information on a transaction specified by transaction hash. + * [`eth_getTransactionByBlockHashAndIndex`](/rpc-service/chains/chains-api/botanix/#eth_gettransactionbyblockhashandindex) — returns information on a transaction specified by block hash and transaction index position. + * [`eth_getTransactionByBlockNumberAndIndex`](/rpc-service/chains/chains-api/botanix/#eth_gettransactionbyblocknumberandindex) — returns information on a transaction by block number and transaction index position. + * [`eth_getTransactionReceipt`](/rpc-service/chains/chains-api/botanix/#eth_gettransactionreceipt) — returns the receipt of a transaction by transaction hash. + * [`eth_getUncleByBlockHashAndIndex`](/rpc-service/chains/chains-api/botanix/#eth_getunclebyblockhashandindex) — returns information about an uncle of a block by hash and uncle index position. + * [`eth_getUncleByBlockNumberAndIndex`](/rpc-service/chains/chains-api/botanix/#eth_getunclebyblocknumberandindex) — returns information about an uncle of a block by number and uncle index position. + * [`eth_getLogs`](/rpc-service/chains/chains-api/botanix/#eth_getlogs) — returns logs matching the parameters specified. + +--- + +## `web3_clientVersion` + +> Returns the current client version. + +### Parameters +
+ + * `id` (integer; required): a request ID (example: 1). + * `jsonrpc` (string; required): a JSON RPC spec used (example: 2.0). + * `method` (string; required): a method used for the request. + * `params` (array; required): none. + +### Returns +
+ + * ``: the current client version. + +### Request example + +```shell +curl -X POST https://rpc.ankr.com/botanix_testnet \ +-H 'Content-Type: application/json' \ +-d '{ + "jsonrpc": "2.0", + "method": "web3_clientVersion", + "params": [], + "id": 1 + }' +``` + +### Response example + +```json +{ + "jsonrpc": "2.0", + "result": "reth/v1.0.5-70258524/x86_64-unknown-linux-gnu", + "id": 1 +} +``` + +--- + +## `web3_sha3` + +> Returns Keccak-256 (not the standardized SHA3-256) of the given data. + +### Parameters +
+ + * `id` (integer; required): a request ID (example: 1). + * `jsonrpc` (string; required): a JSON RPC spec used (example: 2.0). + * `method` (string; required): a method used for the request. + * `params` (array; required): + + * `` (data): the data to convert into a SHA3 hash. + +### Returns +
+ + * `` (data): the SHA3 result of the given string. + +### Request example + +```shell +curl -X POST https://rpc.ankr.com/botanix_testnet \ +-H 'Content-Type: application/json' \ +-d '{ + "jsonrpc": "2.0", + "method": "web3_sha3", + "params": ["0x68656c6c6f20776f726c64"], + "id": 1 + }' +``` + +### Response example + +```json +{ + "jsonrpc": "2.0", + "id": 1, + "result": "0x47173285a8d7341e5e972fc677286384f802f8ef42a5ec5f03bbfa254cb01fad" +} +``` + +--- + +## `net_version` + +> Returns the current network ID. + +### Parameters +
+ + * `id` (integer; required): a request ID (example: 1). + * `jsonrpc` (string; required): a JSON RPC spec used (example: 2.0). + * `method` (string; required): a method used for the request. + * `params` (array; required): none. + +### Returns +
+ + * ``: the current network ID. + +### Request example + +```shell +curl -X POST https://rpc.ankr.com/botanix_testnet \ +-H 'Content-Type: application/json' \ +-d '{ + "jsonrpc": "2.0", + "method": "net_version", + "params": [], + "id": 1 + }' +``` + +### Response example + +```json +{ + "jsonrpc": "2.0", + "id": 1, + "result": "3636" +} +``` + +--- + +## `net_listening` + +> Returns `true` if client is actively listening for network connections. + +### Parameters +
+ + * `id` (integer; required): a request ID (example: 1). + * `jsonrpc` (string; required): a JSON RPC spec used (example: 2.0). + * `method` (string; required): a method used for the request. + * `params` (array; required): none. + +### Returns +
+ + * ``: `true` when listening, otherwise `false`. + +### Request example + +```shell +curl -X POST https://rpc.ankr.com/botanix_testnet \ +-H 'Content-Type: application/json' \ +-d '{ + "jsonrpc": "2.0", + "method": "net_listening", + "params": [], + "id": 1 + }' +``` + +### Response example + +```json +{ + "jsonrpc": "2.0", + "id": 1, + "result": true +} +``` + +--- + +## `eth_protocolVersion` + +> Returns the current Ethereum protocol version. + +### Parameters +
+ + * `id` (integer; required): a request ID (example: 1). + * `jsonrpc` (string; required): a JSON RPC spec used (example: 2.0). + * `method` (string; required): a method used for the request. + * `params` (array; required): none. + +### Returns +
+ + * ``: the current Ethereum protocol version. + +### Request example + +```shell +curl -X POST https://rpc.ankr.com/botanix_testnet \ +-H 'Content-Type: application/json' \ +-d '{ + "jsonrpc": "2.0", + "method": "eth_protocolVersion", + "params": [], + "id": 1 + }' +``` + +### Response example + +```json +{ + "jsonrpc": "2.0", + "result": "0x5", + "id": 1 +} +``` + +--- + +## `eth_syncing` + +> Returns an object with data about the sync status or false. + +### Parameters +
+ + * `id` (integer; required): a request ID (example: 1). + * `jsonrpc` (string; required): a JSON RPC spec used (example: 2.0). + * `method` (string; required): a method used for the request. + * `params` (array; required): none. + +### Returns +
+ + * ``|``: an object with sync status data or `false`, when not syncing: + * `startingBlock` (quantity): the block at which the import started (will only be reset, after the sync reached its head). + * `currentBlock` (quantity): the current block, same as `eth_blockNumber`. + * `highestBlock` (quantity): the estimated highest block. + +### Request example + +```shell +curl -X POST https://rpc.ankr.com/botanix_testnet \ +-H 'Content-Type: application/json' \ +-d '{ + "jsonrpc": "2.0", + "method": "eth_syncing", + "params": [], + "id": 1 + }' +``` + +### Response example + +```json +{ + "jsonrpc": "2.0", + "id": 1, + "result": false +} +``` + +--- + +## `eth_gasPrice` + +> Returns the current price per gas in wei. + +### Parameters +
+ + * `id` (integer; required): a request ID (example: 1). + * `jsonrpc` (string; required): a JSON RPC spec used (example: 2.0). + * `method` (string; required): a method used for the request. + * `params` (array; required): none. + +### Returns +
+ + * `` (quantity): the current gas price in wei. + +### Request example + +```shell +curl -X POST https://rpc.ankr.com/botanix_testnet \ +-H 'Content-Type: application/json' \ +-d '{ + "jsonrpc": "2.0", + "method": "eth_gasPrice", + "params": [], + "id": 1 + }' +``` + +### Response example + +```json +{ + "jsonrpc": "2.0", + "id": 1, + "result": "0x18974" +} +``` + +--- + +## `eth_accounts` + +> Returns a list of addresses owned by client. + +### Parameters +
+ + * `id` (integer; required): a request ID (example: 1). + * `jsonrpc` (string; required): a JSON RPC spec used (example: 2.0). + * `method` (string; required): a method used for the request. + * `params` (array; required): none. + +### Returns +
+ + * `` (string; data, 20 bytes): addresses owned by the client. + +### Request example + +```shell +curl -X POST https://rpc.ankr.com/botanix_testnet \ +-H 'Content-Type: application/json' \ +-d '{ + "jsonrpc": "2.0", + "method": "eth_accounts", + "params": [], + "id": 1 + }' +``` + +### Response example + +```json +{ + "id": 1, + "jsonrpc": "2.0", + "result": [] +} +``` + +--- + +## `eth_blockNumber` + +> Returns the number of most recent block. + +### Parameters +
+ + * `id` (integer; required): a request ID (example: 1). + * `jsonrpc` (string; required): a JSON RPC spec used (example: 2.0). + * `method` (string; required): a method used for the request. + * `params` (array; required): none. + +### Returns +
+ + * `` (quantity): the current block number the client is on. + +### Request example + +```shell +curl -X POST https://rpc.ankr.com/botanix_testnet \ +-H 'Content-Type: application/json' \ +-d '{ + "jsonrpc": "2.0", + "method": "eth_blockNumber", + "params": [], + "id": 1 + }' +``` + +### Response example + +```json +{ + "jsonrpc": "2.0", + "id": 1, + "result": "0x66036" +} +``` + +--- + +## `eth_getBalance` + +> Returns the balance of the account specified by address. + +### Parameters +
+ + * `id` (integer; required): a request ID (example: 1). + * `jsonrpc` (string; required): a JSON RPC spec used (example: 2.0). + * `method` (string; required): a method used for the request. + * `params` (array; required): + + 1. `` (data, 20 bytes): an address to check for balance. + 2. `` (quantity|tag): either the hex value of a _block number_ or one of the following _block tags_: + * `earliest`: the lowest numbered block available on the client. + * `finalized`: the most recent crypto-economically secure block; cannot be re-orged outside of manual intervention driven by community coordination. + * `safe`: the most recent block that is safe from re-orgs under honest majority and certain synchronicity assumptions. + * `latest`: the most recent block in the canonical chain observed by the client; this block can be re-orged out of the canonical chain even under healthy/normal conditions. + * `pending`: a sample next block built by the client on top of the `latest` and containing the set of transactions usually taken from local mempool. In other words, it is the block that has not been mined yet. + +### Returns +
+ + * `` (quantity): the current balance in wei. + +### Request example + +```shell +curl -X POST https://rpc.ankr.com/botanix_testnet \ +-H 'Content-Type: application/json' \ +-d '{ + "jsonrpc": "2.0", + "method": "eth_getBalance", + "params": ["0xA2436e808d851cbBC9B221C4B9DA0EDa768cc75c", "latest"], + "id": 1 + }' +``` + +### Response example + +```json +{ + "jsonrpc": "2.0", + "id": 1, + "result": "0x23aefd32b5380a" +} +``` + +--- + +## `eth_getStorageAt` + +> Returns the value from a storage position at an address specified. + +### Parameters +
+ + * `id` (integer; required): a request ID (example: 1). + * `jsonrpc` (string; required): a JSON RPC spec used (example: 2.0). + * `method` (string; required): a method used for the request. + * `params` (array; required): + + 1. `` (data, 20 bytes): an address of the storage (hex encoded). + 2. `` (quantity): a slot position in the storage (hex encoded unsigned integer). + 3. `` (quantity|tag): either the hex value of a _block number_ or one of the following _block tags_: + + * `earliest`: the lowest numbered block available on the client. + * `finalized`: the most recent crypto-economically secure block; cannot be re-orged outside of manual intervention driven by community coordination. + * `safe`: the most recent block that is safe from re-orgs under honest majority and certain synchronicity assumptions. + * `latest`: the most recent block in the canonical chain observed by the client; this block can be re-orged out of the canonical chain even under healthy/normal conditions. + * `pending`: a sample next block built by the client on top of the `latest` and containing the set of transactions usually taken from local mempool. In other words, it is the block that has not been mined yet. + +### Returns +
+ + * `` (data): the value at this storage position. + +### Request example + +```shell +curl -X POST https://rpc.ankr.com/botanix_testnet \ +-H 'Content-Type: application/json' \ +-d '{ + "jsonrpc": "2.0", + "method": "eth_getStorageAt", + "params": ["0xA2436e808d851cbBC9B221C4B9DA0EDa768cc75c", "0x0", "latest"], + "id": 1 + }' +``` + +### Response example + +```json +{ + "jsonrpc": "2.0", + "id": 1, + "result": "0x0000000000000000000000000000000000000000000000000000000000000000" +} +``` + +--- + +## `eth_getTransactionCount` + +> Returns the number of transactions sent from an address. + +### Parameters +
+ + * `id` (integer; required): a request ID (example: 1). + * `jsonrpc` (string; required): a JSON RPC spec used (example: 2.0). + * `method` (string; required): a method used for the request. + * `params` (array; required): + + 1. `` (data, 20 bytes): an address. + 2. `` (quantity|tag): either the hex value of a _block number_ or one of the following _block tags_: + + * `earliest`: the lowest numbered block available on the client. + * `finalized`: the most recent crypto-economically secure block; cannot be re-orged outside of manual intervention driven by community coordination. + * `safe`: the most recent block that is safe from re-orgs under honest majority and certain synchronicity assumptions. + * `latest`: the most recent block in the canonical chain observed by the client; this block can be re-orged out of the canonical chain even under healthy/normal conditions. + * `pending`: a sample next block built by the client on top of the `latest` and containing the set of transactions usually taken from local mempool. In other words, it is the block that has not been mined yet. + +### Returns +
+ + * `` (quantity): the number of transactions send from this address. + +### Request example + +```shell +curl -X POST https://rpc.ankr.com/botanix_testnet \ +-H 'Content-Type: application/json' \ +-d '{ + "jsonrpc": "2.0", + "method": "eth_getTransactionCount", + "params": ["0xA2436e808d851cbBC9B221C4B9DA0EDa768cc75c", "latest"], + "id": 1 + }' +``` + +### Response example + +```json +{ + "jsonrpc": "2.0", + "id": 1, + "result": "0x167" +} +``` + +--- + +## `eth_getBlockTransactionCountByHash` + +> Returns the number of transactions in a block specified by block hash. + +### Parameters +
+ + * `id` (integer; required): a request ID (example: 1). + * `jsonrpc` (string; required): a JSON RPC spec used (example: 2.0). + * `method` (string; required): a method used for the request. + * `params` (array; required): + + 1. `` (data, 32 bytes): a block hash. + +### Returns +
+ + * `` (quantity): the number of transactions in this block. + +### Request example: + +```shell +curl -X POST https://rpc.ankr.com/botanix_testnet \ +-H 'Content-Type: application/json' \ +-d '{ + "jsonrpc": "2.0", + "method": "eth_getBlockTransactionCountByHash", + "params": ["0x58feadbd8aac12d7368a15c65cb28b0d7fb3288eb595286efd8967dc68cfd93b"], + "id": 1 + }' +``` + +### Response example + +```json +{ + "jsonrpc": "2.0", + "id": 1, + "result": "0x4" +} +``` + +--- + +## `eth_getBlockTransactionCountByNumber` + +> Returns the number of transactions in the block specified by number. + +### Parameters +
+ + * `id` (integer; required): a request ID (example: 1). + * `jsonrpc` (string; required): a JSON RPC spec used (example: 2.0). + * `method` (string; required): a method used for the request. + * `params` (array; required): + + 1. `` (quantity|tag): either the hex value of a _block number_ or one of the following _block tags_: + * `earliest`: the lowest numbered block available on the client. + * `finalized`: the most recent crypto-economically secure block; cannot be re-orged outside of manual intervention driven by community coordination. + * `safe`: the most recent block that is safe from re-orgs under honest majority and certain synchronicity assumptions. + * `latest`: the most recent block in the canonical chain observed by the client; this block can be re-orged out of the canonical chain even under healthy/normal conditions. + * `pending`: a sample next block built by the client on top of the `latest` and containing the set of transactions usually taken from local mempool. In other words, it is the block that has not been mined yet. + +### Returns +
+ + * `` (quantity): the number of transactions in this block. + +### Request example + +```shell +curl -X POST https://rpc.ankr.com/botanix_testnet \ +-H 'Content-Type: application/json' \ +-d '{ + "jsonrpc": "2.0", + "method": "eth_getBlockTransactionCountByNumber", + "params": ["0x66033"], + "id": 1 + }' +``` + +### Response example + +```json +{ + "jsonrpc": "2.0", + "id": 1, + "result": "0x4" +} +``` + +--- + +## `eth_getUncleCountByBlockHash` + +> Returns the number of uncles in a block specified by block hash. + +### Parameters +
+ + * `id` (integer; required): a request ID (example: 1). + * `jsonrpc` (string; required): a JSON RPC spec used (example: 2.0). + * `method` (string; required): a method used for the request. + * `params` (array; required): + + 1. `` (data, 32 bytes): a block hash. + +### Returns +
+ + * `` (quantity): the number of uncles in this block. + +### Request example + +```shell +curl -X POST https://rpc.ankr.com/botanix_testnet \ +-H 'Content-Type: application/json' \ +-d '{ + "jsonrpc": "2.0", + "method": "eth_getUncleCountByBlockHash", + "params": ["0x58feadbd8aac12d7368a15c65cb28b0d7fb3288eb595286efd8967dc68cfd93b"], + "id": 1 + }' +``` + +### Response example + +```json +{ + "jsonrpc": "2.0", + "id": 1, + "result": "0x0" +} +``` + +--- + +## `eth_getUncleCountByBlockNumber` + +> Returns the number of uncles in a block specified by block number. + +### Parameters +
+ + * `id` (integer; required): a request ID (example: 1). + * `jsonrpc` (string; required): a JSON RPC spec used (example: 2.0). + * `method` (string; required): a method used for the request. + * `params` (array; required): + + 1. `` (quantity|tag): either the hex value of a _block number_ or one of the following _block tags_: + * `earliest`: the lowest numbered block available on the client. + * `finalized`: the most recent crypto-economically secure block; cannot be re-orged outside of manual intervention driven by community coordination. + * `safe`: the most recent block that is safe from re-orgs under honest majority and certain synchronicity assumptions. + * `latest`: the most recent block in the canonical chain observed by the client; this block can be re-orged out of the canonical chain even under healthy/normal conditions. + * `pending`: a sample next block built by the client on top of the `latest` and containing the set of transactions usually taken from local mempool. In other words, it is the block that has not been mined yet. + +### Returns +
+ + * `` (quantity): the number of uncles in this block. + +### Request example + +```shell +curl -X POST https://rpc.ankr.com/botanix_testnet \ +-H 'Content-Type: application/json' \ +-d '{ + "jsonrpc": "2.0", + "method": "eth_getUncleCountByBlockNumber", + "params": ["0x66033"], + "id": 1 + }' +``` + +### Response example + +```json +{ + "jsonrpc": "2.0", + "id": 1, + "result": "0x0" +} +``` + +--- + +## `eth_getCode` + +> Returns code at a given address. + +### Parameters +
+ + * `id` (integer; required): a request ID (example: 1). + * `jsonrpc` (string; required): a JSON RPC spec used (example: 2.0). + * `method` (string; required): a method used for the request. + * `params` (array; required): + + 1. `` (data, 20 bytes): an address to get the code from. + 2. `` (quantity|tag): either the hex value of a _block number_ or one of the following _block tags_: + * `earliest`: the lowest numbered block available on the client. + * `finalized`: the most recent crypto-economically secure block; cannot be re-orged outside of manual intervention driven by community coordination. + * `safe`: the most recent block that is safe from re-orgs under honest majority and certain synchronicity assumptions. + * `latest`: the most recent block in the canonical chain observed by the client; this block can be re-orged out of the canonical chain even under healthy/normal conditions. + * `pending`: a sample next block built by the client on top of the `latest` and containing the set of transactions usually taken from local mempool. In other words, it is the block that has not been mined yet. + +### Returns +
+ + * `` (data): the code from the given address. + +### Request example + +```shell +curl -X POST https://rpc.ankr.com/botanix_testnet \ +-H 'Content-Type: application/json' \ +-d '{ + "jsonrpc": "2.0", + "method": "eth_getCode", + "params": ["0x7052e9bed0fd9dfa223735eff03534971028deeb", "latest"], + "id": 1 + }' +``` + +### Response example + +```json +{ + "jsonrpc": "2.0", + "id": 1, + "result": "0x" +} +``` + +--- + +## `eth_sendRawTransaction` + +> Creates new message call transaction or a contract creation for signed transactions. + +### Parameters +
+ + * `id` (integer; required): a request ID (example: 1). + * `jsonrpc` (string; required): a JSON RPC spec used (example: 2.0). + * `method` (string; required): a method used for the request. + * `params` (array; required): + + 1. `` (data): the signed transaction data. + +### Returns +
+ + * `` (data, 32 bytes): the transaction hash, or the zero hash if the transaction is not yet available. + +Use [eth_getTransactionReceipt](/rpc-service/chains/chains-api/botanix/#eth_gettransactionreceipt) to get the contract address, after the transaction was mined, when you created a contract. + +### Request example + +```shell +curl -X POST https://rpc.ankr.com/botanix_testnet \ +-H 'Content-Type: application/json' \ +-d '{ + "jsonrpc": "2.0", + "method": "eth_sendRawTransaction", + "params": ["signed_transaction_data"], + "id": 1 +}' +``` + +### Response example + +```json +{ + "id": 1, + "jsonrpc": "2.0", + "result": "0xe670ec64341771606e55d6b4ca35a1a6b75ee3d5145a99d05921026d1527331" +} +``` + +--- + +## `eth_call` + +> Executes a new message call immediately without creating a transaction on the blockchain. + +### Parameters +
+ + * `id` (integer; required): a request ID (example: 1). + * `jsonrpc` (string; required): a JSON RPC spec used (example: 2.0). + * `method` (string; required): a method used for the request. + * `params` (array; required): + + 1. `` (hex encoded): the transaction object: + * `from` (string; data, 20 bytes; optional): the address the transaction is sent from. + * `to` (string; data, 20 bytes): the address the transaction is directed to. + * `gas` (string; quantity; optional): the gas provided for the transaction execution. `eth_call` consumes zero gas, but this parameter may be needed by some executions. + * `gasPrice` (string; quantity; optional): the gas price willing to be paid by the sender in wei. + * `value` (string; quantity; optional): the value sent with this transaction, in wei. + * `data` (string; data; optional): the hash of the method signature and encoded parameters. + + 2. `` (quantity|tag): either the hex value of a _block number_ or one of the following _block tags_: + * `earliest`: the lowest numbered block available on the client. + * `finalized`: the most recent crypto-economically secure block; cannot be re-orged outside of manual intervention driven by community coordination. + * `safe`: the most recent block that is safe from re-orgs under honest majority and certain synchronicity assumptions. + * `latest`: the most recent block in the canonical chain observed by the client; this block can be re-orged out of the canonical chain even under healthy/normal conditions. + * `pending`: a sample next block built by the client on top of the `latest` and containing the set of transactions usually taken from local mempool. In other words, it is the block that has not been mined yet. + +### Returns +
+ + * `` (hex encoded bytes): the return value of executed contract. + +### Request example + +```shell +curl -X POST https://rpc.ankr.com/botanix_testnet \ +-H 'Content-Type: application/json' \ +-d '{ + "jsonrpc": "2.0", + "method": "eth_call", + "params": [ + { + "to": "0xc546819478373AE2E7cBD2DaF5365Ef90add1e60", + "data": "0x70a082310000000000000000000000005A93A3F8C5E3EAE603B36E3E0805A2E2290B1E82" + }, + "latest" + ], + "id": 1 +}' +``` + +### Response example + +```json +{ + "jsonrpc": "2.0", + "id": 1, + "result": "0x0000000000000000000000000000000000000000000000000000000000000000" +} +``` + +--- + +## `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. + +### Parameters +
+ + * `id` (integer; required): a request ID (example: 1). + * `jsonrpc` (string; required): a JSON RPC spec used (example: 2.0). + * `method` (string; required): a method used for the request. + * `params` (array; required): + + 1. `` (hex encoded): the transaction object: + * `from` (string; data, 20 bytes; optional): the address the transaction is sent from. + * `to` (string; data, 20 bytes; optional): the address the transaction is directed to. + * `gas` (string; quantity; optional): the gas provided for the transaction execution. `eth_call` consumes zero gas, but this parameter may be needed by some executions. + * `gasPrice` (string; quantity; optional): the gas price willing to be paid by the sender in wei. + * `value` (string; quantity; optional): the value sent with this transaction, in wei. + * `data` (string; data; optional): the hash of the method signature and encoded parameters. + + 2. `` (quantity|tag; optional): either a HEX value of a *block number* or one of the following *block tags*: + * `earliest`: the lowest numbered block available on the client. + * `finalized`: the most recent crypto-economically secure block; cannot be re-orged outside of manual intervention driven by community coordination. + * `safe`: the most recent block that is safe from re-orgs under honest majority and certain synchronicity assumptions. + * `latest`: the most recent block in the canonical chain observed by the client; this block can be re-orged out of the canonical chain even under healthy/normal conditions. + * `pending`: a sample next block built by the client on top of the `latest` and containing the set of transactions usually taken from local mempool. In other words, it is the block that has not been mined yet. + +### Returns +
+ + * `` (quantity): the amount of gas used. + +### Request example + +```shell +curl -X POST https://rpc.ankr.com/botanix_testnet \ +-H 'Content-Type: application/json' \ +-d '{ + "jsonrpc": "2.0", + "method": "eth_estimateGas", + "params": [ + { + "from": "0x8D53Df2E3Ed5edCd3d821201088Ae213382fD64B", + "to": "0x3C9fc59ac02f1929fDc4e4eE7C68f9481eC95347", + "value": "0x2", + "data": "0xa9059cbb0000000000000000000000005A93A3F8C5E3EAE603B36E3E0805A2E2290B1E8200000000000000000000000000000000000000000000000000000000000003e8" + } + ], + "id": 1 +}' +``` + +### Response example + +```json +{ + "jsonrpc": "2.0", + "id": 1, + "result": "0x54f6" +} +``` + +--- + +## `eth_getBlockByHash` + +> Returns information for the block specified by block hash. + +### Parameters +
+ + * `id` (integer; required): a request ID (example: 1). + * `jsonrpc` (string; required): a JSON RPC spec used (example: 2.0). + * `method` (string; required): a method used for the request. + * `params` (array; required): + + 1. `` (data, 32 bytes): the block hash. + 2. ``: if `true` it returns the full transaction objects, if `false` — only the hashes of the transactions. + +### Returns +
+ + * ``: a block object, or null when no block was found: + * `number` (string; quantity): the block number; null when it's a pending block. + * `hash` (string; data, 32 bytes): the hash of the block; null when it's a pending block. + * `parentHash` (string; data, 32 bytes): the hash of the parent block. + * `nonce` (string; data, 8 bytes): the hash of the generated proof-of-work; null when it's a pending block. + * `sha3Uncles` (string; data, 32 bytes): SHA3 of the uncles data in the block. + * `logsBloom` (string; data, 256 bytes): the bloom filter for the logs of the block. null when its pending block. + * `transactionsRoot` (string; data, 32 bytes): the root of the transaction trie of the block. + * `stateRoot` (string; data, 32 bytes): the root of the final state trie of the block. + * `receiptsRoot` (string; data, 32 bytes): the root of the receipts trie of the block. + * `miner` (string; data, 20 bytes): the address of the beneficiary to whom the mining rewards were given. + * `difficulty` (string; quantity): the difficulty for this block. + * `totalDifficulty` (string; quantity): the total difficulty of the chain until this block. + * `extraData` (string; data): the **extra data** field of this block. + * `size` (string; quantity): the size of this block in bytes. + * `gasLimit` (string; quantity): the maximum gas allowed in this block. + * `gasUsed` (string; quantity): the total used gas by all transactions in this block. + * `timestamp` (string; quantity): the unix timestamp for when the block was collated. + * `transactions` (array of strings): an array of transaction objects, or 32 bytes transaction hashes depending on the last given parameter. + * `uncles` (array of strings): an array of uncle hashes. + +### Request example + +```shell +curl -X POST https://rpc.ankr.com/botanix_testnet \ +-H 'Content-Type: application/json' \ +-d '{ + "jsonrpc": "2.0", + "method": "eth_getBlockByHash", + "params": ["0x98502d6708fb49ed2762f17ad038bd98ea6e2798a5239137f25e586b93da4e07", false], + "id": 1 + }' +``` + +### Response example + +```json +{ + "id": 1, + "jsonrpc": "2.0", + "result": { + "hash": "0x98502d6708fb49ed2762f17ad038bd98ea6e2798a5239137f25e586b93da4e07", + "parentHash": "0xa1bd6f3e0048e9e02e6d9c7813ca677d2f4c2cdbeb230625a7d49e05df22d852", + "sha3Uncles": "0x1dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347", + "miner": "0x0000000000000000000000000000000000000000", + "stateRoot": "0xe06200dad3d27de6ee8f6cacd686760c9cd75b3ad588f10ec2f3de8ac6946e86", + "transactionsRoot": "0xabd869fb8949ced639d914003eea4d6828812a4cc2d009e8ad029926ade02756", + "receiptsRoot": "0x5742bdfaf3bb8867668776ae36114348cf62cce44ab24bd9fc2f47397807b860", + "logsBloom": "0x00200000020000080800000000000000000000000000044000000000000000100040000000000000000000000000000000000000000820000010004000201000040000000000010850800008014004200000000000000000100000010000000000000000020008000000000000000800000002000000000000050010000800000000800000000000100000000008020000000000000000018000004000000200420008100000000000000000400100008000008020800000000000200000000800000022060000000000000004101000000004000000800001100000000020000010004000000000002000000002000000080200000000000000000000040000", + "difficulty": "0x0", + "number": "0x660b5", + "gasLimit": "0x1c9c380", + "gasUsed": "0x170f03", + "timestamp": "0x6756e1d2", + "totalDifficulty": "0x0", + "extraData": "0x00000000000000009ad3257eb2068ef8f800595cb5ad7c3f0a23d1d5da2120bf7aacf44fe102000002ba8b5f472d0f435c528488eaab3a29e113222ecc9b3282a313f86f7b85ec2dc785ff04d7785beeaad6e508828b5c9a22262fd98e", + "mixHash": "0x0000000000000000000000000000000000000000000000000000000000000000", + "nonce": "0x0000000000000000", + "baseFeePerGas": "0x7", + "blobGasUsed": "0x0", + "excessBlobGas": "0x0", + "parentBeaconBlockRoot": "0x0000000000000000000000000000000000000000000000000000000000000000", + "uncles": [], + "transactions": [ + "0x8816760db1ab5121f82ccc6074e1b81e732354e9c0a21a893c2e0d62980b6735", + "0x54b22ece24974af6de3bab39aa31a59708cdacc621609385c606b2bb30f8817f", + "0x1ac2ffa0343b447c5b82b253728763103eac03d5b7611dc75c25cfa6979f0883", + "0xcec3a9e568ae13291180da1c87f998cadae0913c99bd356085ade92c501a1373", + "0x8d598b527e3bbb846bb14ed9b7cfc866e85e82493591ad1bfc3b9f844d167862", + "0x0dd0a9fa7457fb7dcdee67abe0e506f5a25d7d31395b9ff92ffe1216f3397175" + ], + "size": "0x20ec" + } +} +``` + +--- + +## `eth_getBlockByNumber` + +> Returns information for the block specified by block number. + +### Parameters +
+ + * `id` (integer; required): a request ID (example: 1). + * `jsonrpc` (string; required): a JSON RPC spec used (example: 2.0). + * `method` (string; required): a method used for the request. + * `params` (array; required): + + 1. `` (quantity|tag): either the hex value of a *block number* or one of the following *block tags*: + * `earliest`: the lowest numbered block available on the client. + * `finalized`: the most recent crypto-economically secure block; cannot be re-orged outside of manual intervention driven by community coordination. + * `safe`: the most recent block that is safe from re-orgs under honest majority and certain synchronicity assumptions. + * `latest`: the most recent block in the canonical chain observed by the client; this block can be re-orged out of the canonical chain even under healthy/normal conditions. + * `pending`: a sample next block built by the client on top of the `latest` and containing the set of transactions usually taken from local mempool. In other words, it is the block that has not been mined yet. + 2. ``: if `true` it returns the full transaction objects, if `false` — only the hashes of the transactions. + +### Returns +
+ + * ``: a block object, or null when no block was found: + * `number` (string; quantity): the block number; null when it's a pending block. + * `hash` (string; data, 32 bytes): the hash of the block; null when it's a pending block. + * `parentHash` (string; data, 32 bytes): the hash of the parent block. + * `nonce` (string; data, 8 bytes): the hash of the generated proof-of-work; null when it's a pending block. + * `sha3Uncles` (string; data, 32 bytes): SHA3 of the uncles data in the block. + * `logsBloom` (string; data, 256 bytes): the bloom filter for the logs of the block. null when its pending block. + * `transactionsRoot` (string; data, 32 bytes): the root of the transaction trie of the block. + * `stateRoot` (string; data, 32 bytes): the root of the final state trie of the block. + * `receiptsRoot` (string; data, 32 bytes): the root of the receipts trie of the block. + * `miner` (string; data, 20 bytes): the address of the beneficiary to whom the mining rewards were given. + * `difficulty` (string; quantity): the difficulty for this block. + * `totalDifficulty` (string; quantity): the total difficulty of the chain until this block. + * `extraData` (string; data): the **extra data** field of this block. + * `size` (string; quantity): the size of this block in bytes. + * `gasLimit` (string; quantity): the maximum gas allowed in this block. + * `gasUsed` (string; quantity): the total used gas by all transactions in this block. + * `timestamp` (string; quantity): the unix timestamp for when the block was collated. + * `transactions` (array of strings): an array of transaction objects, or 32 bytes transaction hashes depending on the last given parameter. + * `uncles` (array of strings): an array of uncle hashes. + +### Request example + +```shell +curl -X POST https://rpc.ankr.com/botanix_testnet \ +-H 'Content-Type: application/json' \ +-d '{ + "jsonrpc": "2.0", + "method": "eth_getBlockByNumber", + "params": ["0x660B5", true], + "id": 1 + }' +``` + +### Response example + +```json +{ + "id": 1, + "jsonrpc": "2.0", + "result": { + "hash": "0x98502d6708fb49ed2762f17ad038bd98ea6e2798a5239137f25e586b93da4e07", + "parentHash": "0xa1bd6f3e0048e9e02e6d9c7813ca677d2f4c2cdbeb230625a7d49e05df22d852", + "sha3Uncles": "0x1dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347", + "miner": "0x0000000000000000000000000000000000000000", + "stateRoot": "0xe06200dad3d27de6ee8f6cacd686760c9cd75b3ad588f10ec2f3de8ac6946e86", + "transactionsRoot": "0xabd869fb8949ced639d914003eea4d6828812a4cc2d009e8ad029926ade02756", + "receiptsRoot": "0x5742bdfaf3bb8867668776ae36114348cf62cce44ab24bd9fc2f47397807b860", + "logsBloom": "0x00200000020000080800000000000000000000000000044000000000000000100040000000000000000000000000000000000000000820000010004000201000040000000000010850800008014004200000000000000000100000010000000000000000020008000000000000000800000002000000000000050010000800000000800000000000100000000008020000000000000000018000004000000200420008100000000000000000400100008000008020800000000000200000000800000022060000000000000004101000000004000000800001100000000020000010004000000000002000000002000000080200000000000000000000040000", + "difficulty": "0x0", + "number": "0x660b5", + "gasLimit": "0x1c9c380", + "gasUsed": "0x170f03", + "timestamp": "0x6756e1d2", + "totalDifficulty": "0x0", + "extraData": "0x00000000000000009ad3257eb2068ef8f800595cb5ad7c3f0a23d1d5da2120bf7aacf44fe102000002ba8b5f472d0f435c528488eaab3a29e113222ecc9b3282a313f86f7b85ec2dc785ff04d7785beeaad6e508828b5c9a22262fd98e", + "mixHash": "0x0000000000000000000000000000000000000000000000000000000000000000", + "nonce": "0x0000000000000000", + "baseFeePerGas": "0x7", + "blobGasUsed": "0x0", + "excessBlobGas": "0x0", + "parentBeaconBlockRoot": "0x0000000000000000000000000000000000000000000000000000000000000000", + "uncles": [], + "transactions": [ + { + "hash": "0x8816760db1ab5121f82ccc6074e1b81e732354e9c0a21a893c2e0d62980b6735", + "nonce": "0x31", + "blockHash": "0x98502d6708fb49ed2762f17ad038bd98ea6e2798a5239137f25e586b93da4e07", + "blockNumber": "0x660b5", + "transactionIndex": "0x0", + "from": "0x891c16e3269e35202ba2b75fcb94c821fc2cb91d", + "to": "0x33b1ed34c11910f767b15ebabab782d61fb2c5ea", + "value": "0x0", + "gasPrice": "0x189b3", + "gas": "0x3a83c", + "maxFeePerGas": "0x189ac", + "maxPriorityFeePerGas": "0x189ac", + "input": "0x6c09596000000000000000000000000044cfd6b8e7ca65002f87250bbd5e4b3af9efbcaf000000000000000000000000eeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeee000000000000000000000000000000000000000000000000016345785d8a0000000000000000000000000000000000000000000000000000000000070c84c980000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000e0000000000000000000000000891c16e3269e35202ba2b75fcb94c821fc2cb91d000000...", + "r": "0xc815313071e4762dfdb3ed934c7dca43ed891c16807cfe1d68c874a565dff23b", + "s": "0x78d96a0cd608746d7d05a9d0415ba4d337a09be745a8f0db4f86c6dfd2c9c144", + "v": "0x1", + "yParity": "0x1", + "chainId": "0xe34", + "accessList": [], + "type": "0x2" + } + ], + "size": "0x20ec" + } +} +``` + +--- + +## `eth_getTransactionByHash` + +> Returns information on a transaction specified by transaction hash. + +### Parameters +
+ + * `id` (integer; required): a request ID (example: 1). + * `jsonrpc` (string; required): a JSON RPC spec used (example: 2.0). + * `method` (string; required): a method used for the request. + * `params` (array; required): + + 1. `` (data, 32 bytes): a transaction hash. + +### Returns +
+ + * `blockHash` (string; data, 32 bytes): a hash of the block containing the transaction; null when it's pending. + * `blockNumber` (string; quantity): a number of the block containing the transaction; null when it's pending. + * `from` (string; data, 20 bytes): an address of the sender. + * `gas` (string; quantity): the gas provided by the sender. + * `gasPrice` (string; quantity): the gas price provided by the sender in wei. + * `hash` (string; data, 32 bytes): the hash of the transaction. + * `input` (string; data): the data send along with the transaction. + * `nonce` (string; quantity): the number of transactions made by the sender prior to this one. + * `to` (string: data, 20 bytes): an address of the receiver: null when it's a contract creation transaction. + * `transactionIndex` (string; quantity): the transaction index position in the block; null when it's pending. + * `value` (string; quantity): the value transferred in wei. + * `v` (string; quantity): ECDSA recovery ID. + * `r` (string; quantity): ECDSA signature r. + * `s` (string; quantity): ECDSA signature s. + +### Request example + +```shell +curl -X POST https://rpc.ankr.com/botanix_testnet \ +-H 'Content-Type: application/json' \ +-d '{ + "jsonrpc": "2.0", + "method": "eth_getTransactionByHash", + "params": ["0x73f629c2ac279ac5abf37abaab13d11549dea9f6146bb302a80d6161dc103712"], + "id": 1 + }' +``` + +### Response example + +```json +{ + "id": 1, + "jsonrpc": "2.0", + "result": { + "hash": "0x73f629c2ac279ac5abf37abaab13d11549dea9f6146bb302a80d6161dc103712", + "nonce": "0x3", + "blockHash": "0x98502d6708fb49ed2762f17ad038bd98ea6e2798a5239137f25e586b93da4e07", + "blockNumber": "0x660b5", + "transactionIndex": "0xe", + "from": "0x401316fd6478063231f5b921bccfef8536e38e7b", + "to": "0x33b1ed34c11910f767b15ebabab782d61fb2c5ea", + "value": "0x9184e72a000", + "gasPrice": "0x186a0", + "gas": "0x326d4", + "input": "0x6c095960000000000000000000000000eeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeee000000000000000000000000e19ce0acf70dbd7ff9cb80715f84ab0fd72b57ac000000000000000000000000000000000000000000000000000009184e72a00000000000000000000000000000000000000000000000000004579a5e7a152a69000000000000000000000000000000000000000000000000000000000000000100000000000000000000000000000000000000000000000000000000000000e0000000000000000000000000401316fd6478063231f5b921bccfef8536e38e7b00000000000000000000000000000000000000000000000000000000000000010000000000000000000000000000000000000000000000000000000000000020000000000000000000000000233631132fd56c8f86d1fc97f0b82420a8d20af3000000000000000000000000e19ce0acf70dbd7ff9cb80715f84ab0fd72b57ac000000000000000000000000000000000000000000000000000009184e72a0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000401316fd6478063231f5b921bccfef8536e38e7b000000000000000000000000000000000000000000000000000000000000010000000000000000000000000000000000000000000000000000000000000000010000000000000000000000000000000000000000000000000000000000000001000000000000000000000000000000000000000000000000000000000000000100000000000000000000000007c49ade88b40f1ac05707f236d7706f834f6bdb000000000000000000000000c83983d79e4e482734d07360ab9324612dd19c81000000000000000000000000233631132fd56c8f86d1fc97f0b82420a8d20af3000000000000000000000000e19ce0acf70dbd7ff9cb80715f84ab0fd72b57ac000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000010000000000000000000000000000000000000000000000000000000005f5e10000000000000000000000000000000000000000000000000000000000000026fc0000000000000000000000000000000000000000000000000000000000000000", + "r": "0xee4e3beb39ea549ea1fbd50448f2f54a5d7f76fc43d1da0ea1f4f8aae365ee1b", + "s": "0x31192ba82defb27eaedc8e04af492c58c75369c2fb1304d328ea23e4320e855d", + "v": "0x1c8b", + "chainId": "0xe34", + "type": "0x0" + } +} +``` + +--- + +## `eth_getTransactionByBlockHashAndIndex` + +> Returns information on a transaction specified by block hash and transaction index position. + +### Parameters +
+ + * `id` (integer; required): a request ID (example: 1). + * `jsonrpc` (string; required): a JSON RPC spec used (example: 2.0). + * `method` (string; required): a method used for the request. + * `params` (array; required): + + 1. `` (data, 32 bytes): a block hash. + 2. `` (quantity): a transaction index position. + +### Returns +
+ + * `blockHash` (string; data, 32 bytes): a hash of the block containing the transaction; null when it's pending. + * `blockNumber` (string; quantity): a number of the block containing the transaction; null when it's pending. + * `from` (string; data, 20 bytes): an address of the sender. + * `gas` (string; quantity): the gas provided by the sender. + * `gasPrice` (string; quantity): the gas price provided by the sender in wei. + * `hash` (string; data, 32 bytes): the hash of the transaction. + * `input` (string; data): the data send along with the transaction. + * `nonce` (string; quantity): the number of transactions made by the sender prior to this one. + * `to` (string: data, 20 bytes): an address of the receiver: null when it's a contract creation transaction. + * `transactionIndex` (string; quantity): the transaction index position in the block; null when it's pending. + * `value` (string; quantity): the value transferred in wei. + * `v` (string; quantity): ECDSA recovery ID. + * `r` (string; quantity): ECDSA signature r. + * `s` (string; quantity): ECDSA signature s. + +### Request example + +```shell +curl -X POST https://rpc.ankr.com/botanix_testnet \ +-H 'Content-Type: application/json' \ +-d '{ + "jsonrpc": "2.0", + "method": "eth_getTransactionByBlockHashAndIndex", + "params": ["0x98502d6708fb49ed2762f17ad038bd98ea6e2798a5239137f25e586b93da4e07", "0x0"], + "id": 1 + }' +``` + +### Response example + +```json +{ + "id": 1, + "jsonrpc": "2.0", + "result": { + "hash": "0x8816760db1ab5121f82ccc6074e1b81e732354e9c0a21a893c2e0d62980b6735", + "nonce": "0x31", + "blockHash": "0x98502d6708fb49ed2762f17ad038bd98ea6e2798a5239137f25e586b93da4e07", + "blockNumber": "0x660b5", + "transactionIndex": "0x0", + "from": "0x891c16e3269e35202ba2b75fcb94c821fc2cb91d", + "to": "0x33b1ed34c11910f767b15ebabab782d61fb2c5ea", + "value": "0x0", + "gasPrice": "0x189b3", + "gas": "0x3a83c", + "maxFeePerGas": "0x189ac", + "maxPriorityFeePerGas": "0x189ac", + "input": "0x6c09596000000000000000000000000044cfd6b8e7ca65002f87250bbd5e4b3af9efbcaf000000000000000000000000eeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeee000000000000000000000000000000000000000000000000016345785d8a0000000000000000000000000000000000000000000000000000000000070c84c980000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000e0000000000000000000000000891c16e3269e35202ba2b75fcb94c821fc2cb91d0000000000000000000000000000000000000000000000000000000000000001000000000000000000000000000000000000000000000000000000000000002000000000000000000000000044cfd6b8e7ca65002f87250bbd5e4b3af9efbcaf000000000000000000000000eeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeee000000000000000000000000000000000000000000000000016345785d8a0000000000000000000000000000000000000000000000000000000000070c8669a1000000000000000000000000891c16e3269e35202ba2b75fcb94c821fc2cb91d0000000000000000000000000000000000000000000000000000000000000100000000000000000000000000000000000000000000000000000000000000000100000000000000000000000000000000000000000000000000000000000000010000000000000000000000000000000000000000000000000000000000000001000000000000000000000000a5e0ae4e5103dc71ca290aa3654830442357a4890000000000000000000000002d1306bf00468b69345bbf1a2d01aa920359535a00000000000000000000000044cfd6b8e7ca65002f87250bbd5e4b3af9efbcaf000000000000000000000000233631132fd56c8f86d1fc97f0b82420a8d20af3000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005f5e10000000000000000000000000000000000000000000000000000000000000026f20000000000000000000000000000000000000000000000000000000000000001", + "r": "0xc815313071e4762dfdb3ed934c7dca43ed891c16807cfe1d68c874a565dff23b", + "s": "0x78d96a0cd608746d7d05a9d0415ba4d337a09be745a8f0db4f86c6dfd2c9c144", + "v": "0x1", + "yParity": "0x1", + "chainId": "0xe34", + "accessList": [], + "type": "0x2" + } +} +``` + +--- + +## `eth_getTransactionByBlockNumberAndIndex` + +> Returns information on a transaction by block number and transaction index position. + +### Parameters +
+ + * `id` (integer; required): a request ID (example: 1). + * `jsonrpc` (string; required): a JSON RPC spec used (example: 2.0). + * `method` (string; required): a method used for the request. + * `params` (array; required): + + 1. `` (quantity|tag): either the hex value of a _block number_ or one of the following _block tags_: + * `earliest`: the lowest numbered block available on the client. + * `finalized`: the most recent crypto-economically secure block; cannot be re-orged outside of manual intervention driven by community coordination. + * `safe`: the most recent block that is safe from re-orgs under honest majority and certain synchronicity assumptions. + * `latest`: the most recent block in the canonical chain observed by the client; this block can be re-orged out of the canonical chain even under healthy/normal conditions. + * `pending`: a sample next block built by the client on top of the `latest` and containing the set of transactions usually taken from local mempool. In other words, it is the block that has not been mined yet. + 2. `` (quantity): the transaction index position. + +### Returns +
+ + * `blockHash` (string; data, 32 bytes): a hash of the block containing the transaction; null when it's pending. + * `blockNumber` (string; quantity): a number of the block containing the transaction; null when it's pending. + * `from` (string; data, 20 bytes): an address of the sender. + * `gas` (string; quantity): the gas provided by the sender. + * `gasPrice` (string; quantity): the gas price provided by the sender in wei. + * `hash` (string; data, 32 bytes): the hash of the transaction. + * `input` (string; data): the data send along with the transaction. + * `nonce` (string; quantity): the number of transactions made by the sender prior to this one. + * `to` (string: data, 20 bytes): an address of the receiver: null when it's a contract creation transaction. + * `transactionIndex` (string; quantity): the transaction index position in the block; null when it's pending. + * `value` (string; quantity): the value transferred in wei. + * `v` (string; quantity): ECDSA recovery ID. + * `r` (string; quantity): ECDSA signature r. + * `s` (string; quantity): ECDSA signature s. + +### Request example + +```shell +curl -X POST https://rpc.ankr.com/botanix_testnet \ +-H 'Content-Type: application/json' \ +-d '{ + "jsonrpc": "2.0", + "method": "eth_getTransactionByBlockNumberAndIndex", + "params": ["0x660B5", "0x1"], + "id": 1 + }' +``` + +### Response example + +```json +{ + "id": 1, + "jsonrpc": "2.0", + "result": { + "hash": "0x54b22ece24974af6de3bab39aa31a59708cdacc621609385c606b2bb30f8817f", + "nonce": "0xac", + "blockHash": "0x98502d6708fb49ed2762f17ad038bd98ea6e2798a5239137f25e586b93da4e07", + "blockNumber": "0x660b5", + "transactionIndex": "0x1", + "from": "0x0215b4ddd4e55b1b8f4dba430fe8e415ac95ac37", + "to": "0x33b1ed34c11910f767b15ebabab782d61fb2c5ea", + "value": "0x0", + "gasPrice": "0x189b3", + "gas": "0x3a83c", + "maxFeePerGas": "0x189ac", + "maxPriorityFeePerGas": "0x189ac", + "input": "0x6c09596000000000000000000000000044cfd6b8e7ca65002f87250bbd5e4b3af9efbcaf000000000000000000000000eeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeee000000000000000000000000000000000000000000000000016345785d8a0000000000000000000000000000000000000000000000000000000000070c84c980000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000e00000000000000000000000000215b4ddd4e55b1b8f4dba430fe8e415ac95ac370000000000000000000000000000000000000000000000000000000000000001000000000000000000000000000000000000000000000000000000000000002000000000000000000000000044cfd6b8e7ca65002f87250bbd5e4b3af9efbcaf000000000000000000000000eeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeee000000000000000000000000000000000000000000000000016345785d8a0000000000000000000000000000000000000000000000000000000000070c8669a10000000000000000000000000215b4ddd4e55b1b8f4dba430fe8e415ac95ac370000000000000000000000000000000000000000000000000000000000000100000000000000000000000000000000000000000000000000000000000000000100000000000000000000000000000000000000000000000000000000000000010000000000000000000000000000000000000000000000000000000000000001000000000000000000000000a5e0ae4e5103dc71ca290aa3654830442357a4890000000000000000000000002d1306bf00468b69345bbf1a2d01aa920359535a00000000000000000000000044cfd6b8e7ca65002f87250bbd5e4b3af9efbcaf000000000000000000000000233631132fd56c8f86d1fc97f0b82420a8d20af3000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005f5e10000000000000000000000000000000000000000000000000000000000000026f20000000000000000000000000000000000000000000000000000000000000001", + "r": "0x7fd4c243e895175815e98ad5a15010ebb6194e38e029270aeda38a408d97c75a", + "s": "0x57489b3f8704ee9d23bfbcc082d8c3f0b713f8e7bacce9e5b23e7511676a400c", + "v": "0x1", + "yParity": "0x1", + "chainId": "0xe34", + "accessList": [], + "type": "0x2" + } +} +``` + +--- + +## `eth_getTransactionReceipt` + +> Returns the receipt of a transaction by transaction hash. + +The receipt is not available for pending transactions. + +### Parameters +
+ + * `id` (integer; required): a request ID (example: 1). + * `jsonrpc` (string; required): a JSON RPC spec used (example: 2.0). + * `method` (string; required): a method used for the request. + * `params` (array; required): + + 1. `` (data, 32 bytes): a hash of the transaction. + +### Returns +
+ + * `object`: a transaction receipt object, or null when no receipt was found: + + * `transactionHash` (string; data, 32 bytes): a hash of the transaction. + * `transactionIndex` (string; quantity): the transactions index position in the block. + * `blockHash` (string; data, 32 bytes): a hash of the block containing the transaction. + * `blockNumber` (string; quantity): a number of the block containing the transaction. + * `from` (string; data, 20 bytes): an address of the sender. + * `to` (string; data, 20 bytes): an address of the receiver; null when it's a contract creation transaction. + * `cumulativeGasUsed` (string; quantity): the total amount of gas used when this transaction was executed in the block. + * `effectiveGasPrice` (string; quantity): the sum of the base fee and tip paid per unit of gas. + * `gasUsed` (string; quantity): the amount of gas used by this specific transaction alone. + * `contractAddress` (string; data, 20 bytes): the contract address created, if the transaction was a contract creation, otherwise null. + * `logs` (array): an array of log objects, which this transaction generated. + * `logsBloom` (string; data, 256 bytes): a bloom filter for light clients to quickly retrieve related logs. + * `type` (string; data): the transaction type, `0x00` for legacy transactions, `0x01` for access list types, `0x02` for dynamic fees. It also returns either of the following: + + * `root` (string; data, 32 bytes): a post-transaction stateroot (pre Byzantium). + * `status` (string; quantity): either 1 (success) or 0 (failure). + +### Request example + +```shell +curl -X POST https://rpc.ankr.com/botanix_testnet \ +-H 'Content-Type: application/json' \ +-d '{ + "jsonrpc": "2.0", + "method": "eth_getTransactionReceipt", + "params": ["0x73f629c2ac279ac5abf37abaab13d11549dea9f6146bb302a80d6161dc103712"], + "id": 1 + }' +``` + +### Response example + +```json +{ + "id": 1, + "jsonrpc": "2.0", + "result": { + "status": "0x1", + "cumulativeGasUsed": "0x170f03", + "logs": [ + { + "address": "0x233631132fd56c8f86d1fc97f0b82420a8d20af3", + "topics": [ + "0xddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef", + "0x0000000000000000000000000000000000000000000000000000000000000000", + "0x00000000000000000000000033b1ed34c11910f767b15ebabab782d61fb2c5ea" + ], + "data": "0x000000000000000000000000000000000000000000000000000009184e72a000", + "blockHash": "0x98502d6708fb49ed2762f17ad038bd98ea6e2798a5239137f25e586b93da4e07", + "blockNumber": "0x660b5", + "blockTimestamp": "0x6756e1d2", + "transactionHash": "0x73f629c2ac279ac5abf37abaab13d11549dea9f6146bb302a80d6161dc103712", + "transactionIndex": "0xe", + "logIndex": "0x14", + "removed": false + } + ], + "logsBloom": "0x00200000020000080800000000000000000000000000044000000000000000100040000000000000000000000000000000000000000000000010004000000000000000000000010050800008010004200000000000000000000000000000000000000000020000000000000000000800000002000000000000040010000000000000800000000000100000000000020000000000000000018000004000000000400008000000000000000000400100008000008000000000000000200000000800000022040000000000000000101000000004000000800000100000000020000000004000000000002000000002000000000000000000000000000000040000", + "type": "0x0", + "transactionHash": "0x73f629c2ac279ac5abf37abaab13d11549dea9f6146bb302a80d6161dc103712", + "transactionIndex": "0xe", + "blockHash": "0x98502d6708fb49ed2762f17ad038bd98ea6e2798a5239137f25e586b93da4e07", + "blockNumber": "0x660b5", + "gasUsed": "0x2bf5c", + "effectiveGasPrice": "0x186a0", + "from": "0x401316fd6478063231f5b921bccfef8536e38e7b", + "to": "0x33b1ed34c11910f767b15ebabab782d61fb2c5ea", + "contractAddress": null + } +} +``` + +--- + +## `eth_getUncleByBlockHashAndIndex` + +> Returns information about an uncle of a block by hash and uncle index position. + +### Parameters +
+ + * `id` (integer; required): a request ID (example: 1). + * `jsonrpc` (string; required): a JSON RPC spec used (example: 2.0). + * `method` (string; required): a method used for the request. + * `params` (array; required): + + 1. `` (data, 32 bytes): the hash of a block. + 2. `` (quantity): the uncle's index position. + +### Returns +
+ + * ``: a block object, or null when no block was found: + * `number` (string; quantity): the block number; null when it's a pending block. + * `hash` (string; data, 32 bytes): the hash of the block; null when it's a pending block. + * `parentHash` (string; data, 32 bytes): the hash of the parent block. + * `nonce` (string; data, 8 bytes): the hash of the generated proof-of-work; null when it's a pending block. + * `sha3Uncles` (string; data, 32 bytes): SHA3 of the uncles data in the block. + * `logsBloom` (string; data, 256 bytes): the bloom filter for the logs of the block. null when its pending block. + * `transactionsRoot` (string; data, 32 bytes): the root of the transaction trie of the block. + * `stateRoot` (string; data, 32 bytes): the root of the final state trie of the block. + * `receiptsRoot` (string; data, 32 bytes): the root of the receipts trie of the block. + * `miner` (string; data, 20 bytes): the address of the beneficiary to whom the mining rewards were given. + * `difficulty` (string; quantity): the difficulty for this block. + * `totalDifficulty` (string; quantity): the total difficulty of the chain until this block. + * `extraData` (string; data): the **extra data** field of this block. + * `size` (string; quantity): the size of this block in bytes. + * `gasLimit` (string; quantity): the maximum gas allowed in this block. + * `gasUsed` (string; quantity): the total used gas by all transactions in this block. + * `timestamp` (string; quantity): the unix timestamp for when the block was collated. + * `transactions` (array of strings): an array of transaction objects, or 32 bytes transaction hashes depending on the last given parameter. + * `uncles` (array of strings): an array of uncle hashes. + +### Request example + +```shell +curl -X POST https://rpc.ankr.com/botanix_testnet \ +-H 'Content-Type: application/json' \ +-d '{ + "jsonrpc": "2.0", + "method": "eth_getUncleByBlockHashAndIndex", + "params": ["0x98502d6708fb49ed2762f17ad038bd98ea6e2798a5239137f25e586b93da4e07", "0x0"], + "id": 1 + }' +``` + +### Response example + +```json +{ + "id": 1, + "jsonrpc": "2.0", + "result": null +} +``` + +--- + +## `eth_getUncleByBlockNumberAndIndex` + +> Returns information about an uncle of a block by number and uncle index position. + +### Parameters +
+ + * `id` (integer; required): a request ID (example: 1). + * `jsonrpc` (string; required): a JSON RPC spec used (example: 2.0). + * `method` (string; required): a method used for the request. + * `params` (array; required): + + 1. `` (quantity|tag): either the hex value of a _block number_ or one of the following _block tags_: + * `earliest`: the lowest numbered block available on the client. + * `finalized`: the most recent crypto-economically secure block; cannot be re-orged outside of manual intervention driven by community coordination. + * `safe`: the most recent block that is safe from re-orgs under honest majority and certain synchronicity assumptions. + * `latest`: the most recent block in the canonical chain observed by the client; this block can be re-orged out of the canonical chain even under healthy/normal conditions. + * `pending`: a sample next block built by the client on top of the `latest` and containing the set of transactions usually taken from local mempool. In other words, it is the block that has not been mined yet. + 2. `` (quantity): the uncle's index position. + +### Returns +
+ + * ``: a block object, or null when no block was found: + * `number` (string; quantity): the block number; null when it's a pending block. + * `hash` (string; data, 32 bytes): the hash of the block; null when it's a pending block. + * `parentHash` (string; data, 32 bytes): the hash of the parent block. + * `nonce` (string; data, 8 bytes): the hash of the generated proof-of-work; null when it's a pending block. + * `sha3Uncles` (string; data, 32 bytes): SHA3 of the uncles data in the block. + * `logsBloom` (string; data, 256 bytes): the bloom filter for the logs of the block. null when its pending block. + * `transactionsRoot` (string; data, 32 bytes): the root of the transaction trie of the block. + * `stateRoot` (string; data, 32 bytes): the root of the final state trie of the block. + * `receiptsRoot` (string; data, 32 bytes): the root of the receipts trie of the block. + * `miner` (string; data, 20 bytes): the address of the beneficiary to whom the mining rewards were given. + * `difficulty` (string; quantity): the difficulty for this block. + * `totalDifficulty` (string; quantity): the total difficulty of the chain until this block. + * `extraData` (string; data): the **extra data** field of this block. + * `size` (string; quantity): the size of this block in bytes. + * `gasLimit` (string; quantity): the maximum gas allowed in this block. + * `gasUsed` (string; quantity): the total used gas by all transactions in this block. + * `timestamp` (string; quantity): the unix timestamp for when the block was collated. + * `transactions` (array of strings): an array of transaction objects, or 32 bytes transaction hashes depending on the last given parameter. + * `uncles` (array of strings): an array of uncle hashes. + +### Request example + +```shell +curl -X POST https://rpc.ankr.com/botanix_testnet \ +-H 'Content-Type: application/json' \ +-d '{ + "jsonrpc": "2.0", + "method": "eth_getUncleByBlockNumberAndIndex", + "params": ["latest", "0x0"], + "id": 1 + }' +``` + +### Response example + +```json +{ + "id": 1, + "jsonrpc": "2.0", + "result": null +} +``` + +--- + +## `eth_getLogs` + +> Returns an array of all logs matching a given filter object. + +### Parameters +
+ + * `id` (integer; required): a request ID (example: 1). + * `jsonrpc` (string; required): a JSON RPC spec used (example: 2.0). + * `method` (string; required): a method used for the request. + * `params` (array; required): + + 1. `object`: the filter options: + + * `fromBlock` (string; quantity|tag; optional; default: "latest"): either the _block number_ or one of the following _block tags_: + + * `latest`: for the last mined block. + * `earliest`: for the lowest numbered block available on the client. + * `pending`: for not yet mined transactions. + + * `toBlock` (string; quantity|tag; optional; default: "latest"): either the _block number_ or one of the following _block tags_: + + * `latest`: for the last mined block. + * `earliest`: for the lowest numbered block available on the client. + * `pending`: for not yet mined transactions. + + * `address` (array of strings; data, 20 bytes; optional): a contract address or a list of addresses from which logs should originate. + * `topics` (array of strings; data; optional): an array of 32 bytes data topics. Topics are order-dependent. Each topic can also be an array of data with "or" options. + * `blockhash` (string; data, 32 bytes; optional; **future**): with the addition of EIP-234, `blockHash` will be a new filter option which restricts the logs returned to the single block with the 32-byte hash blockHash. Using blockHash is equivalent to `fromBlock = toBlock = the block` number with hash blockHash. If `blockHash` is present in the filter criteria, then neither `fromBlock` nor `toBlock` are allowed. + +### Returns +
+ + * `removed` (string; tag): `true` when the log was removed, due to a chain reorganization; `false` if it's a valid log. + * `logIndex` (string; quantity): the log index position in the block; null when it's a pending log. + * `transactionIndex` (string; quantity): the transactions index position log was created from; null when it's a pending log. + * `transactionHash` (string; data, 32 bytes): a hash of the transactions this log was created from; null when it's a pending log. + * `blockHash` (string; data, 32 bytes): a hash of the block containing the log; null when it's pending; null when it's a pending log. + * `blockNumber` (string; quantity): the number of the block containing the log; null when it's pending; null when it's a pending log. + * `address` (string; data, 20 bytes): an address from which this log originated. + * `data` (string; data): contains one or more 32 bytes non-indexed arguments of the log. + * `topics` (array of strings; data): an array of 0 to 4 32 bytes data of indexed log arguments. (In solidity: The first topic is the hash of the signature of the event (e.g. Deposit(address,bytes32,uint256)), except you declared the event with the anonymous specifier.) + +### Request example + +```shell +curl -X POST https://rpc.ankr.com/botanix_testnet \ +-H 'Content-Type: application/json' \ +-d '{ + "jsonrpc": "2.0", + "method": "eth_getLogs", + "params": [ + { + "fromBlock": "0x10", + "toBlock": "0x2710", + "address": "0x5B38Da6a701c568545dCfcB03FcB875f56beddC4" + } + ], + "id": 1 +}' +``` + +### Response example + +```json +{ + "jsonrpc": "2.0", + "id": 1, + "result": [] +} +``` + diff --git a/pages/rpc-service/chains/chains-api/gnosis.mdx b/pages/rpc-service/chains/chains-api/gnosis.mdx index 2f3d321ef..d487181fb 100644 --- a/pages/rpc-service/chains/chains-api/gnosis.mdx +++ b/pages/rpc-service/chains/chains-api/gnosis.mdx @@ -64,7 +64,7 @@ The API interaction follows the [JSON-RPC](https://www.jsonrpc.org/specification * `id` (integer; required): a request ID (example: 1). * `jsonrpc` (string; required): a JSON RPC spec used (example: 2.0). * `method` (string; required): a method used for the request. - * `params` (array; required): None. + * `params` (array; required): none. ### Returns
@@ -150,7 +150,7 @@ curl -X POST https://rpc.ankr.com/gnosis \ * `id` (integer; required): a request ID (example: 1). * `jsonrpc` (string; required): a JSON RPC spec used (example: 2.0). * `method` (string; required): a method used for the request. - * `params` (array; required): None. + * `params` (array; required): none. ### Returns
@@ -192,7 +192,7 @@ curl -X POST https://rpc.ankr.com/gnosis \ * `id` (integer; required): a request ID (example: 1). * `jsonrpc` (string; required): a JSON RPC spec used (example: 2.0). * `method` (string; required): a method used for the request. - * `params` (array; required): None. + * `params` (array; required): none. ### Returns
@@ -234,7 +234,7 @@ curl -X POST https://rpc.ankr.com/gnosis \ * `id` (integer; required): a request ID (example: 1). * `jsonrpc` (string; required): a JSON RPC spec used (example: 2.0). * `method` (string; required): a method used for the request. - * `params` (array; required): None. + * `params` (array; required): none. ### Returns
@@ -276,7 +276,7 @@ curl -X POST https://rpc.ankr.com/gnosis \ * `id` (integer; required): a request ID (example: 1). * `jsonrpc` (string; required): a JSON RPC spec used (example: 2.0). * `method` (string; required): a method used for the request. - * `params` (array; required): None. + * `params` (array; required): none. ### Returns
@@ -335,7 +335,7 @@ curl -X POST https://rpc.ankr.com/gnosis \ * `id` (integer; required): a request ID (example: 1). * `jsonrpc` (string; required): a JSON RPC spec used (example: 2.0). * `method` (string; required): a method used for the request. - * `params` (array; required): None. + * `params` (array; required): none. ### Returns
@@ -377,7 +377,7 @@ curl -X POST https://rpc.ankr.com/gnosis \ * `id` (integer; required): a request ID (example: 1). * `jsonrpc` (string; required): a JSON RPC spec used (example: 2.0). * `method` (string; required): a method used for the request. - * `params` (array; required): None. + * `params` (array; required): none. ### Returns
@@ -421,7 +421,7 @@ curl -X POST https://rpc.ankr.com/gnosis \ * `id` (integer; required): a request ID (example: 1). * `jsonrpc` (string; required): a JSON RPC spec used (example: 2.0). * `method` (string; required): a method used for the request. - * `params` (array; required): None. + * `params` (array; required): none. ### Returns
@@ -711,7 +711,7 @@ curl -X POST https://rpc.ankr.com/gnosis \ * `method` (string; required): a method used for the request. * `params` (array; required): - 1. `` (data, 32 bytes): a block's hash. + 1. `` (data, 32 bytes): a block hash. ### Returns
@@ -1016,7 +1016,7 @@ curl -X POST https://rpc.ankr.com/gnosis \ * `method` (string; required): a method used for the request. * `params` (array; required): - 1. `` (data, 32 bytes): the block's hash. + 1. `` (data, 32 bytes): the block hash. 2. ``: if `true` it returns the full transaction objects, if `false` — only the hashes of the transactions. ### Returns diff --git a/pages/rpc-service/chains/chains-api/klaytn.mdx b/pages/rpc-service/chains/chains-api/kaia.mdx similarity index 82% rename from pages/rpc-service/chains/chains-api/klaytn.mdx rename to pages/rpc-service/chains/chains-api/kaia.mdx index a4e7e803f..2650f4a84 100644 --- a/pages/rpc-service/chains/chains-api/klaytn.mdx +++ b/pages/rpc-service/chains/chains-api/kaia.mdx @@ -1,63 +1,55 @@ import { Callout } from "components"; -# Klaytn -
- - +# Kaia -> Klaytn API is available on [Web3 API platform](https://www.ankr.com/rpc/klaytn). +> Kaia API is available on [Web3 API platform](https://www.ankr.com/rpc/kaia). -*Klaytn* is a highly optimized, BFT-based public blockchain that aims to meet the enterprise-grade reliability. +*Kaia* is an EVM-compatible Layer 1 public blockchain designed to bring Web3 services to millions of users across Asia. Formed through the merger of the Klaytn and Finschia blockchains — initially developed by Kakao and LINE respectively — Kaia aims to integrate a broad user base with vast on-chain assets and technology to help builders promptly implement and expand their ideas with successful results. -Klaytn launched its mainnet, Cypress, on Jun/27/2019 with the following specification: +Key Features of Kaia: - * 1-second block generation and confirmation time. - * 4,000 transactions per second. - * Low gas price that is almost 1/10 of Ethereum. - * Runs EVM (Ethereum Virtual Machine) and supports the execution of Solidity contracts. - * 19 reputable corporations worldwide initially formed Klaytn Governance Council to operate consensus nodes. The current number of consensus nodes is shown in the [Klaytnscope](https://scope.klaytn.com/). - * More than 50 initial service partners have committed to launch Blockchain Applications on Klaytn. + * **High Performance**: Kaia achieves immediate transaction finality with a 1-second block time, processing approximately 4,000 transactions per second. + * **User Accessibility**: By integrating with popular messaging apps like KakaoTalk and LINE, Kaia provides easy access to existing Web2 users, facilitating seamless onboarding to Web3 services. + * **Developer-Friendly Environment**: Kaia offers EVM equivalence, allowing developers to deploy existing Ethereum-based applications with minimal modifications. Planned support for CosmWasm and integration with industry-leading cross-chain bridges provide developers with unparalleled flexibility. + * **Scalability**: The network's modular architecture supports customizable and easily deployable service chains as Layer 2 solutions, enhancing scalability for high-throughput services. + * **Governance**: Kaia implements an on-chain governance system designed to be fair and inclusive, with voting rights proportional to the amount of KAIA tokens staked. -In order for your Web3 application to interact with Klaytn — either by reading blockchain data or sending transactions to the network — it must connect to a Klaytn node. Developers interact with the blockchain using the methods provided by the API. +In order for your Web3 application to interact with Kaia — either by reading blockchain data or sending transactions to the network — it must connect to a Kaia node. Developers interact with the blockchain using the methods provided by the API. The API interaction follows the [JSON-RPC](https://www.jsonrpc.org/specification) which is a stateless, light-weight remote procedure call (RPC) protocol. It defines several data structures and the rules around their processing. It is transport agnostic in that the concepts can be used within the same process, over sockets, over HTTP, or in other message-passing environments. It uses JSON (RFC 4627) as data format. --- -## Klaytn native methods (under construction) - ---- - ## EVM Methods
- * [`web3_clientVersion`](/rpc-service/chains/chains-api/klaytn/#web3_clientversion) — returns the current client version. - * [`web3_sha3`](/rpc-service/chains/chains-api/klaytn/#web3_sha3) — returns Keccak-256 (not the standardized SHA3-256) of the given data. - * [`net_version`](/rpc-service/chains/chains-api/klaytn/#net_version) — returns the current network ID. - * [`eth_syncing`](/rpc-service/chains/chains-api/klaytn/#eth_syncing) — returns data on the sync status or false. - * [`eth_gasPrice`](/rpc-service/chains/chains-api/klaytn/#eth_gasprice) — returns the current price per gas in wei. - * [`eth_accounts`](/rpc-service/chains/chains-api/klaytn/#eth_accounts) — returns a list of addresses owned by client. - * [`eth_blockNumber`](/rpc-service/chains/chains-api/klaytn/#eth_blocknumber) — returns the number of most recent block. - * [`eth_getBalance`](/rpc-service/chains/chains-api/klaytn/#eth_getbalance) — returns the balance of the account specified by address. - * [`eth_getStorageAt`](/rpc-service/chains/chains-api/klaytn/#eth_getstorageat) — returns the value from a storage position at an address specified. - * [`eth_getTransactionCount`](/rpc-service/chains/chains-api/klaytn/#eth_gettransactioncount) — returns the number of transactions sent from an address. - * [`eth_getBlockTransactionCountByHash`](/rpc-service/chains/chains-api/klaytn/#eth_getblocktransactioncountbyhash) — returns the number of transactions in a block specified by block hash. - * [`eth_getBlockTransactionCountByNumber`](/rpc-service/chains/chains-api/klaytn/#eth_getblocktransactioncountbynumber) — returns the number of transactions in the block specified by number. - * [`eth_getUncleCountByBlockHash`](/rpc-service/chains/chains-api/klaytn/#eth_getunclecountbyblockhash) — returns the number of uncles in a block specified by block hash. - * [`eth_getUncleCountByBlockNumber`](/rpc-service/chains/chains-api/klaytn/#eth_getunclecountbyblocknumber) — returns the number of uncles in a block specified by block number. - * [`eth_getCode`](/rpc-service/chains/chains-api/klaytn/#eth_getcode) — returns code at an address specified. - * [`eth_sendRawTransaction`](/rpc-service/chains/chains-api/klaytn/#eth_sendrawtransaction) — creates a new message call transaction or a contract creation for signed transactions. - * [`eth_call`](/rpc-service/chains/chains-api/klaytn/#eth_call) — executes a new message call immediately without creating a transaction on the blockchain. - * [`eth_estimateGas`](/rpc-service/chains/chains-api/klaytn/#eth_estimategas) — generates and returns an estimate of how much gas is necessary to allow the transaction to complete. - * [`eth_getBlockByHash`](/rpc-service/chains/chains-api/klaytn/#eth_getblockbyhash) — returns information for the block specified by block hash. - * [`eth_getBlockByNumber`](/rpc-service/chains/chains-api/klaytn/#eth_getblockbynumber) — returns information for the block specified by block number. - * [`eth_getTransactionByHash`](/rpc-service/chains/chains-api/klaytn/#eth_gettransactionbyhash) — returns information on a transaction specified by transaction hash. - * [`eth_getTransactionByBlockHashAndIndex`](/rpc-service/chains/chains-api/klaytn/#eth_gettransactionbyblockhashandindex) — returns information on a transaction specified by block hash and transaction index position. - * [`eth_getTransactionByBlockNumberAndIndex`](/rpc-service/chains/chains-api/klaytn/#eth_gettransactionbyblocknumberandindex) — returns information on a transaction by block number and transaction index position. - * [`eth_getTransactionReceipt`](/rpc-service/chains/chains-api/klaytn/#eth_gettransactionreceipt) — returns the receipt of a transaction by transaction hash. - * [`eth_getUncleByBlockHashAndIndex`](/rpc-service/chains/chains-api/klaytn/#eth_getunclebyblockhashandindex) — returns information about an uncle of a block by hash and uncle index position. - * [`eth_getUncleByBlockNumberAndIndex`](/rpc-service/chains/chains-api/klaytn/#eth_getunclebyblocknumberandindex) — returns information about an uncle of a block by number and uncle index position. - * [`eth_getLogs`](/rpc-service/chains/chains-api/klaytn/#eth_getlogs) — returns logs matching the parameters specified. + * [`web3_clientVersion`](/rpc-service/chains/chains-api/kaia/#web3_clientversion) — returns the current client version. + * [`web3_sha3`](/rpc-service/chains/chains-api/kaia/#web3_sha3) — returns Keccak-256 (not the standardized SHA3-256) of the given data. + * [`net_version`](/rpc-service/chains/chains-api/kaia/#net_version) — returns the current network ID. + * [`eth_syncing`](/rpc-service/chains/chains-api/kaia/#eth_syncing) — returns data on the sync status or false. + * [`eth_gasPrice`](/rpc-service/chains/chains-api/kaia/#eth_gasprice) — returns the current price per gas in wei. + * [`eth_accounts`](/rpc-service/chains/chains-api/kaia/#eth_accounts) — returns a list of addresses owned by client. + * [`eth_blockNumber`](/rpc-service/chains/chains-api/kaia/#eth_blocknumber) — returns the number of most recent block. + * [`eth_getBalance`](/rpc-service/chains/chains-api/kaia/#eth_getbalance) — returns the balance of the account specified by address. + * [`eth_getStorageAt`](/rpc-service/chains/chains-api/kaia/#eth_getstorageat) — returns the value from a storage position at an address specified. + * [`eth_getTransactionCount`](/rpc-service/chains/chains-api/kaia/#eth_gettransactioncount) — returns the number of transactions sent from an address. + * [`eth_getBlockTransactionCountByHash`](/rpc-service/chains/chains-api/kaia/#eth_getblocktransactioncountbyhash) — returns the number of transactions in a block specified by block hash. + * [`eth_getBlockTransactionCountByNumber`](/rpc-service/chains/chains-api/kaia/#eth_getblocktransactioncountbynumber) — returns the number of transactions in the block specified by number. + * [`eth_getUncleCountByBlockHash`](/rpc-service/chains/chains-api/kaia/#eth_getunclecountbyblockhash) — returns the number of uncles in a block specified by block hash. + * [`eth_getUncleCountByBlockNumber`](/rpc-service/chains/chains-api/kaia/#eth_getunclecountbyblocknumber) — returns the number of uncles in a block specified by block number. + * [`eth_getCode`](/rpc-service/chains/chains-api/kaia/#eth_getcode) — returns code at an address specified. + * [`eth_sendRawTransaction`](/rpc-service/chains/chains-api/kaia/#eth_sendrawtransaction) — creates a new message call transaction or a contract creation for signed transactions. + * [`eth_call`](/rpc-service/chains/chains-api/kaia/#eth_call) — executes a new message call immediately without creating a transaction on the blockchain. + * [`eth_estimateGas`](/rpc-service/chains/chains-api/kaia/#eth_estimategas) — generates and returns an estimate of how much gas is necessary to allow the transaction to complete. + * [`eth_getBlockByHash`](/rpc-service/chains/chains-api/kaia/#eth_getblockbyhash) — returns information for the block specified by block hash. + * [`eth_getBlockByNumber`](/rpc-service/chains/chains-api/kaia/#eth_getblockbynumber) — returns information for the block specified by block number. + * [`eth_getTransactionByHash`](/rpc-service/chains/chains-api/kaia/#eth_gettransactionbyhash) — returns information on a transaction specified by transaction hash. + * [`eth_getTransactionByBlockHashAndIndex`](/rpc-service/chains/chains-api/kaia/#eth_gettransactionbyblockhashandindex) — returns information on a transaction specified by block hash and transaction index position. + * [`eth_getTransactionByBlockNumberAndIndex`](/rpc-service/chains/chains-api/kaia/#eth_gettransactionbyblocknumberandindex) — returns information on a transaction by block number and transaction index position. + * [`eth_getTransactionReceipt`](/rpc-service/chains/chains-api/kaia/#eth_gettransactionreceipt) — returns the receipt of a transaction by transaction hash. + * [`eth_getUncleByBlockHashAndIndex`](/rpc-service/chains/chains-api/kaia/#eth_getunclebyblockhashandindex) — returns information about an uncle of a block by hash and uncle index position. + * [`eth_getUncleByBlockNumberAndIndex`](/rpc-service/chains/chains-api/kaia/#eth_getunclebyblocknumberandindex) — returns information about an uncle of a block by number and uncle index position. + * [`eth_getLogs`](/rpc-service/chains/chains-api/kaia/#eth_getlogs) — returns logs matching the parameters specified. --- @@ -71,7 +63,7 @@ The API interaction follows the [JSON-RPC](https://www.jsonrpc.org/specification * `id` (integer; required): a request ID (example: 1). * `jsonrpc` (string; required): a JSON RPC spec used (example: 2.0). * `method` (string; required): a method used for the request. - * `params` (array; required): None. + * `params` (array; required): none. ### Returns
@@ -81,7 +73,7 @@ The API interaction follows the [JSON-RPC](https://www.jsonrpc.org/specification ### Request example ```shell -curl -X POST https://rpc.ankr.com/klaytn \ +curl -X POST https://rpc.ankr.com/kaia \ -H 'Content-Type: application/json' \ -d '{ "jsonrpc": "2.0", @@ -97,7 +89,7 @@ curl -X POST https://rpc.ankr.com/klaytn \ { "jsonrpc": "2.0", "id": 1, - "result": "Klaytn/v1.10.1/linux-amd64/go1.15.7" + "result": "Klaytn/v1.0.3/linux-amd64/go1.22.1" } ``` @@ -125,7 +117,7 @@ curl -X POST https://rpc.ankr.com/klaytn \ ### Request example ```shell -curl -X POST https://rpc.ankr.com/klaytn \ +curl -X POST https://rpc.ankr.com/kaia \ -H 'Content-Type: application/json' \ -d '{ "jsonrpc": "2.0", @@ -157,7 +149,7 @@ curl -X POST https://rpc.ankr.com/klaytn \ * `id` (integer; required): a request ID (example: 1). * `jsonrpc` (string; required): a JSON RPC spec used (example: 2.0). * `method` (string; required): a method used for the request. - * `params` (array; required): None. + * `params` (array; required): none. ### Returns
@@ -167,7 +159,7 @@ curl -X POST https://rpc.ankr.com/klaytn \ ### Request example ```shell -curl -X POST https://rpc.ankr.com/klaytn \ +curl -X POST https://rpc.ankr.com/kaia \ -H 'Content-Type: application/json' \ -d '{ "jsonrpc": "2.0", @@ -199,7 +191,7 @@ curl -X POST https://rpc.ankr.com/klaytn \ * `id` (integer; required): a request ID (example: 1). * `jsonrpc` (string; required): a JSON RPC spec used (example: 2.0). * `method` (string; required): a method used for the request. - * `params` (array; required): None. + * `params` (array; required): none. ### Returns
@@ -212,7 +204,7 @@ curl -X POST https://rpc.ankr.com/klaytn \ ### Request example ```shell -curl -X POST https://rpc.ankr.com/klaytn \ +curl -X POST https://rpc.ankr.com/kaia \ -H 'Content-Type: application/json' \ -d '{ "jsonrpc": "2.0", @@ -222,21 +214,7 @@ curl -X POST https://rpc.ankr.com/klaytn \ }' ``` -### Response example (syncing) - -```json -{ - "id": 1, - "jsonrpc": "2.0", - "result": { - "startingBlock": "0x384", - "currentBlock": "0x386", - "highestBlock": "0x454" - } -} -``` - -### Response example (not syncing) +### Response example ```json { @@ -258,7 +236,7 @@ curl -X POST https://rpc.ankr.com/klaytn \ * `id` (integer; required): a request ID (example: 1). * `jsonrpc` (string; required): a JSON RPC spec used (example: 2.0). * `method` (string; required): a method used for the request. - * `params` (array; required): None. + * `params` (array; required): none. ### Returns
@@ -268,7 +246,7 @@ curl -X POST https://rpc.ankr.com/klaytn \ ### Request example ```shell -curl -X POST https://rpc.ankr.com/klaytn \ +curl -X POST https://rpc.ankr.com/kaia \ -H 'Content-Type: application/json' \ -d '{ "jsonrpc": "2.0", @@ -284,7 +262,7 @@ curl -X POST https://rpc.ankr.com/klaytn \ { "jsonrpc": "2.0", "id": 1, - "result": "0xba43b7400" + "result": "0x66720b300" } ``` @@ -300,7 +278,7 @@ curl -X POST https://rpc.ankr.com/klaytn \ * `id` (integer; required): a request ID (example: 1). * `jsonrpc` (string; required): a JSON RPC spec used (example: 2.0). * `method` (string; required): a method used for the request. - * `params` (array): None. + * `params` (array): none. ### Returns
@@ -310,7 +288,7 @@ curl -X POST https://rpc.ankr.com/klaytn \ ### Request example ```shell -curl -X POST https://rpc.ankr.com/klaytn \ +curl -X POST https://rpc.ankr.com/kaia \ -H 'Content-Type: application/json' \ -d '{ "jsonrpc": "2.0", @@ -327,7 +305,7 @@ curl -X POST https://rpc.ankr.com/klaytn \ "id": 1, "jsonrpc": "2.0", "result": [ - "0x407d73d8a49eeb85d32cf465507dd71d507100c1" + "0xbfd7dd5ea8f7407c17965d4678327468001c3e9c" ] } ``` @@ -344,7 +322,7 @@ curl -X POST https://rpc.ankr.com/klaytn \ * `id` (integer; required): a request ID (example: 1). * `jsonrpc` (string; required): a JSON RPC spec used (example: 2.0). * `method` (string; required): a method used for the request. - * `params` (array; required): None. + * `params` (array; required): none. ### Returns
@@ -354,7 +332,7 @@ curl -X POST https://rpc.ankr.com/klaytn \ ### Request example ```shell -curl -X POST https://rpc.ankr.com/klaytn \ +curl -X POST https://rpc.ankr.com/kaia \ -H 'Content-Type: application/json' \ -d '{ "jsonrpc": "2.0", @@ -370,7 +348,7 @@ curl -X POST https://rpc.ankr.com/klaytn \ { "jsonrpc": "2.0", "id": 1, - "result": "0x6d28a01" + "result": "0xa3c77ee" } ``` @@ -404,7 +382,7 @@ curl -X POST https://rpc.ankr.com/klaytn \ ### Request example ```shell -curl -X POST https://rpc.ankr.com/klaytn \ +curl -X POST https://rpc.ankr.com/kaia \ -H 'Content-Type: application/json' \ -d '{ "jsonrpc": "2.0", @@ -420,7 +398,7 @@ curl -X POST https://rpc.ankr.com/klaytn \ { "jsonrpc": "2.0", "id": 1, - "result": "0x6f861f920892c0647a" + "result": "0x4f11f44d83e358f1f1" } ``` @@ -456,7 +434,7 @@ curl -X POST https://rpc.ankr.com/klaytn \ ### Request example ```shell -curl -X POST https://rpc.ankr.com/klaytn \ +curl -X POST https://rpc.ankr.com/kaia \ -H 'Content-Type: application/json' \ -d '{ "jsonrpc": "2.0", @@ -507,7 +485,7 @@ curl -X POST https://rpc.ankr.com/klaytn \ ### Request example ```shell -curl -X POST https://rpc.ankr.com/klaytn \ +curl -X POST https://rpc.ankr.com/kaia \ -H 'Content-Type: application/json' \ -d '{ "jsonrpc": "2.0", @@ -523,7 +501,7 @@ curl -X POST https://rpc.ankr.com/klaytn \ { "jsonrpc": "2.0", "id": 1, - "result": "0x9" + "result": "0x0" } ``` @@ -551,12 +529,12 @@ curl -X POST https://rpc.ankr.com/klaytn \ ### Request example: ```shell -curl -X POST https://rpc.ankr.com/klaytn \ +curl -X POST https://rpc.ankr.com/kaia \ -H 'Content-Type: application/json' \ -d '{ "jsonrpc": "2.0", "method": "eth_getBlockTransactionCountByHash", - "params": ["0x829df9bb801fc0494abf2f443423a49ffa32964554db71b098d332d87b70a48b"], + "params": ["0x8e19dc520cc1fd908c95f0c7a15fb3b48feda7051cb01bcfd094348e34ba2be8"], "id": 1 }' ``` @@ -567,7 +545,7 @@ curl -X POST https://rpc.ankr.com/klaytn \ { "jsonrpc": "2.0", "id": 1, - "result": "0x7b" + "result": "0x16" } ``` @@ -600,12 +578,12 @@ curl -X POST https://rpc.ankr.com/klaytn \ ### Request example ```shell -curl -X POST https://rpc.ankr.com/klaytn \ +curl -X POST https://rpc.ankr.com/kaia \ -H 'Content-Type: application/json' \ -d '{ "jsonrpc": "2.0", "method": "eth_getBlockTransactionCountByNumber", - "params": ["0x36c1d18"], + "params": ["0xA3C7A17"], "id": 1 }' ``` @@ -616,7 +594,7 @@ curl -X POST https://rpc.ankr.com/klaytn \ { "jsonrpc": "2.0", "id": 1, - "result": "0x2" + "result": "0x16" } ``` @@ -634,7 +612,7 @@ curl -X POST https://rpc.ankr.com/klaytn \ * `method` (string; required): a method used for the request. * `params` (array; required): - 1. `` (data, 32 bytes): a block's hash. + 1. `` (data, 32 bytes): a block hash. ### Returns
@@ -644,12 +622,12 @@ curl -X POST https://rpc.ankr.com/klaytn \ ### Request example ```shell -curl -X POST https://rpc.ankr.com/klaytn \ +curl -X POST https://rpc.ankr.com/kaia \ -H 'Content-Type: application/json' \ -d '{ "jsonrpc": "2.0", "method": "eth_getUncleCountByBlockHash", - "params": ["0xf1230a5bd7da128695c63cacc449aa25501d5cb164d710863a0a7a3512e78749"], + "params": ["0x8e19dc520cc1fd908c95f0c7a15fb3b48feda7051cb01bcfd094348e34ba2be8"], "id": 1 }' ``` @@ -693,12 +671,12 @@ curl -X POST https://rpc.ankr.com/klaytn \ ### Request example ```shell -curl -X POST https://rpc.ankr.com/klaytn \ +curl -X POST https://rpc.ankr.com/kaia \ -H 'Content-Type: application/json' \ -d '{ "jsonrpc": "2.0", "method": "eth_getUncleCountByBlockNumber", - "params": ["0xc5043f"], + "params": ["0xA3C7A17"], "id": 1 }' ``` @@ -743,12 +721,12 @@ curl -X POST https://rpc.ankr.com/klaytn \ ### Request example ```shell -curl -X POST https://rpc.ankr.com/klaytn \ +curl -X POST https://rpc.ankr.com/kaia \ -H 'Content-Type: application/json' \ -d '{ "jsonrpc": "2.0", "method": "eth_getCode", - "params": ["0xd5ae677feed771de3c08524364a1895ce21e220e", "latest"], + "params": ["0x7f5923e9c58d759a446705bcfe2493b10788f4c7", "latest"], "id": 1 }' ``` @@ -784,17 +762,17 @@ curl -X POST https://rpc.ankr.com/klaytn \ * `` (data, 32 bytes): the transaction hash, or the zero hash if the transaction is not yet available. -Use [eth_getTransactionReceipt](/rpc-service/chains/chains-api/klaytn/#eth_gettransactionreceipt) to get the contract address, after the transaction was mined, when you created a contract. +Use [eth_getTransactionReceipt](/rpc-service/chains/chains-api/kaia/#eth_gettransactionreceipt) to get the contract address, after the transaction was mined, when you created a contract. ### Request example ```shell -curl -X POST https://rpc.ankr.com/klaytn \ +curl -X POST https://rpc.ankr.com/kaia \ -H 'Content-Type: application/json' \ -d '{ "jsonrpc": "2.0", "method": "eth_sendRawTransaction", - "params": ["0xd46e8dd67c5d32be8d46e8dd67c5d32be8058bb8eb970870f072445675058bb8eb970870f072445675"], + "params": ["signed_transaction_data"], "id": 1 }' ``` @@ -846,12 +824,17 @@ curl -X POST https://rpc.ankr.com/klaytn \ ### Request example ```shell -curl -X POST https://rpc.ankr.com/klaytn \ +curl -X POST https://rpc.ankr.com/kaia \ -H 'Content-Type: application/json' \ -d '{ "jsonrpc": "2.0", "method": "eth_call", - "params": [{"from":null,"to":"0x6b175474e89094c44da98b954eedeac495271d0f","data":"0x70a082310000000000000000000000006E0d01A76C3Cf4288372a29124A26D4353EE51BE"}, "latest"], + "params": [ + { + "to": "0x7f5923e9c58d759a446705bcfe2493b10788f4c7" + }, + "latest" + ], "id": 1 }' ``` @@ -862,7 +845,7 @@ curl -X POST https://rpc.ankr.com/klaytn \ { "jsonrpc": "2.0", "id": 1, - "result": "0x0000000000000000000000000000000000000000000000000858898f93629000" + "result": "0x" } ``` @@ -905,12 +888,19 @@ The transaction will not be added to the blockchain. Note that the estimate may ### Request example ```shell -curl -X POST https://rpc.ankr.com/klaytn \ +curl -X POST https://rpc.ankr.com/kaia \ -H 'Content-Type: application/json' \ -d '{ "jsonrpc": "2.0", "method": "eth_estimateGas", - "params": [{"from":null,"to":"0x6b175474e89094c44da98b954eedeac495271d0f","data":"0x70a082310000000000000000000000006E0d01A76C3Cf4288372a29124A26D4353EE51BE"}, "latest"], + "params": [ + { + "from": null, + "to": "0x6b175474e89094c44da98b954eedeac495271d0f", + "data": "0x70a082310000000000000000000000006E0d01A76C3Cf4288372a29124A26D4353EE51BE" + }, + "latest" + ], "id": 1 }' ``` @@ -969,7 +959,7 @@ curl -X POST https://rpc.ankr.com/klaytn \ ### Request example ```shell -curl -X POST https://rpc.ankr.com/klaytn \ +curl -X POST https://rpc.ankr.com/kaia \ -H 'Content-Type: application/json' \ -d '{ "jsonrpc": "2.0", @@ -1064,7 +1054,7 @@ curl -X POST https://rpc.ankr.com/klaytn \ ### Request example ```shell -curl -X POST https://rpc.ankr.com/klaytn \ +curl -X POST https://rpc.ankr.com/kaia \ -H 'Content-Type: application/json' \ -d '{ "jsonrpc": "2.0", @@ -1161,7 +1151,7 @@ curl -X POST https://rpc.ankr.com/klaytn \ ### Request example ```shell -curl -X POST https://rpc.ankr.com/klaytn \ +curl -X POST https://rpc.ankr.com/kaia \ -H 'Content-Type: application/json' \ -d '{ "jsonrpc": "2.0", @@ -1235,7 +1225,7 @@ curl -X POST https://rpc.ankr.com/klaytn \ ### Request example ```shell -curl -X POST https://rpc.ankr.com/klaytn \ +curl -X POST https://rpc.ankr.com/kaia \ -H 'Content-Type: application/json' \ -d '{ "jsonrpc": "2.0", @@ -1314,7 +1304,7 @@ curl -X POST https://rpc.ankr.com/klaytn \ ### Request example ```shell -curl -X POST https://rpc.ankr.com/klaytn \ +curl -X POST https://rpc.ankr.com/kaia \ -H 'Content-Type: application/json' \ -d '{ "jsonrpc": "2.0", @@ -1393,7 +1383,7 @@ The receipt is not available for pending transactions. ### Request example ```shell -curl -X POST https://rpc.ankr.com/klaytn \ +curl -X POST https://rpc.ankr.com/kaia \ -H 'Content-Type: application/json' \ -d '{ "jsonrpc": "2.0", @@ -1488,7 +1478,7 @@ curl -X POST https://rpc.ankr.com/klaytn \ ### Request example ```shell -curl -X POST https://rpc.ankr.com/klaytn \ +curl -X POST https://rpc.ankr.com/kaia \ -H 'Content-Type: application/json' \ -d '{ "jsonrpc": "2.0", @@ -1502,30 +1492,9 @@ curl -X POST https://rpc.ankr.com/klaytn \ ```json { - "jsonrpc": "2.0", "id": 1, - "result": { - "difficulty": "0x4ea3f27bc", - "extraData": "0x476574682f4c5649562f76312e302e302f6c696e75782f676f312e342e32", - "gasLimit": "0x1388", - "gasUsed": "0x0", - "hash": "0xdc0818cf78f21a8e70579cb46a43643f78291264dda342ae31049421c82d21ae", - "logsBloom": "0x00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000", - "miner": "0xbb7b8287f3f0a933474a79eae42cbca977791171", - "mixHash": "0x4fffe9ae21f1c9e15207b1f472d5bbdd68c9595d461666602f2be20daf5e7843", - "nonce": "0x689056015818adbe", - "number": "0x1b4", - "parentHash": "0xe99e022112df268087ea7eafaf4790497fd21dbeeb6bd7a1721df161a6657a54", - "receiptsRoot": "0x56e81f171bcc55a6ff8345e692c0f86e5b48e01b996cadc001622fb5e363b421", - "sha3Uncles": "0x1dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347", - "size": "0x220", - "stateRoot": "0xddc8b0234c2e0cad087c8b389aa7ef01f7d79b2570bccb77ce48648aa61c904d", - "timestamp": "0x55ba467c", - "totalDifficulty": "0x78ed983323d", - "transactions": [], - "transactionsRoot": "0x56e81f171bcc55a6ff8345e692c0f86e5b48e01b996cadc001622fb5e363b421", - "uncles": [] - } + "jsonrpc": "2.0", + "result": null } ``` @@ -1578,7 +1547,7 @@ curl -X POST https://rpc.ankr.com/klaytn \ ### Request example ```shell -curl -X POST https://rpc.ankr.com/klaytn \ +curl -X POST https://rpc.ankr.com/kaia \ -H 'Content-Type: application/json' \ -d '{ "jsonrpc": "2.0", @@ -1592,30 +1561,9 @@ curl -X POST https://rpc.ankr.com/klaytn \ ```json { - "jsonrpc": "2.0", "id": 1, - "result": { - "difficulty": "0x57f117f5c", - "extraData": "0x476574682f76312e302e302f77696e646f77732f676f312e342e32", - "gasLimit": "0x1388", - "gasUsed": "0x0", - "hash": "0x932bdf904546a2287a2c9b2ede37925f698a7657484b172d4e5184f80bdd464d", - "logsBloom": "0x00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000", - "miner": "0x5bf5e9cf9b456d6591073513de7fd69a9bef04bc", - "mixHash": "0x4500aa4ee2b3044a155252e35273770edeb2ab6f8cb19ca8e732771484462169", - "nonce": "0x24732773618192ac", - "number": "0x299", - "parentHash": "0xa779859b1ee558258b7008bbabff272280136c5dd3eb3ea3bfa8f6ae03bf91e5", - "receiptsRoot": "0x56e81f171bcc55a6ff8345e692c0f86e5b48e01b996cadc001622fb5e363b421", - "sha3Uncles": "0x1dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347", - "size": "0x21d", - "stateRoot": "0x2604fbf5183f5360da249b51f1b9f1e0f315d2ff3ffa1a4143ff221ad9ca1fec", - "timestamp": "0x55ba4827", - "totalDifficulty": "0xc46826a2c6a", - "transactions": [], - "transactionsRoot": "0x56e81f171bcc55a6ff8345e692c0f86e5b48e01b996cadc001622fb5e363b421", - "uncles": [] - } + "jsonrpc": "2.0", + "result": null } ``` @@ -1667,7 +1615,7 @@ curl -X POST https://rpc.ankr.com/klaytn \ ### Request example ```shell -curl -X POST https://rpc.ankr.com/klaytn \ +curl -X POST https://rpc.ankr.com/kaia \ -H 'Content-Type: application/json' \ -d '{ "jsonrpc": "2.0", @@ -1683,37 +1631,6 @@ curl -X POST https://rpc.ankr.com/klaytn \ { "jsonrpc": "2.0", "id": 1, - "result": [ - { - "address": "0xdac17f958d2ee523a2206206994597c13d831ec7", - "topics": [ - "0xddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef", - "0x0000000000000000000000009acbb72cf67103a30333a32cd203459c6a9c3311", - "0x000000000000000000000000994871e1103c5da4be270365fa62771ea4525520" - ], - "data": "0x000000000000000000000000000000000000000000000000000000001ec39aa0", - "blockNumber": "0xf6289d", - "transactionHash": "0xc7ed73c9b219d4243872e5993ad2950c8ea87d15af28562d33b0c05d46a90cee", - "transactionIndex": "0x1e", - "blockHash": "0x1e12377f0357320c0e5cfcadc2dfbc9c75fc339be668e118c34e4333f835ef31", - "logIndex": "0x13", - "removed": false - }, - { - "address": "0xdac17f958d2ee523a2206206994597c13d831ec7", - "topics": [ - "0xddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef", - "0x0000000000000000000000005879975799597392c031f10b6eff282cb7974ac8", - "0x0000000000000000000000006d52ab66340f3f78d0c1007bec484268876b5948" - ], - "data": "0x0000000000000000000000000000000000000000000000000000000000000000", - "blockNumber": "0xf6289d", - "transactionHash": "0x0118499f7be4c3510bd60fe3a3aee5f5f316743b6cc13a8cb0528d784f962aec", - "transactionIndex": "0x20", - "blockHash": "0x1e12377f0357320c0e5cfcadc2dfbc9c75fc339be668e118c34e4333f835ef31", - "logIndex": "0x14", - "removed": false - } - ] + "result": [] } ``` diff --git a/pages/rpc-service/chains/chains-list.mdx b/pages/rpc-service/chains/chains-list.mdx index a3c8fc964..9fec8f88f 100644 --- a/pages/rpc-service/chains/chains-list.mdx +++ b/pages/rpc-service/chains/chains-list.mdx @@ -22,17 +22,17 @@ Find the chain you require and go to its docs section by clicking it. | | | | | | | |-----------------------------------------------------------------------|-------------------------------------------------------|----------------------------------------------------------------|-------------------------------------------------------|-------------------------------------------------------------------|---------------------------------------------------------| -| [Allora](/rpc-service/chains/chains-list/#allora) | [Bitlayer](/rpc-service/chains/chains-list/#bitlayer) | [Filecoin](/rpc-service/chains/chains-list/#filecoin) | [Kinto](/rpc-service/chains/chains-list/#kinto) | [Polygon](/rpc-service/chains/chains-list/#polygon) | [Taiko](/rpc-service/chains/chains-list/#taiko) | -| [Aptos](/rpc-service/chains/chains-list/#aptos) | [BitTorrent Chain](/rpc-service/chains/chains-list/#bittorrent-chain) | [Flare](/rpc-service/chains/chains-list/#flare) | [Klaytn](/rpc-service/chains/chains-list/#klaytn) | [Polygon zkEVM](/rpc-service/chains/chains-list/#polygon-zkevm) | [Telos](/rpc-service/chains/chains-list/#telos) | -| [Arbitrum](/rpc-service/chains/chains-list/#arbitrum) | [Blast](/rpc-service/chains/chains-list/#blast) | [Gnosis](/rpc-service/chains/chains-list/#gnosis) | [Kusama](/rpc-service/chains/chains-list/#kusama) | [Rollux](/rpc-service/chains/chains-list/#rollux) | [Tenet](/rpc-service/chains/chains-list/#tenet) | -| [Arbitrum Nova](/rpc-service/chains/chains-list/#arbitrum-nova) | [BNB Smart Chain](/rpc-service/chains/chains-list/#bnb-smart-chain) | [Gnosis Beacon](/rpc-service/chains/chains-list/#gnosis-beacon) | [Linea](/rpc-service/chains/chains-list/#linea) | [Scroll](/rpc-service/chains/chains-list/#scroll) | [TON](/rpc-service/chains/chains-list/#ton) | -| [Atleta](/rpc-service/chains/chains-list/#atleta) | [Celo](/rpc-service/chains/chains-list/#celo) | [GOAT](/rpc-service/chains/chains-list/#goat) | [Mantle](/rpc-service/chains/chains-list/#mantle) | [Secret Network](/rpc-service/chains/chains-list/#secret-network) | [TRON](/rpc-service/chains/chains-list/#tron) | -| [Avail](/rpc-service/chains/chains-list/#avail) | [Chiliz](/rpc-service/chains/chains-list/#chiliz) | [Gravity](/rpc-service/chains/chains-list/#gravity) | [Metis](/rpc-service/chains/chains-list/#metis) | [Sei](/rpc-service/chains/chains-list/#sei) | [Xai](/rpc-service/chains/chains-list/#xai) | -| [Avalanche](/rpc-service/chains/chains-list/#avalanche) | [Core](/rpc-service/chains/chains-list/#core) | [Harmony](/rpc-service/chains/chains-list/#harmony) | [Moonbeam](/rpc-service/chains/chains-list/#moonbeam) | [Solana](/rpc-service/chains/chains-list/#solana) | [XDC](/rpc-service/chains/chains-list/#xdc) | -| [B2 Network](/rpc-service/chains/chains-list/#b2-network) | [Electroneum](/rpc-service/chains/chains-list/#electroneum) | [HECO Chain](/rpc-service/chains/chains-list/#huobi-eco-chain) | [NEAR](/rpc-service/chains/chains-list/#near) | [Stellar](/rpc-service/chains/chains-list/#stellar) | [X Layer](/rpc-service/chains/chains-list/#x-layer) | -| [Bahamut](/rpc-service/chains/chains-list/#bahamut) | [Ethereum](/rpc-service/chains/chains-list/#ethereum) | [Horizen EON](/rpc-service/chains/chains-list/#horizen-eon) | [Nervos](/rpc-service/chains/chains-list/#nervos) | [Sui](/rpc-service/chains/chains-list/#sui) | [zkSync Era](/rpc-service/chains/chains-list/#zksync-era) | -| [Base](/rpc-service/chains/chains-list/#base) | [Ethereum Beacon](/rpc-service/chains/chains-list/#eth-beacon) | [IoTeX](/rpc-service/chains/chains-list/#iotex) | [Optimism](/rpc-service/chains/chains-list/#optimism) | [Swell](/rpc-service/chains/chains-list/#swell) | | -| [Bitcoin](/rpc-service/chains/chains-list/#bitcoin) | [Fantom](/rpc-service/chains/chains-list/#fantom) | [Kava](/rpc-service/chains/chains-list/#kava) | [Polkadot](/rpc-service/chains/chains-list/#polkadot) | [Syscoin](/rpc-service/chains/chains-list/#syscoin) | | +| [Allora](/rpc-service/chains/chains-list/#allora) | [Bitlayer](/rpc-service/chains/chains-list/#bitlayer) | [Fantom](/rpc-service/chains/chains-list/#fantom) | [Kaia](/rpc-service/chains/chains-list/#kaia) | [Polkadot](/rpc-service/chains/chains-list/#polkadot) | [Syscoin](/rpc-service/chains/chains-list/#syscoin) | +| [Aptos](/rpc-service/chains/chains-list/#aptos) | [BitTorrent Chain](/rpc-service/chains/chains-list/#bittorrent-chain) | [Filecoin](/rpc-service/chains/chains-list/#filecoin) | [Kava](/rpc-service/chains/chains-list/#kava) | [Polygon](/rpc-service/chains/chains-list/#polygon) | [Taiko](/rpc-service/chains/chains-list/#taiko) | +| [Arbitrum](/rpc-service/chains/chains-list/#arbitrum) | [Blast](/rpc-service/chains/chains-list/#blast) | [Flare](/rpc-service/chains/chains-list/#flare) | [Kinto](/rpc-service/chains/chains-list/#kinto) | [Polygon zkEVM](/rpc-service/chains/chains-list/#polygon-zkevm) | [Telos](/rpc-service/chains/chains-list/#telos) | +| [Arbitrum Nova](/rpc-service/chains/chains-list/#arbitrum-nova) | [BNB Smart Chain](/rpc-service/chains/chains-list/#bnb-smart-chain) | [Gnosis](/rpc-service/chains/chains-list/#gnosis) | [Kusama](/rpc-service/chains/chains-list/#kusama) | [Rollux](/rpc-service/chains/chains-list/#rollux) | [Tenet](/rpc-service/chains/chains-list/#tenet) | +| [Atleta](/rpc-service/chains/chains-list/#atleta) | [Botanix](/rpc-service/chains/chains-list/#botanix) | [Gnosis Beacon](/rpc-service/chains/chains-list/#gnosis-beacon) | [Linea](/rpc-service/chains/chains-list/#linea) | [Scroll](/rpc-service/chains/chains-list/#scroll) | [TON](/rpc-service/chains/chains-list/#ton) | +| [Avail](/rpc-service/chains/chains-list/#avail) | [Celo](/rpc-service/chains/chains-list/#celo) | [GOAT](/rpc-service/chains/chains-list/#goat) | [Mantle](/rpc-service/chains/chains-list/#mantle) | [Secret Network](/rpc-service/chains/chains-list/#secret-network) | [TRON](/rpc-service/chains/chains-list/#tron) | +| [Avalanche](/rpc-service/chains/chains-list/#avalanche) | [Chiliz](/rpc-service/chains/chains-list/#chiliz) | [Gravity](/rpc-service/chains/chains-list/#gravity) | [Metis](/rpc-service/chains/chains-list/#metis) | [Sei](/rpc-service/chains/chains-list/#sei) | [Xai](/rpc-service/chains/chains-list/#xai) | +| [B2 Network](/rpc-service/chains/chains-list/#b2-network) | [Core](/rpc-service/chains/chains-list/#core) | [Harmony](/rpc-service/chains/chains-list/#harmony) | [Moonbeam](/rpc-service/chains/chains-list/#moonbeam) | [Solana](/rpc-service/chains/chains-list/#solana) | [XDC](/rpc-service/chains/chains-list/#xdc) | +| [Bahamut](/rpc-service/chains/chains-list/#bahamut) | [Electroneum](/rpc-service/chains/chains-list/#electroneum) | [HECO Chain](/rpc-service/chains/chains-list/#huobi-eco-chain) | [NEAR](/rpc-service/chains/chains-list/#near) | [Stellar](/rpc-service/chains/chains-list/#stellar) | [X Layer](/rpc-service/chains/chains-list/#x-layer) | +| [Base](/rpc-service/chains/chains-list/#base) | [Ethereum](/rpc-service/chains/chains-list/#ethereum) | [Horizen EON](/rpc-service/chains/chains-list/#horizen-eon) | [Nervos](/rpc-service/chains/chains-list/#nervos) | [Sui](/rpc-service/chains/chains-list/#sui) | [zkSync Era](/rpc-service/chains/chains-list/#zksync-era) | +| [Bitcoin](/rpc-service/chains/chains-list/#bitcoin) | [Ethereum Beacon](/rpc-service/chains/chains-list/#eth-beacon) | [IoTeX](/rpc-service/chains/chains-list/#iotex) | [Optimism](/rpc-service/chains/chains-list/#optimism) | [Swell](/rpc-service/chains/chains-list/#swell) | | ## Allora @@ -2506,6 +2506,144 @@ def test_block_number(self): --- +## Botanix + +> Botanix API is available on [Web3 API platform](https://www.ankr.com/rpc/botanix). + +Botanix is a decentralized Turing-complete Layer 2 EVM built on the native currency of bitcoin. It operates using two core components: + + * **Ethereum Virtual Machine**: Fortified by a Proof-of-Stake consensus protocol that leverages Bitcoin's Proof-of-Work for superior security. Stakes are represented by actual bitcoin stored securely within multi-signature wallets on the Bitcoin network. By supporting EVM, Botanix allows developers to seamlessly port existing Ethereum dApps to the Bitcoin ecosystem. + * **Spiderchain Protocol**: At the core of Botanix is the Spiderchain, a series of successive multisignature (multisig) wallets managed by randomized sets of orchestrators. This structure secures user funds and facilitates the movement of Bitcoin within the network, effectively separating Bitcoin "the asset" from Bitcoin "the blockchain." By securing the Bitcoin present on Botanix in a decentralized chain of multisigs, it separates Bitcoin from the EVM. This allows for a transition from Bitcoin’s UTXO model to an account model used in the EVM. + +Official quick links: [Website](https://www.botanixlabs.xyz/), [Docs](https://docs.botanixlabs.xyz/botanix-labs), [GitHub](https://github.com/botanix-labs) + +### Networks + + * Testnet (`HTTPS` and `WSS`) + +### API methods + +For Botanix, we support blockchain interaction via all the [applicable methods](/rpc-service/chains/chains-api/botanix/) except for those listed as unsupported. + +#### Unsupported + + + This section contains a list of methods we don't support for either _Public_ or _Premium_ service plans. + + + + If you require any of the methods from the list, contact our Sales (`sales@ankr.com`) about moving to the _Enterprise_ service plan that can provide the services tailored to your specific needs. + + +**HTTPS**: + +`eth_newFilter`, `eth_getFilterChanges`, `eth_coinbase`, `eth_hashrate`, `eth_mining`, `eth_getWork`,`eth_submitWork`, `eth_submitHashrate`, `net_peerCount`, `eth_newBlockFilter`, `eth_newPendingTransactionFilter`, `eth_uninstallFilter`, `eth_getFilterLogs`, + +`debug_*`, `personal_*`, `admin_*`, `clique_*`, `les_*`, `miner_*`, `engine_*`, `parity_*` + +**WSS**: + +`txpool_content`, `txpool_inspect`, `txpool_status`, `txpool_contentFrom` + +### API querying + +#### Request example + + + + +```shell +curl -X POST https://rpc.ankr.com/botanix_testnet \ +-H 'Content-Type: application/json' \ +-d '{ + "jsonrpc": "2.0", + "method": "eth_blockNumber", + "params": [], + "id": 1 + }' +``` + + + +```go +package main + +import ( + "context" + "fmt" + "github.com/ethereum/go-ethereum/ethclient" +) + +func main() { + const url = "https://rpc.ankr.com/botanix_testnet" // url string + + rpcClient,err := ethclient.Dial(url) + + if err != nil { + panic(err) + } + + blockNumber, err := rpcClient.BlockNumber(context.Background()) + + if err != nil { + panic(err) + } + + fmt.Println(blockNumber) +} +``` + + + +```js +const Web3 = require('web3'); + +const url = 'https://rpc.ankr.com/botanix_testnet' // url string + +const web3 = new Web3(new Web3.providers.HttpProvider(url)); + +web3.eth.getBlockNumber((error, blockNumber) => { + if(!error) { + console.log(blockNumber); + } else { + console.log(error); + } +}); +``` + + + +```python +from web3 import Web3 + +def test_block_number(self): + url = 'https://rpc.ankr.com/botanix_testnet' # url string + + web3 = Web3(HTTPProvider(url)) + print(web3.eth.block_number) +``` + + + +#### Response example + +```json +{ + "jsonrpc": "2.0", + "id": 1, + "result": "0x5c061" +} +``` + +--- + ## Celo
@@ -5059,25 +5197,30 @@ def test_block_number(self): --- -## Kava +## Kaia -> Kava API is available on [Web3 API platform](https://www.ankr.com/rpc/kava). +> Kaia API is available on [Web3 API platform](https://www.ankr.com/rpc/kaia). -The Kava Network is the Layer-1 blockchain that combines the speed and scalability of the Cosmos SDK with the developer support of Ethereum. Kava will empower developers to build for Web3 and next-gen blockchain technologies through its unique co-chain architecture. KAVA is the native governance and staking token of the Kava Network, enabling its decentralization and security. +Kaia is an EVM-compatible Layer 1 public blockchain designed to bring Web3 services to millions of users across Asia. Formed through the merger of the Klaytn and Finschia blockchains — initially developed by Kakao and LINE respectively — Kaia aims to integrate a broad user base with vast on-chain assets and technology to help builders promptly implement and expand their ideas with successful results. -Official quick links: [Website](https://www.kava.io/), [Docs](https://docs.kava.io/docs/intro/), [GitHub](https://github.com/kava-labs) +Key Features of Kaia: + + * **High Performance**: Kaia achieves immediate transaction finality with a 1-second block time, processing approximately 4,000 transactions per second. + * **User Accessibility**: By integrating with popular messaging apps like KakaoTalk and LINE, Kaia provides easy access to existing Web2 users, facilitating seamless onboarding to Web3 services. + * **Developer-Friendly Environment**: Kaia offers EVM equivalence, allowing developers to deploy existing Ethereum-based applications with minimal modifications. Planned support for CosmWasm and integration with industry-leading cross-chain bridges provide developers with unparalleled flexibility. + * **Scalability**: The network's modular architecture supports customizable and easily deployable service chains as Layer 2 solutions, enhancing scalability for high-throughput services. + * **Governance**: Kaia implements an on-chain governance system designed to be fair and inclusive, with voting rights proportional to the amount of KAIA tokens staked. + +Official quick links: [Website](https://www.kaia.io/), [Docs](https://docs.kaia.io/), [GitHub](https://github.com/klaytn) ### Networks - * Mainnet: - * REST API (`HTTPS`) - * EVM JSON-RPC API (`HTTPS` and `WSS`) - * Tendermint REST API (`HTTPS`) - * JSON-RPC API (`HTTPS` and `WSS`) + * Mainnet (`HTTPS` and `WSS`) + * Testnet (`HTTPS` and `WSS`) ### API methods -For Kava, we support blockchain interaction via all the [applicable methods](/rpc-service/chains/chains-api/kava/) except for those listed as unsupported. +For Kaia, we support blockchain interaction via all the [applicable methods](/rpc-service/chains/chains-api/kaia/) except for those listed as unsupported. #### Unsupported @@ -5089,26 +5232,42 @@ For Kava, we support blockchain interaction via all the [applicable methods](/rp If you require any of the methods from the list, contact our Sales (`sales@ankr.com`) about moving to the _Enterprise_ service plan that can provide the services tailored to your specific needs. -**EVM JSON-RPC**: - -**HTTPS** +**HTTPS**: `eth_newFilter`, `eth_getFilterChanges`, `eth_coinbase`, `eth_hashrate`, `eth_mining`, `eth_getWork`,`eth_submitWork`, `eth_submitHashrate`, `net_peerCount`, `eth_newBlockFilter`, `eth_newPendingTransactionFilter`, `eth_uninstallFilter`, `eth_getFilterLogs`, -`debug_*`, `personal_*`, `admin_*`, `clique_*`, `les_*`, `miner_*`, `engine_*`, `parity_*` +`debug_*`, `personal_*`, `admin_*`, `clique_*`, `les_*`, `miner_*`, `engine_*`, `parity_*`, -**WSS** + `kaia_sign`, + `kaia_syncing`, + `kaia_clientVersion`, + `kaia_isParallelDBWrite`, + `kaia_isSenderTxHashIndexingEnabled`, + `kaia_protocolVersion`, + `kaia_rewardbase`, + `kaia_getFilterChanges`, + `kaia_getFilterLogs`, + `kaia_newBlockFilter`, + `kaia_newFilter`, + `kaia_newPendingTransactionFilter`, + `kaia_uninstallFilter`, + `net_listening`, + `net_peerCount`, + `net_peerCountByType`, + `kaia_sendTransaction`, + `kaia_sendTransactionAsFeePayer`, + `kaia_signTransaction`, + `kaia_signTransactionAsFeePayer`, -`txpool_content`, `txpool_inspect`, `txpool_status`, `txpool_contentFrom` + `governance_*`, + `mainbridge_*`, + `subbridge_*` -**Tendermint REST**: +**WSS**: - `/health`, - `/broadcast_evidence`, - `/dial_seeds`, - `/dial_peers` +`txpool_content`, `txpool_inspect`, `txpool_status`, `txpool_contentFrom` -### API querying (EVM JSON-RPC) +### API querying #### Request example @@ -5123,7 +5282,7 @@ For Kava, we support blockchain interaction via all the [applicable methods](/rp ```shell -curl -X POST https://rpc.ankr.com/kava_evm \ +curl -X POST https://rpc.ankr.com/kaia \ -H 'Content-Type: application/json' \ -d '{ "jsonrpc":"2.0", @@ -5145,7 +5304,7 @@ import ( ) func main() { - const url = "https://rpc.ankr.com/kava_evm" // url string + const url = "https://rpc.ankr.com/kaia" // url string rpcClient,err := ethclient.Dial(url) @@ -5168,7 +5327,7 @@ func main() { ```js const Web3 = require('web3'); -const url = 'https://rpc.ankr.com/kava_evm' // url string +const url = 'https://rpc.ankr.com/kaia' // url string const web3 = new Web3(new Web3.providers.HttpProvider(url)); @@ -5187,7 +5346,7 @@ web3.eth.getBlockNumber((error, blockNumber) => { from web3 import Web3 def test_block_number(self): - url = 'https://rpc.ankr.com/kava_evm' # url string + url = 'https://rpc.ankr.com/kaia' # url string web3 = Web3(HTTPProvider(url)) print(web3.eth.block_number) @@ -5201,27 +5360,31 @@ def test_block_number(self): { "jsonrpc":"2.0", "id":1, - "result":"0x8472af" + "result":"0xa3c7fb4" } ``` --- -## Kinto +## Kava -> Kinto API is available on [Web3 API platform](https://www.ankr.com/rpc/kinto). +> Kava API is available on [Web3 API platform](https://www.ankr.com/rpc/kava). -Kinto is a Layer 2 focused on providing safe access to on-chain finance. It's built on top of the Ethereum network using the [Arbitrum Nitro Stack](https://docs.arbitrum.io/why-nitro), and it's non-custodial, transparent, permissionless, and governed by the community. +The Kava Network is the Layer-1 blockchain that combines the speed and scalability of the Cosmos SDK with the developer support of Ethereum. Kava will empower developers to build for Web3 and next-gen blockchain technologies through its unique co-chain architecture. KAVA is the native governance and staking token of the Kava Network, enabling its decentralization and security. -Official quick links: [Website](https://www.kinto.xyz/), [Docs](https://docs.kinto.xyz/kinto-the-safe-l2) +Official quick links: [Website](https://www.kava.io/), [Docs](https://docs.kava.io/docs/intro/), [GitHub](https://github.com/kava-labs) ### Networks - * Mainnet (`HTTPS` and `WSS`) + * Mainnet: + * REST API (`HTTPS`) + * EVM JSON-RPC API (`HTTPS` and `WSS`) + * Tendermint REST API (`HTTPS`) + * JSON-RPC API (`HTTPS` and `WSS`) ### API methods -For Kinto, we support blockchain interaction via all the [applicable methods](/rpc-service/chains/chains-api/kinto/) except for those listed as unsupported. +For Kava, we support blockchain interaction via all the [applicable methods](/rpc-service/chains/chains-api/kava/) except for those listed as unsupported. #### Unsupported @@ -5233,17 +5396,26 @@ For Kinto, we support blockchain interaction via all the [applicable methods](/r If you require any of the methods from the list, contact our Sales (`sales@ankr.com`) about moving to the _Enterprise_ service plan that can provide the services tailored to your specific needs. -**HTTPS**: +**EVM JSON-RPC**: + +**HTTPS** `eth_newFilter`, `eth_getFilterChanges`, `eth_coinbase`, `eth_hashrate`, `eth_mining`, `eth_getWork`,`eth_submitWork`, `eth_submitHashrate`, `net_peerCount`, `eth_newBlockFilter`, `eth_newPendingTransactionFilter`, `eth_uninstallFilter`, `eth_getFilterLogs`, `debug_*`, `personal_*`, `admin_*`, `clique_*`, `les_*`, `miner_*`, `engine_*`, `parity_*` -**WSS**: +**WSS** `txpool_content`, `txpool_inspect`, `txpool_status`, `txpool_contentFrom` -### API querying +**Tendermint REST**: + + `/health`, + `/broadcast_evidence`, + `/dial_seeds`, + `/dial_peers` + +### API querying (EVM JSON-RPC) #### Request example @@ -5258,13 +5430,13 @@ For Kinto, we support blockchain interaction via all the [applicable methods](/r ```shell -curl -X POST https://rpc.ankr.com/kinto \ +curl -X POST https://rpc.ankr.com/kava_evm \ -H 'Content-Type: application/json' \ -d '{ - "jsonrpc": "2.0", - "method": "eth_blockNumber", + "jsonrpc":"2.0", + "method":"eth_blockNumber", "params": [], - "id": 1 + "id":1 }' ``` @@ -5280,7 +5452,7 @@ import ( ) func main() { - const url = "https://rpc.ankr.com/kinto" // url string + const url = "https://rpc.ankr.com/kava_evm" // url string rpcClient,err := ethclient.Dial(url) @@ -5303,7 +5475,7 @@ func main() { ```js const Web3 = require('web3'); -const url = 'https://rpc.ankr.com/kinto' // url string +const url = 'https://rpc.ankr.com/kava_evm' // url string const web3 = new Web3(new Web3.providers.HttpProvider(url)); @@ -5322,7 +5494,7 @@ web3.eth.getBlockNumber((error, blockNumber) => { from web3 import Web3 def test_block_number(self): - url = 'https://rpc.ankr.com/kinto' # url string + url = 'https://rpc.ankr.com/kava_evm' # url string web3 = Web3(HTTPProvider(url)) print(web3.eth.block_number) @@ -5334,80 +5506,29 @@ def test_block_number(self): ```json { - "jsonrpc": "2.0", - "id": 1, - "result": "0x1db1f" + "jsonrpc":"2.0", + "id":1, + "result":"0x8472af" } ``` --- -## Klaytn -
- - - -> Klaytn API is available on [Web3 API platform](https://www.ankr.com/rpc/klaytn). - -Klaytn is a highly optimized, BFT-based public blockchain that aims to meet the enterprise-grade reliability. +## Kinto -Key design goals are: +> Kinto API is available on [Web3 API platform](https://www.ankr.com/rpc/kinto). - * Immediate finality. - * High TPS that meets real-world use cases. - * Lower the cost of running Blockchain Applications. - * Lower the barriers to entry for end-users. - * Ease the technology adoption process for industry. +Kinto is a Layer 2 focused on providing safe access to on-chain finance. It's built on top of the Ethereum network using the [Arbitrum Nitro Stack](https://docs.arbitrum.io/why-nitro), and it's non-custodial, transparent, permissionless, and governed by the community. -Official quick links: [Website](https://www.klaytn.foundation/), [Docs](https://docs.klaytn.foundation/), [GitHub](https://github.com/klaytn) +Official quick links: [Website](https://www.kinto.xyz/), [Docs](https://docs.kinto.xyz/kinto-the-safe-l2) ### Networks * Mainnet (`HTTPS` and `WSS`) - * Testnet (`HTTPS` and `WSS`) - -### Add networks to MetaMask - -Using Ankr as the blockchain provider for MetaMask makes user interaction on Web3 not just easy and slick but also PRIVATE. We DON'T collect users' blockchain addresses — end of the story. Feel free to check our [terms](https://www.ankr.com/terms/ -) and [privacy policy](https://www.ankr.com/privacy-policy/) to be sure. - -For MetaMask to interact with Klaytn through Ankr's infrastructure, add a required Klaytn network either via Web3 API platform's or MetaMask's UI. - -#### Via Web3 API platform - -To be added soon. - -#### Via MetaMask - -To add Klaytn Mainnet, follow these steps: - - 1. In MetaMask extension, click **Networks** (drop-down menu) **> Add network** to open **Settings**. - 2. In the **Add a network** pane, click **Add a network manually**, then enter the network details and click **Save**: - - * **Network name**: `Klaytn Mainnet by Ankr RPC`. - * **New RPC URL**: `https://rpc.ankr.com/klaytn/`. - * **Chain ID**: `8217`. - * **Currency symbol**: `KLAY`. - * **Block explorer URL**: `https://scope.klaytn.com/`. - -Congrats — you've just added Ankr as the blockchain provider for MetaMask to interact with Klaytn Mainnet. - -To add Klaytn Testnet, follow these steps: - - 1. In MetaMask extension, click **Networks** (drop-down menu) **> Add network** to open **Settings**. - 2. In the **Add a network** pane, click **Add a network manually**, then enter the network details and click **Save**: - - * **Network name**: `Klaytn Baoban Testnet by Ankr RPC`. - * **New RPC URL**: `https://rpc.ankr.com/klaytn_testnet/`. - * **Chain ID**: `1001`. - * **Currency symbol**: `KLAY`. - * **Block explorer URL**: `https://baobab.scope.klaytn.com/`. - -Congrats — you've just added Ankr as the blockchain provider for MetaMask to interact with Klaytn Testnet. ### API methods -For Klaytn, we support blockchain interaction via all the [applicable methods](/rpc-service/chains/chains-api/klaytn/) except for those listed as unsupported. +For Kinto, we support blockchain interaction via all the [applicable methods](/rpc-service/chains/chains-api/kinto/) except for those listed as unsupported. #### Unsupported @@ -5423,32 +5544,7 @@ For Klaytn, we support blockchain interaction via all the [applicable methods](/ `eth_newFilter`, `eth_getFilterChanges`, `eth_coinbase`, `eth_hashrate`, `eth_mining`, `eth_getWork`,`eth_submitWork`, `eth_submitHashrate`, `net_peerCount`, `eth_newBlockFilter`, `eth_newPendingTransactionFilter`, `eth_uninstallFilter`, `eth_getFilterLogs`, -`debug_*`, `personal_*`, `admin_*`, `clique_*`, `les_*`, `miner_*`, `engine_*`, `parity_*`, - - `klay_sign`, - `klay_syncing`, - `klay_clientVersion`, - `klay_isParallelDBWrite`, - `klay_isSenderTxHashIndexingEnabled`, - `klay_protocolVersion`, - `klay_rewardbase`, - `klay_getFilterChanges`, - `klay_getFilterLogs`, - `klay_newBlockFilter`, - `klay_newFilter`, - `klay_newPendingTransactionFilter`, - `klay_uninstallFilter`, - `net_listening`, - `net_peerCount`, - `net_peerCountByType`, - `klay_sendTransaction`, - `klay_sendTransactionAsFeePayer`, - `klay_signTransaction`, - `klay_signTransactionAsFeePayer`, - - `governance_*`, - `mainbridge_*`, - `subbridge_*` +`debug_*`, `personal_*`, `admin_*`, `clique_*`, `les_*`, `miner_*`, `engine_*`, `parity_*` **WSS**: @@ -5469,13 +5565,13 @@ For Klaytn, we support blockchain interaction via all the [applicable methods](/ ```shell -curl -X POST https://rpc.ankr.com/klaytn \ +curl -X POST https://rpc.ankr.com/kinto \ -H 'Content-Type: application/json' \ -d '{ - "jsonrpc":"2.0", - "method":"eth_blockNumber", + "jsonrpc": "2.0", + "method": "eth_blockNumber", "params": [], - "id":1 + "id": 1 }' ``` @@ -5491,20 +5587,20 @@ import ( ) func main() { - const url = "https://rpc.ankr.com/klaytn" // url string - + const url = "https://rpc.ankr.com/kinto" // url string + rpcClient,err := ethclient.Dial(url) - + if err != nil { panic(err) } - + blockNumber, err := rpcClient.BlockNumber(context.Background()) - + if err != nil { panic(err) } - + fmt.Println(blockNumber) } ``` @@ -5514,7 +5610,7 @@ func main() { ```js const Web3 = require('web3'); -const url = 'https://rpc.ankr.com/klaytn' // url string +const url = 'https://rpc.ankr.com/kinto' // url string const web3 = new Web3(new Web3.providers.HttpProvider(url)); @@ -5531,10 +5627,10 @@ web3.eth.getBlockNumber((error, blockNumber) => { ```python from web3 import Web3 - + def test_block_number(self): - url = 'https://rpc.ankr.com/klaytn' # url string - + url = 'https://rpc.ankr.com/kinto' # url string + web3 = Web3(HTTPProvider(url)) print(web3.eth.block_number) ``` @@ -5545,9 +5641,9 @@ def test_block_number(self): ```json { - "jsonrpc":"2.0", - "id":1, - "result":"0x65aab81" + "jsonrpc": "2.0", + "id": 1, + "result": "0x1db1f" } ``` diff --git a/redirects.json b/redirects.json index 323eadac6..5492a6608 100644 --- a/redirects.json +++ b/redirects.json @@ -2094,5 +2094,9 @@ { "from": "docs/scaling-services-btc-l2/index.html", "to": "/docs/scaling-services-bsi/" + }, + { + "from": "docs/rpc-service/chains/chains-api/klaytn/index.html", + "to": "/docs/rpc-service/chains/chains-api/kaia/" } ]