diff --git a/v1.0/RPC Nodes/rpc-evm/rpc-chiliz/debug_getbadblocks.md b/v1.0/RPC Nodes/rpc-evm/rpc-chiliz/debug_getbadblocks.md deleted file mode 100644 index 010549f7..00000000 --- a/v1.0/RPC Nodes/rpc-evm/rpc-chiliz/debug_getbadblocks.md +++ /dev/null @@ -1,116 +0,0 @@ ---- -title: "debug_getbadblocks" -slug: "rpc-chiliz-debug_getbadblocks" -excerpt: "Chiliz RPC" -category: 65c5e93c623cad004b45d505 -hidden: false -metadata: - description: "Chiliz RPC" - image: [] - keywords: "chiliz, 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, Chiliz, Network } from '@tatumio/tatum' - -const tatum = await TatumSDK.init({network: Network.CHILIZ}) - -const result = await tatum.rpc.debugGetBadBlocks() - -await tatum.destroy() // Destroy Tatum SDK - needed for stopping background jobs -``` -{% endcode %} -{% endtab %} -{% endtabs %} - -### Overview - -`debug_getBadBlocks` is an RPC method that provides a list of the most recent bad blocks encountered by the client on the network. This feature is valuable for developers and node operators, as it enables them to identify and address any issues or anomalies related to block validation and synchronization. - -By accessing `debug_getBadBlocks`, they can diagnose potential problems and take appropriate actions to ensure the network's stability and integrity. - -### Parameters - -* This method does not accept any parameters. - -### Return Object - -The output is an array of objects, with each object representing the trace result of a transaction within the block. These objects include essential details such as the transaction hash and a block object, which can be null if no block was found for the transaction: - -* `baseFeePerGas`: The integer representation of the difficulty for this block encoded as hexadecimal. -* `difficulty`: The integer representation of the difficulty for this block encoded as hexadecimal. -* `extraData`: The extra data field of this block. -* `gasLimit`: The maximum gas allowed in this block encoded as hexadecimal. -* `gasUsed`: The total used gas by all transactions in this block encoded as hexadecimal. -* `logsBloom`: The bloom filter for the logs of the block. Null if pending. -* `miner`: The address of the beneficiary to whom the mining rewards were given. -* `mixHash`: A 256-bit hash encoded as hexadecimal. -* `nonce`: The hash of the generated proof-of-work. Null if pending. -* `number`: The block number of the requested block encoded as hexadecimal. Null if pending. -* `parentHash`: The hash of the parent block. -* `receiptsRoot`: The root of the receipts trie of the block. -* `sha3Uncles`: The SHA3 of the uncles' data in the block. -* `size`: The size of this block in bytes as an Integer value encoded as hexadecimal. -* `stateRoot`: The root of the final state trie of the block. -* `timestamp`: The Unix timestamp for when the block was collated. -* `transactions`: An array of transaction objects with the following fields: - * `blockHash`: The hash of the block where this log was in. Null when it's a pending log. - * `blockNumber`: The block number where this log was in. Null when it's a pending log. - * `from`: The address of the sender. - * `gas`: The gas provided by the sender, encoded as hexadecimal. - * `gasPrice`: The gas price provided by the sender in wei, encoded as hexadecimal. - * `maxFeePerGas`: The maximum fee per gas set in the transaction. - * `maxPriorityFeePerGas`: The maximum priority gas fee set in the transaction. - * `hash`: The hash of the transaction. - * `input`: The data sent along with the transaction. - * `nonce`: The number of transactions made by the sender before this one encoded as hexadecimal. - * `to`: The address of the receiver. Null when it's a contract creation transaction. - * `transactionIndex`: The integer of the transaction's index position that the log was created from. Null when it's a pending log. - * `value`: The value transferred in wei encoded as hexadecimal. - * `type`: The transaction type. - * `accessList`: A list of addresses and storage keys that the transaction plans to access. - * `chainId`: The chain id of the transaction, if any. - * `v`: The standardized V field of the signature. - * `r`: The R field of the signature. - * `s`: The S field of the signature. -* `transactionsRoot`: The root of the transaction trie of the block. -* `uncles`: An array of uncle hashes. -* `rlp`: The RLP encoded header. - -{% hint style="info" %} -This method is available only on the full archive node. -{% endhint %} - -### JSON-RPC Request and Response Examples - -#### Request - -```json -{ - "id": 1, - "jsonrpc": "2.0", - "method": "debug_getBadBlocks", - "params": [] -} -``` - -#### Response - -```json -{ - "jsonrpc": "2.0", - "id": 1, - "result": [] -} -``` diff --git a/v1.0/RPC Nodes/rpc-evm/rpc-chiliz/debug_storagerangeat.md b/v1.0/RPC Nodes/rpc-evm/rpc-chiliz/debug_storagerangeat.md deleted file mode 100644 index dad6ce9a..00000000 --- a/v1.0/RPC Nodes/rpc-evm/rpc-chiliz/debug_storagerangeat.md +++ /dev/null @@ -1,97 +0,0 @@ ---- -title: "debug_storagerangeat" -slug: "rpc-chiliz-debug_storagerangeat" -excerpt: "Chiliz RPC" -category: 65c5e93c623cad004b45d505 -hidden: false -metadata: - description: "Chiliz RPC" - image: [] - keywords: "chiliz, 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, Chiliz, Network } from '@tatumio/tatum' - -const tatum = await TatumSDK.init({network: Network.CHILIZ}) - -const result = await tatum.rpc.debugStorageRangeAt( -'0x48dfcf43404dffdb3b93a0b0d9982b642b221187bc3ed5c023bdab6c0e863e3d', -1, '0xa41d19F4258a388c639B7CcD938FCE3fb7D05e86', '0x0000000000000000000000000000000000000000000000000000000000000000', 1 -) - -await tatum.destroy() // Destroy Tatum SDK - needed for stopping background jobs -``` -{% endcode %} -{% endtab %} -{% endtabs %} - -### Overview - -`debug_storageRangeAt` is an RPC method that allows you to retrieve the contract storage range for a given block and address. This can be useful for developers and auditors who want to inspect the storage state of a specific contract at a particular point in time. This method can also help in debugging and identifying potential issues with contract storage, as well as understanding how storage evolves as transactions are executed. - -### Parameters - -The `debug_storageRangeAt` method accepts the following parameters: - -* `blockHash`: The block hash for which the storage range should be retrieved. Example: `"0x3c4523b7e8c21e3d68f1c3af3d18e8a87c0d43e35b2c1b7f8f4e87e4d4db9c82"` -* `txIndex`: The transaction index within the specified block. Example: `1` -* `address`: The contract address for which the storage range should be retrieved. Example: `"0x742d35Cc6634C0532925a3b844Bc454e4438f44e"` -* `begin`: The beginning of the storage range. Example: `"0x0000000000000000000000000000000000000000000000000000000000000000"` -* `end`: The end of the storage range. Example: `1` (inclusive) - -### Return Object - -The `debug_storageRangeAt` method returns an object with the following fields: - -* `storage`: An object that contains key-value pairs representing the contract storage, where the key is the storage slot and the value is the stored data. Example: `"0x00..01": "0x00..01"` -* `nextKey`: A key indicating the next storage slot if the requested range is too large, otherwise `null`. Example: `"0x00..02"` or `null` - -{% hint style="info" %} -This method is available only on the full archive node. -{% endhint %} - -### JSON-RPC Request and Response Examples - -#### Request - -```json -{ - "jsonrpc": "2.0", - "id": 1, - "method": "debug_storageRangeAt", - "params": [ - "0x3c4523b7e8c21e3d68f1c3af3d18e8a87c0d43e35b2c1b7f8f4e87e4d4db9c82", - "0x1", - "0x742d35Cc6634C0532925a3b844Bc454e4438f44e", - "0x0000000000000000000000000000000000000000000000000000000000000000", 1 - ] -} -``` - -#### Response - -```json -{ - "jsonrpc": "2.0", - "id": 1, - "result": { - "storage": { - "0x0000000000000000000000000000000000000000000000000000000000000001": "0x0000000000000000000000000000000000000000000000000000000000000001", - "0x0000000000000000000000000000000000000000000000000000000000000002": "0x0000000000000000000000000000000000000000000000000000000000000002" - }, - "nextKey": "0x0000000000000000000000000000000000000000000000000000000000000065" - } -} -``` diff --git a/v1.0/RPC Nodes/rpc-evm/rpc-chiliz/debug_traceblock.md b/v1.0/RPC Nodes/rpc-evm/rpc-chiliz/debug_traceblock.md deleted file mode 100644 index 26eab7cd..00000000 --- a/v1.0/RPC Nodes/rpc-evm/rpc-chiliz/debug_traceblock.md +++ /dev/null @@ -1,119 +0,0 @@ ---- -title: "debug_traceblock" -slug: "rpc-chiliz-debug_traceblock" -excerpt: "Chiliz RPC" -category: 65c5e93c623cad004b45d505 -hidden: false -metadata: - description: "Chiliz RPC" - image: [] - keywords: "chiliz, 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, Chiliz, Network } from '@tatumio/tatum' - -const tatum = await TatumSDK.init({network: Network.CHILIZ}) - -const result = await tatum.rpc.debugTraceBlock('0x65B9AB' ,{ - 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-chiliz/debug_tracecall.md b/v1.0/RPC Nodes/rpc-evm/rpc-chiliz/debug_tracecall.md deleted file mode 100644 index af31935a..00000000 --- a/v1.0/RPC Nodes/rpc-evm/rpc-chiliz/debug_tracecall.md +++ /dev/null @@ -1,134 +0,0 @@ ---- -title: "debug_tracecall" -slug: "rpc-chiliz-debug_tracecall" -excerpt: "Chiliz RPC" -category: 65c5e93c623cad004b45d505 -hidden: false -metadata: - description: "Chiliz RPC" - image: [] - keywords: "chiliz, 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, Chiliz, Network } from '@tatumio/tatum' - -const tatum = await TatumSDK.init({network: Network.CHILIZ}) - -const result = await tatum.rpc.debugTraceCall({ - from: "0x99ab95d1ecc41f78ebe42c4452fb086371bf95c5" -}, -'0x65B9AB', -{ -tracer: 'callTracer', -tracerConfig: { - onlyTopCall: true, - timeout: '5s', -} -} -) - -await tatum.destroy() // Destroy Tatum SDK - needed for stopping background jobs -``` -{% endcode %} -{% endtab %} -{% endtabs %} - -### Overview - -`debug_traceCall` is an RPC method that allows you to execute a given call (message), tracing the steps of its execution. This can be helpful for developers and auditors who want to inspect and analyze the internal operations and state changes of a contract call without modifying the blockchain state. This method can assist in debugging and identifying potential issues with contract execution, as well as understanding how gas is consumed during the execution of a call. - -### Parameters - -The `debug_traceCall` method accepts the following parameters: - -* `transaction`: An object that contains the following fields: - * `from`: The address from which the call is initiated. Example: `"0xa7d9ddbe1f17865597fbd27ec712455208b6b76d"` - * `to`: The address of the contract to be called. Example: `"0x742d35Cc6634C0532925a3b844Bc454e4438f44e"` - * `gas`: (Optional) The gas limit for the call. Example: `"0x76c0"` - * `gasPrice`: (Optional) The gas price for the call. Example: `"0x9184e72a000"` - * `value`: (Optional) The value to be transferred during the call. Example: `"0x9184e72a"` - * `data`: (Optional) The input data for the call, encoded as a hexadecimal string. Example: `"0x606060..."` -* `blockNumber`: The block number as a hexadecimal string for which the call should be traced. Example: `"0x1b4"` - -### Return Object - -The return object is an object containing the following fields: - -* `output`: The output data from the call. -* `gasUsed`: The total gas used by the call. -* `calls`: An array of objects, each representing a nested call made during the call. Each object contains: - * `from`: The address the call was made from. - * `gas`: The gas provided for the call. - * `gasUsed`: The gas used by the call. - * `to`: The address the call was made to. - * `input`: The input data for the call. - * `output`: The output data from the call. - * `type`: The type of the call (e.g., "STATICCALL"). - -{% hint style="info" %} -This method is available only on the full archive node. -{% endhint %} - -### JSON-RPC Request and Response Examples - -#### Request - -
{
-  "jsonrpc": "2.0",
-  "id": 1,
-  "method": "debug_traceCall",
-  "params": [
-    {
-      "from": "0xa7d9ddbe1f17865597fbd27ec712455208b6b76d",
-      "to": "0x742d35Cc6634C0532925a3b844Bc454e4438f44e",
-      "gas": "0x76c0",
-      "gasPrice": "0x9184e72a000",
-      "value": "0x9184e72a",
-      "data": "0x606060..."
-    },
-    "0x1b4"
-  ]
-}
-
- -#### Response - -```json -{ - "jsonrpc": "2.0", - "id": 2, - "result": { - "from": "0x0a6d033f6628ef715732d61e059187b7330305ff", - "gas": "0x51fba", - "gasUsed": "0x41711", - "to": "0x19e870855cb8fd8f6689743d3c28311c0d62a24c", - "input": "0xcba9bc66000000000000000000000000f62ef040fb5ea7d0828ff50bced9a7720f1387c7000000000000000000000000325e343f1de602396e256b67efd1f61c3a6b38bd00000000000000000000000000000000000000000000000000000000000000e00000000000000000000000000000000000000000000000000000000000000160000000000000000000000000000000000000000000000001158e460913d000000000000000000000000000000000000000000000000000000100a08761e1547f0000000000000000000000000a6d033f6628ef715732d61e059187b7330305ff000000000000000000000000000000000000000000000000000000000000000300000000000000000000000055d398326f99059ff775485246999027b319795500000000000000000000000053e562b9b7e5e94b81f10e96ee70ad06df3d265700000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000", - "output": "0x0000000000000000000000000000000000000000000000000102b1eda6a2682d", - "calls": [ - { - "from": "0x19e870855cb8fd8f6689743d3c28311c0d62a24c", - "gas": "0x4f638", - "gasUsed": "0x4cf", - "to": "0x55d398326f99059ff775485246999027b3197955", - "input": "0x70a082310000000000000000000000000a6d033f6628ef715732d61e059187b7330305ff", - "output": "0x00000000000000000000000000000000000000000000002ca114a674b092dd94", - "type": "STATICCALL" - } - ], - "value": "0x0", - "type": "CALL" - } -} -``` diff --git a/v1.0/RPC Nodes/rpc-evm/rpc-chiliz/eth_getblocktransactioncountbyhash.md b/v1.0/RPC Nodes/rpc-evm/rpc-chiliz/eth_getblocktransactioncountbyhash.md deleted file mode 100644 index 65cd58a1..00000000 --- a/v1.0/RPC Nodes/rpc-evm/rpc-chiliz/eth_getblocktransactioncountbyhash.md +++ /dev/null @@ -1,82 +0,0 @@ ---- -title: "eth_getblocktransactioncountbyhash" -slug: "rpc-chiliz-eth_getblocktransactioncountbyhash" -excerpt: "Chiliz RPC" -category: 65c5e93c623cad004b45d505 -hidden: false -metadata: - description: "Chiliz RPC" - image: [] - keywords: "chiliz, 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, Chiliz, Network } from '@tatumio/tatum' - -const tatum = await TatumSDK.init({network: Network.CHILIZ}) - -const response = await tatum.rpc.getBlockTransactionCountByHash('0xdea4839f6bce4f97d9b92b68b054b8c637b20fdbc2b1deaace450b961946eb02') - -await tatum.destroy() // Destroy Tatum SDK - needed for stopping background jobs -``` -{% endcode %} -{% endtab %} -{% endtabs %} - -### Overview - -`eth_getBlockTransactionCountByHash` is a RPC method used to fetch the number of transactions in a block by the block's hash. It is useful when you want to know the total number of transactions included in a specific block and don't want to retrieve the entire block data. This method can be used in various scenarios, such as monitoring the network activity or estimating transaction confirmation times. - -### Parameters - -This method requires a single parameter: - -* **`blockHash`**: The hash of the target block for which the transaction count will be retrieved. It should be a valid 32-byte hex string. - -Example of the parameter: - -* `blockHash`: `"0xb0ddfcdcc375afce9f365458c5035ca4aaf99f9fe8699522193e16a8718615b6"` - -### Return - -The method returns a single value: - -* `transactionCount`: The total number of transactions included in the specified block. It is returned as a hexadecimal value. - -### Examples - -#### JSON-RPC request - -```json -{ - "id": 1, - "jsonrpc": "2.0", - "method": "eth_getBlockTransactionCountByHash", - "params": [ - "0xb0ddfcdcc375afce9f365458c5035ca4aaf99f9fe8699522193e16a8718615b6" - ] -} -``` - -#### JSON-RPC response - -```json -{ - "id": 1, - "jsonrpc": "2.0", - "result": "0xa" -} -``` - -In this example, the block with the hash `"0xb903239f8543d04b5dc1ba6579132b143087c68db1b2168786408fcbce568238"` has a total of 10 transactions (indicated by the hexadecimal value `"0xa"`). diff --git a/v1.0/RPC Nodes/rpc-evm/rpc-chiliz/eth_gettransactionbyblockhashandindex.md b/v1.0/RPC Nodes/rpc-evm/rpc-chiliz/eth_gettransactionbyblockhashandindex.md deleted file mode 100644 index 512e6830..00000000 --- a/v1.0/RPC Nodes/rpc-evm/rpc-chiliz/eth_gettransactionbyblockhashandindex.md +++ /dev/null @@ -1,116 +0,0 @@ ---- -title: "eth_gettransactionbyblockhashandindex" -slug: "rpc-chiliz-eth_gettransactionbyblockhashandindex" -excerpt: "Chiliz RPC" -category: 65c5e93c623cad004b45d505 -hidden: false -metadata: - description: "Chiliz RPC" - image: [] - keywords: "chiliz, 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, Chiliz, Network } from '@tatumio/tatum' - -const tatum = await TatumSDK.init({network: Network.CHILIZ}) - -const tx = await tatum.rpc.getTransactionByBlockHashAndIndex('0xdea4839f6bce4f97d9b92b68b054b8c637b20fdbc2b1deaace450b961946eb02', 0) - -await tatum.destroy() // Destroy Tatum SDK - needed for stopping background jobs -``` -{% endcode %} -{% endtab %} -{% endtabs %} - -### Overview - -`eth_getTransactionByBlockHashAndIndex` is an JSON-RPC method that allows you to fetch the transaction details based on the block hash and the index of the transaction within that block. This method can be useful when you want to retrieve transaction details for a specific transaction without knowing its transaction hash. - -Use cases for this method may include: - -* Inspecting transaction details for debugging purposes -* Gathering data for transaction analysis -* Fetching transaction information for specific blocks in a block explorer application - -### Parameters - -The `eth_getTransactionByBlockHashAndIndex` method accepts two parameters: - -1. `blockHash` (required): The hash of the block containing the transaction. - * Example: `"0xb0ddfcdcc375afce9f365458c5035ca4aaf99f9fe8699522193e16a8718615b6"` -2. `transactionIndex` (required): The index of the transaction within the specified block. The index is a hexadecimal value. - * Example: `"0x0"` - -### Return Object - -The method returns a JSON object containing the following fields: - -1. `hash`: The transaction hash as a 32-byte hex string. -2. `nonce`: The number of transactions made by the sender prior to this one. -3. `blockHash`: The hash of the block in which this transaction is included. -4. `blockNumber`: The block number in which this transaction is included. -5. `transactionIndex`: The index of the transaction within the block. -6. `from`: The address of the sender. -7. `to`: The address of the recipient. `null` if the transaction is a contract creation transaction. -8. `value`: The value transferred in wei. -9. `gasPrice`: The gas price provided by the sender in wei. -10. `gas`: The gas limit provided by the sender. -11. `input`: The data sent along with the transaction. - -### JSON Examples - -Request: - -```json -{ - "jsonrpc": "2.0", - "id": 1, - "method": "eth_getTransactionByBlockHashAndIndex", - "params": [ - "0xb0ddfcdcc375afce9f365458c5035ca4aaf99f9fe8699522193e16a8718615b6", - "0x0" - ] -} -``` - -Response: - -```json -{ - "jsonrpc": "2.0", - "id": 1, - "result": { - "blockHash": "0x1091a5831b3556e80e53598c24e9d592e104dba0428f47f94c61523eb52d09d8", - "blockNumber": "0x316624", - "from": "0x37a53636ee68f59d9346aabcfc0d36011d9d5b35", - "gas": "0x5b8d80", - "gasPrice": "0x59682f0a", - "maxFeePerGas": "0x59682f10", - "maxPriorityFeePerGas": "0x59682f00", - "hash": "0x40a0f78e346d15b05efa1861149e5999ea48197dcf104d69160d45b08b7a5118", - "input": "0xb1dc65a4000129d4314ec8c4bafb6468cc9d3c21de025fa54002558c9f76aec833406ab600000000000000000000000000000000000000000000000000000000001ccc01f18333a24416e0a0be9cdb78505c9c3c27fa42bccdbe6456cd6c1fc81bee7c0e00000000000000000000000000000000000000000000000000000000000000e0000000000000000000000000000000000000000000000000000000000000022000000000000000000000000000000000000000000000000000000000000003a001000000010100010100010000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000120000000000000000000000000000000000000000000000000000000000000002000000000000000000000000000000000000000000000000000000000000000800000000000000000000000000000000000000000000000000000000000003d150000000000000000000000000000000000000000000000000000000000003d17325325668a08b50a9587fd4605ce02dbc5ccefc4883a41b485ff4dc4a4f86f1e0000000000000000000000000000000000000000000000000000000000000060000000000000000000000000000000000000000000000000000000000000a8690000000000000000000000000000000000000000000000000000009d29229e000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000ba6547e7b549a1f180c5ad4f2e2e7104fecb8373482f3de6574ecbeefdc9be9dfd9f1934768a23584f1508adad8a7bbfbe445a27bed9f1d4538d4e4c9e458b0c5274b6f714f5aee9a8d56aeb8957b6da6b8914e445a46dcd349737b2eb7d72132e41926d07355de577b13e6ec8e55eaaf628b333197a8d1292bed1c375e891e1da1d519aabbebcc6d299b575b7bef506e2db9493de6f0cfdb0436a81597eb155edc63a8ea655a9b405a0c41c923b1734d78b5d9812f36a602ace3d8c5b22beb9519e406f32de9768e518f2b253a95364a9a2838ba5023c52d503fe8fa811c8803399679a19513671b13d4040e46be74e152d39be4f68bfecaa57d27965ba724a09464734faf7230b19e04f4aa581f10066884e2f402af36f0cdbf08de95e190f4f31fd3b718c1317b65fba9e7ea45ef6180e4861839c6395c814214ee8d56b28ba19f47b6b80f43045635432971b30f2bfb3a26a53ca502bf21fa598c5ddb934b000000000000000000000000000000000000000000000000000000000000000b3ab737e679aefe131ad3efc850fd2c50b316aabcdaa4368587d9606df84b3590541698c7c5538111187964e1b3f39fa033033bb7cab30275ea11b912089663ec43243ff37fa9d2cce04dfce25738c3a484d42f8d8a2c6be226627606f75788ee0e777481b5bd100d00d118bddd18e8726f7a54333b6228f57fa3237799079eb56e6e0ac0cb0f334d23f7284e2dcb2f463d8104fc198389e42a9d1bad1dcfe983115d3d85474db611a6e82b2f61b8d93efa77bc039bd5b3b0f02a7fc587d4a12a0daf256c21ecb9664e6c90c2bfb72a753ff008d3306f7cd4c823df6685fc4cba1514ed132d6367a8f99fba241fc6ef6917f5279ebfdd3e05a296e5c4d77a5463037d7c8180d0644d7e90123918c30fca011d710201ceabcae277924f32ff6b9d0e4d285eb59b4b56d3af8d4b2ab1a39ec2d4324e49deea661cbd43f21cbdc76a10a14055ecdd3251a5860c3bb02bcc1f21da5564fc05adbac70c7565fb5f44b8", - "nonce": "0xec0", - "to": "0x8febc74c26129c8d7e60288c6dccc75eb494aa3c", - "transactionIndex": "0x0", - "value": "0x0", - "type": "0x2", - "accessList": [], - "chainId": "0xaa36a7", - "v": "0x1", - "r": "0xccf7b8fd2d63782e651f4d9650c0ed1a430060fd947d97b6504876f8ea16b357", - "s": "0x50c56d90105b1b8aa475c9500137e9b7c4f0a331fee076bc395a695dc471dc05" - } -} -``` diff --git a/v1.0/RPC Nodes/rpc-evm/rpc-chiliz/eth_gettransactionbyblocknumberandindex.md b/v1.0/RPC Nodes/rpc-evm/rpc-chiliz/eth_gettransactionbyblocknumberandindex.md deleted file mode 100644 index 03090ff8..00000000 --- a/v1.0/RPC Nodes/rpc-evm/rpc-chiliz/eth_gettransactionbyblocknumberandindex.md +++ /dev/null @@ -1,116 +0,0 @@ ---- -title: "eth_gettransactionbyblocknumberandindex" -slug: "rpc-chiliz-eth_gettransactionbyblocknumberandindex" -excerpt: "Chiliz RPC" -category: 65c5e93c623cad004b45d505 -hidden: false -metadata: - description: "Chiliz RPC" - image: [] - keywords: "chiliz, 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 - -iimport { TatumSDK, Chiliz, Network } from '@tatumio/tatum' - -const tatum = await TatumSDK.init({network: Network.CHILIZ}) - -const tx = await tatum.rpc.getTransactionByBlockNumberAndIndex('0x65B9AB', 0) - -await tatum.destroy() // Destroy Tatum SDK - needed for stopping background jobs -``` -{% endcode %} -{% endtab %} -{% endtabs %} - -### Overview - -`eth_getTransactionByBlockHashAndIndex` is an JSON-RPC method that allows you to fetch the transaction details based on the block hash and the index of the transaction within that block. This method can be useful when you want to retrieve transaction details for a specific transaction without knowing its transaction hash. - -Use cases for this method may include: - -* Inspecting transaction details for debugging purposes -* Gathering data for transaction analysis -* Fetching transaction information for specific blocks in a block explorer application - -### Parameters - -The `eth_getTransactionByBlockHashAndIndex` method accepts two parameters: - -1. `blockNumber` (required): The hash of the block containing the transaction. - * Example: 371156 -2. `transactionIndex` (required): The index of the transaction within the specified block. The index is a hexadecimal value. - * Example: 0 - -### Return Object - -The method returns a JSON object containing the following fields: - -1. `hash`: The transaction hash as a 32-byte hex string. -2. `nonce`: The number of transactions made by the sender prior to this one. -3. `blockHash`: The hash of the block in which this transaction is included. -4. `blockNumber`: The block number in which this transaction is included. -5. `transactionIndex`: The index of the transaction within the block. -6. `from`: The address of the sender. -7. `to`: The address of the recipient. `null` if the transaction is a contract creation transaction. -8. `value`: The value transferred in wei. -9. `gasPrice`: The gas price provided by the sender in wei. -10. `gas`: The gas limit provided by the sender. -11. `input`: The data sent along with the transaction. - -### JSON Examples - -Request: - -```json -{ - "jsonrpc": "2.0", - "id": 1, - "method": "eth_getTransactionByBlockNumberAndIndex", - "params": [ - 371156, - 0 - ] -} -``` - -Response: - -```json -{ - "jsonrpc": "2.0", - "id": 1, - "result": { - "blockHash": "0x1091a5831b3556e80e53598c24e9d592e104dba0428f47f94c61523eb52d09d8", - "blockNumber": "0x316624", - "from": "0x37a53636ee68f59d9346aabcfc0d36011d9d5b35", - "gas": "0x5b8d80", - "gasPrice": "0x59682f0a", - "maxFeePerGas": "0x59682f10", - "maxPriorityFeePerGas": "0x59682f00", - "hash": "0x40a0f78e346d15b05efa1861149e5999ea48197dcf104d69160d45b08b7a5118", - "input": "0xb1dc65a4000129d4314ec8c4bafb6468cc9d3c21de025fa54002558c9f76aec833406ab600000000000000000000000000000000000000000000000000000000001ccc01f18333a24416e0a0be9cdb78505c9c3c27fa42bccdbe6456cd6c1fc81bee7c0e00000000000000000000000000000000000000000000000000000000000000e0000000000000000000000000000000000000000000000000000000000000022000000000000000000000000000000000000000000000000000000000000003a001000000010100010100010000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000120000000000000000000000000000000000000000000000000000000000000002000000000000000000000000000000000000000000000000000000000000000800000000000000000000000000000000000000000000000000000000000003d150000000000000000000000000000000000000000000000000000000000003d17325325668a08b50a9587fd4605ce02dbc5ccefc4883a41b485ff4dc4a4f86f1e0000000000000000000000000000000000000000000000000000000000000060000000000000000000000000000000000000000000000000000000000000a8690000000000000000000000000000000000000000000000000000009d29229e000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000ba6547e7b549a1f180c5ad4f2e2e7104fecb8373482f3de6574ecbeefdc9be9dfd9f1934768a23584f1508adad8a7bbfbe445a27bed9f1d4538d4e4c9e458b0c5274b6f714f5aee9a8d56aeb8957b6da6b8914e445a46dcd349737b2eb7d72132e41926d07355de577b13e6ec8e55eaaf628b333197a8d1292bed1c375e891e1da1d519aabbebcc6d299b575b7bef506e2db9493de6f0cfdb0436a81597eb155edc63a8ea655a9b405a0c41c923b1734d78b5d9812f36a602ace3d8c5b22beb9519e406f32de9768e518f2b253a95364a9a2838ba5023c52d503fe8fa811c8803399679a19513671b13d4040e46be74e152d39be4f68bfecaa57d27965ba724a09464734faf7230b19e04f4aa581f10066884e2f402af36f0cdbf08de95e190f4f31fd3b718c1317b65fba9e7ea45ef6180e4861839c6395c814214ee8d56b28ba19f47b6b80f43045635432971b30f2bfb3a26a53ca502bf21fa598c5ddb934b000000000000000000000000000000000000000000000000000000000000000b3ab737e679aefe131ad3efc850fd2c50b316aabcdaa4368587d9606df84b3590541698c7c5538111187964e1b3f39fa033033bb7cab30275ea11b912089663ec43243ff37fa9d2cce04dfce25738c3a484d42f8d8a2c6be226627606f75788ee0e777481b5bd100d00d118bddd18e8726f7a54333b6228f57fa3237799079eb56e6e0ac0cb0f334d23f7284e2dcb2f463d8104fc198389e42a9d1bad1dcfe983115d3d85474db611a6e82b2f61b8d93efa77bc039bd5b3b0f02a7fc587d4a12a0daf256c21ecb9664e6c90c2bfb72a753ff008d3306f7cd4c823df6685fc4cba1514ed132d6367a8f99fba241fc6ef6917f5279ebfdd3e05a296e5c4d77a5463037d7c8180d0644d7e90123918c30fca011d710201ceabcae277924f32ff6b9d0e4d285eb59b4b56d3af8d4b2ab1a39ec2d4324e49deea661cbd43f21cbdc76a10a14055ecdd3251a5860c3bb02bcc1f21da5564fc05adbac70c7565fb5f44b8", - "nonce": "0xec0", - "to": "0x8febc74c26129c8d7e60288c6dccc75eb494aa3c", - "transactionIndex": "0x0", - "value": "0x0", - "type": "0x2", - "accessList": [], - "chainId": "0xaa36a7", - "v": "0x1", - "r": "0xccf7b8fd2d63782e651f4d9650c0ed1a430060fd947d97b6504876f8ea16b357", - "s": "0x50c56d90105b1b8aa475c9500137e9b7c4f0a331fee076bc395a695dc471dc05" - } -} -``` diff --git a/v1.0/RPC Nodes/rpc-evm/rpc-chiliz/eth_gettransactionbyhash.md b/v1.0/RPC Nodes/rpc-evm/rpc-chiliz/eth_gettransactionbyhash.md deleted file mode 100644 index 4891364a..00000000 --- a/v1.0/RPC Nodes/rpc-evm/rpc-chiliz/eth_gettransactionbyhash.md +++ /dev/null @@ -1,109 +0,0 @@ ---- -title: "eth_gettransactionbyhash" -slug: "rpc-chiliz-eth_gettransactionbyhash" -excerpt: "Chiliz RPC" -category: 65c5e93c623cad004b45d505 -hidden: false -metadata: - description: "Chiliz RPC" - image: [] - keywords: "chiliz, 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, Chiliz, Network } from '@tatumio/tatum' - -const tatum = await TatumSDK.init({network: Network.CHILIZ}) - -const tx = await tatum.rpc.getTransactionByHash('0x98ce8f8d9b941cda7d1f199daba347a321514cb223dee06ef7e4fa0094882fc7') - -await tatum.destroy() // Destroy Tatum SDK - needed for stopping background jobs -``` -{% endcode %} -{% endtab %} -{% endtabs %} - -### Overview - -`eth_getTransactionByHash` is an JSON-RPC method that allows you to query transaction details based on its hash. This method is useful when you want to retrieve information about a specific transaction, such as its sender, receiver, value, and more. Common use cases include tracking transaction status, monitoring incoming transactions, or analyzing historical transaction data. - -### Parameters - -The `eth_getTransactionByHash` method takes one parameter: - -* **`transactionHash`**: The hash of the transaction you want to retrieve. This should be a 32-byte hash string with a `0x` prefix. - * Example: `"0x97d83656ca05890100149be18d0c2a2f94e5337e5e6a643ea78794cd418cdbc7"` - -### Return Object - -The method returns a transaction object with the following fields: - -* **`hash`**: The hash of the transaction (32 bytes). -* **`nonce`**: The number of transactions sent by the sender prior to this one (integer). -* **`blockHash`**: The hash of the block in which the transaction was included (32 bytes), or `null` if the transaction is not yet mined. -* **`blockNumber`**: The block number in which the transaction was included (integer), or `null` if the transaction is not yet mined. -* **`transactionIndex`**: The index of the transaction in the block (integer), or `null` if the transaction is not yet mined. -* **`from`**: The address of the sender (20 bytes). -* **`to`**: The address of the receiver (20 bytes), or `null` for contract creation transactions. -* **`value`**: The value transferred in the transaction, in wei. -* **`gasPrice`**: The price of gas for the transaction, in wei. -* **`maxFeePerGas`** - The maximum fee per gas set in the transaction. -* **`maxPriorityFeePerGas`** - The maximum priority gas fee set in the transaction. -* **`gas`**: The maximum amount of gas the transaction is allowed to consume. -* **`input`**: The data payload of the transaction (string), or `0x` for simple value transfers. - -### JSON-RPC Examples - -Request: - -```json -{ - "jsonrpc": "2.0", - "method": "eth_getTransactionByHash", - "params": ["0x97d83656ca05890100149be18d0c2a2f94e5337e5e6a643ea78794cd418cdbc7"], - "id": 1 -} -``` - -Response: - -```json -{ - "jsonrpc": "2.0", - "id": 1, - "result": { - "blockHash": "0xb0ddfcdcc375afce9f365458c5035ca4aaf99f9fe8699522193e16a8718615b6", - "blockNumber": "0x5a9d4", - "transactionIndex": "0x0", - "hash": "0x97d83656ca05890100149be18d0c2a2f94e5337e5e6a643ea78794cd418cdbc7", - "type": "0x2", - "nonce": "0x1d8", - "from": "0x8bd5723981d3f96a6544519c4a075f5994919d3a", - "to": "0xa55d9ef16af921b70fed1421c1d298ca5a3a18f1", - "value": "0x0", - "input": "0x3798c7f2000000000000000000000000000000000000000000000000000000000000008000000000000000000000000000000000000000000000000000000000000003400000000000000000000000000000000000000000000000000000000065082bd900000000000000000000000000000000000000000000000000000000013ebef0000000000000000000000000000000000000000000000000000000000000000700000000000000000000000000000000000000000000000000000000000000e00000000000000000000000000000000000000000000000000000000000000120000000000000000000000000000000000000000000000000000000000000016000000000000000000000000000000000000000000000000000000000000001a000000000000000000000000000000000000000000000000000000000000001e0000000000000000000000000000000000000000000000000000000000000022000000000000000000000000000000000000000000000000000000000000002600000000000000000000000000000000000000000000000000000000000000003415242000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000034254430000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000344414900000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000003455448000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000024f50000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000455534443000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000004555344540000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000070000000000000000000000000000000000000000000000000000000031339e8d000000000000000000000000000000000000000000000000000018a759056108000000000000000000000000000000000000000000000000000000003b9aca000000000000000000000000000000000000000000000000000000017fc9b3dfb80000000000000000000000000000000000000000000000000000000054572fc0000000000000000000000000000000000000000000000000000000003b9aca00000000000000000000000000000000000000000000000000000000003b9b181f", - "gas": "0x12a68", - "gasPrice": "0x5017ff700", - "maxPriorityFeePerGas": "0x59682f00", - "maxFeePerGas": "0xba43b7400", - "chainId": "0x1ca4", - "v": "0x1c", - "r": "0x75884978fae04ee04de9a2d4fefaaaa4742f4e8f4ccdaf89b01238bafb5292fd", - "s": "0x1f0e92ae5b7f2c8805ebb07900a59a04e73cda12a309021849a5d9ed151d7fd1", - "accessList": [] - } -} -``` - -\ diff --git a/v1.0/RPC Nodes/rpc-evm/rpc-chiliz/eth_maxpriorityfeepergas.md b/v1.0/RPC Nodes/rpc-evm/rpc-chiliz/eth_maxpriorityfeepergas.md deleted file mode 100644 index 10983cac..00000000 --- a/v1.0/RPC Nodes/rpc-evm/rpc-chiliz/eth_maxpriorityfeepergas.md +++ /dev/null @@ -1,16 +0,0 @@ ---- -title: "eth_maxpriorityfeepergas" -slug: "rpc-chiliz-eth_maxpriorityfeepergas" -excerpt: "Chiliz RPC" -category: 65c5e93c623cad004b45d505 -hidden: false -metadata: - description: "Chiliz RPC" - image: [] - keywords: "chiliz, rpc" - robots: "index" -createdAt: "Wed Mar 06 2024 10:35:44 GMT+0000 (Coordinated Universal Time)" -updatedAt: "Tue Apr 02 2024 08:40:59 GMT+0000 (Coordinated Universal Time)" ---- -[block:html]{"html":"
\n
Archive Method
\n

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

