From b4f495703bb2142ea9938c3fb8652c707ced2e6b Mon Sep 17 00:00:00 2001 From: productshiv Date: Sat, 6 Apr 2024 17:35:28 +0530 Subject: [PATCH] Adding Ethereum Classic --- .../rpc-evm/rpc-cronos/eth_gasprice.md | 49 ------ .../rpc-evm/rpc-cronos/eth_getblockbyhash.md | 87 ---------- .../eth_getblocktransactioncountbyhash.md | 55 ------- .../eth_gettransactionbyblockhashandindex.md | 70 -------- ...eth_gettransactionbyblocknumberandindex.md | 70 -------- .../rpc-cronos/eth_gettransactionbyhash.md | 64 -------- .../rpc-cronos/eth_gettransactioncount.md | 67 -------- .../rpc-cronos/eth_gettransactionreceipt.md | 63 -------- .../eth_getunclecountbyblockhash.md | 54 ------- .../eth_getunclecountbyblocknumber.md | 54 ------- .../rpc-evm/rpc-cronos/txpool_content.md | 73 --------- .../rpc-evm/rpc-cronos/txpool_inspect.md | 52 ------ ...{rpc-cronos.md => rpc-ethereum-classic.md} | 4 +- .../debug_getbadblocks.md | 116 ++++++++++++++ .../debug_storagerangeat.md | 97 +++++++++++ .../rpc-ethereum-classic/debug_traceblock.md | 119 ++++++++++++++ .../debug_traceblockbyhash.md | 64 ++++++-- .../debug_traceblockbynumber.md | 64 ++++++-- .../rpc-ethereum-classic/debug_tracecall.md | 135 ++++++++++++++++ .../debug_tracetransaction.md | 61 +++++-- .../eth_blocknumber.md | 44 ++++- .../eth_call.md | 45 ++++-- .../eth_chainid.md | 43 +++-- .../eth_estimategas.md | 27 ++-- .../rpc-ethereum-classic/eth_gasprice.md | 74 +++++++++ .../eth_getbalance.md | 50 ++++-- .../eth_getblockbyhash.md | 151 ++++++++++++++++++ .../eth_getblockbynumber.md | 81 +++++++++- .../eth_getblocktransactioncountbyhash.md | 82 ++++++++++ .../eth_getblocktransactioncountbynumber.md | 47 ++++-- .../eth_getcode.md | 48 ++++-- .../eth_getlogs.md | 66 ++++++-- .../eth_getproof.md | 70 ++++++-- .../eth_getstorageat.md | 47 ++++-- .../eth_gettransactionbyblockhashandindex.md | 116 ++++++++++++++ ...eth_gettransactionbyblocknumberandindex.md | 116 ++++++++++++++ .../eth_gettransactionbyhash.md | 106 ++++++++++++ .../eth_gettransactioncount.md | 88 ++++++++++ .../eth_gettransactionreceipt.md | 122 ++++++++++++++ .../eth_getunclecountbyblockhash.md | 84 ++++++++++ .../eth_getunclecountbyblocknumber.md | 85 ++++++++++ .../eth_maxpriorityfeepergas.md | 39 ++++- .../eth_sendrawtransaction.md | 41 ++++- .../rpc-evm/rpc-ethereum-classic/genesis.md | 15 ++ .../rpc-ethereum-classic/txpool_content.md | 143 +++++++++++++++++ .../rpc-ethereum-classic/txpool_inspect.md | 90 +++++++++++ .../txpool_status.md | 42 ++++- .../web3_clientversion.md | 49 ++++-- 48 files changed, 2494 insertions(+), 935 deletions(-) delete mode 100644 v1.0/RPC Nodes/rpc-evm/rpc-cronos/eth_gasprice.md delete mode 100644 v1.0/RPC Nodes/rpc-evm/rpc-cronos/eth_getblockbyhash.md delete mode 100644 v1.0/RPC Nodes/rpc-evm/rpc-cronos/eth_getblocktransactioncountbyhash.md delete mode 100644 v1.0/RPC Nodes/rpc-evm/rpc-cronos/eth_gettransactionbyblockhashandindex.md delete mode 100644 v1.0/RPC Nodes/rpc-evm/rpc-cronos/eth_gettransactionbyblocknumberandindex.md delete mode 100644 v1.0/RPC Nodes/rpc-evm/rpc-cronos/eth_gettransactionbyhash.md delete mode 100644 v1.0/RPC Nodes/rpc-evm/rpc-cronos/eth_gettransactioncount.md delete mode 100644 v1.0/RPC Nodes/rpc-evm/rpc-cronos/eth_gettransactionreceipt.md delete mode 100644 v1.0/RPC Nodes/rpc-evm/rpc-cronos/eth_getunclecountbyblockhash.md delete mode 100644 v1.0/RPC Nodes/rpc-evm/rpc-cronos/eth_getunclecountbyblocknumber.md delete mode 100644 v1.0/RPC Nodes/rpc-evm/rpc-cronos/txpool_content.md delete mode 100644 v1.0/RPC Nodes/rpc-evm/rpc-cronos/txpool_inspect.md rename v1.0/RPC Nodes/rpc-evm/{rpc-cronos.md => rpc-ethereum-classic.md} (80%) create mode 100644 v1.0/RPC Nodes/rpc-evm/rpc-ethereum-classic/debug_getbadblocks.md create mode 100644 v1.0/RPC Nodes/rpc-evm/rpc-ethereum-classic/debug_storagerangeat.md create mode 100644 v1.0/RPC Nodes/rpc-evm/rpc-ethereum-classic/debug_traceblock.md rename v1.0/RPC Nodes/rpc-evm/{rpc-cronos => rpc-ethereum-classic}/debug_traceblockbyhash.md (62%) rename v1.0/RPC Nodes/rpc-evm/{rpc-cronos => rpc-ethereum-classic}/debug_traceblockbynumber.md (59%) create mode 100644 v1.0/RPC Nodes/rpc-evm/rpc-ethereum-classic/debug_tracecall.md rename v1.0/RPC Nodes/rpc-evm/{rpc-cronos => rpc-ethereum-classic}/debug_tracetransaction.md (52%) rename v1.0/RPC Nodes/rpc-evm/{rpc-cronos => rpc-ethereum-classic}/eth_blocknumber.md (57%) rename v1.0/RPC Nodes/rpc-evm/{rpc-cronos => rpc-ethereum-classic}/eth_call.md (68%) rename v1.0/RPC Nodes/rpc-evm/{rpc-cronos => rpc-ethereum-classic}/eth_chainid.md (51%) rename v1.0/RPC Nodes/rpc-evm/{rpc-cronos => rpc-ethereum-classic}/eth_estimategas.md (74%) create mode 100644 v1.0/RPC Nodes/rpc-evm/rpc-ethereum-classic/eth_gasprice.md rename v1.0/RPC Nodes/rpc-evm/{rpc-cronos => rpc-ethereum-classic}/eth_getbalance.md (62%) create mode 100644 v1.0/RPC Nodes/rpc-evm/rpc-ethereum-classic/eth_getblockbyhash.md rename v1.0/RPC Nodes/rpc-evm/{rpc-cronos => rpc-ethereum-classic}/eth_getblockbynumber.md (51%) create mode 100644 v1.0/RPC Nodes/rpc-evm/rpc-ethereum-classic/eth_getblocktransactioncountbyhash.md rename v1.0/RPC Nodes/rpc-evm/{rpc-cronos => rpc-ethereum-classic}/eth_getblocktransactioncountbynumber.md (53%) rename v1.0/RPC Nodes/rpc-evm/{rpc-cronos => rpc-ethereum-classic}/eth_getcode.md (58%) rename v1.0/RPC Nodes/rpc-evm/{rpc-cronos => rpc-ethereum-classic}/eth_getlogs.md (64%) rename v1.0/RPC Nodes/rpc-evm/{rpc-cronos => rpc-ethereum-classic}/eth_getproof.md (55%) rename v1.0/RPC Nodes/rpc-evm/{rpc-cronos => rpc-ethereum-classic}/eth_getstorageat.md (54%) create mode 100644 v1.0/RPC Nodes/rpc-evm/rpc-ethereum-classic/eth_gettransactionbyblockhashandindex.md create mode 100644 v1.0/RPC Nodes/rpc-evm/rpc-ethereum-classic/eth_gettransactionbyblocknumberandindex.md create mode 100644 v1.0/RPC Nodes/rpc-evm/rpc-ethereum-classic/eth_gettransactionbyhash.md create mode 100644 v1.0/RPC Nodes/rpc-evm/rpc-ethereum-classic/eth_gettransactioncount.md create mode 100644 v1.0/RPC Nodes/rpc-evm/rpc-ethereum-classic/eth_gettransactionreceipt.md create mode 100644 v1.0/RPC Nodes/rpc-evm/rpc-ethereum-classic/eth_getunclecountbyblockhash.md create mode 100644 v1.0/RPC Nodes/rpc-evm/rpc-ethereum-classic/eth_getunclecountbyblocknumber.md rename v1.0/RPC Nodes/rpc-evm/{rpc-cronos => rpc-ethereum-classic}/eth_maxpriorityfeepergas.md (72%) rename v1.0/RPC Nodes/rpc-evm/{rpc-cronos => rpc-ethereum-classic}/eth_sendrawtransaction.md (55%) create mode 100644 v1.0/RPC Nodes/rpc-evm/rpc-ethereum-classic/genesis.md create mode 100644 v1.0/RPC Nodes/rpc-evm/rpc-ethereum-classic/txpool_content.md create mode 100644 v1.0/RPC Nodes/rpc-evm/rpc-ethereum-classic/txpool_inspect.md rename v1.0/RPC Nodes/rpc-evm/{rpc-cronos => rpc-ethereum-classic}/txpool_status.md (55%) rename v1.0/RPC Nodes/rpc-evm/{rpc-cronos => rpc-ethereum-classic}/web3_clientversion.md (50%) diff --git a/v1.0/RPC Nodes/rpc-evm/rpc-cronos/eth_gasprice.md b/v1.0/RPC Nodes/rpc-evm/rpc-cronos/eth_gasprice.md deleted file mode 100644 index 318c803a..00000000 --- a/v1.0/RPC Nodes/rpc-evm/rpc-cronos/eth_gasprice.md +++ /dev/null @@ -1,49 +0,0 @@ ---- -title: "eth_gasprice" -slug: "rpc-cronos-eth_gasprice" -excerpt: "Cronos RPC" -category: 65c5e93c623cad004b45d505 -hidden: false -metadata: - description: "Cronos RPC" - image: [] - keywords: "cronos, rpc" - robots: "index" -createdAt: "Wed Mar 06 2024 10:35:44 GMT+0000 (Coordinated Universal Time)" -updatedAt: "Tue Apr 02 2024 08:40:59 GMT+0000 (Coordinated Universal Time)" ---- -[block:html]{"html":"
\n
Archive Method
\n

Only on the full archive nodes. Complex queries might take longer and incur additional cost

\n
"}[/block] - -### How to use it - -{% tabs %} -{% tab title="TypeScript/JavaScript" %} -{% code overflow="wrap" lineNumbers="true" %} -```typescript -// yarn add @tatumio/tatum - -import { TatumSDK, Cronos, Network } from '@tatumio/tatum' - -const tatum = await TatumSDK.init({network: Network.CRONOS}) - -const gasPrice = await tatum.rpc.gasPrice() - -await tatum.destroy() // Destroy Tatum SDK - needed for stopping background jobs -``` -{% endcode %} -{% endtab %} -{% endtabs %} - -### Overview - -The `eth_gasPrice` method is an JSON-RPC method used to estimate the average gas price required for transactions in the network. This method provides a suggestion for the gas price to be used in a transaction to increase the likelihood of it being mined and included in a block in a reasonable amount of time. The `eth_gasPrice` method is particularly useful for developers and users who want to create and send transactions, as it helps them estimate the appropriate gas price to ensure timely processing. - -### Parameters - -The `eth_gasPrice` method does not require any parameters. - -### Return Value - -The `eth_gasPrice` method returns a single value as a hexadecimal string: - -* `gasPrice`: The estimated average gas price in wei. Example: `"0x4a817c800"` \ No newline at end of file diff --git a/v1.0/RPC Nodes/rpc-evm/rpc-cronos/eth_getblockbyhash.md b/v1.0/RPC Nodes/rpc-evm/rpc-cronos/eth_getblockbyhash.md deleted file mode 100644 index 44d0d570..00000000 --- a/v1.0/RPC Nodes/rpc-evm/rpc-cronos/eth_getblockbyhash.md +++ /dev/null @@ -1,87 +0,0 @@ ---- -title: "eth_getblockbyhash" -slug: "rpc-cronos-eth_getblockbyhash" -excerpt: "Cronos RPC" -category: 65c5e93c623cad004b45d505 -hidden: false -metadata: - description: "Cronos RPC" - image: [] - keywords: "cronos, rpc" - robots: "index" -createdAt: "Wed Mar 06 2024 10:35:44 GMT+0000 (Coordinated Universal Time)" -updatedAt: "Tue Apr 02 2024 08:40:59 GMT+0000 (Coordinated Universal Time)" ---- -[block:html]{"html":"
\n
Archive Method
\n

Only on the full archive nodes. Complex queries might take longer and incur additional cost

\n
"}[/block] - -### How to use it - -{% tabs %} -{% tab title="TypeScript/JavaScript" %} -{% code overflow="wrap" lineNumbers="true" %} -```typescript -// yarn add @tatumio/tatum - -import { TatumSDK, Cronos, Network } from '@tatumio/tatum' - -const tatum = await TatumSDK.init({network: Network.CRONOS}) - -const block = await tatum.rpc.getBlockByHash('0x6565fd5921f93655e77d8cfeab8aa6caaf7155aeae24e91cdca33eedc66e6c5a', true) - -await tatum.destroy() // Destroy Tatum SDK - needed for stopping background jobs -``` -{% endcode %} -{% endtab %} -{% endtabs %} - -### Overview - -`eth_getBlockByHash` is an JSON-RPC method that allows developers to query a specific block in the blockchain by its block hash. This method can be used in various scenarios, such as analyzing historical transactions, validating the state of the blockchain, or monitoring the progress of mining activities. - -### Parameters - -The `eth_getBlockByHash` method accepts two parameters: - -1. **`blockHash`**: The hash of the block you want to retrieve information about. - * Type: `String` - * Example: `"0x6565fd5921f93655e77d8cfeab8aa6caaf7155aeae24e91cdca33eedc66e6c5a"` -2. **`fullTransactionDetails`**: A boolean value indicating whether to return full transaction details or just transaction hashes. - * Type: `Boolean` - * Example: `true` - -### Return Object - -The returned block object includes the following fields: - -* **`number`** - The block number (hexadecimal string). -* **`hash`** - The block hash (32-byte string). -* **`parentHash`** - The hash of the parent block (32-byte string). -* **`nonce`** - The nonce used to generate the block (8-byte string). -* **`sha3Uncles`** - The SHA3 hash of the uncles in the block (32-byte string). -* **`logsBloom`** - The logs bloom filter of the block (256-byte string). -* **`transactionsRoot`** - The root of the transaction trie (32-byte string). -* **`stateRoot`** - The root of the state trie (32-byte string). -* **`miner`** - The address of the miner who mined the block (20-byte string). -* **`difficulty`** - The difficulty of the block (hexadecimal string). -* **`totalDifficulty`** - The total difficulty of the chain up to this block (hexadecimal string). -* **`extraData`** - Extra data included by the miner in the block (byte string). -* **`size`** - The block size in bytes (hexadecimal string). -* **`gasLimit`** - The gas limit for the block (hexadecimal string). -* **`gasUsed`** - The total gas used by all transactions in the block (hexadecimal string). -* **`timestamp`** - The block timestamp (hexadecimal string). -* **`transactions`** - An array of transaction objects or transaction hashes, depending on the `returnFullTransactionObjects` parameter. -* **`uncles`** - An array of uncle block hashes (32-byte strings). - -If `returnFullTransactionObjects` is `true`, the `transactions` field contains transaction objects with the following fields: - -* **`hash`** - The transaction hash (32-byte string). -* **`nonce`** - The number of transactions sent by the sender before this transaction (hexadecimal string). -* **`blockHash`** - The block hash where the transaction is included (32-byte string). -* **`blockNumber`** - The block number where the transaction is included (hexadecimal string). -* **`transactionIndex`** - The index of the transaction in the block (hexadecimal string). -* **`from`** - The sender address (20-byte string). -* **`to`** - The recipient address, or `null` for contract creation transactions (20-byte string). -* **`value`** - The value being transferred (hexadecimal string). -* **`gasPrice`** - The gas price in wei (hexadecimal string). -* **`gas`** - The gas provided for the transaction (hexadecimal string). -* **`input`** - The input data for the transaction (byte string). \ No newline at end of file diff --git a/v1.0/RPC Nodes/rpc-evm/rpc-cronos/eth_getblocktransactioncountbyhash.md b/v1.0/RPC Nodes/rpc-evm/rpc-cronos/eth_getblocktransactioncountbyhash.md deleted file mode 100644 index 31b6898c..00000000 --- a/v1.0/RPC Nodes/rpc-evm/rpc-cronos/eth_getblocktransactioncountbyhash.md +++ /dev/null @@ -1,55 +0,0 @@ ---- -title: "eth_getblocktransactioncountbyhash" -slug: "rpc-cronos-eth_getblocktransactioncountbyhash" -excerpt: "Cronos RPC" -category: 65c5e93c623cad004b45d505 -hidden: false -metadata: - description: "Cronos RPC" - image: [] - keywords: "cronos, rpc" - robots: "index" -createdAt: "Wed Mar 06 2024 10:35:44 GMT+0000 (Coordinated Universal Time)" -updatedAt: "Tue Apr 02 2024 08:40:59 GMT+0000 (Coordinated Universal Time)" ---- -[block:html]{"html":"
\n
Archive Method
\n

Only on the full archive nodes. Complex queries might take longer and incur additional cost

\n
"}[/block] - -### How to use it - -{% tabs %} -{% tab title="TypeScript/JavaScript" %} -{% code overflow="wrap" lineNumbers="true" %} -```typescript -// yarn add @tatumio/tatum - -import { TatumSDK, Cronos, Network } from '@tatumio/tatum' - -const tatum = await TatumSDK.init({network: Network.CRONOS}) - -const response = await tatum.rpc.getBlockTransactionCountByHash('0x6565fd5921f93655e77d8cfeab8aa6caaf7155aeae24e91cdca33eedc66e6c5a') - -await tatum.destroy() // Destroy Tatum SDK - needed for stopping background jobs -``` -{% endcode %} -{% endtab %} -{% endtabs %} - -### Overview - -`eth_getBlockTransactionCountByHash` is an RPC method used to fetch the number of transactions in a block by the block's hash. It is useful when you want to know the total number of transactions included in a specific block and don't want to retrieve the entire block data. This method can be used in various scenarios, such as monitoring the network activity or estimating transaction confirmation times. - -### Parameters - -This method requires a single parameter: - -* **`blockHash`**: The hash of the target block for which the transaction count will be retrieved. It should be a valid 32-byte hex string. - -Example of the parameter: - -* `blockHash`: `"0x6565fd5921f93655e77d8cfeab8aa6caaf7155aeae24e91cdca33eedc66e6c5a"` - -### Return - -The method returns a single value: - -* `transactionCount`: The total number of transactions included in the specified block. It is returned as a hexadecimal value. \ No newline at end of file diff --git a/v1.0/RPC Nodes/rpc-evm/rpc-cronos/eth_gettransactionbyblockhashandindex.md b/v1.0/RPC Nodes/rpc-evm/rpc-cronos/eth_gettransactionbyblockhashandindex.md deleted file mode 100644 index 44b52298..00000000 --- a/v1.0/RPC Nodes/rpc-evm/rpc-cronos/eth_gettransactionbyblockhashandindex.md +++ /dev/null @@ -1,70 +0,0 @@ ---- -title: "eth_gettransactionbyblockhashandindex" -slug: "rpc-cronos-eth_gettransactionbyblockhashandindex" -excerpt: "Cronos RPC" -category: 65c5e93c623cad004b45d505 -hidden: false -metadata: - description: "Cronos RPC" - image: [] - keywords: "cronos, rpc" - robots: "index" -createdAt: "Wed Mar 06 2024 10:35:44 GMT+0000 (Coordinated Universal Time)" -updatedAt: "Tue Apr 02 2024 08:40:59 GMT+0000 (Coordinated Universal Time)" ---- -[block:html]{"html":"
\n
Archive Method
\n

Only on the full archive nodes. Complex queries might take longer and incur additional cost

\n
"}[/block] - -### How to use it - -{% tabs %} -{% tab title="TypeScript/JavaScript" %} -{% code overflow="wrap" lineNumbers="true" %} -```typescript -// yarn add @tatumio/tatum - -import { TatumSDK, Cronos, Network } from '@tatumio/tatum' - -const tatum = await TatumSDK.init({network: Network.CRONOS}) - -const tx = await tatum.rpc.getTransactionByBlockHashAndIndex('0x6565fd5921f93655e77d8cfeab8aa6caaf7155aeae24e91cdca33eedc66e6c5a', 0) - -await tatum.destroy() // Destroy Tatum SDK - needed for stopping background jobs -``` -{% endcode %} -{% endtab %} -{% endtabs %} - -### Overview - -`eth_getTransactionByBlockHashAndIndex` is an JSON-RPC method that allows you to fetch the transaction details based on the block hash and the index of the transaction within that block. This method can be useful when you want to retrieve transaction details for a specific transaction without knowing its transaction hash. - -Use cases for this method may include: - -* Inspecting transaction details for debugging purposes -* Gathering data for transaction analysis -* Fetching transaction information for specific blocks in a block explorer application - -### Parameters - -The `eth_getTransactionByBlockHashAndIndex` method accepts two parameters: - -1. `blockHash` (required): The hash of the block containing the transaction. - * Example: `"0x6565fd5921f93655e77d8cfeab8aa6caaf7155aeae24e91cdca33eedc66e6c5a"` -2. `transactionIndex` (required): The index of the transaction within the specified block. The index is a hexadecimal value. - * Example: `"0x0"` - -### Return Object - -The method returns a JSON object containing the following fields: - -1. `hash`: The transaction hash as a 32-byte hex string. -2. `nonce`: The number of transactions made by the sender prior to this one. -3. `blockHash`: The hash of the block in which this transaction is included. -4. `blockNumber`: The block number in which this transaction is included. -5. `transactionIndex`: The index of the transaction within the block. -6. `from`: The address of the sender. -7. `to`: The address of the recipient. `null` if the transaction is a contract creation transaction. -8. `value`: The value transferred in wei. -9. `gasPrice`: The gas price provided by the sender in wei. -10. `gas`: The gas limit provided by the sender. -11. `input`: The data sent along with the transaction. \ No newline at end of file diff --git a/v1.0/RPC Nodes/rpc-evm/rpc-cronos/eth_gettransactionbyblocknumberandindex.md b/v1.0/RPC Nodes/rpc-evm/rpc-cronos/eth_gettransactionbyblocknumberandindex.md deleted file mode 100644 index ac324b95..00000000 --- a/v1.0/RPC Nodes/rpc-evm/rpc-cronos/eth_gettransactionbyblocknumberandindex.md +++ /dev/null @@ -1,70 +0,0 @@ ---- -title: "eth_gettransactionbyblocknumberandindex" -slug: "rpc-cronos-eth_gettransactionbyblocknumberandindex" -excerpt: "Cronos RPC" -category: 65c5e93c623cad004b45d505 -hidden: false -metadata: - description: "Cronos RPC" - image: [] - keywords: "cronos, rpc" - robots: "index" -createdAt: "Wed Mar 06 2024 10:35:44 GMT+0000 (Coordinated Universal Time)" -updatedAt: "Tue Apr 02 2024 08:40:59 GMT+0000 (Coordinated Universal Time)" ---- -[block:html]{"html":"
\n
Archive Method
\n

Only on the full archive nodes. Complex queries might take longer and incur additional cost

\n
"}[/block] - -### How to use it - -{% tabs %} -{% tab title="TypeScript/JavaScript" %} -{% code overflow="wrap" lineNumbers="true" %} -```typescript -// yarn add @tatumio/tatum - -import { TatumSDK, Cronos, Network } from '@tatumio/tatum' - -const tatum = await TatumSDK.init({network: Network.CRONOS}) - -const tx = await tatum.rpc.getTransactionByBlockNumberAndIndex('0xC44FF8', 0) - -await tatum.destroy() // Destroy Tatum SDK - needed for stopping background jobs -``` -{% endcode %} -{% endtab %} -{% endtabs %} - -### Overview - -`eth_getTransactionByBlockHashAndIndex` is an JSON-RPC method that allows you to fetch the transaction details based on the block hash and the index of the transaction within that block. This method can be useful when you want to retrieve transaction details for a specific transaction without knowing its transaction hash. - -Use cases for this method may include: - -* Inspecting transaction details for debugging purposes -* Gathering data for transaction analysis -* Fetching transaction information for specific blocks in a block explorer application - -### Parameters - -The `eth_getTransactionByBlockHashAndIndex` method accepts two parameters: - -1. `blockNumber` (required): The hash of the block containing the transaction. - * Example: `"0xC44FF8"` -2. `transactionIndex` (required): The index of the transaction within the specified block. The index is a hexadecimal value. - * Example: `"0x0"` - -### Return Object - -The method returns a JSON object containing the following fields: - -1. `hash`: The transaction hash as a 32-byte hex string. -2. `nonce`: The number of transactions made by the sender prior to this one. -3. `blockHash`: The hash of the block in which this transaction is included. -4. `blockNumber`: The block number in which this transaction is included. -5. `transactionIndex`: The index of the transaction within the block. -6. `from`: The address of the sender. -7. `to`: The address of the recipient. `null` if the transaction is a contract creation transaction. -8. `value`: The value transferred in wei. -9. `gasPrice`: The gas price provided by the sender in wei. -10. `gas`: The gas limit provided by the sender. -11. `input`: The data sent along with the transaction. \ No newline at end of file diff --git a/v1.0/RPC Nodes/rpc-evm/rpc-cronos/eth_gettransactionbyhash.md b/v1.0/RPC Nodes/rpc-evm/rpc-cronos/eth_gettransactionbyhash.md deleted file mode 100644 index c15d3b0c..00000000 --- a/v1.0/RPC Nodes/rpc-evm/rpc-cronos/eth_gettransactionbyhash.md +++ /dev/null @@ -1,64 +0,0 @@ ---- -title: "eth_gettransactionbyhash" -slug: "rpc-cronos-eth_gettransactionbyhash" -excerpt: "Cronos RPC" -category: 65c5e93c623cad004b45d505 -hidden: false -metadata: - description: "Cronos RPC" - image: [] - keywords: "cronos, rpc" - robots: "index" -createdAt: "Wed Mar 06 2024 10:35:44 GMT+0000 (Coordinated Universal Time)" -updatedAt: "Tue Apr 02 2024 08:40:59 GMT+0000 (Coordinated Universal Time)" ---- -[block:html]{"html":"
\n
Archive Method
\n

Only on the full archive nodes. Complex queries might take longer and incur additional cost

\n
"}[/block] - -### How to use it - -{% tabs %} -{% tab title="TypeScript/JavaScript" %} -{% code overflow="wrap" lineNumbers="true" %} -```typescript -// yarn add @tatumio/tatum - -import { TatumSDK, Cronos, Network } from '@tatumio/tatum' - -const tatum = await TatumSDK.init({network: Network.CRONOS}) - -const tx = await tatum.rpc.getTransactionByHash('0x068f00756843c4fa018771decb06767e0e6a57045eabcbce1125a56115f2742a') - -await tatum.destroy() // Destroy Tatum SDK - needed for stopping background jobs -``` -{% endcode %} -{% endtab %} -{% endtabs %} - -### Overview - -`eth_getTransactionByHash` is an JSON-RPC method that allows you to query transaction details based on its hash. This method is useful when you want to retrieve information about a specific transaction, such as its sender, receiver, value, and more. Common use cases include tracking transaction status, monitoring incoming transactions, or analyzing historical transaction data. - -### Parameters - -The `eth_getTransactionByHash` method takes one parameter: - -* **`transactionHash`**: The hash of the transaction you want to retrieve. This should be a 32-byte hash string with a `0x` prefix. - * Example: `"0x068f00756843c4fa018771decb06767e0e6a57045eabcbce1125a56115f2742a"` - -### Return Object - -The method returns a transaction object with the following fields: - -* **`hash`**: The hash of the transaction (32 bytes). -* **`nonce`**: The number of transactions sent by the sender prior to this one (integer). -* **`blockHash`**: The hash of the block in which the transaction was included (32 bytes), or `null` if the transaction is not yet mined. -* **`blockNumber`**: The block number in which the transaction was included (integer), or `null` if the transaction is not yet mined. -* **`transactionIndex`**: The index of the transaction in the block (integer), or `null` if the transaction is not yet mined. -* **`from`**: The address of the sender (20 bytes). -* **`to`**: The address of the receiver (20 bytes), or `null` for contract creation transactions. -* **`value`**: The value transferred in the transaction, in wei. -* **`gasPrice`**: The price of gas for the transaction, in wei. -* **`maxFeePerGas`** - The maximum fee per gas set in the transaction. -* **`maxPriorityFeePerGas`** - The maximum priority gas fee set in the transaction. -* **`gas`**: The maximum amount of gas the transaction is allowed to consume. -* **`input`**: The data payload of the transaction (string), or `0x` for simple value transfers. \ No newline at end of file diff --git a/v1.0/RPC Nodes/rpc-evm/rpc-cronos/eth_gettransactioncount.md b/v1.0/RPC Nodes/rpc-evm/rpc-cronos/eth_gettransactioncount.md deleted file mode 100644 index 74204ec5..00000000 --- a/v1.0/RPC Nodes/rpc-evm/rpc-cronos/eth_gettransactioncount.md +++ /dev/null @@ -1,67 +0,0 @@ ---- -title: "eth_gettransactioncount" -slug: "rpc-cronos-eth_gettransactioncount" -excerpt: "Cronos RPC" -category: 65c5e93c623cad004b45d505 -hidden: false -metadata: - description: "Cronos RPC" - image: [] - keywords: "cronos, rpc" - robots: "index" -createdAt: "Wed Mar 06 2024 10:35:44 GMT+0000 (Coordinated Universal Time)" -updatedAt: "Tue Apr 02 2024 08:40:59 GMT+0000 (Coordinated Universal Time)" ---- -[block:html]{"html":"
\n
Archive Method
\n

Only on the full archive nodes. Complex queries might take longer and incur additional cost

\n
"}[/block] - -### How to use it - -{% tabs %} -{% tab title="TypeScript/JavaScript" %} -{% code overflow="wrap" lineNumbers="true" %} - -```typescript -// yarn add @tatumio/tatum - -import { TatumSDK, Cronos, Network } from "@tatumio/tatum"; - -const tatum = await TatumSDK.init({ network: Network.CRONOS }); - -const result = await tatum.rpc.getTransactionCount( - "0xa8622d582dc31e5d1c1871a1509f40aa690352ce", - "latest" -); - -await tatum.destroy(); // Destroy Tatum SDK - needed for stopping background jobs -``` - -{% endcode %} -{% endtab %} -{% endtabs %} - -### Overview - -The `eth_getTransactionCount` method is an JSON-RPC method that retrieves the number of transactions sent from a given address. It is a useful method for developers who need to keep track of an account's nonce value to avoid transaction collisions or incorrect order of execution. The nonce value is essential for ensuring transaction uniqueness and preventing replay attacks. - -Use cases for this method include: - -- Determining the nonce value for a new transaction to be sent from a specific address -- Monitoring the number of transactions sent by an address to observe its activity -- Troubleshooting transaction issues and verifying if a transaction was submitted successfully - -### Parameters - -The `eth_getTransactionCount` method accepts two parameters: - -1. **`address`** - The address whose transaction count will be retrieved. - - Example: `"0xa8622d582dc31e5d1c1871a1509f40aa690352ce"` -2. **`blockParameter`** - A string indicating the block number or block state to consider when retrieving the transaction count. - - Possible values: `"earliest"`, `"latest"`, `"pending"`, or a specific block number in hexadecimal format - - Example: `"latest"` - -### Return Object - -The method returns a single value: - -- **`transactionCount`** - A hexadecimal representation of the number of transactions sent from the specified address. - - Example: `"0x1e"` diff --git a/v1.0/RPC Nodes/rpc-evm/rpc-cronos/eth_gettransactionreceipt.md b/v1.0/RPC Nodes/rpc-evm/rpc-cronos/eth_gettransactionreceipt.md deleted file mode 100644 index 4b659022..00000000 --- a/v1.0/RPC Nodes/rpc-evm/rpc-cronos/eth_gettransactionreceipt.md +++ /dev/null @@ -1,63 +0,0 @@ ---- -title: "eth_gettransactionreceipt" -slug: "rpc-cronos-eth_gettransactionreceipt" -excerpt: "Cronos RPC" -category: 65c5e93c623cad004b45d505 -hidden: false -metadata: - description: "Cronos RPC" - image: [] - keywords: "cronos, rpc" - robots: "index" -createdAt: "Wed Mar 06 2024 10:35:44 GMT+0000 (Coordinated Universal Time)" -updatedAt: "Tue Apr 02 2024 08:40:59 GMT+0000 (Coordinated Universal Time)" ---- -[block:html]{"html":"
\n
Archive Method
\n

Only on the full archive nodes. Complex queries might take longer and incur additional cost

\n
"}[/block] - -### How to use it - -{% tabs %} -{% tab title="TypeScript/JavaScript" %} -{% code overflow="wrap" lineNumbers="true" %} -```typescript -// yarn add @tatumio/tatum - -import { TatumSDK, Cronos, Network } from '@tatumio/tatum' - -const tatum = await TatumSDK.init({network: Network.CRONOS}) - -const tx = await tatum.rpc.getTransactionReceipt('0x6aefbd1a9c9e4c310cadde3bcdd809a14da87caa8fa4f10ca04d9e357a3907e9') - -await tatum.destroy() // Destroy Tatum SDK - needed for stopping background jobs -``` -{% endcode %} -{% endtab %} -{% endtabs %} - -### Overview - -`eth_getTransactionReceipt` is an JSON-RPC method that retrieves the transaction receipt of a given transaction hash. This method is particularly useful when you need to obtain detailed information about a transaction's execution, such as its status (success or failure), gas usage, and logs (events). Common use cases include checking the status of a transaction after it has been mined or inspecting the events emitted by a smart contract during a specific transaction. - -### Parameters - -This method requires a single parameter: - -* **`transactionHash`**: The hash of the transaction for which you want to obtain the receipt. - * Example: `"0x068f00756843c4fa018771decb06767e0e6a57045eabcbce1125a56115f2742a"` - -### Return Object - -The method returns an object containing the following fields: - -* **`transactionHash`**: The hash of the transaction. -* **`transactionIndex`**: The transaction's index position in the block. -* **`blockHash`**: The hash of the block where this transaction was mined. -* **`blockNumber`**: The block number where this transaction was mined. -* **`from`**: The address of the sender. -* **`to`**: The address of the receiver. `null` when it's a contract creation transaction. -* **`cumulativeGasUsed`**: The total amount of gas used when this transaction was executed in the block. -* **`gasUsed`**: The amount of gas used by this specific transaction alone. -* **`contractAddress`**: The address of the contract created, if the transaction was a contract creation. Otherwise, `null`. -* **`logs`**: An array of log objects, which were emitted during the transaction. -* **`logsBloom`**: A 256-byte bloom filter, which is a compressed representation of the logs emitted during the transaction. -* **`status`**: The status of the transaction's execution. `"0x1"` indicates success, while `"0x0"` indicates failure. \ No newline at end of file diff --git a/v1.0/RPC Nodes/rpc-evm/rpc-cronos/eth_getunclecountbyblockhash.md b/v1.0/RPC Nodes/rpc-evm/rpc-cronos/eth_getunclecountbyblockhash.md deleted file mode 100644 index ec0d1e3a..00000000 --- a/v1.0/RPC Nodes/rpc-evm/rpc-cronos/eth_getunclecountbyblockhash.md +++ /dev/null @@ -1,54 +0,0 @@ ---- -title: "eth_getunclecountbyblockhash" -slug: "rpc-cronos-eth_getunclecountbyblockhash" -excerpt: "Cronos RPC" -category: 65c5e93c623cad004b45d505 -hidden: false -metadata: - description: "Cronos RPC" - image: [] - keywords: "cronos, rpc" - robots: "index" -createdAt: "Wed Mar 06 2024 10:35:44 GMT+0000 (Coordinated Universal Time)" -updatedAt: "Tue Apr 02 2024 08:40:59 GMT+0000 (Coordinated Universal Time)" ---- -[block:html]{"html":"
\n
Archive Method
\n

Only on the full archive nodes. Complex queries might take longer and incur additional cost

\n
"}[/block] - -### How to use it - -{% tabs %} -{% tab title="TypeScript/JavaScript" %} -{% code overflow="wrap" lineNumbers="true" %} -```typescript -// yarn add @tatumio/tatum - -import { TatumSDK, Cronos, Network } from '@tatumio/tatum' - -const tatum = await TatumSDK.init({network: Network.CRONOS}) - -const result = await tatum.rpc.getUncleCountByBlockHash('0x6565fd5921f93655e77d8cfeab8aa6caaf7155aeae24e91cdca33eedc66e6c5a') - -await tatum.destroy() // Destroy Tatum SDK - needed for stopping background jobs -``` -{% endcode %} -{% endtab %} -{% endtabs %} - -### Overview - -The `eth_getUncleCountByBlockHash` method is an JSON-RPC method that returns the number of uncles in a specified block by its hash. This method can be useful for gathering information about the performance of the network and to analyze the security of the blockchain. - -Uncles are blocks that are not included in the main blockchain but are still valid, and they contribute to the overall security and decentralization of the network. The inclusion of uncles helps prevent centralization and ensures the mining process remains competitive. - -### Parameters - -The `eth_getUncleCountByBlockHash` method takes one parameter: - -* `blockHash`: The hash of the block for which you want to get the uncle count. - * Example value: `"0x6565fd5921f93655e77d8cfeab8aa6caaf7155aeae24e91cdca33eedc66e6c5a"` - -### Return Object - -The return object for this method is a hex-encoded integer representing the number of uncles in the specified block. - -* Example value: `"0x1"` (1 uncle) \ No newline at end of file diff --git a/v1.0/RPC Nodes/rpc-evm/rpc-cronos/eth_getunclecountbyblocknumber.md b/v1.0/RPC Nodes/rpc-evm/rpc-cronos/eth_getunclecountbyblocknumber.md deleted file mode 100644 index fb8159e2..00000000 --- a/v1.0/RPC Nodes/rpc-evm/rpc-cronos/eth_getunclecountbyblocknumber.md +++ /dev/null @@ -1,54 +0,0 @@ ---- -title: "eth_getunclecountbyblocknumber" -slug: "rpc-cronos-eth_getunclecountbyblocknumber" -excerpt: "Cronos RPC" -category: 65c5e93c623cad004b45d505 -hidden: false -metadata: - description: "Cronos RPC" - image: [] - keywords: "cronos, rpc" - robots: "index" -createdAt: "Wed Mar 06 2024 10:35:44 GMT+0000 (Coordinated Universal Time)" -updatedAt: "Tue Apr 02 2024 08:40:59 GMT+0000 (Coordinated Universal Time)" ---- -[block:html]{"html":"
\n
Archive Method
\n

Only on the full archive nodes. Complex queries might take longer and incur additional cost

\n
"}[/block] - -### How to use it - -{% tabs %} -{% tab title="TypeScript/JavaScript" %} -{% code overflow="wrap" lineNumbers="true" %} -```typescript -// yarn add @tatumio/tatum - -import { TatumSDK, Cronos, Network } from '@tatumio/tatum' - -const tatum = await TatumSDK.init({network: Network.CRONOS}) - -const result = await tatum.rpc.getUncleCountByBlockNumber('0xC44FF8') - -await tatum.destroy() // Destroy Tatum SDK - needed for stopping background jobs -``` -{% endcode %} -{% endtab %} -{% endtabs %} - -### Overview - -The `eth_getUncleCountByBlockHash` method is an JSON-RPC method that returns the number of uncles in a specified block by its hash. This method can be useful for gathering information about the performance of the network and to analyze the security of the blockchain. - -Uncles are blocks that are not included in the main blockchain but are still valid, and they contribute to the overall security and decentralization of the network. The inclusion of uncles helps prevent centralization and ensures the mining process remains competitive. - -### Parameters - -The `eth_getUncleCountByBlockHash` method takes one parameter: - -* `blockNumber`: The number of the block for which you want to get the uncle count. - * Example value: `"0xC44FF8"` - -### Return Object - -The return object for this method is a hex-encoded integer representing the number of uncles in the specified block. - -* Example value: `"0x1"` (1 uncle) \ No newline at end of file diff --git a/v1.0/RPC Nodes/rpc-evm/rpc-cronos/txpool_content.md b/v1.0/RPC Nodes/rpc-evm/rpc-cronos/txpool_content.md deleted file mode 100644 index 1edc3d1d..00000000 --- a/v1.0/RPC Nodes/rpc-evm/rpc-cronos/txpool_content.md +++ /dev/null @@ -1,73 +0,0 @@ ---- -title: "txpool_content" -slug: "rpc-cronos-txpool_content" -excerpt: "Cronos RPC" -category: 65c5e93c623cad004b45d505 -hidden: false -metadata: - description: "Cronos RPC" - image: [] - keywords: "cronos, rpc" - robots: "index" -createdAt: "Wed Mar 06 2024 10:35:44 GMT+0000 (Coordinated Universal Time)" -updatedAt: "Tue Apr 02 2024 08:40:59 GMT+0000 (Coordinated Universal Time)" ---- -[block:html]{"html":"
\n
Archive Method
\n

Only on the full archive nodes. Complex queries might take longer and incur additional cost

\n
"}[/block] - -### How to use it - -{% tabs %} -{% tab title="TypeScript/JavaScript" %} -{% code overflow="wrap" lineNumbers="true" %} -```typescript -// yarn add @tatumio/tatum - -import { TatumSDK, Cronos, Network } from '@tatumio/tatum' - -const tatum = await TatumSDK.init({network: Network.CRONOS}) - -const content = await tatum.rpc.txPoolContent() - -await tatum.destroy() // Destroy Tatum SDK - needed for stopping background jobs -``` -{% endcode %} -{% endtab %} -{% endtabs %} - -### Overview - -The `txpool_content` method provides information about the transactions currently pending in the transaction pool of the node. It can be helpful for developers and node operators to monitor and manage the transaction pool, especially in scenarios where it's necessary to analyze transaction congestion or prioritize specific transactions. - -Use cases for the `txpool_content` method include: - -* Analyzing network congestion by inspecting the transaction pool -* Prioritizing transactions by gas price -* Monitoring transactions from specific addresses -* Debugging and troubleshooting pending transactions - -### Parameters - -This method does not require any parameters. - -### Return Object - -The `txpool_content` method returns an object with two fields: `pending` and `queued`. Each field contains a nested object with addresses as keys and their respective transactions as values. - -* **`pending`**: An object containing transactions that are currently pending for inclusion in the next block(s). -* **`queued`**: An object containing transactions that are currently queued (i.e., transactions that do not meet certain criteria for inclusion in the next block, like low gas price or nonce gaps). - -Each transaction object includes the following information: - -* **`hash`**: The hash of the transaction (32 bytes). -* **`nonce`**: The number of transactions sent by the sender prior to this one (integer). -* **`blockHash`**: The hash of the block in which the transaction was included (32 bytes), or `null` if the transaction is not yet mined. -* **`blockNumber`**: The block number in which the transaction was included (integer), or `null` if the transaction is not yet mined. -* **`transactionIndex`**: The index of the transaction in the block (integer), or `null` if the transaction is not yet mined. -* **`from`**: The address of the sender (20 bytes). -* **`to`**: The address of the receiver (20 bytes), or `null` for contract creation transactions. -* **`value`**: The value transferred in the transaction, in wei. -* **`gasPrice`**: The price of gas for the transaction, in wei. -* **`maxFeePerGas`** - The maximum fee per gas set in the transaction. -* **`maxPriorityFeePerGas`** - The maximum priority gas fee set in the transaction. -* **`gas`**: The maximum amount of gas the transaction is allowed to consume. -* **`input`**: The data payload of the transaction (string), or `0x` for simple value transfers. \ No newline at end of file diff --git a/v1.0/RPC Nodes/rpc-evm/rpc-cronos/txpool_inspect.md b/v1.0/RPC Nodes/rpc-evm/rpc-cronos/txpool_inspect.md deleted file mode 100644 index 86b9c068..00000000 --- a/v1.0/RPC Nodes/rpc-evm/rpc-cronos/txpool_inspect.md +++ /dev/null @@ -1,52 +0,0 @@ ---- -title: "txpool_inspect" -slug: "rpc-cronos-txpool_inspect" -excerpt: "Cronos RPC" -category: 65c5e93c623cad004b45d505 -hidden: false -metadata: - description: "Cronos RPC" - image: [] - keywords: "cronos, rpc" - robots: "index" -createdAt: "Wed Mar 06 2024 10:35:44 GMT+0000 (Coordinated Universal Time)" -updatedAt: "Tue Apr 02 2024 08:40:59 GMT+0000 (Coordinated Universal Time)" ---- -[block:html]{"html":"
\n
Archive Method
\n

Only on the full archive nodes. Complex queries might take longer and incur additional cost

\n
"}[/block] - -### How to use it - -{% tabs %} -{% tab title="TypeScript/JavaScript" %} -{% code overflow="wrap" lineNumbers="true" %} -```typescript -// yarn add @tatumio/tatum - -import { TatumSDK, Cronos, Network } from '@tatumio/tatum' - -const tatum = await TatumSDK.init({network: Network.CRONOS}) - -const inspect = await tatum.rpc.txPoolInspect() - -await tatum.destroy() // Destroy Tatum SDK - needed for stopping background jobs -``` -{% endcode %} -{% endtab %} -{% endtabs %} - -### Overview - -The `txpool_inspect` method is a JSON-RPC method used to inspect the current transaction pool of a running node. The method allows you to view all pending transactions and their details, including transaction hashes, gas prices, and transaction data. This method is useful for developers who want to monitor the status of pending transactions or debug transaction-related issues. - -### Parameters - -The `txpool_inspect` method takes one optional parameter: - -* **`include`**: A string specifying the type of transactions to include in the response. Possible values are **`pending`** (default) and **`queued`**. - -### Return Object - -The `txpool_inspect` method returns an object with the following fields: - -* **`pending`**: An array of transaction objects, with textual data -* **`queued`**: An array of transaction objects, with textual data \ No newline at end of file diff --git a/v1.0/RPC Nodes/rpc-evm/rpc-cronos.md b/v1.0/RPC Nodes/rpc-evm/rpc-ethereum-classic.md similarity index 80% rename from v1.0/RPC Nodes/rpc-evm/rpc-cronos.md rename to v1.0/RPC Nodes/rpc-evm/rpc-ethereum-classic.md index ec25bae8..6569b19d 100644 --- a/v1.0/RPC Nodes/rpc-evm/rpc-cronos.md +++ b/v1.0/RPC Nodes/rpc-evm/rpc-ethereum-classic.md @@ -1,6 +1,6 @@ --- -title: "Cronos" -slug: "rpc-cronos" +title: "Ethereum Classic" +slug: "rpc-ethereum-classic" excerpt: "" category: 65c5e93c623cad004b45d505 hidden: false diff --git a/v1.0/RPC Nodes/rpc-evm/rpc-ethereum-classic/debug_getbadblocks.md b/v1.0/RPC Nodes/rpc-evm/rpc-ethereum-classic/debug_getbadblocks.md new file mode 100644 index 00000000..61deae76 --- /dev/null +++ b/v1.0/RPC Nodes/rpc-evm/rpc-ethereum-classic/debug_getbadblocks.md @@ -0,0 +1,116 @@ +--- +title: "debug_getbadblocks" +slug: "rpc-ethereum-classic-debug_getbadblocks" +excerpt: "Ethereum Classic RPC" +category: 65c5e93c623cad004b45d505 +hidden: false +metadata: + description: "Ethereum Classic RPC" + image: [] + keywords: "ethereum classic , rpc" + robots: "index" +createdAt: "Wed Mar 06 2024 10:35:44 GMT+0000 (Coordinated Universal Time)" +updatedAt: "Tue Apr 02 2024 08:40:59 GMT+0000 (Coordinated Universal Time)" +--- +[block:html]{"html":"
\n
Archive Method
\n

Only on the full archive nodes. Complex queries might take longer and incur additional cost

\n
"}[/block] + +### How to use it + +{% tabs %} +{% tab title="TypeScript/JavaScript" %} +{% code overflow="wrap" lineNumbers="true" %} +```typescript +// yarn add @tatumio/tatum + +import { TatumSDK, EthereumClassic, Network } from '@tatumio/tatum' + +const tatum = await TatumSDK.init({network: Network.ETHEREUM_CLASSIC}) + +const result = await tatum.rpc.debugGetBadBlocks() + +await tatum.destroy() // Destroy Tatum SDK - needed for stopping background jobs +``` +{% endcode %} +{% endtab %} +{% endtabs %} + +### Overview + +`debug_getBadBlocks` is an RPC method that provides a list of the most recent bad blocks encountered by the client on the network. This feature is valuable for developers and node operators, as it enables them to identify and address any issues or anomalies related to block validation and synchronization. + +By accessing `debug_getBadBlocks`, they can diagnose potential problems and take appropriate actions to ensure the network's stability and integrity. + +### Parameters + +* This method does not accept any parameters. + +### Return Object + +The output is an array of objects, with each object representing the trace result of a transaction within the block. These objects include essential details such as the transaction hash and a block object, which can be null if no block was found for the transaction: + +* `baseFeePerGas`: The integer representation of the difficulty for this block encoded as hexadecimal. +* `difficulty`: The integer representation of the difficulty for this block encoded as hexadecimal. +* `extraData`: The extra data field of this block. +* `gasLimit`: The maximum gas allowed in this block encoded as hexadecimal. +* `gasUsed`: The total used gas by all transactions in this block encoded as hexadecimal. +* `logsBloom`: The bloom filter for the logs of the block. Null if pending. +* `miner`: The address of the beneficiary to whom the mining rewards were given. +* `mixHash`: A 256-bit hash encoded as hexadecimal. +* `nonce`: The hash of the generated proof-of-work. Null if pending. +* `number`: The block number of the requested block encoded as hexadecimal. Null if pending. +* `parentHash`: The hash of the parent block. +* `receiptsRoot`: The root of the receipts trie of the block. +* `sha3Uncles`: The SHA3 of the uncles' data in the block. +* `size`: The size of this block in bytes as an Integer value encoded as hexadecimal. +* `stateRoot`: The root of the final state trie of the block. +* `timestamp`: The Unix timestamp for when the block was collated. +* `transactions`: An array of transaction objects with the following fields: + * `blockHash`: The hash of the block where this log was in. Null when it's a pending log. + * `blockNumber`: The block number where this log was in. Null when it's a pending log. + * `from`: The address of the sender. + * `gas`: The gas provided by the sender, encoded as hexadecimal. + * `gasPrice`: The gas price provided by the sender in wei, encoded as hexadecimal. + * `maxFeePerGas`: The maximum fee per gas set in the transaction. + * `maxPriorityFeePerGas`: The maximum priority gas fee set in the transaction. + * `hash`: The hash of the transaction. + * `input`: The data sent along with the transaction. + * `nonce`: The number of transactions made by the sender before this one encoded as hexadecimal. + * `to`: The address of the receiver. Null when it's a contract creation transaction. + * `transactionIndex`: The integer of the transaction's index position that the log was created from. Null when it's a pending log. + * `value`: The value transferred in wei encoded as hexadecimal. + * `type`: The transaction type. + * `accessList`: A list of addresses and storage keys that the transaction plans to access. + * `chainId`: The chain id of the transaction, if any. + * `v`: The standardized V field of the signature. + * `r`: The R field of the signature. + * `s`: The S field of the signature. +* `transactionsRoot`: The root of the transaction trie of the block. +* `uncles`: An array of uncle hashes. +* `rlp`: The RLP encoded header. + +{% hint style="info" %} +This method is available only on the full archive node. +{% endhint %} + +### JSON-RPC Request and Response Examples + +#### Request + +```json +{ + "id": 1, + "jsonrpc": "2.0", + "method": "debug_getBadBlocks", + "params": [] +} +``` + +#### Response + +```json +{ + "jsonrpc": "2.0", + "id": 1, + "result": [] +} +``` diff --git a/v1.0/RPC Nodes/rpc-evm/rpc-ethereum-classic/debug_storagerangeat.md b/v1.0/RPC Nodes/rpc-evm/rpc-ethereum-classic/debug_storagerangeat.md new file mode 100644 index 00000000..cfb201c6 --- /dev/null +++ b/v1.0/RPC Nodes/rpc-evm/rpc-ethereum-classic/debug_storagerangeat.md @@ -0,0 +1,97 @@ +--- +title: "debug_storagerangeat" +slug: "rpc-ethereum-classic-debug_storagerangeat" +excerpt: "Ethereum Classic RPC" +category: 65c5e93c623cad004b45d505 +hidden: false +metadata: + description: "Ethereum Classic RPC" + image: [] + keywords: "ethereum classic , rpc" + robots: "index" +createdAt: "Wed Mar 06 2024 10:35:44 GMT+0000 (Coordinated Universal Time)" +updatedAt: "Tue Apr 02 2024 08:40:59 GMT+0000 (Coordinated Universal Time)" +--- +[block:html]{"html":"
\n
Archive Method
\n

Only on the full archive nodes. Complex queries might take longer and incur additional cost

\n
"}[/block] + +### How to use it + +{% tabs %} +{% tab title="TypeScript/JavaScript" %} +{% code overflow="wrap" lineNumbers="true" %} +```typescript +// yarn add @tatumio/tatum + +import { TatumSDK, EthereumClassic, Network } from '@tatumio/tatum' + +const tatum = await TatumSDK.init({network: Network.ETHEREUM_CLASSIC}) + +const res = await tatum.rpc.debugStorageRangeAt( + '0x23d252bc4008a28b149cf9aa94a592dc488de13281ce6fab5b8bc681bab906fd', + 0, '0x3B20DF51FAbc46e8A8BE13C295569D88D12f6868', '0x0000000000000000000000000000000000000000000000000000000000000000', 1 + ) + +await tatum.destroy() // Destroy Tatum SDK - needed for stopping background jobs +``` +{% endcode %} +{% endtab %} +{% endtabs %} + +### Overview + +`debug_storageRangeAt` is an RPC method that allows you to retrieve the contract storage range for a given block and address. This can be useful for developers and auditors who want to inspect the storage state of a specific contract at a particular point in time. This method can also help in debugging and identifying potential issues with contract storage, as well as understanding how storage evolves as transactions are executed. + +### Parameters + +The `debug_storageRangeAt` method accepts the following parameters: + +* `blockHash`: The block hash for which the storage range should be retrieved. Example: `"0x3c4523b7e8c21e3d68f1c3af3d18e8a87c0d43e35b2c1b7f8f4e87e4d4db9c82"` +* `txIndex`: The transaction index within the specified block. Example: 1 +* `address`: The contract address for which the storage range should be retrieved. Example: `"0x742d35Cc6634C0532925a3b844Bc454e4438f44e"` +* `begin`: The beginning of the storage range. Example: `"0x0000000000000000000000000000000000000000000000000000000000000000"` +* `end`: The end of the storage range. Example: `1` (inclusive) + +### Return Object + +The `debug_storageRangeAt` method returns an object with the following fields: + +* `storage`: An object that contains key-value pairs representing the contract storage, where the key is the storage slot and the value is the stored data. Example: `"0x00..01": "0x00..01"` +* `nextKey`: A key indicating the next storage slot if the requested range is too large, otherwise `null`. Example: `"0x00..02"` or `null` + +{% hint style="info" %} +This method is available only on the full archive node. +{% endhint %} + +### JSON-RPC Request and Response Examples + +#### Request + +```json +{ + "jsonrpc": "2.0", + "id": 1, + "method": "debug_storageRangeAt", + "params": [ + "0x3c4523b7e8c21e3d68f1c3af3d18e8a87c0d43e35b2c1b7f8f4e87e4d4db9c82", + "0x1", + "0x742d35Cc6634C0532925a3b844Bc454e4438f44e", + "0x0000000000000000000000000000000000000000000000000000000000000000", 1 + ] +} +``` + +#### Response + +```json +{ + "jsonrpc": "2.0", + "id": 1, + "result": { + "storage": { + "0x0000000000000000000000000000000000000000000000000000000000000001": "0x0000000000000000000000000000000000000000000000000000000000000001", + "0x0000000000000000000000000000000000000000000000000000000000000002": "0x0000000000000000000000000000000000000000000000000000000000000002" + }, + "nextKey": "0x0000000000000000000000000000000000000000000000000000000000000065" + } +} +``` diff --git a/v1.0/RPC Nodes/rpc-evm/rpc-ethereum-classic/debug_traceblock.md b/v1.0/RPC Nodes/rpc-evm/rpc-ethereum-classic/debug_traceblock.md new file mode 100644 index 00000000..9e67975d --- /dev/null +++ b/v1.0/RPC Nodes/rpc-evm/rpc-ethereum-classic/debug_traceblock.md @@ -0,0 +1,119 @@ +--- +title: "debug_traceblock" +slug: "rpc-ethereum-classic-debug_traceblock" +excerpt: "Ethereum Classic RPC" +category: 65c5e93c623cad004b45d505 +hidden: false +metadata: + description: "Ethereum Classic RPC" + image: [] + keywords: "ethereum classic , rpc" + robots: "index" +createdAt: "Wed Mar 06 2024 10:35:44 GMT+0000 (Coordinated Universal Time)" +updatedAt: "Tue Apr 02 2024 08:40:59 GMT+0000 (Coordinated Universal Time)" +--- +[block:html]{"html":"
\n
Archive Method
\n

Only on the full archive nodes. Complex queries might take longer and incur additional cost

\n
"}[/block] + +### How to use it + +{% tabs %} +{% tab title="TypeScript/JavaScript" %} +{% code overflow="wrap" lineNumbers="true" %} +```typescript +// yarn add @tatumio/tatum + +import { TatumSDK, EthereumClassic, Network } from '@tatumio/tatum' + +const tatum = await TatumSDK.init({network: Network.ETHEREUM_CLASSIC}) + +const res = await tatum.rpc.debugTraceBlock('0xC3' ,{ + tracer: 'callTracer', + tracerConfig: { + onlyTopCall: true, + timeout: '5s', + } +}) + +await tatum.destroy() // Destroy Tatum SDK - needed for stopping background jobs +``` +{% endcode %} +{% endtab %} +{% endtabs %} + +### Overview + +`debug_traceBlock` is an RPC method that allows developers to trace all transactions within a block using a given tracer. This is particularly useful for analyzing the behavior of all transactions in a block, investigating potential issues, and understanding the flow of execution within smart contracts. + +By using the `debug_traceBlock`, developers can obtain detailed insights into the execution flow of each transaction, allowing for in-depth analysis and debugging + +### Parameters + +* `block` - `String` + * RLP encoded block object. +* `options` (optional): An object containing configuration options for the tracer. + * `tracer`: The tracer object with the following fields: + * `callTracer`: The calltracer keeps track of all call frames, including depth 0 calls, made during a transaction. + * `prestateTracer`: The prestateTracer replays the transaction and tracks every part of the state that occurred during the transaction. + * `tracerConfig`: The object to specify the configurations of the tracer. + * onlyTopCall: When set to true, it traces only the primary (top-level) call and not any sub-calls, eliminating additional processing for each call frame. + +### Return Object + +The return object is an array of all invoked opcodes of all transaction that were included in this block. + +* `type`: The type of the call. +* `from`: The address from which the transaction is sent. +* `to`: The address to which the transaction is directed. +* `value`: The integer value sent with this transaction. +* `gas`: The integer value of the gas provided for the transaction execution. +* `gasUsed`: The integer value of the gas used. +* `input`: The data given at the time of input. +* `output`: The data returned as an output. +* `calls`: A list of sub-calls made during the transaction, including detailed trace information for each sub-call. + +{% hint style="info" %} +This method is available only on the full archive node. +{% endhint %} + +### JSON-RPC Request and Response Examples + +#### Request + +```json +{ + "id": 1, + "jsonrpc": "2.0", + "method": "debug_traceBlock", + "params": [ + "0x1dc....", + { + "tracer": "callTracer" + } + ] +} + +``` + +#### Response + +```json +{ + "id": 1, + "jsonrpc": "2.0", + "result": [ + { + "result": { + "from": "0x8894e0a0c962cb723c1976a4421c95949be2d4e3", + "gas": "0x2d48c", + "gasUsed": "0xc7ab", + "to": "0x55d398326f99059ff775485246999027b3197955", + "input": "0xa9059cbb0000000000000000000000003b9f33b3a9d382fa60283c555bde8f78855957be00000000000000000000000000000000000000000000000d4e7f4f79da7c0000", + "output": "0x0000000000000000000000000000000000000000000000000000000000000001", + "value": "0x0", + "type": "CALL" + } + } + ] +} + +``` diff --git a/v1.0/RPC Nodes/rpc-evm/rpc-cronos/debug_traceblockbyhash.md b/v1.0/RPC Nodes/rpc-evm/rpc-ethereum-classic/debug_traceblockbyhash.md similarity index 62% rename from v1.0/RPC Nodes/rpc-evm/rpc-cronos/debug_traceblockbyhash.md rename to v1.0/RPC Nodes/rpc-evm/rpc-ethereum-classic/debug_traceblockbyhash.md index 9a819410..6381f1e6 100644 --- a/v1.0/RPC Nodes/rpc-evm/rpc-cronos/debug_traceblockbyhash.md +++ b/v1.0/RPC Nodes/rpc-evm/rpc-ethereum-classic/debug_traceblockbyhash.md @@ -1,13 +1,13 @@ --- title: "debug_traceblockbyhash" -slug: "rpc-cronos-debug_traceblockbyhash" -excerpt: "Cronos RPC" +slug: "rpc-ethereum-classic-debug_traceblockbyhash" +excerpt: "Ethereum Classic RPC" category: 65c5e93c623cad004b45d505 hidden: false metadata: - description: "Cronos RPC" + description: "Ethereum Classic RPC" image: [] - keywords: "cronos, rpc" + keywords: "ethereum classic , rpc" robots: "index" createdAt: "Wed Mar 06 2024 10:35:44 GMT+0000 (Coordinated Universal Time)" updatedAt: "Tue Apr 02 2024 08:40:59 GMT+0000 (Coordinated Universal Time)" @@ -22,12 +22,12 @@ updatedAt: "Tue Apr 02 2024 08:40:59 GMT+0000 (Coordinated Universal Time)" ```typescript // yarn add @tatumio/tatum -import { TatumSDK, Cronos, Network } from '@tatumio/tatum' +import { TatumSDK, EthereumClassic, Network } from '@tatumio/tatum' -const tatum = await TatumSDK.init({network: Network.CRONOS}) +const tatum = await TatumSDK.init({network: Network.ETHEREUM_CLASSIC}) const result = await tatum.rpc.debugTraceBlockByHash( -'0xe1ceb5e388aecc721a60691659ca7b388612d323cf75da6b9e766b8a440864c2', +'0x23d252bc4008a28b149cf9aa94a592dc488de13281ce6fab5b8bc681bab906fd', { tracer: 'callTracer', tracerConfig: { @@ -45,14 +45,14 @@ await tatum.destroy() // Destroy Tatum SDK - needed for stopping background jobs ### Overview -`debug_traceBlockByHash` is an RPC method that allows developers to trace all transactions within a block using a given tracer. This is particularly useful for analyzing the behavior of all transactions in a block, investigating potential issues, and understanding the flow of execution within smart contracts. +`debug_traceBlockByHash` is an Flare RPC method that allows developers to trace all transactions within a block using a given tracer. This is particularly useful for analyzing the behavior of all transactions in a block, investigating potential issues, and understanding the flow of execution within smart contracts. By using the `callTracer` tracer, developers can obtain more detailed information about the calls made during each transaction, including the input, output, and depth of the calls. ### Parameters * `block_hash` (required): The hash of the block to be traced. - * Example: `"0xe1ceb5e388aecc721a60691659ca7b388612d323cf75da6b9e766b8a440864c2"` + * Example: `"0x1dcf337a03e08a8c00e31de6f5b6d9a6e1c6f1d5e5e6c89fc5f5b5a30e6d5d0c"` * `options` (optional): An object containing configuration options for the tracer. * `tracer` (required, string): The tracer to use, in this case, `'callTracer'`. * `tracerConfig` (required, string): object containing `'timeout'` and `'onlyTopCall'` paramter @@ -81,4 +81,48 @@ The return object is an array of objects, each representing the trace result of {% hint style="info" %} This method is available only on the full archive node. -{% endhint %} \ No newline at end of file +{% endhint %} + +### JSON-RPC Request and Response Examples + +#### Request + +```json +{ + "id": 1, + "jsonrpc": "2.0", + "method": "debug_traceBlockByHash", + "params": [ + "0x1dcf337a03e08a8c00e31de6f5b6d9a6e1c6f1d5e5e6c89fc5f5b5a30e6d5d0c", + { + "tracer": "callTracer", + "timeout": "10s" + } + ] +} + +``` + +#### Response + +```json +{ + "id": 1, + "jsonrpc": "2.0", + "result": [ + { + "result": { + "from": "0x8894e0a0c962cb723c1976a4421c95949be2d4e3", + "gas": "0x2d48c", + "gasUsed": "0xc7ab", + "to": "0x55d398326f99059ff775485246999027b3197955", + "input": "0xa9059cbb0000000000000000000000003b9f33b3a9d382fa60283c555bde8f78855957be00000000000000000000000000000000000000000000000d4e7f4f79da7c0000", + "output": "0x0000000000000000000000000000000000000000000000000000000000000001", + "value": "0x0", + "type": "CALL" + } + } + ] +} + +``` diff --git a/v1.0/RPC Nodes/rpc-evm/rpc-cronos/debug_traceblockbynumber.md b/v1.0/RPC Nodes/rpc-evm/rpc-ethereum-classic/debug_traceblockbynumber.md similarity index 59% rename from v1.0/RPC Nodes/rpc-evm/rpc-cronos/debug_traceblockbynumber.md rename to v1.0/RPC Nodes/rpc-evm/rpc-ethereum-classic/debug_traceblockbynumber.md index 4e601881..6951f622 100644 --- a/v1.0/RPC Nodes/rpc-evm/rpc-cronos/debug_traceblockbynumber.md +++ b/v1.0/RPC Nodes/rpc-evm/rpc-ethereum-classic/debug_traceblockbynumber.md @@ -1,13 +1,13 @@ --- title: "debug_traceblockbynumber" -slug: "rpc-cronos-debug_traceblockbynumber" -excerpt: "Cronos RPC" +slug: "rpc-ethereum-classic-debug_traceblockbynumber" +excerpt: "Ethereum Classic RPC" category: 65c5e93c623cad004b45d505 hidden: false metadata: - description: "Cronos RPC" + description: "Ethereum Classic RPC" image: [] - keywords: "cronos, rpc" + keywords: "ethereum classic , rpc" robots: "index" createdAt: "Wed Mar 06 2024 10:35:44 GMT+0000 (Coordinated Universal Time)" updatedAt: "Tue Apr 02 2024 08:40:59 GMT+0000 (Coordinated Universal Time)" @@ -22,11 +22,11 @@ updatedAt: "Tue Apr 02 2024 08:40:59 GMT+0000 (Coordinated Universal Time)" ```typescript // yarn add @tatumio/tatum -import { TatumSDK, Cronos, Network } from '@tatumio/tatum' +import { TatumSDK, EthereumClassic, Network } from '@tatumio/tatum' -const tatum = await TatumSDK.init({network: Network.CRONOS}) +const tatum = await TatumSDK.init({network: Network.ETHEREUM_CLASSIC}) -const result = await tatum.rpc.debugTraceBlockByNumber(12863491) +const result = await tatum.rpc.debugTraceBlockByNumber('0x11A62D9') await tatum.destroy() // Destroy Tatum SDK - needed for stopping background jobs ``` @@ -36,7 +36,7 @@ await tatum.destroy() // Destroy Tatum SDK - needed for stopping background jobs ### Overview -`debug_traceBlockByNumber` is an RPC method that allows developers to trace all transactions within a block using a given tracer. This is particularly useful for analyzing the behavior of all transactions in a block, investigating potential issues, and understanding the flow of execution within smart contracts. +`debug_traceBlockByNumber` is an Flare RPC method that allows developers to trace all transactions within a block using a given tracer. This is particularly useful for analyzing the behavior of all transactions in a block, investigating potential issues, and understanding the flow of execution within smart contracts. By using the `callTracer` tracer, developers can obtain more detailed information about the calls made during each transaction, including the input, output, and depth of the calls. @@ -44,7 +44,7 @@ By using the `callTracer` tracer, developers can obtain more detailed informatio * `blockNumber` - `Quantity` or `String` * The block number of the block to trace. - * Example: `"12863491"` or `"latest"` + * Example: `"0x1"` or `"latest"` * `options` as `tracerConfig`(optional): An object containing configuration options for the tracer. * `tracer` (required): The tracer to use, in this case, `"callTracer"`. * `timeout` (required): The maximum amount of time the tracer is allowed to run, in seconds or as a string (e.g. "10s"). Default is "5s". @@ -71,4 +71,48 @@ The return object is an array of objects, each representing the trace result of {% hint style="info" %} This method is available only on the full archive node. -{% endhint %} \ No newline at end of file +{% endhint %} + +### JSON-RPC Request and Response Examples + +#### Request + +```json +{ + "id": 1, + "jsonrpc": "2.0", + "method": "debug_traceBlockByNumber", + "params": [ + "latest", + { + "tracer": "callTracer", + "timeout": "10s" + } + ] +} + +``` + +#### Response + +```json +{ + "id": 1, + "jsonrpc": "2.0", + "result": [ + { + "result": { + "from": "0x8894e0a0c962cb723c1976a4421c95949be2d4e3", + "gas": "0x2d48c", + "gasUsed": "0xc7ab", + "to": "0x55d398326f99059ff775485246999027b3197955", + "input": "0xa9059cbb0000000000000000000000003b9f33b3a9d382fa60283c555bde8f78855957be00000000000000000000000000000000000000000000000d4e7f4f79da7c0000", + "output": "0x0000000000000000000000000000000000000000000000000000000000000001", + "value": "0x0", + "type": "CALL" + } + } + ] +} + +``` diff --git a/v1.0/RPC Nodes/rpc-evm/rpc-ethereum-classic/debug_tracecall.md b/v1.0/RPC Nodes/rpc-evm/rpc-ethereum-classic/debug_tracecall.md new file mode 100644 index 00000000..2782daff --- /dev/null +++ b/v1.0/RPC Nodes/rpc-evm/rpc-ethereum-classic/debug_tracecall.md @@ -0,0 +1,135 @@ +--- +title: "debug_tracecall" +slug: "rpc-ethereum-classic-debug_tracecall" +excerpt: "Ethereum Classic RPC" +category: 65c5e93c623cad004b45d505 +hidden: false +metadata: + description: "Ethereum Classic RPC" + image: [] + keywords: "ethereum classic , rpc" + robots: "index" +createdAt: "Wed Mar 06 2024 10:35:44 GMT+0000 (Coordinated Universal Time)" +updatedAt: "Tue Apr 02 2024 08:40:59 GMT+0000 (Coordinated Universal Time)" +--- +[block:html]{"html":"
\n
Archive Method
\n

Only on the full archive nodes. Complex queries might take longer and incur additional cost

\n
"}[/block] + +### How to use it + +{% tabs %} +{% tab title="TypeScript/JavaScript" %} +{% code overflow="wrap" lineNumbers="true" %} +```typescript +// yarn add @tatumio/tatum + +import { TatumSDK, EthereumClassic, Network } from '@tatumio/tatum' + +const tatum = await TatumSDK.init({network: Network.ETHEREUM_CLASSIC}) + +const res = await tatum.rpc.debugTraceCall({ + "from": "0x80a4243C8FC5d73eCe44F15a43b7bB44646562da", + "to": "0x80a4243C8FC5d73eCe44F15a43b7bB44646562da" + }, + "0x11A62D9", + { + tracer: 'callTracer', + tracerConfig: { + onlyTopCall: true, + timeout: '5s', + } + } +) + +await tatum.destroy() // Destroy Tatum SDK - needed for stopping background jobs +``` +{% endcode %} +{% endtab %} +{% endtabs %} + +### Overview + +`debug_traceCall` is an Flare RPC method that allows you to execute a given call (message), tracing the steps of its execution. This can be helpful for developers and auditors who want to inspect and analyze the internal operations and state changes of a contract call without modifying the blockchain state. This method can assist in debugging and identifying potential issues with contract execution, as well as understanding how gas is consumed during the execution of a call. + +### Parameters + +The `debug_traceCall` method accepts the following parameters: + +* `transaction`: An object that contains the following fields: + * `from`: The address from which the call is initiated. Example: `"0xa7d9ddbe1f17865597fbd27ec712455208b6b76d"` + * `to`: The address of the contract to be called. Example: `"0x742d35Cc6634C0532925a3b844Bc454e4438f44e"` + * `gas`: (Optional) The gas limit for the call. Example: `"0x76c0"` + * `gasPrice`: (Optional) The gas price for the call. Example: `"0x9184e72a000"` + * `value`: (Optional) The value to be transferred during the call. Example: `"0x9184e72a"` + * `data`: (Optional) The input data for the call, encoded as a hexadecimal string. Example: `"0x606060..."` +* `blockNumber`: The block number as a hexadecimal string for which the call should be traced. Example: `"0x1b4"` + +### Return Object + +The return object is an object containing the following fields: + +* `output`: The output data from the call. +* `gasUsed`: The total gas used by the call. +* `calls`: An array of objects, each representing a nested call made during the call. Each object contains: + * `from`: The address the call was made from. + * `gas`: The gas provided for the call. + * `gasUsed`: The gas used by the call. + * `to`: The address the call was made to. + * `input`: The input data for the call. + * `output`: The output data from the call. + * `type`: The type of the call (e.g., "STATICCALL"). + +{% hint style="info" %} +This method is available only on the full archive node. +{% endhint %} + +### JSON-RPC Request and Response Examples + +#### Request + +
{
+  "jsonrpc": "2.0",
+  "id": 1,
+  "method": "debug_traceCall",
+  "params": [
+    {
+      "from": "0xa7d9ddbe1f17865597fbd27ec712455208b6b76d",
+      "to": "0x742d35Cc6634C0532925a3b844Bc454e4438f44e",
+      "gas": "0x76c0",
+      "gasPrice": "0x9184e72a000",
+      "value": "0x9184e72a",
+      "data": "0x606060..."
+    },
+    "0x1b4"
+  ]
+}
+
+ +#### Response + +```json +{ + "jsonrpc": "2.0", + "id": 2, + "result": { + "from": "0x0a6d033f6628ef715732d61e059187b7330305ff", + "gas": "0x51fba", + "gasUsed": "0x41711", + "to": "0x19e870855cb8fd8f6689743d3c28311c0d62a24c", + "input": "0xcba9bc66000000000000000000000000f62ef040fb5ea7d0828ff50bced9a7720f1387c7000000000000000000000000325e343f1de602396e256b67efd1f61c3a6b38bd00000000000000000000000000000000000000000000000000000000000000e00000000000000000000000000000000000000000000000000000000000000160000000000000000000000000000000000000000000000001158e460913d000000000000000000000000000000000000000000000000000000100a08761e1547f0000000000000000000000000a6d033f6628ef715732d61e059187b7330305ff000000000000000000000000000000000000000000000000000000000000000300000000000000000000000055d398326f99059ff775485246999027b319795500000000000000000000000053e562b9b7e5e94b81f10e96ee70ad06df3d265700000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000", + "output": "0x0000000000000000000000000000000000000000000000000102b1eda6a2682d", + "calls": [ + { + "from": "0x19e870855cb8fd8f6689743d3c28311c0d62a24c", + "gas": "0x4f638", + "gasUsed": "0x4cf", + "to": "0x55d398326f99059ff775485246999027b3197955", + "input": "0x70a082310000000000000000000000000a6d033f6628ef715732d61e059187b7330305ff", + "output": "0x00000000000000000000000000000000000000000000002ca114a674b092dd94", + "type": "STATICCALL" + } + ], + "value": "0x0", + "type": "CALL" + } +} +``` diff --git a/v1.0/RPC Nodes/rpc-evm/rpc-cronos/debug_tracetransaction.md b/v1.0/RPC Nodes/rpc-evm/rpc-ethereum-classic/debug_tracetransaction.md similarity index 52% rename from v1.0/RPC Nodes/rpc-evm/rpc-cronos/debug_tracetransaction.md rename to v1.0/RPC Nodes/rpc-evm/rpc-ethereum-classic/debug_tracetransaction.md index eb82a30b..f2ec075d 100644 --- a/v1.0/RPC Nodes/rpc-evm/rpc-cronos/debug_tracetransaction.md +++ b/v1.0/RPC Nodes/rpc-evm/rpc-ethereum-classic/debug_tracetransaction.md @@ -1,13 +1,13 @@ --- title: "debug_tracetransaction" -slug: "rpc-cronos-debug_tracetransaction" -excerpt: "Cronos RPC" +slug: "rpc-ethereum-classic-debug_tracetransaction" +excerpt: "Ethereum Classic RPC" category: 65c5e93c623cad004b45d505 hidden: false metadata: - description: "Cronos RPC" + description: "Ethereum Classic RPC" image: [] - keywords: "cronos, rpc" + keywords: "ethereum classic , rpc" robots: "index" createdAt: "Wed Mar 06 2024 10:35:44 GMT+0000 (Coordinated Universal Time)" updatedAt: "Tue Apr 02 2024 08:40:59 GMT+0000 (Coordinated Universal Time)" @@ -22,11 +22,11 @@ updatedAt: "Tue Apr 02 2024 08:40:59 GMT+0000 (Coordinated Universal Time)" ```typescript // yarn add @tatumio/tatum -import { TatumSDK, Cronos, Network } from '@tatumio/tatum' +import { TatumSDK, EthereumClassic, Network } from '@tatumio/tatum' -const tatum = await TatumSDK.init({network: Network.CRONOS}) +const tatum = await TatumSDK.init({network: Network.ETHEREUM_CLASSIC}) -const result = await tatum.rpc.debugTraceTransaction('0x6aefbd1a9c9e4c310cadde3bcdd809a14da87caa8fa4f10ca04d9e357a3907e9', { +const result = await tatum.rpc.debugTraceTransaction('0x311b9228c7eb66500a3bc01162e0c7d3687e1df84d2e9b6104a87f8178b608c1', { tracer: 'callTracer', tracerConfig: { onlyTopCall: true, @@ -42,7 +42,7 @@ await tatum.destroy() // Destroy Tatum SDK - needed for stopping background jobs ### Overview -`debug_traceTransaction` is an RPC method that allows developers to inspect and trace the execution of a specific transaction, providing valuable insight into the internal workings of the transaction, including the calls made between contracts, the state of the contracts, and any errors encountered during the transaction. +`debug_traceTransaction` is an Flare RPC method that allows developers to inspect and trace the execution of a specific transaction, providing valuable insight into the internal workings of the transaction, including the calls made between contracts, the state of the contracts, and any errors encountered during the transaction. By using the `callTracer` tracer, developers can obtain more detailed information about the calls made during the transaction, including the input, output, and the depth of the calls. This is particularly useful in debugging complex transactions, analyzing gas consumption, and understanding the flow of execution within smart contracts. @@ -78,4 +78,47 @@ The return object is an object containing the following fields: {% hint style="info" %} This method is available only on the full archive node. -{% endhint %} \ No newline at end of file +{% endhint %} + +### JSON-RPC Request and Response Examples + +#### Request + +```json +{ + "jsonrpc": "2.0", + "method": "debug_traceTransaction", + "params": ["0x920d562e886a0c7c1f07ecee2ee5557f72d3056b205f8811c57e2615a3b6adb0", {"tracer":"callTracer"}], + "id": 2 +} +``` + +#### Response + +```json +{ + "jsonrpc": "2.0", + "id": 2, + "result": { + "from": "0x0a6d033f6628ef715732d61e059187b7330305ff", + "gas": "0x51fba", + "gasUsed": "0x41711", + "to": "0x19e870855cb8fd8f6689743d3c28311c0d62a24c", + "input": "0xcba9bc66000000000000000000000000f62ef040fb5ea7d0828ff50bced9a7720f1387c7000000000000000000000000325e343f1de602396e256b67efd1f61c3a6b38bd00000000000000000000000000000000000000000000000000000000000000e00000000000000000000000000000000000000000000000000000000000000160000000000000000000000000000000000000000000000001158e460913d000000000000000000000000000000000000000000000000000000100a08761e1547f0000000000000000000000000a6d033f6628ef715732d61e059187b7330305ff000000000000000000000000000000000000000000000000000000000000000300000000000000000000000055d398326f99059ff775485246999027b319795500000000000000000000000053e562b9b7e5e94b81f10e96ee70ad06df3d265700000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000", + "output": "0x0000000000000000000000000000000000000000000000000102b1eda6a2682d", + "calls": [ + { + "from": "0x19e870855cb8fd8f6689743d3c28311c0d62a24c", + "gas": "0x4f638", + "gasUsed": "0x4cf", + "to": "0x55d398326f99059ff775485246999027b3197955", + "input": "0x70a082310000000000000000000000000a6d033f6628ef715732d61e059187b7330305ff", + "output": "0x00000000000000000000000000000000000000000000002ca114a674b092dd94", + "type": "STATICCALL" + } + ], + "value": "0x0", + "type": "CALL" + } +} +``` diff --git a/v1.0/RPC Nodes/rpc-evm/rpc-cronos/eth_blocknumber.md b/v1.0/RPC Nodes/rpc-evm/rpc-ethereum-classic/eth_blocknumber.md similarity index 57% rename from v1.0/RPC Nodes/rpc-evm/rpc-cronos/eth_blocknumber.md rename to v1.0/RPC Nodes/rpc-evm/rpc-ethereum-classic/eth_blocknumber.md index c1c1d79a..67dda6f0 100644 --- a/v1.0/RPC Nodes/rpc-evm/rpc-cronos/eth_blocknumber.md +++ b/v1.0/RPC Nodes/rpc-evm/rpc-ethereum-classic/eth_blocknumber.md @@ -1,13 +1,13 @@ --- title: "eth_blocknumber" -slug: "rpc-cronos-eth_blocknumber" -excerpt: "Cronos RPC" +slug: "rpc-ethereum-classic-eth_blocknumber" +excerpt: "Ethereum Classic RPC" category: 65c5e93c623cad004b45d505 hidden: false metadata: - description: "Cronos RPC" + description: "Ethereum Classic RPC" image: [] - keywords: "cronos, rpc" + keywords: "ethereum classic , rpc" robots: "index" createdAt: "Wed Mar 06 2024 10:35:44 GMT+0000 (Coordinated Universal Time)" updatedAt: "Tue Apr 02 2024 08:40:59 GMT+0000 (Coordinated Universal Time)" @@ -22,12 +22,13 @@ updatedAt: "Tue Apr 02 2024 08:40:59 GMT+0000 (Coordinated Universal Time)" ```typescript // yarn add @tatumio/tatum -import { TatumSDK, Cronos, Network } from '@tatumio/tatum' +import { TatumSDK, EthereumClassic, Network } from '@tatumio/tatum' -const tatum = await TatumSDK.init({network: Network.CRONOS}) +const tatum = await TatumSDK.init({network: Network.ETHEREUM_CLASSIC}) const latestBlock = await tatum.rpc.blockNumber() + await tatum.destroy() // Destroy Tatum SDK - needed for stopping background jobs ``` {% endcode %} @@ -36,7 +37,7 @@ await tatum.destroy() // Destroy Tatum SDK - needed for stopping background jobs ### Overview -The `eth_blockNumber` method returns the number of the most recent block on the blockchain. This method is commonly used to track the current state of the network, monitor for new blocks, or fetch historical data. +The `eth_blockNumber` method returns the number of the most recent block on the Flare blockchain. This method is commonly used to track the current state of the network, monitor for new blocks, or fetch historical data. Use cases for `eth_blockNumber` include: @@ -53,4 +54,31 @@ The `eth_blockNumber` method does not require any parameters. The `eth_blockNumber` method returns a single field: -* **`blockNumber`**: The number of the most recent block on the blockchain. The value is returned as a hexadecimal string. \ No newline at end of file +* **`blockNumber`**: The number of the most recent block on the Flare blockchain. The value is returned as a hexadecimal string. + +### JSON-RPC Request Example + +```json +{ + "id": 1, + "jsonrpc": "2.0", + "method": "eth_blockNumber", + "params": [] +} +``` + +### JSON-RPC Response Example + +```json +{ + "id": 1, + "jsonrpc": "2.0", + "result": "0x4b7" // 1207 +} +``` + +In this example, the most recent block number is 1207 (`0x4b7` in hexadecimal notation). + +Please note that while this document provides a comprehensive description of the `eth_blockNumber` Flare RPC method, other methods may be needed to obtain full transaction details or perform more complex tasks. + +\ diff --git a/v1.0/RPC Nodes/rpc-evm/rpc-cronos/eth_call.md b/v1.0/RPC Nodes/rpc-evm/rpc-ethereum-classic/eth_call.md similarity index 68% rename from v1.0/RPC Nodes/rpc-evm/rpc-cronos/eth_call.md rename to v1.0/RPC Nodes/rpc-evm/rpc-ethereum-classic/eth_call.md index 2d27cd41..d9d62f43 100644 --- a/v1.0/RPC Nodes/rpc-evm/rpc-cronos/eth_call.md +++ b/v1.0/RPC Nodes/rpc-evm/rpc-ethereum-classic/eth_call.md @@ -1,13 +1,13 @@ --- title: "eth_call" -slug: "rpc-cronos-eth_call" -excerpt: "Cronos RPC" +slug: "rpc-ethereum-classic-eth_call" +excerpt: "Ethereum Classic RPC" category: 65c5e93c623cad004b45d505 hidden: false metadata: - description: "Cronos RPC" + description: "Ethereum Classic RPC" image: [] - keywords: "cronos, rpc" + keywords: "ethereum classic , rpc" robots: "index" createdAt: "Wed Mar 06 2024 10:35:44 GMT+0000 (Coordinated Universal Time)" updatedAt: "Tue Apr 02 2024 08:40:59 GMT+0000 (Coordinated Universal Time)" @@ -22,13 +22,13 @@ updatedAt: "Tue Apr 02 2024 08:40:59 GMT+0000 (Coordinated Universal Time)" ```typescript // yarn add @tatumio/tatum -import { TatumSDK, Cronos, Network } from '@tatumio/tatum' +import { TatumSDK, EthereumClassic, Network } from '@tatumio/tatum' -const tatum = await TatumSDK.init({network: Network.CRONOS}) +const tatum = await TatumSDK.init({network: Network.ETHEREUM_CLASSIC}) const result = await tatum.rpc.call({ - "to": "0xc21223249CA28397B4B6541dfFaEcC539BfF0c59", // Replace with the ERC-20 token contract address - "data": "0x70a082310000000000000000000000008c9ac9e60e96db6b0da7ca9b8d06e0572fc289d6" // The function signature for balanceOf(address), followed by the address + "to": "0xD31a59c85aE9D8edEFeC411D448f90841571b89c", // Replace with the ERC-20 token contract address + "data": "0x70a08231000000000000000000000000F22981C5bF0A717c98781Af04fdc8213fA789F1C" // The function signature for balanceOf(address), followed by the address }, "latest") await tatum.destroy() // Destroy Tatum SDK - needed for stopping background jobs @@ -61,7 +61,32 @@ Top 5 most commonly used use cases for `eth_call`: * `data`: `DATA` - (optional) Hash of the method signature and encoded parameters. For details see [Ethereum Contract ABI in the Solidity documentation(opens in a new tab)](https://docs.soliditylang.org/en/latest/abi-spec.html) 2. `QUANTITY|TAG` - integer block number, or the string `"latest"`, `"earliest"` or `"pending"` - ### Return Object -`DATA` - the return value of executed contract. \ No newline at end of file +`DATA` - the return value of executed contract. + +### JSON Examples + +#### Request + +```json +{ + "jsonrpc":"2.0", + "method":"eth_call", + "params":[{ + "to": "0xD31a59c85aE9D8edEFeC411D448f90841571b89c", // Replace with the ERC-20 token contract address + "data": "0x70a08231000000000000000000000000F22981C5bF0A717c98781Af04fdc8213fA789F1C" // The function signature for balanceOf(address), followed by the address to query + },"latest"], + "id":1 +} +``` + +#### Response + +```json +{ + "jsonrpc": "2.0", + "id": 1, + "result": "0x00000000000000000000000000000000000000000000000000001726f9fecc9d" +} +``` diff --git a/v1.0/RPC Nodes/rpc-evm/rpc-cronos/eth_chainid.md b/v1.0/RPC Nodes/rpc-evm/rpc-ethereum-classic/eth_chainid.md similarity index 51% rename from v1.0/RPC Nodes/rpc-evm/rpc-cronos/eth_chainid.md rename to v1.0/RPC Nodes/rpc-evm/rpc-ethereum-classic/eth_chainid.md index b499805b..e79d922c 100644 --- a/v1.0/RPC Nodes/rpc-evm/rpc-cronos/eth_chainid.md +++ b/v1.0/RPC Nodes/rpc-evm/rpc-ethereum-classic/eth_chainid.md @@ -1,13 +1,13 @@ --- title: "eth_chainid" -slug: "rpc-cronos-eth_chainid" -excerpt: "Cronos RPC" +slug: "rpc-ethereum-classic-eth_chainid" +excerpt: "Ethereum Classic RPC" category: 65c5e93c623cad004b45d505 hidden: false metadata: - description: "Cronos RPC" + description: "Ethereum Classic RPC" image: [] - keywords: "cronos, rpc" + keywords: "ethereum classic , rpc" robots: "index" createdAt: "Wed Mar 06 2024 10:35:44 GMT+0000 (Coordinated Universal Time)" updatedAt: "Tue Apr 02 2024 08:40:59 GMT+0000 (Coordinated Universal Time)" @@ -22,9 +22,9 @@ updatedAt: "Tue Apr 02 2024 08:40:59 GMT+0000 (Coordinated Universal Time)" ```typescript // yarn add @tatumio/tatum -import { TatumSDK, Cronos, Network } from '@tatumio/tatum' +import { TatumSDK, EthereumClassic, Network } from '@tatumio/tatum' -const tatum = await TatumSDK.init({network: Network.CRONOS}) +const tatum = await TatumSDK.init({network: Network.ETHEREUM_CLASSIC}) const id = await tatum.rpc.chainId() @@ -36,9 +36,9 @@ await tatum.destroy() // Destroy Tatum SDK - needed for stopping background jobs ### Overview -The `eth_chainId` method is an JSON-RPC method that allows developers to retrieve the currently configured chain ID of the network they are connected to. The chain ID is a unique identifier for different networks, such as Mainnet or various testnets. +The `eth_chainId` method is an Flare JSON-RPC method that allows developers to retrieve the currently configured chain ID of the Flare network they are connected to. The chain ID is a unique identifier for different Flare networks, such as Flare Mainnet or various testnets. -This method is particularly useful when building applications that interact with multiple networks or need to verify the network to prevent replay attacks. By checking the chain ID, an application can ensure it is interacting with the intended network. +This method is particularly useful when building applications that interact with multiple Flare networks or need to verify the network to prevent replay attacks. By checking the chain ID, an application can ensure it is interacting with the intended network. ### Parameters @@ -48,4 +48,29 @@ The `eth_chainId` method does not have any input parameters. The return object contains a single field: -* **`chainId`**: The hexadecimal string representation of the chain ID. \ No newline at end of file +* **`chainId`**: The hexadecimal string representation of the chain ID. + +### Example Request and Response + +JSON-RPC request: + +```json +{ + "jsonrpc": "2.0", + "id": 1, + "method": "eth_chainId", + "params": [] +} +``` + +JSON-RPC response: + +```json +{ + "jsonrpc": "2.0", + "id": 1, + "result": "0xe" +} +``` + +In this example, the returned chain ID is `0xe`, which corresponds to the Flare Mainnet. diff --git a/v1.0/RPC Nodes/rpc-evm/rpc-cronos/eth_estimategas.md b/v1.0/RPC Nodes/rpc-evm/rpc-ethereum-classic/eth_estimategas.md similarity index 74% rename from v1.0/RPC Nodes/rpc-evm/rpc-cronos/eth_estimategas.md rename to v1.0/RPC Nodes/rpc-evm/rpc-ethereum-classic/eth_estimategas.md index 8f09f1df..4e7f340a 100644 --- a/v1.0/RPC Nodes/rpc-evm/rpc-cronos/eth_estimategas.md +++ b/v1.0/RPC Nodes/rpc-evm/rpc-ethereum-classic/eth_estimategas.md @@ -1,13 +1,13 @@ --- title: "eth_estimategas" -slug: "rpc-cronos-eth_estimategas" -excerpt: "Cronos RPC" +slug: "rpc-ethereum-classic-eth_estimategas" +excerpt: "Ethereum Classic RPC" category: 65c5e93c623cad004b45d505 hidden: false metadata: - description: "Cronos RPC" + description: "Ethereum Classic RPC" image: [] - keywords: "cronos, rpc" + keywords: "ethereum classic , rpc" robots: "index" createdAt: "Wed Mar 06 2024 10:35:44 GMT+0000 (Coordinated Universal Time)" updatedAt: "Tue Apr 02 2024 08:40:59 GMT+0000 (Coordinated Universal Time)" @@ -22,15 +22,16 @@ updatedAt: "Tue Apr 02 2024 08:40:59 GMT+0000 (Coordinated Universal Time)" ```typescript // yarn add @tatumio/tatum -import { TatumSDK, Cronos, Network } from '@tatumio/tatum' +import { TatumSDK, EthereumClassic, Network } from '@tatumio/tatum' -const tatum = await TatumSDK.init({network: Network.CRONOS}) +const tatum = await TatumSDK.init({network: Network.ETHEREUM_CLASSIC}) const estimate = await tatum.rpc.estimateGas({ - "from": "0x8Bf046E7216c727B0938C0BeA16dEB22C8C03E38", - "to": "0x8Bf046E7216c727B0938C0BeA16dEB22C8C03E38", - "value": "0xde0b6b3a7640000" - }); + "from": "0xa41d19F4258a388c639B7CcD938FCE3fb7D05e86", + "to": "0xa41d19F4258a388c639B7CcD938FCE3fb7D05e87", + "value": "0xde0b6b3a7640000", + "data": "0x606060" + }) await tatum.destroy() // Destroy Tatum SDK - needed for stopping background jobs ``` @@ -40,13 +41,13 @@ const estimate = await tatum.rpc.estimateGas({ ### Overview -`eth_estimateGas` is an JSON-RPC method that estimates the amount of gas required to execute a given transaction. This method can be used to determine the gas cost before sending a transaction, allowing developers to better predict the gas fees and avoid issues like out-of-gas errors. +`eth_estimateGas` is an Flare JSON-RPC method that estimates the amount of gas required to execute a given transaction. This method can be used to determine the gas cost before sending a transaction, allowing developers to better predict the gas fees and avoid issues like out-of-gas errors. Use cases for `eth_estimateGas` include: * Estimating gas costs for contract deployments * Estimating gas costs for contract function calls -* Estimating gas costs for standard transfers +* Estimating gas costs for standard Flare transfers ### Parameters @@ -60,7 +61,7 @@ The `eth_estimateGas` method takes a single parameter, an object representing th * Example: `"gas": "0x76c0"` * **`gasPrice`** (optional, string): The price of gas in wei. * Example: `"gasPrice": "0x9184e72a000"` -* **`value`** (optional, string): The amount of to send in the transaction, in wei. +* **`value`** (optional, string): The amount of Flare to send in the transaction, in wei. * Example: `"value": "0xde0b6b3a7640000"` * **`data`** (optional, string): The data payload of the transaction, typically used for contract function calls or contract deployment. * Example: `"data": "0x606060..."` diff --git a/v1.0/RPC Nodes/rpc-evm/rpc-ethereum-classic/eth_gasprice.md b/v1.0/RPC Nodes/rpc-evm/rpc-ethereum-classic/eth_gasprice.md new file mode 100644 index 00000000..8116a7ad --- /dev/null +++ b/v1.0/RPC Nodes/rpc-evm/rpc-ethereum-classic/eth_gasprice.md @@ -0,0 +1,74 @@ +--- +title: "eth_gasprice" +slug: "rpc-ethereum-classic-eth_gasprice" +excerpt: "Ethereum Classic RPC" +category: 65c5e93c623cad004b45d505 +hidden: false +metadata: + description: "Ethereum Classic RPC" + image: [] + keywords: "ethereum classic , rpc" + robots: "index" +createdAt: "Wed Mar 06 2024 10:35:44 GMT+0000 (Coordinated Universal Time)" +updatedAt: "Tue Apr 02 2024 08:40:59 GMT+0000 (Coordinated Universal Time)" +--- +[block:html]{"html":"
\n
Archive Method
\n

Only on the full archive nodes. Complex queries might take longer and incur additional cost

\n
"}[/block] + +### How to use it + +{% tabs %} +{% tab title="TypeScript/JavaScript" %} +{% code overflow="wrap" lineNumbers="true" %} +```typescript +// yarn add @tatumio/tatum + +import { TatumSDK, EthereumClassic, Network } from '@tatumio/tatum' + +const tatum = await TatumSDK.init({network: Network.ETHEREUM_CLASSIC}) + +const gasPrice = await tatum.rpc.gasPrice() + +await tatum.destroy() // Destroy Tatum SDK - needed for stopping background jobs +``` +{% endcode %} +{% endtab %} +{% endtabs %} + +### Overview + +The `eth_gasPrice` method is an Flare JSON-RPC method used to estimate the average gas price required for transactions in the Flare network. This method provides a suggestion for the gas price to be used in a transaction to increase the likelihood of it being mined and included in a block in a reasonable amount of time. The `eth_gasPrice` method is particularly useful for developers and users who want to create and send transactions, as it helps them estimate the appropriate gas price to ensure timely processing. + +### Parameters + +The `eth_gasPrice` method does not require any parameters. + +### Return Value + +The `eth_gasPrice` method returns a single value as a hexadecimal string: + +* `gasPrice`: The estimated average gas price in wei. Example: `"0x4a817c800"` + +### JSON-RPC Request and Response Examples + +#### Request + +```json +{ + "id": 1, + "jsonrpc": "2.0", + "method": "eth_gasPrice", + "params": [] +} +``` + +#### Response + +```json +{ + "id": 1, + "jsonrpc": "2.0", + "result": "0x4a817c800" +} +``` + +By using the `eth_gasPrice` method, developers and users can estimate the appropriate gas price for their transactions, improving the overall user experience and ensuring that their transactions are processed in a timely manner. diff --git a/v1.0/RPC Nodes/rpc-evm/rpc-cronos/eth_getbalance.md b/v1.0/RPC Nodes/rpc-evm/rpc-ethereum-classic/eth_getbalance.md similarity index 62% rename from v1.0/RPC Nodes/rpc-evm/rpc-cronos/eth_getbalance.md rename to v1.0/RPC Nodes/rpc-evm/rpc-ethereum-classic/eth_getbalance.md index 9e72d32c..ee6db9c2 100644 --- a/v1.0/RPC Nodes/rpc-evm/rpc-cronos/eth_getbalance.md +++ b/v1.0/RPC Nodes/rpc-evm/rpc-ethereum-classic/eth_getbalance.md @@ -1,13 +1,13 @@ --- title: "eth_getbalance" -slug: "rpc-cronos-eth_getbalance" -excerpt: "Cronos RPC" +slug: "rpc-ethereum-classic-eth_getbalance" +excerpt: "Ethereum Classic RPC" category: 65c5e93c623cad004b45d505 hidden: false metadata: - description: "Cronos RPC" + description: "Ethereum Classic RPC" image: [] - keywords: "cronos, rpc" + keywords: "ethereum classic , rpc" robots: "index" createdAt: "Wed Mar 06 2024 10:35:44 GMT+0000 (Coordinated Universal Time)" updatedAt: "Tue Apr 02 2024 08:40:59 GMT+0000 (Coordinated Universal Time)" @@ -22,11 +22,11 @@ updatedAt: "Tue Apr 02 2024 08:40:59 GMT+0000 (Coordinated Universal Time)" ```typescript // yarn add @tatumio/tatum -import { TatumSDK, Flare, Network } from '@tatumio/tatum' +import { TatumSDK, EthereumClassic, Network } from '@tatumio/tatum' -const tatum = await TatumSDK.init({network: Network.FLARE}) +const tatum = await TatumSDK.init({network: Network.ETHEREUM_CLASSIC}) -const balance = await tatum.rpc.getBalance('0x45CC7a9A25c54c343BB0e5841DDfaE5DE311af52') +const balance = await tatum.rpc.getBalance('0x80a4243C8FC5d73eCe44F15a43b7bB44646562da') await tatum.destroy() // Destroy Tatum SDK - needed for stopping background jobs ``` @@ -36,14 +36,14 @@ await tatum.destroy() // Destroy Tatum SDK - needed for stopping background jobs ### Overview -The `eth_getBalance` method is an JSON-RPC method that allows you to retrieve the balance of a specified address. This method can be used to query the balance of any address, whether it is a contract or an externally owned account (EOA). A common use case for this method is to display the current balance of a user's account in a wallet application or a decentralized application (DApp). +The `eth_getBalance` method is an Flare JSON-RPC method that allows you to retrieve the Flare balance of a specified address. This method can be used to query the balance of any Flare address, whether it is a contract or an externally owned account (EOA). A common use case for this method is to display the current balance of a user's account in a wallet application or a decentralized application (DApp). ### Parameters The method requires two parameters: -1. **`address`** (required): The address of the account or contract whose balance you want to query. - * Example: `"0x45CC7a9A25c54c343BB0e5841DDfaE5DE311af52"` +1. **`address`** (required): The Flare address of the account or contract whose balance you want to query. + * Example: `"0x742d35Cc6634C0532925a3b844Bc454e4438f44e"` 2. **`blockParameter`** (optional): The block number or block identifier to specify the point in time for which you want to query the balance. * Example: `"latest"` or `"0x1"` @@ -70,5 +70,31 @@ A full transaction object includes the following fields: The method returns a single field: -* `result`: The balance of the specified address in wei, as a hexadecimal string. - * Example: `"0x1a2e1a"`, which corresponds to `1,726,666` wei. \ No newline at end of file +* `result`: The Flare balance of the specified address in wei, as a hexadecimal string. + * Example: `"0x1a2e1a"`, which corresponds to `1,726,666` wei. + +### JSON-RPC Request and Response Examples + +#### Request + +```json +{ + "jsonrpc": "2.0", + "id": 1, + "method": "eth_getBalance", + "params": [ + "0x742d35Cc6634C0532925a3b844Bc454e4438f44e", + "latest" + ] +} +``` + +#### Response + +```json +{ + "jsonrpc": "2.0", + "id": 1, + "result": "0x1a2e1a" +} +``` diff --git a/v1.0/RPC Nodes/rpc-evm/rpc-ethereum-classic/eth_getblockbyhash.md b/v1.0/RPC Nodes/rpc-evm/rpc-ethereum-classic/eth_getblockbyhash.md new file mode 100644 index 00000000..da85a1b6 --- /dev/null +++ b/v1.0/RPC Nodes/rpc-evm/rpc-ethereum-classic/eth_getblockbyhash.md @@ -0,0 +1,151 @@ +--- +title: "eth_getblockbyhash" +slug: "rpc-ethereum-classic-eth_getblockbyhash" +excerpt: "Ethereum Classic RPC" +category: 65c5e93c623cad004b45d505 +hidden: false +metadata: + description: "Ethereum Classic RPC" + image: [] + keywords: "ethereum classic , rpc" + robots: "index" +createdAt: "Wed Mar 06 2024 10:35:44 GMT+0000 (Coordinated Universal Time)" +updatedAt: "Tue Apr 02 2024 08:40:59 GMT+0000 (Coordinated Universal Time)" +--- +[block:html]{"html":"
\n
Archive Method
\n

Only on the full archive nodes. Complex queries might take longer and incur additional cost

\n
"}[/block] + +### How to use it + +{% tabs %} +{% tab title="TypeScript/JavaScript" %} +{% code overflow="wrap" lineNumbers="true" %} +```typescript +// yarn add @tatumio/tatum + +import { TatumSDK, EthereumClassic, Network } from '@tatumio/tatum' + +const tatum = await TatumSDK.init({network: Network.ETHEREUM_CLASSIC}) + +const block = await tatum.rpc.getBlockByHash('0x23d252bc4008a28b149cf9aa94a592dc488de13281ce6fab5b8bc681bab906fd', true) + +await tatum.destroy() // Destroy Tatum SDK - needed for stopping background jobs +``` +{% endcode %} +{% endtab %} +{% endtabs %} + +### Overview + +`eth_getBlockByHash` is an Flare JSON-RPC method that allows developers to query a specific block in the Flare blockchain by its block hash. This method can be used in various scenarios, such as analyzing historical transactions, validating the state of the blockchain, or monitoring the progress of mining activities. + +### Parameters + +The `eth_getBlockByHash` method accepts two parameters: + +1. **`blockHash`**: The hash of the block you want to retrieve information about. + * Type: `String` + * Example: `"0x078610ca461480e4b78557f20e544084cccc4accb41f5c1b7ef792246b78c94b"` +2. **`fullTransactionDetails`**: A boolean value indicating whether to return full transaction details or just transaction hashes. + * Type: `Boolean` + * Example: `true` + +### Return Object + +The returned block object includes the following fields: + +* **`number`** - The block number (hexadecimal string). +* **`hash`** - The block hash (32-byte string). +* **`parentHash`** - The hash of the parent block (32-byte string). +* **`nonce`** - The nonce used to generate the block (8-byte string). +* **`sha3Uncles`** - The SHA3 hash of the uncles in the block (32-byte string). +* **`logsBloom`** - The logs bloom filter of the block (256-byte string). +* **`transactionsRoot`** - The root of the transaction trie (32-byte string). +* **`stateRoot`** - The root of the state trie (32-byte string). +* **`miner`** - The address of the miner who mined the block (20-byte string). +* **`difficulty`** - The difficulty of the block (hexadecimal string). +* **`totalDifficulty`** - The total difficulty of the chain up to this block (hexadecimal string). +* **`extraData`** - Extra data included by the miner in the block (byte string). +* **`size`** - The block size in bytes (hexadecimal string). +* **`gasLimit`** - The gas limit for the block (hexadecimal string). +* **`gasUsed`** - The total gas used by all transactions in the block (hexadecimal string). +* **`timestamp`** - The block timestamp (hexadecimal string). +* **`transactions`** - An array of transaction objects or transaction hashes, depending on the `returnFullTransactionObjects` parameter. +* **`uncles`** - An array of uncle block hashes (32-byte strings). + +If `returnFullTransactionObjects` is `true`, the `transactions` field contains transaction objects with the following fields: + +* **`hash`** - The transaction hash (32-byte string). +* **`nonce`** - The number of transactions sent by the sender before this transaction (hexadecimal string). +* **`blockHash`** - The block hash where the transaction is included (32-byte string). +* **`blockNumber`** - The block number where the transaction is included (hexadecimal string). +* **`transactionIndex`** - The index of the transaction in the block (hexadecimal string). +* **`from`** - The sender address (20-byte string). +* **`to`** - The recipient address, or `null` for contract creation transactions (20-byte string). +* **`value`** - The value being transferred (hexadecimal string). +* **`gasPrice`** - The gas price in wei (hexadecimal string). +* **`gas`** - The gas provided for the transaction (hexadecimal string). +* **`input`** - The input data for the transaction (byte string). + +### JSON-RPC Request and Response Examples + +Here are examples of JSON-RPC request and response for the `eth_getBlockByNumber` method: + +#### Request + +```json +{ + "jsonrpc": "2.0", + "method": "eth_getBlockByHash", + "params": ["0x078610ca461480e4b78557f20e544084cccc4accb41f5c1b7ef792246b78c94b", true], + "id": 1 +} +``` + +#### Response + +```json +{ + "jsonrpc": "2.0", + "id": 1, + "result": { + "difficulty": "0x2", + "extraData": "0xd883010114846765746888676f312e31392e36856c696e75780000008279af9a2f9343c00920c795a7abe84303ee56588946383a15d1e9ee422a7df6dcbe199e4ec93511fe1ffa3c3ab10cb5b12459e8f64553ad3a741e9562e1d5e522c336a400", + "gasLimit": "0x2faed85", + "gasUsed": "0xd81f1", + "hash": "0x078610ca461480e4b78557f20e544084cccc4accb41f5c1b7ef792246b78c94b", + "logsBloom": "0x0020001000000000000001000000000000000000000000040000000000084000000004000800000000c06100800000000000000000010000200000000024008000004000000000000000001800001000a050000000040004000000000000000000000220020200000000000000400800080008000000000000001010004000400000000000010000000000000000000000002400000008000000008000000021022000000000000000000000000000000000000000000000000000000000010010180003000800000000000000000000000000800000000020000082000060000010000000001002010800000000000000020000080000800000000000000000", + "miner": "0x35552c16704d214347f29fa77f77da6d75d7c752", + "mixHash": "0x0000000000000000000000000000000000000000000000000000000000000000", + "nonce": "0x0000000000000000", + "number": "0x1b5dd23", + "parentHash": "0x41f85649fa6d5e58a4631f76724a96dba8313302323f0834b9cf2b63d0308e0f", + "receiptsRoot": "0x81835f75c1f7521016ce3404f19a44f10c4d56b6ab780fad3388d490c154afbe", + "sha3Uncles": "0x1dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347", + "size": "0x8e9", + "stateRoot": "0xda34eefae13e5940f564f3f6cc63c96fb9a0ee015b66552f01a14c2b002b0f7f", + "timestamp": "0x642ea5d2", + "totalDifficulty": "0x36908d2", + "transactions": [ + { + "blockHash": "0x078610ca461480e4b78557f20e544084cccc4accb41f5c1b7ef792246b78c94b", + "blockNumber": "0x1b5dd23", + "from": "0xaa25aa7a19f9c426e07dee59b12f944f4d9f1dd3", + "gas": "0x5208", + "gasPrice": "0x430e23400", + "hash": "0x82544cc4cf767ec9d235f2afa72af2cf468b25c682c302b76390cf0830006174", + "input": "0x", + "nonce": "0x87bf4f", + "to": "0x2fc9076c0ebfa453dee1649721010764cbdf18fc", + "transactionIndex": "0x0", + "value": "0x16345785d8a0000", + "type": "0x0", + "v": "0xe5", + "r": "0x282c0953168acda79a7ec86be5392370bbce08441aa803be0576dfa467a46329", + "s": "0x59e528253c8fe85e72c43d84dd13d6fe724899cf3f94c4800761f2414b2b8f1e" + } + ], + "transactionsRoot": "0xc6939e1f42fa4c4a264a1c1617cc0a6ac7122f3cb5c2848e53b3fba35b33f6ad", + "uncles": [] + } +} +``` diff --git a/v1.0/RPC Nodes/rpc-evm/rpc-cronos/eth_getblockbynumber.md b/v1.0/RPC Nodes/rpc-evm/rpc-ethereum-classic/eth_getblockbynumber.md similarity index 51% rename from v1.0/RPC Nodes/rpc-evm/rpc-cronos/eth_getblockbynumber.md rename to v1.0/RPC Nodes/rpc-evm/rpc-ethereum-classic/eth_getblockbynumber.md index dffa65b1..184b9a95 100644 --- a/v1.0/RPC Nodes/rpc-evm/rpc-cronos/eth_getblockbynumber.md +++ b/v1.0/RPC Nodes/rpc-evm/rpc-ethereum-classic/eth_getblockbynumber.md @@ -1,13 +1,13 @@ --- title: "eth_getblockbynumber" -slug: "rpc-cronos-eth_getblockbynumber" -excerpt: "Cronos RPC" +slug: "rpc-ethereum-classic-eth_getblockbynumber" +excerpt: "Ethereum Classic RPC" category: 65c5e93c623cad004b45d505 hidden: false metadata: - description: "Cronos RPC" + description: "Ethereum Classic RPC" image: [] - keywords: "cronos, rpc" + keywords: "ethereum classic , rpc" robots: "index" createdAt: "Wed Mar 06 2024 10:35:44 GMT+0000 (Coordinated Universal Time)" updatedAt: "Tue Apr 02 2024 08:40:59 GMT+0000 (Coordinated Universal Time)" @@ -22,12 +22,13 @@ updatedAt: "Tue Apr 02 2024 08:40:59 GMT+0000 (Coordinated Universal Time)" ```typescript // yarn add @tatumio/tatum -import { TatumSDK, Cronos, Network } from '@tatumio/tatum' +import { TatumSDK, EthereumClassic, Network } from '@tatumio/tatum' -const tatum = await TatumSDK.init({network: Network.CRONOS}) +const tatum = await TatumSDK.init({network: Network.ETHEREUM_CLASSIC}) const block = await tatum.rpc.getBlockByNumber('latest', true) + await tatum.destroy() // Destroy Tatum SDK - needed for stopping background jobs ``` {% endcode %} @@ -36,7 +37,7 @@ await tatum.destroy() // Destroy Tatum SDK - needed for stopping background jobs ### Overview -`eth_getBlockByNumber` is an JSON-RPC method that allows developers to query a specific block in the blockchain by its block number. This method can be used in various scenarios, such as analyzing historical transactions, validating the state of the blockchain, or monitoring the progress of mining activities. +`eth_getBlockByNumber` is an Flare JSON-RPC method that allows developers to query a specific block in the Flare blockchain by its block number. This method can be used in various scenarios, such as analyzing historical transactions, validating the state of the blockchain, or monitoring the progress of mining activities. ### Parameters @@ -84,4 +85,68 @@ If `returnFullTransactionObjects` is `true`, the `transactions` field contains t * **`value`** - The value being transferred (hexadecimal string). * **`gasPrice`** - The gas price in wei (hexadecimal string). * **`gas`** - The gas provided for the transaction (hexadecimal string). -* **`input`** - The input data for the transaction (byte string). \ No newline at end of file +* **`input`** - The input data for the transaction (byte string). + +### JSON-RPC Request and Response Examples + +Here are examples of JSON-RPC request and response for the `eth_getBlockByNumber` method: + +#### Request + +```json +{ + "id": 1, + "jsonrpc": "2.0", + "method": "eth_getBlockByNumber", + "params": ["latest", true] +} +``` + +#### Response + +```json +{ + "jsonrpc": "2.0", + "id": 1, + "result": { + "difficulty": "0x2", + "extraData": "0xd883010114846765746888676f312e31392e36856c696e75780000008279af9a2f9343c00920c795a7abe84303ee56588946383a15d1e9ee422a7df6dcbe199e4ec93511fe1ffa3c3ab10cb5b12459e8f64553ad3a741e9562e1d5e522c336a400", + "gasLimit": "0x2faed85", + "gasUsed": "0xd81f1", + "hash": "0x078610ca461480e4b78557f20e544084cccc4accb41f5c1b7ef792246b78c94b", + "logsBloom": "0x0020001000000000000001000000000000000000000000040000000000084000000004000800000000c06100800000000000000000010000200000000024008000004000000000000000001800001000a050000000040004000000000000000000000220020200000000000000400800080008000000000000001010004000400000000000010000000000000000000000002400000008000000008000000021022000000000000000000000000000000000000000000000000000000000010010180003000800000000000000000000000000800000000020000082000060000010000000001002010800000000000000020000080000800000000000000000", + "miner": "0x35552c16704d214347f29fa77f77da6d75d7c752", + "mixHash": "0x0000000000000000000000000000000000000000000000000000000000000000", + "nonce": "0x0000000000000000", + "number": "0x1b5dd23", + "parentHash": "0x41f85649fa6d5e58a4631f76724a96dba8313302323f0834b9cf2b63d0308e0f", + "receiptsRoot": "0x81835f75c1f7521016ce3404f19a44f10c4d56b6ab780fad3388d490c154afbe", + "sha3Uncles": "0x1dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347", + "size": "0x8e9", + "stateRoot": "0xda34eefae13e5940f564f3f6cc63c96fb9a0ee015b66552f01a14c2b002b0f7f", + "timestamp": "0x642ea5d2", + "totalDifficulty": "0x36908d2", + "transactions": [ + { + "blockHash": "0x078610ca461480e4b78557f20e544084cccc4accb41f5c1b7ef792246b78c94b", + "blockNumber": "0x1b5dd23", + "from": "0xaa25aa7a19f9c426e07dee59b12f944f4d9f1dd3", + "gas": "0x5208", + "gasPrice": "0x430e23400", + "hash": "0x82544cc4cf767ec9d235f2afa72af2cf468b25c682c302b76390cf0830006174", + "input": "0x", + "nonce": "0x87bf4f", + "to": "0x2fc9076c0ebfa453dee1649721010764cbdf18fc", + "transactionIndex": "0x0", + "value": "0x16345785d8a0000", + "type": "0x0", + "v": "0xe5", + "r": "0x282c0953168acda79a7ec86be5392370bbce08441aa803be0576dfa467a46329", + "s": "0x59e528253c8fe85e72c43d84dd13d6fe724899cf3f94c4800761f2414b2b8f1e" + } + ], + "transactionsRoot": "0xc6939e1f42fa4c4a264a1c1617cc0a6ac7122f3cb5c2848e53b3fba35b33f6ad", + "uncles": [] + } +} +``` diff --git a/v1.0/RPC Nodes/rpc-evm/rpc-ethereum-classic/eth_getblocktransactioncountbyhash.md b/v1.0/RPC Nodes/rpc-evm/rpc-ethereum-classic/eth_getblocktransactioncountbyhash.md new file mode 100644 index 00000000..ae4f0db5 --- /dev/null +++ b/v1.0/RPC Nodes/rpc-evm/rpc-ethereum-classic/eth_getblocktransactioncountbyhash.md @@ -0,0 +1,82 @@ +--- +title: "eth_getblocktransactioncountbyhash" +slug: "rpc-ethereum-classic-eth_getblocktransactioncountbyhash" +excerpt: "Ethereum Classic RPC" +category: 65c5e93c623cad004b45d505 +hidden: false +metadata: + description: "Ethereum Classic RPC" + image: [] + keywords: "ethereum classic , rpc" + robots: "index" +createdAt: "Wed Mar 06 2024 10:35:44 GMT+0000 (Coordinated Universal Time)" +updatedAt: "Tue Apr 02 2024 08:40:59 GMT+0000 (Coordinated Universal Time)" +--- +[block:html]{"html":"
\n
Archive Method
\n

Only on the full archive nodes. Complex queries might take longer and incur additional cost

\n
"}[/block] + +### How to use it + +{% tabs %} +{% tab title="TypeScript/JavaScript" %} +{% code overflow="wrap" lineNumbers="true" %} +```typescript +// yarn add @tatumio/tatum + +import { TatumSDK, EthereumClassic, Network } from '@tatumio/tatum' + +const tatum = await TatumSDK.init({network: Network.ETHEREUM_CLASSIC}) + +const response = await tatum.rpc.getBlockTransactionCountByHash('0x23d252bc4008a28b149cf9aa94a592dc488de13281ce6fab5b8bc681bab906fd') + +await tatum.destroy() // Destroy Tatum SDK - needed for stopping background jobs +``` +{% endcode %} +{% endtab %} +{% endtabs %} + +### Overview + +`eth_getBlockTransactionCountByHash` is an Flare RPC method used to fetch the number of transactions in a block by the block's hash. It is useful when you want to know the total number of transactions included in a specific block and don't want to retrieve the entire block data. This method can be used in various scenarios, such as monitoring the network activity or estimating transaction confirmation times. + +### Parameters + +This method requires a single parameter: + +* **`blockHash`**: The hash of the target block for which the transaction count will be retrieved. It should be a valid 32-byte hex string. + +Example of the parameter: + +* `blockHash`: `"0xb903239f8543d04b5dc1ba6579132b143087c68db1b2168786408fcbce568238"` + +### Return + +The method returns a single value: + +* `transactionCount`: The total number of transactions included in the specified block. It is returned as a hexadecimal value. + +### Examples + +#### JSON-RPC request + +```json +{ + "id": 1, + "jsonrpc": "2.0", + "method": "eth_getBlockTransactionCountByHash", + "params": [ + "0xb903239f8543d04b5dc1ba6579132b143087c68db1b2168786408fcbce568238" + ] +} +``` + +#### JSON-RPC response + +```json +{ + "id": 1, + "jsonrpc": "2.0", + "result": "0xa" +} +``` + +In this example, the block with the hash `"0xb903239f8543d04b5dc1ba6579132b143087c68db1b2168786408fcbce568238"` has a total of 10 transactions (indicated by the hexadecimal value `"0xa"`). diff --git a/v1.0/RPC Nodes/rpc-evm/rpc-cronos/eth_getblocktransactioncountbynumber.md b/v1.0/RPC Nodes/rpc-evm/rpc-ethereum-classic/eth_getblocktransactioncountbynumber.md similarity index 53% rename from v1.0/RPC Nodes/rpc-evm/rpc-cronos/eth_getblocktransactioncountbynumber.md rename to v1.0/RPC Nodes/rpc-evm/rpc-ethereum-classic/eth_getblocktransactioncountbynumber.md index c678be64..d93d7d2c 100644 --- a/v1.0/RPC Nodes/rpc-evm/rpc-cronos/eth_getblocktransactioncountbynumber.md +++ b/v1.0/RPC Nodes/rpc-evm/rpc-ethereum-classic/eth_getblocktransactioncountbynumber.md @@ -1,13 +1,13 @@ --- title: "eth_getblocktransactioncountbynumber" -slug: "rpc-cronos-eth_getblocktransactioncountbynumber" -excerpt: "Cronos RPC" +slug: "rpc-ethereum-classic-eth_getblocktransactioncountbynumber" +excerpt: "Ethereum Classic RPC" category: 65c5e93c623cad004b45d505 hidden: false metadata: - description: "Cronos RPC" + description: "Ethereum Classic RPC" image: [] - keywords: "cronos, rpc" + keywords: "ethereum classic , rpc" robots: "index" createdAt: "Wed Mar 06 2024 10:35:44 GMT+0000 (Coordinated Universal Time)" updatedAt: "Tue Apr 02 2024 08:40:59 GMT+0000 (Coordinated Universal Time)" @@ -22,11 +22,11 @@ updatedAt: "Tue Apr 02 2024 08:40:59 GMT+0000 (Coordinated Universal Time)" ```typescript // yarn add @tatumio/tatum -import { TatumSDK, Cronos, Network } from '@tatumio/tatum' +import { TatumSDK, EthereumClassic, Network } from '@tatumio/tatum' -const tatum = await TatumSDK.init({network: Network.CRONOS}) +const tatum = await TatumSDK.init({network: Network.ETHEREUM_CLASSIC}) -const response = await tatum.rpc.getBlockTransactionCountByNumber('0xC44FF8') +const response = await tatum.rpc.getBlockTransactionCountByNumber('0x11A62D9') await tatum.destroy() // Destroy Tatum SDK - needed for stopping background jobs ``` @@ -36,15 +36,42 @@ await tatum.destroy() // Destroy Tatum SDK - needed for stopping background jobs ### Overview -The `eth_getBlockTransactionCountByNumber` JSON-RPC method allows you to retrieve the number of transactions in a specified block. This method is particularly useful when you need to analyze the transaction activity of a specific block. You can use it to gain insights into network usage, analyze the impact of specific events on the network, or monitor transaction congestion in certain blocks. +The `eth_getBlockTransactionCountByNumber` Flare JSON-RPC method allows you to retrieve the number of transactions in a specified block. This method is particularly useful when you need to analyze the transaction activity of a specific block. You can use it to gain insights into network usage, analyze the impact of specific events on the Flare network, or monitor transaction congestion in certain blocks. ### Parameters 1. **`blockNumber`**: The block number for which the transaction count should be retrieved. It should be a hex-encoded value representing the block number. - * Example: `"0xC44FF8"` + * Example: `"0x1b4"` ### Return Object The return object is a hex-encoded value representing the number of transactions in the specified block. -* Example: `"0xa"` (10 transactions) \ No newline at end of file +* Example: `"0xa"` (10 transactions) + +### JSON-RPC Request and Response Examples + +#### Request + +```json +{ + "jsonrpc": "2.0", + "id": 1, + "method": "eth_getBlockTransactionCountByNumber", + "params": ["0x1b4"] +} +``` + +#### Response + +```json +{ + "jsonrpc": "2.0", + "id": 1, + "result": "0xa" +} +``` + + + +\ diff --git a/v1.0/RPC Nodes/rpc-evm/rpc-cronos/eth_getcode.md b/v1.0/RPC Nodes/rpc-evm/rpc-ethereum-classic/eth_getcode.md similarity index 58% rename from v1.0/RPC Nodes/rpc-evm/rpc-cronos/eth_getcode.md rename to v1.0/RPC Nodes/rpc-evm/rpc-ethereum-classic/eth_getcode.md index 1d7e21ed..ad3a7a92 100644 --- a/v1.0/RPC Nodes/rpc-evm/rpc-cronos/eth_getcode.md +++ b/v1.0/RPC Nodes/rpc-evm/rpc-ethereum-classic/eth_getcode.md @@ -1,13 +1,13 @@ --- title: "eth_getcode" -slug: "rpc-cronos-eth_getcode" -excerpt: "Cronos RPC" +slug: "rpc-ethereum-classic-eth_getcode" +excerpt: "Ethereum Classic RPC" category: 65c5e93c623cad004b45d505 hidden: false metadata: - description: "Cronos RPC" + description: "Ethereum Classic RPC" image: [] - keywords: "cronos, rpc" + keywords: "ethereum classic , rpc" robots: "index" createdAt: "Wed Mar 06 2024 10:35:44 GMT+0000 (Coordinated Universal Time)" updatedAt: "Tue Apr 02 2024 08:40:59 GMT+0000 (Coordinated Universal Time)" @@ -22,11 +22,11 @@ updatedAt: "Tue Apr 02 2024 08:40:59 GMT+0000 (Coordinated Universal Time)" ```typescript // yarn add @tatumio/tatum -import { TatumSDK, Cronos, Network } from '@tatumio/tatum' +import { TatumSDK, EthereumClassic, Network } from '@tatumio/tatum' -const tatum = await TatumSDK.init({network: Network.CRONOS}) +const tatum = await TatumSDK.init({network: Network.ETHEREUM_CLASSIC}) -const code = await tatum.rpc.getCode('0x523D6F30C4aaca133DAAD97eE2A0C48235bfF137') +const code = await tatum.rpc.getCode('0x15fd42A7447091530bC61179ee5fcc1e117aAAD8') await tatum.destroy() // Destroy Tatum SDK - needed for stopping background jobs ``` @@ -36,7 +36,7 @@ await tatum.destroy() // Destroy Tatum SDK - needed for stopping background jobs ### Overview -The `eth_getCode` method is part of the JSON-RPC API, which allows users to interact with the blockchain. This method is specifically used to retrieve the contract code (bytecode) of an account at a specific block number. It is helpful when developers need to examine the bytecode of a deployed contract or validate that the contract code on the blockchain matches the intended code. +The `eth_getCode` method is part of the Flare JSON-RPC API, which allows users to interact with the Flare blockchain. This method is specifically used to retrieve the contract code (bytecode) of an account at a specific block number. It is helpful when developers need to examine the bytecode of a deployed contract or validate that the contract code on the blockchain matches the intended code. Use cases for this method could include: @@ -48,8 +48,8 @@ Use cases for this method could include: The `eth_getCode` method accepts two parameters: -1. **`address`** (string): The address of the contract whose bytecode you want to retrieve. This should be a 20-byte address, formatted as a hex string with a `0x` prefix. - * Example: `"0x523D6F30C4aaca133DAAD97eE2A0C48235bfF137"` +1. **`address`** (string): The address of the contract whose bytecode you want to retrieve. This should be a 20-byte Flare address, formatted as a hex string with a `0x` prefix. + * Example: `"0x742d35Cc6634C0532925a3b844Bc454e4438f44e"` 2. **`block`** (string): The block number at which you want to retrieve the contract code. This can be specified as a hex string or one of the following special keywords: * `"earliest"`: The first block in the blockchain * `"latest"`: The most recent block in the blockchain @@ -61,4 +61,30 @@ The `eth_getCode` method accepts two parameters: The `eth_getCode` method returns a string representing the contract bytecode. The returned value is a hex string with a `0x` prefix. * If the account has contract code, the returned string will contain the bytecode. -* If the account is not a contract or does not exist, the returned string will be `0x`. \ No newline at end of file +* If the account is not a contract or does not exist, the returned string will be `0x`. + +### JSON Examples + +#### Request + +```json +{ + "id": 1, + "jsonrpc": "2.0", + "method": "eth_getCode", + "params": [ + "0x742d35Cc6634C0532925a3b844Bc454e4438f44e", + "latest" + ] +} +``` + +#### Response + +```json +{ + "id": 1, + "jsonrpc": "2.0", + "result": "0x606060...code_here...3839" +} +``` diff --git a/v1.0/RPC Nodes/rpc-evm/rpc-cronos/eth_getlogs.md b/v1.0/RPC Nodes/rpc-evm/rpc-ethereum-classic/eth_getlogs.md similarity index 64% rename from v1.0/RPC Nodes/rpc-evm/rpc-cronos/eth_getlogs.md rename to v1.0/RPC Nodes/rpc-evm/rpc-ethereum-classic/eth_getlogs.md index 7892772e..997f11b1 100644 --- a/v1.0/RPC Nodes/rpc-evm/rpc-cronos/eth_getlogs.md +++ b/v1.0/RPC Nodes/rpc-evm/rpc-ethereum-classic/eth_getlogs.md @@ -1,13 +1,13 @@ --- title: "eth_getlogs" -slug: "rpc-cronos-eth_getlogs" -excerpt: "Cronos RPC" +slug: "rpc-ethereum-classic-eth_getlogs" +excerpt: "Ethereum Classic RPC" category: 65c5e93c623cad004b45d505 hidden: false metadata: - description: "Cronos RPC" + description: "Ethereum Classic RPC" image: [] - keywords: "cronos, rpc" + keywords: "ethereum classic , rpc" robots: "index" createdAt: "Wed Mar 06 2024 10:35:44 GMT+0000 (Coordinated Universal Time)" updatedAt: "Tue Apr 02 2024 08:40:59 GMT+0000 (Coordinated Universal Time)" @@ -22,11 +22,11 @@ updatedAt: "Tue Apr 02 2024 08:40:59 GMT+0000 (Coordinated Universal Time)" ```typescript // yarn add @tatumio/tatum -import { TatumSDK, Cronos, Network } from '@tatumio/tatum' +import { TatumSDK, EthereumClassic, Network } from '@tatumio/tatum' -const tatum = await TatumSDK.init({network: Network.CRONOS}) +const tatum = await TatumSDK.init({network: Network.ETHEREUM_CLASSIC}) -const logs = await tatum.rpc.getLogs({ address : '0x523D6F30C4aaca133DAAD97eE2A0C48235bfF137'}) +const logs = await tatum.rpc.getLogs({ address : '0x15fd42A7447091530bC61179ee5fcc1e117aAAD8'}) await tatum.destroy() // Destroy Tatum SDK - needed for stopping background jobs ``` @@ -36,9 +36,9 @@ await tatum.destroy() // Destroy Tatum SDK - needed for stopping background jobs ### Overview -The `eth_getLogs` method is an JSON-RPC method that allows developers to query logs generated by the network, specifically event logs emitted by smart contracts. These logs are an essential part of the ecosystem as they provide a way for developers to monitor contract events and track contract state changes. +The `eth_getLogs` method is an Flare JSON-RPC method that allows developers to query logs generated by the Flare network, specifically event logs emitted by smart contracts. These logs are an essential part of the Flare ecosystem as they provide a way for developers to monitor contract events and track contract state changes. -This method is particularly useful when building decentralized applications (dApps) that rely on events emitted by smart contracts, as it enables developers to retrieve logs based on specific filter criteria. By using `eth_getLogs`, developers can efficiently track and react to events happening on the blockchain. +This method is particularly useful when building decentralized applications (dApps) that rely on events emitted by smart contracts, as it enables developers to retrieve logs based on specific filter criteria. By using `eth_getLogs`, developers can efficiently track and react to events happening on the Flare blockchain. ### Parameters @@ -49,7 +49,7 @@ The `eth_getLogs` method takes a single input parameter: an object containing th * **`toBlock`**: (optional) The ending block number for the search. Can be a block number or one of the following strings: `"earliest"`, `"latest"`, or `"pending"`. * Example: `"toBlock": "0x2"` * **`address`**: (optional) The address or list of addresses of the contracts to filter logs from. Can be a single address or an array of addresses. - * Example: `"address": "0x523D6F30C4aaca133DAAD97eE2A0C48235bfF137"` + * Example: `"address": "0x742d35Cc6634C0532925a3b844Bc454e4438f44e"` * **`topics`**: (optional) An array of up to four 32-byte topics. Topics are order-dependent, and each topic can be an array of topic hashes or `null`. * Example: `"topics": ["0x123..."]` * **`blockhash`**: (optional) The block hash to filter logs from. If provided, `fromBlock` and `toBlock` are ignored. @@ -78,4 +78,48 @@ The `eth_getLogs` method returns an array of log objects. Each log object contai * **`data`**: The data associated with the log. * Example: `"data":"0x0000000000000000000000000000000000000000000000000000000000000020"` * **`topics`**: An array of topics (order-dependent) associated with the log. - * Example: `"topics": ["0x123..."]` \ No newline at end of file + * Example: `"topics": ["0x123..."]` + +## JSON-RPC Examples + +#### Request + +```json +{ + "id": 1, + "jsonrpc": "2.0", + "method": "eth_getLogs", + "params": [ + { + "fromBlock": "0x1", + "toBlock": "0x2", + "address": "0x742d35Cc6634C0532925a3b844Bc454e4438f44e", + "topics": ["0x123..."] + } + ] +} +``` + +#### Response + +```json +{ + "id": 1, + "jsonrpc": "2.0", + "result": [ + { + "removed": false, + "logIndex": "0x1", + "transactionIndex": "0x0", + "transactionHash": "0x88eef...", + "blockHash": "0xc6ef9...", + "blockNumber": "0x1", + "address": "0x742d35Cc6634C0532925a3b844Bc454e4438f44e", + "data": "0x0000000000000000000000000000000000000000000000000000000000000020", + "topics": ["0x123..."] + } + ] +} +``` + +This documentation provides a comprehensive overview of the `eth_getLogs` Flare JSON-RPC method, its parameters, return objects, and JSON-RPC examples. By using this method, developers can effectively query logs generated by the Flare network and use the retrieved data to track and react to events happening on the Flare blockchain. diff --git a/v1.0/RPC Nodes/rpc-evm/rpc-cronos/eth_getproof.md b/v1.0/RPC Nodes/rpc-evm/rpc-ethereum-classic/eth_getproof.md similarity index 55% rename from v1.0/RPC Nodes/rpc-evm/rpc-cronos/eth_getproof.md rename to v1.0/RPC Nodes/rpc-evm/rpc-ethereum-classic/eth_getproof.md index 1a32ee67..fd18d4f8 100644 --- a/v1.0/RPC Nodes/rpc-evm/rpc-cronos/eth_getproof.md +++ b/v1.0/RPC Nodes/rpc-evm/rpc-ethereum-classic/eth_getproof.md @@ -1,13 +1,13 @@ --- title: "eth_getproof" -slug: "rpc-cronos-eth_getproof" -excerpt: "Cronos RPC" +slug: "rpc-ethereum-classic-eth_getproof" +excerpt: "Ethereum Classic RPC" category: 65c5e93c623cad004b45d505 hidden: false metadata: - description: "Cronos RPC" + description: "Ethereum Classic RPC" image: [] - keywords: "cronos, rpc" + keywords: "ethereum classic , rpc" robots: "index" createdAt: "Wed Mar 06 2024 10:35:44 GMT+0000 (Coordinated Universal Time)" updatedAt: "Tue Apr 02 2024 08:40:59 GMT+0000 (Coordinated Universal Time)" @@ -22,11 +22,11 @@ updatedAt: "Tue Apr 02 2024 08:40:59 GMT+0000 (Coordinated Universal Time)" ```typescript // yarn add @tatumio/tatum -import { TatumSDK, Cronos, Network } from '@tatumio/tatum' +import { TatumSDK, EthereumClassic, Network } from '@tatumio/tatum' -const tatum = await TatumSDK.init({network: Network.CRONOS}) +const tatum = await TatumSDK.init({network: Network.ETHEREUM_CLASSIC}) -const result = await tatum.rpc.getProof("0x523D6F30C4aaca133DAAD97eE2A0C48235bfF137", +const result = await tatum.rpc.getProof("0x15fd42A7447091530bC61179ee5fcc1e117aAAD8", ["0x0000000000000000000000000000000000000000000000000000000000000000"], "latest") @@ -38,13 +38,13 @@ await tatum.destroy() // Destroy Tatum SDK - needed for stopping background jobs ### Overview -The `eth_getProof` is an JSON-RPC method that retrieves the Merkle-Patricia proof for an account, storage key-value pairs, and account transaction count. It allows developers to verify the state of an account or storage value at a specific block without needing the entire state trie. This method is particularly useful for light clients or off-chain applications that require proof of an account's state or specific storage values. +The `eth_getProof` is an Flare JSON-RPC method that retrieves the Merkle-Patricia proof for an account, storage key-value pairs, and account transaction count. It allows developers to verify the state of an account or storage value at a specific block without needing the entire Flare state trie. This method is particularly useful for light clients or off-chain applications that require proof of an account's state or specific storage values. ### Parameters 1. **`address`** - `Data`, 20 Bytes * The address of the account. - * Example: `"0x523D6F30C4aaca133DAAD97eE2A0C48235bfF137"` + * Example: `"0x742d35Cc6634C0532925a3b844Bc454e4438f44e"` 2. **`keys`** - `Array` of `Data` * An array of storage keys for which the proof should be generated. * Example: `["0x0000000000000000000000000000000000000000000000000000000000000000"]` @@ -68,4 +68,54 @@ The method returns an object containing the following fields: * An array of storage proof objects, one for each requested key, containing the following fields: * `key` - `Data`, 32 Bytes: The storage key. * `value` - `Quantity`: The storage value. - * `proof` - `Array` of `Data`: The serialized Merkle-Patricia proof for the key-value pair. \ No newline at end of file + * `proof` - `Array` of `Data`: The serialized Merkle-Patricia proof for the key-value pair. + +### JSON-RPC Request and Response Examples + +_Request_: + +```json +{ + "id": 1, + "jsonrpc": "2.0", + "method": "eth_getProof", + "params": [ + "0x742d35Cc6634C0532925a3b844Bc454e4438f44e", + [ + "0x0000000000000000000000000000000000000000000000000000000000000000" + ], + "latest" + ] +} +``` + +_Response_: + +```json +{ + "id": 1, + "jsonrpc": "2.0", + "result": { + "accountProof": [ + "0x...", + "0x...", + "0x..." + ], + "balance": "0xde0b6b3a7640000", + "codeHash": "0x...", + "nonce": "0x1", + "storageProof": [ + { + "key": "0x0000000000000000000000000000000000000000000000000000000000000000", + "value": "0xde0b6b3a7640000", + "proof": [ + "0x...", + "0x...", + "0x..." + ] + } + ] + } +} + +``` diff --git a/v1.0/RPC Nodes/rpc-evm/rpc-cronos/eth_getstorageat.md b/v1.0/RPC Nodes/rpc-evm/rpc-ethereum-classic/eth_getstorageat.md similarity index 54% rename from v1.0/RPC Nodes/rpc-evm/rpc-cronos/eth_getstorageat.md rename to v1.0/RPC Nodes/rpc-evm/rpc-ethereum-classic/eth_getstorageat.md index f6078b3f..d76cc51c 100644 --- a/v1.0/RPC Nodes/rpc-evm/rpc-cronos/eth_getstorageat.md +++ b/v1.0/RPC Nodes/rpc-evm/rpc-ethereum-classic/eth_getstorageat.md @@ -1,13 +1,13 @@ --- title: "eth_getstorageat" -slug: "rpc-cronos-eth_getstorageat" -excerpt: "Cronos RPC" +slug: "rpc-ethereum-classic-eth_getstorageat" +excerpt: "Ethereum Classic RPC" category: 65c5e93c623cad004b45d505 hidden: false metadata: - description: "Cronos RPC" + description: "Ethereum Classic RPC" image: [] - keywords: "cronos, rpc" + keywords: "ethereum classic , rpc" robots: "index" createdAt: "Wed Mar 06 2024 10:35:44 GMT+0000 (Coordinated Universal Time)" updatedAt: "Tue Apr 02 2024 08:40:59 GMT+0000 (Coordinated Universal Time)" @@ -22,11 +22,11 @@ updatedAt: "Tue Apr 02 2024 08:40:59 GMT+0000 (Coordinated Universal Time)" ```typescript // yarn add @tatumio/tatum -import { TatumSDK, Cronos, Network } from '@tatumio/tatum' +import { TatumSDK, EthereumClassic, Network } from '@tatumio/tatum' -const tatum = await TatumSDK.init({network: Network.CRONOS}) +const tatum = await TatumSDK.init({network: Network.ETHEREUM_CLASSIC}) -const response = await tatum.rpc.getStorageAt('0x523D6F30C4aaca133DAAD97eE2A0C48235bfF137', '0x0') +const response = await tatum.rpc.getStorageAt('0x15fd42A7447091530bC61179ee5fcc1e117aAAD8', '0x0') await tatum.destroy() // Destroy Tatum SDK - needed for stopping background jobs ``` @@ -36,14 +36,14 @@ await tatum.destroy() // Destroy Tatum SDK - needed for stopping background jobs ### Overview -`eth_getStorageAt` is an JSON-RPC method that allows you to query the storage value of a contract at a given position. It can be used to inspect the internal state of a smart contract. This method is particularly useful for developers, auditors, and analysts who want to examine contract storage values for various purposes, such as debugging, verifying contract behavior, or analyzing data. +`eth_getStorageAt` is an Flare JSON-RPC method that allows you to query the storage value of a contract at a given position. It can be used to inspect the internal state of a smart contract. This method is particularly useful for developers, auditors, and analysts who want to examine contract storage values for various purposes, such as debugging, verifying contract behavior, or analyzing data. ### Parameters `eth_getStorageAt` accepts three parameters: 1. **`address`**: The address of the contract you want to query. - * Example: `"0x523D6F30C4aaca133DAAD97eE2A0C48235bfF137"` + * Example: `"0x742d35Cc6634C0532925a3b844Bc454e4438f44e"` 2. **`position`**: The storage position (slot) you want to query. * Example: `"0x0"` 3. **`blockParameter`**: The block number, block hash, or one of the string literals (`"earliest"`, `"latest"` or `"pending"`), representing the point in the blockchain to query the storage value. @@ -53,4 +53,31 @@ await tatum.destroy() // Destroy Tatum SDK - needed for stopping background jobs The return object is a single string value, representing the storage value at the given position in the contract. -* `result`: The storage value in a 32-byte (64 character) hexadecimal format. \ No newline at end of file +* `result`: The storage value in a 32-byte (64 character) hexadecimal format. + +### JSON-RPC Request Example + +```json +{ + "id": 1, + "jsonrpc": "2.0", + "method": "eth_getStorageAt", + "params": [ + "0x742d35Cc6634C0532925a3b844Bc454e4438f44e", + "0x0", + "latest" + ] +} +``` + +### JSON-RPC Response Example + +```json +{ + "id": 1, + "jsonrpc": "2.0", + "result": "0x0000000000000000000000000000000000000000000000000000000000000123" +} +``` + +\ diff --git a/v1.0/RPC Nodes/rpc-evm/rpc-ethereum-classic/eth_gettransactionbyblockhashandindex.md b/v1.0/RPC Nodes/rpc-evm/rpc-ethereum-classic/eth_gettransactionbyblockhashandindex.md new file mode 100644 index 00000000..13e71e5f --- /dev/null +++ b/v1.0/RPC Nodes/rpc-evm/rpc-ethereum-classic/eth_gettransactionbyblockhashandindex.md @@ -0,0 +1,116 @@ +--- +title: "eth_gettransactionbyblockhashandindex" +slug: "rpc-ethereum-classic-eth_gettransactionbyblockhashandindex" +excerpt: "Ethereum Classic RPC" +category: 65c5e93c623cad004b45d505 +hidden: false +metadata: + description: "Ethereum Classic RPC" + image: [] + keywords: "ethereum classic , rpc" + robots: "index" +createdAt: "Wed Mar 06 2024 10:35:44 GMT+0000 (Coordinated Universal Time)" +updatedAt: "Tue Apr 02 2024 08:40:59 GMT+0000 (Coordinated Universal Time)" +--- +[block:html]{"html":"
\n
Archive Method
\n

Only on the full archive nodes. Complex queries might take longer and incur additional cost

\n
"}[/block] + +### How to use it + +{% tabs %} +{% tab title="TypeScript/JavaScript" %} +{% code overflow="wrap" lineNumbers="true" %} +```typescript +// yarn add @tatumio/tatum + +import { TatumSDK, EthereumClassic, Network } from '@tatumio/tatum' + +const tatum = await TatumSDK.init({network: Network.ETHEREUM_CLASSIC}) + +const tx = await tatum.rpc.getTransactionByBlockHashAndIndex('0x23d252bc4008a28b149cf9aa94a592dc488de13281ce6fab5b8bc681bab906fd', 0) + +await tatum.destroy() // Destroy Tatum SDK - needed for stopping background jobs +``` +{% endcode %} +{% endtab %} +{% endtabs %} + +### Overview + +`eth_getTransactionByBlockHashAndIndex` is an Flare JSON-RPC method that allows you to fetch the transaction details based on the block hash and the index of the transaction within that block. This method can be useful when you want to retrieve transaction details for a specific transaction without knowing its transaction hash. + +Use cases for this method may include: + +* Inspecting transaction details for debugging purposes +* Gathering data for transaction analysis +* Fetching transaction information for specific blocks in a block explorer application + +### Parameters + +The `eth_getTransactionByBlockHashAndIndex` method accepts two parameters: + +1. `blockHash` (required): The hash of the block containing the transaction. + * Example: `"0x9a9a2a0d69b4ff48f7a2a8a26d135e1dbcbd3c3be3e8a3c90de0bcb104e4c4b4"` +2. `transactionIndex` (required): The index of the transaction within the specified block. The index is a hexadecimal value. + * Example: `"0x0"` + +### Return Object + +The method returns a JSON object containing the following fields: + +1. `hash`: The transaction hash as a 32-byte hex string. +2. `nonce`: The number of transactions made by the sender prior to this one. +3. `blockHash`: The hash of the block in which this transaction is included. +4. `blockNumber`: The block number in which this transaction is included. +5. `transactionIndex`: The index of the transaction within the block. +6. `from`: The address of the sender. +7. `to`: The address of the recipient. `null` if the transaction is a contract creation transaction. +8. `value`: The value transferred in wei. +9. `gasPrice`: The gas price provided by the sender in wei. +10. `gas`: The gas limit provided by the sender. +11. `input`: The data sent along with the transaction. + +### JSON Examples + +Request: + +```json +{ + "jsonrpc": "2.0", + "id": 1, + "method": "eth_getTransactionByBlockHashAndIndex", + "params": [ + "0x1091a5831b3556e80e53598c24e9d592e104dba0428f47f94c61523eb52d09d8", + "0x0" + ] +} +``` + +Response: + +```json +{ + "jsonrpc": "2.0", + "id": 1, + "result": { + "blockHash": "0x1091a5831b3556e80e53598c24e9d592e104dba0428f47f94c61523eb52d09d8", + "blockNumber": "0x316624", + "from": "0x37a53636ee68f59d9346aabcfc0d36011d9d5b35", + "gas": "0x5b8d80", + "gasPrice": "0x59682f0a", + "maxFeePerGas": "0x59682f10", + "maxPriorityFeePerGas": "0x59682f00", + "hash": "0x40a0f78e346d15b05efa1861149e5999ea48197dcf104d69160d45b08b7a5118", + "input": "0xb1dc65a4000129d4314ec8c4bafb6468cc9d3c21de025fa54002558c9f76aec833406ab600000000000000000000000000000000000000000000000000000000001ccc01f18333a24416e0a0be9cdb78505c9c3c27fa42bccdbe6456cd6c1fc81bee7c0e00000000000000000000000000000000000000000000000000000000000000e0000000000000000000000000000000000000000000000000000000000000022000000000000000000000000000000000000000000000000000000000000003a001000000010100010100010000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000120000000000000000000000000000000000000000000000000000000000000002000000000000000000000000000000000000000000000000000000000000000800000000000000000000000000000000000000000000000000000000000003d150000000000000000000000000000000000000000000000000000000000003d17325325668a08b50a9587fd4605ce02dbc5ccefc4883a41b485ff4dc4a4f86f1e0000000000000000000000000000000000000000000000000000000000000060000000000000000000000000000000000000000000000000000000000000a8690000000000000000000000000000000000000000000000000000009d29229e000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000ba6547e7b549a1f180c5ad4f2e2e7104fecb8373482f3de6574ecbeefdc9be9dfd9f1934768a23584f1508adad8a7bbfbe445a27bed9f1d4538d4e4c9e458b0c5274b6f714f5aee9a8d56aeb8957b6da6b8914e445a46dcd349737b2eb7d72132e41926d07355de577b13e6ec8e55eaaf628b333197a8d1292bed1c375e891e1da1d519aabbebcc6d299b575b7bef506e2db9493de6f0cfdb0436a81597eb155edc63a8ea655a9b405a0c41c923b1734d78b5d9812f36a602ace3d8c5b22beb9519e406f32de9768e518f2b253a95364a9a2838ba5023c52d503fe8fa811c8803399679a19513671b13d4040e46be74e152d39be4f68bfecaa57d27965ba724a09464734faf7230b19e04f4aa581f10066884e2f402af36f0cdbf08de95e190f4f31fd3b718c1317b65fba9e7ea45ef6180e4861839c6395c814214ee8d56b28ba19f47b6b80f43045635432971b30f2bfb3a26a53ca502bf21fa598c5ddb934b000000000000000000000000000000000000000000000000000000000000000b3ab737e679aefe131ad3efc850fd2c50b316aabcdaa4368587d9606df84b3590541698c7c5538111187964e1b3f39fa033033bb7cab30275ea11b912089663ec43243ff37fa9d2cce04dfce25738c3a484d42f8d8a2c6be226627606f75788ee0e777481b5bd100d00d118bddd18e8726f7a54333b6228f57fa3237799079eb56e6e0ac0cb0f334d23f7284e2dcb2f463d8104fc198389e42a9d1bad1dcfe983115d3d85474db611a6e82b2f61b8d93efa77bc039bd5b3b0f02a7fc587d4a12a0daf256c21ecb9664e6c90c2bfb72a753ff008d3306f7cd4c823df6685fc4cba1514ed132d6367a8f99fba241fc6ef6917f5279ebfdd3e05a296e5c4d77a5463037d7c8180d0644d7e90123918c30fca011d710201ceabcae277924f32ff6b9d0e4d285eb59b4b56d3af8d4b2ab1a39ec2d4324e49deea661cbd43f21cbdc76a10a14055ecdd3251a5860c3bb02bcc1f21da5564fc05adbac70c7565fb5f44b8", + "nonce": "0xec0", + "to": "0x8febc74c26129c8d7e60288c6dccc75eb494aa3c", + "transactionIndex": "0x0", + "value": "0x0", + "type": "0x2", + "accessList": [], + "chainId": "0xaa36a7", + "v": "0x1", + "r": "0xccf7b8fd2d63782e651f4d9650c0ed1a430060fd947d97b6504876f8ea16b357", + "s": "0x50c56d90105b1b8aa475c9500137e9b7c4f0a331fee076bc395a695dc471dc05" + } +} +``` diff --git a/v1.0/RPC Nodes/rpc-evm/rpc-ethereum-classic/eth_gettransactionbyblocknumberandindex.md b/v1.0/RPC Nodes/rpc-evm/rpc-ethereum-classic/eth_gettransactionbyblocknumberandindex.md new file mode 100644 index 00000000..18b0ff50 --- /dev/null +++ b/v1.0/RPC Nodes/rpc-evm/rpc-ethereum-classic/eth_gettransactionbyblocknumberandindex.md @@ -0,0 +1,116 @@ +--- +title: "eth_gettransactionbyblocknumberandindex" +slug: "rpc-ethereum-classic-eth_gettransactionbyblocknumberandindex" +excerpt: "Ethereum Classic RPC" +category: 65c5e93c623cad004b45d505 +hidden: false +metadata: + description: "Ethereum Classic RPC" + image: [] + keywords: "ethereum classic , rpc" + robots: "index" +createdAt: "Wed Mar 06 2024 10:35:44 GMT+0000 (Coordinated Universal Time)" +updatedAt: "Tue Apr 02 2024 08:40:59 GMT+0000 (Coordinated Universal Time)" +--- +[block:html]{"html":"
\n
Archive Method
\n

Only on the full archive nodes. Complex queries might take longer and incur additional cost

\n
"}[/block] + +### How to use it + +{% tabs %} +{% tab title="TypeScript/JavaScript" %} +{% code overflow="wrap" lineNumbers="true" %} +```typescript +// yarn add @tatumio/tatum + +import { TatumSDK, EthereumClassic, Network } from '@tatumio/tatum' + +const tatum = await TatumSDK.init({network: Network.ETHEREUM_CLASSIC}) + +const tx = await tatum.rpc.getTransactionByBlockNumberAndIndex('0x11A62D9', 0) + +await tatum.destroy() // Destroy Tatum SDK - needed for stopping background jobs +``` +{% endcode %} +{% endtab %} +{% endtabs %} + +### Overview + +`eth_getTransactionByBlockHashAndIndex` is an Flare JSON-RPC method that allows you to fetch the transaction details based on the block hash and the index of the transaction within that block. This method can be useful when you want to retrieve transaction details for a specific transaction without knowing its transaction hash. + +Use cases for this method may include: + +* Inspecting transaction details for debugging purposes +* Gathering data for transaction analysis +* Fetching transaction information for specific blocks in a block explorer application + +### Parameters + +The `eth_getTransactionByBlockHashAndIndex` method accepts two parameters: + +1. `blockNumber` (required): The hash of the block containing the transaction. + * Example: `"0x316624"` +2. `transactionIndex` (required): The index of the transaction within the specified block. The index is a hexadecimal value. + * Example: `"0x0"` + +### Return Object + +The method returns a JSON object containing the following fields: + +1. `hash`: The transaction hash as a 32-byte hex string. +2. `nonce`: The number of transactions made by the sender prior to this one. +3. `blockHash`: The hash of the block in which this transaction is included. +4. `blockNumber`: The block number in which this transaction is included. +5. `transactionIndex`: The index of the transaction within the block. +6. `from`: The address of the sender. +7. `to`: The address of the recipient. `null` if the transaction is a contract creation transaction. +8. `value`: The value transferred in wei. +9. `gasPrice`: The gas price provided by the sender in wei. +10. `gas`: The gas limit provided by the sender. +11. `input`: The data sent along with the transaction. + +### JSON Examples + +Request: + +```json +{ + "jsonrpc": "2.0", + "id": 1, + "method": "eth_getTransactionByBlockNumberAndIndex", + "params": [ + "0x316624", + "0x0" + ] +} +``` + +Response: + +```json +{ + "jsonrpc": "2.0", + "id": 1, + "result": { + "blockHash": "0x1091a5831b3556e80e53598c24e9d592e104dba0428f47f94c61523eb52d09d8", + "blockNumber": "0x316624", + "from": "0x37a53636ee68f59d9346aabcfc0d36011d9d5b35", + "gas": "0x5b8d80", + "gasPrice": "0x59682f0a", + "maxFeePerGas": "0x59682f10", + "maxPriorityFeePerGas": "0x59682f00", + "hash": "0x40a0f78e346d15b05efa1861149e5999ea48197dcf104d69160d45b08b7a5118", + "input": "0xb1dc65a4000129d4314ec8c4bafb6468cc9d3c21de025fa54002558c9f76aec833406ab600000000000000000000000000000000000000000000000000000000001ccc01f18333a24416e0a0be9cdb78505c9c3c27fa42bccdbe6456cd6c1fc81bee7c0e00000000000000000000000000000000000000000000000000000000000000e0000000000000000000000000000000000000000000000000000000000000022000000000000000000000000000000000000000000000000000000000000003a001000000010100010100010000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000120000000000000000000000000000000000000000000000000000000000000002000000000000000000000000000000000000000000000000000000000000000800000000000000000000000000000000000000000000000000000000000003d150000000000000000000000000000000000000000000000000000000000003d17325325668a08b50a9587fd4605ce02dbc5ccefc4883a41b485ff4dc4a4f86f1e0000000000000000000000000000000000000000000000000000000000000060000000000000000000000000000000000000000000000000000000000000a8690000000000000000000000000000000000000000000000000000009d29229e000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000ba6547e7b549a1f180c5ad4f2e2e7104fecb8373482f3de6574ecbeefdc9be9dfd9f1934768a23584f1508adad8a7bbfbe445a27bed9f1d4538d4e4c9e458b0c5274b6f714f5aee9a8d56aeb8957b6da6b8914e445a46dcd349737b2eb7d72132e41926d07355de577b13e6ec8e55eaaf628b333197a8d1292bed1c375e891e1da1d519aabbebcc6d299b575b7bef506e2db9493de6f0cfdb0436a81597eb155edc63a8ea655a9b405a0c41c923b1734d78b5d9812f36a602ace3d8c5b22beb9519e406f32de9768e518f2b253a95364a9a2838ba5023c52d503fe8fa811c8803399679a19513671b13d4040e46be74e152d39be4f68bfecaa57d27965ba724a09464734faf7230b19e04f4aa581f10066884e2f402af36f0cdbf08de95e190f4f31fd3b718c1317b65fba9e7ea45ef6180e4861839c6395c814214ee8d56b28ba19f47b6b80f43045635432971b30f2bfb3a26a53ca502bf21fa598c5ddb934b000000000000000000000000000000000000000000000000000000000000000b3ab737e679aefe131ad3efc850fd2c50b316aabcdaa4368587d9606df84b3590541698c7c5538111187964e1b3f39fa033033bb7cab30275ea11b912089663ec43243ff37fa9d2cce04dfce25738c3a484d42f8d8a2c6be226627606f75788ee0e777481b5bd100d00d118bddd18e8726f7a54333b6228f57fa3237799079eb56e6e0ac0cb0f334d23f7284e2dcb2f463d8104fc198389e42a9d1bad1dcfe983115d3d85474db611a6e82b2f61b8d93efa77bc039bd5b3b0f02a7fc587d4a12a0daf256c21ecb9664e6c90c2bfb72a753ff008d3306f7cd4c823df6685fc4cba1514ed132d6367a8f99fba241fc6ef6917f5279ebfdd3e05a296e5c4d77a5463037d7c8180d0644d7e90123918c30fca011d710201ceabcae277924f32ff6b9d0e4d285eb59b4b56d3af8d4b2ab1a39ec2d4324e49deea661cbd43f21cbdc76a10a14055ecdd3251a5860c3bb02bcc1f21da5564fc05adbac70c7565fb5f44b8", + "nonce": "0xec0", + "to": "0x8febc74c26129c8d7e60288c6dccc75eb494aa3c", + "transactionIndex": "0x0", + "value": "0x0", + "type": "0x2", + "accessList": [], + "chainId": "0xaa36a7", + "v": "0x1", + "r": "0xccf7b8fd2d63782e651f4d9650c0ed1a430060fd947d97b6504876f8ea16b357", + "s": "0x50c56d90105b1b8aa475c9500137e9b7c4f0a331fee076bc395a695dc471dc05" + } +} +``` diff --git a/v1.0/RPC Nodes/rpc-evm/rpc-ethereum-classic/eth_gettransactionbyhash.md b/v1.0/RPC Nodes/rpc-evm/rpc-ethereum-classic/eth_gettransactionbyhash.md new file mode 100644 index 00000000..e1634038 --- /dev/null +++ b/v1.0/RPC Nodes/rpc-evm/rpc-ethereum-classic/eth_gettransactionbyhash.md @@ -0,0 +1,106 @@ +--- +title: "eth_gettransactionbyhash" +slug: "rpc-ethereum-classic-eth_gettransactionbyhash" +excerpt: "Ethereum Classic RPC" +category: 65c5e93c623cad004b45d505 +hidden: false +metadata: + description: "Ethereum Classic RPC" + image: [] + keywords: "ethereum classic , rpc" + robots: "index" +createdAt: "Wed Mar 06 2024 10:35:44 GMT+0000 (Coordinated Universal Time)" +updatedAt: "Tue Apr 02 2024 08:40:59 GMT+0000 (Coordinated Universal Time)" +--- +[block:html]{"html":"
\n
Archive Method
\n

Only on the full archive nodes. Complex queries might take longer and incur additional cost

\n
"}[/block] + +### How to use it + +{% tabs %} +{% tab title="TypeScript/JavaScript" %} +{% code overflow="wrap" lineNumbers="true" %} +```typescript +// yarn add @tatumio/tatum + +import { TatumSDK, EthereumClassic, Network } from '@tatumio/tatum' + +const tatum = await TatumSDK.init({network: Network.ETHEREUM_CLASSIC}) + +const tx = await tatum.rpc.getTransactionByHash('0x311b9228c7eb66500a3bc01162e0c7d3687e1df84d2e9b6104a87f8178b608c1') + +await tatum.destroy() // Destroy Tatum SDK - needed for stopping background jobs +``` +{% endcode %} +{% endtab %} +{% endtabs %} + +### Overview + +`eth_getTransactionByHash` is an Flare JSON-RPC method that allows you to query transaction details based on its hash. This method is useful when you want to retrieve information about a specific transaction, such as its sender, receiver, value, and more. Common use cases include tracking transaction status, monitoring incoming transactions, or analyzing historical transaction data. + +### Parameters + +The `eth_getTransactionByHash` method takes one parameter: + +* **`transactionHash`**: The hash of the transaction you want to retrieve. This should be a 32-byte hash string with a `0x` prefix. + * Example: `"0xa536596d043c03d709aaccbc53f421963fe3537274e86444cd984404cf9ecb13"` + +### Return Object + +The method returns a transaction object with the following fields: + +* **`hash`**: The hash of the transaction (32 bytes). +* **`nonce`**: The number of transactions sent by the sender prior to this one (integer). +* **`blockHash`**: The hash of the block in which the transaction was included (32 bytes), or `null` if the transaction is not yet mined. +* **`blockNumber`**: The block number in which the transaction was included (integer), or `null` if the transaction is not yet mined. +* **`transactionIndex`**: The index of the transaction in the block (integer), or `null` if the transaction is not yet mined. +* **`from`**: The address of the sender (20 bytes). +* **`to`**: The address of the receiver (20 bytes), or `null` for contract creation transactions. +* **`value`**: The value transferred in the transaction, in wei. +* **`gasPrice`**: The price of gas for the transaction, in wei. +* **`maxFeePerGas`** - The maximum fee per gas set in the transaction. +* **`maxPriorityFeePerGas`** - The maximum priority gas fee set in the transaction. +* **`gas`**: The maximum amount of gas the transaction is allowed to consume. +* **`input`**: The data payload of the transaction (string), or `0x` for simple value transfers. + +### JSON-RPC Examples + +Request: + +```json +{ + "jsonrpc": "2.0", + "method": "eth_getTransactionByHash", + "params": ["0xa536596d043c03d709aaccbc53f421963fe3537274e86444cd984404cf9ecb13"], + "id": 1 +} +``` + +Response: + +```json +{ + "jsonrpc": "2.0", + "id": 1, + "result": { + "blockHash": "0x1091a5831b3556e80e53598c24e9d592e104dba0428f47f94c61523eb52d09d8", + "blockNumber": "0x316624", + "from": "0x53e8577c4347c365e4e0da5b57a589cb6f2ab848", + "gas": "0x3c524", + "gasPrice": "0x306dc421e", + "hash": "0xa536596d043c03d709aaccbc53f421963fe3537274e86444cd984404cf9ecb13", + "input": "0x50bb4e7f00000000000000000000000074b4551c177592a908c6ab9ce671bfe8c1b5bd40000000000000000000000000000000000000000000000000000056b990e70e000000000000000000000000000000000000000000000000000000000000000060000000000000000000000000000000000000000000000000000000000000006068747470733a2f2f6574682d6d61696e6e65742e672e616c6368656d792e636f6d2f76322f72646f704c505054424a31536f786b2d555179306b7464676f4b45326146637a2f6765744e4654732f3f6f776e65723d766974616c696b2e657468", + "nonce": "0xc97", + "to": "0x211500d1960bdb7ba3390347ffd8ad486b897a18", + "transactionIndex": "0x4", + "value": "0x0", + "type": "0x0", + "chainId": "0xaa36a7", + "v": "0x1546d71", + "r": "0xf89098451217613aa4abbb3f8988e75e20ae948d07bf8b26c472bc9bda50c9d9", + "s": "0x15cfb5b34bcb23730aeadc28df3b66fa9cf28103ffc8b557d76f0c1df078028e" + } +} +``` + +\ diff --git a/v1.0/RPC Nodes/rpc-evm/rpc-ethereum-classic/eth_gettransactioncount.md b/v1.0/RPC Nodes/rpc-evm/rpc-ethereum-classic/eth_gettransactioncount.md new file mode 100644 index 00000000..94134ba5 --- /dev/null +++ b/v1.0/RPC Nodes/rpc-evm/rpc-ethereum-classic/eth_gettransactioncount.md @@ -0,0 +1,88 @@ +--- +title: "eth_gettransactioncount" +slug: "rpc-ethereum-classic-eth_gettransactioncount" +excerpt: "Ethereum Classic RPC" +category: 65c5e93c623cad004b45d505 +hidden: false +metadata: + description: "Ethereum Classic RPC" + image: [] + keywords: "ethereum classic , rpc" + robots: "index" +createdAt: "Wed Mar 06 2024 10:35:44 GMT+0000 (Coordinated Universal Time)" +updatedAt: "Tue Apr 02 2024 08:40:59 GMT+0000 (Coordinated Universal Time)" +--- +[block:html]{"html":"
\n
Archive Method
\n

Only on the full archive nodes. Complex queries might take longer and incur additional cost

\n
"}[/block] + +### How to use it + +{% tabs %} +{% tab title="TypeScript/JavaScript" %} +{% code overflow="wrap" lineNumbers="true" %} +```typescript +// yarn add @tatumio/tatum + +import { TatumSDK, EthereumClassic, Network } from '@tatumio/tatum' + +const tatum = await TatumSDK.init({network: Network.ETHEREUM_CLASSIC}) + +const result = await tatum.rpc.getTransactionCount('0xa41d19F4258a388c639B7CcD938FCE3fb7D05e86', 'latest') + +await tatum.destroy() // Destroy Tatum SDK - needed for stopping background jobs +``` +{% endcode %} +{% endtab %} +{% endtabs %} + +### Overview + +The `eth_getTransactionCount` method is an Flare JSON-RPC method that retrieves the number of transactions sent from a given address. It is a useful method for developers who need to keep track of an account's nonce value to avoid transaction collisions or incorrect order of execution. The nonce value is essential for ensuring transaction uniqueness and preventing replay attacks. + +Use cases for this method include: + +* Determining the nonce value for a new transaction to be sent from a specific address +* Monitoring the number of transactions sent by an address to observe its activity +* Troubleshooting transaction issues and verifying if a transaction was submitted successfully + +### Parameters + +The `eth_getTransactionCount` method accepts two parameters: + +1. **`address`** - The Flare address whose transaction count will be retrieved. + * Example: `"0x742d35Cc6634C0532925a3b844Bc454e4438f44e"` +2. **`blockParameter`** - A string indicating the block number or block state to consider when retrieving the transaction count. + * Possible values: `"earliest"`, `"latest"`, `"pending"`, or a specific block number in hexadecimal format + * Example: `"latest"` + +### Return Object + +The method returns a single value: + +* **`transactionCount`** - A hexadecimal representation of the number of transactions sent from the specified address. + * Example: `"0x1e"` + +### JSON-RPC Request and Response Examples + +_Request_: + +```json +{ + "jsonrpc": "2.0", + "id": 1, + "method": "eth_getTransactionCount", + "params": [ + "0x742d35Cc6634C0532925a3b844Bc454e4438f44e", + "latest" + ] +} +``` + +_Response_: + +```json +{ + "jsonrpc": "2.0", + "id": 1, + "result": "0x1e" +} +``` diff --git a/v1.0/RPC Nodes/rpc-evm/rpc-ethereum-classic/eth_gettransactionreceipt.md b/v1.0/RPC Nodes/rpc-evm/rpc-ethereum-classic/eth_gettransactionreceipt.md new file mode 100644 index 00000000..06b1b706 --- /dev/null +++ b/v1.0/RPC Nodes/rpc-evm/rpc-ethereum-classic/eth_gettransactionreceipt.md @@ -0,0 +1,122 @@ +--- +title: "eth_gettransactionreceipt" +slug: "rpc-ethereum-classic-eth_gettransactionreceipt" +excerpt: "Ethereum Classic RPC" +category: 65c5e93c623cad004b45d505 +hidden: false +metadata: + description: "Ethereum Classic RPC" + image: [] + keywords: "ethereum classic , rpc" + robots: "index" +createdAt: "Wed Mar 06 2024 10:35:44 GMT+0000 (Coordinated Universal Time)" +updatedAt: "Tue Apr 02 2024 08:40:59 GMT+0000 (Coordinated Universal Time)" +--- +[block:html]{"html":"
\n
Archive Method
\n

Only on the full archive nodes. Complex queries might take longer and incur additional cost

\n
"}[/block] + +### How to use it + +{% tabs %} +{% tab title="TypeScript/JavaScript" %} +{% code overflow="wrap" lineNumbers="true" %} +```typescript +// yarn add @tatumio/tatum + +import { TatumSDK, EthereumClassic, Network } from '@tatumio/tatum' + +const tatum = await TatumSDK.init({network: Network.ETHEREUM_CLASSIC}) + +const tx = await tatum.rpc.getTransactionReceipt('0x311b9228c7eb66500a3bc01162e0c7d3687e1df84d2e9b6104a87f8178b608c1') + +await tatum.destroy() // Destroy Tatum SDK - needed for stopping background jobs +``` +{% endcode %} +{% endtab %} +{% endtabs %} + +### Overview + +`eth_getTransactionReceipt` is an Flare JSON-RPC method that retrieves the transaction receipt of a given transaction hash. This method is particularly useful when you need to obtain detailed information about a transaction's execution, such as its status (success or failure), gas usage, and logs (events). Common use cases include checking the status of a transaction after it has been mined or inspecting the events emitted by a smart contract during a specific transaction. + +### Parameters + +This method requires a single parameter: + +* **`transactionHash`**: The hash of the transaction for which you want to obtain the receipt. + * Example: `"0xa536596d043c03d709aaccbc53f421963fe3537274e86444cd984404cf9ecb13"` + +### Return Object + +The method returns an object containing the following fields: + +* **`transactionHash`**: The hash of the transaction. +* **`transactionIndex`**: The transaction's index position in the block. +* **`blockHash`**: The hash of the block where this transaction was mined. +* **`blockNumber`**: The block number where this transaction was mined. +* **`from`**: The address of the sender. +* **`to`**: The address of the receiver. `null` when it's a contract creation transaction. +* **`cumulativeGasUsed`**: The total amount of gas used when this transaction was executed in the block. +* **`gasUsed`**: The amount of gas used by this specific transaction alone. +* **`contractAddress`**: The address of the contract created, if the transaction was a contract creation. Otherwise, `null`. +* **`logs`**: An array of log objects, which were emitted during the transaction. +* **`logsBloom`**: A 256-byte bloom filter, which is a compressed representation of the logs emitted during the transaction. +* **`status`**: The status of the transaction's execution. `"0x1"` indicates success, while `"0x0"` indicates failure. + +### JSON-RPC Examples + +Request: + +```json +{ + "jsonrpc": "2.0", + "id": 1, + "method": "eth_getTransactionReceipt", + "params": [ + "0xa536596d043c03d709aaccbc53f421963fe3537274e86444cd984404cf9ecb13" + ] +} +``` + +Response: + +```json +{ + "jsonrpc": "2.0", + "id": 1, + "result": { + "blockHash": "0x1091a5831b3556e80e53598c24e9d592e104dba0428f47f94c61523eb52d09d8", + "blockNumber": "0x316624", + "contractAddress": null, + "cumulativeGasUsed": "0x7ad81", + "effectiveGasPrice": "0x306dc421e", + "from": "0x53e8577c4347c365e4e0da5b57a589cb6f2ab848", + "gasUsed": "0x3c518", + "logs": [ + { + "address": "0x211500d1960bdb7ba3390347ffd8ad486b897a18", + "topics": [ + "0xddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef", + "0x0000000000000000000000000000000000000000000000000000000000000000", + "0x00000000000000000000000074b4551c177592a908c6ab9ce671bfe8c1b5bd40", + "0x000000000000000000000000000000000000000000000000000056b990e70e00" + ], + "data": "0x", + "blockNumber": "0x316624", + "transactionHash": "0xa536596d043c03d709aaccbc53f421963fe3537274e86444cd984404cf9ecb13", + "transactionIndex": "0x4", + "blockHash": "0x1091a5831b3556e80e53598c24e9d592e104dba0428f47f94c61523eb52d09d8", + "logIndex": "0x3", + "removed": false + } + ], + "logsBloom": "0x00000000000000000000000000000000000000000000000000020000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000008000000000000000000000000000000000000000000000000020000010000000000000800000000000000000000000010000040000000000000000000000000000000000000000000000000000000000000000000000000004000000000000000000000000000100000000000000000000000000000000002000000200000000000100000000000800000000000000000000020000000000000000000000200000000000000000000000000000000000000000000", + "status": "0x1", + "to": "0x211500d1960bdb7ba3390347ffd8ad486b897a18", + "transactionHash": "0xa536596d043c03d709aaccbc53f421963fe3537274e86444cd984404cf9ecb13", + "transactionIndex": "0x4", + "type": "0x0" + } +} +``` + +\ diff --git a/v1.0/RPC Nodes/rpc-evm/rpc-ethereum-classic/eth_getunclecountbyblockhash.md b/v1.0/RPC Nodes/rpc-evm/rpc-ethereum-classic/eth_getunclecountbyblockhash.md new file mode 100644 index 00000000..4450134e --- /dev/null +++ b/v1.0/RPC Nodes/rpc-evm/rpc-ethereum-classic/eth_getunclecountbyblockhash.md @@ -0,0 +1,84 @@ +--- +title: "eth_getunclecountbyblockhash" +slug: "rpc-ethereum-classic-eth_getunclecountbyblockhash" +excerpt: "Ethereum Classic RPC" +category: 65c5e93c623cad004b45d505 +hidden: false +metadata: + description: "Ethereum Classic RPC" + image: [] + keywords: "ethereum classic , rpc" + robots: "index" +createdAt: "Wed Mar 06 2024 10:35:44 GMT+0000 (Coordinated Universal Time)" +updatedAt: "Tue Apr 02 2024 08:40:59 GMT+0000 (Coordinated Universal Time)" +--- +[block:html]{"html":"
\n
Archive Method
\n

Only on the full archive nodes. Complex queries might take longer and incur additional cost

\n
"}[/block] + +### How to use it + +{% tabs %} +{% tab title="TypeScript/JavaScript" %} +{% code overflow="wrap" lineNumbers="true" %} +```typescript +// yarn add @tatumio/tatum + +import { TatumSDK, EthereumClassic, Network } from '@tatumio/tatum' + +const tatum = await TatumSDK.init({network: Network.ETHEREUM_CLASSIC}) + +const result = await tatum.rpc.getUncleCountByBlockHash('0x23d252bc4008a28b149cf9aa94a592dc488de13281ce6fab5b8bc681bab906fd') + +await tatum.destroy() // Destroy Tatum SDK - needed for stopping background jobs +``` +{% endcode %} +{% endtab %} +{% endtabs %} + +### Overview + +The `eth_getUncleCountByBlockHash` method is an Flare JSON-RPC method that returns the number of uncles in a specified block by its hash. This method can be useful for gathering information about the performance of the Flare network and to analyze the security of the blockchain. + +Uncles are blocks that are not included in the main blockchain but are still valid, and they contribute to the overall security and decentralization of the Flare network. The inclusion of uncles helps prevent centralization and ensures the mining process remains competitive. + +### Parameters + +The `eth_getUncleCountByBlockHash` method takes one parameter: + +* `blockHash`: The hash of the block for which you want to get the uncle count. + * Example value: `"0x3a3e528dcd6e05a614c9241b0a9296db961fa6a92e05af9f6c0d7d2f6bc92f7a"` + +### Return Object + +The return object for this method is a hex-encoded integer representing the number of uncles in the specified block. + +* Example value: `"0x1"` (1 uncle) + +### JSON-RPC Request and Response Examples + +Here is an example JSON-RPC request and response for the `eth_getUncleCountByBlockHash` method: + +**Request:** + +```json +{ + "id": 1, + "jsonrpc": "2.0", + "method": "eth_getUncleCountByBlockHash", + "params": [ + "0x3a3e528dcd6e05a614c9241b0a9296db961fa6a92e05af9f6c0d7d2f6bc92f7a" + ] +} +``` + +**Response:** + +```json +{ + "id": 1, + "jsonrpc": "2.0", + "result": "0x1" +} +``` + +In this example, the JSON-RPC request asks for the number of uncles in the block with the specified hash. The response indicates that there is one uncle in the block. + diff --git a/v1.0/RPC Nodes/rpc-evm/rpc-ethereum-classic/eth_getunclecountbyblocknumber.md b/v1.0/RPC Nodes/rpc-evm/rpc-ethereum-classic/eth_getunclecountbyblocknumber.md new file mode 100644 index 00000000..6b26001b --- /dev/null +++ b/v1.0/RPC Nodes/rpc-evm/rpc-ethereum-classic/eth_getunclecountbyblocknumber.md @@ -0,0 +1,85 @@ +--- +title: "eth_getunclecountbyblocknumber" +slug: "rpc-ethereum-classic-eth_getunclecountbyblocknumber" +excerpt: "Ethereum Classic RPC" +category: 65c5e93c623cad004b45d505 +hidden: false +metadata: + description: "Ethereum Classic RPC" + image: [] + keywords: "ethereum classic , rpc" + robots: "index" +createdAt: "Wed Mar 06 2024 10:35:44 GMT+0000 (Coordinated Universal Time)" +updatedAt: "Tue Apr 02 2024 08:40:59 GMT+0000 (Coordinated Universal Time)" +--- +[block:html]{"html":"
\n
Archive Method
\n

Only on the full archive nodes. Complex queries might take longer and incur additional cost

\n
"}[/block] + +### How to use it + +{% tabs %} +{% tab title="TypeScript/JavaScript" %} +{% code overflow="wrap" lineNumbers="true" %} +```typescript +// yarn add @tatumio/tatum + +import { TatumSDK, EthereumClassic, Network } from '@tatumio/tatum' + +const tatum = await TatumSDK.init({network: Network.ETHEREUM_CLASSIC}) + +const result = await tatum.rpc.getUncleCountByBlockNumber('0x11A62D9') + +await tatum.destroy() // Destroy Tatum SDK - needed for stopping background jobs +``` +{% endcode %} +{% endtab %} +{% endtabs %} + +### Overview + +The `eth_getUncleCountByBlockHash` method is an Flare JSON-RPC method that returns the number of uncles in a specified block by its hash. This method can be useful for gathering information about the performance of the Flare network and to analyze the security of the blockchain. + +Uncles are blocks that are not included in the main blockchain but are still valid, and they contribute to the overall security and decentralization of the Flare network. The inclusion of uncles helps prevent centralization and ensures the mining process remains competitive. + +### Parameters + +The `eth_getUncleCountByBlockHash` method takes one parameter: + +* `blockNumber`: The number of the block for which you want to get the uncle count. + * Example value: `"0x12345"` + +### Return Object + +The return object for this method is a hex-encoded integer representing the number of uncles in the specified block. + +* Example value: `"0x1"` (1 uncle) + +### JSON-RPC Request and Response Examples + +Here is an example JSON-RPC request and response for the `eth_getUncleCountByBlockNumber` method: + +**Request:** + +```json +{ + "id": 1, + "jsonrpc": "2.0", + "method": "eth_getUncleCountByBlockNumber", + "params": [ + "0x12345" + ] +} +``` + +**Response:** + +```json +{ + "id": 1, + "jsonrpc": "2.0", + "result": "0x1" +} +``` + +In this example, the JSON-RPC request asks for the number of uncles in the block with the specified hash. The response indicates that there is one uncle in the block. + +\ diff --git a/v1.0/RPC Nodes/rpc-evm/rpc-cronos/eth_maxpriorityfeepergas.md b/v1.0/RPC Nodes/rpc-evm/rpc-ethereum-classic/eth_maxpriorityfeepergas.md similarity index 72% rename from v1.0/RPC Nodes/rpc-evm/rpc-cronos/eth_maxpriorityfeepergas.md rename to v1.0/RPC Nodes/rpc-evm/rpc-ethereum-classic/eth_maxpriorityfeepergas.md index 9fca9d22..97c00011 100644 --- a/v1.0/RPC Nodes/rpc-evm/rpc-cronos/eth_maxpriorityfeepergas.md +++ b/v1.0/RPC Nodes/rpc-evm/rpc-ethereum-classic/eth_maxpriorityfeepergas.md @@ -1,13 +1,13 @@ --- title: "eth_maxpriorityfeepergas" -slug: "rpc-cronos-eth_maxpriorityfeepergas" -excerpt: "Cronos RPC" +slug: "rpc-ethereum-classic-eth_maxpriorityfeepergas" +excerpt: "Ethereum Classic RPC" category: 65c5e93c623cad004b45d505 hidden: false metadata: - description: "Cronos RPC" + description: "Ethereum Classic RPC" image: [] - keywords: "cronos, rpc" + keywords: "ethereum classic , rpc" robots: "index" createdAt: "Wed Mar 06 2024 10:35:44 GMT+0000 (Coordinated Universal Time)" updatedAt: "Tue Apr 02 2024 08:40:59 GMT+0000 (Coordinated Universal Time)" @@ -22,9 +22,9 @@ updatedAt: "Tue Apr 02 2024 08:40:59 GMT+0000 (Coordinated Universal Time)" ```typescript // yarn add @tatumio/tatum -import { TatumSDK, Cronos, Network } from '@tatumio/tatum' +import { TatumSDK, EthereumClassic, Network } from '@tatumio/tatum' -const tatum = await TatumSDK.init({network: Network.CRONOS}) +const tatum = await TatumSDK.init({network: Network.ETHEREUM_CLASSIC}) const gasPrice = await tatum.rpc.maxPriorityFeePerGas() @@ -48,4 +48,29 @@ This method is particularly useful when the user wants to ensure that a transact ## Return Object -* `maxPriorityFeePerGas` - The maximum priority fee per gas the user is willing to pay, in wei. \ No newline at end of file +* `maxPriorityFeePerGas` - The maximum priority fee per gas the user is willing to pay, in wei. + +### JSON Examples + +#### Request + +```json +{ + "jsonrpc": "2.0", + "method": "eth_maxPriorityFeePerGas", + "params": [], + "id": 1 +} +``` + +#### Response + +```json +{ + "jsonrpc": "2.0", + "id": 1, + "result": "0x3b9aca00" +} +``` + +\ diff --git a/v1.0/RPC Nodes/rpc-evm/rpc-cronos/eth_sendrawtransaction.md b/v1.0/RPC Nodes/rpc-evm/rpc-ethereum-classic/eth_sendrawtransaction.md similarity index 55% rename from v1.0/RPC Nodes/rpc-evm/rpc-cronos/eth_sendrawtransaction.md rename to v1.0/RPC Nodes/rpc-evm/rpc-ethereum-classic/eth_sendrawtransaction.md index 4f40e55b..4133fb0a 100644 --- a/v1.0/RPC Nodes/rpc-evm/rpc-cronos/eth_sendrawtransaction.md +++ b/v1.0/RPC Nodes/rpc-evm/rpc-ethereum-classic/eth_sendrawtransaction.md @@ -1,13 +1,13 @@ --- title: "eth_sendrawtransaction" -slug: "rpc-cronos-eth_sendrawtransaction" -excerpt: "Cronos RPC" +slug: "rpc-ethereum-classic-eth_sendrawtransaction" +excerpt: "Ethereum Classic RPC" category: 65c5e93c623cad004b45d505 hidden: false metadata: - description: "Cronos RPC" + description: "Ethereum Classic RPC" image: [] - keywords: "cronos, rpc" + keywords: "ethereum classic , rpc" robots: "index" createdAt: "Wed Mar 06 2024 10:35:44 GMT+0000 (Coordinated Universal Time)" updatedAt: "Tue Apr 02 2024 08:40:59 GMT+0000 (Coordinated Universal Time)" @@ -22,9 +22,9 @@ updatedAt: "Tue Apr 02 2024 08:40:59 GMT+0000 (Coordinated Universal Time)" ```typescript // yarn add @tatumio/tatum -import { TatumSDK, Cronos, Network } from '@tatumio/tatum' +import { TatumSDK, EthereumClassic, Network } from '@tatumio/tatum' -const tatum = await TatumSDK.init({network: Network.CRONOS}) +const tatum = await TatumSDK.init({network: Network.ETHEREUM_CLASSIC}) const gasPrice = await tatum.rpc.sendRawTransaction('0x0000.......') @@ -36,7 +36,7 @@ await tatum.destroy() // Destroy Tatum SDK - needed for stopping background jobs ### Overview -The `eth_sendRawTransaction` RPC method is used to send a signed and serialized transaction to the network. This method is particularly useful when you want to have full control over the signing process, e.g., when using hardware wallets, cold storage, or custom signing libraries. It can be utilized in various use cases, such as transferring currency, interacting with smart contracts, or deploying new contracts. +The `eth_sendRawTransaction` RPC method is used to send a signed and serialized Flare transaction to the network. This method is particularly useful when you want to have full control over the signing process, e.g., when using hardware wallets, cold storage, or custom signing libraries. It can be utilized in various use cases, such as transferring EthereumClassic, interacting with smart contracts, or deploying new contracts. ### Parameters @@ -48,4 +48,29 @@ The method accepts a single parameter: The method returns a single value: -* `transactionHash`: The hash of the submitted transaction as a hexadecimal string, e.g., `"0x9fc76417374aa880d4449a1f7f31ec597f00b1f6f3dd2d66f4c9c6c445836d8b"`. \ No newline at end of file +* `transactionHash`: The hash of the submitted transaction as a hexadecimal string, e.g., `"0x9fc76417374aa880d4449a1f7f31ec597f00b1f6f3dd2d66f4c9c6c445836d8b"`. + +### JSON-RPC Request Example + +```json +{ + "id": 1, + "jsonrpc": "2.0", + "method": "eth_sendRawTransaction", + "params": [ + "0xf86d8201...94a7bc" + ] +} +``` + +### JSON-RPC Response Example + +```json +{ + "id": 1, + "jsonrpc": "2.0", + "result": "0x9fc76417374aa880d4449a1f7f31ec597f00b1f6f3dd2d66f4c9c6c445836d8b" +} +``` + +\ diff --git a/v1.0/RPC Nodes/rpc-evm/rpc-ethereum-classic/genesis.md b/v1.0/RPC Nodes/rpc-evm/rpc-ethereum-classic/genesis.md new file mode 100644 index 00000000..84c47e41 --- /dev/null +++ b/v1.0/RPC Nodes/rpc-evm/rpc-ethereum-classic/genesis.md @@ -0,0 +1,15 @@ +--- +title: "genesis" +slug: "rpc-ethereum-classic-genesis" +excerpt: "Ethereum Classic RPC" +category: 65c5e93c623cad004b45d505 +hidden: false +metadata: + description: "Ethereum Classic RPC" + image: [] + keywords: "ethereum classic , rpc" + robots: "index" +createdAt: "Wed Mar 06 2024 10:35:44 GMT+0000 (Coordinated Universal Time)" +updatedAt: "Tue Apr 02 2024 08:40:59 GMT+0000 (Coordinated Universal Time)" +--- +[block:html]{"html":"
\n
Archive Method
\n

Only on the full archive nodes. Complex queries might take longer and incur additional cost

\n
"}[/block] diff --git a/v1.0/RPC Nodes/rpc-evm/rpc-ethereum-classic/txpool_content.md b/v1.0/RPC Nodes/rpc-evm/rpc-ethereum-classic/txpool_content.md new file mode 100644 index 00000000..e93a43dd --- /dev/null +++ b/v1.0/RPC Nodes/rpc-evm/rpc-ethereum-classic/txpool_content.md @@ -0,0 +1,143 @@ +--- +title: "txpool_content" +slug: "rpc-ethereum-classic-txpool_content" +excerpt: "Ethereum Classic RPC" +category: 65c5e93c623cad004b45d505 +hidden: false +metadata: + description: "Ethereum Classic RPC" + image: [] + keywords: "ethereum classic , rpc" + robots: "index" +createdAt: "Wed Mar 06 2024 10:35:44 GMT+0000 (Coordinated Universal Time)" +updatedAt: "Tue Apr 02 2024 08:40:59 GMT+0000 (Coordinated Universal Time)" +--- +[block:html]{"html":"
\n
Archive Method
\n

Only on the full archive nodes. Complex queries might take longer and incur additional cost

\n
"}[/block] + +### How to use it + +{% tabs %} +{% tab title="TypeScript/JavaScript" %} +{% code overflow="wrap" lineNumbers="true" %} +```typescript +// yarn add @tatumio/tatum + +import { TatumSDK, EthereumClassic, Network } from '@tatumio/tatum' + +const tatum = await TatumSDK.init({network: Network.ETHEREUM_CLASSIC}) + +const content = await tatum.rpc.txPoolContent() + +await tatum.destroy() // Destroy Tatum SDK - needed for stopping background jobs +``` +{% endcode %} +{% endtab %} +{% endtabs %} + +### Overview + +The `txpool_content` method provides information about the transactions currently pending in the transaction pool of the Flare node. It can be helpful for developers and node operators to monitor and manage the transaction pool, especially in scenarios where it's necessary to analyze transaction congestion or prioritize specific transactions. + +Use cases for the `txpool_content` method include: + +* Analyzing network congestion by inspecting the transaction pool +* Prioritizing transactions by gas price +* Monitoring transactions from specific addresses +* Debugging and troubleshooting pending transactions + +### Parameters + +This method does not require any parameters. + +### Return Object + +The `txpool_content` method returns an object with two fields: `pending` and `queued`. Each field contains a nested object with addresses as keys and their respective transactions as values. + +* **`pending`**: An object containing transactions that are currently pending for inclusion in the next block(s). +* **`queued`**: An object containing transactions that are currently queued (i.e., transactions that do not meet certain criteria for inclusion in the next block, like low gas price or nonce gaps). + +Each transaction object includes the following information: + +* **`hash`**: The hash of the transaction (32 bytes). +* **`nonce`**: The number of transactions sent by the sender prior to this one (integer). +* **`blockHash`**: The hash of the block in which the transaction was included (32 bytes), or `null` if the transaction is not yet mined. +* **`blockNumber`**: The block number in which the transaction was included (integer), or `null` if the transaction is not yet mined. +* **`transactionIndex`**: The index of the transaction in the block (integer), or `null` if the transaction is not yet mined. +* **`from`**: The address of the sender (20 bytes). +* **`to`**: The address of the receiver (20 bytes), or `null` for contract creation transactions. +* **`value`**: The value transferred in the transaction, in wei. +* **`gasPrice`**: The price of gas for the transaction, in wei. +* **`maxFeePerGas`** - The maximum fee per gas set in the transaction. +* **`maxPriorityFeePerGas`** - The maximum priority gas fee set in the transaction. +* **`gas`**: The maximum amount of gas the transaction is allowed to consume. +* **`input`**: The data payload of the transaction (string), or `0x` for simple value transfers. + +### JSON-RPC Request Example + +```json +jsonCopy code{ + "id": 1, + "jsonrpc": "2.0", + "method": "txpool_content", + "params": [] +} +``` + +### JSON-RPC Response Example + +```json +{ + "jsonrpc": "2.0", + "id": 1, + "result": { + "pending": { + "0x01d3B93AaADE8A4066DAaBc8fd8482173A6aD120": { + "197": { + "blockHash": null, + "blockNumber": null, + "from": "0x01d3b93aaade8a4066daabc8fd8482173a6ad120", + "gas": "0x1c9c380", + "gasPrice": "0x16cf917", + "maxFeePerGas": "0x16cf917", + "maxPriorityFeePerGas": "0x16cf917", + "hash": "0x1da9c2a8f0787bac4747c5ed1035e81f6a6745aeea43943e63635fc367b817f7", + "input": "0x00000000", + "nonce": "0xc5", + "to": "0x4f023eb8c6bc3116e35b67e03bf2c17f2e4f7e7e", + "transactionIndex": null, + "value": "0x0", + "type": "0x2", + "accessList": [], + "chainId": "0xaa36a7", + "v": "0x1", + "r": "0x14f7578b57fd9f87acf5bbceb0a47f2d2d3f39b49169357457618c9634c45e8a", + "s": "0x775fa9976c571751a79f069f8c96f6489f286246e157a31fa99b33062631b46d" + } + } + }, + "queued": { + "0x03321406635a04D37Cf9211F2ea3AFc83a87e777": { + "5096281": { + "blockHash": null, + "blockNumber": null, + "from": "0x03321406635a04d37cf9211f2ea3afc83a87e777", + "gas": "0x5208", + "gasPrice": "0xc570bd200", + "hash": "0x05f5fb8e46793fafdc924917c0afdd0afb4a53cb562542d5399234bc1eff759b", + "input": "0x", + "nonce": "0x4dc359", + "to": "0x77b1c86ab0aa9066803ed567e1f00973976638f6", + "transactionIndex": null, + "value": "0xb1a2b96602aa20", + "type": "0x0", + "chainId": "0xaa36a7", + "v": "0x1546d72", + "r": "0x62bd220b95ec13827c0d9b643b9beaf6f4c66d4a8ef08bb10f93d5e5c7ae0068", + "s": "0x467f76847cfdf43a002defe054030c1a88a9e6f56539c051c3cba46b2dd2cc89" + } + } + } + } +``` + +\ diff --git a/v1.0/RPC Nodes/rpc-evm/rpc-ethereum-classic/txpool_inspect.md b/v1.0/RPC Nodes/rpc-evm/rpc-ethereum-classic/txpool_inspect.md new file mode 100644 index 00000000..d5c29d75 --- /dev/null +++ b/v1.0/RPC Nodes/rpc-evm/rpc-ethereum-classic/txpool_inspect.md @@ -0,0 +1,90 @@ +--- +title: "txpool_inspect" +slug: "rpc-ethereum-classic-txpool_inspect" +excerpt: "Ethereum Classic RPC" +category: 65c5e93c623cad004b45d505 +hidden: false +metadata: + description: "Ethereum Classic RPC" + image: [] + keywords: "ethereum classic , rpc" + robots: "index" +createdAt: "Wed Mar 06 2024 10:35:44 GMT+0000 (Coordinated Universal Time)" +updatedAt: "Tue Apr 02 2024 08:40:59 GMT+0000 (Coordinated Universal Time)" +--- +[block:html]{"html":"
\n
Archive Method
\n

Only on the full archive nodes. Complex queries might take longer and incur additional cost

\n
"}[/block] + +### How to use it + +{% tabs %} +{% tab title="TypeScript/JavaScript" %} +{% code overflow="wrap" lineNumbers="true" %} +```typescript +// yarn add @tatumio/tatum + +import { TatumSDK, EthereumClassic, Network } from '@tatumio/tatum' + +const tatum = await TatumSDK.init({network: Network.ETHEREUM_CLASSIC}) + +const inspect = await tatum.rpc.txPoolInspect() + +await tatum.destroy() // Destroy Tatum SDK - needed for stopping background jobs +``` +{% endcode %} +{% endtab %} +{% endtabs %} + +### Overview + +The `txpool_inspect` method is a JSON-RPC method used to inspect the current transaction pool of a running Flare node. The method allows you to view all pending transactions and their details, including transaction hashes, gas prices, and transaction data. This method is useful for developers who want to monitor the status of pending transactions or debug transaction-related issues. + +### Parameters + +The `txpool_inspect` method takes one optional parameter: + +* **`include`**: A string specifying the type of transactions to include in the response. Possible values are **`pending`** (default) and **`queued`**. + +### Return Object + +The `txpool_inspect` method returns an object with the following fields: + +* **`pending`**: An array of transaction objects, with textual data +* **`queued`**: An array of transaction objects, with textual data + +## Example Request: + +```json +{ + "jsonrpc": "2.0", + "method": "txpool_inspect", + "params": [ + "pending" + ], + "id": 1 +} +``` + +## Example Response: + +```json +{ + "jsonrpc": "2.0", + "id": 1, + "result": { + "pending": { + "0x01d3B93AaADE8A4066DAaBc8fd8482173A6aD120": { + "197": "0x4f023eB8C6BC3116E35B67E03bf2C17f2e4f7e7e: 0 wei + 30000000 gas × 23918871 wei" + } + }, + "queued": { + "0x03321406635a04D37Cf9211F2ea3AFc83a87e777": { + "5096281": "0x77b1C86Ab0aa9066803eD567e1F00973976638F6: 49999988041886240 wei + 21000 gas × 53000000000 wei", + "8308536": "0x77b1C86Ab0aa9066803eD567e1F00973976638F6: 100000000000000000 wei + 21000 gas × 53000000000 wei", + "231211221": "0x77b1C86Ab0aa9066803eD567e1F00973976638F6: 1000000000000000 wei + 21000 gas × 11958113760 wei" + } + } + } +} +``` + +\ diff --git a/v1.0/RPC Nodes/rpc-evm/rpc-cronos/txpool_status.md b/v1.0/RPC Nodes/rpc-evm/rpc-ethereum-classic/txpool_status.md similarity index 55% rename from v1.0/RPC Nodes/rpc-evm/rpc-cronos/txpool_status.md rename to v1.0/RPC Nodes/rpc-evm/rpc-ethereum-classic/txpool_status.md index 04e4af2d..8d55303b 100644 --- a/v1.0/RPC Nodes/rpc-evm/rpc-cronos/txpool_status.md +++ b/v1.0/RPC Nodes/rpc-evm/rpc-ethereum-classic/txpool_status.md @@ -1,13 +1,13 @@ --- title: "txpool_status" -slug: "rpc-cronos-txpool_status" -excerpt: "Cronos RPC" +slug: "rpc-ethereum-classic-txpool_status" +excerpt: "Ethereum Classic RPC" category: 65c5e93c623cad004b45d505 hidden: false metadata: - description: "Cronos RPC" + description: "Ethereum Classic RPC" image: [] - keywords: "cronos, rpc" + keywords: "ethereum classic , rpc" robots: "index" createdAt: "Wed Mar 06 2024 10:35:44 GMT+0000 (Coordinated Universal Time)" updatedAt: "Tue Apr 02 2024 08:40:59 GMT+0000 (Coordinated Universal Time)" @@ -22,9 +22,9 @@ updatedAt: "Tue Apr 02 2024 08:40:59 GMT+0000 (Coordinated Universal Time)" ```typescript // yarn add @tatumio/tatum -import { TatumSDK, Cronos, Network } from '@tatumio/tatum' +import { TatumSDK, EthereumClassic, Network } from '@tatumio/tatum' -const tatum = await TatumSDK.init({network: Network.CRONOS}) +const tatum = await TatumSDK.init({network: Network.ETHEREUM_CLASSIC}) const status = await tatum.rpc.txPoolStatus() @@ -38,7 +38,7 @@ await tatum.destroy() // Destroy Tatum SDK - needed for stopping background jobs The `txpool_status` method returns statistics about the current state of the transaction pool. The transaction pool is a queue of pending transactions waiting to be included in the next block by miners. -This method can be useful for monitoring the health of the network and analyzing the behavior of the miners. It can also be used to estimate the time it will take for a transaction to be processed, as well as to determine the gas price necessary to ensure prompt inclusion of a transaction in the next block. +This method can be useful for monitoring the health of the Flare network and analyzing the behavior of the miners. It can also be used to estimate the time it will take for a transaction to be processed, as well as to determine the gas price necessary to ensure prompt inclusion of a transaction in the next block. ### Parameters @@ -49,4 +49,30 @@ This method does not take any parameters. The `txpool_status` method returns an object with the following fields: * **`pending`**: Number of pending transactions in the pool -* **`queued`**: Number of queued transactions in the pool \ No newline at end of file +* **`queued`**: Number of queued transactions in the pool + +### Example Request + +```json +{ + "jsonrpc":"2.0", + "method":"txpool_status", + "params":[], + "id":1 +} +``` + +### Example Response + +```json +{ + "jsonrpc": "2.0", + "id": 1, + "result": { + "pending": 4, + "queued": 10 + } +} +``` + +In this example response, there are currently 4 pending transactions and 10 queued transactions waiting to be processed by miners. diff --git a/v1.0/RPC Nodes/rpc-evm/rpc-cronos/web3_clientversion.md b/v1.0/RPC Nodes/rpc-evm/rpc-ethereum-classic/web3_clientversion.md similarity index 50% rename from v1.0/RPC Nodes/rpc-evm/rpc-cronos/web3_clientversion.md rename to v1.0/RPC Nodes/rpc-evm/rpc-ethereum-classic/web3_clientversion.md index 5dc96676..00e2d6f0 100644 --- a/v1.0/RPC Nodes/rpc-evm/rpc-cronos/web3_clientversion.md +++ b/v1.0/RPC Nodes/rpc-evm/rpc-ethereum-classic/web3_clientversion.md @@ -1,13 +1,13 @@ --- title: "web3_clientversion" -slug: "rpc-cronos-web3_clientversion" -excerpt: "Cronos RPC" +slug: "rpc-ethereum-classic-web3_clientversion" +excerpt: "Ethereum Classic RPC" category: 65c5e93c623cad004b45d505 hidden: false metadata: - description: "Cronos RPC" + description: "Ethereum Classic RPC" image: [] - keywords: "cronos, rpc" + keywords: "ethereum classic , rpc" robots: "index" createdAt: "Wed Mar 06 2024 10:35:44 GMT+0000 (Coordinated Universal Time)" updatedAt: "Tue Apr 02 2024 08:40:59 GMT+0000 (Coordinated Universal Time)" @@ -22,9 +22,9 @@ updatedAt: "Tue Apr 02 2024 08:40:59 GMT+0000 (Coordinated Universal Time)" ```typescript // yarn add @tatumio/tatum -import { TatumSDK, Cronos, Network } from '@tatumio/tatum' +import { TatumSDK, EthereumClassic, Network } from '@tatumio/tatum' -const tatum = await TatumSDK.init({network: Network.CRONOS}) +const tatum = await TatumSDK.init({network: Network.ETHEREUM_CLASSIC}) const version = await tatum.rpc.clientVersion() @@ -36,16 +36,43 @@ await tatum.destroy() // Destroy Tatum SDK - needed for stopping background jobs ### Overview -`web3_clientVersion` is a method of the JSON-RPC API that allows the client to retrieve the current version of the client software being used by the node. +`web3_clientVersion` is a method of the Flare JSON-RPC API that allows the client to retrieve the current version of the Flare client software being used by the node. -This method is read-only and does not require authentication. The `web3_clientVersion` method can be used by developers to confirm the version of the client software they are using and ensure that it is compatible with their application. +This method is read-only and does not require authentication. The `web3_clientVersion` method can be used by developers to confirm the version of the Flare client software they are using and ensure that it is compatible with their application. ### Parameters -This method has no parameters. It only retrieves the current version of the client software. +This method has no parameters. It only retrieves the current version of the Flare client software. ### Return Object -The `web3_clientVersion` method returns a string representing the version of the client software being used. The string includes the client name, version number, and build information. +The `web3_clientVersion` method returns a string representing the version of the Flare client software being used. The string includes the client name, version number, and build information. -* `String` - Version string of the client software being used. \ No newline at end of file +* `String` - Version string of the Flare client software being used. + +### Example Request + +#### JSON Request + +```json +{ + "jsonrpc": "2.0", + "method": "web3_clientVersion", + "params": [], + "id": 1 +} +``` + +### Example Response + +#### JSON Response + +```json +{ + "jsonrpc": "2.0", + "id": 67, + "result": "v0.8.15" +} +``` + +In the above example, the Flare client software being used is in version 0.8.18..