From f4c2b2b81ab3028bdc3f3fe3fa006ff1c895cd56 Mon Sep 17 00:00:00 2001 From: productshiv Date: Sat, 6 Apr 2024 18:11:49 +0530 Subject: [PATCH] Adding Xinfin --- .../rpc-evm/rpc-polygon/eth_gasprice.md | 84 ---------- .../rpc-polygon/eth_getblockreceipts.md | 153 ------------------ .../rpc-evm/{rpc-polygon.md => rpc-xinfin.md} | 4 +- .../rpc-evm/rpc-xinfin/debug_getbadblocks.md | 116 +++++++++++++ .../debug_storagerangeat.md | 20 +-- .../rpc-evm/rpc-xinfin/debug_traceblock.md | 119 ++++++++++++++ .../debug_traceblockbyhash.md | 20 +-- .../rpc-xinfin/debug_traceblockbynumber.md | 124 ++++++++++++++ .../debug_tracecall.md | 24 +-- .../debug_tracetransaction.md | 18 +-- .../eth_blocknumber.md | 26 ++- .../{rpc-polygon => rpc-xinfin}/eth_call.md | 20 +-- .../eth_chainid.md | 24 ++- .../eth_estimategas.md | 26 ++- .../rpc-evm/rpc-xinfin/eth_gasprice.md | 74 +++++++++ .../eth_getbalance.md | 32 ++-- .../eth_getblockbyhash.md | 28 ++-- .../eth_getblockbynumber.md | 21 ++- .../eth_getblocktransactioncountbyhash.md | 24 ++- .../eth_getblocktransactioncountbynumber.md | 28 ++-- .../eth_getcode.md | 37 ++--- .../eth_getlogs.md | 44 +++-- .../eth_getproof.md | 24 ++- .../eth_getstorageat.md | 27 ++-- .../eth_gettransactionbyblockhashandindex.md | 24 ++- ...eth_gettransactionbyblocknumberandindex.md | 26 ++- .../eth_gettransactionbyhash.md | 26 ++- .../eth_gettransactioncount.md | 26 ++- .../eth_gettransactionreceipt.md | 35 ++-- .../eth_getunclecountbyblockhash.md | 28 ++-- .../eth_getunclecountbyblocknumber.md | 24 ++- .../eth_maxpriorityfeepergas.md | 18 +-- .../eth_sendrawtransaction.md | 22 ++- .../txpool_content.md | 18 +-- .../txpool_inspect.md | 20 +-- .../txpool_status.md | 18 +-- .../web3_clientversion.md | 32 ++-- 37 files changed, 780 insertions(+), 654 deletions(-) delete mode 100644 v1.0/RPC Nodes/rpc-evm/rpc-polygon/eth_gasprice.md delete mode 100644 v1.0/RPC Nodes/rpc-evm/rpc-polygon/eth_getblockreceipts.md rename v1.0/RPC Nodes/rpc-evm/{rpc-polygon.md => rpc-xinfin.md} (85%) create mode 100644 v1.0/RPC Nodes/rpc-evm/rpc-xinfin/debug_getbadblocks.md rename v1.0/RPC Nodes/rpc-evm/{rpc-polygon => rpc-xinfin}/debug_storagerangeat.md (85%) create mode 100644 v1.0/RPC Nodes/rpc-evm/rpc-xinfin/debug_traceblock.md rename v1.0/RPC Nodes/rpc-evm/{rpc-polygon => rpc-xinfin}/debug_traceblockbyhash.md (84%) create mode 100644 v1.0/RPC Nodes/rpc-evm/rpc-xinfin/debug_traceblockbynumber.md rename v1.0/RPC Nodes/rpc-evm/{rpc-polygon => rpc-xinfin}/debug_tracecall.md (84%) rename v1.0/RPC Nodes/rpc-evm/{rpc-polygon => rpc-xinfin}/debug_tracetransaction.md (87%) rename v1.0/RPC Nodes/rpc-evm/{rpc-polygon => rpc-xinfin}/eth_blocknumber.md (70%) rename v1.0/RPC Nodes/rpc-evm/{rpc-polygon => rpc-xinfin}/eth_call.md (83%) rename v1.0/RPC Nodes/rpc-evm/{rpc-polygon => rpc-xinfin}/eth_chainid.md (60%) rename v1.0/RPC Nodes/rpc-evm/{rpc-polygon => rpc-xinfin}/eth_estimategas.md (77%) create mode 100644 v1.0/RPC Nodes/rpc-evm/rpc-xinfin/eth_gasprice.md rename v1.0/RPC Nodes/rpc-evm/{rpc-polygon => rpc-xinfin}/eth_getbalance.md (70%) rename v1.0/RPC Nodes/rpc-evm/{rpc-polygon => rpc-xinfin}/eth_getblockbyhash.md (87%) rename v1.0/RPC Nodes/rpc-evm/{rpc-polygon => rpc-xinfin}/eth_getblockbynumber.md (91%) rename v1.0/RPC Nodes/rpc-evm/{rpc-polygon => rpc-xinfin}/eth_getblocktransactioncountbyhash.md (64%) rename v1.0/RPC Nodes/rpc-evm/{rpc-polygon => rpc-xinfin}/eth_getblocktransactioncountbynumber.md (59%) rename v1.0/RPC Nodes/rpc-evm/{rpc-polygon => rpc-xinfin}/eth_getcode.md (62%) rename v1.0/RPC Nodes/rpc-evm/{rpc-polygon => rpc-xinfin}/eth_getlogs.md (60%) rename v1.0/RPC Nodes/rpc-evm/{rpc-polygon => rpc-xinfin}/eth_getproof.md (75%) rename v1.0/RPC Nodes/rpc-evm/{rpc-polygon => rpc-xinfin}/eth_getstorageat.md (65%) rename v1.0/RPC Nodes/rpc-evm/{rpc-polygon => rpc-xinfin}/eth_gettransactionbyblockhashandindex.md (87%) rename v1.0/RPC Nodes/rpc-evm/{rpc-polygon => rpc-xinfin}/eth_gettransactionbyblocknumberandindex.md (87%) rename v1.0/RPC Nodes/rpc-evm/{rpc-polygon => rpc-xinfin}/eth_gettransactionbyhash.md (78%) rename v1.0/RPC Nodes/rpc-evm/{rpc-polygon => rpc-xinfin}/eth_gettransactioncount.md (66%) rename v1.0/RPC Nodes/rpc-evm/{rpc-polygon => rpc-xinfin}/eth_gettransactionreceipt.md (76%) rename v1.0/RPC Nodes/rpc-evm/{rpc-polygon => rpc-xinfin}/eth_getunclecountbyblockhash.md (59%) rename v1.0/RPC Nodes/rpc-evm/{rpc-polygon => rpc-xinfin}/eth_getunclecountbyblocknumber.md (68%) rename v1.0/RPC Nodes/rpc-evm/{rpc-polygon => rpc-xinfin}/eth_maxpriorityfeepergas.md (84%) rename v1.0/RPC Nodes/rpc-evm/{rpc-polygon => rpc-xinfin}/eth_sendrawtransaction.md (68%) rename v1.0/RPC Nodes/rpc-evm/{rpc-polygon => rpc-xinfin}/txpool_content.md (90%) rename v1.0/RPC Nodes/rpc-evm/{rpc-polygon => rpc-xinfin}/txpool_inspect.md (76%) rename v1.0/RPC Nodes/rpc-evm/{rpc-polygon => rpc-xinfin}/txpool_status.md (73%) rename v1.0/RPC Nodes/rpc-evm/{rpc-polygon => rpc-xinfin}/web3_clientversion.md (58%) diff --git a/v1.0/RPC Nodes/rpc-evm/rpc-polygon/eth_gasprice.md b/v1.0/RPC Nodes/rpc-evm/rpc-polygon/eth_gasprice.md deleted file mode 100644 index 71cd4743..00000000 --- a/v1.0/RPC Nodes/rpc-evm/rpc-polygon/eth_gasprice.md +++ /dev/null @@ -1,84 +0,0 @@ ---- -title: "eth_gasprice" -slug: "rpc-polygon-eth_gasprice" -excerpt: "Polygon RPC" -category: 65c5e93c623cad004b45d505 -hidden: false -metadata: - description: "Polygon RPC" - image: [] - keywords: "polygon, 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, Polygon, Network } from '@tatumio/tatum' - -const tatum = await TatumSDK.init({network: Network.POLYGON}) - -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 a Polygon JSON-RPC method used to estimate the average gas price required for transactions in the Polygon 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. - -{% embed url="https://codepen.io/tatum-devrel/pen/vYQbbBM" %} - -### Parameters - -The `eth_gasPrice` method does not require any parameters. However, the transaction object should include the following fields: - -* **`from`** (optional): The sender's Polygon address. Example: `"0x742d35Cc6634C0532925a3b844Bc454e4438f44e"` -* **`to`** (optional): The recipient's Polygon address. Example: `"0x5aeda56215b167893e80b4fe645ba6d5bab767de"` -* **`gas`** (optional): The maximum amount of gas to be used for the transaction. Example: `"0x76c0"` -* **`gasPrice`** (optional): The gas price in wei for each unit of gas. Example: `"0x9184e72a000"` -* **`value`** (optional): The amount of ether to be sent in the transaction in wei. Example: `"0x9184e72a"` -* **`data`** (optional): The input data associated with the transaction, typically used for contract calls. Example: `"0xd46e8dd67c5d32be8058bb8eb970870f072445675"` -* `nonce` (optional): The transaction count for the sender's address. Example: `"0x1"` - -### 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-polygon/eth_getblockreceipts.md b/v1.0/RPC Nodes/rpc-evm/rpc-polygon/eth_getblockreceipts.md deleted file mode 100644 index 89cebb89..00000000 --- a/v1.0/RPC Nodes/rpc-evm/rpc-polygon/eth_getblockreceipts.md +++ /dev/null @@ -1,153 +0,0 @@ ---- -title: "eth_getblockreceipts" -slug: "rpc-polygon-eth_getblockreceipts" -excerpt: "Polygon RPC" -category: 65c5e93c623cad004b45d505 -hidden: false -metadata: - description: "Polygon RPC" - image: [] - keywords: "polygon, 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, Polygon, Network } from '@tatumio/tatum' - -const tatum = await TatumSDK.init({network: Network.POLYGON}) - -const result = await tatum.rpc.getBlockReceipts(47292218) - -await tatum.destroy() // Destroy Tatum SDK - needed for stopping background jobs -``` -{% endcode %} -{% endtab %} -{% endtabs %} - -### Overview - -`eth_getBlockReceipts` method retrieves and returns all transaction receipts for a specific block. Transaction receipts contain essential information related to the execution status and outcomes of individual transactions within the block, including details about the amount of gas used, contract events emitted, and whether the transactions were successful or not. - -By using the `eth_getBlockReceipts`, developers can seek a comprehensive overview of the transactions' results within a particular block. - -### Parameters - -The `eth_getBlockReceipts` method accepts the following parameters: - -* `blockNumber` - `Quantity` or `String` - * The block number of the block to trace. - * Example: `"0x1"` or `"latest"` - -### Return Object - -`eth_getBlockReceipts` method provides a detailed set of information for each transaction receipt within a given block. The returned data includes: - -* `blockHash`: The hash of the block (null if pending). -* `blockNumber`: The block number. -* `contractAddress`: The contract address created if the transaction was for contract creation; otherwise, null. -* `cumulativeGasUsed`: The total amount of gas used when this transaction was executed in the block. -* `effectiveGasPrice`: The actual value per gas deducted from the sender account. -* from: The address of the sender. -* `gasUsed`: The amount of gas used by this specific transaction alone. -* `logs`: An array of log objects that generated this transaction, containing: - * `address`: The address from which this log originated. - * topics: In Solidity, the first topic is the hash of the signature of the event, unless the event is declared with the anonymous specifier. - * `data`: It contains one or more 32 Bytes non-indexed arguments of the log. - * `blockNumber`: The block number where this log was in. - * `transactionHash`: The hash of the transaction this log was created from, or null if it's a pending log. - * `transactionIndex`: The integer of the transaction's index position that the log was created fromr null if it's a pending log. - * `blockHash`: The hash of the block where this log was inr null if it's a pending log. - * `logIndex`: The integer of the log index position in the blockr null if it's a pending log. - * `removed`: It is true when the log was removed due to a chain reorganization, and false if it's a valid log. -* `logsBloom`: The bloom filter for light clients to quickly retrieve related logs. -* `status`: It is either 1 (success) or 0 (failure) encoded as a hexadecimal. -* `to`: The address of the receiver. It will be null when the transaction is for contract creation. -* `transactionHash`: The hash of the transaction. -* `transactionIndex`: The index of the transaction within the block. -* `type`: The value type. - -{% 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", - "method":"eth_getBlockReceipts", - "params":["0x2a6a150"], - "id":1 -} -``` - -#### Response - -```json -{ - "jsonrpc": "2.0", - "id": 1, - "result": [ - { - "blockHash": "0xfb368ca825fdf63ce3bd3c22344e9b50fcb56fc7341cce71192535c2f55ccf93", - "blockNumber": "0x2a6a150", - "contractAddress": null, - "cumulativeGasUsed": "0x5b2a92", - "effectiveGasPrice": "0x26b748cd1d", - "from": "0x0d882c09a3e03aa9afb2967a1eebddd67934f7be", - "gasUsed": "0xf840", - "logs": [ - { - "address": "0x2791bca1f2de4661ed88a30c99a7a9449aa84174", - "topics": [ - "0xddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef", - "0x0000000000000000000000000d882c09a3e03aa9afb2967a1eebddd67934f7be", - "0x00000000000000000000000073cc2c7189aa0d63ed0c243d42d3cd5210372067" - ], - "data": "0x0000000000000000000000000000000000000000000000000000000003750280", - "blockNumber": "0x2a6a150", - "transactionHash": "0x21b576878544bc1e8731d6fb120901bc6b7ecc27713f3bf1e2a75118f1fa35e3", - "transactionIndex": "0x36", - "blockHash": "0xfb368ca825fdf63ce3bd3c22344e9b50fcb56fc7341cce71192535c2f55ccf93", - "logIndex": "0xc3", - "removed": false - }, - { - "address": "0x0000000000000000000000000000000000001010", - "topics": [ - "0x4dfe1bbbcf077ddc3e01291eea2d5c70c2b422b415d95645b9adcfd678cb1d63", - "0x0000000000000000000000000000000000000000000000000000000000001010", - "0x0000000000000000000000000d882c09a3e03aa9afb2967a1eebddd67934f7be", - "0x00000000000000000000000002f70172f7f490653665c9bfac0666147c8af1f5" - ], - "data": "0x0000000000000000000000000000000000000000000000000006c601978b000000000000000000000000000000000000000000000000000932b9349556b3b25c000000000000000000000000000000000000000000000082c4b21c5f77055dc900000000000000000000000000000000000000000000000932b26e93bf28b25c000000000000000000000000000000000000000000000082c4b8e2610e905dc9", - "blockNumber": "0x2a6a150", - "transactionHash": "0x21b576878544bc1e8731d6fb120901bc6b7ecc27713f3bf1e2a75118f1fa35e3", - "transactionIndex": "0x36", - "blockHash": "0xfb368ca825fdf63ce3bd3c22344e9b50fcb56fc7341cce71192535c2f55ccf93", - "logIndex": "0xc4", - "removed": false - } - ], - "logsBloom": "0x00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000008000000000000000000000000000000000000002000000000008000000800000000000200000000110000000000000000000000000000000000000000001000000800000000180000010000000000001000000400000000000000000000000000000000000000000000000000000200000000000000000000000000000000000000000000000000000000000004000000002000000000001000000000000100000000000000000100000000000000000008000080000000000000000000000000000000000001000000000100000", - "status": "0x1", - "to": "0x2791bca1f2de4661ed88a30c99a7a9449aa84174", - "transactionHash": "0x21b576878544bc1e8731d6fb120901bc6b7ecc27713f3bf1e2a75118f1fa35e3", - "transactionIndex": "0x36", - "type": "0x2" - } - ] -} -``` diff --git a/v1.0/RPC Nodes/rpc-evm/rpc-polygon.md b/v1.0/RPC Nodes/rpc-evm/rpc-xinfin.md similarity index 85% rename from v1.0/RPC Nodes/rpc-evm/rpc-polygon.md rename to v1.0/RPC Nodes/rpc-evm/rpc-xinfin.md index f016f1d5..4a1e1ea8 100644 --- a/v1.0/RPC Nodes/rpc-evm/rpc-polygon.md +++ b/v1.0/RPC Nodes/rpc-evm/rpc-xinfin.md @@ -1,6 +1,6 @@ --- -title: "Polygon" -slug: "rpc-polygon" +title: "Xinfin" +slug: "rpc-xinfin" excerpt: "" category: 65c5e93c623cad004b45d505 hidden: false diff --git a/v1.0/RPC Nodes/rpc-evm/rpc-xinfin/debug_getbadblocks.md b/v1.0/RPC Nodes/rpc-evm/rpc-xinfin/debug_getbadblocks.md new file mode 100644 index 00000000..e46a6e66 --- /dev/null +++ b/v1.0/RPC Nodes/rpc-evm/rpc-xinfin/debug_getbadblocks.md @@ -0,0 +1,116 @@ +--- +title: "debug_getbadblocks" +slug: "rpc-xinfin-debug_getbadblocks" +excerpt: "Xinfin RPC" +category: 65c5e93c623cad004b45d505 +hidden: false +metadata: + description: "Xinfin RPC" + image: [] + keywords: "xinfin, 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, XinFin, Network } from '@tatumio/tatum' + +const tatum = await TatumSDK.init({ network: Network.XINFIN }) + +const result = await tatum.rpc.debugGetBadBlocks() + +await tatum.destroy() // Destroy Tatum SDK - needed for stopping background jobs +``` +{% endcode %} +{% endtab %} +{% endtabs %} + +### Overview + +`debug_getBadBlocks` is na 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-polygon/debug_storagerangeat.md b/v1.0/RPC Nodes/rpc-evm/rpc-xinfin/debug_storagerangeat.md similarity index 85% rename from v1.0/RPC Nodes/rpc-evm/rpc-polygon/debug_storagerangeat.md rename to v1.0/RPC Nodes/rpc-evm/rpc-xinfin/debug_storagerangeat.md index e25e2b8c..37f8413b 100644 --- a/v1.0/RPC Nodes/rpc-evm/rpc-polygon/debug_storagerangeat.md +++ b/v1.0/RPC Nodes/rpc-evm/rpc-xinfin/debug_storagerangeat.md @@ -1,13 +1,13 @@ --- title: "debug_storagerangeat" -slug: "rpc-polygon-debug_storagerangeat" -excerpt: "Polygon RPC" +slug: "rpc-xinfin-debug_storagerangeat" +excerpt: "Xinfin RPC" category: 65c5e93c623cad004b45d505 hidden: false metadata: - description: "Polygon RPC" + description: "Xinfin RPC" image: [] - keywords: "polygon, rpc" + keywords: "xinfin, 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, Polygon, Network } from '@tatumio/tatum' +import { TatumSDK, XinFin, Network } from '@tatumio/tatum' -const tatum = await TatumSDK.init({network: Network.POLYGON}) +const tatum = await TatumSDK.init({ network: Network.XINFIN }) const result = await tatum.rpc.debugStorageRangeAt( -'0x48dfcf43404dffdb3b93a0b0d9982b642b221187bc3ed5c023bdab6c0e863e3d', -1, '0xa41d19F4258a388c639B7CcD938FCE3fb7D05e86', '0x0000000000000000000000000000000000000000000000000000000000000000', 1 +'0x0003bd8d00000625538ae9cb302a2eea2f17e5b751b447257b94617d90f1e01c', +1, '0x82487dF5b4cF19DB597A092c8103759466Be9e5a', '0x0000000000000000000000000000000000000000000000000000000000000000', 1 ) await tatum.destroy() // Destroy Tatum SDK - needed for stopping background jobs @@ -45,9 +45,9 @@ await tatum.destroy() // Destroy Tatum SDK - needed for stopping background jobs The `debug_storageRangeAt` method accepts the following parameters: -* `blockHash`: The block hash for which the storage range should be retrieved. Example: `"0x3c4523b7e8c21e3d68f1c3af3d18e8a87c0d43e35b2c1b7f8f4e87e4d4db9c82"` +* `blockHash`: The block hash for which the storage range should be retrieved. Example: `"0x0003bd8d00000625538ae9cb302a2eea2f17e5b751b447257b94617d90f1e01c"` * `txIndex`: The transaction index within the specified block. Example: `1` -* `address`: The contract address for which the storage range should be retrieved. Example: `"0x742d35Cc6634C0532925a3b844Bc454e4438f44e"` +* `address`: The contract address for which the storage range should be retrieved. Example: `"0x82487dF5b4cF19DB597A092c8103759466Be9e5a"` * `begin`: The beginning of the storage range. Example: `"0x0000000000000000000000000000000000000000000000000000000000000000"` * `end`: The end of the storage range. Example: `1` (inclusive) diff --git a/v1.0/RPC Nodes/rpc-evm/rpc-xinfin/debug_traceblock.md b/v1.0/RPC Nodes/rpc-evm/rpc-xinfin/debug_traceblock.md new file mode 100644 index 00000000..d4174b05 --- /dev/null +++ b/v1.0/RPC Nodes/rpc-evm/rpc-xinfin/debug_traceblock.md @@ -0,0 +1,119 @@ +--- +title: "debug_traceblock" +slug: "rpc-xinfin-debug_traceblock" +excerpt: "Xinfin RPC" +category: 65c5e93c623cad004b45d505 +hidden: false +metadata: + description: "Xinfin RPC" + image: [] + keywords: "xinfin, 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, XinFin, Network } from '@tatumio/tatum' + +const tatum = await TatumSDK.init({ network: Network.XINFIN }) + +const result = await tatum.rpc.debugTraceBlock('0xAD7C5E' ,{ + 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-polygon/debug_traceblockbyhash.md b/v1.0/RPC Nodes/rpc-evm/rpc-xinfin/debug_traceblockbyhash.md similarity index 84% rename from v1.0/RPC Nodes/rpc-evm/rpc-polygon/debug_traceblockbyhash.md rename to v1.0/RPC Nodes/rpc-evm/rpc-xinfin/debug_traceblockbyhash.md index 10b4e682..80087e16 100644 --- a/v1.0/RPC Nodes/rpc-evm/rpc-polygon/debug_traceblockbyhash.md +++ b/v1.0/RPC Nodes/rpc-evm/rpc-xinfin/debug_traceblockbyhash.md @@ -1,13 +1,13 @@ --- title: "debug_traceblockbyhash" -slug: "rpc-polygon-debug_traceblockbyhash" -excerpt: "Polygon RPC" +slug: "rpc-xinfin-debug_traceblockbyhash" +excerpt: "Xinfin RPC" category: 65c5e93c623cad004b45d505 hidden: false metadata: - description: "Polygon RPC" + description: "Xinfin RPC" image: [] - keywords: "polygon, rpc" + keywords: "xinfin, 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, Polygon, Network } from '@tatumio/tatum' - -const tatum = await TatumSDK.init({network: Network.POLYGON}) +import { TatumSDK, XinFin, Network } from '@tatumio/tatum' + +const tatum = await TatumSDK.init({ network: Network.XINFIN }) const result = await tatum.rpc.debugTraceBlockByHash( -'0x3c4523b7e8c21e3d68f1c3af3d18e8a87c0d43e35b2c1b7f8f4e87e4d4db9c82', +'0x0003bd8d00000625538ae9cb302a2eea2f17e5b751b447257b94617d90f1e01c', { tracer: 'callTracer', tracerConfig: { @@ -45,14 +45,14 @@ await tatum.destroy() // Destroy Tatum SDK - needed for stopping background jobs ### Overview -`debug_traceBlockByHash` is a Polygon 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 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: `"0x1dcf337a03e08a8c00e31de6f5b6d9a6e1c6f1d5e5e6c89fc5f5b5a30e6d5d0c"` + * Example: `"0x0003bd8d00000625538ae9cb302a2eea2f17e5b751b447257b94617d90f1e01c"` * `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 diff --git a/v1.0/RPC Nodes/rpc-evm/rpc-xinfin/debug_traceblockbynumber.md b/v1.0/RPC Nodes/rpc-evm/rpc-xinfin/debug_traceblockbynumber.md new file mode 100644 index 00000000..040d37fc --- /dev/null +++ b/v1.0/RPC Nodes/rpc-evm/rpc-xinfin/debug_traceblockbynumber.md @@ -0,0 +1,124 @@ +--- +title: "debug_traceblockbynumber" +slug: "rpc-xinfin-debug_traceblockbynumber" +excerpt: "Xinfin RPC" +category: 65c5e93c623cad004b45d505 +hidden: false +metadata: + description: "Xinfin RPC" + image: [] + keywords: "xinfin, 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] + +{% hint style="info" %} +The **`debug_traceBlockByNumber`** method is resource-intensive, as it necessitates the node to execute a comprehensive trace, consuming a substantial amount of time and computational resources. In certain edge cases, the response time could extend to as much as 30 seconds. + +Alternatively, you can obtain traces by transaction using the **`debug_traceTransaction`** method rather than by block. This approach provides identical data but in smaller, more manageable requests. It offers greater granularity and doesn't mandate tracing all transactions within a block simultaneously. +{% endhint %} + +### How to use it + +{% tabs %} +{% tab title="TypeScript/JavaScript" %} +{% code overflow="wrap" lineNumbers="true" %} +```typescript +// yarn add @tatumio/tatum + +import { TatumSDK, XinFin, Network } from '@tatumio/tatum' + +const tatum = await TatumSDK.init({ network: Network.XINFIN }) + +const result = await tatum.rpc.debugTraceBlockByNumber('0x42C1D80') + +await tatum.destroy() // Destroy Tatum SDK - needed for stopping background jobs +``` +{% endcode %} +{% endtab %} +{% endtabs %} + +### Overview + +`debug_traceBlockByNumber` is an 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 + +* `blockNumber` - `Quantity` or `String` + * The block number of the block to trace. + * 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". + * Example: `tracerConfig: { onlyTopCall: true, timeout: '300', }` + +### Return Object + +The return object is an array of objects, each representing the trace result of a transaction within the block. Each object contains the following fields: + +* `from`: The address the transaction was sent from. +* `gas`: The gas provided for the transaction. +* `gasUsed`: The total gas used by the transaction. +* `to`: The address the transaction was sent to. +* `input`: The input data for the transaction. +* `output`: The output data from the transaction. +* `calls`: An array of objects, each representing a call made during the transaction. 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 + +```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-polygon/debug_tracecall.md b/v1.0/RPC Nodes/rpc-evm/rpc-xinfin/debug_tracecall.md similarity index 84% rename from v1.0/RPC Nodes/rpc-evm/rpc-polygon/debug_tracecall.md rename to v1.0/RPC Nodes/rpc-evm/rpc-xinfin/debug_tracecall.md index 1303f082..a4fb96c2 100644 --- a/v1.0/RPC Nodes/rpc-evm/rpc-polygon/debug_tracecall.md +++ b/v1.0/RPC Nodes/rpc-evm/rpc-xinfin/debug_tracecall.md @@ -1,13 +1,13 @@ --- title: "debug_tracecall" -slug: "rpc-polygon-debug_tracecall" -excerpt: "Polygon RPC" +slug: "rpc-xinfin-debug_tracecall" +excerpt: "Xinfin RPC" category: 65c5e93c623cad004b45d505 hidden: false metadata: - description: "Polygon RPC" + description: "Xinfin RPC" image: [] - keywords: "polygon, rpc" + keywords: "xinfin, 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,19 +22,19 @@ updatedAt: "Tue Apr 02 2024 08:40:59 GMT+0000 (Coordinated Universal Time)" ```typescript // yarn add @tatumio/tatum -import { TatumSDK, Polygon, Network } from '@tatumio/tatum' - -const tatum = await TatumSDK.init({network: Network.POLYGON}) +import { TatumSDK, XinFin, Network } from '@tatumio/tatum' + +const tatum = await TatumSDK.init({ network: Network.XINFIN }) const result = await tatum.rpc.debugTraceCall({ - "from": "0xa7d9ddbe1f17865597fbd27ec712455208b6b76d", - "to": "0x742d35Cc6634C0532925a3b844Bc454e4438f44e", + "from": "0x365a2dabcdb56f4f595c3af088b8975c26331448", + "to": "0x365a2dabcdb56f4f595c3af088b8975c26331449", "gas": "0x76c0", "gasPrice": "0x9184e72a000", "value": "0x9184e72a", "data": "0x606060..." }, - "0x1b4", + "0x42C1D80", { tracer: 'callTracer', tracerConfig: { @@ -52,7 +52,7 @@ await tatum.destroy() // Destroy Tatum SDK - needed for stopping background jobs ### Overview -`debug_traceCall` is a Polygon 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. +`debug_traceCall` is an 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 @@ -65,7 +65,7 @@ The `debug_traceCall` method accepts the following parameters: * `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"` +* `blockNumber`: The block number as a hexadecimal string for which the call should be traced. Example: `"0x42C1D80"` ### Return Object diff --git a/v1.0/RPC Nodes/rpc-evm/rpc-polygon/debug_tracetransaction.md b/v1.0/RPC Nodes/rpc-evm/rpc-xinfin/debug_tracetransaction.md similarity index 87% rename from v1.0/RPC Nodes/rpc-evm/rpc-polygon/debug_tracetransaction.md rename to v1.0/RPC Nodes/rpc-evm/rpc-xinfin/debug_tracetransaction.md index 7ffc28a9..36f6151f 100644 --- a/v1.0/RPC Nodes/rpc-evm/rpc-polygon/debug_tracetransaction.md +++ b/v1.0/RPC Nodes/rpc-evm/rpc-xinfin/debug_tracetransaction.md @@ -1,13 +1,13 @@ --- title: "debug_tracetransaction" -slug: "rpc-polygon-debug_tracetransaction" -excerpt: "Polygon RPC" +slug: "rpc-xinfin-debug_tracetransaction" +excerpt: "Xinfin RPC" category: 65c5e93c623cad004b45d505 hidden: false metadata: - description: "Polygon RPC" + description: "Xinfin RPC" image: [] - keywords: "polygon, rpc" + keywords: "xinfin, 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, Polygon, Network } from '@tatumio/tatum' +import { TatumSDK, XinFin, Network } from '@tatumio/tatum' + +const tatum = await TatumSDK.init({ network: Network.XINFIN }) -const tatum = await TatumSDK.init({network: Network.POLYGON}) - -const result = await tatum.rpc.debugTraceTransaction('0x920d562e886a0c7c1f07ecee2ee5557f72d3056b205f8811c57e2615a3b6adb0', { +const result = await tatum.rpc.debugTraceTransaction('0x501bc07b1e3346dabe68c6c0bee7fa52ea59c829396cd621cde0b61829321e58', { tracer: 'callTracer', tracerConfig: { onlyTopCall: true, @@ -42,7 +42,7 @@ await tatum.destroy() // Destroy Tatum SDK - needed for stopping background jobs ### Overview -`debug_traceTransaction` is a Polygon 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 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. diff --git a/v1.0/RPC Nodes/rpc-evm/rpc-polygon/eth_blocknumber.md b/v1.0/RPC Nodes/rpc-evm/rpc-xinfin/eth_blocknumber.md similarity index 70% rename from v1.0/RPC Nodes/rpc-evm/rpc-polygon/eth_blocknumber.md rename to v1.0/RPC Nodes/rpc-evm/rpc-xinfin/eth_blocknumber.md index 66d6dfae..3193c6c1 100644 --- a/v1.0/RPC Nodes/rpc-evm/rpc-polygon/eth_blocknumber.md +++ b/v1.0/RPC Nodes/rpc-evm/rpc-xinfin/eth_blocknumber.md @@ -1,13 +1,13 @@ --- title: "eth_blocknumber" -slug: "rpc-polygon-eth_blocknumber" -excerpt: "Polygon RPC" +slug: "rpc-xinfin-eth_blocknumber" +excerpt: "Xinfin RPC" category: 65c5e93c623cad004b45d505 hidden: false metadata: - description: "Polygon RPC" + description: "Xinfin RPC" image: [] - keywords: "polygon, rpc" + keywords: "xinfin, 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, Polygon, Network } from '@tatumio/tatum' - -const tatum = await TatumSDK.init({network: Network.POLYGON}) +import { TatumSDK, XinFin, Network } from '@tatumio/tatum' + +const tatum = await TatumSDK.init({ network: Network.XINFIN }) const latestBlock = await tatum.rpc.blockNumber() @@ -36,16 +36,14 @@ 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 Polygon 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 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: -* Synchronizing a local copy of the blockchain with the network +* Synchronising a local copy of the blockchain with the network * Checking the status of a transaction by comparing its block number to the current block number * Determining the current network state for smart contract interactions -{% embed url="https://codepen.io/tatum-devrel/pen/OJadwLg" %} - ### Parameters The `eth_blockNumber` method does not require any parameters. @@ -54,7 +52,7 @@ 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 Ethereum blockchain. The value is returned as a hexadecimal string. +* **`blockNumber`**: The number of the most recent block on the blockchain. The value is returned as a hexadecimal string. ### JSON-RPC Request Example @@ -79,6 +77,4 @@ The `eth_blockNumber` method returns a single field: 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` Polygon RPC method, other methods may be needed to obtain full transaction details or perform more complex tasks. - -\ +Please note that while this document provides a comprehensive description of the `eth_blockNumber` method, other methods may be needed to obtain full transaction details or perform more complex tasks. \ No newline at end of file diff --git a/v1.0/RPC Nodes/rpc-evm/rpc-polygon/eth_call.md b/v1.0/RPC Nodes/rpc-evm/rpc-xinfin/eth_call.md similarity index 83% rename from v1.0/RPC Nodes/rpc-evm/rpc-polygon/eth_call.md rename to v1.0/RPC Nodes/rpc-evm/rpc-xinfin/eth_call.md index 47d5984d..59879ba5 100644 --- a/v1.0/RPC Nodes/rpc-evm/rpc-polygon/eth_call.md +++ b/v1.0/RPC Nodes/rpc-evm/rpc-xinfin/eth_call.md @@ -1,13 +1,13 @@ --- title: "eth_call" -slug: "rpc-polygon-eth_call" -excerpt: "Polygon RPC" +slug: "rpc-xinfin-eth_call" +excerpt: "Xinfin RPC" category: 65c5e93c623cad004b45d505 hidden: false metadata: - description: "Polygon RPC" + description: "Xinfin RPC" image: [] - keywords: "polygon, rpc" + keywords: "xinfin, 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, Polygon, Network } from '@tatumio/tatum' - -const tatum = await TatumSDK.init({network: Network.POLYGON}) +import { TatumSDK, XinFin, Network } from '@tatumio/tatum' + +const tatum = await TatumSDK.init({ network: Network.XINFIN }) const result = await tatum.rpc.call({ - "to": "0xD31a59c85aE9D8edEFeC411D448f90841571b89c", // Replace with the ERC-20 token contract address - "data": "0x70a08231000000000000000000000000F22981C5bF0A717c98781Af04fdc8213fA789F1C" // The function signature for balanceOf(address), followed by the address + "to": "0xae75A438b2E0cB8Bb01Ec1E1e376De11D44477CC", // Replace with the ERC-20 token contract address + "data": "0x70a08231000000000000000000000000f432Ce1Eae375d68D139c367881d3C67aF331AEF" // The function signature for balanceOf(address), followed by the address }, "latest") await tatum.destroy() // Destroy Tatum SDK - needed for stopping background jobs @@ -58,7 +58,7 @@ Top 5 most commonly used use cases for `eth_call`: * `gas`: `QUANTITY` - (optional) Integer of the gas provided for the transaction execution. eth\_call consumes zero gas, but this parameter may be needed by some executions. * `gasPrice`: `QUANTITY` - (optional) Integer of the gasPrice used for each paid gas * `value`: `QUANTITY` - (optional) Integer of the value sent with this transaction -* `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) +* `data`: `DATA` - (optional) Hash of the method signature and encoded parameters. 2. `QUANTITY|TAG` - integer block number, or the string `"latest"`, `"earliest"` or `"pending"` ### Return Object diff --git a/v1.0/RPC Nodes/rpc-evm/rpc-polygon/eth_chainid.md b/v1.0/RPC Nodes/rpc-evm/rpc-xinfin/eth_chainid.md similarity index 60% rename from v1.0/RPC Nodes/rpc-evm/rpc-polygon/eth_chainid.md rename to v1.0/RPC Nodes/rpc-evm/rpc-xinfin/eth_chainid.md index e81203b3..7f133237 100644 --- a/v1.0/RPC Nodes/rpc-evm/rpc-polygon/eth_chainid.md +++ b/v1.0/RPC Nodes/rpc-evm/rpc-xinfin/eth_chainid.md @@ -1,13 +1,13 @@ --- title: "eth_chainid" -slug: "rpc-polygon-eth_chainid" -excerpt: "Polygon RPC" +slug: "rpc-xinfin-eth_chainid" +excerpt: "Xinfin RPC" category: 65c5e93c623cad004b45d505 hidden: false metadata: - description: "Polygon RPC" + description: "Xinfin RPC" image: [] - keywords: "polygon, rpc" + keywords: "xinfin, 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, Polygon, Network } from '@tatumio/tatum' - -const tatum = await TatumSDK.init({network: Network.POLYGON}) +import { TatumSDK, XinFin, Network } from '@tatumio/tatum' + +const tatum = await TatumSDK.init({ network: Network.XINFIN }) const id = await tatum.rpc.chainId() @@ -36,11 +36,9 @@ await tatum.destroy() // Destroy Tatum SDK - needed for stopping background jobs ### Overview -The `eth_chainId` method is a Polygon JSON-RPC method that allows developers to retrieve the currently configured chain ID of the Polygon network they are connected to. The chain ID is a unique identifier for different Polygon networks, such as Polygon Mainnet or various testnets. - -This method is particularly useful when building applications that interact with multiple Polygon 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. +The `eth_chainId` method is a 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. -{% embed url="https://codepen.io/tatum-devrel/pen/LYXqMMB" %} +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. ### Parameters @@ -71,8 +69,6 @@ JSON-RPC response: { "jsonrpc": "2.0", "id": 1, - "result": "0x89" + "result": "0xa" } ``` - -In this example, the returned chain ID is `0x89`, which corresponds to the Polygon Mainnet. diff --git a/v1.0/RPC Nodes/rpc-evm/rpc-polygon/eth_estimategas.md b/v1.0/RPC Nodes/rpc-evm/rpc-xinfin/eth_estimategas.md similarity index 77% rename from v1.0/RPC Nodes/rpc-evm/rpc-polygon/eth_estimategas.md rename to v1.0/RPC Nodes/rpc-evm/rpc-xinfin/eth_estimategas.md index e87d9cf5..c57e0714 100644 --- a/v1.0/RPC Nodes/rpc-evm/rpc-polygon/eth_estimategas.md +++ b/v1.0/RPC Nodes/rpc-evm/rpc-xinfin/eth_estimategas.md @@ -1,13 +1,13 @@ --- title: "eth_estimategas" -slug: "rpc-polygon-eth_estimategas" -excerpt: "Polygon RPC" +slug: "rpc-xinfin-eth_estimategas" +excerpt: "Xinfin RPC" category: 65c5e93c623cad004b45d505 hidden: false metadata: - description: "Polygon RPC" + description: "Xinfin RPC" image: [] - keywords: "polygon, rpc" + keywords: "xinfin, 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,18 +22,18 @@ updatedAt: "Tue Apr 02 2024 08:40:59 GMT+0000 (Coordinated Universal Time)" ```typescript // yarn add @tatumio/tatum -import { TatumSDK, Polygon, Network } from '@tatumio/tatum' - -const tatum = await TatumSDK.init({network: Network.POLYGON}) +import { TatumSDK, XinFin, Network } from '@tatumio/tatum' + +const tatum = await TatumSDK.init({ network: Network.XINFIN }) const estimate = await tatum.rpc.estimateGas({ - "from": "0x742d35Cc6634C0532925a3b844Bc454e4438f44e", - "to": "0x742d35Cc6634C0532925a3b844Bc454e4438f44e", + "from": "0x365a2dabcdb56f4f595c3af088b8975c26331448", + "to": "0x365a2dabcdb56f4f595c3af088b8975c26331449", "value": "0xde0b6b3a7640000", "data": "0x606060" }) - await tatum.destroy() // Destroy Tatum SDK - needed for stopping background jobs +await tatum.destroy() // Destroy Tatum SDK - needed for stopping background jobs ``` {% endcode %} {% endtab %} @@ -41,7 +41,7 @@ const estimate = await tatum.rpc.estimateGas({ ### Overview -`eth_estimateGas` is a Polygon 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 predict the gas fees better and avoid issues like out-of-gas errors. +`eth_estimateGas` is a 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: @@ -49,10 +49,6 @@ Use cases for `eth_estimateGas` include: * Estimating gas costs for contract function calls * Estimating gas costs for standard ether transfers -{% embed url="https://codepen.io/tatum-devrel/pen/ExOrGBQ" %} -Try this function -{% endembed %} - ### Parameters The `eth_estimateGas` method takes a single parameter, an object representing the transaction details. The fields in the transaction object include: diff --git a/v1.0/RPC Nodes/rpc-evm/rpc-xinfin/eth_gasprice.md b/v1.0/RPC Nodes/rpc-evm/rpc-xinfin/eth_gasprice.md new file mode 100644 index 00000000..2a300000 --- /dev/null +++ b/v1.0/RPC Nodes/rpc-evm/rpc-xinfin/eth_gasprice.md @@ -0,0 +1,74 @@ +--- +title: "eth_gasprice" +slug: "rpc-xinfin-eth_gasprice" +excerpt: "Xinfin RPC" +category: 65c5e93c623cad004b45d505 +hidden: false +metadata: + description: "Xinfin RPC" + image: [] + keywords: "xinfin, 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, XinFin, Network } from '@tatumio/tatum' + +const tatum = await TatumSDK.init({ network: Network.XINFIN }) + +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 a 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"` + +### 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-polygon/eth_getbalance.md b/v1.0/RPC Nodes/rpc-evm/rpc-xinfin/eth_getbalance.md similarity index 70% rename from v1.0/RPC Nodes/rpc-evm/rpc-polygon/eth_getbalance.md rename to v1.0/RPC Nodes/rpc-evm/rpc-xinfin/eth_getbalance.md index 9a3d99a3..aded418b 100644 --- a/v1.0/RPC Nodes/rpc-evm/rpc-polygon/eth_getbalance.md +++ b/v1.0/RPC Nodes/rpc-evm/rpc-xinfin/eth_getbalance.md @@ -1,13 +1,13 @@ --- title: "eth_getbalance" -slug: "rpc-polygon-eth_getbalance" -excerpt: "Polygon RPC" +slug: "rpc-xinfin-eth_getbalance" +excerpt: "Xinfin RPC" category: 65c5e93c623cad004b45d505 hidden: false metadata: - description: "Polygon RPC" + description: "Xinfin RPC" image: [] - keywords: "polygon, rpc" + keywords: "xinfin, 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)" @@ -21,12 +21,12 @@ updatedAt: "Tue Apr 02 2024 08:40:59 GMT+0000 (Coordinated Universal Time)" {% code overflow="wrap" lineNumbers="true" %} ```typescript // yarn add @tatumio/tatum + +import { TatumSDK, XinFin, Network } from '@tatumio/tatum' + +const tatum = await TatumSDK.init({ network: Network.XINFIN }) -import { TatumSDK, Polygon, Network } from '@tatumio/tatum' - -const tatum = await TatumSDK.init({network: Network.POLYGON}) - -const balance = await tatum.rpc.getBalance('0x742d35Cc6634C0532925a3b844Bc454e4438f44e') +const balance = await tatum.rpc.getBalance('0x043a27fB84203BA118D478996331C132644F221B') await tatum.destroy() // Destroy Tatum SDK - needed for stopping background jobs ``` @@ -36,18 +36,14 @@ await tatum.destroy() // Destroy Tatum SDK - needed for stopping background jobs ### Overview -The `eth_getBalance` method is an Polygon JSON-RPC method that allows you to retrieve the MATIC balance of a specified address. This method can be used to query the balance of any Polygon 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 decentralised application (DApp). - - - -{% embed url="https://codepen.io/tatum-devrel/pen/bGQzOWP" %} +The `eth_getBalance` method is an method that allows you to retrieve the Ether 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). ### Parameters The method requires two parameters: -1. **`address`** (required): The Polygon address of the account or contract whose balance you want to query. - * Example: `"0x742d35Cc6634C0532925a3b844Bc454e4438f44e"` +1. **`address`** (required): The address of the account or contract whose balance you want to query. + * Example: `"0x043a27fB84203BA118D478996331C132644F221B"` 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"` @@ -74,7 +70,7 @@ A full transaction object includes the following fields: The method returns a single field: -* `result`: The MATIC balance of the specified address in wei, as a hexadecimal string. +* `result`: The Ether 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 @@ -87,7 +83,7 @@ The method returns a single field: "id": 1, "method": "eth_getBalance", "params": [ - "0x742d35Cc6634C0532925a3b844Bc454e4438f44e", + "0x043a27fB84203BA118D478996331C132644F221B", "latest" ] } diff --git a/v1.0/RPC Nodes/rpc-evm/rpc-polygon/eth_getblockbyhash.md b/v1.0/RPC Nodes/rpc-evm/rpc-xinfin/eth_getblockbyhash.md similarity index 87% rename from v1.0/RPC Nodes/rpc-evm/rpc-polygon/eth_getblockbyhash.md rename to v1.0/RPC Nodes/rpc-evm/rpc-xinfin/eth_getblockbyhash.md index 148e464d..54de1ea4 100644 --- a/v1.0/RPC Nodes/rpc-evm/rpc-polygon/eth_getblockbyhash.md +++ b/v1.0/RPC Nodes/rpc-evm/rpc-xinfin/eth_getblockbyhash.md @@ -1,13 +1,13 @@ --- title: "eth_getblockbyhash" -slug: "rpc-polygon-eth_getblockbyhash" -excerpt: "Polygon RPC" +slug: "rpc-xinfin-eth_getblockbyhash" +excerpt: "Xinfin RPC" category: 65c5e93c623cad004b45d505 hidden: false metadata: - description: "Polygon RPC" + description: "Xinfin RPC" image: [] - keywords: "polygon, rpc" + keywords: "xinfin, 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)" @@ -21,12 +21,12 @@ updatedAt: "Tue Apr 02 2024 08:40:59 GMT+0000 (Coordinated Universal Time)" {% code overflow="wrap" lineNumbers="true" %} ```typescript // yarn add @tatumio/tatum + +import { TatumSDK, XinFin, Network } from '@tatumio/tatum' + +const tatum = await TatumSDK.init({ network: Network.XINFIN }) -import { TatumSDK, Polygon, Network } from '@tatumio/tatum' - -const tatum = await TatumSDK.init({network: Network.POLYGON}) - -const block = await tatum.rpc.getBlockByHash('0x20338a164dfb8f23d067df87fe0fb89a9248b2071ec2e91ac0383f5c0b1fb13d', true) +const block = await tatum.rpc.getBlockByHash('0x0003bd8d00000625538ae9cb302a2eea2f17e5b751b447257b94617d90f1e01c', true) await tatum.destroy() // Destroy Tatum SDK - needed for stopping background jobs ``` @@ -36,11 +36,7 @@ await tatum.destroy() // Destroy Tatum SDK - needed for stopping background jobs ### Overview -`eth_getBlockByHash` is an Polygon JSON-RPC method that allows developers to query a specific block in the Polygon blockchain by its block hash. This method can be used in various scenarios, such as analysing historical transactions, validating the state of the blockchain, or monitoring the progress of mining activities. - -{% embed url="https://codepen.io/tatum-devrel/pen/RwqvGLE?editors=1010" %} -Try this function -{% endembed %} +`eth_getBlockByHash` is an 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 @@ -48,7 +44,7 @@ The `eth_getBlockByHash` method accepts two parameters: 1. **`blockHash`**: The hash of the block you want to retrieve information about. * Type: `String` - * Example: `"0x20338a164dfb8f23d067df87fe0fb89a9248b2071ec2e91ac0383f5c0b1fb13d"` + * Example: `"0x0003bd8d00000625538ae9cb302a2eea2f17e5b751b447257b94617d90f1e01c"` 2. **`fullTransactionDetails`**: A boolean value indicating whether to return full transaction details or just transaction hashes. * Type: `Boolean` * Example: `true` @@ -100,7 +96,7 @@ Here are examples of JSON-RPC request and response for the `eth_getBlockByNumber { "jsonrpc": "2.0", "method": "eth_getBlockByHash", - "params": ["0x20338a164dfb8f23d067df87fe0fb89a9248b2071ec2e91ac0383f5c0b1fb13d", true], + "params": ["0x0003bd8d00000625538ae9cb302a2eea2f17e5b751b447257b94617d90f1e01c", true], "id": 1 } ``` diff --git a/v1.0/RPC Nodes/rpc-evm/rpc-polygon/eth_getblockbynumber.md b/v1.0/RPC Nodes/rpc-evm/rpc-xinfin/eth_getblockbynumber.md similarity index 91% rename from v1.0/RPC Nodes/rpc-evm/rpc-polygon/eth_getblockbynumber.md rename to v1.0/RPC Nodes/rpc-evm/rpc-xinfin/eth_getblockbynumber.md index 5ba98926..577b31d2 100644 --- a/v1.0/RPC Nodes/rpc-evm/rpc-polygon/eth_getblockbynumber.md +++ b/v1.0/RPC Nodes/rpc-evm/rpc-xinfin/eth_getblockbynumber.md @@ -1,13 +1,13 @@ --- title: "eth_getblockbynumber" -slug: "rpc-polygon-eth_getblockbynumber" -excerpt: "Polygon RPC" +slug: "rpc-xinfin-eth_getblockbynumber" +excerpt: "Xinfin RPC" category: 65c5e93c623cad004b45d505 hidden: false metadata: - description: "Polygon RPC" + description: "Xinfin RPC" image: [] - keywords: "polygon, rpc" + keywords: "xinfin, 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)" @@ -21,14 +21,15 @@ updatedAt: "Tue Apr 02 2024 08:40:59 GMT+0000 (Coordinated Universal Time)" {% code overflow="wrap" lineNumbers="true" %} ```typescript // yarn add @tatumio/tatum - -import { TatumSDK, Polygon, Network } from '@tatumio/tatum' - -const tatum = await TatumSDK.init({network: Network.POLYGON}) + +import { TatumSDK, XinFin, Network } from '@tatumio/tatum' + +const tatum = await TatumSDK.init({ network: Network.XINFIN }) const block = await tatum.rpc.getBlockByNumber('latest', true) await tatum.destroy() // Destroy Tatum SDK - needed for stopping background jobs + ``` {% endcode %} {% endtab %} @@ -36,9 +37,7 @@ await tatum.destroy() // Destroy Tatum SDK - needed for stopping background jobs ### Overview -`eth_getBlockByNumber` is an Polygon JSON-RPC method that allows developers to query a specific block in the Polygon blockchain by its block number. This method can be used in various scenarios, such as analysing historical transactions, validating the state of the blockchain, or monitoring the progress of mining activities. - -{% embed url="https://codepen.io/tatum-devrel/pen/gOQqjOW" %} +`eth_getBlockByNumber` is an 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. ### Parameters diff --git a/v1.0/RPC Nodes/rpc-evm/rpc-polygon/eth_getblocktransactioncountbyhash.md b/v1.0/RPC Nodes/rpc-evm/rpc-xinfin/eth_getblocktransactioncountbyhash.md similarity index 64% rename from v1.0/RPC Nodes/rpc-evm/rpc-polygon/eth_getblocktransactioncountbyhash.md rename to v1.0/RPC Nodes/rpc-evm/rpc-xinfin/eth_getblocktransactioncountbyhash.md index c32d728d..1f88002b 100644 --- a/v1.0/RPC Nodes/rpc-evm/rpc-polygon/eth_getblocktransactioncountbyhash.md +++ b/v1.0/RPC Nodes/rpc-evm/rpc-xinfin/eth_getblocktransactioncountbyhash.md @@ -1,13 +1,13 @@ --- title: "eth_getblocktransactioncountbyhash" -slug: "rpc-polygon-eth_getblocktransactioncountbyhash" -excerpt: "Polygon RPC" +slug: "rpc-xinfin-eth_getblocktransactioncountbyhash" +excerpt: "Xinfin RPC" category: 65c5e93c623cad004b45d505 hidden: false metadata: - description: "Polygon RPC" + description: "Xinfin RPC" image: [] - keywords: "polygon, rpc" + keywords: "xinfin, 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, Polygon, Network } from '@tatumio/tatum' +import { TatumSDK, XinFin, Network } from '@tatumio/tatum' + +const tatum = await TatumSDK.init({ network: Network.XINFIN }) -const tatum = await TatumSDK.init({network: Network.POLYGON}) - -const response = await tatum.rpc.getBlockTransactionCountByHash('0x25b4d076c94a987a7ad167f6005a970d4a4d32248b61efbaaf132aa44bc59a61') +const response = await tatum.rpc.getBlockTransactionCountByHash('0x0003bd8d00000625538ae9cb302a2eea2f17e5b751b447257b94617d90f1e01c') await tatum.destroy() // Destroy Tatum SDK - needed for stopping background jobs ``` @@ -36,9 +36,7 @@ await tatum.destroy() // Destroy Tatum SDK - needed for stopping background jobs ### Overview -`eth_getBlockTransactionCountByHash` is a Polygon 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 network activity or estimating transaction confirmation times. - -{% embed url="https://codepen.io/tatum-devrel/pen/JjexwZp?editors=1111" %} +`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 @@ -48,7 +46,7 @@ This method requires a single parameter: Example of the parameter: -* `blockHash`: `"0x25b4d076c94a987a7ad167f6005a970d4a4d32248b61efbaaf132aa44bc59a61"` +* `blockHash`: `"0x0003bd8d00000625538ae9cb302a2eea2f17e5b751b447257b94617d90f1e01c"` ### Return @@ -66,7 +64,7 @@ The method returns a single value: "jsonrpc": "2.0", "method": "eth_getBlockTransactionCountByHash", "params": [ - "0x25b4d076c94a987a7ad167f6005a970d4a4d32248b61efbaaf132aa44bc59a61" + "0xb903239f8543d04b5dc1ba6579132b143087c68db1b2168786408fcbce568238" ] } ``` diff --git a/v1.0/RPC Nodes/rpc-evm/rpc-polygon/eth_getblocktransactioncountbynumber.md b/v1.0/RPC Nodes/rpc-evm/rpc-xinfin/eth_getblocktransactioncountbynumber.md similarity index 59% rename from v1.0/RPC Nodes/rpc-evm/rpc-polygon/eth_getblocktransactioncountbynumber.md rename to v1.0/RPC Nodes/rpc-evm/rpc-xinfin/eth_getblocktransactioncountbynumber.md index 302ba989..0b11f160 100644 --- a/v1.0/RPC Nodes/rpc-evm/rpc-polygon/eth_getblocktransactioncountbynumber.md +++ b/v1.0/RPC Nodes/rpc-evm/rpc-xinfin/eth_getblocktransactioncountbynumber.md @@ -1,13 +1,13 @@ --- title: "eth_getblocktransactioncountbynumber" -slug: "rpc-polygon-eth_getblocktransactioncountbynumber" -excerpt: "Polygon RPC" +slug: "rpc-xinfin-eth_getblocktransactioncountbynumber" +excerpt: "Xinfin RPC" category: 65c5e93c623cad004b45d505 hidden: false metadata: - description: "Polygon RPC" + description: "Xinfin RPC" image: [] - keywords: "polygon, rpc" + keywords: "xinfin, 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, Polygon, Network } from '@tatumio/tatum' +import { TatumSDK, XinFin, Network } from '@tatumio/tatum' + +const tatum = await TatumSDK.init({ network: Network.XINFIN }) -const tatum = await TatumSDK.init({network: Network.POLYGON}) - -const response = await tatum.rpc.getBlockTransactionCountByNumber(47766249) +const response = await tatum.rpc.getBlockTransactionCountByNumber('0x42C1D80') await tatum.destroy() // Destroy Tatum SDK - needed for stopping background jobs ``` @@ -36,18 +36,16 @@ await tatum.destroy() // Destroy Tatum SDK - needed for stopping background jobs ### Overview -The `eth_getBlockTransactionCountByNumber` Polygon JSON-RPC method allows you to retrieve the number of transactions in a specified block. This method is particularly useful when you need to analyse the transaction activity of a specific block. You can use it to gain insights into network usage, analyse the impact of specific events on the Polygon network, or monitor transaction congestion in certain blocks. - -{% embed url="https://codepen.io/tatum-devrel/pen/gOQqZKy" %} +The `eth_getBlockTransactionCountByNumber` 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. ### 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: 47766249 + * Example: `"0x42C1D80` ### Return Object -The returned object is a hex-encoded value representing the number of transactions in the specified block. +The return object is a hex-encoded value representing the number of transactions in the specified block. * Example: `"0xa"` (10 transactions) @@ -60,7 +58,7 @@ The returned object is a hex-encoded value representing the number of transactio "jsonrpc": "2.0", "id": 1, "method": "eth_getBlockTransactionCountByNumber", - "params": [47766249] + "params": ["0x1b4"] } ``` @@ -70,7 +68,7 @@ The returned object is a hex-encoded value representing the number of transactio { "jsonrpc": "2.0", "id": 1, - "result": "0x33" + "result": "0xa" } ``` diff --git a/v1.0/RPC Nodes/rpc-evm/rpc-polygon/eth_getcode.md b/v1.0/RPC Nodes/rpc-evm/rpc-xinfin/eth_getcode.md similarity index 62% rename from v1.0/RPC Nodes/rpc-evm/rpc-polygon/eth_getcode.md rename to v1.0/RPC Nodes/rpc-evm/rpc-xinfin/eth_getcode.md index 4c798dbe..13a7703f 100644 --- a/v1.0/RPC Nodes/rpc-evm/rpc-polygon/eth_getcode.md +++ b/v1.0/RPC Nodes/rpc-evm/rpc-xinfin/eth_getcode.md @@ -1,13 +1,13 @@ --- title: "eth_getcode" -slug: "rpc-polygon-eth_getcode" -excerpt: "Polygon RPC" +slug: "rpc-xinfin-eth_getcode" +excerpt: "Xinfin RPC" category: 65c5e93c623cad004b45d505 hidden: false metadata: - description: "Polygon RPC" + description: "Xinfin RPC" image: [] - keywords: "polygon, rpc" + keywords: "xinfin, 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)" @@ -18,40 +18,35 @@ updatedAt: "Tue Apr 02 2024 08:40:59 GMT+0000 (Coordinated Universal Time)" {% tabs %} {% tab title="TypeScript/JavaScript" %} -{% code overflow="wrap" lineNumbers="true" %} -```typescript -// yarn add @tatumio/tatum +
// yarn add @tatumio/tatum
 