\n
"}[/block] - diff --git a/v1.0/RPC Nodes/rpc-evm/rpc-chiliz/txpool_content.md b/v1.0/RPC Nodes/rpc-evm/rpc-chiliz/txpool_content.md deleted file mode 100644 index ef4e0f6f..00000000 --- a/v1.0/RPC Nodes/rpc-evm/rpc-chiliz/txpool_content.md +++ /dev/null @@ -1,143 +0,0 @@ ---- -title: "txpool_content" -slug: "rpc-chiliz-txpool_content" -excerpt: "Chiliz RPC" -category: 65c5e93c623cad004b45d505 -hidden: false -metadata: - description: "Chiliz RPC" - image: [] - keywords: "chiliz, 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, Chiliz, Network } from '@tatumio/tatum' - -const tatum = await TatumSDK.init({network: Network.CHILIZ}) - -const content = await tatum.rpc.txPoolContent() - -await tatum.destroy() // Destroy Tatum SDK - needed for stopping background jobs -``` -{% endcode %} -{% endtab %} -{% endtabs %} - -### Overview - -The `txpool_content` method provides information about the transactions currently pending in the transaction pool of the Flare node. It can be helpful for developers and node operators to monitor and manage the transaction pool, especially in scenarios where it's necessary to analyze transaction congestion or prioritize specific transactions. - -Use cases for the `txpool_content` method include: - -* Analyzing network congestion by inspecting the transaction pool -* Prioritizing transactions by gas price -* Monitoring transactions from specific addresses -* Debugging and troubleshooting pending transactions - -### Parameters - -This method does not require any parameters. - -### Return Object - -The `txpool_content` method returns an object with two fields: `pending` and `queued`. Each field contains a nested object with addresses as keys and their respective transactions as values. - -* **`pending`**: An object containing transactions that are currently pending for inclusion in the next block(s). -* **`queued`**: An object containing transactions that are currently queued (i.e., transactions that do not meet certain criteria for inclusion in the next block, like low gas price or nonce gaps). - -Each transaction object includes the following information: - -* **`hash`**: The hash of the transaction (32 bytes). -* **`nonce`**: The number of transactions sent by the sender prior to this one (integer). -* **`blockHash`**: The hash of the block in which the transaction was included (32 bytes), or `null` if the transaction is not yet mined. -* **`blockNumber`**: The block number in which the transaction was included (integer), or `null` if the transaction is not yet mined. -* **`transactionIndex`**: The index of the transaction in the block (integer), or `null` if the transaction is not yet mined. -* **`from`**: The address of the sender (20 bytes). -* **`to`**: The address of the receiver (20 bytes), or `null` for contract creation transactions. -* **`value`**: The value transferred in the transaction, in wei. -* **`gasPrice`**: The price of gas for the transaction, in wei. -* **`maxFeePerGas`** - The maximum fee per gas set in the transaction. -* **`maxPriorityFeePerGas`** - The maximum priority gas fee set in the transaction. -* **`gas`**: The maximum amount of gas the transaction is allowed to consume. -* **`input`**: The data payload of the transaction (string), or `0x` for simple value transfers. - -### JSON-RPC Request Example - -```json -jsonCopy code{ - "id": 1, - "jsonrpc": "2.0", - "method": "txpool_content", - "params": [] -} -``` - -### JSON-RPC Response Example - -```json -{ - "jsonrpc": "2.0", - "id": 1, - "result": { - "pending": { - "0x01d3B93AaADE8A4066DAaBc8fd8482173A6aD120": { - "197": { - "blockHash": null, - "blockNumber": null, - "from": "0x01d3b93aaade8a4066daabc8fd8482173a6ad120", - "gas": "0x1c9c380", - "gasPrice": "0x16cf917", - "maxFeePerGas": "0x16cf917", - "maxPriorityFeePerGas": "0x16cf917", - "hash": "0x1da9c2a8f0787bac4747c5ed1035e81f6a6745aeea43943e63635fc367b817f7", - "input": "0x00000000", - "nonce": "0xc5", - "to": "0x4f023eb8c6bc3116e35b67e03bf2c17f2e4f7e7e", - "transactionIndex": null, - "value": "0x0", - "type": "0x2", - "accessList": [], - "chainId": "0xaa36a7", - "v": "0x1", - "r": "0x14f7578b57fd9f87acf5bbceb0a47f2d2d3f39b49169357457618c9634c45e8a", - "s": "0x775fa9976c571751a79f069f8c96f6489f286246e157a31fa99b33062631b46d" - } - } - }, - "queued": { - "0x03321406635a04D37Cf9211F2ea3AFc83a87e777": { - "5096281": { - "blockHash": null, - "blockNumber": null, - "from": "0x03321406635a04d37cf9211f2ea3afc83a87e777", - "gas": "0x5208", - "gasPrice": "0xc570bd200", - "hash": "0x05f5fb8e46793fafdc924917c0afdd0afb4a53cb562542d5399234bc1eff759b", - "input": "0x", - "nonce": "0x4dc359", - "to": "0x77b1c86ab0aa9066803ed567e1f00973976638f6", - "transactionIndex": null, - "value": "0xb1a2b96602aa20", - "type": "0x0", - "chainId": "0xaa36a7", - "v": "0x1546d72", - "r": "0x62bd220b95ec13827c0d9b643b9beaf6f4c66d4a8ef08bb10f93d5e5c7ae0068", - "s": "0x467f76847cfdf43a002defe054030c1a88a9e6f56539c051c3cba46b2dd2cc89" - } - } - } - } -``` - -\ diff --git a/v1.0/RPC Nodes/rpc-evm/rpc-chiliz.md b/v1.0/RPC Nodes/rpc-evm/rpc-cronos.md similarity index 86% rename from v1.0/RPC Nodes/rpc-evm/rpc-chiliz.md rename to v1.0/RPC Nodes/rpc-evm/rpc-cronos.md index 418e84d7..ec25bae8 100644 --- a/v1.0/RPC Nodes/rpc-evm/rpc-chiliz.md +++ b/v1.0/RPC Nodes/rpc-evm/rpc-cronos.md @@ -1,6 +1,6 @@ --- -title: "Chiliz" -slug: "rpc-chiliz" +title: "Cronos" +slug: "rpc-cronos" excerpt: "" category: 65c5e93c623cad004b45d505 hidden: false diff --git a/v1.0/RPC Nodes/rpc-evm/rpc-chiliz/debug_traceblockbyhash.md b/v1.0/RPC Nodes/rpc-evm/rpc-cronos/debug_traceblockbyhash.md similarity index 68% rename from v1.0/RPC Nodes/rpc-evm/rpc-chiliz/debug_traceblockbyhash.md rename to v1.0/RPC Nodes/rpc-evm/rpc-cronos/debug_traceblockbyhash.md index 51f9f25f..9a819410 100644 --- a/v1.0/RPC Nodes/rpc-evm/rpc-chiliz/debug_traceblockbyhash.md +++ b/v1.0/RPC Nodes/rpc-evm/rpc-cronos/debug_traceblockbyhash.md @@ -1,13 +1,13 @@ --- title: "debug_traceblockbyhash" -slug: "rpc-chiliz-debug_traceblockbyhash" -excerpt: "Chiliz RPC" +slug: "rpc-cronos-debug_traceblockbyhash" +excerpt: "Cronos RPC" category: 65c5e93c623cad004b45d505 hidden: false metadata: - description: "Chiliz RPC" + description: "Cronos RPC" image: [] - keywords: "chiliz, rpc" + keywords: "cronos, rpc" robots: "index" createdAt: "Wed Mar 06 2024 10:35:44 GMT+0000 (Coordinated Universal Time)" updatedAt: "Tue Apr 02 2024 08:40:59 GMT+0000 (Coordinated Universal Time)" @@ -22,11 +22,20 @@ updatedAt: "Tue Apr 02 2024 08:40:59 GMT+0000 (Coordinated Universal Time)" ```typescript // yarn add @tatumio/tatum -import { TatumSDK, Chiliz, Network } from '@tatumio/tatum' +import { TatumSDK, Cronos, Network } from '@tatumio/tatum' + +const tatum = await TatumSDK.init({network: Network.CRONOS}) -const tatum = await TatumSDK.init({network: Network.CHILIZ}) - -const result = await tatum.rpc.debugTraceBlockByHashtatum.rpc.debugTraceBlockByHash('0xdea4839f6bce4f97d9b92b68b054b8c637b20fdbc2b1deaace450b961946eb02') +const result = await tatum.rpc.debugTraceBlockByHash( +'0xe1ceb5e388aecc721a60691659ca7b388612d323cf75da6b9e766b8a440864c2', +{ + tracer: 'callTracer', + tracerConfig: { + onlyTopCall: true, + timeout: '5s', + } +} +) await tatum.destroy() // Destroy Tatum SDK - needed for stopping background jobs ``` @@ -43,7 +52,7 @@ By using the `callTracer` tracer, developers can obtain more detailed informatio ### Parameters * `block_hash` (required): The hash of the block to be traced. - * Example: `"0x1dcf337a03e08a8c00e31de6f5b6d9a6e1c6f1d5e5e6c89fc5f5b5a30e6d5d0c"` + * Example: `"0xe1ceb5e388aecc721a60691659ca7b388612d323cf75da6b9e766b8a440864c2"` * `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 @@ -72,48 +81,4 @@ The return object is an array of objects, each representing the trace result of {% hint style="info" %} This method is available only on the full archive node. -{% endhint %} - -### JSON-RPC Request and Response Examples - -#### Request - -```json -{ - "id": 1, - "jsonrpc": "2.0", - "method": "debug_traceBlockByHash", - "params": [ - "0x1dcf337a03e08a8c00e31de6f5b6d9a6e1c6f1d5e5e6c89fc5f5b5a30e6d5d0c", - { - "tracer": "callTracer", - "timeout": "10s" - } - ] -} - -``` - -#### Response - -```json -{ - "id": 1, - "jsonrpc": "2.0", - "result": [ - { - "result": { - "from": "0x8894e0a0c962cb723c1976a4421c95949be2d4e3", - "gas": "0x2d48c", - "gasUsed": "0xc7ab", - "to": "0x55d398326f99059ff775485246999027b3197955", - "input": "0xa9059cbb0000000000000000000000003b9f33b3a9d382fa60283c555bde8f78855957be00000000000000000000000000000000000000000000000d4e7f4f79da7c0000", - "output": "0x0000000000000000000000000000000000000000000000000000000000000001", - "value": "0x0", - "type": "CALL" - } - } - ] -} - -``` +{% endhint %} \ No newline at end of file diff --git a/v1.0/RPC Nodes/rpc-evm/rpc-chiliz/debug_traceblockbynumber.md b/v1.0/RPC Nodes/rpc-evm/rpc-cronos/debug_traceblockbynumber.md similarity index 68% rename from v1.0/RPC Nodes/rpc-evm/rpc-chiliz/debug_traceblockbynumber.md rename to v1.0/RPC Nodes/rpc-evm/rpc-cronos/debug_traceblockbynumber.md index 08682024..4e601881 100644 --- a/v1.0/RPC Nodes/rpc-evm/rpc-chiliz/debug_traceblockbynumber.md +++ b/v1.0/RPC Nodes/rpc-evm/rpc-cronos/debug_traceblockbynumber.md @@ -1,13 +1,13 @@ --- title: "debug_traceblockbynumber" -slug: "rpc-chiliz-debug_traceblockbynumber" -excerpt: "Chiliz RPC" +slug: "rpc-cronos-debug_traceblockbynumber" +excerpt: "Cronos RPC" category: 65c5e93c623cad004b45d505 hidden: false metadata: - description: "Chiliz RPC" + description: "Cronos RPC" image: [] - keywords: "chiliz, rpc" + keywords: "cronos, rpc" robots: "index" createdAt: "Wed Mar 06 2024 10:35:44 GMT+0000 (Coordinated Universal Time)" updatedAt: "Tue Apr 02 2024 08:40:59 GMT+0000 (Coordinated Universal Time)" @@ -22,11 +22,11 @@ updatedAt: "Tue Apr 02 2024 08:40:59 GMT+0000 (Coordinated Universal Time)" ```typescript // yarn add @tatumio/tatum -import { TatumSDK, Chiliz, Network } from '@tatumio/tatum' +import { TatumSDK, Cronos, Network } from '@tatumio/tatum' + +const tatum = await TatumSDK.init({network: Network.CRONOS}) -const tatum = await TatumSDK.init({network: Network.CHILIZ}) - -const result = await tatum.rpc.debugTraceBlockByNumber(6666667) +const result = await tatum.rpc.debugTraceBlockByNumber(12863491) await tatum.destroy() // Destroy Tatum SDK - needed for stopping background jobs ``` @@ -44,7 +44,7 @@ By using the `callTracer` tracer, developers can obtain more detailed informatio * `blockNumber` - `Quantity` or `String` * The block number of the block to trace. - * Example: `"0x1"` or `"latest"` + * Example: `"12863491"` or `"latest"` * `options` as `tracerConfig`(optional): An object containing configuration options for the tracer. * `tracer` (required): The tracer to use, in this case, `"callTracer"`. * `timeout` (required): The maximum amount of time the tracer is allowed to run, in seconds or as a string (e.g. "10s"). Default is "5s". @@ -71,48 +71,4 @@ The return object is an array of objects, each representing the trace result of {% hint style="info" %} This method is available only on the full archive node. -{% endhint %} - -### 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" - } - } - ] -} - -``` +{% endhint %} \ No newline at end of file diff --git a/v1.0/RPC Nodes/rpc-evm/rpc-chiliz/debug_tracetransaction.md b/v1.0/RPC Nodes/rpc-evm/rpc-cronos/debug_tracetransaction.md similarity index 59% rename from v1.0/RPC Nodes/rpc-evm/rpc-chiliz/debug_tracetransaction.md rename to v1.0/RPC Nodes/rpc-evm/rpc-cronos/debug_tracetransaction.md index 9bc285fc..eb82a30b 100644 --- a/v1.0/RPC Nodes/rpc-evm/rpc-chiliz/debug_tracetransaction.md +++ b/v1.0/RPC Nodes/rpc-evm/rpc-cronos/debug_tracetransaction.md @@ -1,13 +1,13 @@ --- title: "debug_tracetransaction" -slug: "rpc-chiliz-debug_tracetransaction" -excerpt: "Chiliz RPC" +slug: "rpc-cronos-debug_tracetransaction" +excerpt: "Cronos RPC" category: 65c5e93c623cad004b45d505 hidden: false metadata: - description: "Chiliz RPC" + description: "Cronos RPC" image: [] - keywords: "chiliz, rpc" + keywords: "cronos, rpc" robots: "index" createdAt: "Wed Mar 06 2024 10:35:44 GMT+0000 (Coordinated Universal Time)" updatedAt: "Tue Apr 02 2024 08:40:59 GMT+0000 (Coordinated Universal Time)" @@ -22,11 +22,11 @@ updatedAt: "Tue Apr 02 2024 08:40:59 GMT+0000 (Coordinated Universal Time)" ```typescript // yarn add @tatumio/tatum -import { TatumSDK, Chiliz, Network } from '@tatumio/tatum' +import { TatumSDK, Cronos, Network } from '@tatumio/tatum' + +const tatum = await TatumSDK.init({network: Network.CRONOS}) -const tatum = await TatumSDK.init({network: Network.CHILIZ}) - -const result = await tatum.rpc.debugTraceTransaction('0x98ce8f8d9b941cda7d1f199daba347a321514cb223dee06ef7e4fa0094882fc7', { +const result = await tatum.rpc.debugTraceTransaction('0x6aefbd1a9c9e4c310cadde3bcdd809a14da87caa8fa4f10ca04d9e357a3907e9', { tracer: 'callTracer', tracerConfig: { onlyTopCall: true, @@ -78,47 +78,4 @@ The return object is an object containing the following fields: {% 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": "debug_traceTransaction", - "params": ["0x920d562e886a0c7c1f07ecee2ee5557f72d3056b205f8811c57e2615a3b6adb0", {"tracer":"callTracer"}], - "id": 2 -} -``` - -#### Response - -```json -{ - "jsonrpc": "2.0", - "id": 2, - "result": { - "from": "0x0a6d033f6628ef715732d61e059187b7330305ff", - "gas": "0x51fba", - "gasUsed": "0x41711", - "to": "0x19e870855cb8fd8f6689743d3c28311c0d62a24c", - "input": "0xcba9bc66000000000000000000000000f62ef040fb5ea7d0828ff50bced9a7720f1387c7000000000000000000000000325e343f1de602396e256b67efd1f61c3a6b38bd00000000000000000000000000000000000000000000000000000000000000e00000000000000000000000000000000000000000000000000000000000000160000000000000000000000000000000000000000000000001158e460913d000000000000000000000000000000000000000000000000000000100a08761e1547f0000000000000000000000000a6d033f6628ef715732d61e059187b7330305ff000000000000000000000000000000000000000000000000000000000000000300000000000000000000000055d398326f99059ff775485246999027b319795500000000000000000000000053e562b9b7e5e94b81f10e96ee70ad06df3d265700000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000", - "output": "0x0000000000000000000000000000000000000000000000000102b1eda6a2682d", - "calls": [ - { - "from": "0x19e870855cb8fd8f6689743d3c28311c0d62a24c", - "gas": "0x4f638", - "gasUsed": "0x4cf", - "to": "0x55d398326f99059ff775485246999027b3197955", - "input": "0x70a082310000000000000000000000000a6d033f6628ef715732d61e059187b7330305ff", - "output": "0x00000000000000000000000000000000000000000000002ca114a674b092dd94", - "type": "STATICCALL" - } - ], - "value": "0x0", - "type": "CALL" - } -} -``` +{% endhint %} \ No newline at end of file diff --git a/v1.0/RPC Nodes/rpc-evm/rpc-chiliz/eth_blocknumber.md b/v1.0/RPC Nodes/rpc-evm/rpc-cronos/eth_blocknumber.md similarity index 75% rename from v1.0/RPC Nodes/rpc-evm/rpc-chiliz/eth_blocknumber.md rename to v1.0/RPC Nodes/rpc-evm/rpc-cronos/eth_blocknumber.md index 9e1ff7f6..c1c1d79a 100644 --- a/v1.0/RPC Nodes/rpc-evm/rpc-chiliz/eth_blocknumber.md +++ b/v1.0/RPC Nodes/rpc-evm/rpc-cronos/eth_blocknumber.md @@ -1,13 +1,13 @@ --- title: "eth_blocknumber" -slug: "rpc-chiliz-eth_blocknumber" -excerpt: "Chiliz RPC" +slug: "rpc-cronos-eth_blocknumber" +excerpt: "Cronos RPC" category: 65c5e93c623cad004b45d505 hidden: false metadata: - description: "Chiliz RPC" + description: "Cronos RPC" image: [] - keywords: "chiliz, rpc" + keywords: "cronos, rpc" robots: "index" createdAt: "Wed Mar 06 2024 10:35:44 GMT+0000 (Coordinated Universal Time)" updatedAt: "Tue Apr 02 2024 08:40:59 GMT+0000 (Coordinated Universal Time)" @@ -22,9 +22,9 @@ updatedAt: "Tue Apr 02 2024 08:40:59 GMT+0000 (Coordinated Universal Time)" ```typescript // yarn add @tatumio/tatum -import { TatumSDK, Chiliz, Network } from '@tatumio/tatum' +import { TatumSDK, Cronos, Network } from '@tatumio/tatum' -const tatum = await TatumSDK.init({network: Network.CHILIZ}) +const tatum = await TatumSDK.init({network: Network.CRONOS}) const latestBlock = await tatum.rpc.blockNumber() @@ -53,25 +53,4 @@ The `eth_blockNumber` method does not require any parameters. The `eth_blockNumber` method returns a single field: -* **`blockNumber`**: The number of the most recent block on the blockchain. The value is returned as a hexadecimal string. - -### JSON-RPC Request Example - -```json -{ - "id": 1, - "jsonrpc": "2.0", - "method": "eth_blockNumber", - "params": [] -} -``` - -### JSON-RPC Response Example - -```json -{ - "id": 1, - "jsonrpc": "2.0", - "result": "0x4b7" // 1207 -} -``` \ No newline at end of file +* **`blockNumber`**: The number of the most recent block on the blockchain. The value is returned as a hexadecimal string. \ No newline at end of file diff --git a/v1.0/RPC Nodes/rpc-evm/rpc-cronos/eth_call.md b/v1.0/RPC Nodes/rpc-evm/rpc-cronos/eth_call.md new file mode 100644 index 00000000..2d27cd41 --- /dev/null +++ b/v1.0/RPC Nodes/rpc-evm/rpc-cronos/eth_call.md @@ -0,0 +1,67 @@ +--- +title: "eth_call" +slug: "rpc-cronos-eth_call" +excerpt: "Cronos RPC" +category: 65c5e93c623cad004b45d505 +hidden: false +metadata: + description: "Cronos RPC" + image: [] + keywords: "cronos, rpc" + robots: "index" +createdAt: "Wed Mar 06 2024 10:35:44 GMT+0000 (Coordinated Universal Time)" +updatedAt: "Tue Apr 02 2024 08:40:59 GMT+0000 (Coordinated Universal Time)" +--- +[block:html]{"html":"
\n
Archive Method
\n

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

