-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
1b3bb9f
commit cb072dd
Showing
1,060 changed files
with
106,504 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
--- | ||
title: "EVM" | ||
slug: "rpc-evm" | ||
excerpt: "" | ||
hidden: false | ||
createdAt: "Wed Mar 06 2024 10:34:11 GMT+0000 (Coordinated Universal Time)" | ||
updatedAt: "Sat Apr 06 2024 12:59:35 GMT+0000 (Coordinated Universal Time)" | ||
--- | ||
Overview of the EVM chains we support |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
--- | ||
title: "Arbitrum" | ||
slug: "rpc-arbitrum" | ||
excerpt: "" | ||
hidden: false | ||
createdAt: "Wed Mar 06 2024 10:35:18 GMT+0000 (Coordinated Universal Time)" | ||
updatedAt: "Sat Apr 06 2024 12:59:34 GMT+0000 (Coordinated Universal Time)" | ||
--- |
126 changes: 126 additions & 0 deletions
126
v1.0/RPC Nodes/rpc-evm/rpc-arbitrum/rpc-arbitrum-debug_getbadblocks.md
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,126 @@ | ||
--- | ||
title: "debug_getbadblocks" | ||
slug: "rpc-arbitrum-debug_getbadblocks" | ||
excerpt: "Arbitrum RPC" | ||
hidden: false | ||
metadata: | ||
description: "Arbitrum RPC" | ||
image: [] | ||
keywords: "arbitrum, rpc" | ||
robots: "index" | ||
createdAt: "Wed Mar 06 2024 10:35:44 GMT+0000 (Coordinated Universal Time)" | ||
updatedAt: "Sat Apr 06 2024 13:08:59 GMT+0000 (Coordinated Universal Time)" | ||
--- | ||
[block:html] | ||
{ | ||
"html": "<div style=\"padding: 10px 20px; border-radius: 5px; background-color: #e6e2ff; margin: 0 0 30px 0;\">\n <h5>Archive Method</h5>\n <p>Only on the full archive nodes. Complex queries might take longer and incur additional cost</p>\n</div>" | ||
} | ||
[/block] | ||
|
||
|
||
{% hint style="warning" %} | ||
There was Arbitrum hard-fork from Classic to Nitro. As the results of this, you are able to use **debug** methods from block 22 207 818 to the actual one. Other non-debug methods work from genesis block. | ||
{% endhint %} | ||
|
||
### How to use it | ||
|
||
{% tabs %} | ||
{% tab title="TypeScript/JavaScript" %} | ||
{% code overflow="wrap" lineNumbers="true" %} | ||
|
||
```typescript | ||
// yarn add @tatumio/tatum | ||
|
||
import { TatumSDK, ArbitrumOne, Network } from '@tatumio/tatum' | ||
|
||
const tatum = await TatumSDK.init<ArbitrumOne>({network: Network.ARBITRUM_ONE}) | ||
|
||
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": [] | ||
} | ||
``` |
103 changes: 103 additions & 0 deletions
103
v1.0/RPC Nodes/rpc-evm/rpc-arbitrum/rpc-arbitrum-debug_storagerangeat.md
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,103 @@ | ||
--- | ||
title: "debug_storagerangeat" | ||
slug: "rpc-arbitrum-debug_storagerangeat" | ||
excerpt: "Arbitrum RPC" | ||
hidden: false | ||
metadata: | ||
description: "Arbitrum RPC" | ||
image: [] | ||
keywords: "arbitrum, rpc" | ||
robots: "index" | ||
createdAt: "Wed Mar 06 2024 10:35:44 GMT+0000 (Coordinated Universal Time)" | ||
updatedAt: "Sat Apr 06 2024 13:09:00 GMT+0000 (Coordinated Universal Time)" | ||
--- | ||
[block:html] | ||
{ | ||
"html": "<div style=\"padding: 10px 20px; border-radius: 5px; background-color: #e6e2ff; margin: 0 0 30px 0;\">\n <h5>Archive Method</h5>\n <p>Only on the full archive nodes. Complex queries might take longer and incur additional cost</p>\n</div>" | ||
} | ||
[/block] | ||
|
||
|
||
### How to use it | ||
|
||
{% tabs %} | ||
{% tab title="TypeScript/JavaScript" %} | ||
{% code overflow="wrap" lineNumbers="true" %} | ||
|
||
```typescript | ||
// yarn add @tatumio/tatum | ||
|
||
import { TatumSDK, ArbitrumOne, Network } from '@tatumio/tatum' | ||
|
||
const tatum = await TatumSDK.init<ArbitrumOne>({network: Network.ARBITRUM_ONE}) | ||
|
||
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" | ||
} | ||
} | ||
``` |
138 changes: 138 additions & 0 deletions
138
v1.0/RPC Nodes/rpc-evm/rpc-arbitrum/rpc-arbitrum-debug_traceblockbyhash.md
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,138 @@ | ||
--- | ||
title: "debug_traceblockbyhash" | ||
slug: "rpc-arbitrum-debug_traceblockbyhash" | ||
excerpt: "Arbitrum RPC" | ||
hidden: false | ||
metadata: | ||
description: "Arbitrum RPC" | ||
image: [] | ||
keywords: "arbitrum, rpc" | ||
robots: "index" | ||
createdAt: "Wed Mar 06 2024 10:35:44 GMT+0000 (Coordinated Universal Time)" | ||
updatedAt: "Sat Apr 06 2024 12:59:35 GMT+0000 (Coordinated Universal Time)" | ||
--- | ||
[block:html] | ||
{ | ||
"html": "<div style=\"padding: 10px 20px; border-radius: 5px; background-color: #e6e2ff; margin: 0 0 30px 0;\">\n <h5>Archive Method</h5>\n <p>Only on the full archive nodes. Complex queries might take longer and incur additional cost</p>\n</div>" | ||
} | ||
[/block] | ||
|
||
|
||
{% hint style="warning" %} | ||
There was Arbitrum hard-fork from Classic to Nitro. As the results of this, you are able to use **debug** methods from block 22 207 818 to the actual one. Other non-debug methods work from genesis block. | ||
{% endhint %} | ||
|
||
### How to use it | ||
|
||
{% tabs %} | ||
{% tab title="TypeScript/JavaScript" %} | ||
{% code overflow="wrap" lineNumbers="true" %} | ||
|
||
```typescript | ||
// yarn add @tatumio/tatum | ||
|
||
import { TatumSDK, ArbitrumOne, Network } from '@tatumio/tatum' | ||
|
||
const tatum = await TatumSDK.init<ArbitrumOne>({network: Network.ARBITRUM_ONE}) | ||
|
||
const result = await tatum.rpc.debugTraceBlockByHash( | ||
'0x48dfcf43404dffdb3b93a0b0d9982b642b221187bc3ed5c023bdab6c0e863e3d', | ||
{ | ||
tracer: 'callTracer', | ||
tracerConfig: { | ||
onlyTopCall: true, | ||
timeout: '5s', | ||
} | ||
} | ||
) | ||
|
||
await tatum.destroy() // Destroy Tatum SDK - needed for stopping background jobs | ||
``` | ||
|
||
{% endcode %} | ||
{% endtab %} | ||
{% endtabs %} | ||
|
||
### Overview | ||
|
||
`debug_traceBlockByHash` is an RPC method that allows developers to trace all transactions within a block using a given tracer. This is particularly useful for analyzing the behavior of all transactions in a block, investigating potential issues, and understanding the flow of execution within smart contracts. | ||
|
||
By using the `callTracer` tracer, developers can obtain more detailed information about the calls made during each transaction, including the input, output, and depth of the calls. | ||
|
||
### Parameters | ||
|
||
- `block_hash` (required): The hash of the block to be traced. | ||
- Example: `"0x1dcf337a03e08a8c00e31de6f5b6d9a6e1c6f1d5e5e6c89fc5f5b5a30e6d5d0c"` | ||
- `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 | ||
- `timeout` (required, string): The maximum amount of time the tracer is allowed to run in seconds (e.g. "10s"). Default is "5s". | ||
- `onlyTopCall` (required, boolean): Setting this to true will only trace the main (top-level) call and none of the sub-calls. This avoids extra processing for each call frame if only the top-level call info is required (useful for getting revertReason). | ||
- Example: `{ tracer: 'callTracer', tracerConfig: { onlyTopCall: true, timeout: '5s', }}` | ||
|
||
### Return Object | ||
|
||
The return object is an array of objects, each representing the trace result of a transaction within the block. Each object contains the following fields: | ||
|
||
- `from`: The address the transaction was sent from. | ||
- `gas`: The gas provided for the transaction. | ||
- `gasUsed`: The total gas used by the transaction. | ||
- `to`: The address the transaction was sent to. | ||
- `input`: The input data for the transaction. | ||
- `output`: The output data from the transaction. | ||
- `calls`: An array of objects, each representing a call made during the transaction. Each object contains: | ||
- `from`: The address the call was made from. | ||
- `gas`: The gas provided for the call. | ||
- `gasUsed`: The gas used by the call. | ||
- `to`: The address the call was made to. | ||
- `input`: The input data for the call. | ||
- `output`: The output data from the call. | ||
- `type`: The type of the call (e.g., "STATICCALL"). | ||
|
||
{% hint style="info" %} | ||
This method is available only on the full archive node. | ||
{% endhint %} | ||
|
||
### JSON-RPC Request and Response Examples | ||
|
||
#### Request | ||
|
||
```json | ||
{ | ||
"id": 1, | ||
"jsonrpc": "2.0", | ||
"method": "debug_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" | ||
} | ||
} | ||
] | ||
} | ||
|
||
``` |
Oops, something went wrong.