-import { TatumSDK, Polygon, Network } from '@tatumio/tatum'
-
-const tatum = await TatumSDK.init({network: Network.POLYGON})
-
-const code = await tatum.rpc.getCode('0x4d544035500D7aC1B42329c70eb58E77f8249f0F')
+import { TatumSDK, XinFin, Network } from '@tatumio/tatum'
+  
+const tatum = await TatumSDK.init({ network: Network.XINFIN })
 
+const code = await tatum.rpc.getCode('0x82487dF5b4cF19DB597A092c8103759466Be9e5a')
+
 await tatum.destroy() // Destroy Tatum SDK - needed for stopping background jobs
-```
-{% endcode %}
+
{% endtab %} {% endtabs %} ### Overview -The `eth_getCode` method is part of the Polygon JSON-RPC API, which allows users to interact with the Polygon 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 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. Use cases for this method could include: * Debugging a smart contract * Verifying the integrity of a deployed contract -* Analysing contract bytecode for security vulnerabilities - -{% embed url="https://codepen.io/tatum-devrel/pen/NWEoeYW" %} +* Analyzing contract bytecode for security vulnerabilities ### Parameters 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 Polygon address, formatted as a hex string with a `0x` prefix. - * Example: `"0x4d544035500D7aC1B42329c70eb58E77f8249f0F"` +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: `"0x82487dF5b4cF19DB597A092c8103759466Be9e5a"` 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 @@ -75,7 +70,7 @@ The `eth_getCode` method returns a string representing the contract bytecode. Th "jsonrpc": "2.0", "method": "eth_getCode", "params": [ - "0x4d544035500D7aC1B42329c70eb58E77f8249f0F", + "0xcBA5609AB435969dEF6Ab164c4C0A4165E805783", "latest" ] } diff --git a/v1.0/RPC Nodes/rpc-evm/rpc-polygon/eth_getlogs.md b/v1.0/RPC Nodes/rpc-evm/rpc-xinfin/eth_getlogs.md similarity index 60% rename from v1.0/RPC Nodes/rpc-evm/rpc-polygon/eth_getlogs.md rename to v1.0/RPC Nodes/rpc-evm/rpc-xinfin/eth_getlogs.md index 8c23a153..61138b2a 100644 --- a/v1.0/RPC Nodes/rpc-evm/rpc-polygon/eth_getlogs.md +++ b/v1.0/RPC Nodes/rpc-evm/rpc-xinfin/eth_getlogs.md @@ -1,13 +1,13 @@ --- title: "eth_getlogs" -slug: "rpc-polygon-eth_getlogs" -excerpt: "Polygon RPC" +slug: "rpc-xinfin-eth_getlogs" +excerpt: "Xinfin RPC" category: 65c5e93c623cad004b45d505 hidden: false metadata: - description: "Polygon RPC" + description: "Xinfin RPC" image: [] - keywords: "polygon, rpc" + keywords: "xinfin, 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)" @@ -21,12 +21,12 @@ updatedAt: "Tue Apr 02 2024 08:40:59 GMT+0000 (Coordinated Universal Time)" {% code overflow="wrap" lineNumbers="true" %} ```typescript // yarn add @tatumio/tatum + +import { TatumSDK, XinFin, Network } from '@tatumio/tatum' + +const tatum = await TatumSDK.init({ network: Network.XINFIN }) -import { TatumSDK, Polygon, Network } from '@tatumio/tatum' - -const tatum = await TatumSDK.init({network: Network.POLYGON}) - -const logs = await tatum.rpc.getLogs({ address : '0x2791Bca1f2de4661ED88A30C99A7a9449Aa84174'}) +const logs = await tatum.rpc.getLogs({ address : '0x82487dF5b4cF19DB597A092c8103759466Be9e5a'}) await tatum.destroy() // Destroy Tatum SDK - needed for stopping background jobs ``` @@ -36,32 +36,30 @@ await tatum.destroy() // Destroy Tatum SDK - needed for stopping background jobs ### Overview -The `eth_getLogs` a method is a Polygon JSON-RPC method that allows developers to query logs generated by the Polygon network, specifically event logs emitted by smart contracts. These logs are an essential part of the Polygon ecosystem as they provide a way for developers to monitor contract events and track contract state changes. - -This method is particularly useful when building decentralised 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 Polygon blockchain. +The `eth_getLogs` method is an 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. -{% embed url="https://codepen.io/tatum-devrel/pen/OJadrgq" %} +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. ### Parameters -The `eth_getLogs` the method takes a single input parameter: an object containing the filter criteria. The filter object can have the following fields: +The `eth_getLogs` method takes a single input parameter: an object containing the filter criteria. The filter object can have the following fields: -* **`fromBlock`**: (optional) The starting block number for the search. It can be a block number or one of the following strings: `"earliest"`, `"latest"`, or `"pending"`. +* **`fromBlock`**: (optional) The starting block number for the search. Can be a block number or one of the following strings: `"earliest"`, `"latest"`, or `"pending"`. * Example: `"fromBlock": "0x1"` -* **`toBlock`**: (optional) The ending block number for the search. It can be a block number or one of the following strings: `"earliest"`, `"latest"`, or `"pending"`. +* **`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. It can be a single address or an array of addresses. - * Example: `"address": "0x2791Bca1f2de4661ED88A30C99A7a9449Aa84174"` +* **`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": "0x82487dF5b4cF19DB597A092c8103759466Be9e5a"` * **`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. * Example: `"blockhash": "0xc6ef9..."` -In addition to the above fields, the `transactions` the field in the filter object can be specified to include full transaction details instead of just transaction hashes. This is useful when you need more information about the transactions in which the events were emitted. +In addition to the above fields, the `transactions` field in the filter object can be specified to include full transaction details instead of just transaction hashes. This is useful when you need more information about the transactions in which the events were emitted. ### Return Object -The `eth_getLogs` the method returns an array of log objects. Each log object contains the following fields: +The `eth_getLogs` method returns an array of log objects. Each log object contains the following fields: * **`removed`**: A boolean indicating whether the log was removed due to a chain reorganization. * Example: `"removed": false` @@ -76,7 +74,7 @@ The `eth_getLogs` the method returns an array of log objects. Each log object co * **`blockNumber`**: The block number containing the log. * Example: `"blockNumber": "0x1"` * **`address`**: The address of the contract that emitted the log. - * Example: `"address": "0x2791Bca1f2de4661ED88A30C99A7a9449Aa84174"` + * Example: `"address": "0x82487dF5b4cF19DB597A092c8103759466Be9e5a"` * **`data`**: The data associated with the log. * Example: `"data":"0x0000000000000000000000000000000000000000000000000000000000000020"` * **`topics`**: An array of topics (order-dependent) associated with the log. @@ -95,7 +93,7 @@ The `eth_getLogs` the method returns an array of log objects. Each log object co { "fromBlock": "0x1", "toBlock": "0x2", - "address": "0x2791Bca1f2de4661ED88A30C99A7a9449Aa84174", + "address": "0x82487dF5b4cF19DB597A092c8103759466Be9e5a", "topics": ["0x123..."] } ] @@ -124,4 +122,4 @@ The `eth_getLogs` the method returns an array of log objects. Each log object co } ``` -This documentation provides a comprehensive overview of the `eth_getLogs` Polygon JSON-RPC method, its parameters, return objects, and JSON-RPC examples. By using this method, developers can effectively query logs generated by the Polygon network and use the retrieved data to track and react to events happening on the Polygon blockchain. +This documentation provides a comprehensive overview of the `eth_getLogs` method, its parameters, return objects, and JSON-RPC examples. By using this method, developers can effectively query logs generated by the network and use the retrieved data to track and react to events happening on the blockchain. diff --git a/v1.0/RPC Nodes/rpc-evm/rpc-polygon/eth_getproof.md b/v1.0/RPC Nodes/rpc-evm/rpc-xinfin/eth_getproof.md similarity index 75% rename from v1.0/RPC Nodes/rpc-evm/rpc-polygon/eth_getproof.md rename to v1.0/RPC Nodes/rpc-evm/rpc-xinfin/eth_getproof.md index 048bc96e..29dec2ae 100644 --- a/v1.0/RPC Nodes/rpc-evm/rpc-polygon/eth_getproof.md +++ b/v1.0/RPC Nodes/rpc-evm/rpc-xinfin/eth_getproof.md @@ -1,13 +1,13 @@ --- title: "eth_getproof" -slug: "rpc-polygon-eth_getproof" -excerpt: "Polygon RPC" +slug: "rpc-xinfin-eth_getproof" +excerpt: "Xinfin RPC" category: 65c5e93c623cad004b45d505 hidden: false metadata: - description: "Polygon RPC" + description: "Xinfin RPC" image: [] - keywords: "polygon, rpc" + keywords: "xinfin, 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, Polygon, Network } from '@tatumio/tatum' +import { TatumSDK, XinFin, Network } from '@tatumio/tatum' + +const tatum = await TatumSDK.init({ network: Network.XINFIN }) -const tatum = await TatumSDK.init({network: Network.POLYGON}) - -const result = await tatum.rpc.getProof("0xE7aFC41f0f99a305935857BA27bee99c4A29AC83", +const result = await tatum.rpc.getProof("0x82487dF5b4cF19DB597A092c8103759466Be9e5a", ["0x0000000000000000000000000000000000000000000000000000000000000000"], "latest") @@ -38,15 +38,13 @@ await tatum.destroy() // Destroy Tatum SDK - needed for stopping background jobs ### Overview -The `eth_getProof` is a Polygon 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 Polygon 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. - -{% embed url="https://codepen.io/tatum-devrel/pen/vYQbvzv" %} +The `eth_getProof` is an 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. ### Parameters 1. **`address`** - `Data`, 20 Bytes * The address of the account. - * Example: `"0xE7aFC41f0f99a305935857BA27bee99c4A29AC83"` + * Example: `"0x82487dF5b4cF19DB597A092c8103759466Be9e5a"` 2. **`keys`** - `Array` of `Data` * An array of storage keys for which the proof should be generated. * Example: `["0x0000000000000000000000000000000000000000000000000000000000000000"]` @@ -82,7 +80,7 @@ _Request_: "jsonrpc": "2.0", "method": "eth_getProof", "params": [ - "0xE7aFC41f0f99a305935857BA27bee99c4A29AC83", + "0x742d35Cc6634C0532925a3b844Bc454e4438f44e", [ "0x0000000000000000000000000000000000000000000000000000000000000000" ], diff --git a/v1.0/RPC Nodes/rpc-evm/rpc-polygon/eth_getstorageat.md b/v1.0/RPC Nodes/rpc-evm/rpc-xinfin/eth_getstorageat.md similarity index 65% rename from v1.0/RPC Nodes/rpc-evm/rpc-polygon/eth_getstorageat.md rename to v1.0/RPC Nodes/rpc-evm/rpc-xinfin/eth_getstorageat.md index f0853a4a..e1629ebf 100644 --- a/v1.0/RPC Nodes/rpc-evm/rpc-polygon/eth_getstorageat.md +++ b/v1.0/RPC Nodes/rpc-evm/rpc-xinfin/eth_getstorageat.md @@ -1,13 +1,13 @@ --- title: "eth_getstorageat" -slug: "rpc-polygon-eth_getstorageat" -excerpt: "Polygon RPC" +slug: "rpc-xinfin-eth_getstorageat" +excerpt: "Xinfin RPC" category: 65c5e93c623cad004b45d505 hidden: false metadata: - description: "Polygon RPC" + description: "Xinfin RPC" image: [] - keywords: "polygon, rpc" + keywords: "xinfin, 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,12 @@ updatedAt: "Tue Apr 02 2024 08:40:59 GMT+0000 (Coordinated Universal Time)" ```typescript // yarn add @tatumio/tatum -import { TatumSDK, Polygon, Network } from '@tatumio/tatum' +import { TatumSDK, XinFin, Network } from '@tatumio/tatum' + +const tatum = await TatumSDK.init({ network: Network.XINFIN }) -const tatum = await TatumSDK.init({network: Network.POLYGON}) - -const response = await tatum.rpc.getStorageAt('0x0000000000000000000000000000000000001010', '0x0') +const response = await +tatum.rpc.getStorageAt('0x82487dF5b4cF19DB597A092c8103759466Be9e5a', '0x0') await tatum.destroy() // Destroy Tatum SDK - needed for stopping background jobs ``` @@ -36,16 +37,14 @@ await tatum.destroy() // Destroy Tatum SDK - needed for stopping background jobs ### Overview -`eth_getStorageAt` is a Polygon 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. - -{% embed url="https://codepen.io/Martin-Zemanek/pen/eYQYNzG" %} +`eth_getStorageAt` is an 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: `"0x0000000000000000000000000000000000001010"` + * Example: `"0x82487dF5b4cF19DB597A092c8103759466Be9e5a"` 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. @@ -65,7 +64,7 @@ The return object is a single string value, representing the storage value at th "jsonrpc": "2.0", "method": "eth_getStorageAt", "params": [ - "0x0000000000000000000000000000000000001010", + "0xcBA5609AB435969dEF6Ab164c4C0A4165E805783", "0x0", "latest" ] @@ -78,7 +77,7 @@ The return object is a single string value, representing the storage value at th { "id": 1, "jsonrpc": "2.0", - "result": "0x0000000000000000000000000000000000000000000000000000000000000123" + "result": "0x0000000000000000000000000000000000000000000000000000000000fd6626" } ``` diff --git a/v1.0/RPC Nodes/rpc-evm/rpc-polygon/eth_gettransactionbyblockhashandindex.md b/v1.0/RPC Nodes/rpc-evm/rpc-xinfin/eth_gettransactionbyblockhashandindex.md similarity index 87% rename from v1.0/RPC Nodes/rpc-evm/rpc-polygon/eth_gettransactionbyblockhashandindex.md rename to v1.0/RPC Nodes/rpc-evm/rpc-xinfin/eth_gettransactionbyblockhashandindex.md index 06219842..98f3ba7f 100644 --- a/v1.0/RPC Nodes/rpc-evm/rpc-polygon/eth_gettransactionbyblockhashandindex.md +++ b/v1.0/RPC Nodes/rpc-evm/rpc-xinfin/eth_gettransactionbyblockhashandindex.md @@ -1,13 +1,13 @@ --- title: "eth_gettransactionbyblockhashandindex" -slug: "rpc-polygon-eth_gettransactionbyblockhashandindex" -excerpt: "Polygon RPC" +slug: "rpc-xinfin-eth_gettransactionbyblockhashandindex" +excerpt: "Xinfin RPC" category: 65c5e93c623cad004b45d505 hidden: false metadata: - description: "Polygon RPC" + description: "Xinfin RPC" image: [] - keywords: "polygon, rpc" + keywords: "xinfin, 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, Polygon, Network } from '@tatumio/tatum' +import { TatumSDK, XinFin, Network } from '@tatumio/tatum' + +const tatum = await TatumSDK.init({ network: Network.XINFIN }) -const tatum = await TatumSDK.init({network: Network.POLYGON}) - -const tx = await tatum.rpc.getTransactionByBlockHashAndIndex('0x25b4d076c94a987a7ad167f6005a970d4a4d32248b61efbaaf132aa44bc59a61', 0) +const tx = await tatum.rpc.getTransactionByBlockHashAndIndex('0x0003bd8d00000625538ae9cb302a2eea2f17e5b751b447257b94617d90f1e01c', 0) 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 -`eth_getTransactionByBlockHashAndIndex` is a Polygon 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. +`eth_getTransactionByBlockHashAndIndex` is an 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: @@ -44,14 +44,12 @@ Use cases for this method may include: * Gathering data for transaction analysis * Fetching transaction information for specific blocks in a block explorer application -{% embed url="https://codepen.io/Martin-Zemanek/pen/wvQvMWR" %} - ### Parameters The `eth_getTransactionByBlockHashAndIndex` method accepts two parameters: 1. `blockHash` (required): The hash of the block containing the transaction. - * Example: `"0x25b4d076c94a987a7ad167f6005a970d4a4d32248b61efbaaf132aa44bc59a61"` + * Example: `"0x0003bd8d00000625538ae9cb302a2eea2f17e5b751b447257b94617d90f1e01c"` 2. `transactionIndex` (required): The index of the transaction within the specified block. The index is a hexadecimal value. * Example: `"0x0"` @@ -81,7 +79,7 @@ Request: "id": 1, "method": "eth_getTransactionByBlockHashAndIndex", "params": [ - "0x25b4d076c94a987a7ad167f6005a970d4a4d32248b61efbaaf132aa44bc59a61", + "0x0003bd8d00000625538ae9cb302a2eea2f17e5b751b447257b94617d90f1e01c", "0x0" ] } diff --git a/v1.0/RPC Nodes/rpc-evm/rpc-polygon/eth_gettransactionbyblocknumberandindex.md b/v1.0/RPC Nodes/rpc-evm/rpc-xinfin/eth_gettransactionbyblocknumberandindex.md similarity index 87% rename from v1.0/RPC Nodes/rpc-evm/rpc-polygon/eth_gettransactionbyblocknumberandindex.md rename to v1.0/RPC Nodes/rpc-evm/rpc-xinfin/eth_gettransactionbyblocknumberandindex.md index 879b7dc8..53a10e24 100644 --- a/v1.0/RPC Nodes/rpc-evm/rpc-polygon/eth_gettransactionbyblocknumberandindex.md +++ b/v1.0/RPC Nodes/rpc-evm/rpc-xinfin/eth_gettransactionbyblocknumberandindex.md @@ -1,13 +1,13 @@ --- title: "eth_gettransactionbyblocknumberandindex" -slug: "rpc-polygon-eth_gettransactionbyblocknumberandindex" -excerpt: "Polygon RPC" +slug: "rpc-xinfin-eth_gettransactionbyblocknumberandindex" +excerpt: "Xinfin RPC" category: 65c5e93c623cad004b45d505 hidden: false metadata: - description: "Polygon RPC" + description: "Xinfin RPC" image: [] - keywords: "polygon, rpc" + keywords: "xinfin, 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, Polygon, Network } from '@tatumio/tatum' +import { TatumSDK, XinFin, Network } from '@tatumio/tatum' + +const tatum = await TatumSDK.init({ network: Network.XINFIN }) -const tatum = await TatumSDK.init({network: Network.POLYGON}) - -const tx = await tatum.rpc.getTransactionByBlockNumberAndIndex(47766249, 0) +const tx = await tatum.rpc.getTransactionByBlockNumberAndIndex('0x42C1D80', 0) 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 -`eth_getTransactionByBlockHashAndIndex` is a Polygon 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. +`eth_getTransactionByBlockHashAndIndex` is an 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: @@ -44,14 +44,12 @@ Use cases for this method may include: * Gathering data for transaction analysis * Fetching transaction information for specific blocks in a block explorer application -{% embed url="https://codepen.io/Martin-Zemanek/pen/xxQxZRq" %} - ### Parameters The `eth_getTransactionByBlockHashAndIndex` method accepts two parameters: 1. `blockNumber` (required): The hash of the block containing the transaction. - * Example: 47766249 + * Example: `"0x42C1D80"` 2. `transactionIndex` (required): The index of the transaction within the specified block. The index is a hexadecimal value. * Example: `"0x0"` @@ -81,7 +79,7 @@ Request: "id": 1, "method": "eth_getTransactionByBlockNumberAndIndex", "params": [ - 47766249, + "0x316624", "0x0" ] } @@ -95,7 +93,7 @@ Response: "id": 1, "result": { "blockHash": "0x1091a5831b3556e80e53598c24e9d592e104dba0428f47f94c61523eb52d09d8", - "blockNumber": "0x316624", + "blockNumber": "0x42C1D80", "from": "0x37a53636ee68f59d9346aabcfc0d36011d9d5b35", "gas": "0x5b8d80", "gasPrice": "0x59682f0a", diff --git a/v1.0/RPC Nodes/rpc-evm/rpc-polygon/eth_gettransactionbyhash.md b/v1.0/RPC Nodes/rpc-evm/rpc-xinfin/eth_gettransactionbyhash.md similarity index 78% rename from v1.0/RPC Nodes/rpc-evm/rpc-polygon/eth_gettransactionbyhash.md rename to v1.0/RPC Nodes/rpc-evm/rpc-xinfin/eth_gettransactionbyhash.md index 7b622aa7..b58026c5 100644 --- a/v1.0/RPC Nodes/rpc-evm/rpc-polygon/eth_gettransactionbyhash.md +++ b/v1.0/RPC Nodes/rpc-evm/rpc-xinfin/eth_gettransactionbyhash.md @@ -1,13 +1,13 @@ --- title: "eth_gettransactionbyhash" -slug: "rpc-polygon-eth_gettransactionbyhash" -excerpt: "Polygon RPC" +slug: "rpc-xinfin-eth_gettransactionbyhash" +excerpt: "Xinfin RPC" category: 65c5e93c623cad004b45d505 hidden: false metadata: - description: "Polygon RPC" + description: "Xinfin RPC" image: [] - keywords: "polygon, rpc" + keywords: "xinfin, 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)" @@ -21,12 +21,12 @@ updatedAt: "Tue Apr 02 2024 08:40:59 GMT+0000 (Coordinated Universal Time)" {% code overflow="wrap" lineNumbers="true" %} ```typescript // yarn add @tatumio/tatum + +import { TatumSDK, XinFin, Network } from '@tatumio/tatum' + +const tatum = await TatumSDK.init({ network: Network.XINFIN }) -import { TatumSDK, Polygon, Network } from '@tatumio/tatum' - -const tatum = await TatumSDK.init({network: Network.POLYGON}) - -const tx = await tatum.rpc.getTransactionByHash('0x96d438a206d5cbb23e71b857af01371fcaf33406d2b76fe0eb41eb35a0fac84e') +const tx = await tatum.rpc.getTransactionByHash('0x501bc07b1e3346dabe68c6c0bee7fa52ea59c829396cd621cde0b61829321e58') await tatum.destroy() // Destroy Tatum SDK - needed for stopping background jobs ``` @@ -36,16 +36,14 @@ await tatum.destroy() // Destroy Tatum SDK - needed for stopping background jobs ### Overview -`eth_getTransactionByHash` is an Polygon 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 analysing historical transaction data. - -{% embed url="https://codepen.io/tatum-devrel/pen/eYQxbvd?editors=1111" %} +`eth_getTransactionByHash` is a 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: `"0x96d438a206d5cbb23e71b857af01371fcaf33406d2b76fe0eb41eb35a0fac84e"` + * Example: `"0xa536596d043c03d709aaccbc53f421963fe3537274e86444cd984404cf9ecb13"` ### Return Object @@ -73,7 +71,7 @@ Request: { "jsonrpc": "2.0", "method": "eth_getTransactionByHash", - "params": ["0x96d438a206d5cbb23e71b857af01371fcaf33406d2b76fe0eb41eb35a0fac84e"], + "params": ["0xa536596d043c03d709aaccbc53f421963fe3537274e86444cd984404cf9ecb13"], "id": 1 } ``` diff --git a/v1.0/RPC Nodes/rpc-evm/rpc-polygon/eth_gettransactioncount.md b/v1.0/RPC Nodes/rpc-evm/rpc-xinfin/eth_gettransactioncount.md similarity index 66% rename from v1.0/RPC Nodes/rpc-evm/rpc-polygon/eth_gettransactioncount.md rename to v1.0/RPC Nodes/rpc-evm/rpc-xinfin/eth_gettransactioncount.md index e8dad1ec..74a6b14c 100644 --- a/v1.0/RPC Nodes/rpc-evm/rpc-polygon/eth_gettransactioncount.md +++ b/v1.0/RPC Nodes/rpc-evm/rpc-xinfin/eth_gettransactioncount.md @@ -1,13 +1,13 @@ --- title: "eth_gettransactioncount" -slug: "rpc-polygon-eth_gettransactioncount" -excerpt: "Polygon RPC" +slug: "rpc-xinfin-eth_gettransactioncount" +excerpt: "Xinfin RPC" category: 65c5e93c623cad004b45d505 hidden: false metadata: - description: "Polygon RPC" + description: "Xinfin RPC" image: [] - keywords: "polygon, rpc" + keywords: "xinfin, 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, Polygon, Network } from '@tatumio/tatum' +import { TatumSDK, XinFin, Network } from '@tatumio/tatum' + +const tatum = await TatumSDK.init({ network: Network.XINFIN }) -const tatum = await TatumSDK.init({network: Network.POLYGON}) - -const result = await tatum.rpc.getTransactionCount('0xE7aFC41f0f99a305935857BA27bee99c4A29AC83', 'latest') +const result = await tatum.rpc.getTransactionCount('0x365a2dabcdb56f4f595c3af088b8975c26331448', 'latest') 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_getTransactionCount` method is a Polygon 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. +The `eth_getTransactionCount` method is an 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: @@ -44,14 +44,12 @@ Use cases for this method include: * Monitoring the number of transactions sent by an address to observe its activity * Troubleshooting transaction issues and verifying if a transaction was submitted successfully -{% embed url="https://codepen.io/tatum-devrel/pen/qBQgLMY" %} - ### Parameters The `eth_getTransactionCount` method accepts two parameters: -1. **`address`** - The Polygon address whose transaction count will be retrieved. - * Example: `"0xE7aFC41f0f99a305935857BA27bee99c4A29AC83"` +1. **`address`** - The address whose transaction count will be retrieved. + * Example: `"0x82487dF5b4cF19DB597A092c8103759466Be9e5a"` 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"` @@ -73,7 +71,7 @@ _Request_: "id": 1, "method": "eth_getTransactionCount", "params": [ - "0xE7aFC41f0f99a305935857BA27bee99c4A29AC83", + "0x742d35Cc6634C0532925a3b844Bc454e4438f44e", "latest" ] } diff --git a/v1.0/RPC Nodes/rpc-evm/rpc-polygon/eth_gettransactionreceipt.md b/v1.0/RPC Nodes/rpc-evm/rpc-xinfin/eth_gettransactionreceipt.md similarity index 76% rename from v1.0/RPC Nodes/rpc-evm/rpc-polygon/eth_gettransactionreceipt.md rename to v1.0/RPC Nodes/rpc-evm/rpc-xinfin/eth_gettransactionreceipt.md index ed15001b..0d088554 100644 --- a/v1.0/RPC Nodes/rpc-evm/rpc-polygon/eth_gettransactionreceipt.md +++ b/v1.0/RPC Nodes/rpc-evm/rpc-xinfin/eth_gettransactionreceipt.md @@ -1,13 +1,13 @@ --- title: "eth_gettransactionreceipt" -slug: "rpc-polygon-eth_gettransactionreceipt" -excerpt: "Polygon RPC" +slug: "rpc-xinfin-eth_gettransactionreceipt" +excerpt: "Xinfin RPC" category: 65c5e93c623cad004b45d505 hidden: false metadata: - description: "Polygon RPC" + description: "Xinfin RPC" image: [] - keywords: "polygon, rpc" + keywords: "xinfin, 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)" @@ -18,34 +18,29 @@ updatedAt: "Tue Apr 02 2024 08:40:59 GMT+0000 (Coordinated Universal Time)" {% tabs %} {% tab title="TypeScript/JavaScript" %} -{% code overflow="wrap" lineNumbers="true" %} -```typescript -// yarn add @tatumio/tatum +
// yarn add @tatumio/tatum
+  
+import { TatumSDK, XinFin, Network } from '@tatumio/tatum'
+  
+const tatum = await TatumSDK.init({ network: Network.XINFIN })
 