\n
"}[/block] + +### How to use it + +{% tabs %} +{% tab title="TypeScript/JavaScript" %} +{% code overflow="wrap" lineNumbers="true" %} +```typescript +// yarn add @tatumio/tatum + +import { TatumSDK, Cronos, Network } from '@tatumio/tatum' + +const tatum = await TatumSDK.init({network: Network.CRONOS}) + +const result = await tatum.rpc.call({ + "to": "0xc21223249CA28397B4B6541dfFaEcC539BfF0c59", // Replace with the ERC-20 token contract address + "data": "0x70a082310000000000000000000000008c9ac9e60e96db6b0da7ca9b8d06e0572fc289d6" // The function signature for balanceOf(address), followed by the address +}, "latest") + +await tatum.destroy() // Destroy Tatum SDK - needed for stopping background jobs +``` +{% endcode %} +{% endtab %} +{% endtabs %} + +### Overview + +Executes a new message call immediately without creating a transaction on the block chain. Often used for executing read-only smart contract functions, for example the `balanceOf` for an ERC-20 contract. + +Top 5 most commonly used use cases for `eth_call`: + +1. **Retrieve Token Balance:** Check an ERC-20 token balance for an address. +2. **Query Contract State:** Get contract data, like a game score or auction status. +3. **Validate Inputs:** Pre-validate function inputs before sending a transaction. +4. **Price Oracles:** Fetch real-time price data for decentralized applications. +5. **Gas Estimation:** Estimate gas costs for future transactions. + +### **Parameters** + +1. `Object` - The transaction call object + +* `from`: `DATA`, 20 Bytes - (optional) The address the transaction is sent from. +* `to`: `DATA`, 20 Bytes - The address the transaction is directed to. +* `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) + +2. `QUANTITY|TAG` - integer block number, or the string `"latest"`, `"earliest"` or `"pending"` + +### Return Object + +`DATA` - the return value of executed contract. \ No newline at end of file diff --git a/v1.0/RPC Nodes/rpc-evm/rpc-chiliz/eth_chainid.md b/v1.0/RPC Nodes/rpc-evm/rpc-cronos/eth_chainid.md similarity index 73% rename from v1.0/RPC Nodes/rpc-evm/rpc-chiliz/eth_chainid.md rename to v1.0/RPC Nodes/rpc-evm/rpc-cronos/eth_chainid.md index 171ff224..b499805b 100644 --- a/v1.0/RPC Nodes/rpc-evm/rpc-chiliz/eth_chainid.md +++ b/v1.0/RPC Nodes/rpc-evm/rpc-cronos/eth_chainid.md @@ -1,13 +1,13 @@ --- title: "eth_chainid" -slug: "rpc-chiliz-eth_chainid" -excerpt: "Chiliz RPC" +slug: "rpc-cronos-eth_chainid" +excerpt: "Cronos RPC" category: 65c5e93c623cad004b45d505 hidden: false metadata: - description: "Chiliz RPC" + description: "Cronos RPC" image: [] - keywords: "chiliz, rpc" + keywords: "cronos, rpc" robots: "index" createdAt: "Wed Mar 06 2024 10:35:44 GMT+0000 (Coordinated Universal Time)" updatedAt: "Tue Apr 02 2024 08:40:59 GMT+0000 (Coordinated Universal Time)" @@ -22,9 +22,9 @@ updatedAt: "Tue Apr 02 2024 08:40:59 GMT+0000 (Coordinated Universal Time)" ```typescript // yarn add @tatumio/tatum -import { TatumSDK, Chiliz, Network } from '@tatumio/tatum' - -const tatum = await TatumSDK.init({network: Network.CHILIZ}) +import { TatumSDK, Cronos, Network } from '@tatumio/tatum' + +const tatum = await TatumSDK.init({network: Network.CRONOS}) const id = await tatum.rpc.chainId() @@ -36,7 +36,7 @@ await tatum.destroy() // Destroy Tatum SDK - needed for stopping background jobs ### Overview -The `eth_chainId` method is an JSON-RPC method that allows developers to retrieve the currently configured chain ID of the network they are connected to. The chain ID is a unique identifier for different networks, such as mainnet or various testnets. +The `eth_chainId` method is an JSON-RPC method that allows developers to retrieve the currently configured chain ID of the network they are connected to. The chain ID is a unique identifier for different networks, such as Mainnet or various testnets. 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. @@ -48,28 +48,4 @@ The `eth_chainId` method does not have any input parameters. The return object contains a single field: -* **`chainId`**: The hexadecimal string representation of the chain ID. - -### Example Request and Response - -JSON-RPC request: - -```json -{ - "jsonrpc": "2.0", - "id": 1, - "method": "eth_chainId", - "params": [] -} -``` - -JSON-RPC response: - -```json -{ - "jsonrpc": "2.0", - "id": 1, - "result": "0xe" -} -``` - +* **`chainId`**: The hexadecimal string representation of the chain ID. \ No newline at end of file diff --git a/v1.0/RPC Nodes/rpc-evm/rpc-chiliz/eth_estimategas.md b/v1.0/RPC Nodes/rpc-evm/rpc-cronos/eth_estimategas.md similarity index 85% rename from v1.0/RPC Nodes/rpc-evm/rpc-chiliz/eth_estimategas.md rename to v1.0/RPC Nodes/rpc-evm/rpc-cronos/eth_estimategas.md index 67d5b4f5..8f09f1df 100644 --- a/v1.0/RPC Nodes/rpc-evm/rpc-chiliz/eth_estimategas.md +++ b/v1.0/RPC Nodes/rpc-evm/rpc-cronos/eth_estimategas.md @@ -1,13 +1,13 @@ --- title: "eth_estimategas" -slug: "rpc-chiliz-eth_estimategas" -excerpt: "Chiliz RPC" +slug: "rpc-cronos-eth_estimategas" +excerpt: "Cronos RPC" category: 65c5e93c623cad004b45d505 hidden: false metadata: - description: "Chiliz RPC" + description: "Cronos RPC" image: [] - keywords: "chiliz, rpc" + keywords: "cronos, rpc" robots: "index" createdAt: "Wed Mar 06 2024 10:35:44 GMT+0000 (Coordinated Universal Time)" updatedAt: "Tue Apr 02 2024 08:40:59 GMT+0000 (Coordinated Universal Time)" @@ -22,16 +22,15 @@ updatedAt: "Tue Apr 02 2024 08:40:59 GMT+0000 (Coordinated Universal Time)" ```typescript // yarn add @tatumio/tatum -import { TatumSDK, Chiliz, Network } from '@tatumio/tatum' - -const tatum = await TatumSDK.init({network: Network.CHILIZ}) +import { TatumSDK, Cronos, Network } from '@tatumio/tatum' + +const tatum = await TatumSDK.init({network: Network.CRONOS}) const estimate = await tatum.rpc.estimateGas({ - "from": "0x3E18a8c3348447E3e69c847FbAA07117E2f46a1b", - "to": "0x3E18a8c3348447E3e69c847FbAA07117E2f46a1b", - "value": "0xde0b6b3a7640000", - "data": "0x606060" - }) + "from": "0x8Bf046E7216c727B0938C0BeA16dEB22C8C03E38", + "to": "0x8Bf046E7216c727B0938C0BeA16dEB22C8C03E38", + "value": "0xde0b6b3a7640000" + }); await tatum.destroy() // Destroy Tatum SDK - needed for stopping background jobs ``` @@ -61,7 +60,7 @@ The `eth_estimateGas` method takes a single parameter, an object representing th * Example: `"gas": "0x76c0"` * **`gasPrice`** (optional, string): The price of gas in wei. * Example: `"gasPrice": "0x9184e72a000"` -* **`value`** (optional, string): The amount of ZEN to send in the transaction, in wei. +* **`value`** (optional, string): The amount of to send in the transaction, in wei. * Example: `"value": "0xde0b6b3a7640000"` * **`data`** (optional, string): The data payload of the transaction, typically used for contract function calls or contract deployment. * Example: `"data": "0x606060..."` diff --git a/v1.0/RPC Nodes/rpc-evm/rpc-chiliz/eth_gasprice.md b/v1.0/RPC Nodes/rpc-evm/rpc-cronos/eth_gasprice.md similarity index 69% rename from v1.0/RPC Nodes/rpc-evm/rpc-chiliz/eth_gasprice.md rename to v1.0/RPC Nodes/rpc-evm/rpc-cronos/eth_gasprice.md index f4333b03..318c803a 100644 --- a/v1.0/RPC Nodes/rpc-evm/rpc-chiliz/eth_gasprice.md +++ b/v1.0/RPC Nodes/rpc-evm/rpc-cronos/eth_gasprice.md @@ -1,13 +1,13 @@ --- title: "eth_gasprice" -slug: "rpc-chiliz-eth_gasprice" -excerpt: "Chiliz RPC" +slug: "rpc-cronos-eth_gasprice" +excerpt: "Cronos RPC" category: 65c5e93c623cad004b45d505 hidden: false metadata: - description: "Chiliz RPC" + description: "Cronos RPC" image: [] - keywords: "chiliz, rpc" + keywords: "cronos, rpc" robots: "index" createdAt: "Wed Mar 06 2024 10:35:44 GMT+0000 (Coordinated Universal Time)" updatedAt: "Tue Apr 02 2024 08:40:59 GMT+0000 (Coordinated Universal Time)" @@ -22,9 +22,9 @@ updatedAt: "Tue Apr 02 2024 08:40:59 GMT+0000 (Coordinated Universal Time)" ```typescript // yarn add @tatumio/tatum -import { TatumSDK, Chiliz, Network } from '@tatumio/tatum' - -const tatum = await TatumSDK.init({network: Network.CHILIZ}) +import { TatumSDK, Cronos, Network } from '@tatumio/tatum' + +const tatum = await TatumSDK.init({network: Network.CRONOS}) const gasPrice = await tatum.rpc.gasPrice() @@ -46,29 +46,4 @@ The `eth_gasPrice` method does not require any parameters. 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. +* `gasPrice`: The estimated average gas price in wei. Example: `"0x4a817c800"` \ No newline at end of file diff --git a/v1.0/RPC Nodes/rpc-evm/rpc-chiliz/eth_getbalance.md b/v1.0/RPC Nodes/rpc-evm/rpc-cronos/eth_getbalance.md similarity index 75% rename from v1.0/RPC Nodes/rpc-evm/rpc-chiliz/eth_getbalance.md rename to v1.0/RPC Nodes/rpc-evm/rpc-cronos/eth_getbalance.md index 86968883..9e72d32c 100644 --- a/v1.0/RPC Nodes/rpc-evm/rpc-chiliz/eth_getbalance.md +++ b/v1.0/RPC Nodes/rpc-evm/rpc-cronos/eth_getbalance.md @@ -1,13 +1,13 @@ --- title: "eth_getbalance" -slug: "rpc-chiliz-eth_getbalance" -excerpt: "Chiliz RPC" +slug: "rpc-cronos-eth_getbalance" +excerpt: "Cronos RPC" category: 65c5e93c623cad004b45d505 hidden: false metadata: - description: "Chiliz RPC" + description: "Cronos RPC" image: [] - keywords: "chiliz, rpc" + keywords: "cronos, rpc" robots: "index" createdAt: "Wed Mar 06 2024 10:35:44 GMT+0000 (Coordinated Universal Time)" updatedAt: "Tue Apr 02 2024 08:40:59 GMT+0000 (Coordinated Universal Time)" @@ -22,11 +22,11 @@ updatedAt: "Tue Apr 02 2024 08:40:59 GMT+0000 (Coordinated Universal Time)" ```typescript // yarn add @tatumio/tatum -import { TatumSDK, Chiliz, Network } from '@tatumio/tatum' +import { TatumSDK, Flare, Network } from '@tatumio/tatum' -const tatum = await TatumSDK.init({network: Network.CHILIZ}) +const tatum = await TatumSDK.init({network: Network.FLARE}) -const balance = await tatum.rpc.getBalance('0x3E18a8c3348447E3e69c847FbAA07117E2f46a1b') +const balance = await tatum.rpc.getBalance('0x45CC7a9A25c54c343BB0e5841DDfaE5DE311af52') await tatum.destroy() // Destroy Tatum SDK - needed for stopping background jobs ``` @@ -43,7 +43,7 @@ The `eth_getBalance` method is an JSON-RPC method that allows you to retrieve th The method requires two parameters: 1. **`address`** (required): The address of the account or contract whose balance you want to query. - * Example: `"0x99D270f4a42b296fB888f168a5985e1d9839B064"` + * Example: `"0x45CC7a9A25c54c343BB0e5841DDfaE5DE311af52"` 2. **`blockParameter`** (optional): The block number or block identifier to specify the point in time for which you want to query the balance. * Example: `"latest"` or `"0x1"` @@ -70,37 +70,5 @@ A full transaction object includes the following fields: The method returns a single field: -* `result`: The Flare balance of the specified address in wei, as a hexadecimal string. - * Example: `"0x1a2e1a"`, which corresponds to `1,726,666` wei. - -### JSON-RPC Request and Response Examples - -#### Request - -```json -{ - "jsonrpc": "2.0", - "id": 1, - "method": "eth_getBalance", - "params": [ - "0x99D270f4a42b296fB888f168a5985e1d9839B064", - "latest" - ] -} -``` - -#### Response - -```json -{ - "jsonrpc": "2.0", - "id": 1, - "result": { - "BigNumber": { - "s": 1, - "e": 18, - "c": [10611, 3542686313455] - } - } -} -``` +* `result`: The balance of the specified address in wei, as a hexadecimal string. + * Example: `"0x1a2e1a"`, which corresponds to `1,726,666` wei. \ No newline at end of file diff --git a/v1.0/RPC Nodes/rpc-evm/rpc-chiliz/eth_getblockbyhash.md b/v1.0/RPC Nodes/rpc-evm/rpc-cronos/eth_getblockbyhash.md similarity index 52% rename from v1.0/RPC Nodes/rpc-evm/rpc-chiliz/eth_getblockbyhash.md rename to v1.0/RPC Nodes/rpc-evm/rpc-cronos/eth_getblockbyhash.md index 94542850..44d0d570 100644 --- a/v1.0/RPC Nodes/rpc-evm/rpc-chiliz/eth_getblockbyhash.md +++ b/v1.0/RPC Nodes/rpc-evm/rpc-cronos/eth_getblockbyhash.md @@ -1,13 +1,13 @@ --- title: "eth_getblockbyhash" -slug: "rpc-chiliz-eth_getblockbyhash" -excerpt: "Chiliz RPC" +slug: "rpc-cronos-eth_getblockbyhash" +excerpt: "Cronos RPC" category: 65c5e93c623cad004b45d505 hidden: false metadata: - description: "Chiliz RPC" + description: "Cronos RPC" image: [] - keywords: "chiliz, rpc" + keywords: "cronos, rpc" robots: "index" createdAt: "Wed Mar 06 2024 10:35:44 GMT+0000 (Coordinated Universal Time)" updatedAt: "Tue Apr 02 2024 08:40:59 GMT+0000 (Coordinated Universal Time)" @@ -22,11 +22,11 @@ updatedAt: "Tue Apr 02 2024 08:40:59 GMT+0000 (Coordinated Universal Time)" ```typescript // yarn add @tatumio/tatum -import { TatumSDK, Chiliz, Network } from '@tatumio/tatum' +import { TatumSDK, Cronos, Network } from '@tatumio/tatum' -const tatum = await TatumSDK.init({network: Network.CHILIZ}) +const tatum = await TatumSDK.init({network: Network.CRONOS}) -const block = await tatum.rpc.getBlockByHash('0xdea4839f6bce4f97d9b92b68b054b8c637b20fdbc2b1deaace450b961946eb02', true) +const block = await tatum.rpc.getBlockByHash('0x6565fd5921f93655e77d8cfeab8aa6caaf7155aeae24e91cdca33eedc66e6c5a', true) await tatum.destroy() // Destroy Tatum SDK - needed for stopping background jobs ``` @@ -44,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: `"0xb0ddfcdcc375afce9f365458c5035ca4aaf99f9fe8699522193e16a8718615b6"` + * Example: `"0x6565fd5921f93655e77d8cfeab8aa6caaf7155aeae24e91cdca33eedc66e6c5a"` 2. **`fullTransactionDetails`**: A boolean value indicating whether to return full transaction details or just transaction hashes. * Type: `Boolean` * Example: `true` @@ -84,68 +84,4 @@ If `returnFullTransactionObjects` is `true`, the `transactions` field contains t * **`value`** - The value being transferred (hexadecimal string). * **`gasPrice`** - The gas price in wei (hexadecimal string). * **`gas`** - The gas provided for the transaction (hexadecimal string). -* **`input`** - The input data for the transaction (byte string). - -### JSON-RPC Request and Response Examples - -Here are examples of JSON-RPC request and response for the `eth_getBlockByNumber` method: - -#### Request - -```json -{ - "jsonrpc": "2.0", - "method": "eth_getBlockByHash", - "params": ["0x078610ca461480e4b78557f20e544084cccc4accb41f5c1b7ef792246b78c94b", true], - "id": 1 -} -``` - -#### Response - -```json -{ - "jsonrpc": "2.0", - "id": 1, - "result": { - "difficulty": "0x2", - "extraData": "0xd883010114846765746888676f312e31392e36856c696e75780000008279af9a2f9343c00920c795a7abe84303ee56588946383a15d1e9ee422a7df6dcbe199e4ec93511fe1ffa3c3ab10cb5b12459e8f64553ad3a741e9562e1d5e522c336a400", - "gasLimit": "0x2faed85", - "gasUsed": "0xd81f1", - "hash": "0x078610ca461480e4b78557f20e544084cccc4accb41f5c1b7ef792246b78c94b", - "logsBloom": "0x0020001000000000000001000000000000000000000000040000000000084000000004000800000000c06100800000000000000000010000200000000024008000004000000000000000001800001000a050000000040004000000000000000000000220020200000000000000400800080008000000000000001010004000400000000000010000000000000000000000002400000008000000008000000021022000000000000000000000000000000000000000000000000000000000010010180003000800000000000000000000000000800000000020000082000060000010000000001002010800000000000000020000080000800000000000000000", - "miner": "0x35552c16704d214347f29fa77f77da6d75d7c752", - "mixHash": "0x0000000000000000000000000000000000000000000000000000000000000000", - "nonce": "0x0000000000000000", - "number": "0x1b5dd23", - "parentHash": "0x41f85649fa6d5e58a4631f76724a96dba8313302323f0834b9cf2b63d0308e0f", - "receiptsRoot": "0x81835f75c1f7521016ce3404f19a44f10c4d56b6ab780fad3388d490c154afbe", - "sha3Uncles": "0x1dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347", - "size": "0x8e9", - "stateRoot": "0xda34eefae13e5940f564f3f6cc63c96fb9a0ee015b66552f01a14c2b002b0f7f", - "timestamp": "0x642ea5d2", - "totalDifficulty": "0x36908d2", - "transactions": [ - { - "blockHash": "0x078610ca461480e4b78557f20e544084cccc4accb41f5c1b7ef792246b78c94b", - "blockNumber": "0x1b5dd23", - "from": "0xaa25aa7a19f9c426e07dee59b12f944f4d9f1dd3", - "gas": "0x5208", - "gasPrice": "0x430e23400", - "hash": "0x82544cc4cf767ec9d235f2afa72af2cf468b25c682c302b76390cf0830006174", - "input": "0x", - "nonce": "0x87bf4f", - "to": "0x2fc9076c0ebfa453dee1649721010764cbdf18fc", - "transactionIndex": "0x0", - "value": "0x16345785d8a0000", - "type": "0x0", - "v": "0xe5", - "r": "0x282c0953168acda79a7ec86be5392370bbce08441aa803be0576dfa467a46329", - "s": "0x59e528253c8fe85e72c43d84dd13d6fe724899cf3f94c4800761f2414b2b8f1e" - } - ], - "transactionsRoot": "0xc6939e1f42fa4c4a264a1c1617cc0a6ac7122f3cb5c2848e53b3fba35b33f6ad", - "uncles": [] - } -} -``` +* **`input`** - The input data for the transaction (byte string). \ No newline at end of file diff --git a/v1.0/RPC Nodes/rpc-evm/rpc-chiliz/eth_getblockbynumber.md b/v1.0/RPC Nodes/rpc-evm/rpc-cronos/eth_getblockbynumber.md similarity index 55% rename from v1.0/RPC Nodes/rpc-evm/rpc-chiliz/eth_getblockbynumber.md rename to v1.0/RPC Nodes/rpc-evm/rpc-cronos/eth_getblockbynumber.md index 94563e93..dffa65b1 100644 --- a/v1.0/RPC Nodes/rpc-evm/rpc-chiliz/eth_getblockbynumber.md +++ b/v1.0/RPC Nodes/rpc-evm/rpc-cronos/eth_getblockbynumber.md @@ -1,13 +1,13 @@ --- title: "eth_getblockbynumber" -slug: "rpc-chiliz-eth_getblockbynumber" -excerpt: "Chiliz RPC" +slug: "rpc-cronos-eth_getblockbynumber" +excerpt: "Cronos RPC" category: 65c5e93c623cad004b45d505 hidden: false metadata: - description: "Chiliz RPC" + description: "Cronos RPC" image: [] - keywords: "chiliz, rpc" + keywords: "cronos, rpc" robots: "index" createdAt: "Wed Mar 06 2024 10:35:44 GMT+0000 (Coordinated Universal Time)" updatedAt: "Tue Apr 02 2024 08:40:59 GMT+0000 (Coordinated Universal Time)" @@ -22,9 +22,9 @@ updatedAt: "Tue Apr 02 2024 08:40:59 GMT+0000 (Coordinated Universal Time)" ```typescript // yarn add @tatumio/tatum -import { TatumSDK, Chiliz, Network } from '@tatumio/tatum' +import { TatumSDK, Cronos, Network } from '@tatumio/tatum' -const tatum = await TatumSDK.init({network: Network.Chiliz}) +const tatum = await TatumSDK.init({network: Network.CRONOS}) const block = await tatum.rpc.getBlockByNumber('latest', true) @@ -84,68 +84,4 @@ If `returnFullTransactionObjects` is `true`, the `transactions` field contains t * **`value`** - The value being transferred (hexadecimal string). * **`gasPrice`** - The gas price in wei (hexadecimal string). * **`gas`** - The gas provided for the transaction (hexadecimal string). -* **`input`** - The input data for the transaction (byte string). - -### JSON-RPC Request and Response Examples - -Here are examples of JSON-RPC request and response for the `eth_getBlockByNumber` method: - -#### Request - -```json -{ - "id": 1, - "jsonrpc": "2.0", - "method": "eth_getBlockByNumber", - "params": ["latest", true] -} -``` - -#### Response - -```json -{ - "jsonrpc": "2.0", - "id": 1, - "result": { - "difficulty": "0x2", - "extraData": "0xd883010114846765746888676f312e31392e36856c696e75780000008279af9a2f9343c00920c795a7abe84303ee56588946383a15d1e9ee422a7df6dcbe199e4ec93511fe1ffa3c3ab10cb5b12459e8f64553ad3a741e9562e1d5e522c336a400", - "gasLimit": "0x2faed85", - "gasUsed": "0xd81f1", - "hash": "0x078610ca461480e4b78557f20e544084cccc4accb41f5c1b7ef792246b78c94b", - "logsBloom": "0x0020001000000000000001000000000000000000000000040000000000084000000004000800000000c06100800000000000000000010000200000000024008000004000000000000000001800001000a050000000040004000000000000000000000220020200000000000000400800080008000000000000001010004000400000000000010000000000000000000000002400000008000000008000000021022000000000000000000000000000000000000000000000000000000000010010180003000800000000000000000000000000800000000020000082000060000010000000001002010800000000000000020000080000800000000000000000", - "miner": "0x35552c16704d214347f29fa77f77da6d75d7c752", - "mixHash": "0x0000000000000000000000000000000000000000000000000000000000000000", - "nonce": "0x0000000000000000", - "number": "0x1b5dd23", - "parentHash": "0x41f85649fa6d5e58a4631f76724a96dba8313302323f0834b9cf2b63d0308e0f", - "receiptsRoot": "0x81835f75c1f7521016ce3404f19a44f10c4d56b6ab780fad3388d490c154afbe", - "sha3Uncles": "0x1dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347", - "size": "0x8e9", - "stateRoot": "0xda34eefae13e5940f564f3f6cc63c96fb9a0ee015b66552f01a14c2b002b0f7f", - "timestamp": "0x642ea5d2", - "totalDifficulty": "0x36908d2", - "transactions": [ - { - "blockHash": "0x078610ca461480e4b78557f20e544084cccc4accb41f5c1b7ef792246b78c94b", - "blockNumber": "0x1b5dd23", - "from": "0xaa25aa7a19f9c426e07dee59b12f944f4d9f1dd3", - "gas": "0x5208", - "gasPrice": "0x430e23400", - "hash": "0x82544cc4cf767ec9d235f2afa72af2cf468b25c682c302b76390cf0830006174", - "input": "0x", - "nonce": "0x87bf4f", - "to": "0x2fc9076c0ebfa453dee1649721010764cbdf18fc", - "transactionIndex": "0x0", - "value": "0x16345785d8a0000", - "type": "0x0", - "v": "0xe5", - "r": "0x282c0953168acda79a7ec86be5392370bbce08441aa803be0576dfa467a46329", - "s": "0x59e528253c8fe85e72c43d84dd13d6fe724899cf3f94c4800761f2414b2b8f1e" - } - ], - "transactionsRoot": "0xc6939e1f42fa4c4a264a1c1617cc0a6ac7122f3cb5c2848e53b3fba35b33f6ad", - "uncles": [] - } -} -``` +* **`input`** - The input data for the transaction (byte string). \ No newline at end of file diff --git a/v1.0/RPC Nodes/rpc-evm/rpc-cronos/eth_getblocktransactioncountbyhash.md b/v1.0/RPC Nodes/rpc-evm/rpc-cronos/eth_getblocktransactioncountbyhash.md new file mode 100644 index 00000000..31b6898c --- /dev/null +++ b/v1.0/RPC Nodes/rpc-evm/rpc-cronos/eth_getblocktransactioncountbyhash.md @@ -0,0 +1,55 @@ +--- +title: "eth_getblocktransactioncountbyhash" +slug: "rpc-cronos-eth_getblocktransactioncountbyhash" +excerpt: "Cronos RPC" +category: 65c5e93c623cad004b45d505 +hidden: false +metadata: + description: "Cronos RPC" + image: [] + keywords: "cronos, rpc" + robots: "index" +createdAt: "Wed Mar 06 2024 10:35:44 GMT+0000 (Coordinated Universal Time)" +updatedAt: "Tue Apr 02 2024 08:40:59 GMT+0000 (Coordinated Universal Time)" +--- +[block:html]{"html":"
\n
Archive Method
\n

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

\n
"}[/block] + +### How to use it + +{% tabs %} +{% tab title="TypeScript/JavaScript" %} +{% code overflow="wrap" lineNumbers="true" %} +```typescript +// yarn add @tatumio/tatum + +import { TatumSDK, Cronos, Network } from '@tatumio/tatum' + +const tatum = await TatumSDK.init({network: Network.CRONOS}) + +const response = await tatum.rpc.getBlockTransactionCountByHash('0x6565fd5921f93655e77d8cfeab8aa6caaf7155aeae24e91cdca33eedc66e6c5a') + +await tatum.destroy() // Destroy Tatum SDK - needed for stopping background jobs +``` +{% endcode %} +{% endtab %} +{% endtabs %} + +### Overview + +`eth_getBlockTransactionCountByHash` is an RPC method used to fetch the number of transactions in a block by the block's hash. It is useful when you want to know the total number of transactions included in a specific block and don't want to retrieve the entire block data. This method can be used in various scenarios, such as monitoring the network activity or estimating transaction confirmation times. + +### Parameters + +This method requires a single parameter: + +* **`blockHash`**: The hash of the target block for which the transaction count will be retrieved. It should be a valid 32-byte hex string. + +Example of the parameter: + +* `blockHash`: `"0x6565fd5921f93655e77d8cfeab8aa6caaf7155aeae24e91cdca33eedc66e6c5a"` + +### Return + +The method returns a single value: + +* `transactionCount`: The total number of transactions included in the specified block. It is returned as a hexadecimal value. \ No newline at end of file diff --git a/v1.0/RPC Nodes/rpc-evm/rpc-chiliz/eth_getblocktransactioncountbynumber.md b/v1.0/RPC Nodes/rpc-evm/rpc-cronos/eth_getblocktransactioncountbynumber.md similarity index 73% rename from v1.0/RPC Nodes/rpc-evm/rpc-chiliz/eth_getblocktransactioncountbynumber.md rename to v1.0/RPC Nodes/rpc-evm/rpc-cronos/eth_getblocktransactioncountbynumber.md index 96a1c3a2..c678be64 100644 --- a/v1.0/RPC Nodes/rpc-evm/rpc-chiliz/eth_getblocktransactioncountbynumber.md +++ b/v1.0/RPC Nodes/rpc-evm/rpc-cronos/eth_getblocktransactioncountbynumber.md @@ -1,13 +1,13 @@ --- title: "eth_getblocktransactioncountbynumber" -slug: "rpc-chiliz-eth_getblocktransactioncountbynumber" -excerpt: "Chiliz RPC" +slug: "rpc-cronos-eth_getblocktransactioncountbynumber" +excerpt: "Cronos RPC" category: 65c5e93c623cad004b45d505 hidden: false metadata: - description: "Chiliz RPC" + description: "Cronos RPC" image: [] - keywords: "chiliz, rpc" + keywords: "cronos, rpc" robots: "index" createdAt: "Wed Mar 06 2024 10:35:44 GMT+0000 (Coordinated Universal Time)" updatedAt: "Tue Apr 02 2024 08:40:59 GMT+0000 (Coordinated Universal Time)" @@ -22,11 +22,11 @@ updatedAt: "Tue Apr 02 2024 08:40:59 GMT+0000 (Coordinated Universal Time)" ```typescript // yarn add @tatumio/tatum -import { TatumSDK, Chiliz, Network } from '@tatumio/tatum' +import { TatumSDK, Cronos, Network } from '@tatumio/tatum' + +const tatum = await TatumSDK.init({network: Network.CRONOS}) -const tatum = await TatumSDK.init({network: Network.CHILIZ}) - -const response = await tatum.rpc.getBlockTransactionCountByNumber('0x65B9AB') +const response = await tatum.rpc.getBlockTransactionCountByNumber('0xC44FF8') await tatum.destroy() // Destroy Tatum SDK - needed for stopping background jobs ``` @@ -41,37 +41,10 @@ The `eth_getBlockTransactionCountByNumber` JSON-RPC method allows you to retriev ### 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: 371156 + * Example: `"0xC44FF8"` ### Return Object The return object is a hex-encoded value representing the number of transactions in the specified block. -* Example: `"0x1"` (1 transactions) - -### JSON-RPC Request and Response Examples - -#### Request - -```json -{ - "jsonrpc": "2.0", - "id": 1, - "method": "eth_getBlockTransactionCountByNumber", - "params": [371156] -} -``` - -#### Response - -```json -{ - "jsonrpc": "2.0", - "id": 1, - "result": "0x1" -} -``` - - - -\ +* Example: `"0xa"` (10 transactions) \ No newline at end of file diff --git a/v1.0/RPC Nodes/rpc-evm/rpc-chiliz/eth_getcode.md b/v1.0/RPC Nodes/rpc-evm/rpc-cronos/eth_getcode.md similarity index 76% rename from v1.0/RPC Nodes/rpc-evm/rpc-chiliz/eth_getcode.md rename to v1.0/RPC Nodes/rpc-evm/rpc-cronos/eth_getcode.md index 4021b728..1d7e21ed 100644 --- a/v1.0/RPC Nodes/rpc-evm/rpc-chiliz/eth_getcode.md +++ b/v1.0/RPC Nodes/rpc-evm/rpc-cronos/eth_getcode.md @@ -1,13 +1,13 @@ --- title: "eth_getcode" -slug: "rpc-chiliz-eth_getcode" -excerpt: "Chiliz RPC" +slug: "rpc-cronos-eth_getcode" +excerpt: "Cronos RPC" category: 65c5e93c623cad004b45d505 hidden: false metadata: - description: "Chiliz RPC" + description: "Cronos RPC" image: [] - keywords: "chiliz, rpc" + keywords: "cronos, rpc" robots: "index" createdAt: "Wed Mar 06 2024 10:35:44 GMT+0000 (Coordinated Universal Time)" updatedAt: "Tue Apr 02 2024 08:40:59 GMT+0000 (Coordinated Universal Time)" @@ -22,11 +22,11 @@ updatedAt: "Tue Apr 02 2024 08:40:59 GMT+0000 (Coordinated Universal Time)" ```typescript // yarn add @tatumio/tatum -import { TatumSDK, Chiliz, Network } from '@tatumio/tatum' +import { TatumSDK, Cronos, Network } from '@tatumio/tatum' + +const tatum = await TatumSDK.init({network: Network.CRONOS}) -const tatum = await TatumSDK.init({network: Network.CHILIZ}) - -const code = await tatum.rpc.getCode('0x11D28Ee5fcc421a5B7498a703EEC3338381941a9') +const code = await tatum.rpc.getCode('0x523D6F30C4aaca133DAAD97eE2A0C48235bfF137') await tatum.destroy() // Destroy Tatum SDK - needed for stopping background jobs ``` @@ -49,7 +49,7 @@ Use cases for this method could include: The `eth_getCode` method accepts two parameters: 1. **`address`** (string): The address of the contract whose bytecode you want to retrieve. This should be a 20-byte address, formatted as a hex string with a `0x` prefix. - * Example: `"0x6eA7d015342b7eb7344F7ebf0150234f41F524d6"` + * Example: `"0x523D6F30C4aaca133DAAD97eE2A0C48235bfF137"` 2. **`block`** (string): The block number at which you want to retrieve the contract code. This can be specified as a hex string or one of the following special keywords: * `"earliest"`: The first block in the blockchain * `"latest"`: The most recent block in the blockchain @@ -61,30 +61,4 @@ The `eth_getCode` method accepts two parameters: The `eth_getCode` method returns a string representing the contract bytecode. The returned value is a hex string with a `0x` prefix. * If the account has contract code, the returned string will contain the bytecode. -* If the account is not a contract or does not exist, the returned string will be `0x`. - -### JSON Examples - -#### Request - -```json -{ - "id": 1, - "jsonrpc": "2.0", - "method": "eth_getCode", - "params": [ - "0x6eA7d015342b7eb7344F7ebf0150234f41F524d6", - "latest" - ] -} -``` - -#### Response - -```json -{ - "id": 1, - "jsonrpc": "2.0", - "result": "0x606060...code_here...3839" -} -``` +* If the account is not a contract or does not exist, the returned string will be `0x`. \ No newline at end of file diff --git a/v1.0/RPC Nodes/rpc-evm/rpc-chiliz/eth_getlogs.md b/v1.0/RPC Nodes/rpc-evm/rpc-cronos/eth_getlogs.md similarity index 72% rename from v1.0/RPC Nodes/rpc-evm/rpc-chiliz/eth_getlogs.md rename to v1.0/RPC Nodes/rpc-evm/rpc-cronos/eth_getlogs.md index fb10cf01..7892772e 100644 --- a/v1.0/RPC Nodes/rpc-evm/rpc-chiliz/eth_getlogs.md +++ b/v1.0/RPC Nodes/rpc-evm/rpc-cronos/eth_getlogs.md @@ -1,13 +1,13 @@ --- title: "eth_getlogs" -slug: "rpc-chiliz-eth_getlogs" -excerpt: "Chiliz RPC" +slug: "rpc-cronos-eth_getlogs" +excerpt: "Cronos RPC" category: 65c5e93c623cad004b45d505 hidden: false metadata: - description: "Chiliz RPC" + description: "Cronos RPC" image: [] - keywords: "chiliz, rpc" + keywords: "cronos, rpc" robots: "index" createdAt: "Wed Mar 06 2024 10:35:44 GMT+0000 (Coordinated Universal Time)" updatedAt: "Tue Apr 02 2024 08:40:59 GMT+0000 (Coordinated Universal Time)" @@ -22,11 +22,11 @@ updatedAt: "Tue Apr 02 2024 08:40:59 GMT+0000 (Coordinated Universal Time)" ```typescript // yarn add @tatumio/tatum -import { TatumSDK, Chiliz, Network } from '@tatumio/tatum' +import { TatumSDK, Cronos, Network } from '@tatumio/tatum' + +const tatum = await TatumSDK.init({network: Network.CRONOS}) -const tatum = await TatumSDK.init({network: Network.CHILIZ}) - -const logs = await tatum.rpc.getLogs({ address : '0x11D28Ee5fcc421a5B7498a703EEC3338381941a9'}) +const logs = await tatum.rpc.getLogs({ address : '0x523D6F30C4aaca133DAAD97eE2A0C48235bfF137'}) await tatum.destroy() // Destroy Tatum SDK - needed for stopping background jobs ``` @@ -49,7 +49,7 @@ The `eth_getLogs` method takes a single input parameter: an object containing th * **`toBlock`**: (optional) The ending block number for the search. Can be a block number or one of the following strings: `"earliest"`, `"latest"`, or `"pending"`. * Example: `"toBlock": "0x2"` * **`address`**: (optional) The address or list of addresses of the contracts to filter logs from. Can be a single address or an array of addresses. - * Example: `"address": "0x742d35Cc6634C0532925a3b844Bc454e4438f44e"` + * Example: `"address": "0x523D6F30C4aaca133DAAD97eE2A0C48235bfF137"` * **`topics`**: (optional) An array of up to four 32-byte topics. Topics are order-dependent, and each topic can be an array of topic hashes or `null`. * Example: `"topics": ["0x123..."]` * **`blockhash`**: (optional) The block hash to filter logs from. If provided, `fromBlock` and `toBlock` are ignored. @@ -78,48 +78,4 @@ The `eth_getLogs` method returns an array of log objects. Each log object contai * **`data`**: The data associated with the log. * Example: `"data":"0x0000000000000000000000000000000000000000000000000000000000000020"` * **`topics`**: An array of topics (order-dependent) associated with the log. - * Example: `"topics": ["0x123..."]` - -## JSON-RPC Examples - -#### Request - -```json -{ - "id": 1, - "jsonrpc": "2.0", - "method": "eth_getLogs", - "params": [ - { - "fromBlock": "0x1", - "toBlock": "0x2", - "address": "0x6eA7d015342b7eb7344F7ebf0150234f41F524d6", - "topics": ["0x123..."] - } - ] -} -``` - -#### Response - -```json -{ - "id": 1, - "jsonrpc": "2.0", - "result": [ - { - "removed": false, - "logIndex": "0x1", - "transactionIndex": "0x0", - "transactionHash": "0x88eef...", - "blockHash": "0xc6ef9...", - "blockNumber": "0x1", - "address": "0x742d35Cc6634C0532925a3b844Bc454e4438f44e", - "data": "0x0000000000000000000000000000000000000000000000000000000000000020", - "topics": ["0x123..."] - } - ] -} -``` - -This documentation provides a comprehensive overview of the `eth_getLogs` JSON-RPC 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. + * Example: `"topics": ["0x123..."]` \ No newline at end of file diff --git a/v1.0/RPC Nodes/rpc-evm/rpc-chiliz/eth_getproof.md b/v1.0/RPC Nodes/rpc-evm/rpc-cronos/eth_getproof.md similarity index 54% rename from v1.0/RPC Nodes/rpc-evm/rpc-chiliz/eth_getproof.md rename to v1.0/RPC Nodes/rpc-evm/rpc-cronos/eth_getproof.md index cb0e4051..1a32ee67 100644 --- a/v1.0/RPC Nodes/rpc-evm/rpc-chiliz/eth_getproof.md +++ b/v1.0/RPC Nodes/rpc-evm/rpc-cronos/eth_getproof.md @@ -1,13 +1,13 @@ --- title: "eth_getproof" -slug: "rpc-chiliz-eth_getproof" -excerpt: "Chiliz RPC" +slug: "rpc-cronos-eth_getproof" +excerpt: "Cronos RPC" category: 65c5e93c623cad004b45d505 hidden: false metadata: - description: "Chiliz RPC" + description: "Cronos RPC" image: [] - keywords: "chiliz, rpc" + keywords: "cronos, rpc" robots: "index" createdAt: "Wed Mar 06 2024 10:35:44 GMT+0000 (Coordinated Universal Time)" updatedAt: "Tue Apr 02 2024 08:40:59 GMT+0000 (Coordinated Universal Time)" @@ -22,13 +22,13 @@ updatedAt: "Tue Apr 02 2024 08:40:59 GMT+0000 (Coordinated Universal Time)" ```typescript // yarn add @tatumio/tatum -import { TatumSDK, Chiliz, Network } from '@tatumio/tatum' +import { TatumSDK, Cronos, Network } from '@tatumio/tatum' + +const tatum = await TatumSDK.init({network: Network.CRONOS}) -const tatum = await TatumSDK.init({network: Network.CHILIZ}) - -const result = await tatum.rpc.getProof("0x11D28Ee5fcc421a5B7498a703EEC3338381941a9", -["0x0000000000000000000000000000000000000000000000000000000000000000"], -"latest") +const result = await tatum.rpc.getProof("0x523D6F30C4aaca133DAAD97eE2A0C48235bfF137", + ["0x0000000000000000000000000000000000000000000000000000000000000000"], + "latest") await tatum.destroy() // Destroy Tatum SDK - needed for stopping background jobs ``` @@ -38,13 +38,13 @@ await tatum.destroy() // Destroy Tatum SDK - needed for stopping background jobs ### Overview -The `eth_getProof` is a JSON-RPC method that retrieves the Merkle-Patricia proof for an account, storage key-value pairs, and account transaction count. It allows developers to verify the state of an account or storage value at a specific block without needing the entire state trie. This method is particularly useful for light clients or off-chain applications that require proof of an account's state or specific storage values. +The `eth_getProof` is an JSON-RPC method that retrieves the Merkle-Patricia proof for an account, storage key-value pairs, and account transaction count. It allows developers to verify the state of an account or storage value at a specific block without needing the entire state trie. This method is particularly useful for light clients or off-chain applications that require proof of an account's state or specific storage values. ### Parameters 1. **`address`** - `Data`, 20 Bytes * The address of the account. - * Example: `"0xBB52B2B91488d60eFb6848bBadd000005A511E5C"` + * Example: `"0x523D6F30C4aaca133DAAD97eE2A0C48235bfF137"` 2. **`keys`** - `Array` of `Data` * An array of storage keys for which the proof should be generated. * Example: `["0x0000000000000000000000000000000000000000000000000000000000000000"]` @@ -68,53 +68,4 @@ The method returns an object containing the following fields: * An array of storage proof objects, one for each requested key, containing the following fields: * `key` - `Data`, 32 Bytes: The storage key. * `value` - `Quantity`: The storage value. - * `proof` - `Array` of `Data`: The serialized Merkle-Patricia proof for the key-value pair. - -### JSON-RPC Request and Response Examples - -_Request_: - -```json -{ - "id": 1, - "jsonrpc": "2.0", - "method": "eth_getProof", - "params": [ - "0xBB52B2B91488d60eFb6848bBadd000005A511E5C", - [ - "0x0000000000000000000000000000000000000000000000000000000000000000" - ], - "latest" - ] -} -``` - -_Response_: - -```json -{ - "id": 1, - "jsonrpc": "2.0", - "result": { - "accountProof": [ - "0x...", - "0x...", - "0x..." - ], - "balance": "0xde0b6b3a7640000", - "codeHash": "0x...", - "nonce": "0x1", - "storageProof": [ - { - "key": "0x0000000000000000000000000000000000000000000000000000000000000000", - "value": "0xde0b6b3a7640000", - "proof": [ - "0x...", - "0x...", - "0x..." - ] - } - ] - } -} -``` + * `proof` - `Array` of `Data`: The serialized Merkle-Patricia proof for the key-value pair. \ No newline at end of file diff --git a/v1.0/RPC Nodes/rpc-evm/rpc-chiliz/eth_getstorageat.md b/v1.0/RPC Nodes/rpc-evm/rpc-cronos/eth_getstorageat.md similarity index 71% rename from v1.0/RPC Nodes/rpc-evm/rpc-chiliz/eth_getstorageat.md rename to v1.0/RPC Nodes/rpc-evm/rpc-cronos/eth_getstorageat.md index 42615d10..f6078b3f 100644 --- a/v1.0/RPC Nodes/rpc-evm/rpc-chiliz/eth_getstorageat.md +++ b/v1.0/RPC Nodes/rpc-evm/rpc-cronos/eth_getstorageat.md @@ -1,13 +1,13 @@ --- title: "eth_getstorageat" -slug: "rpc-chiliz-eth_getstorageat" -excerpt: "Chiliz RPC" +slug: "rpc-cronos-eth_getstorageat" +excerpt: "Cronos RPC" category: 65c5e93c623cad004b45d505 hidden: false metadata: - description: "Chiliz RPC" + description: "Cronos RPC" image: [] - keywords: "chiliz, rpc" + keywords: "cronos, rpc" robots: "index" createdAt: "Wed Mar 06 2024 10:35:44 GMT+0000 (Coordinated Universal Time)" updatedAt: "Tue Apr 02 2024 08:40:59 GMT+0000 (Coordinated Universal Time)" @@ -22,11 +22,11 @@ updatedAt: "Tue Apr 02 2024 08:40:59 GMT+0000 (Coordinated Universal Time)" ```typescript // yarn add @tatumio/tatum -import { TatumSDK, Chiliz, Network } from '@tatumio/tatum' +import { TatumSDK, Cronos, Network } from '@tatumio/tatum' + +const tatum = await TatumSDK.init({network: Network.CRONOS}) -const tatum = await TatumSDK.init({network: Network.CHILIZ}) - -const response = await tatum.rpc.getStorageAt('0x11D28Ee5fcc421a5B7498a703EEC3338381941a9', '0x0') +const response = await tatum.rpc.getStorageAt('0x523D6F30C4aaca133DAAD97eE2A0C48235bfF137', '0x0') await tatum.destroy() // Destroy Tatum SDK - needed for stopping background jobs ``` @@ -43,7 +43,7 @@ await tatum.destroy() // Destroy Tatum SDK - needed for stopping background jobs `eth_getStorageAt` accepts three parameters: 1. **`address`**: The address of the contract you want to query. - * Example: `"0x6eA7d015342b7eb7344F7ebf0150234f41F524d6"` + * Example: `"0x523D6F30C4aaca133DAAD97eE2A0C48235bfF137"` 2. **`position`**: The storage position (slot) you want to query. * Example: `"0x0"` 3. **`blockParameter`**: The block number, block hash, or one of the string literals (`"earliest"`, `"latest"` or `"pending"`), representing the point in the blockchain to query the storage value. @@ -53,30 +53,4 @@ await tatum.destroy() // Destroy Tatum SDK - needed for stopping background jobs The return object is a single string value, representing the storage value at the given position in the contract. -* `result`: The storage value in a 32-byte (64 character) hexadecimal format. - -### JSON-RPC Request Example - -```json -{ - "id": 1, - "jsonrpc": "2.0", - "method": "eth_getStorageAt", - "params": [ - "0x6eA7d015342b7eb7344F7ebf0150234f41F524d6", - "0x0" - ] -} -``` - -### JSON-RPC Response Example - -```json -{ - "id": 1, - "jsonrpc": "2.0", - "result": "0x0000000000000000000000000000000000000000000000000000000000000001" -} -``` - -\ +* `result`: The storage value in a 32-byte (64 character) hexadecimal format. \ No newline at end of file diff --git a/v1.0/RPC Nodes/rpc-evm/rpc-cronos/eth_gettransactionbyblockhashandindex.md b/v1.0/RPC Nodes/rpc-evm/rpc-cronos/eth_gettransactionbyblockhashandindex.md new file mode 100644 index 00000000..44b52298 --- /dev/null +++ b/v1.0/RPC Nodes/rpc-evm/rpc-cronos/eth_gettransactionbyblockhashandindex.md @@ -0,0 +1,70 @@ +--- +title: "eth_gettransactionbyblockhashandindex" +slug: "rpc-cronos-eth_gettransactionbyblockhashandindex" +excerpt: "Cronos RPC" +category: 65c5e93c623cad004b45d505 +hidden: false +metadata: + description: "Cronos RPC" + image: [] + keywords: "cronos, rpc" + robots: "index" +createdAt: "Wed Mar 06 2024 10:35:44 GMT+0000 (Coordinated Universal Time)" +updatedAt: "Tue Apr 02 2024 08:40:59 GMT+0000 (Coordinated Universal Time)" +--- +[block:html]{"html":"
\n
Archive Method
\n

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

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

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

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

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