-import { TatumSDK, Polygon, Network } from '@tatumio/tatum'
+const tx = await tatum.rpc.getTransactionReceipt('0x501bc07b1e3346dabe68c6c0bee7fa52ea59c829396cd621cde0b61829321e58')
 
-const tatum = await TatumSDK.init({network: Network.POLYGON})
-
-const tx = await tatum.rpc.getTransactionReceipt('0x45d672978664c0daefd2f99a5868873c31316975ed1d52839c7f52883ac030f0')
-
-await tatum.destroy() // Destroy Tatum SDK - needed for stopping background jobs
-```
-{% endcode %}
+await tatum.destroy() // Destroy Tatum SDK - needed for stopping background jobs
+
{% endtab %} {% endtabs %} ### Overview -`eth_getTransactionReceipt` is an Polygon 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. - -{% embed url="https://codepen.io/tatum-devrel/pen/QWJYzvW" %} +`eth_getTransactionReceipt` is an 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: `"0x45d672978664c0daefd2f99a5868873c31316975ed1d52839c7f52883ac030f0"` + * Example: `"0xa536596d043c03d709aaccbc53f421963fe3537274e86444cd984404cf9ecb13"` ### Return Object @@ -74,7 +69,7 @@ Request: "id": 1, "method": "eth_getTransactionReceipt", "params": [ - "0x45d672978664c0daefd2f99a5868873c31316975ed1d52839c7f52883ac030f0" + "0xa536596d043c03d709aaccbc53f421963fe3537274e86444cd984404cf9ecb13" ] } ``` diff --git a/v1.0/RPC Nodes/rpc-evm/rpc-polygon/eth_getunclecountbyblockhash.md b/v1.0/RPC Nodes/rpc-evm/rpc-xinfin/eth_getunclecountbyblockhash.md similarity index 59% rename from v1.0/RPC Nodes/rpc-evm/rpc-polygon/eth_getunclecountbyblockhash.md rename to v1.0/RPC Nodes/rpc-evm/rpc-xinfin/eth_getunclecountbyblockhash.md index e887de5f..69e7778c 100644 --- a/v1.0/RPC Nodes/rpc-evm/rpc-polygon/eth_getunclecountbyblockhash.md +++ b/v1.0/RPC Nodes/rpc-evm/rpc-xinfin/eth_getunclecountbyblockhash.md @@ -1,13 +1,13 @@ --- title: "eth_getunclecountbyblockhash" -slug: "rpc-polygon-eth_getunclecountbyblockhash" -excerpt: "Polygon RPC" +slug: "rpc-xinfin-eth_getunclecountbyblockhash" +excerpt: "Xinfin RPC" category: 65c5e93c623cad004b45d505 hidden: false metadata: - description: "Polygon RPC" + description: "Xinfin RPC" image: [] - keywords: "polygon, rpc" + keywords: "xinfin, 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, Polygon, Network } from '@tatumio/tatum' +import { TatumSDK, XinFin, Network } from '@tatumio/tatum' + +const tatum = await TatumSDK.init({ network: Network.XINFIN }) -const tatum = await TatumSDK.init({network: Network.POLYGON}) - -const result = await tatum.rpc.getUncleCountByBlockHash('0x3a3e528dcd6e05a614c9241b0a9296db961fa6a92e05af9f6c0d7d2f6bc92f7a', 'latest') +const result = await tatum.rpc.getUncleCountByBlockHash('0x0003bd8d00000625538ae9cb302a2eea2f17e5b751b447257b94617d90f1e01c') await tatum.destroy() // Destroy Tatum SDK - needed for stopping background jobs ``` @@ -36,22 +36,20 @@ await tatum.destroy() // Destroy Tatum SDK - needed for stopping background jobs ### Overview -The `eth_getUncleCountByBlockHash` method is a Polygon 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 Polygon network and analyzing 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 decentralisation of the Polygon network. The inclusion of uncles helps prevent centralisation and ensures the mining process remains competitive. +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. -{% embed url="https://codepen.io/tatum-devrel/pen/jOQdXQq" %} +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: `"0x3a3e528dcd6e05a614c9241b0a9296db961fa6a92e05af9f6c0d7d2f6bc92f7a"` + * Example value: `"0x0003bd8d00000625538ae9cb302a2eea2f17e5b751b447257b94617d90f1e01c"` ### Return Object -The returned object for this method is a hex-encoded integer representing the number of uncles in the specified block. +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) @@ -67,7 +65,7 @@ Here is an example JSON-RPC request and response for the `eth_getUncleCountByBlo "jsonrpc": "2.0", "method": "eth_getUncleCountByBlockHash", "params": [ - "0x3a3e528dcd6e05a614c9241b0a9296db961fa6a92e05af9f6c0d7d2f6bc92f7a" + "0x0003bd8d00000625538ae9cb302a2eea2f17e5b751b447257b94617d90f1e01c" ] } ``` diff --git a/v1.0/RPC Nodes/rpc-evm/rpc-polygon/eth_getunclecountbyblocknumber.md b/v1.0/RPC Nodes/rpc-evm/rpc-xinfin/eth_getunclecountbyblocknumber.md similarity index 68% rename from v1.0/RPC Nodes/rpc-evm/rpc-polygon/eth_getunclecountbyblocknumber.md rename to v1.0/RPC Nodes/rpc-evm/rpc-xinfin/eth_getunclecountbyblocknumber.md index e2fd4191..80c439cb 100644 --- a/v1.0/RPC Nodes/rpc-evm/rpc-polygon/eth_getunclecountbyblocknumber.md +++ b/v1.0/RPC Nodes/rpc-evm/rpc-xinfin/eth_getunclecountbyblocknumber.md @@ -1,13 +1,13 @@ --- title: "eth_getunclecountbyblocknumber" -slug: "rpc-polygon-eth_getunclecountbyblocknumber" -excerpt: "Polygon RPC" +slug: "rpc-xinfin-eth_getunclecountbyblocknumber" +excerpt: "Xinfin RPC" category: 65c5e93c623cad004b45d505 hidden: false metadata: - description: "Polygon RPC" + description: "Xinfin RPC" image: [] - keywords: "polygon, rpc" + keywords: "xinfin, 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, Polygon, Network } from '@tatumio/tatum' +import { TatumSDK, XinFin, Network } from '@tatumio/tatum' + +const tatum = await TatumSDK.init({ network: Network.XINFIN }) -const tatum = await TatumSDK.init({network: Network.POLYGON}) - -const result = await tatum.rpc.getUncleCountByBlockNumber(10123321) +const result = await tatum.rpc.getUncleCountByBlockNumber('0x42C1D80') await tatum.destroy() // Destroy Tatum SDK - needed for stopping background jobs ``` @@ -36,18 +36,16 @@ await tatum.destroy() // Destroy Tatum SDK - needed for stopping background jobs ### Overview -The `eth_getUncleCountByBlockHash` method is a Polygon 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 Polygon 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 decentralisation of the Polygon network. The inclusion of uncles helps prevent centralisation and ensures the mining process remains competitive. +The `eth_getUncleCountByBlockHash` method is a 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. -{% embed url="https://codepen.io/tatum-devrel/pen/wvQNRRv" %} +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: `"0x12345"` + * Example value: `"0x42C1D80"` ### Return Object diff --git a/v1.0/RPC Nodes/rpc-evm/rpc-polygon/eth_maxpriorityfeepergas.md b/v1.0/RPC Nodes/rpc-evm/rpc-xinfin/eth_maxpriorityfeepergas.md similarity index 84% rename from v1.0/RPC Nodes/rpc-evm/rpc-polygon/eth_maxpriorityfeepergas.md rename to v1.0/RPC Nodes/rpc-evm/rpc-xinfin/eth_maxpriorityfeepergas.md index 04de89bc..83230c52 100644 --- a/v1.0/RPC Nodes/rpc-evm/rpc-polygon/eth_maxpriorityfeepergas.md +++ b/v1.0/RPC Nodes/rpc-evm/rpc-xinfin/eth_maxpriorityfeepergas.md @@ -1,13 +1,13 @@ --- title: "eth_maxpriorityfeepergas" -slug: "rpc-polygon-eth_maxpriorityfeepergas" -excerpt: "Polygon RPC" +slug: "rpc-xinfin-eth_maxpriorityfeepergas" +excerpt: "Xinfin RPC" category: 65c5e93c623cad004b45d505 hidden: false metadata: - description: "Polygon RPC" + description: "Xinfin RPC" image: [] - keywords: "polygon, rpc" + keywords: "xinfin, 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, Polygon, Network } from '@tatumio/tatum' - -const tatum = await TatumSDK.init({network: Network.POLYGON}) +import { TatumSDK, XinFin, Network } from '@tatumio/tatum' + +const tatum = await TatumSDK.init({ network: Network.XINFIN }) const gasPrice = await tatum.rpc.maxPriorityFeePerGas() -await tatum.destroy() // Destroy Tatum SDK - needed for stopping background jobs +await tatum.destroy() // Destroy Tatum SDK - needed for stopping background ``` {% endcode %} {% endtab %} @@ -42,8 +42,6 @@ The `eth_maxPriorityFeePerGas` RPC method is used to retrieve the maximum priori This method is particularly useful when the user wants to ensure that a transaction is processed quickly, even in a congested network where transaction fees may fluctuate rapidly. By setting a high maximum priority fee per gas, the user can ensure that the transaction is processed as quickly as possible. -{% embed url="https://codepen.io/tatum-devrel/pen/jOQddOV" %} - ### Parameters `None.` diff --git a/v1.0/RPC Nodes/rpc-evm/rpc-polygon/eth_sendrawtransaction.md b/v1.0/RPC Nodes/rpc-evm/rpc-xinfin/eth_sendrawtransaction.md similarity index 68% rename from v1.0/RPC Nodes/rpc-evm/rpc-polygon/eth_sendrawtransaction.md rename to v1.0/RPC Nodes/rpc-evm/rpc-xinfin/eth_sendrawtransaction.md index 31089236..c8140b03 100644 --- a/v1.0/RPC Nodes/rpc-evm/rpc-polygon/eth_sendrawtransaction.md +++ b/v1.0/RPC Nodes/rpc-evm/rpc-xinfin/eth_sendrawtransaction.md @@ -1,13 +1,13 @@ --- title: "eth_sendrawtransaction" -slug: "rpc-polygon-eth_sendrawtransaction" -excerpt: "Polygon RPC" +slug: "rpc-xinfin-eth_sendrawtransaction" +excerpt: "Xinfin RPC" category: 65c5e93c623cad004b45d505 hidden: false metadata: - description: "Polygon RPC" + description: "Xinfin RPC" image: [] - keywords: "polygon, rpc" + keywords: "xinfin, 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, Polygon, Network } from '@tatumio/tatum' - -const tatum = await TatumSDK.init({network: Network.POLYGON}) +import { TatumSDK, XinFin, Network } from '@tatumio/tatum' + +const tatum = await TatumSDK.init({ network: Network.XINFIN }) const gasPrice = await tatum.rpc.sendRawTransaction('0x0000.......') @@ -36,11 +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 Polygon 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 Ether, interacting with smart contracts, or deploying new contracts. - -{% embed url="https://codepen.io/tatum-devrel/pen/OJaddPP" %} -Try this function -{% endembed %} +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 Ether, interacting with smart contracts, or deploying new contracts. ### Parameters @@ -54,7 +50,7 @@ The method returns a single value: * `transactionHash`: The hash of the submitted transaction as a hexadecimal string, e.g., `"0x9fc76417374aa880d4449a1f7f31ec597f00b1f6f3dd2d66f4c9c6c445836d8b"`. -### JSON-RPC Request Example +### -RPC Request Example ```json { diff --git a/v1.0/RPC Nodes/rpc-evm/rpc-polygon/txpool_content.md b/v1.0/RPC Nodes/rpc-evm/rpc-xinfin/txpool_content.md similarity index 90% rename from v1.0/RPC Nodes/rpc-evm/rpc-polygon/txpool_content.md rename to v1.0/RPC Nodes/rpc-evm/rpc-xinfin/txpool_content.md index 97d60a87..44cc3ab2 100644 --- a/v1.0/RPC Nodes/rpc-evm/rpc-polygon/txpool_content.md +++ b/v1.0/RPC Nodes/rpc-evm/rpc-xinfin/txpool_content.md @@ -1,13 +1,13 @@ --- title: "txpool_content" -slug: "rpc-polygon-txpool_content" -excerpt: "Polygon RPC" +slug: "rpc-xinfin-txpool_content" +excerpt: "Xinfin RPC" category: 65c5e93c623cad004b45d505 hidden: false metadata: - description: "Polygon RPC" + description: "Xinfin RPC" image: [] - keywords: "polygon, rpc" + keywords: "xinfin, 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, Polygon, Network } from '@tatumio/tatum' - -const tatum = await TatumSDK.init({network: Network.POLYGON}) +import { TatumSDK, XinFin, Network } from '@tatumio/tatum' + +const tatum = await TatumSDK.init({ network: Network.XINFIN }) const content = await tatum.rpc.txPoolContent() @@ -36,7 +36,7 @@ await tatum.destroy() // Destroy Tatum SDK - needed for stopping background jobs ### Overview -The `txpool_content` method provides information about the transactions currently pending in the transaction pool of the Polygon 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. +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: @@ -45,8 +45,6 @@ Use cases for the `txpool_content` method include: * Monitoring transactions from specific addresses * Debugging and troubleshooting pending transactions -{% embed url="https://codepen.io/tatum-devrel/pen/xxQMmMW?editors=1010" %} - ### Parameters This method does not require any parameters. diff --git a/v1.0/RPC Nodes/rpc-evm/rpc-polygon/txpool_inspect.md b/v1.0/RPC Nodes/rpc-evm/rpc-xinfin/txpool_inspect.md similarity index 76% rename from v1.0/RPC Nodes/rpc-evm/rpc-polygon/txpool_inspect.md rename to v1.0/RPC Nodes/rpc-evm/rpc-xinfin/txpool_inspect.md index 34f4ff12..f6edf969 100644 --- a/v1.0/RPC Nodes/rpc-evm/rpc-polygon/txpool_inspect.md +++ b/v1.0/RPC Nodes/rpc-evm/rpc-xinfin/txpool_inspect.md @@ -1,13 +1,13 @@ --- title: "txpool_inspect" -slug: "rpc-polygon-txpool_inspect" -excerpt: "Polygon RPC" +slug: "rpc-xinfin-txpool_inspect" +excerpt: "Xinfin RPC" category: 65c5e93c623cad004b45d505 hidden: false metadata: - description: "Polygon RPC" + description: "Xinfin RPC" image: [] - keywords: "polygon, rpc" + keywords: "xinfin, 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, Polygon, Network } from '@tatumio/tatum' - -const tatum = await TatumSDK.init({network: Network.POLYGON}) +import { TatumSDK, XinFin, Network } from '@tatumio/tatum' + +const tatum = await TatumSDK.init({ network: Network.XINFIN }) const inspect = await tatum.rpc.txPoolInspect() @@ -36,9 +36,7 @@ await tatum.destroy() // Destroy Tatum SDK - needed for stopping background jobs ### Overview -The `txpool_inspect` method is a JSON-RPC method used to inspect the current transaction pool of a running Polygon 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. - -{% embed url="https://codepen.io/tatum-devrel/pen/XWyOoQz" %} +The `txpool_inspect` method is 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 @@ -46,8 +44,6 @@ 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: diff --git a/v1.0/RPC Nodes/rpc-evm/rpc-polygon/txpool_status.md b/v1.0/RPC Nodes/rpc-evm/rpc-xinfin/txpool_status.md similarity index 73% rename from v1.0/RPC Nodes/rpc-evm/rpc-polygon/txpool_status.md rename to v1.0/RPC Nodes/rpc-evm/rpc-xinfin/txpool_status.md index 39b1aa0c..c5f91616 100644 --- a/v1.0/RPC Nodes/rpc-evm/rpc-polygon/txpool_status.md +++ b/v1.0/RPC Nodes/rpc-evm/rpc-xinfin/txpool_status.md @@ -1,13 +1,13 @@ --- title: "txpool_status" -slug: "rpc-polygon-txpool_status" -excerpt: "Polygon RPC" +slug: "rpc-xinfin-txpool_status" +excerpt: "Xinfin RPC" category: 65c5e93c623cad004b45d505 hidden: false metadata: - description: "Polygon RPC" + description: "Xinfin RPC" image: [] - keywords: "polygon, rpc" + keywords: "xinfin, 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, Polygon, Network } from '@tatumio/tatum' - -const tatum = await TatumSDK.init({network: Network.POLYGON}) +import { TatumSDK, XinFin, Network } from '@tatumio/tatum' + +const tatum = await TatumSDK.init({ network: Network.XINFIN }) const status = await tatum.rpc.txPoolStatus() @@ -38,9 +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 Polygon network and analysing 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. - -{% embed url="https://codepen.io/tatum-devrel/pen/bGQzOyV" %} +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. ### Parameters diff --git a/v1.0/RPC Nodes/rpc-evm/rpc-polygon/web3_clientversion.md b/v1.0/RPC Nodes/rpc-evm/rpc-xinfin/web3_clientversion.md similarity index 58% rename from v1.0/RPC Nodes/rpc-evm/rpc-polygon/web3_clientversion.md rename to v1.0/RPC Nodes/rpc-evm/rpc-xinfin/web3_clientversion.md index d0e349c0..25b0feb7 100644 --- a/v1.0/RPC Nodes/rpc-evm/rpc-polygon/web3_clientversion.md +++ b/v1.0/RPC Nodes/rpc-evm/rpc-xinfin/web3_clientversion.md @@ -1,13 +1,13 @@ --- title: "web3_clientversion" -slug: "rpc-polygon-web3_clientversion" -excerpt: "Polygon RPC" +slug: "rpc-xinfin-web3_clientversion" +excerpt: "Xinfin RPC" category: 65c5e93c623cad004b45d505 hidden: false metadata: - description: "Polygon RPC" + description: "Xinfin RPC" image: [] - keywords: "polygon, rpc" + keywords: "xinfin, 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, Polygon, Network } from '@tatumio/tatum' - -const tatum = await TatumSDK.init({network: Network.POLYGON}) +import { TatumSDK, XinFin, Network } from '@tatumio/tatum' + +const tatum = await TatumSDK.init({ network: Network.XINFIN }) const version = await tatum.rpc.clientVersion() @@ -36,21 +36,19 @@ await tatum.destroy() // Destroy Tatum SDK - needed for stopping background jobs ### Overview -`web3_clientVersion` is a method of the Polygon JSON-RPC API that allows the client to retrieve the current version of the Polygon 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 Polygon client software they are using and ensure that it is compatible with their application. +`web3_clientVersion` is a method that allows the client to retrieve the current version of the client software being used by the node. -{% embed url="https://codepen.io/tatum-devrel/pen/poQGqGN" %} +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. ### Parameters -This method has no parameters. It only retrieves the current version of the Polygon client software. +This method has no parameters. It only retrieves the current version of the client software. ### Return Object -The `web3_clientVersion` method returns a string representing the version of the Polygon 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 client software being used. The string includes the client name, version number, and build information. -* `String` - Version string of the Polygon client software being used. +* `String` - Version string of the client software being used. ### Example Request @@ -61,7 +59,7 @@ The `web3_clientVersion` method returns a string representing the version of the "jsonrpc": "2.0", "method": "web3_clientVersion", "params": [], - "id": 67 + "id": 1 } ``` @@ -72,9 +70,7 @@ The `web3_clientVersion` method returns a string representing the version of the ```json { "jsonrpc": "2.0", - "id": 67, + "id": 1, "result": "Geth/v1.10.3-stable-c2d2f1a3/linux-amd64/go1.16.4" } ``` - -In the above example, the Polygon client software being used is Geth, version 1.10.3, with build information `stable-c2d2f1a3/linux-amd64/go1.16.4`. The `result` field contains the version string.