\n
"}[/block] + +### How to use it + +{% tabs %} +{% tab title="TypeScript/JavaScript" %} +{% code overflow="wrap" lineNumbers="true" %} +```typescript +// yarn add @tatumio/tatum + +import { TatumSDK, Cronos, Network } from '@tatumio/tatum' + +const tatum = await TatumSDK.init({network: Network.CRONOS}) + +const tx = await tatum.rpc.getTransactionByHash('0x068f00756843c4fa018771decb06767e0e6a57045eabcbce1125a56115f2742a') + +await tatum.destroy() // Destroy Tatum SDK - needed for stopping background jobs +``` +{% endcode %} +{% endtab %} +{% endtabs %} + +### Overview + +`eth_getTransactionByHash` is an JSON-RPC method that allows you to query transaction details based on its hash. This method is useful when you want to retrieve information about a specific transaction, such as its sender, receiver, value, and more. Common use cases include tracking transaction status, monitoring incoming transactions, or analyzing historical transaction data. + +### Parameters + +The `eth_getTransactionByHash` method takes one parameter: + +* **`transactionHash`**: The hash of the transaction you want to retrieve. This should be a 32-byte hash string with a `0x` prefix. + * Example: `"0x068f00756843c4fa018771decb06767e0e6a57045eabcbce1125a56115f2742a"` + +### Return Object + +The method returns a transaction object with the following fields: + +* **`hash`**: The hash of the transaction (32 bytes). +* **`nonce`**: The number of transactions sent by the sender prior to this one (integer). +* **`blockHash`**: The hash of the block in which the transaction was included (32 bytes), or `null` if the transaction is not yet mined. +* **`blockNumber`**: The block number in which the transaction was included (integer), or `null` if the transaction is not yet mined. +* **`transactionIndex`**: The index of the transaction in the block (integer), or `null` if the transaction is not yet mined. +* **`from`**: The address of the sender (20 bytes). +* **`to`**: The address of the receiver (20 bytes), or `null` for contract creation transactions. +* **`value`**: The value transferred in the transaction, in wei. +* **`gasPrice`**: The price of gas for the transaction, in wei. +* **`maxFeePerGas`** - The maximum fee per gas set in the transaction. +* **`maxPriorityFeePerGas`** - The maximum priority gas fee set in the transaction. +* **`gas`**: The maximum amount of gas the transaction is allowed to consume. +* **`input`**: The data payload of the transaction (string), or `0x` for simple value transfers. \ No newline at end of file diff --git a/v1.0/RPC Nodes/rpc-evm/rpc-chiliz/eth_gettransactioncount.md b/v1.0/RPC Nodes/rpc-evm/rpc-cronos/eth_gettransactioncount.md similarity index 58% rename from v1.0/RPC Nodes/rpc-evm/rpc-chiliz/eth_gettransactioncount.md rename to v1.0/RPC Nodes/rpc-evm/rpc-cronos/eth_gettransactioncount.md index 3adf2161..74204ec5 100644 --- a/v1.0/RPC Nodes/rpc-evm/rpc-chiliz/eth_gettransactioncount.md +++ b/v1.0/RPC Nodes/rpc-evm/rpc-cronos/eth_gettransactioncount.md @@ -1,13 +1,13 @@ --- title: "eth_gettransactioncount" -slug: "rpc-chiliz-eth_gettransactioncount" -excerpt: "Chiliz RPC" +slug: "rpc-cronos-eth_gettransactioncount" +excerpt: "Cronos RPC" category: 65c5e93c623cad004b45d505 hidden: false metadata: - description: "Chiliz RPC" + description: "Cronos RPC" image: [] - keywords: "chiliz, rpc" + keywords: "cronos, rpc" robots: "index" createdAt: "Wed Mar 06 2024 10:35:44 GMT+0000 (Coordinated Universal Time)" updatedAt: "Tue Apr 02 2024 08:40:59 GMT+0000 (Coordinated Universal Time)" @@ -19,17 +19,22 @@ 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 -import { TatumSDK, Chiliz, Network } from '@tatumio/tatum' +import { TatumSDK, Cronos, Network } from "@tatumio/tatum"; -const tatum = await TatumSDK.init({network: Network.CHILIZ}) +const tatum = await TatumSDK.init({ network: Network.CRONOS }); -const result = await tatum.rpc.getTransactionCount('0x3E18a8c3348447E3e69c847FbAA07117E2f46a1b', 'latest') +const result = await tatum.rpc.getTransactionCount( + "0xa8622d582dc31e5d1c1871a1509f40aa690352ce", + "latest" +); -await tatum.destroy() // Destroy Tatum SDK - needed for stopping background jobs +await tatum.destroy(); // Destroy Tatum SDK - needed for stopping background jobs ``` + {% endcode %} {% endtab %} {% endtabs %} @@ -40,55 +45,23 @@ The `eth_getTransactionCount` method is an JSON-RPC method that retrieves the nu Use cases for this method include: -* Determining the nonce value for a new transaction to be sent from a specific address -* Monitoring the number of transactions sent by an address to observe its activity -* Troubleshooting transaction issues and verifying if a transaction was submitted successfully +- Determining the nonce value for a new transaction to be sent from a specific address +- Monitoring the number of transactions sent by an address to observe its activity +- Troubleshooting transaction issues and verifying if a transaction was submitted successfully ### Parameters The `eth_getTransactionCount` method accepts two parameters: 1. **`address`** - The address whose transaction count will be retrieved. - * Example: `"0xBB52B2B91488d60eFb6848bBadd000005A511E5C"` + - Example: `"0xa8622d582dc31e5d1c1871a1509f40aa690352ce"` 2. **`blockParameter`** - A string indicating the block number or block state to consider when retrieving the transaction count. - * Possible values: `"earliest"`, `"latest"`, `"pending"`, or a specific block number in hexadecimal format - * Example: `"latest"` + - Possible values: `"earliest"`, `"latest"`, `"pending"`, or a specific block number in hexadecimal format + - Example: `"latest"` ### Return Object The method returns a single value: -* **`transactionCount`** - A hexadecimal representation of the number of transactions sent from the specified address. - * Example: `"0x1e"` - -### JSON-RPC Request and Response Examples - -_Request_: - -```json -{ - "jsonrpc": "2.0", - "id": 1, - "method": "eth_getTransactionCount", - "params": [ - "0xBB52B2B91488d60eFb6848bBadd000005A511E5C", - "latest" - ] -} -``` - -_Response_: - -```json -{ - "jsonrpc": "2.0", - "id": 1, - "result": { - "BigNumber": { - "s": 1, - "e": 0, - "c": [1] - } - } -} -``` +- **`transactionCount`** - A hexadecimal representation of the number of transactions sent from the specified address. + - Example: `"0x1e"` diff --git a/v1.0/RPC Nodes/rpc-evm/rpc-chiliz/eth_gettransactionreceipt.md b/v1.0/RPC Nodes/rpc-evm/rpc-cronos/eth_gettransactionreceipt.md similarity index 59% rename from v1.0/RPC Nodes/rpc-evm/rpc-chiliz/eth_gettransactionreceipt.md rename to v1.0/RPC Nodes/rpc-evm/rpc-cronos/eth_gettransactionreceipt.md index b80dc4eb..4b659022 100644 --- a/v1.0/RPC Nodes/rpc-evm/rpc-chiliz/eth_gettransactionreceipt.md +++ b/v1.0/RPC Nodes/rpc-evm/rpc-cronos/eth_gettransactionreceipt.md @@ -1,13 +1,13 @@ --- title: "eth_gettransactionreceipt" -slug: "rpc-chiliz-eth_gettransactionreceipt" -excerpt: "Chiliz RPC" +slug: "rpc-cronos-eth_gettransactionreceipt" +excerpt: "Cronos RPC" category: 65c5e93c623cad004b45d505 hidden: false metadata: - description: "Chiliz RPC" + description: "Cronos RPC" image: [] - keywords: "chiliz, rpc" + keywords: "cronos, rpc" robots: "index" createdAt: "Wed Mar 06 2024 10:35:44 GMT+0000 (Coordinated Universal Time)" updatedAt: "Tue Apr 02 2024 08:40:59 GMT+0000 (Coordinated Universal Time)" @@ -22,11 +22,11 @@ updatedAt: "Tue Apr 02 2024 08:40:59 GMT+0000 (Coordinated Universal Time)" ```typescript // yarn add @tatumio/tatum -import { TatumSDK, Chiliz, Network } from '@tatumio/tatum' +import { TatumSDK, Cronos, Network } from '@tatumio/tatum' -const tatum = await TatumSDK.init({network: Network.CHILIZ}) +const tatum = await TatumSDK.init({network: Network.CRONOS}) -const tx = await tatum.rpc.getTransactionReceipt('0x98ce8f8d9b941cda7d1f199daba347a321514cb223dee06ef7e4fa0094882fc7') +const tx = await tatum.rpc.getTransactionReceipt('0x6aefbd1a9c9e4c310cadde3bcdd809a14da87caa8fa4f10ca04d9e357a3907e9') await tatum.destroy() // Destroy Tatum SDK - needed for stopping background jobs ``` @@ -43,7 +43,7 @@ await tatum.destroy() // Destroy Tatum SDK - needed for stopping background jobs This method requires a single parameter: * **`transactionHash`**: The hash of the transaction for which you want to obtain the receipt. - * Example: `"0x97d83656ca05890100149be18d0c2a2f94e5337e5e6a643ea78794cd418cdbc7"` + * Example: `"0x068f00756843c4fa018771decb06767e0e6a57045eabcbce1125a56115f2742a"` ### Return Object @@ -60,46 +60,4 @@ The method returns an object containing the following fields: * **`contractAddress`**: The address of the contract created, if the transaction was a contract creation. Otherwise, `null`. * **`logs`**: An array of log objects, which were emitted during the transaction. * **`logsBloom`**: A 256-byte bloom filter, which is a compressed representation of the logs emitted during the transaction. -* **`status`**: The status of the transaction's execution. `"0x1"` indicates success, while `"0x0"` indicates failure. - -### JSON-RPC Examples - -Request: - -```json -{ - "jsonrpc": "2.0", - "id": 1, - "method": "eth_getTransactionReceipt", - "params": [ - "0x97d83656ca05890100149be18d0c2a2f94e5337e5e6a643ea78794cd418cdbc7" - ] -} -``` - -Response: - -```json -{ - "jsonrpc": "2.0", - "id": 1, - "result": { - "blockHash": "0xb0ddfcdcc375afce9f365458c5035ca4aaf99f9fe8699522193e16a8718615b6", - "blockNumber": "0x5a9d4", - "transactionIndex": "0x0", - "transactionHash": "0x97d83656ca05890100149be18d0c2a2f94e5337e5e6a643ea78794cd418cdbc7", - "type": "0x2", - "from": "0x8bd5723981d3f96a6544519c4a075f5994919d3a", - "to": "0xa55d9ef16af921b70fed1421c1d298ca5a3a18f1", - "effectiveGasPrice": "0x5017ff700", - "contractAddress": null, - "logs": [], - "logsBloom": "0x00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000", - "gasUsed": "0x12a68", - "cumulativeGasUsed": "0x12a68", - "status": "0x1" - } -} -``` - -\ +* **`status`**: The status of the transaction's execution. `"0x1"` indicates success, while `"0x0"` indicates failure. \ No newline at end of file diff --git a/v1.0/RPC Nodes/rpc-evm/rpc-chiliz/eth_getunclecountbyblockhash.md b/v1.0/RPC Nodes/rpc-evm/rpc-cronos/eth_getunclecountbyblockhash.md similarity index 60% rename from v1.0/RPC Nodes/rpc-evm/rpc-chiliz/eth_getunclecountbyblockhash.md rename to v1.0/RPC Nodes/rpc-evm/rpc-cronos/eth_getunclecountbyblockhash.md index 9e229999..ec0d1e3a 100644 --- a/v1.0/RPC Nodes/rpc-evm/rpc-chiliz/eth_getunclecountbyblockhash.md +++ b/v1.0/RPC Nodes/rpc-evm/rpc-cronos/eth_getunclecountbyblockhash.md @@ -1,13 +1,13 @@ --- title: "eth_getunclecountbyblockhash" -slug: "rpc-chiliz-eth_getunclecountbyblockhash" -excerpt: "Chiliz RPC" +slug: "rpc-cronos-eth_getunclecountbyblockhash" +excerpt: "Cronos RPC" category: 65c5e93c623cad004b45d505 hidden: false metadata: - description: "Chiliz RPC" + description: "Cronos RPC" image: [] - keywords: "chiliz, rpc" + keywords: "cronos, rpc" robots: "index" createdAt: "Wed Mar 06 2024 10:35:44 GMT+0000 (Coordinated Universal Time)" updatedAt: "Tue Apr 02 2024 08:40:59 GMT+0000 (Coordinated Universal Time)" @@ -22,11 +22,11 @@ updatedAt: "Tue Apr 02 2024 08:40:59 GMT+0000 (Coordinated Universal Time)" ```typescript // yarn add @tatumio/tatum -import { TatumSDK, Chiliz, Network } from '@tatumio/tatum' +import { TatumSDK, Cronos, Network } from '@tatumio/tatum' + +const tatum = await TatumSDK.init({network: Network.CRONOS}) -const tatum = await TatumSDK.init({network: Network.CHILIZ}) - -const result = await tatum.rpc.getUncleCountByBlockHash('0xdea4839f6bce4f97d9b92b68b054b8c637b20fdbc2b1deaace450b961946eb02') +const result = await tatum.rpc.getUncleCountByBlockHash('0x6565fd5921f93655e77d8cfeab8aa6caaf7155aeae24e91cdca33eedc66e6c5a') await tatum.destroy() // Destroy Tatum SDK - needed for stopping background jobs ``` @@ -45,40 +45,10 @@ Uncles are blocks that are not included in the main blockchain but are still val 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: `"0x6565fd5921f93655e77d8cfeab8aa6caaf7155aeae24e91cdca33eedc66e6c5a"` ### Return Object The return object for this method is a hex-encoded integer representing the number of uncles in the specified block. -* Example value: `"0x1"` (1 uncle) - -### JSON-RPC Request and Response Examples - -Here is an example JSON-RPC request and response for the `eth_getUncleCountByBlockHash` method: - -**Request:** - -```json -{ - "id": 1, - "jsonrpc": "2.0", - "method": "eth_getUncleCountByBlockHash", - "params": [ - "0x3a3e528dcd6e05a614c9241b0a9296db961fa6a92e05af9f6c0d7d2f6bc92f7a" - ] -} -``` - -**Response:** - -```json -{ - "id": 1, - "jsonrpc": "2.0", - "result": "0x1" -} -``` - -In this example, the JSON-RPC request asks for the number of uncles in the block with the specified hash. The response indicates that there is one uncle in the block. - +* Example value: `"0x1"` (1 uncle) \ No newline at end of file diff --git a/v1.0/RPC Nodes/rpc-evm/rpc-chiliz/eth_getunclecountbyblocknumber.md b/v1.0/RPC Nodes/rpc-evm/rpc-cronos/eth_getunclecountbyblocknumber.md similarity index 64% rename from v1.0/RPC Nodes/rpc-evm/rpc-chiliz/eth_getunclecountbyblocknumber.md rename to v1.0/RPC Nodes/rpc-evm/rpc-cronos/eth_getunclecountbyblocknumber.md index b4b5fdc5..fb8159e2 100644 --- a/v1.0/RPC Nodes/rpc-evm/rpc-chiliz/eth_getunclecountbyblocknumber.md +++ b/v1.0/RPC Nodes/rpc-evm/rpc-cronos/eth_getunclecountbyblocknumber.md @@ -1,13 +1,13 @@ --- title: "eth_getunclecountbyblocknumber" -slug: "rpc-chiliz-eth_getunclecountbyblocknumber" -excerpt: "Chiliz RPC" +slug: "rpc-cronos-eth_getunclecountbyblocknumber" +excerpt: "Cronos RPC" category: 65c5e93c623cad004b45d505 hidden: false metadata: - description: "Chiliz RPC" + description: "Cronos RPC" image: [] - keywords: "chiliz, rpc" + keywords: "cronos, rpc" robots: "index" createdAt: "Wed Mar 06 2024 10:35:44 GMT+0000 (Coordinated Universal Time)" updatedAt: "Tue Apr 02 2024 08:40:59 GMT+0000 (Coordinated Universal Time)" @@ -22,11 +22,11 @@ updatedAt: "Tue Apr 02 2024 08:40:59 GMT+0000 (Coordinated Universal Time)" ```typescript // yarn add @tatumio/tatum -import { TatumSDK, Chiliz, Network } from '@tatumio/tatum' +import { TatumSDK, Cronos, Network } from '@tatumio/tatum' + +const tatum = await TatumSDK.init({network: Network.CRONOS}) -const tatum = await TatumSDK.init({network: Network.CHILIZ}) - -const result = await tatum.rpc.getUncleCountByBlockNumber(6666667) +const result = await tatum.rpc.getUncleCountByBlockNumber('0xC44FF8') await tatum.destroy() // Destroy Tatum SDK - needed for stopping background jobs ``` @@ -45,41 +45,10 @@ Uncles are blocks that are not included in the main blockchain but are still val 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: `"0xC44FF8"` ### Return Object The return object for this method is a hex-encoded integer representing the number of uncles in the specified block. -* Example value: `"0x1"` (1 uncle) - -### JSON-RPC Request and Response Examples - -Here is an example JSON-RPC request and response for the `eth_getUncleCountByBlockNumber` method: - -**Request:** - -```json -{ - "id": 1, - "jsonrpc": "2.0", - "method": "eth_getUncleCountByBlockNumber", - "params": [ - "0x12345" - ] -} -``` - -**Response:** - -```json -{ - "id": 1, - "jsonrpc": "2.0", - "result": "0x1" -} -``` - -In this example, the JSON-RPC request asks for the number of uncles in the block with the specified hash. The response indicates that there is one uncle in the block. - -\ +* Example value: `"0x1"` (1 uncle) \ No newline at end of file diff --git a/v1.0/RPC Nodes/rpc-evm/rpc-cronos/eth_maxpriorityfeepergas.md b/v1.0/RPC Nodes/rpc-evm/rpc-cronos/eth_maxpriorityfeepergas.md new file mode 100644 index 00000000..9fca9d22 --- /dev/null +++ b/v1.0/RPC Nodes/rpc-evm/rpc-cronos/eth_maxpriorityfeepergas.md @@ -0,0 +1,51 @@ +--- +title: "eth_maxpriorityfeepergas" +slug: "rpc-cronos-eth_maxpriorityfeepergas" +excerpt: "Cronos RPC" +category: 65c5e93c623cad004b45d505 +hidden: false +metadata: + description: "Cronos RPC" + image: [] + keywords: "cronos, rpc" + robots: "index" +createdAt: "Wed Mar 06 2024 10:35:44 GMT+0000 (Coordinated Universal Time)" +updatedAt: "Tue Apr 02 2024 08:40:59 GMT+0000 (Coordinated Universal Time)" +--- +[block:html]{"html":"
\n
Archive Method
\n

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

\n
"}[/block] + +### How to use it + +{% tabs %} +{% tab title="TypeScript/JavaScript" %} +{% code overflow="wrap" lineNumbers="true" %} +```typescript +// yarn add @tatumio/tatum + +import { TatumSDK, Cronos, Network } from '@tatumio/tatum' + +const tatum = await TatumSDK.init({network: Network.CRONOS}) + +const gasPrice = await tatum.rpc.maxPriorityFeePerGas() + +await tatum.destroy() // Destroy Tatum SDK - needed for stopping background jobs +``` +{% endcode %} +{% endtab %} +{% endtabs %} + +### Overview + +The `eth_maxPriorityFeePerGas` RPC method is used to retrieve the maximum priority fee per gas set by the user for a transaction. This method can be used to determine the maximum fee that can be paid for a transaction to be included in a block quickly. + +### Use case + +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. + +### Parameters + +`None.` + +## Return Object + +* `maxPriorityFeePerGas` - The maximum priority fee per gas the user is willing to pay, in wei. \ No newline at end of file diff --git a/v1.0/RPC Nodes/rpc-evm/rpc-chiliz/eth_sendrawtransaction.md b/v1.0/RPC Nodes/rpc-evm/rpc-cronos/eth_sendrawtransaction.md similarity index 69% rename from v1.0/RPC Nodes/rpc-evm/rpc-chiliz/eth_sendrawtransaction.md rename to v1.0/RPC Nodes/rpc-evm/rpc-cronos/eth_sendrawtransaction.md index 7a719297..4f40e55b 100644 --- a/v1.0/RPC Nodes/rpc-evm/rpc-chiliz/eth_sendrawtransaction.md +++ b/v1.0/RPC Nodes/rpc-evm/rpc-cronos/eth_sendrawtransaction.md @@ -1,13 +1,13 @@ --- title: "eth_sendrawtransaction" -slug: "rpc-chiliz-eth_sendrawtransaction" -excerpt: "Chiliz RPC" +slug: "rpc-cronos-eth_sendrawtransaction" +excerpt: "Cronos RPC" category: 65c5e93c623cad004b45d505 hidden: false metadata: - description: "Chiliz RPC" + description: "Cronos RPC" image: [] - keywords: "chiliz, rpc" + keywords: "cronos, rpc" robots: "index" createdAt: "Wed Mar 06 2024 10:35:44 GMT+0000 (Coordinated Universal Time)" updatedAt: "Tue Apr 02 2024 08:40:59 GMT+0000 (Coordinated Universal Time)" @@ -22,9 +22,9 @@ updatedAt: "Tue Apr 02 2024 08:40:59 GMT+0000 (Coordinated Universal Time)" ```typescript // yarn add @tatumio/tatum -import { TatumSDK, Chiliz, Network } from '@tatumio/tatum' - -const tatum = await TatumSDK.init({network: Network.CHILIZ}) +import { TatumSDK, Cronos, Network } from '@tatumio/tatum' + +const tatum = await TatumSDK.init({network: Network.CRONOS}) const gasPrice = await tatum.rpc.sendRawTransaction('0x0000.......') @@ -36,7 +36,7 @@ await tatum.destroy() // Destroy Tatum SDK - needed for stopping background jobs ### Overview -The `eth_sendRawTransaction` RPC method is used to send a signed and serialized transaction to the network. This method is particularly useful when you want to have full control over the signing process, e.g., when using hardware wallets, cold storage, or custom signing libraries. It can be utilized in various use cases, such as transferring, interacting with smart contracts, or deploying new contracts. +The `eth_sendRawTransaction` RPC method is used to send a signed and serialized transaction to the network. This method is particularly useful when you want to have full control over the signing process, e.g., when using hardware wallets, cold storage, or custom signing libraries. It can be utilized in various use cases, such as transferring currency, interacting with smart contracts, or deploying new contracts. ### Parameters @@ -48,29 +48,4 @@ The method accepts a single parameter: The method returns a single value: -* `transactionHash`: The hash of the submitted transaction as a hexadecimal string, e.g., `"0x9fc76417374aa880d4449a1f7f31ec597f00b1f6f3dd2d66f4c9c6c445836d8b"`. - -### JSON-RPC Request Example - -```json -{ - "id": 1, - "jsonrpc": "2.0", - "method": "eth_sendRawTransaction", - "params": [ - "0xf86d8201...94a7bc" - ] -} -``` - -### JSON-RPC Response Example - -```json -{ - "id": 1, - "jsonrpc": "2.0", - "result": "0x9fc76417374aa880d4449a1f7f31ec597f00b1f6f3dd2d66f4c9c6c445836d8b" -} -``` - -\ +* `transactionHash`: The hash of the submitted transaction as a hexadecimal string, e.g., `"0x9fc76417374aa880d4449a1f7f31ec597f00b1f6f3dd2d66f4c9c6c445836d8b"`. \ No newline at end of file diff --git a/v1.0/RPC Nodes/rpc-evm/rpc-cronos/txpool_content.md b/v1.0/RPC Nodes/rpc-evm/rpc-cronos/txpool_content.md new file mode 100644 index 00000000..1edc3d1d --- /dev/null +++ b/v1.0/RPC Nodes/rpc-evm/rpc-cronos/txpool_content.md @@ -0,0 +1,73 @@ +--- +title: "txpool_content" +slug: "rpc-cronos-txpool_content" +excerpt: "Cronos RPC" +category: 65c5e93c623cad004b45d505 +hidden: false +metadata: + description: "Cronos RPC" + image: [] + keywords: "cronos, rpc" + robots: "index" +createdAt: "Wed Mar 06 2024 10:35:44 GMT+0000 (Coordinated Universal Time)" +updatedAt: "Tue Apr 02 2024 08:40:59 GMT+0000 (Coordinated Universal Time)" +--- +[block:html]{"html":"
\n
Archive Method
\n

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

\n
"}[/block] + +### How to use it + +{% tabs %} +{% tab title="TypeScript/JavaScript" %} +{% code overflow="wrap" lineNumbers="true" %} +```typescript +// yarn add @tatumio/tatum + +import { TatumSDK, Cronos, Network } from '@tatumio/tatum' + +const tatum = await TatumSDK.init({network: Network.CRONOS}) + +const content = await tatum.rpc.txPoolContent() + +await tatum.destroy() // Destroy Tatum SDK - needed for stopping background jobs +``` +{% endcode %} +{% endtab %} +{% endtabs %} + +### Overview + +The `txpool_content` method provides information about the transactions currently pending in the transaction pool of the node. It can be helpful for developers and node operators to monitor and manage the transaction pool, especially in scenarios where it's necessary to analyze transaction congestion or prioritize specific transactions. + +Use cases for the `txpool_content` method include: + +* Analyzing network congestion by inspecting the transaction pool +* Prioritizing transactions by gas price +* Monitoring transactions from specific addresses +* Debugging and troubleshooting pending transactions + +### Parameters + +This method does not require any parameters. + +### Return Object + +The `txpool_content` method returns an object with two fields: `pending` and `queued`. Each field contains a nested object with addresses as keys and their respective transactions as values. + +* **`pending`**: An object containing transactions that are currently pending for inclusion in the next block(s). +* **`queued`**: An object containing transactions that are currently queued (i.e., transactions that do not meet certain criteria for inclusion in the next block, like low gas price or nonce gaps). + +Each transaction object includes the following information: + +* **`hash`**: The hash of the transaction (32 bytes). +* **`nonce`**: The number of transactions sent by the sender prior to this one (integer). +* **`blockHash`**: The hash of the block in which the transaction was included (32 bytes), or `null` if the transaction is not yet mined. +* **`blockNumber`**: The block number in which the transaction was included (integer), or `null` if the transaction is not yet mined. +* **`transactionIndex`**: The index of the transaction in the block (integer), or `null` if the transaction is not yet mined. +* **`from`**: The address of the sender (20 bytes). +* **`to`**: The address of the receiver (20 bytes), or `null` for contract creation transactions. +* **`value`**: The value transferred in the transaction, in wei. +* **`gasPrice`**: The price of gas for the transaction, in wei. +* **`maxFeePerGas`** - The maximum fee per gas set in the transaction. +* **`maxPriorityFeePerGas`** - The maximum priority gas fee set in the transaction. +* **`gas`**: The maximum amount of gas the transaction is allowed to consume. +* **`input`**: The data payload of the transaction (string), or `0x` for simple value transfers. \ No newline at end of file diff --git a/v1.0/RPC Nodes/rpc-evm/rpc-chiliz/txpool_inspect.md b/v1.0/RPC Nodes/rpc-evm/rpc-cronos/txpool_inspect.md similarity index 59% rename from v1.0/RPC Nodes/rpc-evm/rpc-chiliz/txpool_inspect.md rename to v1.0/RPC Nodes/rpc-evm/rpc-cronos/txpool_inspect.md index b0106554..86b9c068 100644 --- a/v1.0/RPC Nodes/rpc-evm/rpc-chiliz/txpool_inspect.md +++ b/v1.0/RPC Nodes/rpc-evm/rpc-cronos/txpool_inspect.md @@ -1,13 +1,13 @@ --- title: "txpool_inspect" -slug: "rpc-chiliz-txpool_inspect" -excerpt: "Chiliz RPC" +slug: "rpc-cronos-txpool_inspect" +excerpt: "Cronos RPC" category: 65c5e93c623cad004b45d505 hidden: false metadata: - description: "Chiliz RPC" + description: "Cronos RPC" image: [] - keywords: "chiliz, rpc" + keywords: "cronos, rpc" robots: "index" createdAt: "Wed Mar 06 2024 10:35:44 GMT+0000 (Coordinated Universal Time)" updatedAt: "Tue Apr 02 2024 08:40:59 GMT+0000 (Coordinated Universal Time)" @@ -22,9 +22,9 @@ updatedAt: "Tue Apr 02 2024 08:40:59 GMT+0000 (Coordinated Universal Time)" ```typescript // yarn add @tatumio/tatum -import { TatumSDK, Chiliz, Network } from '@tatumio/tatum' - -const tatum = await TatumSDK.init({network: Network.CHILIZ}) +import { TatumSDK, Cronos, Network } from '@tatumio/tatum' + +const tatum = await TatumSDK.init({network: Network.CRONOS}) const inspect = await tatum.rpc.txPoolInspect() @@ -49,42 +49,4 @@ The `txpool_inspect` method takes one optional parameter: The `txpool_inspect` method returns an object with the following fields: * **`pending`**: An array of transaction objects, with textual data -* **`queued`**: An array of transaction objects, with textual data - -## Example Request: - -```json -{ - "jsonrpc": "2.0", - "method": "txpool_inspect", - "params": [ - "pending" - ], - "id": 1 -} -``` - -## Example Response: - -```json -{ - "jsonrpc": "2.0", - "id": 1, - "result": { - "pending": { - "0x01d3B93AaADE8A4066DAaBc8fd8482173A6aD120": { - "197": "0x4f023eB8C6BC3116E35B67E03bf2C17f2e4f7e7e: 0 wei + 30000000 gas × 23918871 wei" - } - }, - "queued": { - "0x03321406635a04D37Cf9211F2ea3AFc83a87e777": { - "5096281": "0x77b1C86Ab0aa9066803eD567e1F00973976638F6: 49999988041886240 wei + 21000 gas × 53000000000 wei", - "8308536": "0x77b1C86Ab0aa9066803eD567e1F00973976638F6: 100000000000000000 wei + 21000 gas × 53000000000 wei", - "231211221": "0x77b1C86Ab0aa9066803eD567e1F00973976638F6: 1000000000000000 wei + 21000 gas × 11958113760 wei" - } - } - } -} -``` - -\ +* **`queued`**: An array of transaction objects, with textual data \ No newline at end of file diff --git a/v1.0/RPC Nodes/rpc-evm/rpc-chiliz/txpool_status.md b/v1.0/RPC Nodes/rpc-evm/rpc-cronos/txpool_status.md similarity index 71% rename from v1.0/RPC Nodes/rpc-evm/rpc-chiliz/txpool_status.md rename to v1.0/RPC Nodes/rpc-evm/rpc-cronos/txpool_status.md index 04438c8d..04e4af2d 100644 --- a/v1.0/RPC Nodes/rpc-evm/rpc-chiliz/txpool_status.md +++ b/v1.0/RPC Nodes/rpc-evm/rpc-cronos/txpool_status.md @@ -1,13 +1,13 @@ --- title: "txpool_status" -slug: "rpc-chiliz-txpool_status" -excerpt: "Chiliz RPC" +slug: "rpc-cronos-txpool_status" +excerpt: "Cronos RPC" category: 65c5e93c623cad004b45d505 hidden: false metadata: - description: "Chiliz RPC" + description: "Cronos RPC" image: [] - keywords: "chiliz, rpc" + keywords: "cronos, rpc" robots: "index" createdAt: "Wed Mar 06 2024 10:35:44 GMT+0000 (Coordinated Universal Time)" updatedAt: "Tue Apr 02 2024 08:40:59 GMT+0000 (Coordinated Universal Time)" @@ -22,9 +22,9 @@ updatedAt: "Tue Apr 02 2024 08:40:59 GMT+0000 (Coordinated Universal Time)" ```typescript // yarn add @tatumio/tatum -import { TatumSDK, Chiliz, Network } from '@tatumio/tatum' - -const tatum = await TatumSDK.init({network: Network.CHILIZ}) +import { TatumSDK, Cronos, Network } from '@tatumio/tatum' + +const tatum = await TatumSDK.init({network: Network.CRONOS}) const status = await tatum.rpc.txPoolStatus() @@ -49,30 +49,4 @@ This method does not take any parameters. The `txpool_status` method returns an object with the following fields: * **`pending`**: Number of pending transactions in the pool -* **`queued`**: Number of queued transactions in the pool - -### Example Request - -```json -{ - "jsonrpc":"2.0", - "method":"txpool_status", - "params":[], - "id":1 -} -``` - -### Example Response - -```json -{ - "jsonrpc": "2.0", - "id": 1, - "result": { - "pending": 4, - "queued": 10 - } -} -``` - -In this example response, there are currently 4 pending transactions and 10 queued transactions waiting to be processed by miners. +* **`queued`**: Number of queued transactions in the pool \ No newline at end of file diff --git a/v1.0/RPC Nodes/rpc-evm/rpc-chiliz/web3_clientversion.md b/v1.0/RPC Nodes/rpc-evm/rpc-cronos/web3_clientversion.md similarity index 74% rename from v1.0/RPC Nodes/rpc-evm/rpc-chiliz/web3_clientversion.md rename to v1.0/RPC Nodes/rpc-evm/rpc-cronos/web3_clientversion.md index fd1feff5..5dc96676 100644 --- a/v1.0/RPC Nodes/rpc-evm/rpc-chiliz/web3_clientversion.md +++ b/v1.0/RPC Nodes/rpc-evm/rpc-cronos/web3_clientversion.md @@ -1,13 +1,13 @@ --- title: "web3_clientversion" -slug: "rpc-chiliz-web3_clientversion" -excerpt: "Chiliz RPC" +slug: "rpc-cronos-web3_clientversion" +excerpt: "Cronos RPC" category: 65c5e93c623cad004b45d505 hidden: false metadata: - description: "Chiliz RPC" + description: "Cronos RPC" image: [] - keywords: "chiliz, rpc" + keywords: "cronos, rpc" robots: "index" createdAt: "Wed Mar 06 2024 10:35:44 GMT+0000 (Coordinated Universal Time)" updatedAt: "Tue Apr 02 2024 08:40:59 GMT+0000 (Coordinated Universal Time)" @@ -21,9 +21,10 @@ 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, Chiliz, Network } from '@tatumio/tatum' -const tatum = await TatumSDK.init({network: Network.CHILIZ}) +import { TatumSDK, Cronos, Network } from '@tatumio/tatum' + +const tatum = await TatumSDK.init({network: Network.CRONOS}) const version = await tatum.rpc.clientVersion() @@ -47,30 +48,4 @@ This method has no parameters. It only retrieves the current version of the clie 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 client software being used. - -### Example Request - -#### JSON Request - -```json -{ - "jsonrpc": "2.0", - "method": "web3_clientVersion", - "params": [], - "id": 1 -} -``` - -### Example Response - -#### JSON Response - -```json -{ - "jsonrpc": "2.0", - "id": 67, - "result": "v0.9.0" -} -``` - +* `String` - Version string of the client software being used. \ No newline at end of file