# Our Vision

### U2U Network: Uniting Innovators in the Web3 Ecosystem

**U2U Network** is at the forefront of establishing a collaborative ecosystem that harmonizes developers, idea-creators, marketers, and users to forge collective economic value. Our objective within the U2U Ecosystem is to seamlessly integrate proven business concepts and products into the Web3 realm, thereby expanding their global reach and effect.

**Incubating Innovation**

At **U2U Network**, We encourage developers and producers to submit a wide range of ideas and proposals to the **U2U Council**. These submissions will undergo rigorous evaluation process and, once approved, will receive vital support in the form of development resources, funding, and marketing assistance from the **U2U Ecosystem**. This novel incubation model is strengthened by the collaborative efforts of third-party contributors, who can actively participate in shaping and building the approved projects, while sharing in the success they help achieve.

**Decentralized Collaboration**

Our unique approach blends chain incubation with the global power of decentralized collaboration, fostering a thriving environment where ideas are nurtured into tangible projects with real-world impact. This synergy drives progress and innovation, ensuring that users, builders, and stakeholders are interconnected and aligned right from the initial spark of an idea.

**Join us at U2U Network, where innovation knows no bounds, and together, we shape the future of Web3.**


# Litepaper


# Overview

**Introduction**

The U2U Network is a groundbreaking endeavor that seamlessly integrates Directed Acyclic Graph (DAG) based algorithms with the Inter-ledger Protocol (ILP) to establish a resilient and adaptable platform for decentralized application development. By harnessing the capabilities of these cutting-edge technologies, the U2U Network addresses the limitations inherent in existing distributed ledger systems. The result is a highly scalable, secure, and efficient infrastructure that can accommodate a wide spectrum of use cases.

**Objectives**

At the heart  of the U2U Network project, the primary objective is creating a distributed ledger platform that encompasses an extensive suite of services and features tailored to decentralized application development. The U2U Network aims to realize the following pivotal goals:

1. **Scalability:** U2U Network effectively tackles the scalability challenges often encountered by traditional blockchain systems by implementing the DAG algorithm. This strategic approach fosters high throughput, low latency, and swift transaction finality.
2. **Security and Privacy:** U2U Network places a strong emphasis on elevating privacy and confidentiality for all participants. It empowers users to validate specific statements without the need to expose sensitive information.
3. **Interoperability:** The seamless integration of the Inter-ledger Protocol propels the U2U Network into a realm of effortless interoperability between diverse blockchain networks and traditional financial systems. This greatly simplifies asset and information exchange across disparate platforms.
4. **Smart Contracts:** U2U Network boasts a robust EVM Smart Contract service, empowering the execution of self-executing contracts guided by predefined rules and conditions. This automation significantly streamlines complex business processes.
5. **Tokenization:** The U2U Network introduces a powerful Tokenization service, which enables the effortless creation, issuance, and management of digital assets on the network. This innovation unlocks diverse opportunities for asset tokenization, the emergence of token economics, and the flourishing of decentralized finance (DeFi) applications.

**Scope**

This Litepaper serves as a comprehensive introductory guide to the U2U Network. It provides a thorough examination of the essential components, services, and features that constitute the U2U Network. The document offers a detailed overview of the architectural underpinnings of the platform, with particular emphasis on the integration of DAG-based algorithms and the Inter-ledger Protocol.

To conclude, the Litepaper presents a roadmap delineating the project's initial release and anticipated future enhancements. This roadmap underscores the continuous development and evolution of the U2U Ecosystem as we work towards a future of unprecedented decentralized innovation.


# U2U Network Diagram

This diagram shows the overview of **U2U Network** which include **Subnets** and module networks on top of our core Layer 1.

<figure><img src="/files/BRa1gG4jFVP3hUl68l48" alt=""><figcaption><p>Overview of U2U network</p></figcaption></figure>


# U2U Network with DEPIN and Web3 Eco System

This Digram shows the relationship of subnet DEPIN eco system and Web3 ecosystem

<figure><img src="/files/8vOB266ZcCdpIlfBLLBF" alt=""><figcaption><p>Subnet DEPIN and Web3 Eco system</p></figcaption></figure>


# Consensus

**Introduction to Helios Consensus**

The U2U Network is the next generation of blockchain build upon the DAG technology to address the limitations of traditional blockchain systems. It aims to offer efficient, secure, and scalable solutions for various use cases and industries. Helios Consensus mechanism lies on the heart of U2U Chains which play the crucial role in achieving consensus among network participants.

Helios Consensus is a highly innovative and ground breaking mechanism that sets U2U Chain apart from other existing blockchain technologies. What makes this mechanism truly exceptional is its exclusive focus on Layer 0 (protocol layer), where efficiently addresses the need of enterprises and incorporates key ESG (Environmental, Social, and Governance) factors. By prioritizing these aspects, Helios Consensus ensures that U2U Chain not only offers cutting-edge technological solutions but also promotes scalability and protection to entities or businesses. This unique combination of advanced functionality and commitment to social and environment has set the significant successful of U2U Chain.

**Helios Consensus security built at the core**

Helios Consensus utilizes aBFT (Asynchronous Byzantine Fault Tolerance) and DPoS (Delegated Proof of Stake) mechanism to enhanced security, improve scalability and efficient validation. By doing away with the assumption that some messages will always get through, even if they are lost or delayed forever, aBFT offers robust security against malevolent or bad bad actors, even in the presence of malfunctioning nodes. It ensures that all participant nodes agree with timing and order of transaction  in the network. The DPoS permits the election of a small group of reliable and trusted validators who will take part in the consensus process and validate transactions in addition to the security features of aBFT. Efficiency, scalability, and transaction processing speed will all increase with DPoS.

&#x20;   &#x20;


# Related Papers

U2U Network Technical Paper Rev 1.0

**U2U Network Technical Yellow Paper**

{% file src="/files/tLsJrex57LX4yjpTyapr" %}

**U2U Whitepaper MICA**

{% file src="/files/1Ma2ICNd3hQKJvcz741L" %}


# RPC

**What is RPC (Remote Procedure Call) Node?**

RPC Node enables applications to make calls to functions or procedures on Blockchain and retrieve information without dealing with the underlying complexities of communication protocols and network topology.

The primary purpose of an RPC Node is to provide a mechanism for communication between different decentralized applications, systems, and services. This enables the creation of distributed applications, where the application logic is spread across multiple systems, communicating with each other through the RPC Node.

**What are RPC API?**

RPC APIs is a collection of methods for dApps to communicate with Blockchain by invoking processes or functions on remote systems. When a client application uses RPC, it sends a request to the Blockchain without revealing the client’s server information, instructing it to perform a specific function or procedure. After that, the server runs the requested function and returns the result to the client dApps.

#### Websocket

WebSocket endpoint provides support for Pub/Sub API as well as JSON-RPC filter support. Additionally, the regular JSON-RPC API is also supported over a WebSocket connection and documented for each JSON-RPC call.

All examples in this reference section uses `wscat`, but will work with any tool that supports the WebSocket protocol. Some tools you can use for making these requests.

[wscat](https://github.com/websockets/wscat)

[Advanced Rest Client](https://install.advancedrestclient.com/install)

Websocket subscription requests should include the WS host in the WebSocket API url.

`wscat -c wss://ws-mainnet.uniultra.xyz`


# RPC Endpoints

A collection of Unicorn Ultra RPC Services

### Mainnet

Name: **U2U Network Solaris**\
ChainID: **39**

* Full Node HTTP: <https://rpc-mainnet.u2u.xyz>
* Archive/Trace Node HTTP: <https://rpc-tracer-mainnet.u2u.xyz/>
* Full Node Websocket: [wss://ws-mainnet.u2u.xyz](https://rpc-tracer-mainnet.u2u.xyz/)

### Testnet

Name: **U2U Network Nebulas**\
ChainID: **2484**

* Archive/Trace Node HTTP: <https://rpc-nebulas-testnet.u2u.xyz>
* Archive/Trace Node Websocket: <wss://ws-nebulas-testnet.u2u.xyz>

### Development Network

Name: **U2U Devnet**\
ChainID: **1001**

* Archive/Trace Node HTTP: <https://rpc-devnet.u2u.xyz>

### Subnet Network

Name: **U2U Subnet Atom**\
ChainID: **3993**

* Coming soon...


# Ethereum API Methods

This section is describing the supported Ethereum RPC method calls of Ultra Unicorn network.

* [eth\_blockNumber](/services/rpc/ethereum-api-methods/eth_blocknumber)
* [eth\_call](/services/rpc/ethereum-api-methods/eth_call)
* [eth\_chainId](/services/rpc/ethereum-api-methods/eth_chainid)
* [eth\_estimateGas](/services/rpc/ethereum-api-methods/eth_estimategas)
* [eth\_feeHistory](/services/rpc/ethereum-api-methods/eth_feehistory)
* [eth\_gasPrice](/services/rpc/ethereum-api-methods/eth_gasprice)
* [eth\_getBalance](/services/rpc/ethereum-api-methods/eth_getbalance)
* [eth\_getBlockByHash](/services/rpc/ethereum-api-methods/eth_getblockbyhash)
* [eth\_getBlockByNumber](/services/rpc/ethereum-api-methods/eth_getblockbynumber)
* [eth\_getBlockTransactionCountByHash](/services/rpc/ethereum-api-methods/eth_getblocktransactioncountbyhash)
* [eth\_getBlockTransactionCountByNumber](/services/rpc/ethereum-api-methods/eth_getblocktransactioncountbynumber)
* [eth\_getCode](/services/rpc/ethereum-api-methods/eth_getcode)
* [eth\_getLogs](/services/rpc/ethereum-api-methods/eth_getlogs)
* [eth\_getProof](/services/rpc/ethereum-api-methods/eth_getproof)
* [eth\_getStorageAt](/services/rpc/ethereum-api-methods/eth_getstorageat)
* [eth\_getTransactionByBlockHashAndIndex](/services/rpc/ethereum-api-methods/eth_gettransactionbyblockhashandindex)
* [eth\_getTransactionByBlockNumberAndIndex](/services/rpc/ethereum-api-methods/eth_gettransactionbyblocknumberandindex)
* [eth\_getTransactionByHash](/services/rpc/ethereum-api-methods/eth_gettransactionbyhash)
* [eth\_getTransactionCount](/services/rpc/ethereum-api-methods/eth_gettransactioncount)
* [eth\_getTransactionReceipt](/services/rpc/ethereum-api-methods/eth_gettransactionreceipt)
* [eth\_getUncleByBlockHashAndIndex](/services/rpc/ethereum-api-methods/eth_getunclebyblockhashandindex)
* [eth\_getUncleByBlockNumberAndIndex](/services/rpc/ethereum-api-methods/eth_getunclebyblocknumberandindex)
* [eth\_getUncleCountByBlockHash](/services/rpc/ethereum-api-methods/eth_getunclecountbyblockhash)
* [eth\_getUncleCountByBlockNumber](/services/rpc/ethereum-api-methods/eth_getunclecountbyblocknumber)
* [eth\_maxPriorityFeePerGas](/services/rpc/ethereum-api-methods/eth_maxpriorityfeepergas)
* [eth\_sendRawTransaction](/services/rpc/ethereum-api-methods/eth_sendrawtransaction)
* [eth\_subscribe](/services/rpc/ethereum-api-methods/eth_subscribe)
* [eth\_unsubscribe](/services/rpc/ethereum-api-methods/eth_unsubscribe)
* [net\_version](/services/rpc/ethereum-api-methods/net_version)
* [net\_listening](/services/rpc/ethereum-api-methods/net_listening)
* [net\_peerCount](/services/rpc/ethereum-api-methods/net_peercount)
* [web3\_clientVersion](/services/rpc/ethereum-api-methods/web3_clientversion)
* [web3\_sha3](/services/rpc/ethereum-api-methods/web3_sha3)
* [debug\_traceTransaction](/services/rpc/ethereum-api-methods/debug_tracetransaction)


# eth\_blockNumber

Returns the number of the most recent block.

### Parameters

none

### Returns

`QUANTITY` - integer of the current block number the client is on.

### Example

Request

```
curl https://rpc-mainnet.u2u.xyz
-X POST \
-H "Content-Type: application/json" \
-d '{"jsonrpc":"2.0","method":"eth_blockNumber","params":[],"id":0}'
```

Result

```javascript
{
  "jsonrpc": "2.0",
  "id": 0,
  "result": "0xa1c050"
}
```


# eth\_call

Executes a new message call immediately without creating a transaction on the block chain.

The `eth_call` command is used to execute a new message call. It does not introduce a blockchain transaction.

Use cases of `eth_call`:&#x20;

* Querying the internal contract state
* Executing validations coded into a smart contract
* Testing transactions without going live &#x20;

### Parameters

* `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.&#x20;
  * `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](https://docs.soliditylang.org/en/v0.7.0/abi-spec.html)
* `QUANTITY|TAG` - integer block number, or the string "latest", "earliest" or "pending" (see the [default block parameter](https://eth.wiki/json-rpc/API#the-default-block-parameter)), OR the `blockHash` (in accordance with [EIP-1898](https://eips.ethereum.org/EIPS/eip-1898)) **NOTE: the parameter is an object instead of a string and should be specified as: `{"blockHash": "0x<some-hash>"}.`** Learn more [here](https://eips.ethereum.org/EIPS/eip-1898).

### Returns

`DATA` - the return value of the executed contract.

### **Example Request and Result for `eth_call`**

Request

```
curl https://rpc-mainnet.u2u.xyz \
-X POST \
-H "Content-Type: application/json" \
-d '{"jsonrpc":"2.0","method":"eth_call","params":[{see above}],"id":1}'
```

Result

```javascript
{
  "jsonrpc": "2.0",
  "id": 1,
  "result": "0x"
}
```


# eth\_chainId

Returns the currently configured chain ID, a value used in replay-protected transaction signing as introduced by EIP-155.

The chain ID returned should always correspond to the information in the currently known head block. This ensures that the caller of this RPC method can always use the retrieved information to sign transactions built on top of the head.

If the currently known head block does not specify a chain ID, the client should treat any calls to `eth_chainId` as though the method was not supported, and returned a suitable error.

### **Parameters**

None.

### **Returns**

`QUANTITY` - integer of the current chain ID.

### **Example Request and Result for eth\_chainId**

Request

```
curl https://rpc-mainnet.u2u.xyz \
-X POST \
-H "Content-Type: application/json" \
-d '{"jsonrpc":"2.0","method":"eth_chainId","params":[],"id":83}'
```

Result

```javascript
{
  "id": 83,
  "jsonrpc": "2.0",
  "result": "0x3d" // 61
}
```


# eth\_estimateGas

Generates and returns an estimate of how much gas is necessary to allow the transaction to complete. The transaction will not be added to the blockchain.

{% hint style="info" %}
**Params**

See [eth\_call](broken://pages/DZLDOoiPnmyBKaT0QCUP) parameters, expect that all properties are optional. If no gas limit is specified geth uses the block gas limit from the pending block as an upper bound. As a result, the returned estimate might not be enough to execute the call/transaction when the amount of gas is higher than the pending block gas limit.
{% endhint %}

### Returns

`QUANTITY` - the amount of gas used.

### Example

Request

```
curl https://rpc-mainnet.u2u.xyz \
-X POST \
-H "Content-Type: application/json" \
-d '{"jsonrpc":"2.0","method":"eth_estimateGas","params":[{see above}],"id":1}'
```

Result

```javascript
{
  "id":1,
  "jsonrpc": "2.0",
  "result": "0x5208" // 21000
}
```


# eth\_feeHistory

Returns a collection of historical gas information

Returns a collection of historical gas information from which you can decide what to submit as your `maxFeePerGas` and/or `maxPriorityFeePerGas`. This method was introduced with EIP 1559.

### **Parameters**

* `BLOCKCOUNT` - Number of blocks in the requested range. Between 1 and 1024 blocks can be requested in a single query. Less than requested may be returned if not all blocks are available.
* `NEWESTBLOCK` - Highest number block of the requested range.
* `REWARDPERCENTILES` - (optional) A monotonically increasing list of percentile values to sample from each block's effective priority fees per gas in ascending order, weighted by the gas used.

### **Returns**

`Object`

* `OLDESTBLOCK` - Lowest number block of the returned range.
* `BASEFEEPERGAS` - An array of block base fees per gas. This includes the next block after the newest of the returned range because this value can be derived from the newest block. Zeroes are returned for pre-EIP-1559 blocks.
* `GASUSEDRATIO` - An array of block gas used ratios. These are calculated as the ratio of gasUsed and gasLimit.
* `REWARD` - (Optional) An array of effective priority fee per gas data points from a single block. All zeroes are returned if the block is empty.

### **Example**

Request

```
curl https://rpc-mainnet.u2u.xyz \
-X POST \
-H "Content-Type: application/json" \
-d '{"jsonrpc":"2.0","method":"eth_feeHistory","params":[4, "latest", [25, 75]],"id":1}'
```

Result

```javascript
{
  "id": "1",
  "jsonrpc": "2.0",
  "result": {
    "oldestBlock": 10762137,
    "reward": [
      [
        "0x4a817c7ee",
        "0x4a817c7ee"
      ], [
        "0x773593f0",
        "0x773593f5"
      ], [
        "0x0",
        "0x0"
      ], [
        "0x773593f5",
        "0x773bae75"
      ]
    ],
    "baseFeePerGas": [
      "0x12",
      "0x10",
      "0x10",
      "0xe",
      "0xd"
    ],
    "gasUsedRatio": [
      0.026089875,
      0.406803,
      0,
      0.0866665
    ]
  }
}
```


# eth\_gasPrice

Returns the current price per gas in wei.

### Parameters

none

### Returns

`QUANTITY` - integer of the current gas price in wei.

### **Example**

Request

```
curl https://rpc-mainnet.u2u.xyz \
-X POST \
-H "Content-Type: application/json" \
-d '{"jsonrpc":"2.0","method":"eth_gasPrice","params":[],"id":0}'
```

Result

```javascript
{
  "jsonrpc": "2.0",
  "id": 0,
  "result": "0x98bca5a00"
}
```


# eth\_getBalance

Returns the balance of the account of the given address.

### Parameters

1. `DATA`, 20 Bytes - address to check for the balance.
2. `QUANTITY|TAG` - integer block number, or the string `"latest"`, `"earliest"` or `"pending"`, see the [default block parameter](https://eth.wiki/json-rpc/API#the-default-block-parameter).

```javascript
params: [
   '0x407d73d8a49eeb85d32cf465507dd71d507100c1',
   'latest'
]
```

### Returns

`QUANTITY` - integer of the current balance for the given address in wei.

### Example

Request

```
curl https://rpc-mainnet.u2u.xyz \
-X POST \
-H "Content-Type: application/json" \
-d '{"jsonrpc":"2.0","method":"eth_getBalance","params":["0x407d73d8a49eeb85d32cf465507dd71d507100c1", "latest"],"id":0}'
```

Result

```javascript
{
  "jsonrpc": "2.0",
  "id": 0,
  "result": "0x0234c8a3397aab58" // 158972490234375000
}
```


# eth\_getBlockByHash

Returns information about a block by hash.

### Parameters

* `DATA`, 32 Bytes - Hash of a block.
* `Boolean` - If true it returns the full transaction objects, if false it returns only the hashes of the transactions.

```javascript
params: [
   '0xdc0818cf78f21a8e70579cb46a43643f78291264dda342ae31049421c82d21ae',
   false
]
```

### Returns

`Object` - A block object with the following fields, or null when no block was found:

* `number`: QUANTITY - the block number. null when its pending block.
* `hash`: DATA, 32 Bytes - hash of the block. null when its pending block.
* `parentHash`: DATA, 32 Bytes - hash of the parent block.
* `nonce`: DATA, 8 Bytes - hash of the generated proof-of-work. null when its pending block.
* `sha3Uncles`: DATA, 32 Bytes - SHA3 of the uncles data in the block.
* `logsBloom`: DATA, 256 Bytes - the bloom filter for the logs of the block. null when its pending block.
* `transactionsRoot`: DATA, 32 Bytes - the root of the transaction trie of the block.
* `stateRoot`: DATA, 32 Bytes - the root of the final state trie of the block.
* `receiptsRoot`: DATA, 32 Bytes - the root of the receipts trie of the block.
* `miner`: DATA, 20 Bytes - the address of the beneficiary to whom the mining rewards were given.
* `difficulty`: QUANTITY - integer of the difficulty for this block.
* `totalDifficulty`: QUANTITY - integer of the total difficulty of the chain until this block.
* `extraData`: DATA - the "extra data" field of this block.
* `size`: QUANTITY - integer the size of this block in bytes.
* `gasLimit`: QUANTITY - the maximum gas allowed in this block.
* `gasUsed`: QUANTITY - the total used gas by all transactions in this block.
* `timestamp`: QUANTITY - the Unix timestamp for when the block was collated.
* `transactions`: Array - Array of transaction objects, or 32 Bytes transaction hashes depending on the last given parameter.
* `uncles`: Array - Array of uncle hashes.

### Example

Request

```
curl https://rpc-mainnet.u2u.xyz \
-X POST \
-H "Content-Type: application/json" \
-d '{"jsonrpc":"2.0","method":"eth_getBlockByHash","params":["0xdc0818cf78f21a8e70579cb46a43643f78291264dda342ae31049421c82d21ae", false],"id":0}'curl https://rpc-mainnet.uniultra.xyz \
```

Result

```javascript
{
{
  "jsonrpc": "2.0",
  "id": 0,
  "result": {
    "difficulty": "0x4ea3f27bc",
    "extraData": "0x476574682f4c5649562f76312e302e302f6c696e75782f676f312e342e32",
    "gasLimit": "0x1388",
    "gasUsed": "0x0",
    "hash": "0xdc0818cf78f21a8e70579cb46a43643f78291264dda342ae31049421c82d21ae",
    "logsBloom": "0x00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000",
    "miner": "0xbb7b8287f3f0a933474a79eae42cbca977791171",
    "mixHash": "0x4fffe9ae21f1c9e15207b1f472d5bbdd68c9595d461666602f2be20daf5e7843",
    "nonce": "0x689056015818adbe",
    "number": "0x1b4",
    "parentHash": "0xe99e022112df268087ea7eafaf4790497fd21dbeeb6bd7a1721df161a6657a54",
    "receiptsRoot": "0x56e81f171bcc55a6ff8345e692c0f86e5b48e01b996cadc001622fb5e363b421",
    "sha3Uncles": "0x1dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347",
    "size": "0x220",
    "stateRoot": "0xddc8b0234c2e0cad087c8b389aa7ef01f7d79b2570bccb77ce48648aa61c904d",
    "timestamp": "0x55ba467c",
    "totalDifficulty": "0x78ed983323d",
    "transactions": [
    ],
    "transactionsRoot": "0x56e81f171bcc55a6ff8345e692c0f86e5b48e01b996cadc001622fb5e363b421",
    "uncles": [
    ]
  }
}
```


# eth\_getBlockByNumber

Returns information about a block by block number.

### Parameters

* `QUANTITY|TAG` - integer of a block number, or the string "earliest", "latest" or "pending", as in the [default block parameter](https://eth.wiki/json-rpc/API#the-default-block-parameter).
* `Boolean` - If true it returns the full transaction objects, if false only the hashes of the transactions.

```javascript
params: [
    '0x1b4', // 436
    true
]
```

### Returns

See [`eth_getBlockByHash`](/services/rpc/ethereum-api-methods/eth_getblockbyhash)

### Example

Request

```
curl https://rpc-mainnet.u2u.xyz \
-X POST \
-H "Content-Type: application/json" \
-d '{"jsonrpc":"2.0","method":"eth_getBlockByNumber","params":["0x1b4", true],"id":0}'
```

Result

```javascript
{
  "jsonrpc": "2.0",
  "id": 0,
  "result": {
    "number": "0x1b4",
    "difficulty": "0x4ea3f27bc",
    "extraData": "0x476574682f4c5649562f76312e302e302f6c696e75782f676f312e342e32",
    "gasLimit": "0x1388",
    "gasUsed": "0x0",
    "hash": "0xdc0818cf78f21a8e70579cb46a43643f78291264dda342ae31049421c82d21ae",
    "logsBloom": "0x00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000",
    "miner": "0xbb7b8287f3f0a933474a79eae42cbca977791171",
    "mixHash": "0x4fffe9ae21f1c9e15207b1f472d5bbdd68c9595d461666602f2be20daf5e7843",
    "nonce": "0x689056015818adbe",
    "parentHash": "0xe99e022112df268087ea7eafaf4790497fd21dbeeb6bd7a1721df161a6657a54",
    "receiptsRoot": "0x56e81f171bcc55a6ff8345e692c0f86e5b48e01b996cadc001622fb5e363b421",
    "sha3Uncles": "0x1dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347",
    "size": "0x220",
    "stateRoot": "0xddc8b0234c2e0cad087c8b389aa7ef01f7d79b2570bccb77ce48648aa61c904d",
    "timestamp": "0x55ba467c",
    "totalDifficulty": "0x78ed983323d",
    "transactions": [],
    "transactionsRoot": "0x56e81f171bcc55a6ff8345e692c0f86e5b48e01b996cadc001622fb5e363b421",
    "uncles": []
  }
}
```


# eth\_getBlockTransactionCountByHash

Returns the number of transactions in a block matching the given block hash.

### Parameters

* `DATA`, 32 Bytes - hash of a block.

  ```javascript
  params: [ 
      '0xb903239f8543d04b5dc1ba6579132b143087c68db1b2168786408fcbce568238' 
  ]
  ```

### Returns

* `QUANTITY` - integer of the number of transactions in this block.

### Example

Request

```
curl https://rpc-mainnet.u2u.xyz \
-X POST \
-H "Content-Type: application/json" \
-d '{"jsonrpc":"2.0","method":"eth_getBlockTransactionCountByHash","params":["0xb903239f8543d04b5dc1ba6579132b143087c68db1b2168786408fcbce568238"],"id":0}'
```

Result

```javascript
{
  "id": 0,
  "jsonrpc": "2.0",
  "result": "0xb" // 11
}
```


# eth\_getBlockTransactionCountByNumber

Returns the number of transactions in a block matching the given block number.

### Parameters

* `QUANTITY|TAG` - integer of a block number, or the string "earliest", "latest" or "pending", as in the [default block parameter](https://eth.wiki/json-rpc/API#the-default-block-parameter).

```javascript
params: [
    'latest',
]
```

### Returns

* `QUANTITY` - integer of the number of transactions in this block.

### Example

Request

```
curl https://rpc-mainnet.u2u.xyz \
-X POST \
-H "Content-Type: application/json" \
-d '{"jsonrpc":"2.0","method":"eth_getBlockTransactionCountByNumber","params":["latest"],"id":0}'
```

Result

```javascript
{
  "jsonrpc": "2.0",
  "id": 0,
  "result": "0xee"
}
```


# eth\_getCode

Returns code at a given address.

### Parameters

* `DATA`, 20 Bytes - address.
* `QUANTITY|TAG` - integer block number, or the string "latest", "earliest" or "pending", see the [default block parameter](https://eth.wiki/json-rpc/API#the-default-block-parameter).

```javascript
params: [
    '0xb59f67a8bff5d8cd03f6ac17265c550ed8f33907',
    'latest'
]
```

### Returns

* `DATA` - the code from the given address.

### Example

Request

```
curl https://rpc-mainnet.u2u.xyz \
-X POST \
-H "Content-Type: application/json" \
-d '{"jsonrpc":"2.0","method":"eth_getCode","params":["0xb59f67a8bff5d8cd03f6ac17265c550ed8f33907", "latest"],"id":0}'
```

Result

```javascript
{
  "jsonrpc": "2.0",
  "id": 0,
  "result": "0x606060405236156100965763ffffffff7c010000000000000000000000000000000000000000000000000000000060003504166306fdde0381146100a557806313af40351461012f57806318160ddd1461014e578063313ce5671461017357806370a082311461019c57806375ad319a146101bb5780638da5cb5b146101ee57806395d89b411461021d578063a9059cbb14610230575b34156100a157600080fd5bfe5b005b34156100b057600080fd5b6100b8610252565b60405160208082528190810183818151815260200191508051906020019080838360005b838110156100f45780820151838201526020016100dc565b50505050905090810190601f1680156101215780820380516001836020036101000a031916815260200191505b509250505060405180910390f35b341561013a57600080fd5b6100a3600160a060020a0360043516610289565b341561015957600080fd5b61016161030f565b60405190815260200160405180910390f35b341561017e57600080fd5b610186610315565b60405160ff909116815260200160405180910390f35b34156101a757600080fd5b610161600160a060020a036004351661031a565b34156101c657600080fd5b6101da600160a060020a0360043516610335565b604051901515815260200160405180910390f35b34156101f957600080fd5b61020161038e565b604051600160a060020a03909116815260200160405180910390f35b341561022857600080fd5b6100b861039d565b341561023b57600080fd5b6101da600160a060020a03600435166024356103d4565b60408051908101604052601881527f444f5420416c6c6f636174696f6e20496e64696361746f720000000000000000602082015281565b60005433600160a060020a039081169116146102a457600080fd5b600054600160a060020a0380831691167f70aea8d848e8a90fb7661b227dc522eb6395c3dac71b63cb59edd5c9899b236460405160405180910390a36000805473ffffffffffffffffffffffffffffffffffffffff1916600160a060020a0392909216919091179055565b60015481565b600381565b600160a060020a031660009081526002602052604090205490565b33600160a060020a03811660009081526002602052604081206001015490919060ff16151561036357600080fd5b5050600160a060020a031660009081526002602052604090206001908101805460ff19168217905590565b600054600160a060020a031681565b60408051908101604052600381527f444f540000000000000000000000000000000000000000000000000000000000602082015281565b33600160a060020a03811660009081526002602052604081205490919083908190101561040057600080fd5b33600160a060020a03811660009081526002602052604090206001015460ff16151561042b57600080fd5b85600160a060020a031633600160a060020a03167fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef8760405190815260200160405180910390a3600160a060020a033381166000908152600260205260408082208054899003905591881681522080548601905560019350505050929150505600a165627a7a72305820228dfae3e67abcdc7f73fb3f83a7d23f45acd853774acad9d2e1ac83b940fbe90029"
}
```


# eth\_getLogs

Returns an array of all logs matching a given filter object.

The `eth_getLogs` command allows users to view events that occurred on the blockchain based on one or more of the filter objects listed below.

### Limits

{% hint style="warning" %}
Requests can have a block range of at most 500 blocks.
{% endhint %}

### Parameters

`Object` - The filter options:

* `fromBlock`: `QUANTITY|TAG` - (optional, default: `"latest"`) Value:
  * Integer block number
  * Hexadecimal string block number (e.g. `"0xabcd"`)
  * `"latest"` for the last mined block
  * `"pending"` and `"earliest"` are **not supported**
* `toBlock`: `QUANTITY|TAG` - (optional, default: "latest") Value:
  * Integer block number
  * Hexadecimal string block number (e.g. `"0xabcd"`
  * `"latest"` for the last mined block - **only valid if `fromBlock` is also `"latest"`**
  * `"pending"` and `"earliest"` are **not supported**
* `address`: `DATA|Array`, 20 Bytes - (optional) Contract address or a list of addresses from which logs should originate.
* `topics`: `Array` of `DATA`, - (optional) Array of 32 Bytes DATA topics.
  * Topics are order-dependent. Each topic can also be an array of DATA with "or" options.
* `blockHash`: `DATA`, 32 Bytes - (optional) With the addition of EIP-234 (Geth >= v1.8.13 or Parity >= v2.1.0), blockHash is a new filter option which restricts the logs returned to the single block with the 32-byte hash blockHash. Using blockHash is equivalent to fromBlock = toBlock = the block number with hash `blockHash`. **If blockHash is present in the filter criteria, then neither `fromBlock` nor `toBlock` are allowed.**

```javascript
params: [
  {
    "address": "0xb59f67a8bff5d8cd03f6ac17265c550ed8f33907",
    "topics": [
      "0xddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef"
    ],
    "blockHash": "0x8243343df08b9751f5ca0c5f8c9c0460d8a9b6351066fae0acbd4d3e776de8bb"
  }
]
```

### Returns

`Array` - Array of log objects, or an empty array if nothing has changed since last poll.

* For filters created with `eth_newBlockFilter` the return are block hashes (`DATA`, 32 Bytes), e.g. `["0x3454645634534..."]`.
* For filters created with `eth_newPendingTransactionFilter` the return are transaction hashes (`DATA`, 32 Bytes), e.g. `["0x6345343454645..."]`.
* For filters created with `eth_newFilter` logs are objects with following params:
  * `removed`: `TAG` - `true` when the log was removed, due to a chain reorganization. `false` if its a valid log.
  * `logIndex`: `QUANTITY` - integer of the log index position in the block. `null` when its pending log.
  * `transactionIndex`: `QUANTITY` - integer of the transactions index position log was created from. `null` when its pending log.
  * `transactionHash`: `DATA`, 32 Bytes - hash of the transactions this log was created from. `null` when its pending log.
  * `blockHash`: `DATA`, 32 Bytes - hash of the block where this log was in. `null` when its pending. `null` when its pending log.
  * `blockNumber`: `QUANTITY` - the block number where this log was in. `null` when its pending. `null` when its pending log.
  * `address`: `DATA`, 20 Bytes - address from which this log originated.
  * `data`: `DATA` - contains one or more 32 Bytes non-indexed arguments of the log.
  * `topics`: `Array of DATA` - Array of 0 to 4 32 Bytes `DATA` of indexed log arguments.
    * In *solidity*: The first topic is the *hash* of the signature of the event (e.g. `Deposit(address,bytes32,uint256)`), except you declare the event with the `anonymous` specifier.

{% hint style="info" %}
Topics are order-dependent. A transaction with a log with topics \[A, B] will be matched by the following topic filters:

* `[]` “anything”
* `[A]` “A in first position (and anything after)”
* `[null, B]` “anything in first position AND B in second position (and anything after)”
* `[A, B]` “A in first position AND B in second position (and anything after)”
* `[[A, B], [A, B]]` “(A OR B) in first position AND (A OR B) in second position (and anything after)”
  {% endhint %}

### **Example Request and Result for eth\_getLogs**

Request

```
curl https://rpc-mainnet.u2u.xyz \
-X POST \
-H "Content-Type: application/json" \
-d '{"jsonrpc":"2.0","method":"eth_getLogs","params":[{"address": "0xb59f67a8bff5d8cd03f6ac17265c550ed8f33907","topics": ["0xddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef"],"blockHash": "0x8243343df08b9751f5ca0c5f8c9c0460d8a9b6351066fae0acbd4d3e776de8bb"}],"id":0}'
```

Result

```javascript
{
  "jsonrpc": "2.0",
  "id": 0,
  "result": [
    {
      "address": "0xb59f67a8bff5d8cd03f6ac17265c550ed8f33907",
      "topics": [
        "0xddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef",
        "0x00000000000000000000000000b46c2526e227482e2ebb8f4c69e4674d262e75",
        "0x00000000000000000000000054a2d42a40f51259dedd1978f6c118a0f0eff078"
      ],
      "data": "0x000000000000000000000000000000000000000000000000000000012a05f200",
      "blockNumber": "0x429d3b",
      "transactionHash": "0xab059a62e22e230fe0f56d8555340a29b2e9532360368f810595453f6fdd213b",
      "transactionIndex": "0xac",
      "blockHash": "0x8243343df08b9751f5ca0c5f8c9c0460d8a9b6351066fae0acbd4d3e776de8bb",
      "logIndex": "0x56",
      "removed": false
    }
  ]
}
```


# eth\_getProof

Returns the account and storage values of the specified account including the Merkle-proof. This call can be used to verify that the data you are pulling from is not tampered with.

### **Parameters**

1. `DATA`, 20 Bytes - address of the account.
2. `ARRAY`, 32 Bytes - array of storage-keys which should be proofed and included.&#x20;
3. `QUANTITY|TAG` - integer block number, or the string `"latest"` or `"earliest"`, see the [default block parameter](https://eth.wiki/json-rpc/API#the-default-block-parameter)

### **Returns**

`Object` - A account object:

* `balance`: `QUANTITY` - the balance of the account. See[`eth_getBalance`](broken://pages/b5fvFyarrOgpLRtDvM9E)
* `codeHash`: `DATA`, 32 Bytes - hash of the code of the account. For a simple Account without code it will return `"0xc5d2460186f7233c927e7db2dcc703c0e500b653ca82273b7bfad8045d85a470"`
* `nonce`: `QUANTITY`, - nonce of the account.
* `storageHash`: `DATA`, 32 Bytes - SHA3 of the StorageRoot. All storage will deliver a MerkleProof starting with this rootHash.
* `accountProof`: `ARRAY` - Array of rlp-serialized MerkleTree-Nodes, starting with the stateRoot-Node, following the path of the SHA3 (address) as key.
* `storageProof`: `ARRAY` - Array of storage-entries as requested. Each entry is a object with these properties:
  * `key`: `QUANTITY` - the requested storage key
  * `value`: `QUANTITY` - the storage value
  * `proof`: `ARRAY` - Array of rlp-serialized MerkleTree-Nodes, starting with the storageHash-Node, following the path of the SHA3 (key) as path.

### **Example**

Request

```
curl https://rpc-mainnet.u2u.xyz \
-X POST \
-H "Content-Type: application/json" \
-d '{"jsonrpc":"2.0","method":"eth_getProof","params":["0x7F0d15C7FAae65896648C8273B6d7E43f58Fa842",["0x56e81f171bcc55a6ff8345e692c0f86e5b48e01b996cadc001622fb5e363b421"],"latest"],"id":1}'
```

Result

```javascript
{
  "id": 1,
  "jsonrpc": "2.0",
  "result": {
    "accountProof": [
      "0xf90211a...0701bc80",
      "0xf90211a...0d832380",
      "0xf90211a...5fb20c80",
      "0xf90211a...0675b80",
      "0xf90151a0...ca08080"
    ],
    "balance": "0x0",
    "codeHash": "0xc5d2460186f7233c927e7db2dcc703c0e500b653ca82273b7bfad8045d85a470",
    "nonce": "0x0",
    "storageHash": "0x56e81f171bcc55a6ff8345e692c0f86e5b48e01b996cadc001622fb5e363b421",
    "storageProof": [
      {
        "key": "0x56e81f171bcc55a6ff8345e692c0f86e5b48e01b996cadc001622fb5e363b421",
        "proof": [
          "0xf90211a...0701bc80",
          "0xf90211a...0d832380"
        ],
        "value": "0x1"
      }
    ]
  }
}
```


# eth\_getStorageAt

Returns the value from a storage position at a given address, or in other words, returns the state of the contract's storage, which may not be exposed via the contract's methods.

The `eth_getStorageAt` command is used to obtain a value related to a storage position at the specified address, returning the exact state of the contract’s storage, which can’t be exposed by regular contract methods.

### Parameters

* `DATA`, 20 Bytes - address of the storage.
* `QUANTITY` - integer of the position in the storage.
* `QUANTITY|TAG` - integer block number, or the string "latest", "earliest" or "pending", see the [default block parameter](https://eth.wiki/json-rpc/API#the-default-block-parameter).

### Returns

* `DATA` - the value at this storage position.

### Example Request and Result for `eth_getStorageAt`

Calculating the correct position depends on the storage to retrieve. Consider the following contract deployed at `0x295a70b2de5e3953354a6a8344e616ed314d7251` by address `0x391694e7e0b0cce554cb130d723a9d27458f9298`.

```javascript
contract Storage {
    uint pos0;
    mapping(address => uint) pos1;

    function Storage() {
        pos0 = 1234;
        pos1[msg.sender] = 5678;
    }
}
```

**Retrieving the value of `pos0` is straight forward:**

Request

```
curl https://rpc-mainnet.u2u.xyz \
-X POST \
-H "Content-Type: application/json" \
-d '{"jsonrpc":"2.0", "method": "eth_getStorageAt", "params": ["0x295a70b2de5e3953354a6a8344e616ed314d7251", "0x0", "latest"], "id": 1}'
```

Result

```javascript
{
    "jsonrpc":"2.0",
    "id":1,
    "result":"0x00000000000000000000000000000000000000000000000000000000000004d2"
}
```

**Retrieving an element of the map is harder. The position of an element in the map is calculated with:**

```javascript
keccack(LeftPad32(key, 0), LeftPad32(map position, 0))
```

This means to retrieve the storage on `pos1[“0x391694e7e0b0cce554cb130d723a9d27458f9298”]` we need to calculate the position with:

```javascript
keccak(decodeHex("000000000000000000000000391694e7e0b0cce554cb130d723a9d27458f9298" + "0000000000000000000000000000000000000000000000000000000000000001"))
```

**The geth console which comes with the web3 library can be used to make the calculation:**

```bash
> var key = "000000000000000000000000391694e7e0b0cce554cb130d723a9d27458f9298" + "0000000000000000000000000000000000000000000000000000000000000001"
undefined
> web3.sha3(key, {"encoding": "hex"})
"0x6661e9d6d8b923d5bbaab1b96e1dd51ff6ea2a93520fdc9eb75d059238b8c5e9"
```

**Now to fetch the storage:**

Request

```
curl https://eth-mainnet.blastapi.io/<id> \
-X POST \
-H "Content-Type: application/json" \
-d '{"jsonrpc":"2.0", "method": "eth_getStorageAt", "params": ["0x295a70b2de5e3953354a6a8344e616ed314d7251", "0x6661e9d6d8b923d5bbaab1b96e1dd51ff6ea2a93520fdc9eb75d059238b8c5e9", "latest"], "id": 1}'
```

Result

```javascript
{
    "jsonrpc":"2.0",
    "id":1,
    "result":"0x000000000000000000000000000000000000000000000000000000000000162e"
}
```


# eth\_getTransactionByBlockHashAndIndex

Returns information about a transaction by block hash and transaction index position.

### Parameters

`DATA`, 32 Bytes - hash of a block.

`QUANTITY` - integer of the transaction index position.

```javascript
params: [ 
    '0xc0f4906fea23cf6f3cce98cb44e8e1449e455b28d684dfa9ff65426495584de6', 
    '0x0' // 0 
]
```

### Returns

See [`eth_getTransactionByHash`](broken://pages/Savg3ukuLnhKzUStS82a)

### Example

Request

```
curl https://rpc-mainnet.u2u.xyz \
-X POST \
-H "Content-Type: application/json" \
-d '{"jsonrpc":"2.0","method":"eth_getTransactionByBlockHashAndIndex","params":["0xc0f4906fea23cf6f3cce98cb44e8e1449e455b28d684dfa9ff65426495584de6", "0x0"],"id":0}'
```

Result

```javascript
{
  "jsonrpc": "2.0",
  "id": 0,
  "result": {
    "blockHash": "0xc0f4906fea23cf6f3cce98cb44e8e1449e455b28d684dfa9ff65426495584de6",
    "blockNumber": "0x1e8480",
    "from": "0x32be343b94f860124dc4fee278fdcbd38c102d88",
    "gas": "0x51615",
    "gasPrice": "0x6fc23ac00",
    "hash": "0xc55e2b90168af6972193c1f86fa4d7d7b31a29c156665d15b9cd48618b5177ef",
    "input": "0x",
    "nonce": "0x1efc5",
    "to": "0x104994f45d9d697ca104e5704a7b77d7fec3537c",
    "transactionIndex": "0x0",
    "value": "0x821878651a4d70000",
    "v": "0x1b",
    "r": "0x51222d91a379452395d0abaff981af4cfcc242f25cfaf947dea8245a477731f9",
    "s": "0x3a997c910b4701cca5d933fb26064ee5af7fe3236ff0ef2b58aa50b25aff8ca5"
  }
}
```


# eth\_getTransactionByBlockNumberAndIndex

Returns information about a transaction by block number and transaction index position.

### Parameters

* `QUANTITY|TAG` - a block number, or the string "earliest", "latest" or "pending", as in the [default block parameter](https://eth.wiki/json-rpc/API#the-default-block-parameter).
* `QUANTITY` - the transaction index position.

```javascript
 params: [ 
     'latest', // 668 
     '0x0' // 0 
 ]
```

### Returns

See [`eth_getTransactionByHash`](broken://pages/Savg3ukuLnhKzUStS82a)

### Example

Request

```
curl https://rpc-mainnet.u2u.xyz \
-X POST \
-H "Content-Type: application/json" \
-d '{"jsonrpc":"2.0","method":"eth_getTransactionByBlockNumberAndIndex","params":["latest", "0x0"],"id":0}'
```

Result

```javascript
{
  "jsonrpc": "2.0",
  "id": 0,
  "result": {
    "blockHash": "0xf345d6ac2cb6290489915178fef0b2fc7f5a7312dd06773c77532de6740b2b4d",
    "blockNumber": "0xa1c0ff",
    "from": "0x79c384ac9c32e90f00a214c77caac1392ec8cdea",
    "gas": "0xafbe",
    "gasPrice": "0x1270b01800",
    "hash": "0x61b27f711f58ee3090c0976c7e90d2b7eafeb7b889f0db593234f04f8ce07f22",
    "input": "0xa9059cbb0000000000000000000000004b1a99467a284cc690e3237bc69105956816f7620000000000000000000000000000000000000000000000000000001919617600",
    "nonce": "0xa",
    "to": "0xf9e5af7b42d31d51677c75bbbd37c1986ec79aee",
    "transactionIndex": "0x0",
    "value": "0x0",
    "v": "0x1b",
    "r": "0x2123cdbd1130f726ebed55fd2295239778dd4161495d2733f374d7863fc42ab1",
    "s": "0x1f08fd53ff2c3969b88d5e622561d62a799ae68e36f5142689dbfde44bbe1bed"
  }
}
```


# eth\_getTransactionByHash

Returns the information about a transaction requested by transaction hash.

The `eth_getTransactionByHash` command returns information about a requested transaction based on its transaction hash. If the transaction is pending, `blockHash`, `blockNumber`, and `transactionIndex` will be **null**.&#x20;

As an alternative to `eth_getTransactionByHash`, `eth_getTransactionByBlockNumberAndIndex` is recommended for older transactions.

### Parameters

`DATA`, 32 Bytes - hash of a transaction

```javascript
params: [
    "0x88df016429689c079f3b2f6ad39fa052532c56795b733da78a91ebe6a713944b"
]
```

### Returns

`Object` - A transaction object, or null when no transaction was found:

* `blockHash`: `DATA`, 32 Bytes - hash of the block where this transaction was in. null when its pending.
* `blockNumber`: `QUANTITY` - block number where this transaction was in. null when it's pending.
* `from`: `DATA`, 20 Bytes - address of the sender.
* `gas`: `QUANTITY` - gas provided by the sender.
* `gasPrice`: `QUANTITY` - gas price provided by the sender in Wei.
* `hash`: `DATA`, 32 Bytes - hash of the transaction.
* `input`: `DATA` - the data send along with the transaction.
* `nonce`: `QUANTITY` - the number of transactions made by the sender prior to this one.
* `to`: `DATA`, 20 Bytes - address of the receiver. null when it's a contract creation transaction.
* `transactionIndex`: `QUANTITY` - integer of the transactions index position in the block. null when its pending.
* `value`: `QUANTITY` - value transferred in Wei.
* `v`: `QUANTITY` - ECDSA recovery id
* `r`: `DATA`, 32 Bytes - ECDSA signature r
* `s`: `DATA`, 32 Bytes - ECDSA signature s

### **Example Request and Result for eth\_getTransactionByHash**

Request

```
curl https://rpc-mainnet.u2u.xyz \
-X POST \
-H "Content-Type: application/json" \
-d'{"jsonrpc":"2.0","method":"eth_getTransactionByHash","params":["0x88df016429689c079f3b2f6ad39fa052532c56795b733da78a91ebe6a713944b"],"id":0}'
```

Result

```javascript
{
  "jsonrpc": "2.0",
  "id": 0,
  "result": {
    "hash": "0x88df016429689c079f3b2f6ad39fa052532c56795b733da78a91ebe6a713944b",
    "blockHash": "0x1d59ff54b1eb26b013ce3cb5fc9dab3705b415a67127a003c3e61eb445bb8df2",
    "blockNumber": "0x5daf3b",
    "from": "0xa7d9ddbe1f17865597fbd27ec712455208b6b76d",
    "gas": "0xc350",
    "gasPrice": "0x4a817c800",
    "input": "0x68656c6c6f21",
    "nonce": "0x15",
    "r": "0x1b5e176d927f8e9ab405058b2d2457392da3e20f328b16ddabcebc33eaac5fea",
    "s": "0x4ba69724e8f69de52f0125ad8b3c5c2cef33019bac3249e2c0a2192766d1721c",
    "to": "0xf02c1c8e6114b1dbe8937a39260b5b0a374432bb",
    "transactionIndex": "0x41",
    "v": "0x25",
    "value": "0xf3dbb76162000"
  }
}
```


# eth\_getTransactionCount

Returns the number of transactions sent from an address.

#### Parameters <a href="#parameters" id="parameters"></a>

* `DATA`, 20 Bytes - address.
* `QUANTITY|TAG` - integer block number, or the string "latest", "earliest" or "pending", see the [default block parameter](https://eth.wiki/json-rpc/API#the-default-block-parameter).

params: \['0xc94770007dda54cF92009BFF0dE90c06F603a09f','latest' // state at the latest block]

#### Returns <a href="#returns" id="returns"></a>

`QUANTITY` - integer of the number of transactions sent from this address.

### Example

Request

```
curl https://rpc-mainnet.u2u.xyz \
-X POST \
-H "Content-Type: application/json" \
-d '{"jsonrpc":"2.0","method":"eth_getTransactionCount","params":["0xc94770007dda54cF92009BFF0dE90c06F603a09f","latest"],"id":0}'
```

Result

```javascript
{
  "jsonrpc": "2.0",
  "id": 0,
  "result": "0x219"
}
```


# eth\_getTransactionReceipt

Returns the receipt of a transaction by transaction hash.

The `eth_getTransactionReceipt` command is used to return the receipt of a transaction by its transaction hash.Use cases of `eth_getTransactionReceipt`:

* Track the status of a transaction
* Obtain the contract address for a contract creation TX

Transaction receipts are not available for any pending transactions. Note that `eth_getTransactionReceipt` returns null for all unknown or pending transactions.**Note:** the receipt is not available for pending transactions.

#### Parameters <a href="#parameters" id="parameters"></a>

`DATA`, 32 Bytes - hash of transactionparams: \['0xb903239f8543d04b5dc1ba6579132b143087c68db1b2168786408fcbce568238']

#### Returns <a href="#returns" id="returns"></a>

`Object` - A transaction receipt object, or null when no receipt was found:

* `transactionHash`: `DATA`, 32 Bytes - hash of the transaction.
* `transactionIndex`: `QUANTITY` - integer of the transactions index position in the block.
* `blockHash`: `DATA`, 32 Bytes - hash of the block where this transaction was in.
* `blockNumber`: `QUANTITY` - block number where this transaction was in.
* `from`: `DATA`, 20 Bytes - address of the sender.
* `to`: `DATA`, 20 Bytes - address of the receiver. null when its a contract creation transaction.
* `cumulativeGasUsed`: `QUANTITY` - The total amount of gas used when this transaction was executed in the block.
* `gasUsed`: `QUANTITY` - The amount of gas used by this specific transaction alone.
* `contractAddress`: `DATA`, 20 Bytes - The contract address created, if the transaction was a contract creation, otherwise null.
* `logs`: `Array` - Array of log objects, which this transaction generated.
* `logsBloom`: `DATA`, 256 Bytes - Bloom filter for light clients to quickly retrieve related logs.

It also returns either:

* `root` : `DATA` 32 bytes of post-transaction stateroot (pre Byzantium)
* `status`: `QUANTITY` either 1 (success) or 0 (failure)

### **Example Request and Result for eth\_getTransactionReceipt**

Request

```
curl https://rpc-mainnet.u2u.xyz \
-X POST \
-H "Content-Type: application/json" \
-d '{"jsonrpc":"2.0","method":"eth_getTransactionReceipt","params":["0xab059a62e22e230fe0f56d8555340a29b2e9532360368f810595453f6fdd213b"],"id":0}
```

Result

```javascript
{
  "id":0,
  "jsonrpc":"2.0",
  "result": {
     transactionHash: '0xb903239f8543d04b5dc1ba6579132b143087c68db1b2168786408fcbce568238',
     transactionIndex:  '0x1', // 1
     blockNumber: '0xb', // 11
     blockHash: '0xc6ef2fc5426d6ad6fd9e2a26abeab0aa2411b7ab17f30a99d3cb96aed1d1055b',
     cumulativeGasUsed: '0x33bc', // 13244
     gasUsed: '0x4dc', // 1244
     contractAddress: '0xb60e8dd61c5d32be8058bb8eb970870f07233155', // or null, if none was created
     logs: [{
         // logs as returned by getFilterLogs, etc.
     }, ...],
     logsBloom: "0x00...0", // 256 byte bloom filter
     status: '0x1'
  }
}
```


# eth\_getUncleByBlockHashAndIndex

Returns information about an uncle of a block by hash and uncle index position.

### Parameters

* `QUANTITY|TAG` - a block number, or the string "earliest", "latest" or "pending", as in the

  [default block parameter](https://eth.wiki/json-rpc/API#the-default-block-parameter).
* `QUANTITY` - the uncle's index position.

```javascript
params: [
    '0xc6ef2fc5426d6ad6fd9e2a26abeab0aa2411b7ab17f30a99d3cb96aed1d1055b',
    '0x0' // 0
]
```

### Returns

See [`eth_getBlockByHash`](/services/rpc/ethereum-api-methods/eth_getblockbyhash)

### Example

Request

```
curl https://rpc-mainnet.u2u.xyz \
-X POST \
-H "Content-Type: application/json" \
-d '{"jsonrpc":"2.0","method":"eth_getUncleByBlockHashAndIndex","params":["0xc6ef2fc5426d6ad6fd9e2a26abeab0aa2411b7ab17f30a99d3cb96aed1d1055b", "0x0"],"id":0}'
```

Result

Result see [eth\_getBlockByHash](/services/rpc/ethereum-api-methods/eth_getblockbyhash)


# eth\_getUncleByBlockNumberAndIndex

Returns information about an uncle of a block by number and uncle index position.

### Parameters

* `QUANTITY|TAG` - a block number, or the string "earliest", "latest" or "pending", as in the [default block parameter](https://eth.wiki/json-rpc/API#the-default-block-parameter).
* `QUANTITY` - the uncle's index position.

```javascript
params: [
   '0x29c', // 668
   '0x0' // 0
]
```

### Returns

See [`eth_getBlockByHash`](/services/rpc/ethereum-api-methods/eth_getblockbyhash)

{% hint style="info" %}
\*\*NOTE: \*\*The return does not contain a list of transactions in the uncle block, to get this, make another request to [eth\_getBlockByHash](/services/rpc/ethereum-api-methods/eth_getblockbyhash) or [eth\_getBlockByNumber](/services/rpc/ethereum-api-methods/eth_getblockbynumber)
{% endhint %}

### Example

Request

```
curl https://rpc-mainnet.u2u.xyz \
-X POST \
-H "Content-Type: application/json" \
-d '{"jsonrpc":"2.0","method":"eth_getUncleByBlockNumberAndIndex","params":["0x29c", "0x0"],"id":0}'
```

Result

```javascript
{
  "jsonrpc": "2.0",
  "id": 0,
  "result": {
    "difficulty": "0x57f117f5c",
    "extraData": "0x476574682f76312e302e302f77696e646f77732f676f312e342e32",
    "gasLimit": "0x1388",
    "gasUsed": "0x0",
    "hash": "0x932bdf904546a2287a2c9b2ede37925f698a7657484b172d4e5184f80bdd464d",
    "logsBloom": "0x00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000",
    "miner": "0x5bf5e9cf9b456d6591073513de7fd69a9bef04bc",
    "mixHash": "0x4500aa4ee2b3044a155252e35273770edeb2ab6f8cb19ca8e732771484462169",
    "nonce": "0x24732773618192ac",
    "number": "0x299",
    "parentHash": "0xa779859b1ee558258b7008bbabff272280136c5dd3eb3ea3bfa8f6ae03bf91e5",
    "receiptsRoot": "0x56e81f171bcc55a6ff8345e692c0f86e5b48e01b996cadc001622fb5e363b421",
    "sha3Uncles": "0x1dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347",
    "size": "0x21d",
    "stateRoot": "0x2604fbf5183f5360da249b51f1b9f1e0f315d2ff3ffa1a4143ff221ad9ca1fec",
    "timestamp": "0x55ba4827",
    "transactionsRoot": "0x56e81f171bcc55a6ff8345e692c0f86e5b48e01b996cadc001622fb5e363b421",
    "uncles": []
  }
}
```


# eth\_getUncleCountByBlockHash

Returns the number of uncles in a block matching the given block hash.

### Parameters

* `DATA`, 32 Bytes - hash of a block.

```javascript
params: [
 '0xb903239f8543d04b5dc1ba6579132b143087c68db1b2168786408fcbce568238'
]
```

### Returns

`QUANTITY` - integer of the number of uncles in this block.

### Example

Request

```
curl https://rpc-mainnet.u2u.xyz \
-X POST \
-H "Content-Type: application/json" \
-d '{"jsonrpc":"2.0","method":"eth_getUncleCountByBlockHash","params":["0xb903239f8543d04b5dc1ba6579132b143087c68db1b2168786408fcbce568238"],"id":0}'
```

Result

```javascript
{
  "id":0,
  "jsonrpc": "2.0",
  "result": "0x1" // 1
}
```


# eth\_getUncleCountByBlockNumber

Returns the number of uncles in a block matching the give block number.

### Parameters

`QUANTITY|TAG` - integer of a block number, or the string "latest", "earliest" or "pending", see the [default block parameter](https://eth.wiki/json-rpc/API#the-default-block-parameter).

```javascript
 params: [ 
  '0xe8', // 232 
 ]
```

### Returns

`QUANTITY` - integer of the number of uncles in this block.

### Example

Request

```
curl https://rpc-mainnet.u2u.xyz \
-X POST \
-H "Content-Type: application/json" \
-d '{"jsonrpc":"2.0","method":"eth_getUncleCountByBlockNumber","params":["0xe8"],"id":1}'
```

Result

```javascript
{
  "jsonrpc": "2.0",
  "id": 0,
  "result": "0x0"
}
```


# eth\_maxPriorityFeePerGas

Returns a fee per gas that is an estimate of how much you can pay as a priority fee, or "tip", to get a transaction included in the current block.

### Parameters

none

### **Returns**

`QUANTITY` - the estimated priority fee per gas.

### **Example Request and Result for eth\_maxPriorityFeePerGas**

Request

```
curl https://rpc-mainnet.u2u.xyz \
-X POST \
-H "Content-Type: application/json" \
-d '{"jsonrpc":"2.0","method":"eth_maxPriorityFeePerGas","params":[],"id":1}'
```

Result

```javascript
{
  "id":1,
  "jsonrpc": "2.0",
  "result": "0x12a05f1f9"
}
```


# eth\_sendRawTransaction

Creates new message call transaction or a contract creation for signed transactions.

### Parameters

`DATA`, The signed transaction data.

```javascript
params: ["0xd46e8dd67c5d32be8d46e8dd67c5d32be8058bb8eb970870f072445675058bb8eb970870f072445675"]
```

### Returns

`DATA`, 32 Bytes - the transaction hash, or the zero hash if the transaction is not yet available.

Use [`eth_getTransactionReceipt`](/services/rpc/ethereum-api-methods/eth_gettransactionreceipt) to get the contract address after the transaction was mined when you created a contract.

### **Example**

Request

```
curl https://rpc-mainnet.u2u.xyz \
-X POST \
-H "Content-Type: application/json" \
-d '{"jsonrpc":"2.0","method":"eth_sendRawTransaction","params":["0xd46e8dd67c5d32be8d46e8dd67c5d32be8058bb8eb970870f072445675058bb8eb970870f072445675"],"id":1}'
```

Result

```javascript
{
  "id":1,
  "jsonrpc": "2.0",
  "result": "0xe670ec64341771606e55d6b4ca35a1a6b75ee3d5145a99d05921026d1527331"
}
```


# eth\_subscribe

Subscribe to specific events in the blockchain.

The `eth_subscribe` command allows you to subscribe to multiple types of events such as `newHeads`, `logs`, `newPendingTransactions`, and `syncing` and enables syncing via **WebSockets**.

{% hint style="warning" %}
This method is only available when using a [WebSocket connection](broken://pages/O9sPAzMfzfEoAf0T5zdu).

All subscriptions will be removed once the WebSocket connection is dropped.
{% endhint %}

{% hint style="warning" %}
eth\_subscribe() method call is not available within the Public API.
{% endhint %}

### Parameters

1. Subscription type
2. Optional arguments depending on the subscription type

### Subscription Types

### `newHeads`

Fires a notification each time a new header is appended to the chain, including chain reorganizations. Users can use the bloom filter to determine if the block contains logs that are interesting to them.

In case of a chain reorganization, the subscription will emit all new headers for the new chain. Therefore the subscription can emit multiple headers on the same height.

#### **eth\_subscribe Example Request and Result for newHeads Event**

```
>> {
    "jsonrpc": "2.0",
    "id": 1,
    "method": "eth_subscribe",
    "params": [
        "newHeads"
    ]
}
<< {
    "jsonrpc": "2.0",
    "id": 1,
    "result": "0x20b6b348ddfa17b5ba707431dc8da988"
}

>> {
    "jsonrpc": "2.0",
    "method": "eth_subscription",
    "params": {
        "subscription": "0x20b6b348ddfa17b5ba707431dc8da988",
        "result": {
            "parentHash": "0x4885842da506731b17f1719d762b281e09a153f2d61b505c5a673e0125e2d9c2",
            "sha3Uncles": "0x1dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347",
            "miner": "0x2a20380dca5bc24d052acfbf79ba23e988ad0050",
            "stateRoot": "0x686c48414e8540c15ec2d3e15abadb6de18aa334b048a3e2e15a2a55d306bb83",
            "transactionsRoot": "0xc016b794fecf26cb59da456240cce4effe0fa94b27cf65bdcdfb66eb657b3caa",
            "receiptsRoot": "0x189819c4ed188a2a073c22be920ab2c340943d5e9bd6de054eadf1c3a8f52c94",
            "logsBloom": "0x5fbb8bbff1fa9ca7ffe83ffecf5bf37fc52dfa7f9dde5f6e2df9f9ef9fba6dffda5fb76ba783f7f30f575fd569f15fdfde3bdf771a94bda7fadecfe2d73fa14f79df45f2f7f20d3ff9b65d3bd274fba42ce3e9968f5e7aca7ff7f611eaf3f8f96ec5d2d0dba6437e0feeb1bb7eb87f79aeb7c778e8ffb5695f6d9bfe0ddff73ab99fef67e3e2dbfeb55b7c3f5fdffdf6f5f51fff5dab666c4f29edce7fd75abee7dabd7bafbe3dbebbbc5fdafffd0f2fcf77c22fffea0ede7defaee6feef4c5b2f5ffeef09f926572cfd69e8e9ff5abf36ff77763dab0e34b2fdffef3e6a642fdffb6f6f9f1e85abe6ae97a8a9046f99ff73d5fda7dfebf620fe7fdec8867ff3",
            "difficulty": "0x2f3255c3d69584",
            "number": "0xdc01a0",
            "gasLimit": "0x1c95111",
            "gasUsed": "0x1c919bb",
            "timestamp": "0x62361896",
            "extraData": "0x706f6f6c696e2e636f6d21ed073691b505ffd2",
            "mixHash": "0xc43186c61d5589ce4247f48a288df01f35e4fc3667b46bbbce887f9a369e50e1",
            "nonce": "0xec4f61864a67e65e",
            "baseFeePerGas": "0x495990270",
            "hash": "0xae276242b8ec854b2203469cb5ad3303d595b731eba20ccbd8a703b135f5f1d2"
        }
    }
}
```

### `logs`

Returns logs that are included in new imported blocks and match the given filter criteria.

In case of a chain reorganization previous sent logs that are on the old chain will be resent with the `removed` property set to true. Logs from transactions that ended up in the new chain are emitted. Therefore a subscription can emit logs for the same transaction multiple times.

#### **Arguments**

1. `object` with the following (optional) fields
   * **address**, either an address or an array of addresses. Only logs that are created from these addresses are returned (optional)
   * **topics**, only logs that match the specified topics (optional)

#### **eth\_subscribe Example Request and Result for logs Event**

```
>> {
    "jsonrpc": "2.0",
    "id": 1,
    "method": "eth_subscribe",
    "params": [
        "logs",
        {
            "address": "0x8320fe7702b96808f7bbc0d4a888ed1468216cfd",
            "topics": [
                "0xd78a0cb8bb633d06981248b816e7bd33c2a35a6089241d099fa519e361cab902"
            ]
        }
    ]
}
<< {
    "jsonrpc": "2.0",
    "id": 1,
    "result": "0x4a8a4c0517381924f9838102c5a4dcb7"
}

<< {
    "jsonrpc": "2.0",
    "method": "eth_subscription",
    "params": {
        "subscription": "0x4a8a4c0517381924f9838102c5a4dcb7",
        "result": {
            "address": "0x8320fe7702b96808f7bbc0d4a888ed1468216cfd",
            "blockHash": "0x61cdb2a09ab99abf791d474f20c2ea89bf8de2923a2d42bb49944c8c993cbf04",
            "blockNumber": "0x29e87",
            "data": "0x00000000000000000000000000000000000000000000000000000000000000010000000000000000000000000000000000000000000000000000000000000003",
            "logIndex": "0x0",
            "topics": [
                "0xd78a0cb8bb633d06981248b816e7bd33c2a35a6089241d099fa519e361cab902"
            ],
            "transactionHash": "0xe044554a0a55067caafd07f8020ab9f2af60bdfe337e395ecd84b4877a3d1ab4",
            "transactionIndex": "0x0"
        }
    }
}
```

### `newPendingTransactions` <a href="#newpendingtransactions" id="newpendingtransactions"></a>

Returns the hash for all transactions that are added to the pending state and are signed with a key that is available in the node.

When a transaction that was previously part of the canonical chain isn’t part of the new canonical chain after a reorganization its again emitted.

#### **eth\_subscribe Example Request and Result for newPendingTransactions Event**

```
>> {
    "jsonrpc": "2.0",
    "id": 1,
    "method": "eth_subscribe",
    "params": [
        "newPendingTransactions"
    ]
}
<< {
    "jsonrpc": "2.0",
    "id": 1,
    "result": "0xc3b33aa549fb9a60e95d21862596617c"
}
<< {
    "jsonrpc": "2.0",
    "method": "eth_subscription",
    "params": {
        "subscription": "0xc3b33aa549fb9a60e95d21862596617c",
        "result": "0xd6fdc5cc41a9959e922f30cb772a9aef46f4daea279307bc5f7024edc4ccd7fa"
    }
}
```

### `syncing` <a href="#syncing" id="syncing"></a>

Indicates when the node starts or stops synchronizing. The result can either be a boolean indicating that the synchronization has started (true), finished (false) or an object with various progress indicators.

**eth\_subscribe Example Request and Result for syncing Event**

```
>> {
    "jsonrpc": "2.0",
    "id": 1,
    "method": "eth_subscribe",
    "params": [
        "syncing"
    ]
}
<< {
    "jsonrpc": "2.0",
    "id": 1,
    "result": "0xe2ffeb2703bcf602d42922385829ce96"
}

<< {
    "jsonrpc": "2.0",
    "method": "eth_subscription",
    "params": {
        "subscription": "0xe2ffeb2703bcf602d42922385829ce96",
        "result": {
            "syncing": true,
            "status": {
                "startingBlock": 674427,
                "currentBlock": 67400,
                "highestBlock": 674432,
                "pulledStates": 0,
                "knownStates": 0
            }
        }
    }
}
```


# eth\_unsubscribe

Cancel subscriptions.

{% hint style="warning" %}
This method is only available when using a [WebSocket connection](broken://pages/O9sPAzMfzfEoAf0T5zdu).
{% endhint %}

{% hint style="warning" %}
eth\_unsubscribe() method call is not available within the Public API.
{% endhint %}

## Parameters

1. Subscription ID

**Example**

```
>> {
    "jsonrpc": "2.0",
    "id": 1,
    "method": "eth_unsubscribe",
    "params": [
        "0x20b6b348ddfa17b5ba707431dc8da988"
    ]
}
<< {
    "jsonrpc": "2.0",
    "id": 1,
    "result": true
}
```


# net\_version

Returns the current network id.

### **Parameters**

none

### **Returns**

`String` - The current network id.

* `"39"`: Unicorn Ultra Mainnet
* `"2484"`: Unicorn Ultra Testnet Nebulas

### **Example**

Request

```
curl https://rpc-mainnet.u2u.xyz \
-X POST \
-H "Content-Type: application/json" \
-d '{"jsonrpc":"2.0","method":"net_version","params":[],"id":67}'
```

Result

```javascript
{
  "id":67,
  "jsonrpc": "2.0",
  "result": "39"
}
```


# net\_listening

Returns true if client is actively listening for network connections.

### **Parameters**

none

### **Returns**

`Boolean` - `true` when listening, otherwise `false`.

### **Example**

Request

```
curl https://rpc-mainnet.u2u.xyz \
-X POST \
-H "Content-Type: application/json" \
-d '{"jsonrpc":"2.0","method":"net_listening","params":[],"id":67}'
```

Result

```javascript
{
  "id":67,
  "jsonrpc":"2.0",
  "result":true
}
```


# net\_peerCount

Returns number of peers currently connected to the client.

### **Parameters**

none

### **Returns**

`QUANTITY` - integer of the number of connected peers

### **Example**

Request

```
curl https://rpc-mainnet.u2u.xyz \
-X POST \
-H "Content-Type: application/json" \
-d '{"jsonrpc":"2.0","method":"net_peerCount","params":[],"id":74}'
```

Result

```javascript
{
  "id":74,
  "jsonrpc": "2.0",
  "result": "0x2" // 2
}
```


# web3\_clientVersion

Returns the current client version.

### **Parameters**

none

### **Returns**

`String` - The current client version

### **Example**

Request

```
curl https://rpc-mainnet.u2u.xyz \
-X POST \
-H "Content-Type: application/json" \
-d '{"jsonrpc":"2.0","method":"web3_clientVersion","params":[],"id":0}'
```

Result

```javascript
{
    "jsonrpc": "2.0",
    "id": 0,
    "result": "Geth/v1.10.15-stable-8be800ff/linux-arm64/go1.17.5"
}
```


# web3\_sha3

Returns Keccak-256 (not the standardized SHA3-256) of the given data.

### **Parameters**

1. `DATA` - the data in hex form to convert into a SHA3 hash

```bash
params: [
  "0x68656c6c6f20776f726c64"
]
```

### **Returns**

`DATA` - The SHA3 result of the given string.

### **Example**

Request

```
curl https://rpc-mainnet.u2u.xyz \
-X POST \
-H "Content-Type: application/json" \
-d '{"jsonrpc":"2.0","method":"web3_sha3","params":["0x68656c6c6f20776f726c64"],"id":64}'
```

Result

```javascript
{
    "jsonrpc": "2.0",
    "id": 64,
    "result": "0x47173285a8d7341e5e972fc677286384f802f8ef42a5ec5f03bbfa254cb01fad"
}
```


# debug\_traceTransaction

Attempts to run the transaction in the exact same manner as it was executed on the network. It will replay any transaction that may have been executed prior to this one before it and will then attempt

#### Parameters

1. Transaction parameters with the following field:
   * `transactionHash` - string - This describes the transaction hash of the transaction that needs to be traced.
2. Object - Options for call

* `tracer` - `string` to specify the type of tracer. Currently supports `callTracer` and `prestateTracer` (see below for definitions).
* `timeout` - `string` - A duration string of decimal numbers that overrides the default timeout of 5 seconds for JavaScript-based tracing calls. Max timeout is "10s". Valid time units are "ns", "us", "ms", "s" each with optional fraction, such as "300ms" or "2s45ms".

#### Returns

* `Object` - trace object

### `callTracer`

The `callTracer` tracks all the call frames executed during a transaction, including depth 0. The result will be a nested list of call frames, resembling how EVM works. They form a tree with the top-level call at root and sub-calls as children of the higher levels. Each call frame has the following fields:

| field          | type         | description                          |
| -------------- | ------------ | ------------------------------------ |
| `type`         | string       | CALL or CREATE                       |
| `from`         | string       | address                              |
| `to`           | string       | address                              |
| `value`        | string       | hex-encoded amount of value transfer |
| `gas`          | string       | hex-encoded gas provided for call    |
| `gasUsed`      | string       | hex-encoded gas used during call     |
| `input`        | string       | call data                            |
| `output`       | string       | return data                          |
| `error`        | string       | error, if any                        |
| `revertReason` | string       | Solidity revert reason, if any       |
| `calls`        | \[]callframe | list of sub-calls                    |

#### Request

cURL

```curl
curl https://eth-mainnet.g.alchemy.com/v2/demo \
 -X POST \
 -H "Content-Type: application/json" \
 -d '{"jsonrpc": "2.0",
         "id": 1,
         "method": "debug_traceTransaction",
         "params": [
          "0x8fc90a6c3ee3001cdcbbb685b4fbe67b1fa2bec575b15b0395fea5540d0901ae",
          {
               "tracer": "callTracer"
          }
         ]
       }'
```

***

#### Response

cURL

```curl
{
  "jsonrpc": "2.0",
  "id": 1,
  "result": {
    "type": "CALL",
    "from": "0x5067c042e35881843f2b31dfc2db1f4f272ef48c",
    "to": "0x3ee18b2214aff97000d974cf647e7c347e8fa585",
    "value": "0x0",
    "gas": "0x17459",
    "gasUsed": "0x166cb",
    "input": "0x0f5287b0000000000000000000000000a0b86991c6218b36c1d19d4a2e9eb0ce3606eb48000000000000000000000000000000000000000000000000000000001debea42000000000000000000000000000000000000000000000000000000000000000167c46aa713cfe47608dd1c16f8a0325208df084c3cbebf9f366ad0eafc2653e400000000000000000000000000000000000000000000000000000000001e8542000000000000000000000000000000000000000000000000000000006eca0000",
    "output": "0x000000000000000000000000000000000000000000000000000000000001371e",
    "calls": [
      {
        "type": "DELEGATECALL",
        "from": "0x3ee18b2214aff97000d974cf647e7c347e8fa585",
        "to": "0x76364611e457b1f97cd58ffc332ddc7561a193f6",
        "gas": "0x15bc0",
        "gasUsed": "0x1538e",
        "input": "0x0f5287b0000000000000000000000000a0b86991c6218b36c1d19d4a2e9eb0ce3606eb48000000000000000000000000000000000000000000000000000000001debea42000000000000000000000000000000000000000000000000000000000000000167c46aa713cfe47608dd1c16f8a0325208df084c3cbebf9f366ad0eafc2653e400000000000000000000000000000000000000000000000000000000001e8542000000000000000000000000000000000000000000000000000000006eca0000",
        "output": "0x000000000000000000000000000000000000000000000000000000000001371e",
        "calls": [
          {
            "type": "STATICCALL",
            "from": "0x3ee18b2214aff97000d974cf647e7c347e8fa585",
            "to": "0xa0b86991c6218b36c1d19d4a2e9eb0ce3606eb48",
            "gas": "0x123bb",
            "gasUsed": "0x25c0",
            "input": "0x313ce567",
            "output": "0x0000000000000000000000000000000000000000000000000000000000000006",
            "calls": [
              {
                "type": "DELEGATECALL",
                "from": "0xa0b86991c6218b36c1d19d4a2e9eb0ce3606eb48",
                "to": "0xa2327a938febf5fec13bacfb16ae10ecbc4cbdcf",
                "gas": "0x10357",
                "gasUsed": "0x94d",
                "input": "0x313ce567",
                "output": "0x0000000000000000000000000000000000000000000000000000000000000006"
              }
            ]
          },
          {
            "type": "STATICCALL",
            "from": "0x3ee18b2214aff97000d974cf647e7c347e8fa585",
            "to": "0xa0b86991c6218b36c1d19d4a2e9eb0ce3606eb48",
            "gas": "0xf9d6",
            "gasUsed": "0xcf3",
            "input": "0x70a082310000000000000000000000003ee18b2214aff97000d974cf647e7c347e8fa585",
            "output": "0x00000000000000000000000000000000000000000000000000001691e551e115",
            "calls": [
              {
                "type": "DELEGATECALL",
                "from": "0xa0b86991c6218b36c1d19d4a2e9eb0ce3606eb48",
                "to": "0xa2327a938febf5fec13bacfb16ae10ecbc4cbdcf",
                "gas": "0xf315",
                "gasUsed": "0x9e1",
                "input": "0x70a082310000000000000000000000003ee18b2214aff97000d974cf647e7c347e8fa585",
                "output": "0x00000000000000000000000000000000000000000000000000001691e551e115"
              }
            ]
          },
          {
            "type": "CALL",
            "from": "0x3ee18b2214aff97000d974cf647e7c347e8fa585",
            "to": "0xa0b86991c6218b36c1d19d4a2e9eb0ce3606eb48",
            "value": "0x0",
            "gas": "0xe796",
            "gasUsed": "0x5f48",
            "input": "0x23b872dd0000000000000000000000005067c042e35881843f2b31dfc2db1f4f272ef48c0000000000000000000000003ee18b2214aff97000d974cf647e7c347e8fa585000000000000000000000000000000000000000000000000000000001debea42",
            "output": "0x0000000000000000000000000000000000000000000000000000000000000001",
            "calls": [
              {
                "type": "DELEGATECALL",
                "from": "0xa0b86991c6218b36c1d19d4a2e9eb0ce3606eb48",
                "to": "0xa2327a938febf5fec13bacfb16ae10ecbc4cbdcf",
                "gas": "0xe115",
                "gasUsed": "0x5c2d",
                "input": "0x23b872dd0000000000000000000000005067c042e35881843f2b31dfc2db1f4f272ef48c0000000000000000000000003ee18b2214aff97000d974cf647e7c347e8fa585000000000000000000000000000000000000000000000000000000001debea42",
                "output": "0x0000000000000000000000000000000000000000000000000000000000000001"
              }
            ]
          },
          {
            "type": "STATICCALL",
            "from": "0x3ee18b2214aff97000d974cf647e7c347e8fa585",
            "to": "0xa0b86991c6218b36c1d19d4a2e9eb0ce3606eb48",
            "gas": "0x857c",
            "gasUsed": "0x523",
            "input": "0x70a082310000000000000000000000003ee18b2214aff97000d974cf647e7c347e8fa585",
            "output": "0x00000000000000000000000000000000000000000000000000001692033dcb57",
            "calls": [
              {
                "type": "DELEGATECALL",
                "from": "0xa0b86991c6218b36c1d19d4a2e9eb0ce3606eb48",
                "to": "0xa2327a938febf5fec13bacfb16ae10ecbc4cbdcf",
                "gas": "0x808c",
                "gasUsed": "0x211",
                "input": "0x70a082310000000000000000000000003ee18b2214aff97000d974cf647e7c347e8fa585",
                "output": "0x00000000000000000000000000000000000000000000000000001692033dcb57"
              }
            ]
          },
          {
            "type": "CALL",
            "from": "0x3ee18b2214aff97000d974cf647e7c347e8fa585",
            "to": "0x98f3c9e6e3face36baad05fe09d375ef1464288b",
            "value": "0x0",
            "gas": "0x4f9f",
            "gasUsed": "0x46c6",
            "input": "0xb19a437e000000000000000000000000000000000000000000000000000000006eca00000000000000000000000000000000000000000000000000000000000000000060000000000000000000000000000000000000000000000000000000000000000f000000000000000000000000000000000000000000000000000000000000008501000000000000000000000000000000000000000000000000000000001debea42000000000000000000000000a0b86991c6218b36c1d19d4a2e9eb0ce3606eb48000267c46aa713cfe47608dd1c16f8a0325208df084c3cbebf9f366ad0eafc2653e4000100000000000000000000000000000000000000000000000000000000001e8542000000000000000000000000000000000000000000000000000000",
            "output": "0x000000000000000000000000000000000000000000000000000000000001371e",
            "calls": [
              {
                "type": "DELEGATECALL",
                "from": "0x98f3c9e6e3face36baad05fe09d375ef1464288b",
                "to": "0x8c0041566e0bc27efe285a9e98d0b4217a46809c",
                "gas": "0x3b88",
                "gasUsed": "0x3377",
                "input": "0xb19a437e000000000000000000000000000000000000000000000000000000006eca00000000000000000000000000000000000000000000000000000000000000000060000000000000000000000000000000000000000000000000000000000000000f000000000000000000000000000000000000000000000000000000000000008501000000000000000000000000000000000000000000000000000000001debea42000000000000000000000000a0b86991c6218b36c1d19d4a2e9eb0ce3606eb48000267c46aa713cfe47608dd1c16f8a0325208df084c3cbebf9f366ad0eafc2653e4000100000000000000000000000000000000000000000000000000000000001e8542000000000000000000000000000000000000000000000000000000",
                "output": "0x000000000000000000000000000000000000000000000000000000000001371e"
              }
            ]
          }
        ]
      }
    ]
  }
}
```

Things to note about the call tracer:

* Calls to precompiles are also included in the result
* In case a frame reverts, the field `output` will contain the raw return data
* In case the top level frame reverts, its `revertReason` field will contain the parsed reason of revert as returned by the Solidity contract
* Setting the `tracerConfig` of `onlyTopCall` to `true` will only trace the main (top-level) call and none of the sub-calls

### **Example**

Request

```
curl --location 'https://rpc-nebulas-testnet.uniultra.xyz/' \
--header 'Content-Type: application/json' \
--data '{
    "jsonrpc": "2.0",
    "method": "debug_traceTransaction",
    "params": [
        "0x63cce1e03a3d3b66ef02abba0ad16aa1bd10e96ffe2406fcdd9221ea48695ba6",
        {"tracer": "callTracer"}
    ],
    "id": 1
}'
```

Result

```javascript
{
    "jsonrpc": "2.0",
    "id": 1,
    "result": {
        "type": "CALL",
        "from": "0xc0e9b65cb944874546ec3ec15e6a2949b8a57201",
        "to": "0x59b576bb05aed0e5e66aaa1346a39107d19d5659",
        "value": "0x8ac7230489e80000",
        "gas": "0x9d14",
        "gasUsed": "0x9c94",
        "input": "0xc3434883000000000000000000000000000000000000000000000000000000000000000100000000000000000000000000000000000000000000000000000000000000010000000000000000000000000000000000000000000000000000000000000000",
        "output": "0x",
        "time": "5.677902ms"
    }
}
```

### &#x20;`prestateTracer`

Executing a transaction requires the prior state, including account of sender and recipient, contracts that are called during execution, etc. The `prestateTracer` replays the tx and tracks every part of state that is touched during that transaction. This is similar to the concept of a stateless witness, the difference being this tracer doesn’t return any cryptographic proof, rather only the trie leaves. The result is an object. The keys are addresses of accounts. The value is an object with the following fields:

| field     | type               | description                   |
| --------- | ------------------ | ----------------------------- |
| `balance` | string             | balance in wei                |
| `nonce`   | uint64             | nonce                         |
| `code`    | string             | hex-encoded bytecode          |
| `storage` | map\[string]string | storage slots of the contract |

#### Request

cURL

```curl
curl https://eth-mainnet.g.alchemy.com/v2/demo \
 -X POST \
 -H "Content-Type: application/json" \
 -d '{"jsonrpc": "2.0",
         "id": 1,
         "method": "debug_traceTransaction",
         "params": [
          "0x11d8c2482a89d566ed32c12b2ff51b49be5eb6c9f00749a4c04c594a2010f0b0",
          {
               "tracer": "prestateTracer"
          }
         ]
       }'
```

***

#### Response

cURL

```curl
{
  "jsonrpc": "2.0",
  "id": 1,
  "result": {
      '0x0000000000000000000000000000000000000001': { balance: '0x2c11de8a0e9026788', nonce: 0, code: '0x', storage: {} },
      '0x00000000006c3852cbef3e08e8df289169ede581': {
        balance: '0x1',
        nonce: 1,
        code: '0x60806040526004361015610013575b600080fd5b60003560e01c806306fdde031461013f57806346423aa71461013657806355944a421461012d5780635b34b9661461012457806379df72bd1461011b57806387201b41146101125780638814773214610109578063a817440414610100578063b3a34c4c146100f7578063e7acab24146100ee578063ed98a574146100e5578063f07ec373146100dc578063f47b7740146100d3578063fb0f3ee1146100ca5763fd9f1e10146100c257600080fd5b61000e61132d565b5061000e61102c565b5061000e610f8b565b5061000e610f46565b5061000e610eb5565b5061000e610e07565b5061000e610da3565b5061000e610d32565b5061000e610be3565b5061000e610b0f565b5061000e610994565b5061000e61092f565b5061000e61089e565b5061000e6101c1565b5061000e610199565b91908251928382526000905b8482106101815750601f8460209495601f199311610174575b0116010190565b600085828601015261016d565b90602090818082850101519082860101520190610154565b503461000e57600060031936011261000e57602080526707536561706f727460475260606020f35b503461000e57602060031936011261000e57600435600052600260205260806040600020546040519060ff81161515825260ff8160081c16151560208301526effffffffffffffffffffffffffffff8160101c16604083015260881c6060820152f35b507f4e487b7100000000000000000000000000000000000000000000000000000000600052604160045260246000fd5b60a0810190811067ffffffffffffffff82111761027057604052565b610278610224565b604052565b60c0810190811067ffffffffffffffff82111761027057604052565b6020810190811067ffffffffffffffff82111761027057604052565b6040810190811067ffffffffffffffff82111761027057604052565b90601f601f19910116810190811067ffffffffffffffff82111761027057604052565b60405190610160820182811067ffffffffffffffff82111761027057604052565b6040519061032282610254565b565b60209067ffffffffffffffff811161033e575b60051b0190565b610346610224565b610337565b6001600160a01b0381160361000e57565b60a435906103228261034b565b35906103228261034b565b3590600682101561000e57565b92919261038d82610324565b60409461039c865192836102d1565b819584835260208093019160a080960285019481861161000e57925b8584106103c85750505050505050565b868483031261000e5784879184516103df81610254565b6103e887610374565b8152828701356103f78161034b565b83820152858701358682015260608088013590820152608080880135908201528152019301926103b8565b9080601f8301121561000e5781602061043d93359101610381565b90565b92919261044c82610324565b60409461045b865192836102d1565b819584835260208093019160c080960285019481861161000e57925b8584106104875750505050505050565b868483031261000e57848791845161049e8161027d565b6104a787610374565b8152828701356104b68161034b565b838201528587013586820152606080880135908201526080808801359082015260a080880135906104e68261034b565b820152815201930192610477565b9080601f8301121561000e5781602061043d93359101610440565b6004111561000e57565b35906103228261050f565b9190916101608184031261000e5761053a6102f4565b9261054482610369565b845261055260208301610369565b602085015267ffffffffffffffff90604083013582811161000e5781610579918501610422565b6040860152606083013591821161000e576105959183016104f4565b60608401526105a660808201610519565b608084015260a081013560a084015260c081013560c084015260e081013560e0840152610100808201359084015261012080820135908401526101408091013590830152565b35906effffffffffffffffffffffffffffff8216820361000e57565b92919267ffffffffffffffff8211610650575b604051916106336020601f19601f84011601846102d1565b82948184528183011161000e578281602093846000960137010152565b610658610224565b61061b565b9080601f8301121561000e5781602061043d93359101610608565b91909160a08184031261000e5761068d610315565b9267ffffffffffffffff823581811161000e57826106ac918501610524565b85526106ba602084016105ec565b60208601526106cb604084016105ec565b6040860152606083013581811161000e57826106e891850161065d565b6060860152608083013590811161000e57610703920161065d565b6080830152565b9080601f8301121561000e5781359061072282610324565b9261073060405194856102d1565b828452602092838086019160051b8301019280841161000e57848301915b84831061075e5750505050505090565b823567ffffffffffffffff811161000e57869161078084848094890101610678565b81520192019161074e565b9181601f8401121561000e5782359167ffffffffffffffff831161000e576020808501948460051b01011161000e57565b507f4e487b7100000000000000000000000000000000000000000000000000000000600052602160045260246000fd5b600611156107f657565b6103226107bc565b608090805161080c816107ec565b8352816001600160a01b03918260208201511660208601526040810151604086015260608101516060860152015116910152565b90815180825260208080930193019160005b828110610860575050505090565b909192938260e0600192604088516108798382516107fe565b808501516001600160a01b031660a0840152015160c082015201950193929101610852565b50606060031936011261000e5767ffffffffffffffff60043581811161000e576108cc90369060040161070a565b9060243581811161000e576108e590369060040161078b565b60443592831161000e5761092b9361091161090761091795369060040161078b565b9490933691611bff565b90613e21565b604051918291602083526020830190610840565b0390f35b503461000e57600060031936011261000e57610949615017565b3360005260016020526020604060002060018154018091556040518181527f721c20121297512b72821b97f5326877ea8ecf4bb9948fea5bfcb6453074d37f833392a2604051908152f35b503461000e5760031960208136011261000e5760043567ffffffffffffffff811161000e576101608160040192823603011261000e576109d38261152d565b916109e06024830161152d565b906109ee6044840182611cfc565b6064850192916109fe8484611d50565b92909360848801610a0e90611dae565b95610a1891611d50565b969050610a236102f4565b6001600160a01b0390991689526001600160a01b031660208901523690610a4992610381565b60408701523690610a5992610440565b6060850152610a6b9060808501611db8565b60a482013560a084015260c482013560c084015260e482013560e08401526101048201356101008401526101248201356101208401526101408301526101440135610ab59161268a565b604051908152602090f35b9092916040820191604081528451809352606081019260208096019060005b818110610af95750505061043d9394818403910152610840565b8251151586529487019491870191600101610adf565b5060e060031936011261000e5767ffffffffffffffff60043581811161000e57610b3d90369060040161070a565b60243582811161000e57610b5590369060040161078b565b909160443584811161000e57610b6f90369060040161078b565b9060643595861161000e57610b8b610ba496369060040161078b565b929091610b9661035c565b9560c4359760843596611cc2565b9061092b60405192839283610ac0565b602060031982011261000e576004359067ffffffffffffffff821161000e57610bdf9160040161078b565b9091565b503461000e57610bf236610bb4565b610bfa615017565b60005b818110610c105760405160018152602090f35b80610c1e6001928486613f13565b610c2881806146ae565b610c318161152d565b91610c44610c3f3684610524565b614fa9565b91610c59836000526002602052604060002090565b610c6381856155a2565b50610c76610c72825460ff1690565b1590565b610c86575b505050505001610bfd565b7ffde361574a066b44b3b5fe98a87108b7565e327327954c4faeea56a4e6491a0a92610d2592610d01610d0793610cd6610ccf610cc86020968781019061158b565b3691610608565b898b615303565b60017fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff00825416179055565b0161152d565b6040519384526001600160a01b039081169416929081906020820190565b0390a33880808080610c7b565b50604060031936011261000e5767ffffffffffffffff60043581811161000e57610d6090369060040161078b565b60249291923591821161000e5761092b92610d8d610d8561091794369060040161078b565b939092614750565b60405190610d9a82610299565b60008252613e21565b5060031960408136011261000e576004359067ffffffffffffffff821161000e57604090823603011261000e57610dfd610de16020926004016146e1565b60405190610dee82610299565b600082523391602435916141fd565b6040519015158152f35b5060031960808136011261000e576004359067ffffffffffffffff9081831161000e5760a090833603011261000e5760243590811161000e5761092b91610e55610e9692369060040161078b565b90606435610e628161034b565b6001600160a01b038116610ea85750610e90610e8433945b3690600401610678565b91604435933691611bff565b906141fd565b60405190151581529081906020820190565b610e84610e909194610e7a565b5060a060031936011261000e5767ffffffffffffffff60043581811161000e57610ee390369060040161078b565b9060243583811161000e57610efc90369060040161078b565b91909260443594851161000e57610f25610f1d610ba496369060040161078b565b929093614750565b9160405193610f3385610299565b6000855260843595339560643595612a0b565b503461000e57602060031936011261000e576020610f83600435610f698161034b565b6001600160a01b0316600052600160205260406000205490565b604051908152f35b503461000e57600060031936011261000e57610ff3610fa86127b4565b60405190610fb5826102b5565b600382527f312e3100000000000000000000000000000000000000000000000000000000006020830152604051928392606084526060840190610148565b9060208301526001600160a01b037f00000000000000000000000000000000f9490004c11cef243f5400493c00ad631660408301520390f35b5060031960208136011261000e5760043567ffffffffffffffff811161000e576102408160040192823603011261000e5761012435908160021c926001841193341585036112f85784936003821160028314916110d183600286117ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe870102018815926001820185028460011b880103998a92600360a088026024013593168a6115dc565b6110e38260051b6101c40135986107ec565b156111b5575050506111036110f78261152d565b6001600160a01b031690565b6001600160a01b0390811660248401351761118b5761115f60449461115a6111759761116b9461113560a4890161152d565b9060648901946111448661152d565b9060e48b01359360c48c01359333931691611dcf565b61152d565b91610204840190611537565b93909201356119df565b61117f6001600055565b60405160018152602090f35b60046040517f6ab37ce7000000000000000000000000000000000000000000000000000000008152fd5b9194509161121e6110f7606461122396611228996111d1611514565b8a819b996111df839b6107ec565b1561122d5750610d01916111f560a4850161152d565b61120086860161152d565b9060e48601359160c4870135916001600160a01b03339216906120c8565b611ac5565b6122c4565b611175565b611236816107ec565b6003810361127d57506112789161124f60a4850161152d565b61125a86860161152d565b9060e48601359160c4870135916001600160a01b03339216906121be565b610d01565b806112896004926107ec565b036112c3576112789161129b8861152d565b6112a686860161152d565b6044860135916001600160a01b03602488013592169033906120c8565b611278916112d08861152d565b6112db86860161152d565b6044860135916001600160a01b03602488013592169033906121be565b6040517fa61be9f0000000000000000000000000000000000000000000000000000000008152346004820152602490fd5b0390fd5b503461000e5761133c36610bb4565b611344615017565b60005b81811061135a5760405160018152602090f35b611365818385614fe2565b61136e8161152d565b60209061137c82840161152d565b6001600160a01b039182'... 38894 more characters,
        storage: {
          '0x0000000000000000000000000000000000000000000000000000000000000000': '0x0000000000000000000000000000000000000000000000000000000000000001',
          '0x2a80fdf9d315ad823e53b6261799b7dbbae331a19706efe75f01062ebc3047e3': '0x0000000000000000000000000000000000000000000000000000000000000000',
          '0x654142b9008c35619ea6fc2cb356e4eca43c9b4334f6e03140c9b7f177c87ad3': '0x0000000000000000000000000000000000000000000000000000000000000000'
        }
      },
      '0x0000a26b00c1f0df003000390027140000faa719': {
        balance: '0x52cac52fc7f484f6b',
        nonce: 1,
        code: '0x60806040526004361015610018575b6100166103e4565b005b6000803560e01c63c4d66de81461002f575061000e565b346102245760207ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc36011261022457808060043561006c81610227565b73939c8d89ebc11fa45e576215e2353673ad0ba18a32148015610207575b80156101ea575b80156101cd575b6100a19061024a565b604051907f5c60da1b00000000000000000000000000000000000000000000000000000000825260208260048173ffffffffffffffffffffffffffffffffffffffff7f0000000000000000000000000000000033ca97c0b4df29103dc8da00a967884f165afa9182156101c0575b8392610190575b506040517fc4d66de8000000000000000000000000000000000000000000000000000000006020820190815273ffffffffffffffffffffffffffffffffffffffff929092166024808301919091528152610171604482610305565b51915af461017d610378565b501561018857604051f35b3d81803e3d90fd5b6101b291925060203d81116101b9575b6101aa8183610305565b810190610353565b9038610116565b503d6101a0565b6101c861036b565b61010f565b5032733b52ad533687ce908ba0485ac177c5fb4297296214610098565b507386d26897267711ea4b173c8c124a0a73612001da3214610091565b5073e80a65eb7a3018deda407e621ef5fb5b416678ca321461008a565b80fd5b73ffffffffffffffffffffffffffffffffffffffff81160361024557565b600080fd5b1561025157565b60846040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152603460248201527f496e697469616c697a65206d757374206f726967696e6174652066726f6d206160448201527f6e20617070726f766564206465706c6f7965722e0000000000000000000000006064820152fd5b507f4e487b7100000000000000000000000000000000000000000000000000000000600052604160045260246000fd5b90601f7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0910116810190811067ffffffffffffffff82111761034657604052565b61034e6102d5565b604052565b90816020910312610245575161036881610227565b90565b506040513d6000823e3d90fd5b3d156103df573d9067ffffffffffffffff82116103d2575b604051916103c660207fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0601f8401160184610305565b82523d6000602084013e565b6103da6102d5565b610390565b606090565b34156103ec57565b6000806040517f5c60da1b00000000000000000000000000000000000000000000000000000000815260208160048173ffffffffffffffffffffffffffffffffffffffff7f0000000000000000000000000000000033ca97c0b4df29103dc8da00a967884f165afa90811561049f575b8291610481575b50368280378136915af43d6000803e1561047c573d6000f35b3d6000fd5b610499915060203d81116101b9576101aa8183610305565b83610463565b6104a761036b565b61045c56fea264697066735822122022a6f8a80a3410719e8504e9b42af008259446db5cdbc3acc5d20ff3f8f338a464736f6c634300080e0033',
        storage: {}
      },
      '0x004c00500000ad104d7dbd00e3ae0a5c00560c00': {
        balance: '0x0',
        nonce: 1,
        code: '0x608080604052600436101561001357600080fd5b60003560e01c9081630e1d31dc146100b6575080632718034d146100ad57806333131570146100a4578063570ca7351461009b57806365c4eb721461009257806384385c6f146100895780638456cb59146100805763e5c27af114610078575b600080fd5b610073610ab9565b50610073610a22565b50610073610883565b506100736105bc565b50610073610569565b506100736104af565b5061007361026a565b346100735760807ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc360112610073576020906100f3602435610123565b6100fe604435610123565b7f0e1d31dc000000000000000000000000000000000000000000000000000000008152f35b73ffffffffffffffffffffffffffffffffffffffff81160361007357565b359061014c82610123565b565b9181601f840112156100735782359167ffffffffffffffff8311610073576020808501948460051b01011161007357565b507f4e487b7100000000000000000000000000000000000000000000000000000000600052602160045260246000fd5b9060068210156101bc5752565b6101c461017f565b52565b60208082019080835283518092528060408094019401926000905b8382106101f157505050505090565b90919293948360e0600192848951805161020c8482516101af565b73ffffffffffffffffffffffffffffffffffffffff9081878201511687860152838101518486015260608082015190860152816080809201511690850152858201511660a0840152015160c0820152019601920190939291936101e2565b507ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc606081360112610073576004356102a281610123565b67ffffffffffffffff91602435838111610073576102c490369060040161014e565b929093604435908111610073576102df90369060040161014e565b73ffffffffffffffffffffffffffffffffffffffff9591866000541633141580610483575b610459576040948551967fa817440400000000000000000000000000000000000000000000000000000000885280604489018860048b015252606488019060648160051b8a01019580926000915b8383106103d35750505061039f89896000828e818d8161037d8f8f8f8f8584030160248601526112e9565b03923491165af19182156103c6575b6000926103a3575b5051918291826101c7565b0390f35b6103bf91923d8091833e6103b78183610cf4565b81019061107d565b9083610394565b6103ce611065565b61038c565b909192939761043d8b61044a838f6104178e7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff9c61042e9360019903018a5288611225565b936104228580611033565b90808452830190610f45565b90602094848680960190611196565b91858185039101526111e6565b9a019301930191939290610352565b60046040517fccea9e6f000000000000000000000000000000000000000000000000000000008152fd5b50867f00000000000000000000000044dc42076eca1b8e35b222a54b04daa333ce1f6316331415610304565b5034610073577ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc60a081360112610073576104eb602435610123565b60443567ffffffffffffffff918282116100735760a09136030112610073576064358181116100735761052290369060040161014e565b50506084359081116100735761053c90369060040161014e565b50506040517f0e1d31dc000000000000000000000000000000000000000000000000000000008152602090f35b50346100735760007ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc36011261007357602073ffffffffffffffffffffffffffffffffffffffff60005416604051908152f35b5060807ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc81813601126100735760049081356105f781610123565b67ffffffffffffffff9160243583811161007357610618903690860161014e565b95909360443581811161007357610632903690880161014e565b9290916064359081116100735761064c903690890161014e565b93909273ffffffffffffffffffffffffffffffffffffffff998a6000541633141580610857575b61082e5797989260409889519a7f55944a42000000000000000000000000000000000000000000000000000000008c528160648d018d606098899101525260848c019560848d8460051b01019682946000935b85851061075357505050505050508561039f9a958a97956106fb868a989661070a968a988960009f9b030160248a0152611404565b928584030160448601526112e9565b03923491165af1918215610746575b60009261072b575051918291826101c7565b61073f91923d8091833e6103b78183610cf4565b9038610394565b61074e611065565b610719565b909192939495988f8f90917fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff7c600193820301865261081d6107948d86611391565b6107ae6107a18280611033565b60a0808652850190610f45565b926108106108066effffffffffffffffffffffffffffff956020978789986107d78a8901611375565b16898701526107e7828801611375565b16908501528c6107f981870187611196565b91868403908701526111e6565b9289810190611196565b91898185039101526111e6565b9b01940195019392959491906106c6565b896040517fccea9e6f000000000000000000000000000000000000000000000000000000008152fd5b508a7f00000000000000000000000044dc42076eca1b8e35b222a54b04daa333ce1f6316331415610673565b50346100735760207ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc360112610073576004356108bf81610123565b73ffffffffffffffffffffffffffffffffffffffff90817f00000000000000000000000044dc42076eca1b8e35b222a54b04daa333ce1f631633036109f85716801561097457600080547fffffffffffffffffffffffff0000000000000000000000000000000000000000168217905560405173ffffffffffffffffffffffffffffffffffffffff90911681527fb3b3f5f64ab192e4b5fefde1f51ce9733bbdcf831951543b325aebd49cc27ec490602090a1005b60846040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152602b60248201527f4f70657261746f722063616e206e6f742062652073657420746f20746865206e60448201527f756c6c20616464726573730000000000000000000000000000000000000000006064820152fd5b60046040517f6d5769be000000000000000000000000000000000000000000000000000000008152fd5b50346100735760007ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc3601126100735773ffffffffffffffffffffffffffffffffffffffff7f00000000000000000000000044dc42076eca1b8e35b222a54b04daa333ce1f631633036109f8577f9e87fac88ff661f02d44f95383c817fece4bce600a3dab7a54406878b965e7526000604051a132ff5b50346100735760407ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc36011261007357600435610af581610123565b60243567ffffffffffffffff811161007357610b1590369060040161014e565b9073ffffffffffffffffffffffffffffffffffffffff806000541633141580610c53575b61045957604051917ffd9f1e1000000000000000000000000000000000000000000000000000000000835260248301938060209586600487015252604484019060448160051b8601019280926000915b838310610c015761039f898981818e8160008e828f0393165af1918215610bf4575b600092610bc7575b505060405190151581529081906020820190565b610be69250803d10610bed575b610bde8183610cf4565b810190610d35565b8280610bb3565b503d610bd4565b610bfc611065565b610bab565b90919293948880610c44837fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffbc8c60019603018752610c3f8a87611033565b610f45565b97019301930191939290610b89565b50807f00000000000000000000000044dc42076eca1b8e35b222a54b04daa333ce1f6316331415610b39565b507f4e487b7100000000000000000000000000000000000000000000000000000000600052604160045260246000fd5b6060810190811067ffffffffffffffff821117610ccb57604052565b610cd3610c7f565b604052565b60a0810190811067ffffffffffffffff821117610ccb57604052565b90601f7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0910116810190811067ffffffffffffffff821117610ccb57604052565b90816020910312610073575180151581036100735790565b90357fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe18236030181121561007357016020813591019167ffffffffffffffff82116100735760a082023603831361007357565b6006111561007357565b9190808252602080920192916000905b828210610dc8575050505090565b9091929380610de36001928735610dde81610da0565b6101af565b73ffffffffffffffffffffffffffffffffffffffff83870135610e0581610123565b168184015260408681013590820152606080870135908201526080808701359082015260a0908101950193920190610dba565b90357fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe18236030181121561007357016020813591019167ffffffffffffffff82116100735760c082023603831361007357565b9190808252602080920192916000905b828210610ea9575050505090565b9091929380610ebf6001928735610dde81610da0565b82860135610ecc81610123565b73ffffffffffffffffffffffffffffffffffffffff8091168483015260408088013590830152606080880135908301526080808801359083015260a09081880135610f1681610123565b169082015260c0908101950193920190610e9b565b3590600482101561007357565b9060048210156101bc5752565b90610f6d81610f5384610141565b73ffffffffffffffffffffffffffffffffffffffff169052565b610f99610f7c60208401610141565b73ffffffffffffffffffffffffffffffffffffffff166020830152565b610fd8610fbd610fac6040850185610d4d565b610160806040870152850191610daa565b610fca6060850185610e38565b908483036060860152610e8b565b91610ff2610fe860808301610f2b565b6080840190610f38565b60a081013560a083015260c081013560c083015260e081013560e0830152610100808201359083015261012080820135908301526101408091013591015290565b90357ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffea182360301811215610073570190565b506040513d6000823e3d90fd5b519061014c82610123565b6020808284031261007357815167ffffffffffffffff9283821161007357019083601f83011215610073578151928311611189575b6040938451946110c7838660051b0187610cf4565b848652828601918360e080970286010194818611610073578401925b8584106110f4575050505050505090565b8382038781126100735783519161110a83610caf565b60a08092126100735788926111718893875161112581610cd8565b895161113081610da0565b8152858a015161113f81610123565b86820152888a0151898201526060808b0151908201526080808b01519061116582610123565b82015283528801611072565b8382015260c0870151868201528152019301926110e3565b611191610c7f565b6110b2565b90357fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe18236030181121561007357016020813591019167ffffffffffffffff821161007357813603831361007357565b601f82602094937fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0938186528686013760008582860101520116010190565b90357fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc182360301811215610073570190565b90357fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe18236030181121561007357016020813591019167ffffffffffffffff8211610073578160061b3603831361007357565b9190808252602080920192916000905b8282106112c8575050505090565b833585528381013585820152604094850194909301926001909101906112ba565b90808352602080930192838260051b850194846000925b858410611311575050505050505090565b909192939495968580611364838560019503885261132f8c88611225565b9061135761134d6113408480611257565b60408086528501916112aa565b9285810190611257565b91858185039101526112aa565b990194019401929594939190611300565b35906effffffffffffffffffffffffffff'... 902 more characters,
        storage: {}
      },
      '0x1e0049783f008a0085193e00003d00cd54003c71': {
        balance: '0x0',
        nonce: 1,
        code: '0x60806040526004361015610013575b600080fd5b6000803560e01c9081634ce34aa21461006657508063899e104c1461005d5780638df25d92146100545763c4e8fcb51461004c57600080fd5b61000e610362565b5061000e61027f565b5061000e6101ab565b346101465760207ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc3601126101465760043567ffffffffffffffff8111610142576100b5903690600401610149565b9133815280602052604081205415610116575b8281106100fa576040517f4ce34aa2000000000000000000000000000000000000000000000000000000008152602090f35b8061011061010b6001938686610532565b6105c4565b016100c8565b807f93daadf2000000000000000000000000000000000000000000000000000000006024925233600452fd5b5080fd5b80fd5b9181601f8401121561000e5782359167ffffffffffffffff831161000e5760208085019460c0850201011161000e57565b9181601f8401121561000e5782359167ffffffffffffffff831161000e576020808501948460051b01011161000e57565b503461000e5760407ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc36011261000e5767ffffffffffffffff60043581811161000e576101fc903690600401610149565b9160243590811161000e5761021590369060040161017a565b919092600033815280602052604081205415610116575b8181106102685761023d8486610acb565b6040517f899e104c000000000000000000000000000000000000000000000000000000008152602090f35b8061027961010b6001938587610532565b0161022c565b503461000e5760207ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc36011261000e5760043567ffffffffffffffff811161000e576102cf90369060040161017a565b33600052600060205260406000205415610316576102ec91610acb565b60206040517f8df25d92000000000000000000000000000000000000000000000000000000008152f35b7f93daadf2000000000000000000000000000000000000000000000000000000006000523360045260246000fd5b73ffffffffffffffffffffffffffffffffffffffff81160361000e57565b503461000e5760407ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc36011261000e5760043561039e81610344565b6024359081151580830361000e5773ffffffffffffffffffffffffffffffffffffffff90817f00000000000000000000000000000000f9490004c11cef243f5400493c00ad631633036105085761041f6104188473ffffffffffffffffffffffffffffffffffffffff166000526000602052604060002090565b5460ff1690565b1515146104b657816104a6846104767fae63067d43ac07563b7eb8db6595635fc77f1578a2a5ea06ba91b63e2afa37e29573ffffffffffffffffffffffffffffffffffffffff166000526000602052604060002090565b9060ff7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff0083541691151516179055565b60405193151584521691602090a2005b506040517f924e341e00000000000000000000000000000000000000000000000000000000815273ffffffffffffffffffffffffffffffffffffffff9190911660048201529015156024820152604490fd5b60046040517f6d5769be000000000000000000000000000000000000000000000000000000008152fd5b91908110156105425760c0020190565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052603260045260246000fd5b6004111561057b57565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052602160045260246000fd5b35600481101561000e5790565b356105c181610344565b90565b60016105cf826105aa565b6105d881610571565b0361061357806105ed602061061193016105b7565b906105fa604082016105b7565b60a0610608606084016105b7565b92013592610712565b565b600261061e826105aa565b61062781610571565b0361069657600160a08201350361066c5780610648602061061193016105b7565b90610655604082016105b7565b6080610663606084016105b7565b92013592610882565b60046040517fefcc00b1000000000000000000000000000000000000000000000000000000008152fd5b60036106a1826105aa565b6106aa81610571565b036106e857806106bf602061061193016105b7565b6106cb604083016105b7565b6106d7606084016105b7565b90608060a085013594013592610990565b60046040517f7932f1fc000000000000000000000000000000000000000000000000000000008152fd5b9092604051926000947f23b872dd00000000000000000000000000000000000000000000000000000000865280600452816024528260445260208660648180885af1803d15601f3d1160018a51141617163d151581161561077c575b505050505050604052606052565b80863b15151661076e579087959691156107bc57602486887f5f15d672000000000000000000000000000000000000000000000000000000008252600452fd5b156107f657506084947f98891923000000000000000000000000000000000000000000000000000000008552600452602452604452606452fd5b3d610835575b5060a4947ff486bc8700000000000000000000000000000000000000000000000000000000855260045260245260445281606452608452fd5b601f3d0160051c9060051c908060030291808211610869575b505060205a91011061086057856107fc565b833d81803e3d90fd5b8080600392028380020360091c9203020101868061084e565b9092813b1561096257604051926000947f23b872dd000000000000000000000000000000000000000000000000000000008652806004528160245282604452858060648180885af1156108db5750505050604052606052565b8593943d61091e575b5060a4947ff486bc870000000000000000000000000000000000000000000000000000000085526004526024526044526064526001608452fd5b601f3d0160051c9060051c908060030291808211610949575b505060205a91011061086057856108e4565b8080600392028380020360091c92030201018680610937565b507f5f15d6720000000000000000000000000000000000000000000000000000000060005260045260246000fd5b929093833b15610a9d57604051936080519160a0519360c051956000987ff242432a000000000000000000000000000000000000000000000000000000008a528060045281602452826044528360645260a06084528960a452898060c48180895af115610a0d57505050505060805260a05260c052604052606052565b89949550883d610a50575b5060a4957ff486bc87000000000000000000000000000000000000000000000000000000008652600452602452604452606452608452fd5b601f3d0160051c9060051c908060030291808211610a84575b505060205a910110610a7b5786610a18565b843d81803e3d90fd5b8080600392028380020360091c92030201018780610a69565b837f5f15d6720000000000000000000000000000000000000000000000000000000060005260045260246000fd5b90816020907f2eb2c2d600000000000000000000000000000000000000000000000000000000825260005b838110610b095750505050506080604052565b8435820194853590813b156109625760a09182880192833560059181831b948b60c08097608094818301868501351490606085013514169201013584141615610c165789019a890160243760061b9360e0850160a452610104850194600086526040019060c437600080858982865af115610b8a5750505050600101610af6565b869394503d610bcb575b507fafc445e20000000000000000000000000000000000000000000000000000000060005260045260645260849081510190526000fd5b84601f3d01821c911c90600381810292808311610bff575b505050835a910110610bf55784610b94565b3d6000803e3d6000fd5b8080028380020360091c9203020101858080610be3565b7feba2084c0000000000000000000000000000000000000000000000000000000060005260046000fdfea2646970667358221220c5c8d054d9d5df7c3530eab1c32506aad1fcb6772c1457f0da5443ad9e91b4a364736f6c634300080e0033',
        storage: {
          '0x4b45dbdb9537765e3e4c041f280088db384dd6814f65f9e2b3de90673925417b': '0x0000000000000000000000000000000000000000000000000000000000000001'
        }
      },
      '0x248139afb8d3a2e16154fbe4fb528a3a214fd8e7': {
        balance: '0x0',
        nonce: 1,
        code: '0x60806040526004361061025c5760003560e01c806375d7741b11610144578063b88d4fde116100b6578063db292e7f1161007a578063db292e7f14610728578063dc33e68114610748578063dc8c57b414610768578063e985e9c51461077e578063f2fde38b146107c7578063f9020e33146107e757600080fd5b8063b88d4fde14610685578063bef7d63b146106a5578063c87b56dd146106c5578063ce4fe56f146106e5578063d60cd6951461071557600080fd5b806394985ddd1161010857806394985ddd146105cd57806394c4303a146105ed57806394d15abb1461061d57806395d89b41146106305780639a48eb5114610645578063a22cb4651461066557600080fd5b806375d7741b14610510578063784754f4146105305780637ac98be1146105435780638da5cb5b146105595780639231ab2a1461057757600080fd5b806329d7871b116101dd5780634891ad88116101a15780634891ad881461046157806351830227146104815780636352211e1461049b5780636e569177146104bb57806370a08231146104db578063715018a6146104fb57600080fd5b806329d7871b146103ba5780632a85db55146103d05780633fe05a2c146103f057806342842e0e1461042b5780634586fb4e1461044b57600080fd5b8063161b7f9311610224578063161b7f931461033257806318160ddd1461035657806323b872dd1461036f57806324600fc31461038f578063293108e0146103a457600080fd5b806301ffc9a71461026157806306fdde0314610296578063081812fc146102b8578063095ea7b3146102f05780630c96549414610312575b600080fd5b34801561026d57600080fd5b5061028161027c3660046127eb565b61080e565b60405190151581526020015b60405180910390f35b3480156102a257600080fd5b506102ab610860565b60405161028d9190612867565b3480156102c457600080fd5b506102d86102d336600461287a565b6108f2565b6040516001600160a01b03909116815260200161028d565b3480156102fc57600080fd5b5061031061030b3660046128aa565b610936565b005b34801561031e57600080fd5b5061031061032d3660046128d4565b6109c3565b34801561033e57600080fd5b50610348600e5481565b60405190815260200161028d565b34801561036257600080fd5b5060015460005403610348565b34801561037b57600080fd5b5061031061038a3660046128ef565b610a18565b34801561039b57600080fd5b50610310610a23565b3480156103b057600080fd5b50610348600f5481565b3480156103c657600080fd5b50610348600d5481565b3480156103dc57600080fd5b506103106103eb3660046129c8565b610aa5565b3480156103fc57600080fd5b5061028161040b366004612a30565b805160208183018101805160138252928201919093012091525460ff1681565b34801561043757600080fd5b506103106104463660046128ef565b610ae6565b34801561045757600080fd5b5061034860165481565b34801561046d57600080fd5b5061031061047c366004612a64565b610b01565b34801561048d57600080fd5b506014546102819060ff1681565b3480156104a757600080fd5b506102d86104b636600461287a565b610b52565b3480156104c757600080fd5b506103106104d6366004612a85565b610b64565b3480156104e757600080fd5b506103486104f63660046128d4565b610b99565b34801561050757600080fd5b50610310610be7565b34801561051c57600080fd5b5061034861052b3660046129c8565b610c1d565b61031061053e366004612aa7565b610d53565b34801561054f57600080fd5b5061034860175481565b34801561056557600080fd5b506008546001600160a01b03166102d8565b34801561058357600080fd5b5061059761059236600461287a565b610ee8565b6040805182516001600160a01b031681526020808401516001600160401b0316908201529181015115159082015260600161028d565b3480156105d957600080fd5b506103106105e8366004612a85565b610f0e565b3480156105f957600080fd5b506102816106083660046128d4565b60126020526000908152604090205460ff1681565b61031061062b366004612aa7565b610f90565b34801561063c57600080fd5b506102ab6111ca565b34801561065157600080fd5b50610310610660366004612a85565b6111d9565b34801561067157600080fd5b50610310610680366004612b5a565b61120e565b34801561069157600080fd5b506103106106a0366004612b91565b6112a3565b3480156106b157600080fd5b506010546102d8906001600160a01b031681565b3480156106d157600080fd5b506102ab6106e036600461287a565b6112f4565b3480156106f157600080fd5b506102816107003660046128d4565b60116020526000908152604090205460ff1681565b610310610723366004612bf8565b61145a565b34801561073457600080fd5b506103106107433660046129c8565b6115f2565b34801561075457600080fd5b506103486107633660046128d4565b61162f565b34801561077457600080fd5b5061034860155481565b34801561078a57600080fd5b50610281610799366004612c47565b6001600160a01b03918216600090815260076020908152604080832093909416825291909152205460ff1690565b3480156107d357600080fd5b506103106107e23660046128d4565b61165d565b3480156107f357600080fd5b50600a546108019060ff1681565b60405161028d9190612c90565b60006001600160e01b031982166380ac58cd60e01b148061083f57506001600160e01b03198216635b5e139f60e01b145b8061085a57506301ffc9a760e01b6001600160e01b03198316145b92915050565b60606002805461086f90612cb8565b80601f016020809104026020016040519081016040528092919081815260200182805461089b90612cb8565b80156108e85780601f106108bd576101008083540402835291602001916108e8565b820191906000526020600020905b8154815290600101906020018083116108cb57829003601f168201915b5050505050905090565b60006108fd82611704565b61091a576040516333d1c03960e21b815260040160405180910390fd5b506000908152600660205260409020546001600160a01b031690565b600061094182610b52565b9050806001600160a01b0316836001600160a01b0316036109755760405163250fdee360e21b815260040160405180910390fd5b336001600160a01b0382161480159061099557506109938133610799565b155b156109b3576040516367d9dca160e11b815260040160405180910390fd5b6109be83838361172f565b505050565b6008546001600160a01b031633146109f65760405162461bcd60e51b81526004016109ed90612cf2565b60405180910390fd5b601080546001600160a01b0319166001600160a01b0392909216919091179055565b6109be83838361178b565b6008546001600160a01b03163314610a4d5760405162461bcd60e51b81526004016109ed90612cf2565b6040516001600160a01b037f0000000000000000000000006108702e2e5e7e2df587d6b15136239d92c4000c16904780156108fc02916000818181858888f19350505050158015610aa2573d6000803e3d6000fd5b50565b6008546001600160a01b03163314610acf5760405162461bcd60e51b81526004016109ed90612cf2565b8051610ae290600b90602084019061273c565b5050565b6109be838383604051806020016040528060008152506112a3565b6008546001600160a01b03163314610b2b5760405162461bcd60e51b81526004016109ed90612cf2565b600a805482919060ff19166001836004811115610b4a57610b4a612c7a565b021790555050565b6000610b5d82611979565b5192915050565b6008546001600160a01b03163314610b8e5760405162461bcd60e51b81526004016109ed90612cf2565b601791909155601655565b60006001600160a01b038216610bc2576040516323d3ad8160e21b815260040160405180910390fd5b506001600160a01b03166000908152600560205260409020546001600160401b031690565b6008546001600160a01b03163314610c115760405162461bcd60e51b81526004016109ed90612cf2565b610c1b6000611a93565b565b6008546000906001600160a01b03163314610c4a5760405162461bcd60e51b81526004016109ed90612cf2565b60145460ff1615610c905760405162461bcd60e51b815260206004820152601060248201526f1053149150511648149155915053115160821b60448201526064016109ed565b8151610ca390600c90602085019061273c565b506017546040516323b872dd60e01b815233600482015230602482015260448101919091527f000000000000000000000000514910771af9ca656af840dff83e8264ecf986ca6001600160a01b0316906323b872dd906064016020604051808303816000875af1158015610d1b573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610d3f9190612d27565b5061085a601654601754611ae5565b919050565b323314610d725760405162461bcd60e51b81526004016109ed90612d44565b6003600a5460ff166004811115610d8b57610d8b612c7a565b14610dd85760405162461bcd60e51b815260206004820181905260248201527f414c4c4f57204c495354204d494e54494e47204953204e4f542041435449564560448201526064016109ed565b600f546040516001600160601b03193360601b166020820152610e169183916034015b60405160208183030381529060405280519060200120611c69565b610e625760405162461bcd60e51b815260206004820152601b60248201527f4d494e544552204953204e4f54204f4e20414c4c4f57204c495354000000000060448201526064016109ed565b3360009081526012602052604090205460ff1615610ec25760405162461bcd60e51b815260206004820152601d60248201527f414c4c4f574c495354205449434b455420414c5245414459205553454400000060448201526064016109ed565b336000908152601260205260409020805460ff19166001908117909155610aa290611c7f565b604080516060810182526000808252602082018190529181019190915261085a82611979565b336001600160a01b037f000000000000000000000000f0d54349addcf704f77ae15b96510dea15cb79521614610f865760405162461bcd60e51b815260206004820152601f60248201527f4f6e6c7920565246436f6f7264696e61746f722063616e2066756c66696c6c0060448201526064016109ed565b610ae28282611da1565b323314610faf5760405162461bcd60e51b81526004016109ed90612d44565b6001600a5460ff166004811115610fc857610fc8612c7a565b1480610fea57506003600a5460ff166004811115610fe857610fe8612c7a565b145b6110365760405162461bcd60e51b815260206004820152601860248201527f445245414d4552532053414c45204e4f5420414354495645000000000000000060448201526064016109ed565b600e546040516001600160601b03193360601b16602082015261105d918391603401610dfb565b6110a95760405162461bcd60e51b815260206004820152601e60248201527f4d494e544552204953204e4f54204f4e20445245414d455253204c495354000060448201526064016109ed565b6001600a5460ff1660048111156110c2576110c2612c7a565b03611152573360009081526011602052604090205460ff16156111335760405162461bcd60e51b815260206004820152602360248201527f445245414d45522050524553414c45205449434b455420414c5245414459205560448201526214d15160ea1b60648201526084016109ed565b336000908152601160205260409020805460ff191660011790556111c0565b3360009081526012602052604090205460ff1615610ec25760405162461bcd60e51b815260206004820152602560248201527f445245414d455220414c4c4f574c495354205449434b455420414c5245414459604482015264081554d15160da1b60648201526084016109ed565b610aa26001611c7f565b60606003805461086f90612cb8565b6008546001600160a01b031633146112035760405162461bcd60e51b81526004016109ed90612cf2565b600e91909155600f55565b336001600160a01b038316036112375760405163b06307db60e01b815260040160405180910390fd5b3360008181526007602090815260408083206001600160a01b03871680855290835292819020805460ff191686151590811790915590519081529192917f17307eab39ab6107e8899845ad3d59bd9653f200f220920489ca2b5937696c31910160405180910390a35050565b6112ae84848461178b565b6001600160a01b0383163b151580156112d057506112ce84848484611e12565b155b156112ee576040516368d2bf6b60e11b815260040160405180910390fd5b50505050565b60606112ff82611704565b6113635760405162461bcd60e51b815260206004820152602f60248201527f4552433732314d657461646174613a2055524920717565727920666f72206e6f60448201526e3732bc34b9ba32b73a103a37b5b2b760891b60648201526084016109ed565b60145460ff166113ff57600b805461137a90612cb8565b80601f016020809104026020'... 14516 more characters,
        storage: {
          '0x0000000000000000000000000000000000000000000000000000000000000000': '0x0000000000000000000000000000000000000000000000000000000000001e61',
          '0x04cb05590bc2dfc3bca104ff2a438fd9c046e2d8a02fc6e964038fcb4b4069fe': '0x0000000000000000629976adcc5da85b73b561538faa24f6c7a748a1394d12ba',
          '0x0e4ad63f612dd543c6408676ef1e12869c72b14331b917c3bb8d6f8047a6ee2b': '0x0000000000000000000000000000000000000000000000000000000000000001',
          '0x5e075cf98702195afbaea095aa7abdc1520c4aa017b13c9c74e54be65a369e74': '0x0000000000000000000000000000000000000000000000000000000000000000',
          '0x8903aea6811d5388f1ab2ebf81e3b4b733db2f405134fc8a921160a18ff79faa': '0x0000000000000000000000000000000000000000000000000000000000000001',
          '0xbd3b48ff21127f2d43a2a6ddaee2b0ed82d9a15d0f240774527d52e8f3f3a6ec': '0x00000000000000006357fbdb7accd70867480c14048c141091e0424f744eb165',
          '0xdc115594af07b88f39e994e2c4a06cdb7504214e7d5febe9950cb917a8ee25d8': '0x0000000000000000000000000000000000000000000000000000000000000000'
        }
      },
      '0x6108702e2e5e7e2df587d6b15136239d92c4000c': {
        balance: '0x11416b381fcaf9b1',
        nonce: 1,
        code: '0x608060405273ffffffffffffffffffffffffffffffffffffffff600054167fa619486e0000000000000000000000000000000000000000000000000000000060003514156050578060005260206000f35b3660008037600080366000845af43d6000803e60008114156070573d6000fd5b3d6000f3fea2646970667358221220d1429297349653a4918076d650332de1a1068c5f3e07c5c82360c277770b955264736f6c63430007060033',
        storage: {
          '0x0000000000000000000000000000000000000000000000000000000000000000': '0x000000000000000000000000d9db270c1b5e3bd161e8c8503c55ceabee709552'
        }
      },
      '0x7accd70867480c14048c141091e0424f744eb165': { balance: '0xe2d50a69466c72', nonce: 8, code: '0x', storage: {} },
      '0xd9db270c1b5e3bd161e8c8503c55ceabee709552': {
        balance: '0x38d7ea4c68014',
        nonce: 1,
        code: '0x6080604052600436106101dc5760003560e01c8063affed0e011610102578063e19a9dd911610095578063f08a032311610064578063f08a032314611647578063f698da2514611698578063f8dc5dd9146116c3578063ffa1ad741461173e57610231565b8063e19a9dd91461139b578063e318b52b146113ec578063e75235b81461147d578063e86637db146114a857610231565b8063cc2f8452116100d1578063cc2f8452146110e8578063d4d9bdcd146111b5578063d8d11f78146111f0578063e009cfde1461132a57610231565b8063affed0e014610d94578063b4faba0914610dbf578063b63e800d14610ea7578063c4ca3a9c1461101757610231565b80635624b25b1161017a5780636a761202116101495780636a761202146109945780637d83297414610b50578063934f3a1114610bbf578063a0e67e2b14610d2857610231565b80635624b25b146107fb5780635ae6bd37146108b9578063610b592514610908578063694e80c31461095957610231565b80632f54bf6e116101b65780632f54bf6e146104d35780633408e4701461053a578063468721a7146105655780635229073f1461067a57610231565b80630d582f131461029e57806312fb68e0146102f95780632d9ad53d1461046c57610231565b36610231573373ffffffffffffffffffffffffffffffffffffffff167f3d0ce9bfc3ed7d6862dbb28b2dea94561fe714a1b4d019aa8af39730d1ad7c3d346040518082815260200191505060405180910390a2005b34801561023d57600080fd5b5060007f6c9a6c4a39284e37ed1cf53d337577d14212a4870fb976a4366c693b939918d560001b905080548061027257600080f35b36600080373360601b365260008060143601600080855af13d6000803e80610299573d6000fd5b3d6000f35b3480156102aa57600080fd5b506102f7600480360360408110156102c157600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff169060200190929190803590602001909291905050506117ce565b005b34801561030557600080fd5b5061046a6004803603608081101561031c57600080fd5b81019080803590602001909291908035906020019064010000000081111561034357600080fd5b82018360208201111561035557600080fd5b8035906020019184600183028401116401000000008311171561037757600080fd5b91908080601f016020809104026020016040519081016040528093929190818152602001838380828437600081840152601f19601f820116905080830192505050505050509192919290803590602001906401000000008111156103da57600080fd5b8201836020820111156103ec57600080fd5b8035906020019184600183028401116401000000008311171561040e57600080fd5b91908080601f016020809104026020016040519081016040528093929190818152602001838380828437600081840152601f19601f82011690508083019250505050505050919291929080359060200190929190505050611bbe565b005b34801561047857600080fd5b506104bb6004803603602081101561048f57600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff169060200190929190505050612440565b60405180821515815260200191505060405180910390f35b3480156104df57600080fd5b50610522600480360360208110156104f657600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff169060200190929190505050612512565b60405180821515815260200191505060405180910390f35b34801561054657600080fd5b5061054f6125e4565b6040518082815260200191505060405180910390f35b34801561057157600080fd5b506106626004803603608081101561058857600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff16906020019092919080359060200190929190803590602001906401000000008111156105cf57600080fd5b8201836020820111156105e157600080fd5b8035906020019184600183028401116401000000008311171561060357600080fd5b91908080601f016020809104026020016040519081016040528093929190818152602001838380828437600081840152601f19601f820116905080830192505050505050509192919290803560ff1690602001909291905050506125f1565b60405180821515815260200191505060405180910390f35b34801561068657600080fd5b506107776004803603608081101561069d57600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff16906020019092919080359060200190929190803590602001906401000000008111156106e457600080fd5b8201836020820111156106f657600080fd5b8035906020019184600183028401116401000000008311171561071857600080fd5b91908080601f016020809104026020016040519081016040528093929190818152602001838380828437600081840152601f19601f820116905080830192505050505050509192919290803560ff1690602001909291905050506127d7565b60405180831515815260200180602001828103825283818151815260200191508051906020019080838360005b838110156107bf5780820151818401526020810190506107a4565b50505050905090810190601f1680156107ec5780820380516001836020036101000a031916815260200191505b50935050505060405180910390f35b34801561080757600080fd5b5061083e6004803603604081101561081e57600080fd5b81019080803590602001909291908035906020019092919050505061280d565b6040518080602001828103825283818151815260200191508051906020019080838360005b8381101561087e578082015181840152602081019050610863565b50505050905090810190601f1680156108ab5780820380516001836020036101000a031916815260200191505b509250505060405180910390f35b3480156108c557600080fd5b506108f2600480360360208110156108dc57600080fd5b8101908080359060200190929190505050612894565b6040518082815260200191505060405180910390f35b34801561091457600080fd5b506109576004803603602081101561092b57600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff1690602001909291905050506128ac565b005b34801561096557600080fd5b506109926004803603602081101561097c57600080fd5b8101908080359060200190929190505050612c3e565b005b610b3860048036036101408110156109ab57600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff16906020019092919080359060200190929190803590602001906401000000008111156109f257600080fd5b820183602082011115610a0457600080fd5b80359060200191846001830284011164010000000083111715610a2657600080fd5b9091929391929390803560ff169060200190929190803590602001909291908035906020019092919080359060200190929190803573ffffffffffffffffffffffffffffffffffffffff169060200190929190803573ffffffffffffffffffffffffffffffffffffffff16906020019092919080359060200190640100000000811115610ab257600080fd5b820183602082011115610ac457600080fd5b80359060200191846001830284011164010000000083111715610ae657600080fd5b91908080601f016020809104026020016040519081016040528093929190818152602001838380828437600081840152601f19601f820116905080830192505050505050509192919290505050612d78565b60405180821515815260200191505060405180910390f35b348015610b5c57600080fd5b50610ba960048036036040811015610b7357600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff169060200190929190803590602001909291905050506132b5565b6040518082815260200191505060405180910390f35b348015610bcb57600080fd5b50610d2660048036036060811015610be257600080fd5b810190808035906020019092919080359060200190640100000000811115610c0957600080fd5b820183602082011115610c1b57600080fd5b80359060200191846001830284011164010000000083111715610c3d57600080fd5b91908080601f016020809104026020016040519081016040528093929190818152602001838380828437600081840152601f19601f82011690508083019250505050505050919291929080359060200190640100000000811115610ca057600080fd5b820183602082011115610cb257600080fd5b80359060200191846001830284011164010000000083111715610cd457600080fd5b91908080601f016020809104026020016040519081016040528093929190818152602001838380828437600081840152601f19601f8201169050808301925050505050505091929192905050506132da565b005b348015610d3457600080fd5b50610d3d613369565b6040518080602001828103825283818151815260200191508051906020019060200280838360005b83811015610d80578082015181840152602081019050610d65565b505050509050019250505060405180910390f35b348015610da057600080fd5b50610da9613512565b6040518082815260200191505060405180910390f35b348015610dcb57600080fd5b50610ea560048036036040811015610de257600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff16906020019092919080359060200190640100000000811115610e1f57600080fd5b820183602082011115610e3157600080fd5b80359060200191846001830284011164010000000083111715610e5357600080fd5b91908080601f016020809104026020016040519081016040528093929190818152602001838380828437600081840152601f19601f820116905080830192505050505050509192919290505050613518565b005b348015610eb357600080fd5b506110156004803603610100811015610ecb57600080fd5b8101908080359060200190640100000000811115610ee857600080fd5b820183602082011115610efa57600080fd5b80359060200191846020830284011164010000000083111715610f1c57600080fd5b909192939192939080359060200190929190803573ffffffffffffffffffffffffffffffffffffffff16906020019092919080359060200190640100000000811115610f6757600080fd5b820183602082011115610f7957600080fd5b80359060200191846001830284011164010000000083111715610f9b57600080fd5b9091929391929390803573ffffffffffffffffffffffffffffffffffffffff169060200190929190803573ffffffffffffffffffffffffffffffffffffffff16906020019092919080359060200190929190803573ffffffffffffffffffffffffffffffffffffffff16906020019092919050505061353a565b005b34801561102357600080fd5b506110d26004803603608081101561103a57600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff169060200190929190803590602001909291908035906020019064010000000081111561108157600080fd5b82018360208201111561109357600080fd5b803590602001918460018302840111640100000000831117156110b557600080fd5b9091929391929390803560ff1690602001909291905050506136f8565b6040518082815260200191505060405180910390f35b3480156110f457600080fd5b506111416004803603604081101561110b57600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff16906020019092919080359060200190929190505050613820565b60405180806020018373ffffffffffffffffffffffffffffffffffffffff168152602001828103825284818151815260200191508051906020019060200280838360005b838110156111a0578082015181840152602081019050611185565b50505050905001935050505060405180910390f35b3480156111c157600080fd5b506111ee600480360360208110156111d857600080fd5b8101908080359060200190929190505050613a12565b005b3480156111fc57600080fd5b50611314600480360361014081101561121457600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff169060200190929190803590602001909291908035906020019064010000000081111561125b57600080fd5b82018360208201111561126d57600080fd5b8035906020019184600183028401116401000000008311171561128f57600080fd5b9091929391929390803560ff169060200190929190803590602001909291908035906020019092919080359060200190929190803573ffffffffffffffffffffffffffffffffffffffff169060200190929190803573ffffffffffffffffffffffffffffffffffffffff16906020019092919080359060200190929190505050613bb1565b6040518082815260200191505060405180910390f35b34801561133657600080fd5b506113996004803603604081101561134d57600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff169060200190929190803573ffffffffffffffffffffffffffffffffffff'... 35918 more characters,
        storage: {}
      },
      '0xe5cb067e90d5cd1f8052b83562ae670ba4a211a8': { balance: '0x3fefe94923f8325', nonce: 35, code: '0x', storage: {} }
    }
	}
}
```

### **Example**

Request

```
curl --location 'https://rpc-nebulas-testnet.uniultra.xyz/' \
--header 'Content-Type: application/json' \
--data '{
    "jsonrpc": "2.0",
    "method": "debug_traceTransaction",
    "params": [
        "0x63cce1e03a3d3b66ef02abba0ad16aa1bd10e96ffe2406fcdd9221ea48695ba6",
        {"tracer": "prestateTracer"}
    ],
    "id": 1
}'
```

Result

```javascript
{
    "jsonrpc": "2.0",
    "id": 1,
    "result": {
        "0x59b576bb05aed0e5e66aaa1346a39107d19d5659": {
            "balance": "0x9e4b23f12d4ca00000",
            "nonce": 1,
            "code": "0x.......",
            "storage": {
                "0xb39221ace053465ec3453ce2b36430bd138b997ecea25c1043da0c366812b828": "0x0000000000000000000000000000000000000000000000000000000000000001",
                "0xb39221ace053465ec3453ce2b36430bd138b997ecea25c1043da0c366812b82a": "0x0000000000000000000000000000000000000000000000000000000000000000",
                "0xb39221ace053465ec3453ce2b36430bd138b997ecea25c1043da0c366812b82e": "0x0000000000000000000000000000000000000000000000000000000000000005",
                "0x96d102b353979b8a54c4ccec098bb1754d6261708076dd6ba5e11275befe20f0": "0x0000000000000000000000000000000000000000000000000000000000000004",
                "0xb39221ace053465ec3453ce2b36430bd138b997ecea25c1043da0c366812b82c": "0x0000000000000000000000000000000000000000000000008ac7230489e80000",
                "0xd45cb14680503f267434654db063ebe91b1ee88ab18a739d68a0f9eab066b8dd": "0x0000000000000000000000000000000000000000000000000000000000000004",
                "0xb39221ace053465ec3453ce2b36430bd138b997ecea25c1043da0c366812b82f": "0x68747470733a2f2f646570696e2d746573742e636f6d2f312e6a736f6e00003a",
                "0x3e5fec24aa4dc4e5aee2e025e51e1392c72a2500577559fae9665c6d52bd6a31": "0x68747470733a2f2f646570696e2d746573742e636f6d2f312e6a736f6e00003a",
                "0x80497882cf9008f7f796a89e5514a7b55bd96eab88ecb66aee4fb0a6fd34811c": "0x0000000000000000000000000000000000000000000000000000000000000000",
                "0xb39221ace053465ec3453ce2b36430bd138b997ecea25c1043da0c366812b82b": "0x0000000000000000000000000000000000000000000000000000000000000023"
            }
        },
        "0xc0e9b65cb944874546ec3ec15e6a2949b8a57201": {
            "balance": "0x3d18502242790dce4733c1ff",
            "nonce": 240,
            "code": "0x",
            "storage": {}
        }
    }
}
```


# DAG API Methods

This section is describing the supported DAG RPC method calls of Ultra Unicorn network.

* [dag\_getEvent](/services/rpc/dag-api-methods/dag_getevent)
* [dag\_getEventPayload](/services/rpc/dag-api-methods/dag_geteventpayload)
* [dag\_getHeads](/services/rpc/dag-api-methods/dag_getheads)
* [eth\_currentEpoch](/services/rpc/dag-api-methods/eth_currentepoch)
* [eth\_getEpochStats](/services/rpc/dag-api-methods/eth_getepochstats)


# dag\_getEvent

Returns the event (without transactions) by hash or short ID.

The `dag_getEvent` command returns an event based on its hash or short ID. The result does not contain transaction details. To obtain transaction details, use [`eth_getTransactionByHash.`](/services/rpc/ethereum-api-methods/eth_gettransactionbyhash)

### Parameters

String - full event ID (hex-encoded 32 bytes) or short event ID.

### Returns

`Object` - An event object, or null when no event was found:

`version`: QUANTITY - the event version.

`epoch`: QUANTITY - the event epoch number.

`seq`: QUANTITY - the event sequence number.

`hash`: DATA, 32 Bytes - full event ID.

`seq`: QUANTITY - the event sequence number.

`frame`: QUANTITY - event's frame number.

`creator`: QUANTITY, - the ID of the event creator (validator).

`prevEpochHash`: DATA, 32 Bytes - the hash of the state of previous epoch

`parents`: Array, - array of event IDs

`gasPowerLeft.shortTerm`: QUANTITY - event's not spent gas power in short-term gas power window.

`gasPowerLeft.longTerm`: QUANTITY - event's not spent gas power in long-term gas power window.

`gasPowerUsed`: QUANTITY - event's spent gas power.

`lamport`: QUANTITY - event's Lamport index.

`creationTime`: QUANTITY - the UnixNano timestamp of creator's local creation time.

`medianTime`: QUANTITY - the UnixNano timestamp of the secure median time.

`extraData`: DATA - the "extra data" field of this event.

`transactionsRoot`: DATA, 32 Bytes - the hash of transactions of the event.

### **Example Request and Result for dag\_getEvent**

Request

```
curl -H "Content-Type: application/json" \
-d '{"id": 1, "jsonrpc":"2.0", "method": "dag_getEvent", "params": ["0x000170430000080cd8f7b782afe5d1f63be6cd73631598313200777062ba7383"]}' \
https://rpc-mainnet.u2u.xyz
```

Result

```javascript
{
    "jsonrpc": "2.0",
    "id": 1,
    "result": {
        "creationTime": "0x16dd9d1def47fcf7",
        "creator": "0x32",
        "epoch": "0x17043",
        "extraData": "0x",
        "frame": "0xcb",
        "gasPowerLeft": {
            "longTerm": "0x652f4710",
            "shortTerm": "0x114f5cd1"
        },
        "gasPowerUsed": "0x6d60",
        "id": "0x000170430000080cd8f7b782afe5d1f63be6cd73631598313200777062ba7383",
        "lamport": "0x80c",
        "medianTime": "0x16dd9d1de7a396cd",
        "parents": ["0x00017043000008065b9a8656159c5ad64472016ab14c9034c2772344b4141fa8", "0x000170430000080b3e938d09c60176d77e15973a681e93c02421c0037939d84d", "0x000170430000080bfdbacf6ad1e15c2ce890a8cd1ace8ac161b2bcbf060bb2dd"],
        "prevEpochHash": null,
        "seq": "0x171",
        "transactionsRoot": "0x56e81f171bcc55a6ff8345e692c0f86e5b48e01b996cadc001622fb5e363b421"
    }
}
```


# dag\_getEventPayload

Returns event (including transactions) by hash or short ID

### Parameters

`String`, - full event ID (hex-encoded 32 bytes) or short event ID.

`Boolean`, - If true it returns the full transaction objects, if false only the hashes of the transactions.

### Returns

`Object` - An event object, or null when no event was found:

`version`: QUANTITY - the event version.

`epoch`: QUANTITY - the event epoch number.

`seq`: QUANTITY - the event sequence number.

`hash`: DATA, 32 Bytes - full event ID.

`frame`: QUANTITY - event's frame number.

`creator`: DATA, 20 Bytes - the address of the event creator (validator).

`prevEpochHash`: DATA, 32 Bytes - the hash of the state of previous epoch

`parents`: Array, - array of event IDs

`gasPowerLeft`: QUANTITY - event's not spent gas power.

`gasPowerUsed`: QUANTITY - event's spent gas power.

`lamport`: QUANTITY - event's Lamport index.

`creationTime`: QUANTITY - the UnixNano timestamp of creator's local creation time.

`medianTime`: QUANTITY - the UnixNano timestamp of the secure median time.

`extraData`: DATA - the "extra data" field of this event.

`transactionsRoot`: DATA, 32 Bytes - the root of the transaction trie of the event.

`transactions`: Array - Array of transaction objects, or 32 Bytes transaction hashes depending on the last given parameter.

### Example

Request

```
curl -H "Content-Type: application/json" \
-d '{"id": 1, "jsonrpc":"2.0", "method": "dag_getEventPayload", "params": ["0x000170430000080cd8f7b782afe5d1f63be6cd73631598313200777062ba7383", true]}' \
https://rpc-mainnet.u2u.xyz
```

Result

```javascript
{
    "jsonrpc": "2.0",
    "id": 1,
    "result": {
        "creationTime": "0x16dd9d1def47fcf7",
        "creator": "0x32",
        "epoch": "0x17043",
        "extraData": "0x",
        "frame": "0xcb",
        "gasPowerLeft": {
            "longTerm": "0x652f4710",
            "shortTerm": "0x114f5cd1"
        },
        "gasPowerUsed": "0x6d60",
        "id": "0x000170430000080cd8f7b782afe5d1f63be6cd73631598313200777062ba7383",
        "lamport": "0x80c",
        "medianTime": "0x16dd9d1de7a396cd",
        "parents": ["0x00017043000008065b9a8656159c5ad64472016ab14c9034c2772344b4141fa8", "0x000170430000080b3e938d09c60176d77e15973a681e93c02421c0037939d84d", "0x000170430000080bfdbacf6ad1e15c2ce890a8cd1ace8ac161b2bcbf060bb2dd"],
        "prevEpochHash": null,
        "seq": "0x171",
        "size": "0xb1",
        "transactions": [],
        "transactionsRoot": "0x56e81f171bcc55a6ff8345e692c0f86e5b48e01b996cadc001622fb5e363b421"
    }
}
```


# dag\_getHeads

Returns IDs of all the epoch events with no descendants in a given epoch

### Parameters

String, - epoch number (HEX-encoded) for a specific epoch (pass “latest” to use latest epoch; pass “pending” to use latest sealed epoch).

### Returns

`Array` - Array of event IDs

### Example

Request

```
curl -H "Content-Type: application/json" \
-d '{"id": 1, "jsonrpc":"2.0", "method": "dag_getHeads", "params": ["pending"]}' \
https://rpc-mainnet.u2u.xyz
```

Result

```javascript
{
    "jsonrpc": "2.0",
    "id": 1,
    "result": ["0x0001714600000024daf2bbfe6ad83ffd21a5623e672f95cc2347e2bbd7441d75", "0x00017146000000236749c8975119f5cdbcda7b7efb8325d21a98a2629ba96315"]
}
```


# eth\_currentEpoch

Returns current epoch number

### Parameters

None

### Returns

`String` - epoch number (HEX-encoded)

### Example

Request

```
curl -H "Content-Type: application/json" \
-d '{"id": 1, "jsonrpc":"2.0", "method": "eth_currentEpoch", "params": []}' \
https://rpc-mainnet.u2u.xyz
```

Result

```javascript
{
    "jsonrpc": "2.0",
    "id": 1,
    "result": "0x17146"
}
```


# eth\_getEpochStats

Returns the latest epoch statistics

### Parameters

`QUANTITY|TAG` - integer of a block number, or the string ", "latest" or "pending", as in the [default block parameter](https://eth.wiki/json-rpc/API#the-default-block-parameter).

### Returns

`Object` - An epoch statistics object with the following fields:

* `epoch`: QUANTITY - The epoch number.
* `start`: QUANTITY - Unix timestamp (in nanoseconds) indicating when the epoch started.
* `end`: QUANTITY - Unix timestamp (in nanoseconds) indicating when the epoch ended.
* `epochStateRoot`: DATA, 32 Bytes - Hexadecimal hash of the epoch's state root.
* `hash`: DATA, 32 Bytes - Hexadecimal hash identifying the epoch.
* `rules`: Object - Network rules and configuration parameters for this epoch:
  * `blocks`: Object - Block configuration parameters:
    * `maxBlockGas`: QUANTITY - Maximum gas limit per block.
    * `maxEmptyBlockSkipPeriod`: QUANTITY - Maximum time period (in nanoseconds) to skip empty blocks.
  * `dag`: Object - DAG configuration parameters:
    * `maxExtraData`: QUANTITY - Maximum size of extra data in bytes.
    * `maxFreeParents`: QUANTITY - Maximum number of free parent blocks.
    * `maxParents`: QUANTITY - Maximum number of parent blocks.
  * `economy`: Object - Economic configuration parameters:
    * `blockMissedSlack`: QUANTITY - Tolerance for missed blocks.
    * `minGasPrice`: QUANTITY - Minimum gas price in wei.
    * `gas`: Object - Gas configuration parameters:
      * `blockVoteGas`: QUANTITY - Gas cost for block voting.
      * `blockVotesBaseGas`: QUANTITY - Base gas cost for block votes.
      * `epochVoteGas`: QUANTITY - Gas cost for epoch voting.
      * `eventGas`: QUANTITY - Gas cost for events.
      * `extraDataGas`: QUANTITY - Gas cost per byte of extra data.
      * `maxEventGas`: QUANTITY - Maximum gas per event.
      * `misbehaviourProofGas`: QUANTITY - Gas cost for misbehavior proofs.
      * `parentGas`: QUANTITY - Gas cost for parent references.
    * `longGasPower`: Object - Long gas power configuration:
      * `allocPerSec`: QUANTITY - Gas power allocation per second.
      * `maxAllocPeriod`: QUANTITY - Maximum allocation period in nanoseconds.
      * `minStartupGas`: QUANTITY - Minimum startup gas.
      * `startupAllocPeriod`: QUANTITY - Startup allocation period in nanoseconds.
    * `shortGasPower`: Object - Short gas power configuration:
      * `allocPerSec`: QUANTITY - Gas power allocation per second.
      * `maxAllocPeriod`: QUANTITY - Maximum allocation period in nanoseconds.
      * `minStartupGas`: QUANTITY - Minimum startup gas.
      * `startupAllocPeriod`: QUANTITY - Startup allocation period in nanoseconds.
  * `epochs`: Object - Epoch configuration parameters:
    * `maxEpochDuration`: QUANTITY - Maximum epoch duration in nanoseconds.
    * `maxEpochGas`: QUANTITY - Maximum gas per epoch.
  * `name`: String - Network name (e.g., "main").
  * `networkID`: QUANTITY - Network identifier.
  * `upgrades`: Object - Network upgrade status:
    * `berlin`: Boolean - Whether Berlin upgrade is active.
    * `llr`: Boolean - Whether LLR upgrade is active.
    * `london`: Boolean - Whether London upgrade is active.
* `validatorProfiles`: Object - Detailed information about validators in this epoch, keyed by validator ID:
  * `pubKey`: Object - Validator's public key information:
    * `raw`: DATA - Hexadecimal representation of the validator's public key.
    * `type`: QUANTITY - Type identifier for the public key format.
  * `weight`: QUANTITY - Validator's weight in the network (as a string to handle large numbers).
* `validatorStates`: Array - Array of validator state information:
  * `gasRefund`: QUANTITY - Amount of gas refunded to the validator.
  * `prevEpochEvent`: Object - Previous epoch event information:
    * `gasPowerLeft`: Object - Remaining gas power:
      * `gas`: Array - Array of remaining gas power values.
    * `id`: String - Unique identifier for the previous epoch event.
    * `time`: QUANTITY - Timestamp of the previous epoch event.
* `validators`: Object - Validator values and weights:
  * `values`: Object - Mapping of validator IDs to their respective values.

### Example

Request

```bash
curl --location 'https://rpc-mainnet.u2u.xyz' \
--header 'Content-Type: application/json' \
--data '{
 "jsonrpc":"2.0",
 "method":"eth_getEpochStats",
 "params":[
        "latest"
    ],
 "id":83
}'
```

Result

```javascript
{
    "jsonrpc": "2.0",
    "id": 83,
    "result": {
        "end": 1695118619622089816,
        "epoch": 4880,
        "epochStateRoot": "0x8a7325378c271fa6b67bbc2df46b9bae9f66d3a39f7437e33f0427bde0701d1f",
        "hash": "0xfb1f5a6f07e075225911a2128ed5367108f646fa957848f3464fe5b8cd763fdb",
        "rules": {
            "blocks": {
                "maxBlockGas": 20500000,
                "maxEmptyBlockSkipPeriod": 1000000000
            },
            "dag": {
                "maxExtraData": 128,
                "maxFreeParents": 3,
                "maxParents": 10
            },
            "economy": {
                "blockMissedSlack": 50,
                "gas": {
                    "blockVoteGas": 512,
                    "blockVotesBaseGas": 1024,
                    "epochVoteGas": 1536,
                    "eventGas": 28000,
                    "extraDataGas": 25,
                    "maxEventGas": 10028000,
                    "misbehaviourProofGas": 71536,
                    "parentGas": 2400
                },
                "longGasPower": {
                    "allocPerSec": 2800000,
                    "maxAllocPeriod": 3600000000000,
                    "minStartupGas": 560000,
                    "startupAllocPeriod": 5000000000
                },
                "minGasPrice": "112492273717",
                "shortGasPower": {
                    "allocPerSec": 5600000,
                    "maxAllocPeriod": 300000000000,
                    "minStartupGas": 560000,
                    "startupAllocPeriod": 2500000000
                }
            },
            "epochs": {
                "maxEpochDuration": 420000000000,
                "maxEpochGas": 300000000
            },
            "name": "main",
            "networkID": 39,
            "upgrades": {
                "berlin": true,
                "llr": true,
                "london": true
            }
        },
        "start": 1695118198150223626,
        "validatorProfiles": {
            "1": {
                "pubKey": {
                    "raw": "0x044523eb222afcf9d734c24d11d313cd1bb01ea178c0f78067faac2af6a6f8780e3d8c507d319b5d9677c7519bb6514791a75c9ed568bf0883f56867333e34ef41",
                    "type": 192
                },
                "weight": "15011625500104973816751471"
            }
        },
        "validatorStates": [
            {
                "gasRefund": 0,
                "prevEpochEvent": {
                    "gasPowerLeft": {
                        "gas": [
                            240131300,
                            1440926000
                        ]
                    },
                    "id": "4879:3048:4b1c18",
                    "time": 1695118619622089816
                }
            }
        ],
        "validators": {
            "values": {
                "1": "208328153",
                "2": "208167136",
                "3": "208166955",
                "4": "208166817",
                "5": "208166817",
                "6": "208166817",
                "7": "208166886"
            }
        }
    }
}
```


# Trace API Methods

This section is describing the supported trace RPC method calls of Ultra Unicorn network.

* [trace\_get](/services/rpc/trace-api-methods/trace_get)
* [trace\_block](/services/rpc/trace-api-methods/trace_block)
* [trace\_transaction](/services/rpc/trace-api-methods/trace_transaction)
* [trace\_filter](/services/rpc/trace-api-methods/trace_filter)


# trace\_block

Returns traces created at given block.

#### **Parameters** <a href="#parameters" id="parameters"></a>

1. `Quantity` or `Tag` - Integer of a block number, or the string `'earliest'`, `'latest'` or `'pending'`.

#### **Returns** <a href="#returns" id="returns"></a>

* `Array` - Block traces.

#### Example <a href="#example" id="example"></a>

Request

```bash
curl https://rpc-tracer-mainnet.u2u.xyz \
-X POST \
-H "Content-Type: application/json" \
-d '{"method":"trace_block","params":["0x2ed119"],"id":1,"jsonrpc":"2.0"}' 
```

Result

```json
{
    "jsonrpc": "2.0",
    "id": 1,
    "result": [{
        "action": {
            "from": "0xaa7b131dc60b80d3cf5e59b5a21a666aa039c951",
            "callType": "call",
            "gas": "0x0",
            "input": "0x",
            "to": "0xd40aba8166a212d6892125f079c33e6f5ca19814",
            "value": "0x4768d7effc3fbe"
        },
        "blockHash": "0x7eb25504e4c202cf3d62fd585d3e238f592c780cca82dacb2ed3cb5b38883add",
        "blockNumber": 3068185,
        "result": {
            "gasUsed": "0x0",
            "output": "0x"
        },
        "subtraces": 0,
        "traceAddress": [],
        "transactionHash": "0x07da28d752aba3b9dd7060005e554719c6205c8a3aea358599fc9b245c52f1f6",
        "transactionPosition": 0,
        "type": "call"
    }, {
        "action": {
            "from": "0x4f11ba23bb526c0486d83c6a8f18f632f3fc172a",
            "callType": "call",
            "gas": "0x0",
            "input": "0x",
            "to": "0x7ed1e469fcb3ee19c0366d829e291451be638e59",
            "value": "0x446cde325fbfbe"
        },
        "blockHash": "0x7eb25504e4c202cf3d62fd585d3e238f592c780cca82dacb2ed3cb5b38883add",
        "blockNumber": 3068185,
        "result": {
            "gasUsed": "0x0",
            "output": "0x"
        },
        "subtraces": 0,
        "traceAddress": [],
        "transactionHash": "0x056f11efb5da4ff7cf8523cfcef08393e5dd2ff3ab3223e4324426d285d7ae92",
        "transactionPosition": 1,
        "type": "call"
    }, {
        "action": {
            "from": "0x83806d539d4ea1c140489a06660319c9a303f874",
            "callType": "call",
            "gas": "0x1a1f8",
            "input": "0x",
            "to": "0x1c39ba39e4735cb65978d4db400ddd70a72dc750",
            "value": "0x7a16c911b4d00000"
        },
        "blockHash": "0x7eb25504e4c202cf3d62fd585d3e238f592c780cca82dacb2ed3cb5b38883add",
        "blockNumber": 3068185,
        "result": {
            "gasUsed": "0x2982",
            "output": "0x"
        },
        "subtraces": 2,
        "traceAddress": [],
        "transactionHash": "0x17104ac9d3312d8c136b7f44d4b8b47852618065ebfa534bd2d3b5ef218ca1f3",
        "transactionPosition": 2,
        "type": "call"
    }, {
        "action": {
            "from": "0x1c39ba39e4735cb65978d4db400ddd70a72dc750",
            "callType": "call",
            "gas": "0x13e99",
            "input": "0x16c72721",
            "to": "0x2bd2326c993dfaef84f696526064ff22eba5b362",
            "value": "0x0"
        },
        "blockHash": "0x7eb25504e4c202cf3d62fd585d3e238f592c780cca82dacb2ed3cb5b38883add",
        "blockNumber": 3068185,
        "result": {
            "gasUsed": "0x183",
            "output": "0x0000000000000000000000000000000000000000000000000000000000000001"
        },
        "subtraces": 0,
        "traceAddress": [0],
        "transactionHash": "0x17104ac9d3312d8c136b7f44d4b8b47852618065ebfa534bd2d3b5ef218ca1f3",
        "transactionPosition": 2,
        "type": "call"
    }, {
        "action": {
            "from": "0x1c39ba39e4735cb65978d4db400ddd70a72dc750",
            "callType": "call",
            "gas": "0x8fc",
            "input": "0x",
            "to": "0x70faa28a6b8d6829a4b1e649d26ec9a2a39ba413",
            "value": "0x7a16c911b4d00000"
        },
        "blockHash": "0x7eb25504e4c202cf3d62fd585d3e238f592c780cca82dacb2ed3cb5b38883add",
        "blockNumber": 3068185,
        "result": {
            "gasUsed": "0x0",
            "output": "0x"
        },
        "subtraces": 0,
        "traceAddress": [1],
        "transactionHash": "0x17104ac9d3312d8c136b7f44d4b8b47852618065ebfa534bd2d3b5ef218ca1f3",
        "transactionPosition": 2,
        "type": "call"
    }, {
        "action": {
            "from": "0xc5e32169debfe1a6fcfa03812772dc37643e9907",
            "callType": "call",
            "gas": "0x1a1f8",
            "input": "0x",
            "to": "0x1c39ba39e4735cb65978d4db400ddd70a72dc750",
            "value": "0xbaa4c24798f800"
        },
        "blockHash": "0x7eb25504e4c202cf3d62fd585d3e238f592c780cca82dacb2ed3cb5b38883add",
        "blockNumber": 3068185,
        "result": {
            "gasUsed": "0x2982",
            "output": "0x"
        },
        "subtraces": 2,
        "traceAddress": [],
        "transactionHash": "0x1eae990d988cda6416d69147989962bdc9b8eeaa93cebdbfcb010c7122b35047",
        "transactionPosition": 3,
        "type": "call"
    }, {
        "action": {
            "from": "0x1c39ba39e4735cb65978d4db400ddd70a72dc750",
            "callType": "call",
            "gas": "0x13e99",
            "input": "0x16c72721",
            "to": "0x2bd2326c993dfaef84f696526064ff22eba5b362",
            "value": "0x0"
        },
        "blockHash": "0x7eb25504e4c202cf3d62fd585d3e238f592c780cca82dacb2ed3cb5b38883add",
        "blockNumber": 3068185,
        "result": {
            "gasUsed": "0x183",
            "output": "0x0000000000000000000000000000000000000000000000000000000000000001"
        },
        "subtraces": 0,
        "traceAddress": [0],
        "transactionHash": "0x1eae990d988cda6416d69147989962bdc9b8eeaa93cebdbfcb010c7122b35047",
        "transactionPosition": 3,
        "type": "call"
    }, {
        "action": {
            "from": "0x1c39ba39e4735cb65978d4db400ddd70a72dc750",
            "callType": "call",
            "gas": "0x8fc",
            "input": "0x",
            "to": "0x70faa28a6b8d6829a4b1e649d26ec9a2a39ba413",
            "value": "0xbaa4c24798f800"
        },
        "blockHash": "0x7eb25504e4c202cf3d62fd585d3e238f592c780cca82dacb2ed3cb5b38883add",
        "blockNumber": 3068185,
        "result": {
            "gasUsed": "0x0",
            "output": "0x"
        },
        "subtraces": 0,
        "traceAddress": [1],
        "transactionHash": "0x1eae990d988cda6416d69147989962bdc9b8eeaa93cebdbfcb010c7122b35047",
        "transactionPosition": 3,
        "type": "call"
    }, {
        "action": {
            "from": "0x00472c1e4275230354dbe5007a5976053f12610a",
            "callType": "call",
            "gas": "0xdfc48",
            "input": "0xe1fa8e8499b2881fb16c706c697dac669fcd909d52227cf6d468c0c7c49cfeb956888dec",
            "to": "0xcd111aa492a9c77a367c36e6d6af8e6f212e0c8e",
            "value": "0x0"
        },
        "blockHash": "0x7eb25504e4c202cf3d62fd585d3e238f592c780cca82dacb2ed3cb5b38883add",
        "blockNumber": 3068185,
        "result": {
            "gasUsed": "0xa5b0",
            "output": "0x"
        },
        "subtraces": 0,
        "traceAddress": [],
        "transactionHash": "0x53b7d227658e7eba2bec623f0892b410918ded367ab11ea1392462a452aef9da",
        "transactionPosition": 4,
        "type": "call"
    }, {
        "action": {
            "from": "0xd654e911fedd8dc700eec1652f00a915d26910df",
            "callType": "call",
            "gas": "0x6d348",
            "input": "0xb9107cb2000000000000000000000000000000000000000000000000000000000000004000000000000000000000000000000000000000000000000000000000000004800000000000000000000000000000000000000000000000000000000000000021425443000000000000000000000000000000000000000000000000000000000058525000000000000000000000000000000000000000000000000000000000004c54430000000000000000000000000000000000000000000000000000000000535445454d00000000000000000000000000000000000000000000000000000045544300000000000000000000000000000000000000000000000000000000004441534800000000000000000000000000000000000000000000000000000000584d52000000000000000000000000000000000000000000000000000000000058454d00000000000000000000000000000000000000000000000000000000004d414944000000000000000000000000000000000000000000000000000000004c534b00000000000000000000000000000000000000000000000000000000004643540000000000000000000000000000000000000000000000000000000000444f4745000000000000000000000000000000000000000000000000000000004e58540000000000000000000000000000000000000000000000000000000000425453000000000000000000000000000000000000000000000000000000000042434e0000000000000000000000000000000000000000000000000000000000414d500000000000000000000000000000000000000000000000000000000000505043000000000000000000000000000000000000000000000000000000000053430000000000000000000000000000000000000000000000000000000000005843500000000000000000000000000000000000000000000000000000000000424359000000000000000000000000000000000000000000000000000000000047414d4500000000000000000000000000000000000000000000000000000000534a43580000000000000000000000000000000000000000000000000000000053595300000000000000000000000000000000000000000000000000000000004e415554000000000000000000000000000000000000000000000000000000004e4d430000000000000000000000000000000000000000000000000000000000444352000000000000000000000000000000000000000000000000000000000042544344000000000000000000000000000000000000000000000000000000004447420000000000000000000000000000000000000000000000000000000000424c4b000000000000000000000000000000000000000000000000000000000053545241540000000000000000000000000000000000000000000000000000004752430000000000000000000000000000000000000000000000000000000000494f43000000000000000000000000000000000000000000000000000000000058564300000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000021000000000000000000000000000000000000000000000004b95e43711ac0937000000000000000000000000000000000000000000000000000022ae5ae4e38e90000000000000000000000000000000000000000000000000514db3735ce52780000000000000000000000000000000000000000000000000031e6491f90d67900000000000000000000000000000000000000000000000001c301604dca1f34000000000000000000000000000000000000000000000000138341b35493654000000000000000000000000000000000000000000000000010046ccdce67c420000000000000000000000000000000000000000000000000000195c95e25a48b00000000000000000000000000000000000000000000000000288fe356e7f15c0000000000000000000000000000000000000000000000000032174ecc8fc78300000000000000000000000000000000000000000000000004734990e253ca800000000000000000000000000000000000000000000000000000120f7cb07e060000000000000000000000000000000000000000000000000001eb621c86b01e000000000000000000000000000000000000000000000000000147f42a8746890000000000000000000000000000000000000000000000000000041ed4975bdf000000000000000000000000000000000000000000000000000fd56b470d46a400000000000000000000000000000000000000000000000000558778e30c153700000000000000000000000000000000000000000000000000001e1da2c7b74b000000000000000000000000000000000000000000000000029441a78f1a2f34000000000000000000000000000000000000000000000000002c076fbee62d1a000000000000000000000000000000000000000000000000003a7f182339cbce000000000000000000000000000000000000000000000000003411e463343aa70000000000000000000000000000000000000000000000000002e10db46ce6c1000000000000000000000000000000000000000000000000000bd59fe18211d600000000000000000000000000000000000000000000000000476450ccac0eb800000000000000000000000000000000000000000000000001b932c72c02a3740000000000000000000000000000000000000000000000000565aea99fd0c3a4000000000000000000000000000000000000000000000000000015a3672c2adc000000000000000000000000000000000000000000000000000b579e9bac5123000000000000000000000000000000000000000000000000001c7b79c594eeb900000000000000000000000000000000000000000000000000027f7949ad346e000000000000000000000000000000000000000000000000007352a91b4a2c9a000000000000000000000000000000000000000000000000000bd1bb680ee47e",
            "to": "0x143116daec69cbde4c6ec70380376f3a6e44253e",
            "value": "0x0"
        },
        "blockHash": "0x7eb25504e4c202cf3d62fd585d3e238f592c780cca82dacb2ed3cb5b38883add",
        "blockNumber": 3068185,
        "result": {
            "gasUsed": "0x566ca",
            "output": "0x"
        },
        "subtraces": 0,
        "traceAddress": [],
        "transactionHash": "0x5e73db6abf32c48d00df638f1c99dd55efcf55ebee833af43543e67ce399ffeb",
        "transactionPosition": 5,
        "type": "call"
    }, {
        "action": {
            "from": "0xe9eeaec75883f0e389a78e2260bfac1776df2f1d",
            "gas": "0x11da40",
            "init": "0x606060405260405160208061148a833981016040528080519060200190919050505b80600260006101000a81548173ffffffffffffffffffffffffffffffffffffffff0219169083021790555033600360006101000a81548173ffffffffffffffffffffffffffffffffffffffff0219169083021790555030600260009054906101000a900473ffffffffffffffffffffffffffffffffffffffff16604051610a1a80610134833901808373ffffffffffffffffffffffffffffffffffffffff1681526020018273ffffffffffffffffffffffffffffffffffffffff16815260200192505050604051809103906000f0600160006101000a81548173ffffffffffffffffffffffffffffffffffffffff0219169083021790555060006000600050819055505b5061093c80610b4e6000396000f36060604052604051604080610a1a833981016040528080519060200190919080519060200190919050505b81600260006101000a81548173ffffffffffffffffffffffffffffffffffffffff0219169083021790555080600360006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908302179055505b5050610989806100916000396000f360606040523615610074576000357c0100000000000000000000000000000000000000000000000000000000900480630ddcfe8e14610076578063207c64fb146100a4578063229320ca146100d257806338cc48311461018557806354a38006146101be57806362441aee1461023357610074565b005b61008c600480803590602001909190505061029f565b60405180821515815260200191505060405180910390f35b6100ba60048080359060200190919050506102fe565b60405180821515815260200191505060405180910390f35b61016d6004808035906020019082018035906020019191908080601f016020809104026020016040519081016040528093929190818152602001838380828437820191505050505050909091908035906020019082018035906020019191908080601f016020809104026020016040519081016040528093929190818152602001838380828437820191505050505050909091905050610375565b60405180821515815260200191505060405180910390f35b61019260048050506105f5565b604051808273ffffffffffffffffffffffffffffffffffffffff16815260200191505060405180910390f35b61021b6004808035906020019082018035906020019191908080601f016020809104026020016040519081016040528093929190818152602001838380828437820191505050505050909091908035906020019091905050610602565b60405180821515815260200191505060405180910390f35b6102876004808035906020019082018035906020019191908080601f01602080910402602001604051908101604052809392919081815260200183838082843782019150505050505090909190505061082a565b60405180821515815260200191505060405180910390f35b6000600260009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff161490506102f9565b919050565b60006103093361029f565b1561036a5760011515600160005060008473ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060009054906101000a900460ff161515141561035d5760019050610370565b600090506103705661036f565b610002565b5b919050565b600060006103823361029f565b156105e857600060005084604051808280519060200190808383829060006004602084601f0104600f02600301f150905001915050908152602001604051809103902060009054906101000a900473ffffffffffffffffffffffffffffffffffffffff16905060008173ffffffffffffffffffffffffffffffffffffffff16141561041057600091506105ee565b8073ffffffffffffffffffffffffffffffffffffffff166305f474a8604051817c01000000000000000000000000000000000000000000000000000000000281526004018090506020604051808303816000876161da5a03f115610002575050506040518051906020015073ffffffffffffffffffffffffffffffffffffffff1663ba061afa604051817c01000000000000000000000000000000000000000000000000000000000281526004018090506020604051808303816000876161da5a03f11561000257505050604051805190602001508173ffffffffffffffffffffffffffffffffffffffff1663bddeab77604051817c01000000000000000000000000000000000000000000000000000000000281526004018090506020604051808303816000876161da5a03f1156100025750505060405180519060200150121561055f57600091506105ee565b8073ffffffffffffffffffffffffffffffffffffffff1683604051808280519060200190808383829060006004602084601f0104600f02600301f150905090810190601f1680156105c45780820380516001836020036101000a031916815260200191505b509150506000604051808303816000866161da5a03f191505091506105ee566105ed565b610002565b5b5092915050565b60003090506105ff565b90565b600061060d3361029f565b1561081e5781600060005084604051808280519060200190808383829060006004602084601f0104600f02600301f150905001915050908152602001604051809103902060006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908302179055506001600160005060008473ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060006101000a81548160ff021916908302179055508173ffffffffffffffffffffffffffffffffffffffff16636b718db9600360009054906101000a900473ffffffffffffffffffffffffffffffffffffffff16604051827c0100000000000000000000000000000000000000000000000000000000028152600401808273ffffffffffffffffffffffffffffffffffffffff1681526020019150506020604051808303816000876161da5a03f1156100025750505060405180519060200150508173ffffffffffffffffffffffffffffffffffffffff1663c174dce3600260009054906101000a900473ffffffffffffffffffffffffffffffffffffffff16604051827c0100000000000000000000000000000000000000000000000000000000028152600401808273ffffffffffffffffffffffffffffffffffffffff1681526020019150506020604051808303816000876161da5a03f1156100025750505060405180519060200150905061082456610823565b610002565b5b92915050565b600060006108373361029f565b1561097d57600060005083604051808280519060200190808383829060006004602084601f0104600f02600301f150905001915050908152602001604051809103902060009054906101000a900473ffffffffffffffffffffffffffffffffffffffff16905060008173ffffffffffffffffffffffffffffffffffffffff1614156108c55760009150610983565b6000600060005084604051808280519060200190808383829060006004602084601f0104600f02600301f150905001915050908152602001604051809103902060006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908302179055506001600160005060008373ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060006101000a81548160ff021916908302179055506001915061098356610982565b610002565b5b50919050566060604052361561007f576000357c010000000000000000000000000000000000000000000000000000000090048063207c64fb14610081578063229320ca146100af57806354a380061461016257806362441aee146101d7578063ba061afa14610243578063ba0e4c3014610266578063cd143d45146102945761007f565b005b61009760048080359060200190919050506102cd565b60405180821515815260200191505060405180910390f35b61014a6004808035906020019082018035906020019191908080601f016020809104026020016040519081016040528093929190818152602001838380828437820191505050505050909091908035906020019082018035906020019191908080601f016020809104026020016040519081016040528093929190818152602001838380828437820191505050505050909091905050610386565b60405180821515815260200191505060405180910390f35b6101bf6004808035906020019082018035906020019191908080601f016020809104026020016040519081016040528093929190818152602001838380828437820191505050505050909091908035906020019091905050610542565b60405180821515815260200191505060405180910390f35b61022b6004808035906020019082018035906020019191908080601f0160208091040260200160405190810160405280939291908181526020018383808284378201915050505050509090919050506106bc565b60405180821515815260200191505060405180910390f35b6102506004805050610817565b6040518082815260200191505060405180910390f35b61027c6004808035906020019091905050610829565b60405180821515815260200191505060405180910390f35b6102a160048050506108a3565b604051808273ffffffffffffffffffffffffffffffffffffffff16815260200191505060405180910390f35b6000600160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1663207c64fb83604051827c0100000000000000000000000000000000000000000000000000000000028152600401808273ffffffffffffffffffffffffffffffffffffffff1681526020019150506020604051808303816000876161da5a03f11561000257505050604051805190602001509050610381565b919050565b6000600260009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff16141561053657600160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1663229320ca8484604051837c01000000000000000000000000000000000000000000000000000000000281526004018080602001806020018381038352858181518152602001915080519060200190808383829060006004602084601f0104600f02600301f150905090810190601f1680156104a75780820380516001836020036101000a031916815260200191505b508381038252848181518152602001915080519060200190808383829060006004602084601f0104600f02600301f150905090810190601f1680156105005780820380516001836020036101000a031916815260200191505b509450505050506020604051808303816000876161da5a03f1156100025750505060405180519060200150905061053c5661053b565b610002565b5b92915050565b6000600360009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff1614156106b057600160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff166354a380068484604051837c010000000000000000000000000000000000000000000000000000000002815260040180806020018373ffffffffffffffffffffffffffffffffffffffff1681526020018281038252848181518152602001915080519060200190808383829060006004602084601f0104600f02600301f150905090810190601f16801561067b5780820380516001836020036101000a031916815260200191505b5093505050506020604051808303816000876161da5a03f115610002575050506040518051906020015090506106b6566106b5565b610002565b5b92915050565b6000600360009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff16141561080c57600160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff166362441aee83604051827c010000000000000000000000000000000000000000000000000000000002815260040180806020018281038252838181518152602001915080519060200190808383829060006004602084601f0104600f02600301f150905090810190601f1680156107d85780820380516001836020036101000a031916815260200191505b50925050506020604051808303816000876161da5a03f1156100025750505060405180519060200150905061081256610811565b610002565b5b919050565b60006000600050549050610826565b90565b6000600360009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff16141561089857816000600050819055506001905061089e5661089d565b610002565b5b919050565b6000600160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff166338cc4831604051817c01000000000000000000000000000000000000000000000000000000000281526004018090506020604051808303816000876161da5a03f11561000257505050604051805190602001509050610939565b9056000000000000000000000000f48120eb4930c72ce3e8c44f7ad4df997a6bfaaf",
            "value": "0x0"
        },
        "blockHash": "0x7eb25504e4c202cf3d62fd585d3e238f592c780cca82dacb2ed3cb5b38883add",
        "blockNumber": 3068185,
        "result": {
            "address": "0x8b643749d0a94e7764a8eeb19f183872f1e98b36",
            "code": "0x6060604052361561007f576000357c010000000000000000000000000000000000000000000000000000000090048063207c64fb14610081578063229320ca146100af57806354a380061461016257806362441aee146101d7578063ba061afa14610243578063ba0e4c3014610266578063cd143d45146102945761007f565b005b61009760048080359060200190919050506102cd565b60405180821515815260200191505060405180910390f35b61014a6004808035906020019082018035906020019191908080601f016020809104026020016040519081016040528093929190818152602001838380828437820191505050505050909091908035906020019082018035906020019191908080601f016020809104026020016040519081016040528093929190818152602001838380828437820191505050505050909091905050610386565b60405180821515815260200191505060405180910390f35b6101bf6004808035906020019082018035906020019191908080601f016020809104026020016040519081016040528093929190818152602001838380828437820191505050505050909091908035906020019091905050610542565b60405180821515815260200191505060405180910390f35b61022b6004808035906020019082018035906020019191908080601f0160208091040260200160405190810160405280939291908181526020018383808284378201915050505050509090919050506106bc565b60405180821515815260200191505060405180910390f35b6102506004805050610817565b6040518082815260200191505060405180910390f35b61027c6004808035906020019091905050610829565b60405180821515815260200191505060405180910390f35b6102a160048050506108a3565b604051808273ffffffffffffffffffffffffffffffffffffffff16815260200191505060405180910390f35b6000600160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1663207c64fb83604051827c0100000000000000000000000000000000000000000000000000000000028152600401808273ffffffffffffffffffffffffffffffffffffffff1681526020019150506020604051808303816000876161da5a03f11561000257505050604051805190602001509050610381565b919050565b6000600260009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff16141561053657600160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1663229320ca8484604051837c01000000000000000000000000000000000000000000000000000000000281526004018080602001806020018381038352858181518152602001915080519060200190808383829060006004602084601f0104600f02600301f150905090810190601f1680156104a75780820380516001836020036101000a031916815260200191505b508381038252848181518152602001915080519060200190808383829060006004602084601f0104600f02600301f150905090810190601f1680156105005780820380516001836020036101000a031916815260200191505b509450505050506020604051808303816000876161da5a03f1156100025750505060405180519060200150905061053c5661053b565b610002565b5b92915050565b6000600360009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff1614156106b057600160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff166354a380068484604051837c010000000000000000000000000000000000000000000000000000000002815260040180806020018373ffffffffffffffffffffffffffffffffffffffff1681526020018281038252848181518152602001915080519060200190808383829060006004602084601f0104600f02600301f150905090810190601f16801561067b5780820380516001836020036101000a031916815260200191505b5093505050506020604051808303816000876161da5a03f115610002575050506040518051906020015090506106b6566106b5565b610002565b5b92915050565b6000600360009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff16141561080c57600160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff166362441aee83604051827c010000000000000000000000000000000000000000000000000000000002815260040180806020018281038252838181518152602001915080519060200190808383829060006004602084601f0104600f02600301f150905090810190601f1680156107d85780820380516001836020036101000a031916815260200191505b50925050506020604051808303816000876161da5a03f1156100025750505060405180519060200150905061081256610811565b610002565b5b919050565b60006000600050549050610826565b90565b6000600360009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff16141561089857816000600050819055506001905061089e5661089d565b610002565b5b919050565b6000600160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff166338cc4831604051817c01000000000000000000000000000000000000000000000000000000000281526004018090506020604051808303816000876161da5a03f11561000257505050604051805190602001509050610939565b9056",
            "gasUsed": "0x10cd2a"
        },
        "subtraces": 1,
        "traceAddress": [],
        "transactionHash": "0x6d6e331fd2ac896d175d9940b16f1c04958079c22fe6eb84e9207ebad70cf8b0",
        "transactionPosition": 6,
        "type": "create"
    }, {
        "action": {
            "from": "0x8b643749d0a94e7764a8eeb19f183872f1e98b36",
            "gas": "0x107863",
            "init": "0x6060604052604051604080610a1a833981016040528080519060200190919080519060200190919050505b81600260006101000a81548173ffffffffffffffffffffffffffffffffffffffff0219169083021790555080600360006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908302179055505b5050610989806100916000396000f360606040523615610074576000357c0100000000000000000000000000000000000000000000000000000000900480630ddcfe8e14610076578063207c64fb146100a4578063229320ca146100d257806338cc48311461018557806354a38006146101be57806362441aee1461023357610074565b005b61008c600480803590602001909190505061029f565b60405180821515815260200191505060405180910390f35b6100ba60048080359060200190919050506102fe565b60405180821515815260200191505060405180910390f35b61016d6004808035906020019082018035906020019191908080601f016020809104026020016040519081016040528093929190818152602001838380828437820191505050505050909091908035906020019082018035906020019191908080601f016020809104026020016040519081016040528093929190818152602001838380828437820191505050505050909091905050610375565b60405180821515815260200191505060405180910390f35b61019260048050506105f5565b604051808273ffffffffffffffffffffffffffffffffffffffff16815260200191505060405180910390f35b61021b6004808035906020019082018035906020019191908080601f016020809104026020016040519081016040528093929190818152602001838380828437820191505050505050909091908035906020019091905050610602565b60405180821515815260200191505060405180910390f35b6102876004808035906020019082018035906020019191908080601f01602080910402602001604051908101604052809392919081815260200183838082843782019150505050505090909190505061082a565b60405180821515815260200191505060405180910390f35b6000600260009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff161490506102f9565b919050565b60006103093361029f565b1561036a5760011515600160005060008473ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060009054906101000a900460ff161515141561035d5760019050610370565b600090506103705661036f565b610002565b5b919050565b600060006103823361029f565b156105e857600060005084604051808280519060200190808383829060006004602084601f0104600f02600301f150905001915050908152602001604051809103902060009054906101000a900473ffffffffffffffffffffffffffffffffffffffff16905060008173ffffffffffffffffffffffffffffffffffffffff16141561041057600091506105ee565b8073ffffffffffffffffffffffffffffffffffffffff166305f474a8604051817c01000000000000000000000000000000000000000000000000000000000281526004018090506020604051808303816000876161da5a03f115610002575050506040518051906020015073ffffffffffffffffffffffffffffffffffffffff1663ba061afa604051817c01000000000000000000000000000000000000000000000000000000000281526004018090506020604051808303816000876161da5a03f11561000257505050604051805190602001508173ffffffffffffffffffffffffffffffffffffffff1663bddeab77604051817c01000000000000000000000000000000000000000000000000000000000281526004018090506020604051808303816000876161da5a03f1156100025750505060405180519060200150121561055f57600091506105ee565b8073ffffffffffffffffffffffffffffffffffffffff1683604051808280519060200190808383829060006004602084601f0104600f02600301f150905090810190601f1680156105c45780820380516001836020036101000a031916815260200191505b509150506000604051808303816000866161da5a03f191505091506105ee566105ed565b610002565b5b5092915050565b60003090506105ff565b90565b600061060d3361029f565b1561081e5781600060005084604051808280519060200190808383829060006004602084601f0104600f02600301f150905001915050908152602001604051809103902060006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908302179055506001600160005060008473ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060006101000a81548160ff021916908302179055508173ffffffffffffffffffffffffffffffffffffffff16636b718db9600360009054906101000a900473ffffffffffffffffffffffffffffffffffffffff16604051827c0100000000000000000000000000000000000000000000000000000000028152600401808273ffffffffffffffffffffffffffffffffffffffff1681526020019150506020604051808303816000876161da5a03f1156100025750505060405180519060200150508173ffffffffffffffffffffffffffffffffffffffff1663c174dce3600260009054906101000a900473ffffffffffffffffffffffffffffffffffffffff16604051827c0100000000000000000000000000000000000000000000000000000000028152600401808273ffffffffffffffffffffffffffffffffffffffff1681526020019150506020604051808303816000876161da5a03f1156100025750505060405180519060200150905061082456610823565b610002565b5b92915050565b600060006108373361029f565b1561097d57600060005083604051808280519060200190808383829060006004602084601f0104600f02600301f150905001915050908152602001604051809103902060009054906101000a900473ffffffffffffffffffffffffffffffffffffffff16905060008173ffffffffffffffffffffffffffffffffffffffff1614156108c55760009150610983565b6000600060005084604051808280519060200190808383829060006004602084601f0104600f02600301f150905001915050908152602001604051809103902060006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908302179055506001600160005060008373ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060006101000a81548160ff021916908302179055506001915061098356610982565b610002565b5b50919050560000000000000000000000008b643749d0a94e7764a8eeb19f183872f1e98b36000000000000000000000000f48120eb4930c72ce3e8c44f7ad4df997a6bfaaf",
            "value": "0x0"
        },
        "blockHash": "0x7eb25504e4c202cf3d62fd585d3e238f592c780cca82dacb2ed3cb5b38883add",
        "blockNumber": 3068185,
        "result": {
            "address": "0x83ac5e41e3dcb60a0836ad62211063bbc5dd4ff8",
            "code": "0x60606040523615610074576000357c0100000000000000000000000000000000000000000000000000000000900480630ddcfe8e14610076578063207c64fb146100a4578063229320ca146100d257806338cc48311461018557806354a38006146101be57806362441aee1461023357610074565b005b61008c600480803590602001909190505061029f565b60405180821515815260200191505060405180910390f35b6100ba60048080359060200190919050506102fe565b60405180821515815260200191505060405180910390f35b61016d6004808035906020019082018035906020019191908080601f016020809104026020016040519081016040528093929190818152602001838380828437820191505050505050909091908035906020019082018035906020019191908080601f016020809104026020016040519081016040528093929190818152602001838380828437820191505050505050909091905050610375565b60405180821515815260200191505060405180910390f35b61019260048050506105f5565b604051808273ffffffffffffffffffffffffffffffffffffffff16815260200191505060405180910390f35b61021b6004808035906020019082018035906020019191908080601f016020809104026020016040519081016040528093929190818152602001838380828437820191505050505050909091908035906020019091905050610602565b60405180821515815260200191505060405180910390f35b6102876004808035906020019082018035906020019191908080601f01602080910402602001604051908101604052809392919081815260200183838082843782019150505050505090909190505061082a565b60405180821515815260200191505060405180910390f35b6000600260009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff161490506102f9565b919050565b60006103093361029f565b1561036a5760011515600160005060008473ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060009054906101000a900460ff161515141561035d5760019050610370565b600090506103705661036f565b610002565b5b919050565b600060006103823361029f565b156105e857600060005084604051808280519060200190808383829060006004602084601f0104600f02600301f150905001915050908152602001604051809103902060009054906101000a900473ffffffffffffffffffffffffffffffffffffffff16905060008173ffffffffffffffffffffffffffffffffffffffff16141561041057600091506105ee565b8073ffffffffffffffffffffffffffffffffffffffff166305f474a8604051817c01000000000000000000000000000000000000000000000000000000000281526004018090506020604051808303816000876161da5a03f115610002575050506040518051906020015073ffffffffffffffffffffffffffffffffffffffff1663ba061afa604051817c01000000000000000000000000000000000000000000000000000000000281526004018090506020604051808303816000876161da5a03f11561000257505050604051805190602001508173ffffffffffffffffffffffffffffffffffffffff1663bddeab77604051817c01000000000000000000000000000000000000000000000000000000000281526004018090506020604051808303816000876161da5a03f1156100025750505060405180519060200150121561055f57600091506105ee565b8073ffffffffffffffffffffffffffffffffffffffff1683604051808280519060200190808383829060006004602084601f0104600f02600301f150905090810190601f1680156105c45780820380516001836020036101000a031916815260200191505b509150506000604051808303816000866161da5a03f191505091506105ee566105ed565b610002565b5b5092915050565b60003090506105ff565b90565b600061060d3361029f565b1561081e5781600060005084604051808280519060200190808383829060006004602084601f0104600f02600301f150905001915050908152602001604051809103902060006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908302179055506001600160005060008473ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060006101000a81548160ff021916908302179055508173ffffffffffffffffffffffffffffffffffffffff16636b718db9600360009054906101000a900473ffffffffffffffffffffffffffffffffffffffff16604051827c0100000000000000000000000000000000000000000000000000000000028152600401808273ffffffffffffffffffffffffffffffffffffffff1681526020019150506020604051808303816000876161da5a03f1156100025750505060405180519060200150508173ffffffffffffffffffffffffffffffffffffffff1663c174dce3600260009054906101000a900473ffffffffffffffffffffffffffffffffffffffff16604051827c0100000000000000000000000000000000000000000000000000000000028152600401808273ffffffffffffffffffffffffffffffffffffffff1681526020019150506020604051808303816000876161da5a03f1156100025750505060405180519060200150905061082456610823565b610002565b5b92915050565b600060006108373361029f565b1561097d57600060005083604051808280519060200190808383829060006004602084601f0104600f02600301f150905001915050908152602001604051809103902060009054906101000a900473ffffffffffffffffffffffffffffffffffffffff16905060008173ffffffffffffffffffffffffffffffffffffffff1614156108c55760009150610983565b6000600060005084604051808280519060200190808383829060006004602084601f0104600f02600301f150905001915050908152602001604051809103902060006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908302179055506001600160005060008373ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060006101000a81548160ff021916908302179055506001915061098356610982565b610002565b5b5091905056",
            "gasUsed": "0x813aa"
        },
        "subtraces": 0,
        "traceAddress": [0],
        "transactionHash": "0x6d6e331fd2ac896d175d9940b16f1c04958079c22fe6eb84e9207ebad70cf8b0",
        "transactionPosition": 6,
        "type": "create"
    }, {
        "action": {
            "from": "0xd9bd20efca7b0e6606b969548b1516c08d37374b",
            "callType": "call",
            "gas": "0x1eed8",
            "input": "0xa9059cbb0000000000000000000000000328307a6cab168e3947bfaec99bf5b64573383f00000000000000000000000000000000000000000000000c9a80665ea1ae5000",
            "to": "0xaf30d2a7e90d7dc361c8c4585e9bb7d2f6f15bc7",
            "value": "0x0"
        },
        "blockHash": "0x7eb25504e4c202cf3d62fd585d3e238f592c780cca82dacb2ed3cb5b38883add",
        "blockNumber": 3068185,
        "result": {
            "gasUsed": "0x7310",
            "output": "0x0000000000000000000000000000000000000000000000000000000000000001"
        },
        "subtraces": 0,
        "traceAddress": [],
        "transactionHash": "0x77656b0b74ea1f8b158067c8371617aae7ab06f05c6c13001606a763688602c3",
        "transactionPosition": 7,
        "type": "call"
    }, {
        "action": {
            "from": "0x9e0b9ddba97dd4f7addab0b5f67036eebe687606",
            "callType": "call",
            "gas": "0x7e2c8",
            "input": "0xa9059cbb0000000000000000000000001fbe1955a469c635308e5bfac781841a64d214a00000000000000000000000000000000000000000000000000008e1bc9bf04000",
            "to": "0x37a9679c41e99db270bda88de8ff50c0cd23f326",
            "value": "0x0"
        },
        "blockHash": "0x7eb25504e4c202cf3d62fd585d3e238f592c780cca82dacb2ed3cb5b38883add",
        "blockNumber": 3068185,
        "result": {
            "gasUsed": "0x3716",
            "output": "0x"
        },
        "subtraces": 0,
        "traceAddress": [],
        "transactionHash": "0x86ae4b37fc6506ef11f3f6824387799fbbb2bf8ee5a057088f0595234ed89548",
        "transactionPosition": 8,
        "type": "call"
    }, {
        "action": {
            "from": "0x00472c1e4275230354dbe5007a5976053f12610a",
            "callType": "call",
            "gas": "0xdfc48",
            "input": "0xe1fa8e84fe9e048674e77546c182bde4a502899167d49455fc30dda396d46e041d8afd4f",
            "to": "0xcd111aa492a9c77a367c36e6d6af8e6f212e0c8e",
            "value": "0x0"
        },
        "blockHash": "0x7eb25504e4c202cf3d62fd585d3e238f592c780cca82dacb2ed3cb5b38883add",
        "blockNumber": 3068185,
        "result": {
            "gasUsed": "0xa5b0",
            "output": "0x"
        },
        "subtraces": 0,
        "traceAddress": [],
        "transactionHash": "0xeb179e3c6c2580241369fb87fd915b93ab40011140b65771d336f88c7dd00768",
        "transactionPosition": 9,
        "type": "call"
    }, {
        "action": {
            "author": "0xea674fdde714fd979de3edf0f56aa9716b898ec8",
            "rewardType": "block",
            "value": "0x4563918244f40000"
        },
        "blockHash": "0x7eb25504e4c202cf3d62fd585d3e238f592c780cca82dacb2ed3cb5b38883add",
        "blockNumber": 3068185,
        "result": null,
        "subtraces": 0,
        "traceAddress": [],
        "type": "reward"
    }]
}
```


# trace\_get

Returns trace at given position.

#### **Parameters** <a href="#parameters" id="parameters"></a>

1. `Hash` - Transaction hash.
2. `Array` - Index positions of the traces.

#### **Returns** <a href="#returns" id="returns"></a>

* `Object` - Trace object

#### Example <a href="#example" id="example"></a>

Request

```bash
curl https://rpc-tracer-mainnet.u2u.xyz \
-X POST \
-H "Content-Type: application/json" \
-d '{"method":"trace_get","params":["0x17104ac9d3312d8c136b7f44d4b8b47852618065ebfa534bd2d3b5ef218ca1f3",["0x0"]],"id":1,"jsonrpc":"2.0"}'
```

Result

```json
{
    "jsonrpc": "2.0",
    "id": 1,
    "result": {
        "action": {
            "from": "0x1c39ba39e4735cb65978d4db400ddd70a72dc750",
            "callType": "call",
            "gas": "0x13e99",
            "input": "0x16c72721",
            "to": "0x2bd2326c993dfaef84f696526064ff22eba5b362",
            "value": "0x0"
        },
        "blockHash": "0x7eb25504e4c202cf3d62fd585d3e238f592c780cca82dacb2ed3cb5b38883add",
        "blockNumber": 3068185,
        "result": {
            "gasUsed": "0x183",
            "output": "0x0000000000000000000000000000000000000000000000000000000000000001"
        },
        "subtraces": 0,
        "traceAddress": [0],
        "transactionHash": "0x17104ac9d3312d8c136b7f44d4b8b47852618065ebfa534bd2d3b5ef218ca1f3",
        "transactionPosition": 2,
        "type": "call"
    }
}
```


# trace\_transaction

Returns all traces of given transaction.

#### **Parameters** <a href="#parameters" id="parameters"></a>

1. `Hash` - Transaction hash

#### **Returns** <a href="#returns" id="returns"></a>

* `Array` - Traces of given transaction

#### Example <a href="#example" id="example"></a>

Request

```bash
curl https://rpc-tracer-mainnet.u2u.xyz \
-X POST \
-H "Content-Type: application/json" \
-d '{"method":"trace_transaction","params":["0x17104ac9d3312d8c136b7f44d4b8b47852618065ebfa534bd2d3b5ef218ca1f3"],"id":1,"jsonrpc":"2.0"}'
```

Result

```json
{
    "jsonrpc": "2.0",
    "id": 1,
    "result": [{
        "action": {
            "from": "0x83806d539d4ea1c140489a06660319c9a303f874",
            "callType": "call",
            "gas": "0x1a1f8",
            "input": "0x",
            "to": "0x1c39ba39e4735cb65978d4db400ddd70a72dc750",
            "value": "0x7a16c911b4d00000"
        },
        "blockHash": "0x7eb25504e4c202cf3d62fd585d3e238f592c780cca82dacb2ed3cb5b38883add",
        "blockNumber": 3068185,
        "result": {
            "gasUsed": "0x2982",
            "output": "0x"
        },
        "subtraces": 2,
        "traceAddress": [],
        "transactionHash": "0x17104ac9d3312d8c136b7f44d4b8b47852618065ebfa534bd2d3b5ef218ca1f3",
        "transactionPosition": 2,
        "type": "call"
    }, {
        "action": {
            "from": "0x1c39ba39e4735cb65978d4db400ddd70a72dc750",
            "callType": "call",
            "gas": "0x13e99",
            "input": "0x16c72721",
            "to": "0x2bd2326c993dfaef84f696526064ff22eba5b362",
            "value": "0x0"
        },
        "blockHash": "0x7eb25504e4c202cf3d62fd585d3e238f592c780cca82dacb2ed3cb5b38883add",
        "blockNumber": 3068185,
        "result": {
            "gasUsed": "0x183",
            "output": "0x0000000000000000000000000000000000000000000000000000000000000001"
        },
        "subtraces": 0,
        "traceAddress": [0],
        "transactionHash": "0x17104ac9d3312d8c136b7f44d4b8b47852618065ebfa534bd2d3b5ef218ca1f3",
        "transactionPosition": 2,
        "type": "call"
    }, {
        "action": {
            "from": "0x1c39ba39e4735cb65978d4db400ddd70a72dc750",
            "callType": "call",
            "gas": "0x8fc",
            "input": "0x",
            "to": "0x70faa28a6b8d6829a4b1e649d26ec9a2a39ba413",
            "value": "0x7a16c911b4d00000"
        },
        "blockHash": "0x7eb25504e4c202cf3d62fd585d3e238f592c780cca82dacb2ed3cb5b38883add",
        "blockNumber": 3068185,
        "result": {
            "gasUsed": "0x0",
            "output": "0x"
        },
        "subtraces": 0,
        "traceAddress": [1],
        "transactionHash": "0x17104ac9d3312d8c136b7f44d4b8b47852618065ebfa534bd2d3b5ef218ca1f3",
        "transactionPosition": 2,
        "type": "call"
    }]
}
```


# trace\_filter

Returns traces matching given filter.

#### **Parameters** <a href="#parameters" id="parameters"></a>

1. `Object` - The filter object
   * `fromBlock`: `Quantity` or `Tag` - (optional) From this block.
   * `toBlock`: `Quantity` or `Tag` - (optional) To this block.
   * `fromAddress`: `Array` - (optional) Sent from these addresses.
   * `toAddress`: `Address` - (optional) Sent to these addresses.
   * `after`: `Quantity` - (optional) The offset trace number
   * `count`: `Quantity` - (optional) Integer number of traces to display in a batch.

#### **Returns** <a href="#returns" id="returns"></a>

* `Array` - Traces matching given filter

#### Example <a href="#example" id="example"></a>

Request

```bash
curl https://rpc-tracer-mainnet.u2u.xyz \
-X POST \
-H "Content-Type: application/json" \
-d '{"method":"trace_filter","params":[{"fromBlock":"0xc26f54","toBlock":"0xc26f54"}],"id":1,"jsonrpc":"2.0"}' 
```


# Explorer

U2UScan is U2U Network blockchain explorer, search, API and analytics platform for U2U Network.

> *Please note that U2UScan does not included U2U Subnet Explorer*

As a means to provide equitable access to blockchain data, we've developed the **U2Uscan Developer APIs** to empower developers with direct access to U2Uscan's block explorer data and services via **GET/POST requests.**

U2Uscan's APIs are provided as a **community service** and **without warranty**, so please use what you need and no more.

## API Endpoints

For that you may find a suitable endpoint from our wide range of APIs that you can simply query to provide data while you remain fully focused on building your applications.

## Tutorials

> There is an overwhelming amount of data :chart\_with\_upwards\_trend: that can be extracted from the U2U Network.

We've helped you take the first steps by writing some thorough tutorials on how to query and derive popular blockchain metrics.&#x20;

For power users, we've also added guides such as how you can *programmatically verify contracts* through API calls and more advanced use cases of endpoints.


# Explorer URLs

### Mainnet Solaris

<https://u2uscan.xyz>

### Testnet Nebulas

<https://testnet.u2uscan.xyz>

### Devnet

Coming soon...

### zkRainbow

Coming soon...


# Explorer API

This API is provided to make developers easier to extract data from the U2U Network and applications requiring general API and data support. It supports GET and POST requests.

{% hint style="info" %}
URLs vary by instance. With typical installations, access the API by adding `/ap`i to the end of the url.

* Solaris Mainnet: <https://u2uscan.xyz/api>
* Nebulas Testnet: <https://testnet.u2uscan.xyz/api>
  {% endhint %}

The following modules are supported. Click through to see specific endpoints and parameters.

<table data-header-hidden><thead><tr><th width="158"></th><th></th></tr></thead><tbody><tr><td><a href="/pages/hz4WcvrkBCsa8vRmsaee">Account</a></td><td><code>?module=account</code></td></tr><tr><td><a href="/pages/xx1HxPN9TKlFaMuW1f4Z">Logs</a></td><td><code>?module=logs</code></td></tr><tr><td><a href="/pages/6PFgkuJzO9t1pqBepYYZ">Token</a></td><td><code>?module=token</code></td></tr><tr><td><a href="/pages/9lP5EBJicgFb3j1DKEDu">Stats</a></td><td><code>?module=stats</code></td></tr><tr><td><a href="/pages/TdbJNvyEPKPvIBm43wNr">Block</a></td><td><code>?module=block</code></td></tr><tr><td><a href="/pages/ISe2MUjVD93ECBs01x0W">Contract</a></td><td><code>?module=contract</code></td></tr><tr><td><a href="/pages/dNKtOhf6d9eTQvRbCfmi">Transaction</a></td><td><code>?module=transaction</code></td></tr></tbody></table>


# Account

?module=account

{% hint style="info" %}
Page is under construction.&#x20;
{% endhint %}

#### `https://instance_base_url/api?module=account` <a href="#https-instance_base_url-api-module-account" id="https-instance_base_url-api-module-account"></a>

### Return balance from a provided block <a href="#return-balance-from-a-provided-block" id="return-balance-from-a-provided-block"></a>

`eth_get_balance`

Mimics Ethereum JSON RPC's eth\_getBalance

**Example:**&#x20;

```
https://instance_base_url/api
   ?module=account
   &action=eth_get_balance
   &address={addressHash}
```

**Example**

{% tabs %}
{% tab title="Request Params" %}

| Parameter    | Description                                                                                                                                                                                                                                                 |
| ------------ | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| **address**  | `string` containing the address hash.                                                                                                                                                                                                                       |
| block        | optional. Block number as a string, or `latest`, `earliest` or `pending` Latest is the latest balance in a *consensus* block. Earliest is the first recorded balance for the address. Pending is the latest balance in a consensus *or* nonconsensus block. |
| {% endtab %} |                                                                                                                                                                                                                                                             |

{% tab title="Example Results" %}

```
{
  "id": 1,
  "jsonrpc": "2.0",
  "result": "0x0234c8a3397aab58"
}
```

{% endtab %}
{% endtabs %}

### Get the native token balance for an address <a href="#get-the-native-token-balance-for-an-address" id="get-the-native-token-balance-for-an-address"></a>

`balance`Many chains use their own native tokens. On Ethereum, this will return the result in "Ether", on Gnosis it will be "xDai", etc. Results are returned in wei.

**Example:**

```
https://instance_base_url/api
   ?module=account
   &action=balance
   &address={addressHash}
```

{% tabs %}
{% tab title="Request Params" %}

| Parameter    | Description                           |
| ------------ | ------------------------------------- |
| **address**  | `string` containing the address hash. |
| {% endtab %} |                                       |

{% tab title="Example Result" %}

```
{
  "message": "OK",
  "result": "663046792267785498951364",
  "status": "1"
}
```

{% endtab %}
{% endtabs %}

Also available through a GraphQL `address` query.If the balance hasn't been updated recently, the node is double-checked to fetch the absolute latest balance. This will not be reflected in the current request, but once it is updated, subsequent requests will show the updated balance. If you want to know if there is a check for another balance, use the `balancemult`i action. That contains a property called `stale` that will let you know to recheck that balance in the near future.

### Get balance for multiple addresses <a href="#get-balance-for-multiple-addresses" id="get-balance-for-multiple-addresses"></a>

`balancemulti`

**Example:**

```
https://instance_base_url/api
   ?module=account
   &action=balancemulti
   &address={addressHash1,addressHash2,addressHash3}
```

{% tabs %}
{% tab title="Request Params" %}

| Parameter    | Description                                                                  |
| ------------ | ---------------------------------------------------------------------------- |
| **address**  | `string` containing the address hash, comma separated. **Max 20 addresses.** |
| {% endtab %} |                                                                              |

{% tab title="Example Result" %}

```
{
  "message": "OK",
  "result": [
    {
      "account": "0xddbd2b932c763ba5b1b7ae3b362eac3e8d40121a",
      "balance": "40807168566070000000000",
      "stale": true
    },
    {
      "account": "0x63a9975ba31b0b9626b34300f7f627147df1f526",
      "balance": "332567136222827062478",
      "stale": false
    },
    {
      "account": "0x198ef1ec325a96cc354c7266a038be8b5c558f67",
      "balance": "185178830000000000",
      "stale": false
    }
  ],
  "status": "1"
}
```

{% endtab %}
{% endtabs %}

{% hint style="info" %}
Also available through a GraphQL 'addresses' query
{% endhint %}

{% hint style="info" %}
If the balance hasn't been updated in a long time, the node is double checked to fetch the absolute latest balance. This is not reflected in the current request, but once it is updated, subsequent requests will show the updated balance. The **`stale`** attribute will be set to **`true`** if a new balance is being fetched.
{% endhint %}

### Get pending transactions by address <a href="#get-pending-transactions-by-address" id="get-pending-transactions-by-address"></a>

`pendingtxlist`

**Example:**&#x20;

```
https://instance_base_url/api
   ?module=account
   &action=pendingtxlist
   &address={addressHash}
   &page=1
   &offset=5
```

{% tabs %}
{% tab title="Requested Params" %}

| Parameter    | Description                                                                                             |
| ------------ | ------------------------------------------------------------------------------------------------------- |
| **address**  | `string` containing the address hash.                                                                   |
| page         | optional `integer` representing the page number used for pagination. 'offset' must also be provided.    |
| offset       | optional `integer` representing number of transactions returned per page. `page` must also be provided. |
| {% endtab %} |                                                                                                         |

{% tab title="Example Result" %}

```
"message": "OK",
  "result": [
    {
      "contractAddress": "",
      "cumulativeGasUsed": "122207",
      "from": "0x3fb1cd2cd96c6d5c0b5eb3322d807b34482481d4",
      "gas": "122261",
      "gasPrice": "50000000000",
      "gasUsed": "122207",
      "hash": "0x98beb27135aa0a25650557005ad962919d6a278c4b3dde7f4f6a3a1e65aa746c",
      "input": "0xf00d4b5d000000000000000000000000036c8cecce8d8bbf0831d840d7f29c9e3ddefa63000000000000000000000000c5a96db085dda36ffbe390f455315d30d6d3dc52",
      "nonce": "0",
      "to": "0xde0b295669a9fd93d5f28d9ec85e40f4cb697bae",
      "value": "0"
    }
  ],
  "status": "1"
}
```

{% endtab %}
{% endtabs %}

### Get transactions by address <a href="#get-transactions-by-address" id="get-transactions-by-address"></a>

`txlist`

Maximum of 10,000 transactions. Also available through a GraphQL 'address' query. For faster results, specify a smaller block range to search using the start\_block and end\_block parameters

**Example:**&#x20;

```
https://instance_base_url/api
   ?module=account
   &action=txlist
   &address={addressHash}
   &startblock=555555
   &endblock=666666
   &page=1
   &offset=5
   &sort=asc
```

{% tabs %}
{% tab title="Requested Params" %}

| Parameter        | Description                                                                                                                                                          |
| ---------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| **address**      | `string` containing the address hash.                                                                                                                                |
| sort             | optional sorting preference, `asc` for ascending and `desc` for descending. Descending is default.                                                                   |
| start\_block     | optional `integer` block number to start transaction search                                                                                                          |
| end\_block       | optional`integer` block number to stop transaction search.                                                                                                           |
| page             | optional `integer` representing the page number used for pagination. `offset` must also be provided.                                                                 |
| offset           | optional `integer` representing number of transactions returned per page. `page` must also be provided.                                                              |
| filter\_by       | optional string representing the field to filter by. Values include `to` and `from`. If none provided returns transactions that match to, from, or contract address. |
| start\_timestamp | optional starting block unix timestamp.                                                                                                                              |
| end\_timestamp   | optional ending block unix timestamp.                                                                                                                                |
| {% endtab %}     |                                                                                                                                                                      |

{% tab title="Example Result" %}

```
{
  "message": "OK",
  "result": [
    {
      "blockHash": "0x373d339e45a701447367d7b9c7cef84aab79c2b2714271b908cda0ab3ad0849b",
      "blockNumber": "65204",
      "confirmations": "5994246",
      "contractAddress": "",
      "cumulativeGasUsed": "122207",
      "from": "0x3fb1cd2cd96c6d5c0b5eb3322d807b34482481d4",
      "gas": "122261",
      "gasPrice": "50000000000",
      "gasUsed": "122207",
      "hash": "0x98beb27135aa0a25650557005ad962919d6a278c4b3dde7f4f6a3a1e65aa746c",
      "input": "0xf00d4b5d000000000000000000000000036c8cecce8d8bbf0831d840d7f29c9e3ddefa63000000000000000000000000c5a96db085dda36ffbe390f455315d30d6d3dc52",
      "isError": "0",
      "nonce": "0",
      "timeStamp": "1439232889",
      "to": "0xde0b295669a9fd93d5f28d9ec85e40f4cb697bae",
      "transactionIndex": "0",
      "txreceipt_status": "1",
      "value": "0"
    }
  ],
  "status": "1"
}
```

{% endtab %}
{% endtabs %}

### Get internal transactions by transaction or address hash <a href="#get-internal-transactions-by-transaction-or-address-hash" id="get-internal-transactions-by-transaction-or-address-hash"></a>

`txlistinternal`

Up to a maximum of 10,000 internal transactions. Also available through a GraphQL 'transaction' query. For faster results, specify a smaller block range to search using the start\_block and end\_block parameters.

**Example:**&#x20;

```
https://instance_base_url/api
   ?module=account
   &action=txlistinternal
   &txhash={transactionHash}
   &startblock=555555
   &endblock=666666
   &page=1
   &offset=5
   &sort=asc
```

{% tabs %}
{% tab title="Requested Params" %}

| Parameter    | Description                                                                                                                                          |
| ------------ | ---------------------------------------------------------------------------------------------------------------------------------------------------- |
| **txhash**   | `string` representing the transaction hash to check for internal transactions                                                                        |
| address      | optional `string` containing the address hash.                                                                                                       |
| sort         | optional sorting preference, `asc` for ascending and `desc` for descending. Descending is default. **Only available if 'address' is provided.**      |
| start\_block | optional `integer` block number to start transaction search. **Only available if 'address' is provided.**                                            |
| end\_block   | optional`integer` block number to stop transaction search. **Only available if 'address' is provided.**                                              |
| page         | optional `integer` representing the page number used for pagination. `offset` must also be provided. **Only available if 'address' is provided.**    |
| offset       | optional `integer` representing number of transactions returned per page. `page` must also be provided. **Only available if 'address' is provided.** |
| {% endtab %} |                                                                                                                                                      |

{% tab title="Example Result" %}

{% endtab %}
{% endtabs %}

### Get token transfer events by address <a href="#get-token-transfer-events-by-address" id="get-token-transfer-events-by-address"></a>

`tokentx`

Up to a maximum of 10,000 token transfer events. Also available through the GraphQL `token_transfers` query.

**Example:**&#x20;

```
https://instance_base_url/api
   ?module=account
   &action=tokentx
   &address={addressHash}
   &page=1
   &offset=10
   &sort=asc
```

{% tabs %}
{% tab title="Requested Params" %}

| Parameter        | Description                                                                                             |
| ---------------- | ------------------------------------------------------------------------------------------------------- |
| **address**      | `string` containing the address hash.                                                                   |
| contract address | optional `string` with the token contract address to identify a contract.                               |
| sort             | optional sorting preference, `asc` for ascending and `desc` for descending. Descending is default.      |
| start\_block     | optional `integer` block number to start transaction search                                             |
| end\_block       | optional`integer` block number to stop transaction search.                                              |
| page             | optional `integer` representing the page number used for pagination. `offset` must also be provided.    |
| offset           | optional `integer` representing number of transactions returned per page. `page` must also be provided. |
| {% endtab %}     |                                                                                                         |

{% tab title="Example Result" %}

```
{
  "message": "OK",
  "result": [
    {
      "blockNumber": "6153702",
      "callType": "delegatecall",
      "contractAddress": "0x883103875d905c11f9ac7dacbfc16deb39655361",
      "errCode": "",
      "from": "0x2ca1e3f250f56f1761b9a52bc42db53986085eff",
      "gas": "814937",
      "gasUsed": "536262",
      "index": "0",
      "input": "",
      "isError": "0",
      "timeStamp": "1534362606",
      "to": "",
      "transactionHash": "0xd65b788c610949704a5f9aac2228c7c777434dfe11c863a12306f57fcbd8cdbb",
      "type": "call",
      "value": "5488334153118633"
    }
  ],
  "status": "1"
}
```

{% endtab %}
{% endtabs %}

### Get token account balance for token contract address <a href="#get-token-account-balance-for-token-contract-address" id="get-token-account-balance-for-token-contract-address"></a>

`tokenbalance`

**Example:**

```
https://instance_base_url/api
   ?module=account
   &action=tokenbalance
   &contractaddress={contractAddressHash}
   &address={addressHash}
```

{% tabs %}
{% tab title="Requested Params" %}

| Parameter            | Description                                                           |
| -------------------- | --------------------------------------------------------------------- |
| **contract address** | `string` containing the contract address hash.                        |
| **address**          | `string` containing the account address hash to retrieve balance for. |

{% endtab %}

{% tab title="Example Result" %}

```
{
  "message": "OK",
  "result": "135499",
  "status": "1"
}
```

{% endtab %}
{% endtabs %}

### Get list of tokens owned by address <a href="#get-list-of-tokens-owned-by-address" id="get-list-of-tokens-owned-by-address"></a>

`tokenlist`

**Example:**

<pre><code>https://instance_base_url/api
<strong>   ?module=account
</strong>   &#x26;action=tokenlist
   &#x26;address={addressHash}
</code></pre>

{% tabs %}
{% tab title="Requested Params" %}

| Parameter    | Description                                   |
| ------------ | --------------------------------------------- |
| **address**  | `string` containing the account address hash. |
| {% endtab %} |                                               |

{% tab title="Example Result" %}

```
{
  "message": "OK",
  "result": [
    {
      "balance": "135499",
      "contractAddress": "0x0000000000000000000000000000000000000000",
      "decimals": "18",
      "name": "Example Token",
      "symbol": "ET",
      "type": "ERC-20"
    },
    {
      "balance": "1",
      "contractAddress": "0x0000000000000000000000000000000000000001",
      "decimals": "18",
      "name": "Example ERC-721 Token",
      "symbol": "ET7",
      "type": "ERC-721"
    }
  ],
  "status": "1"
}
```

{% endtab %}
{% endtabs %}

### Get list of blocks mined by address <a href="#get-list-of-blocks-mined-by-address" id="get-list-of-blocks-mined-by-address"></a>

`getminedblocks`

**Example:**

```
https://instance_base_url/api
   ?module=account
   &action=getminedblocks
   &address={addressHash}
```

{% tabs %}
{% tab title="Requested Params" %}

| Parameter    | Description                                                                                             |
| ------------ | ------------------------------------------------------------------------------------------------------- |
| **address**  | `string` containing the address hash.                                                                   |
| page         | optional `integer` representing the page number used for pagination. 'offset' must also be provided.    |
| offset       | optional `integer` representing number of transactions returned per page. `page` must also be provided. |
| {% endtab %} |                                                                                                         |

{% tab title="Example Result" %}

```
{
  "message": "OK",
  "result": [
    {
      "blockNumber": "3462296",
      "blockReward": "5194770940000000000",
      "timeStamp": "1491118514"
    }
  ],
  "status": "1"
}
```

{% endtab %}
{% endtabs %}

### Get a list of accounts and their balances <a href="#get-a-list-of-accounts-and-their-balances" id="get-a-list-of-accounts-and-their-balances"></a>

`listaccounts`

Lists accounts and native balances, sorted ascending by the time they were first seen by the explorer.

**Example:**&#x20;

​<https://instance\\_base\\_url/api>

```
   ?module=account
   &action=listaccounts
   &address={addressHash}
   &page=1
   &offset=3
```

{% tabs %}
{% tab title="Requested Params" %}

| Parameter    | Description                                                                                             |
| ------------ | ------------------------------------------------------------------------------------------------------- |
| page         | optional `integer` representing the page number used for pagination. 'offset' must also be provided.    |
| offset       | optional `integer` representing number of transactions returned per page. `page` must also be provided. |
| {% endtab %} |                                                                                                         |

{% tab title="Example Result" %}

```
{
  "message": "OK",
  "result": [
    {
      "address": "0x3870c57fbf1d7e49b154269331c7bc66c64d8857",
      "balance": "3790064387342000000",
      "stale": false
    },
    {
      "address": "0x497d69ae30d7cca0aa84d647c6d85a59a82c16ef",
      "balance": "2047176464264000000",
      "stale": false
    },
    {
      "address": "0x9233042b8e9e03d5dc6454bbbe5aee83818ff103",
      "balance": "444111960222208758647",
      "stale": false
    }
  ],
  "status": "1"
}
```

{% endtab %}
{% endtabs %}

If the balance hasn't been updated in a long time, the node is double checked to fetch the absolute latest balance. This is not reflected in the current request, but once it is updated, subsequent requests will show the updated balance. The **`stale`** attribute will be set to **`true`** if a new balance is being fetched.


# Block

?module=block

### `https://instance_base_url/api?module=block`

## Get block reward by block number

`getblockreward`

Returns the block reward and 'uncle' block rewards when applicable.

**Example:**

```
https://instance_base_url/api
   ?module=block
   &action=getblockreward
   &blockno={blockNumber}
```

{% tabs %}
{% tab title="Request Param" %}

| Parameter    | Description                                                     |
| ------------ | --------------------------------------------------------------- |
| blockno      | `integer` block number to check block rewards for eg. `2165403` |
| {% endtab %} |                                                                 |

{% tab title="Example Result" %}

```json
{
  "message": "OK",
  "result": {
    "blockMiner": "0x13a06d3dfe21e0db5c016c03ea7d2509f7f8d1e3",
    "blockNumber": "2165403",
    "blockReward": "5314181600000000000",
    "timeStamp": "1472533979",
    "uncleInclusionReward": null,
    "uncles": null
  },
  "status": "1"
}
```

{% endtab %}
{% endtabs %}

## Get block number by time stamp

`getblocknobytime`

Returns the block number created closest to a provided timestamp.

**Example:**

```
https://instance_base_url/api
   ?module=block
   &action=getblocknobytime
   &timestamp={blockTimestamp}
   &closest={before/after}
```

{% tabs %}
{% tab title="Request Param" %}

| Parameter | Description                                                          |
| --------- | -------------------------------------------------------------------- |
| timestamp | `integer` representing the Unix timestamp in seconds.                |
| closest   | closest block to the provided timestamp, either `before` or `after`. |

Note: [How to convert date/time to a Unix timestamp](https://www.unixtimestamp.com/).
{% endtab %}

{% tab title="Example Result" %}

```
{
  "message": "OK",
  "result": {
    "blockNumber": "2165403"
  },
  "status": "1"
}
```

{% endtab %}
{% endtabs %}

## Get the latest block number

`eth_block_number`

Mimics Ethereum JSON RPC's eth\_blockNumber.

**Example:**

```
https://instance_base_url/api
   ?module=block
   &action=eth_block_number
```

{% tabs %}
{% tab title="Request Param" %}

| Parameter | Description                                                                                                         |
| --------- | ------------------------------------------------------------------------------------------------------------------- |
| id        | <mark style="background-color:yellow;">optional</mark> nonnegative integer that represents the json rpc request id. |

More on [json rpc request id](https://www.jsonrpc.org/specification).
{% endtab %}
{% endtabs %}


# Contract

### `https://instance_base_url/api?module=contract`

## Get a list of contracts

`listcontracts`

List sorted in ascending order based on the time a contact was first indexed by the explorer. With filters \`not\_decompiled\`(\`4\`) or \`not\_verified(4)\` the results will not be sorted for performance reasons.

**Example:**

```
https://instance_base_url/api
   ?module=contract
   &action=listcontracts
```

{% tabs %}
{% tab title="Request Params" %}

| Parameter                      | Description                                                                                                                                                                                                              |
| ------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ |
| page                           | <mark style="background-color:yellow;">optional</mark> nonnegative `integer` representing the page number used for pagination. 'offset' must also be provided.                                                           |
| offset                         | <mark style="background-color:yellow;">optional</mark> nonnegative `integer` representing the max number of records to return when paginating. 'page' must also be provided.                                             |
| filter                         | <mark style="background-color:yellow;">optional</mark>  string `verified`\|`decompiled`\|`unverified`\|`not_decompiled`\|`empty`, or `1`\|`2`\|`3`\|`4`\|`5` respectively. Returns  contracts with the requested status. |
| not\_decompiled\_with\_version | <mark style="background-color:yellow;">optional</mark> `string` ensures none of the returned contracts were decompiled with the provided version. Ignored unless filtering for `decompiled` contracts.                   |
| verified\_at\_start\_timestamp | <mark style="background-color:yellow;">optional</mark>  `unix timestamp` Represents the starting timestamp for verified contracts. Only used with `verified` filter.                                                     |
| verified\_at\_end\_timestamp   | <mark style="background-color:yellow;">optional</mark> `unix timestamp` Represents the ending timestamp for verified contracts. Only used with `verified` filter.                                                        |
| {% endtab %}                   |                                                                                                                                                                                                                          |

{% tab title="Example Result" %}

```json
{
  "message": "OK",
  "result": [
    {
      "ABI": "[{\n\"type\":\"event\",\n\"inputs\": [{\"name\":\"a\",\"type\":\"uint256\",\"indexed\":true},{\"name\":\"b\",\"type\":\"bytes32\",\"indexed\":false}],\n\"name\":\"Event\"\n}, {\n\"type\":\"event\",\n\"inputs\": [{\"name\":\"a\",\"type\":\"uint256\",\"indexed\":true},{\"name\":\"b\",\"type\":\"bytes32\",\"indexed\":false}],\n\"name\":\"Event2\"\n}, {\n\"type\":\"function\",\n\"inputs\": [{\"name\":\"a\",\"type\":\"uint256\"}],\n\"name\":\"foo\",\n\"outputs\": []\n}]\n",
      "CompilerVersion": "v0.2.1-2016-01-30-91a6b35",
      "ContractName": "Test",
      "OptimizationUsed": "1",
      "SourceCode": "pragma solidity >0.4.24;\n\ncontract Test {\nconstructor() public { b = hex\"12345678901234567890123456789012\"; }\nevent Event(uint indexed a, bytes32 b);\nevent Event2(uint indexed a, bytes32 b);\nfunction foo(uint a) public { emit Event(a, b); }\nbytes32 b;\n}\n"
    }
  ],
  "status": "1"
}
```

{% endtab %}
{% endtabs %}

## Get ABI for a verified contract

`getabi`

Also available through a GraphQL `addresses` query.&#x20;

**Example:**

```
https://instance_base_url/api
   ?module=contract
   &action=getabi
   &address={addressHash}
```

{% tabs %}
{% tab title="Request Params" %}

| Parameter    | Description                           |
| ------------ | ------------------------------------- |
| **address**  | `string` containing the address hash. |
| {% endtab %} |                                       |

{% tab title="Example Result" %}

```
{
  "message": "OK",
  "result": "[{\"constant\":false,\"inputs\":[{\"name\":\"voucher_token\",\"type\":\"bytes32\"}],\"name\":\"burn\",\"outputs\":[{\"name\":\"success\",\"type\":\"bool\"}],\"payable\":false,\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"constant\":true,\"inputs\":[{\"name\":\"voucher_token\",\"type\":\"bytes32\"}],\"name\":\"is_expired\",\"outputs\":[{\"name\":\"\",\"type\":\"bool\"}],\"payable\":false,\"stateMutability\":\"view\",\"type\":\"function\"},{\"constant\":false,\"inputs\":[{\"name\":\"voucher_token\",\"type\":\"bytes32\"}],\"name\":\"is_burnt\",\"outputs\":[{\"name\":\"\",\"type\":\"bool\"}],\"payable\":false,\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"name\":\"voucher_token\",\"type\":\"bytes32\"},{\"name\":\"_lifetime\",\"type\":\"uint256\"}],\"payable\":false,\"stateMutability\":\"nonpayable\",\"type\":\"constructor\"}]",
  "status": "1"
}
```

{% endtab %}
{% endtabs %}

## Get contract source code for a verified contract

`getsourcecode`

Also available through a GraphQL `addresses` query.&#x20;

**Example:**

```
https://instance_base_url/api
   ?module=contract
   &action=getsourcecode
   &address={addressHash}
```

{% tabs %}
{% tab title="Request Params" %}

| Parameter    | Description                           |
| ------------ | ------------------------------------- |
| **address**  | `string` containing the address hash. |
| {% endtab %} |                                       |

{% tab title="Example Result" %}

```
{
  "message": "OK",
  "result": {
    "ABI": "[{\n\"type\":\"event\",\n\"inputs\": [{\"name\":\"a\",\"type\":\"uint256\",\"indexed\":true},{\"name\":\"b\",\"type\":\"bytes32\",\"indexed\":false}],\n\"name\":\"Event\"\n}, {\n\"type\":\"event\",\n\"inputs\": [{\"name\":\"a\",\"type\":\"uint256\",\"indexed\":true},{\"name\":\"b\",\"type\":\"bytes32\",\"indexed\":false}],\n\"name\":\"Event2\"\n}, {\n\"type\":\"function\",\n\"inputs\": [{\"name\":\"a\",\"type\":\"uint256\"}],\n\"name\":\"foo\",\n\"outputs\": []\n}]\n",
    "CompilerVersion": "v0.2.1-2016-01-30-91a6b35",
    "ContractName": "Test",
    "FileName": "{sourcify path or empty}",
    "ImplementationAddress": "0x000000000000000000000000000000000000000e",
    "IsProxy": "true",
    "OptimizationUsed": "1",
    "SourceCode": "pragma solidity >0.4.24;\n\ncontract Test {\nconstructor() public { b = hex\"12345678901234567890123456789012\"; }\nevent Event(uint indexed a, bytes32 b);\nevent Event2(uint indexed a, bytes32 b);\nfunction foo(uint a) public { emit Event(a, b); }\nbytes32 b;\n}\n"
  },
  "status": "1"
}
```

{% endtab %}
{% endtabs %}

## Verify a contract with its source code and contract creation information

`verify`

**Example:**

```
https://instance_base_url/api
   ?module=contract
   &action=verify
   &addressHash={addressHash}
   &name={name}
   &compilerVersion={compilerVersion}
   &optimization={false}
   &contractSourceCode={contractSourceCode}
```

**Curl Post Example**

{% code overflow="wrap" %}

```
curl -d '{"addressHash":"0xc63BB6555C90846afACaC08A0F0Aa5caFCB382a1","compilerVersion":"v0.5.4+commit.9549d8ff", "contractSourceCode":"pragma solidity ^0.5.4; contract Test { }","name":"Test","optimization":false}' -H "Content-Type: application/json" -X POST "https://blockscout.com/poa/sokol/api?module=contract&action=verify"
```

{% endcode %}

{% hint style="info" %}
On successful submission you will receive a guid as a receipt. Use this with [`checkverifystatus`](#return-status-of-a-verification-attempt)`to view verification status.`
{% endhint %}

{% tabs %}
{% tab title="Params" %}

| Parameter                      | Description                                                                                                                |
| ------------------------------ | -------------------------------------------------------------------------------------------------------------------------- |
| **addressHash**                | `string` containing the address hash of the contract.                                                                      |
| **name**                       | `string` containing the name of the contract.                                                                              |
| **compilerVersion**            | `string` containing the compiler version for the contract.                                                                 |
| **optimization**               | `enum` whether or not compiler optimizations were enabled `0`=false, `1`=true                                              |
| **contractSourceCode**         | `string` containing the source code of the contract.                                                                       |
| constructorArguments           | <mark style="background-color:yellow;">optional</mark>  `string` constructor argument data provided.                       |
| autodetectConstructorArguments | <mark style="background-color:yellow;">optional</mark> `boolean` whether or not automatically detect constructor argument. |
| evmVersion                     | <mark style="background-color:yellow;">optional</mark>  EVM version for the contract.                                      |
| optimizationRuns               | <mark style="background-color:yellow;">optional</mark> number of optimization runs used during compilation                 |
| library1Name                   | <mark style="background-color:yellow;">optional</mark> `string` name of the first library used.                            |
| library1Address                | <mark style="background-color:yellow;">optional</mark> `string` address of the first library used.                         |
| library2Name                   | <mark style="background-color:yellow;">optional</mark> `string` name of the second library used.                           |
| library2Address                | <mark style="background-color:yellow;">optional</mark> `string` address of the second library used.                        |
| library3Name                   | <mark style="background-color:yellow;">optional</mark> `string` name of the third library used.                            |
| library3Address                | <mark style="background-color:yellow;">optional</mark> `string` address of the third library used.                         |
| library4Name                   | <mark style="background-color:yellow;">optional</mark> `string` name of the fourth library used.                           |
| library4Address                | <mark style="background-color:yellow;">optional</mark> `string` address of the fourth library used.                        |
| library5Name                   | <mark style="background-color:yellow;">optional</mark> `string` name of the fifth library used.                            |
| library5Address                | <mark style="background-color:yellow;">optional</mark> `string` address of the fifth library used.                         |
| {% endtab %}                   |                                                                                                                            |

{% tab title="Example Result" %}
{% code overflow="wrap" %}

```
{
  "message": "OK",
  "result": {
    "ABI": "[{\n\"type\":\"event\",\n\"inputs\": [{\"name\":\"a\",\"type\":\"uint256\",\"indexed\":true},{\"name\":\"b\",\"type\":\"bytes32\",\"indexed\":false}],\n\"name\":\"Event\"\n}, {\n\"type\":\"event\",\n\"inputs\": [{\"name\":\"a\",\"type\":\"uint256\",\"indexed\":true},{\"name\":\"b\",\"type\":\"bytes32\",\"indexed\":false}],\n\"name\":\"Event2\"\n}, {\n\"type\":\"function\",\n\"inputs\": [{\"name\":\"a\",\"type\":\"uint256\"}],\n\"name\":\"foo\",\n\"outputs\": []\n}]\n",
    "CompilerVersion": "v0.2.1-2016-01-30-91a6b35",
    "ContractName": "Test",
    "ImplementationAddress": "0x000000000000000000000000000000000000000e",
    "IsProxy": "true",
    "OptimizationUsed": "1",
    "SourceCode": "pragma solidity >0.4.24;\n\ncontract Test {\nconstructor() public { b = hex\"12345678901234567890123456789012\"; }\nevent Event(uint indexed a, bytes32 b);\nevent Event2(uint indexed a, bytes32 b);\nfunction foo(uint a) public { emit Event(a, b); }\nbytes32 b;\n}\n"
  },
  "status": "1"
}
```

{% endcode %}
{% endtab %}
{% endtabs %}

## Verify a contract through [Sourcify](https://sourcify.dev/)

`verify_via_sourcify`

1. if a smart contract is already verified on Sourcify, it will automatically fetch the data from the [repo](https://repo.sourcify.dev/)
2. otherwise you need to upload source files and JSON metadata file(s).

**Example:**

```
https://instance_base_url/api
 ?module=contract
 &action=verify_via_sourcify
 &addressHash={addressHash}
```

#### POST body example

```
--6e1e4c11657c62dc1e4349d024de9e28
Content-Disposition: form-data; name="addressHash"

0xb77b7443e0F32F1FEBf0BE0fBd7124D135d0a525

--6e1e4c11657c62dc1e4349d024de9e28
Content-Disposition: form-data; name="files[0]"; filename="contract.sol"
Content-Type: application/json

...Source code...

--6e1e4c11657c62dc1e4349d024de9e28
Content-Disposition: form-data; name="files[1]"; filename="metadata.json"
Content-Type: application/json

...JSON metadata...

--6e1e4c11657c62dc1e4349d024de9e28--
```

{% tabs %}
{% tab title="Params" %}

| Parameter       | Description                             |
| --------------- | --------------------------------------- |
| **addressHash** | `string` containing the address hash.   |
| files           | `array` with sources and metadata files |
| {% endtab %}    |                                         |

{% tab title="Example " %}

```
{
  "message": "OK",
  "result": {
    "ABI": "[{\n\"type\":\"event\",\n\"inputs\": [{\"name\":\"a\",\"type\":\"uint256\",\"indexed\":true},{\"name\":\"b\",\"type\":\"bytes32\",\"indexed\":false}],\n\"name\":\"Event\"\n}, {\n\"type\":\"event\",\n\"inputs\": [{\"name\":\"a\",\"type\":\"uint256\",\"indexed\":true},{\"name\":\"b\",\"type\":\"bytes32\",\"indexed\":false}],\n\"name\":\"Event2\"\n}, {\n\"type\":\"function\",\n\"inputs\": [{\"name\":\"a\",\"type\":\"uint256\"}],\n\"name\":\"foo\",\n\"outputs\": []\n}]\n",
    "CompilerVersion": "v0.2.1-2016-01-30-91a6b35",
    "ContractName": "Test",
    "ImplementationAddress": "0x000000000000000000000000000000000000000e",
    "IsProxy": "true",
    "OptimizationUsed": "1",
    "SourceCode": "pragma solidity >0.4.24;\n\ncontract Test {\nconstructor() public { b = hex\"12345678901234567890123456789012\"; }\nevent Event(uint indexed a, bytes32 b);\nevent Event2(uint indexed a, bytes32 b);\nfunction foo(uint a) public { emit Event(a, b); }\nbytes32 b;\n}\n"
  },
  "status": "1"
}
```

{% endtab %}
{% endtabs %}

## Verify a vyper contract with its source code and contract creation information

`verify_vyper_contract`

**Example**

```
https://instance_base_url/api
 ?module=contract
 &action=verify_vyper_contract
 &addressHash={addressHash}
 &name={name}
 &compilerVersion={compilerVersion}
 &contractSourceCode={contractSourceCode}
```

**curl POST example**

{% code overflow="wrap" %}

```
curl --location --request POST 'http://localhost:4000/api?module=contract&action=verify_vyper_contract' --form 'contractSourceCode="SOURCE_CODE"' --form 'name="Vyper_contract"' --form 'addressHash="0xE60B1B8bD493569a3E945be50A6c89d29a560Fa1"' --form 'compilerVersion="v0.2.12"'
```

{% endcode %}

{% tabs %}
{% tab title="First Tab" %}

| Parameter              | Description                                                |
| ---------------------- | ---------------------------------------------------------- |
| **addressHash**        | `string` containing the address hash of the contract.      |
| **name**               | `string` containing the name of the contract.              |
| **compilerVersion**    | `string` containing the compiler version for the contract. |
| **contractSourceCode** | `string` containing the source code of the contract.       |
| constructorArguments   | `string` constructor argument data provided.               |
| {% endtab %}           |                                                            |

{% tab title="Example" %}

```
{
  "message": "OK",
  "result": {
    "ABI": "[{\n\"type\":\"event\",\n\"inputs\": [{\"name\":\"a\",\"type\":\"uint256\",\"indexed\":true},{\"name\":\"b\",\"type\":\"bytes32\",\"indexed\":false}],\n\"name\":\"Event\"\n}, {\n\"type\":\"event\",\n\"inputs\": [{\"name\":\"a\",\"type\":\"uint256\",\"indexed\":true},{\"name\":\"b\",\"type\":\"bytes32\",\"indexed\":false}],\n\"name\":\"Event2\"\n}, {\n\"type\":\"function\",\n\"inputs\": [{\"name\":\"a\",\"type\":\"uint256\"}],\n\"name\":\"foo\",\n\"outputs\": []\n}]\n",
    "CompilerVersion": "v0.2.1-2016-01-30-91a6b35",
    "ContractName": "Test",
    "ImplementationAddress": "0x000000000000000000000000000000000000000e",
    "IsProxy": "true",
    "OptimizationUsed": "1",
    "SourceCode": "pragma solidity >0.4.24;\n\ncontract Test {\nconstructor() public { b = hex\"12345678901234567890123456789012\"; }\nevent Event(uint indexed a, bytes32 b);\nevent Event2(uint indexed a, bytes32 b);\nfunction foo(uint a) public { emit Event(a, b); }\nbytes32 b;\n}\n"
  },
  "status": "1"
}
```

{% endtab %}
{% endtabs %}

## Verify a contract with Standard input JSON file

`verifysourcecode`

**Example**

```
https://instance_base_url/api
 ?module=contract
 &action=verifysourcecode
 &codeformat={solidity-standard-json-input}
 &contractaddress={contractaddress}
 &contractname={contractname}
 &compilerversion={compilerversion}
 &sourceCode={sourceCode}
```

{% tabs %}
{% tab title="Params" %}

| Parameter                      | Description                                                                                                                                                                    |
| ------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ |
| **codeformat**                 | Format of sourceCode (currently only supports `solidity-standard-json-input`)                                                                                                  |
| **contractaddress**            | `string` containing the address hash of the contract.                                                                                                                          |
| **contractname**               | `string` name of the contract. It an be an empty string(""), just the contract name("ContractName"), or a filename and contract name("contracts/contract\_1.sol:ContractName") |
| **compilerversion**            | `string` containing the compiler version for the contract.                                                                                                                     |
| **sourceCode**                 | `string` standard input json                                                                                                                                                   |
| constructorArguments           | <mark style="background-color:yellow;">optional</mark> `string` constructor argument data provided.                                                                            |
| autodetectConstructorArguments | <mark style="background-color:yellow;">optional</mark> `boolean` whether or not automatically detect constructor argument.                                                     |
| {% endtab %}                   |                                                                                                                                                                                |

{% tab title="Example Result" %}

```
{
  "message": "OK",
  "result": "b080b96bd06ad1c9341c2afb7e3730311388544961acde94",
  "status": "1"
}
```

{% endtab %}
{% endtabs %}

## Return status of a verification attempt

`checkverifystatus`

{% hint style="info" %}
guid is received as a receipt from the `verifysourcecode` method.
{% endhint %}

**Example**

```
https://instance_base_url/api
 ?module=contract
 &action=checkverifystatus
 &guid={identifierString}
```

{% tabs %}
{% tab title="Params" %}

| Parameter     | Description                                       |
| ------------- | ------------------------------------------------- |
| **guid**      | `string`used for identifying verification attempt |
| {% endtab %}  |                                                   |
| {% endtabs %} |                                                   |


# Logs

?module=logs

### `https://instance_base_url/api?module=logs`

## Get Event Logs by Address and/or Topic(s)

`getLogs`

Event logs for an address and topic. Use **and/or** with the topic operator to specify topic retrieval options when adding multiple topics. Up to a maximum of 1,000 event logs.

**Example:**

```
https://instance_base_url/api
   ?module=logs
   &action=getLogs
   &fromBlock=1379224
   &toBlock=13792288
   &address=0x33990122638b9132ca29c723bdf037f1a891a70c
   &topic0=0xf63780e752c6a54a94fc52715dbc5518a3b4c3c2833d301a204226548a2a8545
   &topic1=0x72657075746174696f6e00000000000000000000000000000000000000000000
   &topic0_1_opr=or
```

*\*=required field*

{% tabs %}
{% tab title="Request Params" %}

| Parameter      | Description                                                                                                                                                                                     |
| -------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| fromBlock\*    | `integer` block number to start searching for logs. `latest` is also supported                                                                                                                  |
| toBlock\*      | <p><code>integer</code> block number to stop searching for logs. <code>latest</code> is also supported.<br><br><em>Note can be same as fromBlock if looking at logs for a single block</em></p> |
| address\*      | `string` 160-bit code used for identifying contracts. An address and/or topic is required.                                                                                                      |
| topic0\*       | `string` for first required topic.                                                                                                                                                              |
| topic1         | `string` for 2nd optional topic.                                                                                                                                                                |
| topic2         | `string` for 3rd optional topic.                                                                                                                                                                |
| topic3         | `string` for 4th optional topic.                                                                                                                                                                |
| topic0\_1\_opr | operator when topic 0 and 1 are used. Either `and` or `or`                                                                                                                                      |
| topic0\_2\_opr | operator for topic 0 and topic 2. Either `and` or `or`                                                                                                                                          |
| topic0\_3\_opr | operator for topic 0 and topic 3. Either `and` or `or`                                                                                                                                          |
| topic1\_2\_opr | operator for topic 1 and topic 2. Either `and` or `or`                                                                                                                                          |
| topic1\_3\_opr | the topic operator for topic 1 and topic 3. Either `and` or `or`                                                                                                                                |
| topic2\_3\_opr | the topic operator for topic 2 and topic 3. Either `and` or `or`                                                                                                                                |
| {% endtab %}   |                                                                                                                                                                                                 |

{% tab title="Example Result" %}

```json
{
  "message": "OK",
  "result": [
    {
      "address": "0x33990122638b9132ca29c723bdf037f1a891a70c",
      "blockNumber": "0x5c958",
      "data": "0x",
      "gasPrice": "0xba43b7400",
      "gasUsed": "0x10682",
      "logIndex": "0x",
      "timeStamp": "0x561d688c",
      "topics": [
        "0xf63780e752c6a54a94fc52715dbc5518a3b4c3c2833d301a204226548a2a8545",
        "0x72657075746174696f6e00000000000000000000000000000000000000000000",
        "0x000000000000000000000000d9b2f59f3b5c7b3c67047d2f03c3e8052470be92"
      ],
      "transactionHash": "0x0b03498648ae2da924f961dda00dc6bb0a8df15519262b7e012b7d67f4bb7e83",
      "transactionIndex": "0x"
    }
  ],
  "status": "1"
}
```

{% endtab %}
{% endtabs %}


# Stats

?module=stats

{% hint style="info" %}
Page is under construction.&#x20;
{% endhint %}

### `https://instance_base_url/api?module=stats`

## Get [ERC-20](https://github.com/ethereum/EIPs/issues/20) or [ERC-721](https://github.com/ethereum/EIPs/issues/721) token total supply by contract address.

`tokensupply`

**Example**

```
https://instance_base_url/api
   ?module=stats
   &action=tokensupply
   &contractaddress={contractAddressHash}
```

{% tabs %}
{% tab title="Request Param" %}

| Parameter       | Description                                                                                    |
| --------------- | ---------------------------------------------------------------------------------------------- |
| contractaddress | `string` containing the contract address hash - a 160-bit code used for identifying contracts. |
| {% endtab %}    |                                                                                                |

{% tab title="Example Result" %}

```json
{
  "message": "OK",
  "result": "21265524714464",
  "status": "1"
}
```

{% endtab %}
{% endtabs %}

## Get total supply in Wei from exchange

`ethsupplyexchange`

**Example:**

```
// Some code
```

{% tabs %}
{% tab title="Request Params" %}

| Parameter    | Description |
| ------------ | ----------- |
| param        | description |
| {% endtab %} |             |

{% tab title="Example Result" %}

```
// Some code
```

{% endtab %}
{% endtabs %}

## Get total supply in Wei from DB

`ethsupply`

**Example:**

```
// Some code
```

{% tabs %}
{% tab title="Request Params" %}

| Parameter    | Description |
| ------------ | ----------- |
| param        | description |
| {% endtab %} |             |

{% tab title="Example Result" %}

```
// Some code
```

{% endtab %}
{% endtabs %}

## Get total coin supply from DB minus burnt number

`coinsupply`

**Example:**

```
// Some code
```

{% tabs %}
{% tab title="Request Params" %}

| Parameter    | Description |
| ------------ | ----------- |
| param        | description |
| {% endtab %} |             |

{% tab title="Example Result" %}

```
// Some code
```

{% endtab %}
{% endtabs %}

## Get latest price of native coin in USD and BTC

`coinprice`

**Example:**

```
// Some code
```

{% tabs %}
{% tab title="Request Params" %}

| Parameter    | Description |
| ------------ | ----------- |
| param        | description |
| {% endtab %} |             |

{% tab title="Example Result" %}

```
// Some code
```

{% endtab %}
{% endtabs %}

## Get total transaction fees in Wei paid by users to validators per day

`totalfees`

**Example:**

```
// Some code
```

{% tabs %}
{% tab title="Request Params" %}

| Parameter    | Description |
| ------------ | ----------- |
| param        | description |
| {% endtab %} |             |

{% tab title="Example Result" %}

```
// Some code
```

{% endtab %}
{% endtabs %}

##


# Token

?module=token

### `https://instance_base_url/api?module=token`

## Get ERC-20 or ERC-721 token by contract address

`getToken`

Info on name, symbol, supply and type for a token contract address.

**Example**

```
https://instance_base_url/api
   ?module=token
   &action=getToken
   &contractaddress={contractaddressHash}
```

{% tabs %}
{% tab title="Request Params" %}

<table><thead><tr><th width="247.5">Parameter</th><th>Description</th></tr></thead><tbody><tr><td>contractaddress</td><td><code>string</code> containing the contract address hash - a 160-bit code used for identifying contracts.</td></tr></tbody></table>
{% endtab %}

{% tab title="Example Result" %}

```json
{
  "message": "OK",
  "result": {
    "cataloged": true,
    "contractAddress": "0x0000000000000000000000000000000000000000",
    "decimals": "18",
    "name": "Example Token",
    "symbol": "ET",
    "totalSupply": "1000000000",
    "type": "ERC-20"
  },
  "status": "1"
}
```

{% endtab %}
{% endtabs %}

## Get token holders by contract address

`getTokenHolders`

Returns an array of token holder's accounts and amounts held for a specified token contract address.

**Example**

```
https://instance_base_url/api
   ?module=token
   &action=getTokenHolders
   &contractaddress={contractaddressHash}
   &page={integer}
   &offset={integer}
```

{% tabs %}
{% tab title="Request Params" %}

<table><thead><tr><th width="186.5">Parameter</th><th>Description</th></tr></thead><tbody><tr><td>contractaddress</td><td><code>string</code>  containing the contract address hash of the ERC-20/ERC-721 token</td></tr><tr><td>page</td><td><mark style="background-color:yellow;">optional</mark> nonnegative <code>integer</code> representing the page number used for pagination. 'offset' must also be provided.</td></tr><tr><td>offset</td><td><mark style="background-color:yellow;">optional</mark> nonnegative <code>integer</code> representing the max number of records to return when paginating. 'page' must also be provided.</td></tr></tbody></table>
{% endtab %}

{% tab title="Example Result" %}

```json
{
  "message": "OK",
  "result": [
    {
      "address": "0x3887e82dbdbe8ec6db44e6298a2d48af572a3b78",
      "value": "153737849289497644937838"
    },
    {
      "address": "0xc894c5de34cb2a3615c737d1276876e44e9700a3",
      "value": "77247336418828547887499"
    }
  ],
  "status": "1"
}
```

{% endtab %}
{% endtabs %}

## Get bridged tokens list

`bridgedTokenList`

Returns an array of bridged token information (uses native bridge application and only returns when applicable - depends on implementation).

**Example**

```
https://instance_base_url/api
   ?module=token
   &action=bridgedTokenList
   &chainid={chainid}
   &page={integer}
   &offset={integer}
```

{% tabs %}
{% tab title="Request Params" %}

<table><thead><tr><th width="186.5">Parameter</th><th>Description</th></tr></thead><tbody><tr><td>chainID</td><td>nonnegative <code>integer</code> that represents the chain id where the original token exists.</td></tr><tr><td>page</td><td><mark style="background-color:yellow;">optional</mark> nonnegative <code>integer</code> representing the page number used for pagination. 'offset' must also be provided.</td></tr><tr><td>offset</td><td><mark style="background-color:yellow;">optional</mark> nonnegative <code>integer</code> representing the max number of records to return when paginating. 'page' must also be provided.</td></tr></tbody></table>
{% endtab %}
{% endtabs %}


# Transaction

?module=transaction

### `https://instance_base_url/api?module=transaction`

## Get transaction info

`gettxinfo`

Information related to a specified transaction. Includes:

* blockNumber
* confirmations
* from
* gasLimit (in wei)
* gasPrice (in wei)
* gasUsed
* hash
* input
* logs (array)
* revert reason
* success
* timeStamp
* to
* value (in wei)&#x20;

**Example**

```
https://instance_base_url/api
   ?module=transaction
   &action=gettxinfo
   &txhash={transactionHash}
```

{% tabs %}
{% tab title="Request Params" %}

| Parameter    | Description                                                                                                                      |
| ------------ | -------------------------------------------------------------------------------------------------------------------------------- |
| txhash       | `string` containing the transaction hash                                                                                         |
| index        | <mark style="background-color:yellow;">optional</mark>  nonnegative `integer` that represents the log index used for pagination. |
| {% endtab %} |                                                                                                                                  |

{% tab title="Example Result" %}

```
{
  "result": {
    "revertReason": "No credit of that type",
    "blockNumber": "3",
    "confirmations": "0",
    "from": "0x000000000000000000000000000000000000000c",
    "gasLimit": "91966",
    "gasPrice": "100000",
    "gasUsed": "95123",
    "hash": "0x0000000000000000000000000000000000000000000000000000000000000004",
    "input": "0x04",
    "logs": [
      {
        "address": "0x000000000000000000000000000000000000000e",
        "data": "0x00",
        "topics": [
          "First Topic",
          "Second Topic",
          "Third Topic",
          "Fourth Topic"
        ]
      }
    ],
    "success": true,
    "timeStamp": "1541018182",
    "to": "0x000000000000000000000000000000000000000d",
    "value": "67612"
  },
  "status": "1"
}
```

{% endtab %}
{% endtabs %}

## Get transaction receipt status

`gettxreceiptstatus`&#x20;

Also available through a GraphQL 'transaction' query. `Status` field return:

* `0` = failed transaction
* `1` = successful transaction

**Example**

```
https://instance_base_url/api
   ?module=transaction
   &action=gettxreceiptstatus
   &txhash={transactionHash}
```

{% tabs %}
{% tab title="Request Params" %}

| Parameter    | Description                              |
| ------------ | ---------------------------------------- |
| txhash       | `string` containing the transaction hash |
| {% endtab %} |                                          |

{% tab title="Example Result" %}

```
{
  "message": "OK",
  "result": {
    "status": "1"
  },
  "status": "1"
}
```

{% endtab %}
{% endtabs %}

## Get error status and message

`getstatus`&#x20;

Also available through a GraphQL 'transaction' query. Includes the following:

* errDescription: string with error message
* isError
  * 0 = pass, no error
  * 1 = error

**Example**

```
https://instance_base_url/api
   ?module=transaction
   &action=getstatus
   &txhash={transactionHash}
```

{% tabs %}
{% tab title="Request Params" %}

| Parameter    | Description                              |
| ------------ | ---------------------------------------- |
| txhash       | `string` containing the transaction hash |
| {% endtab %} |                                          |

{% tab title="Example Result" %}

```
{
  "message": "OK",
  "result": {
    "errDescription": "Out of gas",
    "isError": "1"
  },
  "status": "1"
}
```

{% endtab %}
{% endtabs %}


# GraphQL

## **What is GraphQL**

GraphQL is an open-source data query and manipulation language for APIs, and a runtime for fulfilling queries with existing data. It provides an efficient, powerful and flexible approach to developing web APIs. It allows clients to define the structure of the data required, and exactly the same structure of the data is returned from the server, therefore preventing excessively large amounts of data from being returned.

Key concepts of the GraphQL query language are:

* Hierarchical
* Strongly typed
* Client-specified queries

Advantages of GraphQL:

* Declarative integration on client (what data/operations do I need)
* A standard way to expose data and operations
* Support for real-time data (with subscriptions)

## **Query types**

There are three main query types in GraphQL schema:

1\) **Query:** fetch data

```
query {
  allPosts {
    description
    text
  }
}
```

2\) **Mutation:** change data.

```
   mutation {
     updatePost(id: 1, text: "text") {
       text
     }
   }
```

1. **Subscription:** subscribe to real-time data.

```
subscription {
  newPost(category: [1]) {
    description
    text
  }
}
```

## **Access GraphQL API**

To access Blockscout GraphQL interface you can use GraphiQL - in-browser IDE for exploring GraphQL. It's built in to U2U Explorer.

From the `APIs` dropdown menu choose `GraphQL.` Depending on the implementation you may also find the link in the page footer.

<figure><img src="/files/W8M5pt0CleTtejMUADKR" alt=""><figcaption><p>Access GraphQL from the side menu</p></figcaption></figure>

You can also use your favorite http client:

```
curl 'https://u2uscan.xyz/graphiql'
  -H 'Authorization: Bearer YOUR_AUTH_TOKEN'
  -d '{"query":""{transaction(hash:\"0x69e3923eef50eada197c3336d546936d0c994211492c9f947a24c02827568f9f\"){blockNumbertoAddressHashfromAddressHashcreatedContractAddressHashvaluestatusnoncehasherrorgasgasPricegasUsedcumulativeGasUsedidindexinputrsv}}""}'
```

## **Queries**

Blockscout's GraphQL API provides queries and a subscription. You can view them in the GraphQL interface in the `Docs` menu. Example Queries:

| Query                                           | Description                 | Example                                                                                                                                  |
| ----------------------------------------------- | --------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------- |
| address(hash: AddressHash!): Address            | Gets an address by hash     | {address(hash: "0x1fddEc96688e0538A316C64dcFd211c491ECf0d8") {hash, contractCode} }                                                      |
| addresses (hashes: \[AddressHash!]): \[Address] | Gets addresses by hashes    | {addresses(hashes: \["0x1fddEc96688e0538A316C64dcFd211c491ECf0d8", "0x3948c17c0f45017064858b8352580267a85a762c"]) {hash, contractCode} } |
| block(number: Int!): Block                      | Gets a block by number      | {block(number: 1) {parentHash, size, nonce}}                                                                                             |
| transaction (hash: FullHash!): Transaction      | Gets a transaction by hash. | {transaction(hash: "0xc391da8f433b3bea0b3eb45da40fdd194c7a0e07d1b5ad656bf98940f80a6cf6") {input, gasUsed}}                               |

<figure><img src="/files/4xeuecTu0zuyXwIjyOuX" alt=""><figcaption><p>Queries schema can be found by clicking on the Docs tab</p></figcaption></figure>

### Example Query to retrieve transactions for a specific address

```
{
    transaction(
      hash: "0x..."
    ) {
      hash
      blockNumber
      value
      gasUsed
    }
  }
```

Note that transactions can accept the following arguments:

* first
* after
* before


# Explorer RPC API

In addition to the custom [RPC endpoints documented here](/services/explorer/explorer-api), the ETH RPC API supports 3 methods in the exact format specified for Ethereum nodes, see the [Ethereum JSON-RPC Specification](https://ethereum.github.io/execution-apis/api-documentation/) for more details.&#x20;

These methods are provided for your convenience. In general, custom RPC methods are recommended.&#x20;

* eth\_blockNumber
* eth\_getBalance
* eth\_getLogs

In the following examples we use the Ethereum mainnet with the base instance url  `https://u2uscan.xyz`. When sending a request add `/api/eth-rpc` to the end of the base url.

## eth\_blockNumber

Returns the latest block number in the chain in hexidecimal format. No params are needed.\
Type: <mark style="background-color:green;">POST</mark>

**Example**

<pre class="language-json" data-overflow="wrap"><code class="lang-json">// Request
<strong>curl -H "content-type: application/json" -X POST --data '{"id":0,"jsonrpc":"2.0","method":"eth_blockNumber","params":[]}' https://u2uscan.xyz/api/eth-rpc
</strong>// Response
{
  "jsonrpc": "2.0",
  "result": "0xfa0b0e",
  "id": 0
}
</code></pre>

## eth\_getBalance&#x20;

Returns the balance of a given address in wei. Note the `earliest` parameter does not work as expected because genesis block balances are not currently imported. Parameters are required.

**Required Parameters**

<table><thead><tr><th width="130.5"></th><th></th></tr></thead><tbody><tr><td>Type</td><td><mark style="background-color:green;">POST</mark></td></tr><tr><td>Data (string)</td><td>20 Byte address to check balance</td></tr><tr><td>Quantity or Tag (string)</td><td>Integer value of a block number, or a tag "latest" for the most recent block.</td></tr></tbody></table>

**Example**&#x20;

{% code overflow="wrap" %}

```json
// Request
curl -H "content-type: application/json" -X POST --data '{"id":0,"jsonrpc":"2.0","method":"eth_getBalance","params":["0xd8dA6BF26964aF9D7eEd9e03E53415D37aA96045","latest"]}' https://u2uscan.xyz/api/eth-rpc
// Response
{
  "jsonrpc": "2.0",
  "result": "0x1d863bf76508104fb", //34039260923474019579
  "id": 0
}

```

{% endcode %}

## eth\_getLogs

Returns an array of logs matching a specified filter object.  Params are optional based on data you want to receive. From more information, see this [post on eth\_getLogs](https://medium.com/alchemy-api/deep-dive-into-eth-getlogs-5faf6a66fd81).

Note: Never returns more than 1000 log entries. You can use pagination options to request the next page. Pagination options params: {"logIndex": "3D", "blockNumber": "6423AC"} which include parameters from the last log received from the previous request. These three parameters are required for pagination.

**Parameters**

<table><thead><tr><th width="181.5">Type</th><th>POST</th></tr></thead><tbody><tr><td><code>address</code><br>(string, array)</td><td>20Byte contract address or list of addresses to collect logs from.</td></tr><tr><td><code>fromBlock</code> <br>(Quantity/Tag)</td><td>Integer block number, <code>"latest"</code> (default) for the last mined block  or <code>"pending"</code>, <code>"earliest"</code> for not yet mined transactions.</td></tr><tr><td><code>toBlock</code><br>(Quantity/Tag)</td><td> Integer block number, <code>"latest"</code> (default) for the last mined block  or <code>"pending"</code>, <code>"earliest"</code> for not yet mined transactions.</td></tr><tr><td><code>topics</code> <br>(string, array)</td><td>Array of 32 Byte <code>DATA</code> topics. Topics are order-dependent. Each topic can also be an array of DATA with "or" options</td></tr><tr><td><code>paging_options</code></td><td><code>logIndex</code> and <code>blockNumber</code> explained above.</td></tr></tbody></table>

**Example Query**

{% code overflow="wrap" %}

```
//Request
curl -H "content-type: application/json" -X POST --data '{"id":0,"jsonrpc":"2.0","method":"eth_getLogs","params":[{"address":"0xc78Be425090Dbd437532594D12267C5934Cc6c6f","paging_options":{"logIndex":"3D","blockNumber":"6423AC"},"fromBlock":"earliest","toBlock":"latest","topics":["0xddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef"]}]}' https://u2uscan.xyz/api/eth-rpc
```

{% endcode %}

{% code overflow="wrap" %}

```
//Response (end)
{"address":"0xc78be425090dbd437532594d12267c5934cc6c6f","blockHash":"0x574755e06bf0cec6d59a8cc7db183d4545a90242d03d5bc3806681277356cf4b","blockNumber":"79D4CF","data":"0x000000000000000000000000000000000000000000000c81c6f8fe7064224e6e","logIndex":"66","removed":false,"topics":["0xddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef","0x0000000000000000000000000000000000000000000000000000000000000000","0x00000000000000000000000078c04412a6eb2f524ccf50b5f3d863a82e2f8d6f"],"transactionHash":"0xd35fe29c81484258f38b4848a4d44f54f3dc0b9b3d10ad094b8cd5f3a4815e64","transactionIndex":109,"transactionLogIndex":102,"type":"mined"},{"address":"0xc78be425090dbd437532594d12267c5934cc6c6f","blockHash":"0xcb58a082f58bea43dfb6be8addf97c915190175b9f0f0abc1e05bfd02573f010","blockNumber":"7BA949","data":"0x000000000000000000000000000000000000000000000c81c6272987dea5867a","logIndex":"56","removed":false,"topics":["0xddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef","0x0000000000000000000000000000000000000000000000000000000000000000","0x0000000000000000000000001082e1c4a9c9f946ba102667a14f206c0f81e147"],"transactionHash":"0xd12770e7a1dfa759f6a645981e4bd1d75d2ed131b52565e436bce90b5b39f137","transactionIndex":137,"transactionLogIndex":86,"type":"mined"}],"id":0}
```

{% endcode %}


# Smart Contract Verification

Once verified, a smart contract or token contract's source code becomes publicly available and verifiable. This creates transparency and trust. Plus, it's easy to do!

{% hint style="info" %}
👷🏻‍♂️ If preferred you can choose the following methods to verify directly from your Hardhat dev environment.&#x20;

* [Via explorer](/services/explorer/smart-contract-verification/via-explorer)
* [Via hardhat plugin](/services/explorer/smart-contract-verification/via-hardhat-plugin)
  {% endhint %}


# Via explorer

You could directly use U2U Chain blockchain explorer to verify your contract's source code at u2uscan.xyz.

## Contract details

At the contract details page, select **Contract** tab. If the contract has not verified, you will see the **Verify & publish** button as in below example:

<figure><img src="/files/FOLfglg7JZ9ue7T1vyxB" alt=""><figcaption><p>Contract details page, tab "Contract" - Click the "Verify &#x26; publish" button</p></figcaption></figure>

Click on **Verify & publish** button to start verifying your contract source code. There are multiple methods for verification using the blockchain explorer UI - all are cataloged below:

<figure><img src="/files/00IapzEIzG1wv85ujQf2" alt=""><figcaption></figcaption></figure>

## Verification methods

* [Solidity (Flattened source code)](#solidity-flattened-source-code)
* [Solidity (Standard JSON input)](#solidity-standard-json-input)
* [Solidity (Multi-part files)](#solidity-multi-part-files)

### Solidity (Flattened source code)

<figure><img src="/files/py3GVhTU2qwCda01LI0o" alt=""><figcaption></figcaption></figure>

1. **Contract Address:** The `0x` address supplied on contract creation.
2. **Contract Name:** Name of the class whose constructor was called in the .sol file. For example, in `contract MyContract {..` **MyContract** is the contract name.
3. **Include Nightly Builds**: Yes if you want to show nightly builds.
4. **Compiler:** derived from the first line in the contract `pragma solidity X.X.X`. Use the corresponding compiler version rather than the nightly build.
5. **EVM Version:** See [evm-version-information](https://docs.blockscout.com/for-developers/evm-version-information).
6. **Optimization enabled:** If you enabled optimization during compilation, check yes. 200 is the Solidity Compiler default value. Only change if you changed this value while compiling.
7. **Enter the Solidity Contract Code:** You may need to flatten your solidity code if it utilizes a library or inherits dependencies from another contract. We recommend the or the .
8. **Try to fetch constructor arguments automatically**: If similar contracts exist these may be available.
9. **ABI-encoded Constructor Arguments:** .
10. **Add Contract Libraries:** Enter the name and 0x address for any required libraries called in the called in the .sol file.
11. Click the **Verify & publish** button.

If all goes well, you will see a checkmark (✅) next to **Contract** in the code tab, and an additional tab called **Read Contract**. The contract name will now appear in explorer with any transactions related to your contract.

### Solidity (Standard JSON input)

<figure><img src="/files/ZLiJHLRm9OQh8lrsF1t1" alt=""><figcaption></figcaption></figure>

1. **Contract Name**. There are several options:
   1. Leave blank.
   2. Enter contract name: `MyContract`.
   3. Enter path to the contract and it's name: `path/to/file.sol:MyContract` (path should match what is written in your JSON file).
2. **Include nightly builds**. You can select depending on your compiler.
3. **Compiler.** Choose the compiler version used to compile your smart contract.
4. **Standard Input JSON.** Attach your Standard Input JSON file. File should follows solidity and all the sources must be in Liternal Content format, not an URL.

After filling the form click the **Verify & publish** button and wait for the response.

### Solidity (Multi-part files)

<figure><img src="/files/pwU3nAxyVUp8vDcPfAT9" alt=""><figcaption></figcaption></figure>

1. **Include nightly builds**: Yes if you want to show nightly builds.
2. **Compiler:** derived from the first line in the contract `pragma solidity X.X.X`. Use the corresponding compiler version rather than the nightly build.
3. **EVM Version:** See [evm-version-information](https://docs.blockscout.com/for-developers/evm-version-information).
4. **Optimization enabled:** If you enabled optimization during compilation, check yes. 200 is the Solidity Compiler default value. Only change if you changed this value while compiling.
5. **Sources \*.sol or \*.yul files**: Select your contract files.
6. **Add contract libraries:** Enter the name and 0x address for any required libraries called in the called in the .sol file.

## Troubleshooting

If you receive the dreaded `There was an error compiling your contract` message this means the bytecode doesn't match the supplied sourcecode. Unfortunately, there are many reasons this may be the case. Here are a few things to try:

1\. Double check the compiler version is correct.

{% hint style="info" %}
Check all version digits - for example 0.5.1 is different from 0.5.10
{% endhint %}

2\) Check that an extra space has not been added to the end of the contract. When pasting in, an extra space may be added. Delete this and attempt to recompile.

3\) Copy, paste and verify your source code in Remix. You may find some exceptions here.


# Via hardhat plugin

Hardhat is a full-featured development environment for contract compilation, deployment and verification. The Hardhat Etherscan plugin supports contract verification on U2U Chain blockchain explorer.

## Sample Hardhat Project

### **1) Install Hardhat**

If you are starting from scratch, create an npm project by going to an empty folder (npm version 7 or higher is recommended):

```
npm init -y
```

Once your project is ready:

**npm instructions**

```
npm install --save-dev hardhat
```

### **2) Create a project**

Run `npx hardhat init` in your project folder and follow the instructions to create ([more info here](https://hardhat.org/getting-started/#quick-start)).

If you select *Create a Typescript project*, a simple project creation wizard will ask you some questions, please proceed with all "y" (yes).&#x20;

After that, the wizard will create a sample project with some directories and files and install the necessary dependencies. The initialized project has the following structure:

```
contracts/
scripts/
test/
hardhat.config.ts
```

## Config File

Your basic [Hardhat config file](https://hardhat.org/config/) (`hardhat.config.js` or `hardhat.config.ts`) will be setup to support the network you are working on.

Here we add an RPC url without an API key, however some value is still required. You can use any arbitrary string. [More info](https://hardhat.org/plugins/nomiclabs-hardhat-etherscan.html#multiple-api-keys-and-alternative-block-explorers).

```
import { HardhatUserConfig } from "hardhat/config";
import "@nomicfoundation/hardhat-toolbox";

const config: HardhatUserConfig = {
  solidity: "0.8.19",
  networks: {
    solaris: {
      url: 'https://rpc-mainnet.uniultra.xyz/',
      accounts: ["YOUR_PRIVATE_KEY"], // it should start with 0x...
    },
    nebulas: {
      url: 'https://rpc-nebulas-testnet.uniultra.xyz/',
      accounts: ["YOUR_PRIVATE_KEY"], // it should start with 0x...
    }
  },
  etherscan: {
    apiKey: {
      solaris: "abc", // arbitrary string
      nebulas: "abc", // arbitrary string
    },
    customChains: [
      {
        network: "solaris",
        chainId: 39,
        urls: {
          apiURL: "https://u2uscan.xyz/api",
          browserURL: "https://u2uscan.xyz"
        }
      },
      {
        network: "nebulas",
        chainId: 2484,
        urls: {
          apiURL: "https://testnet.u2uscan.xyz/api",
          browserURL: "https://testnet.u2uscan.xyz"
        }
      },
    ]
  }
};

export default config;


```

## Deploy and Verify

### Deploy

{% code overflow="wrap" %}

```
> npx hardhat run scripts/deploy.ts --network solaris

# Contract deployed to: 0x8D51395C76C34d0e11178c1F7EE3219B4b958e30
```

{% endcode %}

### Verify

You can include constructor arguments with the verify task.

{% code overflow="wrap" %}

```
npx hardhat verify --network solaris DEPLOYED_CONTRACT_ADDRESS [ARG_1 ARG_2 ...]
```

{% endcode %}

In that:

* `DEPLOYED_CONTRACT_ADDRESS`: your deployed contract address
* `[ARG_1 ARG_2 ...]`: arguments that have been passed to the constructor or initialize function. More detail please see:&#x20;

Back to our sample project, you can take a look at contract verification:

{% code overflow="wrap" %}

```bash
> npx hardhat verify --network solaris 0x8D51395C76C34d0e11178c1F7EE3219B4b958e30 1000000000000000

Successfully submitted source code for contract
contracts/Lock.sol:Lock at 0x8D51395C76C34d0e11178c1F7EE3219B4b958e30
for verification on the block explorer. Waiting for verification result...

Successfully verified contract Lock on the block explorer.
https://u2uscan.xyz/address/0x8D51395C76C34d0e11178c1F7EE3219B4b958e30?tab=contract
```

{% endcode %}

After the task is successfully executed, you'll see a link to the publicly verified code of your contract.

## Resources

Read more: <https://hardhat.org/hardhat-runner/docs/guides/verifying>


# Wallets


# Metamask

### Installing and setting up MetaMask <a href="#installing-and-setting-up-metamask" id="installing-and-setting-up-metamask"></a>

MetaMask can be downloaded on Chrome and Firefox, or on iOS and Android if you’re a mobile user. For the purposes of this tutorial, we’ll use the Firefox version, but the instructions will be more or less the same for every platform.

Firstly, you’ll want to head over to the MetaMask [Download page](https://metamask.io/download.html). From there, select whichever platform you’re using, and follow the steps to install it on your device. Easy!

Next, follow along with the setup specified by the app. Go ahead and click Create a Wallet. Write down the backup [seed phrase](https://academy.binance.com/en/glossary/seed-phrase) somewhere secret (preferably not on an Internet-connected device). Without this phrase, your funds can’t be recovered if your device is damaged or lost. Confirm that you’ve written them down on the next page.

And that’s it! You should now see your wallet, ready to send and receive funds.

\
**Configuring the wallet**

<figure><img src="/files/ErFgri8UN4mj4a2w0TQP" alt=""><figcaption></figcaption></figure>

You might notice straight away that we’re still dealing with an [Ethereum](https://academy.binance.com/en/articles/what-is-ethereum) wallet. At best, this won’t work with U2U Network dApps. At worst, **you could lose funds by sending them to addresses you can’t actually use**.

Let’s change that. We want to access the **Settings** to point the wallet towards BNB Smart Chain nodes.

<br>

**On the Settings page, we want to locate the Networks menu.**<br>

<figure><img src="/files/i8qkqQ5gQykg9PFxiHoX" alt=""><figcaption></figcaption></figure>

We want to click **Add Network** in the top-right corner to **manually add the U2U Network** one – it doesn’t come packaged with MetaMask. It’s important to note that there are two networks we can use here: the testnet or the mainnet. Below are the parameters to fill in for each.

### Mainnet (This is the one you are probably looking for) <a href="#mainnet-this-is-the-one-you-are-probably-looking-for" id="mainnet-this-is-the-one-you-are-probably-looking-for"></a>

**Network Name:** U2U Solaris Mainnet

**New RPC URL:** <https://rpc-mainnet.u2u.xyz>

**ChainID:** 39

**Symbol:** U2U

**Block Explorer URL:** <https://u2uscan.xyz>

### Testnet <a href="#testnet" id="testnet"></a>

**Network Name:** U2U Nebulas Testnet

**New RPC URL:** <https://rpc-nebulas-testnet.u2u.xyz>

**ChainID:** 2484

**Symbol:** U2U

**Block Explorer URL:** <https://testnet.u2uscan.xyz>

<br>


# Wallet Connect

Connecting to U2U dApps using WalletConnect is different for mobile devices and computers. However, both are relatively simple and do not require much time.

WalletConnect can be used with many popular wallets in the market, including the U2U Wallet. The  U2U Wallet can be downloaded at: <https://wallet.uniultra.xyz/>

### 1. Connect to U2U dApp using Wallet Connect

<figure><img src="/files/ziCyWH1SBSclTQSTeOc8" alt="" width="266"><figcaption></figcaption></figure>

We will choose which wallet we want to using to connect with the dApp through Wallet Connect interface, in this case is Coinbase Wallet.

### 2. Confirm Connection after choose Wallet

<figure><img src="/files/lguo1Vxmqbq2yxPJh8RI" alt="" width="274"><figcaption></figcaption></figure>

### 3. dApp Successful Connect Wallet

&#x20;

<figure><img src="/files/VQD2QkCFU5LffCBwdMPZ" alt="" width="333"><figcaption></figcaption></figure>


# Coinbase Wallet

### 1. Link U2U Wallet to Coinbase Wallet <a href="#id-1-create-an-avalanche-wallet" id="id-1-create-an-avalanche-wallet"></a>

{% hint style="info" %}
Feature is under construction.&#x20;
{% endhint %}

### 2. Connect Coinbase Wallet to U2U dApp <a href="#id-1-create-an-avalanche-wallet" id="id-1-create-an-avalanche-wallet"></a>

#### Confirm Connect U2U dApp and Coinbase Wallet <a href="#id-1-create-an-avalanche-wallet" id="id-1-create-an-avalanche-wallet"></a>

<figure><img src="/files/jebUJKcZYQwHj7yPHZ34" alt="" width="276"><figcaption><p>Allow U2U dApp Connect to Coinbase Wallet</p></figcaption></figure>

#### Confirm Message From dApp <a href="#id-1-create-an-avalanche-wallet" id="id-1-create-an-avalanche-wallet"></a>

<figure><img src="/files/MbcelYKijRVgklqXQgME" alt="" width="271"><figcaption><p>Coinbase Wallet Require To Sign</p></figcaption></figure>


# U2U Super App

## Create New Wallet

**Step 1** : Create New Wallet

<figure><img src="/files/c9NhZmqmvLKuI5wTLL2g" alt="" width="289"><figcaption><p>Super App Welcome Display</p></figcaption></figure>

**Step 2** : Setup Users Pin Code with 6 digits

<figure><img src="/files/bFHxYk6grIVn7U0I6YIy" alt="" width="289"><figcaption><p>6 Digits Pin Code</p></figcaption></figure>

**Step 3** : Confirm Again Pin Code

<figure><img src="/files/VSS12lI2tPJKsNP7DmX2" alt="" width="288"><figcaption><p>Confirm Again Users Pin Code</p></figcaption></figure>

**Step 4** : Save Recovery Phase

<figure><img src="/files/xBZFLQURS3uWx48hXjmC" alt="" width="290"><figcaption><p>Save Recovery Phase</p></figcaption></figure>

**Step 5** : Enjoy storing your wallet safe and convenience.

<figure><img src="/files/YBnLWoShGbRAXA9ZrQtk" alt="" width="290"><figcaption><p>U2U Super App Display</p></figcaption></figure>


# Policy

Your privacy is of utmost importance to us. It is our policy to respect your privacy and comply with any applicable law and regulation regarding any personal information we may collect about you, including across our website, <https://wallet.uniultra.xyz/>, and other sites we own and operate as well as mobile applications we offer. Wherever possible, we have designed our website so that you may navigate and use our website without having to provide Personal Data.This Privacy Policy describes how we, as a controller, collect, use and share your personal data. It applies to personal data you voluntarily provide to us, or is automatically collected by us.In this policy, "we", "us" and "our" refers to Unicorn Ultra Foundation a legal entity incorporated in Panama. Any data protection related questions you might have about how we handle your personal dataIn this Policy, “personal data” means any information relating to you as an identified or identifiable natural person (“Data Subject”); an identifiable natural person is one who can be identified, directly or indirectly, in particular by reference to an identifier such as a name, an online identifier or to one or more factors specific to your physical, physiological, genetic, mental, economic, cultural or social identity.In this Policy, “processing” means any operation or set of operations which is performed on personal data (as defined in this Privacy Policy) or on sets of personal data, whether or not by automated means, such as collection, recording, organization, structuring, storage, adaptation or alteration, retrieval, consultation, use, disclosure by transmission, dissemination or otherwise making available, alignment or combination, restriction, erasure or destruction.

**1. Glossary**

What do some of the capitalized terms mean in this policy?

1. “Blockchain” means a mathematically secured consensus ledger such as the Ethereum Virtual Machine, an Ethereum Virtual Machine compatible validation mechanism, or other decentralized validation mechanisms.
2. “Transaction” means a change to the data set through a new entry in the continuous Blockchain.
3. “Smart Contract” is a piece of source code deployed as an application on the Blockchain which can be executed, including self-execution of Transactions as well as execution triggered by 3rd parties.
4. “Token” is a digital asset transferred in a Transaction, including ETH, ERC20, ERC721 and ERC1155 tokens.
5. “Wallet” is a cryptographic storage solution permitting you to store cryptographic assets by correlation of a (i) Public Key and (ii) a Private Key or a Smart Contract to receive, manage and send Tokens.
6. “Recovery Phrase” is a series of secret words used to generate one or more Private Keys and derived Public Keys.
7. “Public Key” is a unique sequence of numbers and letters within the Blockchain to distinguish the network participants from each other.
8. “Private Key” is a unique sequence of numbers and/or letters required to initiate a Blockchain Transaction and should only be known by the legal owner of the Wallet.
9. “Safe Account” is a modular, self-custodial (i.e. not supervised by us) smart contract-based multi-signature Wallet.
10. “Safe Account Transaction” is a Transaction of a Safe Account, authorized by a user, typically via their Wallet.
11. “Profile” means the Public Key and user provided, human readable label stored locally on the user's device.

**2. Your information and the Blockchain**

Blockchains, also known as distributed ledger technology (or simply ‘DLT’), are made up of digitally recorded data in a chain of packages called ‘blocks’. The manner in which these blocks are linked is chronological, meaning that the data is very difficult to alter once recorded. Since the ledger may be distributed all over the world (across several ‘nodes’ which usually replicate the ledger) this means there is no single person making decisions or otherwise administering the system (such as an operator of a cloud computing system), and that there is no centralized place where it is located either.

Accordingly, by design, records of a Blockchain cannot be changed or deleted and are said to be ‘immutable’. This may affect your ability to exercise your rights such as your right to erasure (‘right to be forgotten’), or your rights to object or restrict processing of your personal data. Data on the Blockchain cannot be erased and cannot be changed. Although smart contracts may be used to revoke certain access rights, and some content may be made invisible to others, it is not deleted.

In certain circumstances, in order to comply with our contractual obligations to you (such as delivery of Tokens) it will be necessary to write certain personal data, such as your Wallet address, onto the Blockchain; this is done through a smart contract and requires you to execute such transactions using your Wallet’s Private Key.

In most cases ultimate decisions to (i) transact on the Blockchain using your Wallet, as well as (ii) share the Public Key relating to your Wallet with anyone (including us) rests with you.

IF YOU WANT TO ENSURE YOUR PRIVACY RIGHTS ARE NOT AFFECTED IN ANY WAY, YOU SHOULD NOT TRANSACT ON BLOCKCHAINS AS CERTAIN RIGHTS MAY NOT BE FULLY AVAILABLE OR EXERCISABLE BY YOU OR US DUE TO THE TECHNOLOGICAL INFRASTRUCTURE OF THE BLOCKCHAIN. IN PARTICULAR THE BLOCKCHAIN IS AVAILABLE TO THE PUBLIC AND ANY PERSONAL DATA SHARED ON THE BLOCKCHAIN WILL BECOME PUBLICLY AVAILABLE

#### 3. How We Use Personal Data <a href="#id-3" id="id-3"></a>

**3.1. When visiting our website and using U2U Super App**

When visiting our website or using U2U Super App, we may collect and process personal data. The data will be stored in different instances

1. We connect the Wallet to the web app to identify the user via their public Wallet address. For this purpose we process:
   1. public Wallet address and
   2. WalletConnect connection data
2. When you create a new Safe Account we process the following data to compose a Transaction based on your entered data to be approved by your Wallet:
   1. your public Wallet address,
   2. account balance,
   3. smart contract address of the Safe Account,
   4. addresses of externally owned accounts and
   5. user activity

The legal base for all these activities is the performance of the contract we have with you (GDPR Art.6.1b).

THE DATA WILL BE STORED ON THE BLOCKCHAIN. GIVEN THE TECHNOLOGICAL DESIGN OF THE BLOCKCHAIN, AS EXPLAINED IN SECTION 2, THIS DATA WILL BECOME PUBLIC AND IT WILL NOT LIKELY BE POSSIBLE TO DELETE OR CHANGE THE DATA AT ANY GIVEN TIME.

**3.2. Tracking**

3.2.1 We may store the following personal data to analyze your behavior:

1. IP Address,
2. session tracking,
3. user behavior,
4. wallet type,
5. device and browser user agent,
6. user consent,
7. operating system,
8. referrers,
9. user behavior: subpage, duration, and revisit, the date and time of access,

This data may be processed in order to improve the product and user experience.

The lawful basis for this processing is your consent (GDPR Art.6.1a) when agreeing to accept cookies.

3.2.2 We conduct technical monitoring of your activity on the platform in order to ensure availability, integrity and robustness of the service. For this purpose we process your:

1. IP addresses,
2. meta and communication data,
3. website access and
4. log data

The lawful basis for this processing is our legitimate interest (GDPR Art.6.1f) in ensuring the correctness of the service.

**3.3. When Participating in User Experience Research (UXR)**

When you participate in our user experience research we may collect and process some personal data. This data may include:

1. your name
2. your email
3. your phone type
4. your occupation
5. range of managed funds

In addition, we may take a recording of you while testing U2U Super App for internal and external use. The basis for this collection and processing is our legitimate business interest in monitoring and improving our services.

The lawful basis for this processing is your consent as provided before participating in user experience research.

**3.4 Other uses of your Personal Data**

We may process any of your Personal Data where it is necessary to establish, exercise, or defend legal claims. The legal basis for this is our legitimate interests, namely the protection and assertion of our legal rights, your legal rights and the legal rights of others.

Further, we may process your Personal data where such processing is necessary in order for us to comply with a legal obligation to which we are subject. The legal basis for this processing is our legitimate interests, namely the protection and assertion of our legal rights.

#### 4. Use of Third Party Applications <a href="#id-4" id="id-4"></a>

**4.1. Blockchain**

When using Safe Accounts your smart contract address, Safe Account Transactions, addresses of signer accounts and ETH balances and token balances will be stored on the Blockchain. See section 2 of this Policy

THE INFORMATION WILL BE DISPLAYED PERMANENTLY AND PUBLIC, THIS IS PART OF THE NATURE OF THE BLOCKCHAIN. IF YOU ARE NEW TO THIS FIELD, WE HIGHLY RECOMMEND INFORMING YOURSELF ABOUT THE BLOCKCHAIN TECHNOLOGY BEFORE USING OUR SERVICES.

**4.2. Google Firebase**

We use the following [Google Firebase](https://firebase.google.com/) services:

* Firebase Cloud Messaging: Provide updates to the user about changes in the mobile apps via push notifications.
* Firebase remote config: Inform users about, recommend or force user to update their mobile app or enabling/disabling certain app features. These settings are global for all users, no personalization is happening.
* Firebase crash reporting: Report errors and crashes to improve product and user experience.

**4.3. WalletConnect**

[WalletConnect](https://walletconnect.com/) is used to connect wallets to dapps using end-to-end encryption by scanning a QR code. We do not store any information collected by WalletConnect.

#### 5. Sharing Your Personal Data <a href="#id-5" id="id-5"></a>

We may pass your information to our Business Partners, administration centers, third party service providers, agents, subcontractors and other associated organizations for the purposes of completing tasks and providing our services to you.

In addition, when we use any other third-party service providers, we will disclose only the personal information that is necessary to deliver the service required and we will ensure that they keep your information secure and not use it for their own direct marketing purposes. In addition, we may transfer your personal information to a third party as part of a sale of some, or all, of our business and assets or as part of any business restructuring or reorganization, or if we are under a duty to disclose or share your personal data in order to comply with any legal obligation. However, we will take steps to ensure that your privacy rights continue to be protected.

#### 6. Existence of Automated Decision-making <a href="#id-6" id="id-6"></a>

We do not use automatic decision-making or profiling when processing Personal Data.

#### 7. Data Security <a href="#id-7" id="id-7"></a>

We have put in place appropriate security measures to prevent your personal data from being accidentally lost, used or accessed in an unauthorized way, altered or disclosed. In addition, we limit access to your personal data to those employees, agents, contractors and other third parties who have a business need to know. They will only process your personal data on our instructions and they are subject to a duty of confidentiality.

We have put in place procedures to deal with any suspected personal data breach and will notify you and any applicable regulator of a breach where we are legally required to do so.

#### 8. Acceptance <a href="#id-8" id="id-8"></a>

By accessing and using our website and services , you signify your agreement to this Privacy Policy. We reserve the right to change or amend this Privacy Policy at any time. Please check our page frequently to see any updates or changes to this Privacy Policy.


# Staking

**What is staking?**

Staking is the process of actively participating in transaction validation of Unicorn U2u Consensus. On the U2U network, anyone with a minimum required balance of U2U can validate and earn staking rewards. Currently, the minimum requirement is 1 U2U token.<br>

**How staking works?**

U2U network uses Delegated Proof-of-Stake (DPoS) as its mechanism of selecting the top Validators who have secured the most voting power to participate in the validation of blocks and consensus process. These Validator will earn reward by doing their work. There will be two different kind of staking:

Delegators delegate their U2U to the one or more Validators and earn the incentives. The final incentives will be the reward from staking minus the commission fee from the Validators.&#x20;

Validators staking by use their U2U and earn the reward. The Validators will not only earn reward from their staking, but also the commission fee which they charge to the Delegators.<br>

**Staking rules**

During the staking process, the staking system will pay out rewards to all Validators and their Delegators through execution consensus protocol for each epoch. The rewards can be withdrawn immediately. The Delegators can un-delegate Validator(s) at any time during their staking, and their staked U2U will be held for 3 epochs (maximum 21 minutes) before claiming back to their wallet.

In contrast, if validators double sign, their staked (including delegators delegated to them) can be slashed an portion of their total stake amount when withdraw. This penalty amount is calculated as `(1 - refund ratio) * total stake amount` where the refund ratio is different between Validators and always less than 1.


# How To Stake?

## Stake:&#x20;

U2U uses a Delegated Proof-of-Stake consensus algorithm to validate transactions and secure the network. You can participate by staking your U2U Token. In exchange, you are rewarded with U2U Token and you can unstaked your tokens at anytime.

{% hint style="info" %}
Max Lock Duration must be equal or lower than Validator Lock Duration
{% endhint %}

## Lock:

After delegate your tokens to staking, you can join the lock package to increase your reward while staking. The minimum lock-up periods is 14 days and the maximum is 365 days. Your tokens will be transfer back to Stake stage when your lock-up period end. You can also unlock your token before the lock-up period end. However, you will pay a penalty for doing so. Since your rewards are always unlocked and withdrawable, the penalty will come from your staked amount. If you unlock earlier, regardless of how much of the lock-up period is left, you will only receive half of the base rewards; the additional rewards will be burned.

{% hint style="info" %}
Validator running the node need to lock to allowed the Delegator to lock.

Max Lock duration of Delegator must equal or smaller compare to Validator Locked amount.
{% endhint %}

## Staking parameters

* *Minimum validator self-stake:* **1,000,000** (1M) U2U
* *Minimum delegator stake amount*: **1** U2U
* Maximum *amount:* **10 times (10x)** of the validator self-stake. If the validator stakes **1,000,000** U2U, then the max delegation amount that a delegator can stake is **10,000,000** U2U
* *Minimum stake period*: **0 days**
* *Base staking reward unlock ratio:* **30%**
* *Minimum lock-up period*: **14 days**, earning the base reward rate
* *Maximum lock-up period*: **365 days**, earning the maximum reward rate
* *Delegation fee*: The network has set a fixed fee of **15%** on staking rewards paid from delegator to validators for operating their nodes
* *Burn Fee Share*: **5%**, our deflation mechanism for staking
* *Treasury Fee Share*: **20%**, will be transfer to U2U Network Treasury & will be announce to community how we use it in the future
* *Validator commission*: **15%**, the commission fee in percentage a validator will get from a delegation. This fixed fee is paid from delegators to validators for running their nodes. For example if you earn 25% on a stake of 1,000,000 U2U, you'll receive `1,000,000 * 0.25 * (1-0.15) = 212500 U2U` per year.
* *Base staking reward per second:* **\~3.8** U2U
* *Unbonding stake is locked for:* **7** days
* *Offline penalty threshold blocks:* **1000 blocks**, the number of offline blocks required to mark a validator as offline
* *Offline penalty threshold time:* **5 days**, the time required to mark a validator as offline

Note that both offline conditions of a validator must be met (offline blocks > 1000 blocks and offline time > 5 days) to deactivate that one.

## Guide

### Stake

1. Fill In Your Amount of Staking

<figure><img src="/files/M1OXcmXyOVpCAFT3JQLQ" alt="" width="375"><figcaption><p>Stake Screen</p></figcaption></figure>

2. Choose the Validator That You Want To Delegated.

<figure><img src="/files/5qr32qi5ae5ewGUY0ire" alt="" width="375"><figcaption><p>Current Validator</p></figcaption></figure>

<figure><img src="/files/J9ZO1Y29yzaxC6ptTYAk" alt="" width="375"><figcaption><p>Choose Your Validator</p></figcaption></figure>

3. Stake It

<figure><img src="/files/CCQQOi9UBcCtfimX3Br4" alt="" width="375"><figcaption><p>Stake Now</p></figcaption></figure>

### Lock

1. Choose Lock Screen

<figure><img src="/files/E2gZ3H76gIJCliJ1gKwm" alt="" width="375"><figcaption><p>Lock Screen</p></figcaption></figure>

2. Choose Validator that You Currently Staked

<figure><img src="/files/Tktz4n84wZbJ6Jb7d58p" alt="" width="375"><figcaption><p>Choose Validator</p></figcaption></figure>

<figure><img src="/files/aM47RVmiUKmBUmE7kgF5" alt="" width="375"><figcaption><p>Staked Validator from The List</p></figcaption></figure>

3. Fill Amount and Choose Duration

<figure><img src="/files/bNLLP4Y3nqq08uCPVkrf" alt="" width="375"><figcaption><p>Lock Screen</p></figcaption></figure>

4. Check Position of Current Locked

<figure><img src="/files/5e6aScvxVq3wnmL2ZdyP" alt="" width="375"><figcaption><p>Check Locked Position</p></figcaption></figure>

### Unstake

1. Choose Unstake Screen

<figure><img src="/files/20SmIYloS0yBnCcgZpVi" alt="" width="375"><figcaption><p>Choose Unstake Screen</p></figcaption></figure>

2. Choose Validator that You Currently Staked

<figure><img src="/files/YHyfrRl15Ia0Btq6HNUW" alt="" width="375"><figcaption><p>Choose Validator</p></figcaption></figure>

<figure><img src="/files/NYFpb1sjmNaasipn4hL2" alt="" width="375"><figcaption><p>Staked Validator from The List</p></figcaption></figure>

3. Fill Amount

<figure><img src="/files/93RWCYO7OhhBAD3P5MDs" alt="" width="375"><figcaption><p>Choose Unstake Amount</p></figcaption></figure>

### Claim Reward

1. Choose Reward Screen

<figure><img src="/files/nzRf3ojW36bASk0AgB27" alt="" width="375"><figcaption><p>Choose Reward Screen</p></figcaption></figure>

2. Claim Your Reward or Restake

<figure><img src="/files/QuztLcxWgEUNG0vP8Msj" alt="" width="375"><figcaption><p>Claim Your Reward or Restake It</p></figcaption></figure>

## Tools

* [Rewards calculator](https://staking.uniultra.xyz/)
* [Wallet](https://wallet.uniultra.xyz/)


# FAQ

### **Are my tokens SAFE when I stake?**

Yes. Nobody except you will have access to your tokens. Make sure not to lose your mnemonic phrase or private key.

### **Can I lose my tokens when staking?**

If you stake to a validator node that acts maliciously, you can lose some of your staked tokens and it might be locked in a period of time. The consensus will slash delegators as well, instead of only validators, is an essential part of network security. It makes it costly for a set of bad actors to take over the majority of the network. You should choose the validator node wisely and make sure they are reputable.&#x20;

### **How do I choose a reputable validator?**

Most validators of U2U Network have active communities, websites, and Twitter accounts. Do your own research and ask around in the community as they will be able to help you.

### **Can a validator run away with my funds?**

No. In any case, a validator does not have access to any other tokens than their own. However, if a validator acts maliciously, you should unstake your token as soon as possible.

### **What happens if a validator goes offline?**

If a validator node goes offline, it stops receiving rewards since it is not helping secure the network anymore. When it comes back online, the rewards resume.

### **Can I withdraw my delegation if a node goes offline?**

Yes, you can.

### **Can I stake, re-stake or increase my delegation?**

Yes. This is possible through [U2UWallet](https://wallet.uniultra.xyz/) or [U2UStaking](https://staking.uniultra.xyz/).

### **Can I unlock my delegation before the lock-up period ends?**

Yes, you can. However, you will pay a penalty for doing so. Since your rewards are always unlocked and withdrawable, the penalty will come from your staked amount. If you unlock earlier, regardless of how much of the lock-up period is left, you will only receive half of the base rewards; the additional rewards will be burned.

In any case, you will never end up with fewer tokens than you delegated.


# The Graph

Introduction

### What is The Graph?

The Graph is a decentralized protocol for indexing and querying blockchain data. The Graph makes it possible to query data that is difficult to query directly.

### What is Graph Node?

Graph Node is the component which indexes subgraphs, and makes the resulting data available to query via a GraphQL API. As such it is central to the indexer stack, and correct operation of Graph Node is crucial to running a successful indexer.

### What is Subgraph?

A subgraph extracts data from a blockchain, processing it and storing it so that it can be easily queried via GraphQL.


# Deploy a Graph Node

This tutorial will guide you to run The Graph self-hosted node on your machine via Docker Compose. [Docker](https://docs.docker.com/get-docker/) and [Docker Compose](https://docs.docker.com/compose/install/) are required to run graph node.

## Prepare your docker-compose.yaml file

```
version: '3'
services:
  graph-node:
    image: graphprotocol/graph-node
    ports:
      - '8000:8000'
      - '8001:8001'
      - '8020:8020'
      - '8030:8030'
      - '8040:8040'
    depends_on:
      - ipfs
      - postgres
    extra_hosts:
      - host.docker.internal:host-gateway
    environment:
      postgres_host: postgres
      postgres_user: graph-node
      postgres_pass: let-me-in
      postgres_db: graph-node
      ipfs: 'ipfs:5001'
      ethereum: RPC_URL_TO_YOUR_NODE
      GRAPH_LOG: info
  ipfs:
    image: ipfs/kubo:v0.14.0
    ports:
      - '5001:5001'
    volumes:
      - ./data/ipfs:/data/ipfs
  postgres:
    image: postgres:14
    ports:
      - '5432:5432'
    command:
      [
        "postgres",
        "-cshared_preload_libraries=pg_stat_statements",
        "-cmax_connections=200"
      ]
    environment:
      POSTGRES_USER: YOUR_POSTGRES_USER
      POSTGRES_PASSWORD: YOUR_POSTGRES_PASSWORD
      POSTGRES_DB: YOUR_POSTGRES_DB
      # FIXME: remove this env. var. which we shouldn't need. Introduced by
      # <https://github.com/graphprotocol/graph-node/pull/3511>, maybe as a
      # workaround for https://github.com/docker/for-mac/issues/6270?
      PGDATA: "/var/lib/postgresql/data"
      POSTGRES_INITDB_ARGS: "-E UTF8 --locale=C"
    volumes:
      - ./data/postgres:/var/lib/postgresql/data
```

In that:

* `RPC_URL_TO_YOUR_NODE`: is RPC URL to your node (it could be your local U2U node or public tracing node). Example: `'solaris:http://host.docker.internal:8545'` or `'solaris:https://rpc-mainnet.u2u.xyz'` for Solaris mainnet or `'nebulas:https://rpc-nebulas-testnet.u2u.xyz'` for Nebulas testnet.
* `POSTGRES_USER`: your Postgres database username. Example: `graph-node`
* `POSTGRES_PASSWORD`: Your Postgres database password. Example: `let-me-in`
* `POSTGRES_DB`: your Postgres database database name. Example: `graph-node`

Once your filled those environment variables, you enter below command to start your graphnode with Docker Compose at the same directory where contains your `docker-compose.yaml` file:

```
docker-compose up
```

You will see something similar:

{% code overflow="wrap" %}

```
[+] Running 39/3
 ✔ postgres 13 layers [⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿]      0B/0B      Pulled                                                                                                                                  34.0s 
 ✔ graph-node 7 layers [⣿⣿⣿⣿⣿⣿⣿]      0B/0B      Pulled                                                                                                                                       34.2s 
 ✔ ipfs 16 layers [⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿]      0B/0B      Pulled                                                                                                                                   14.4s 
[+] Running 4/4
 ✔ Network graphnode_default         Created                                                                                                                                                   0.2s 
 ✔ Container graphnode-postgres-1    Created                                                                                                                                                   8.0s 
 ✔ Container graphnode-ipfs-1        Created                                                                                                                                                   8.0s 
 ✔ Container graphnode-graph-node-1  Created                                                                                                                                                   0.9s 
Attaching to graphnode-graph-node-1, graphnode-ipfs-1, graphnode-postgres-1
graphnode-postgres-1    | The files belonging to this database system will be owned by user "postgres".
graphnode-postgres-1    | This user must also own the server process.
graphnode-postgres-1    | 
graphnode-postgres-1    | The database cluster will be initialized with locale "C".
graphnode-postgres-1    | The default text search configuration will be set to "english".
graphnode-postgres-1    | 
graphnode-postgres-1    | Data page checksums are disabled.
graphnode-postgres-1    | 
graphnode-postgres-1    | fixing permissions on existing directory /var/lib/postgresql/data ... ok
graphnode-postgres-1    | creating subdirectories ... ok
graphnode-postgres-1    | selecting dynamic shared memory implementation ... posix
graphnode-postgres-1    | selecting default max_connections ... 100
graphnode-ipfs-1        | Changing user to ipfs
graphnode-postgres-1    | selecting default shared_buffers ... 128MB
graphnode-postgres-1    | selecting default time zone ... Etc/UTC
graphnode-postgres-1    | creating configuration files ... ok
graphnode-ipfs-1        | ipfs version 0.14.0
graphnode-ipfs-1        | generating ED25519 keypair...done
graphnode-ipfs-1        | peer identity: 12D3KooWNhXSghWxBP8R1CdGiNN3aUhFFNwP2WV7siHNK3Xr33Mw
graphnode-ipfs-1        | initializing IPFS node at /data/ipfs
graphnode-postgres-1    | running bootstrap script ... ok
graphnode-postgres-1    | performing post-bootstrap initialization ... ok
graphnode-graph-node-1  | Waiting for IPFS (ipfs:5001)
graphnode-ipfs-1        | to get started, enter:
graphnode-ipfs-1        | 
graphnode-ipfs-1        |       ipfs cat /ipfs/QmQPeNsJPyVWPFDVHb77w8G42Fvo15z4bG2X8D2GhfbSXc/readme
graphnode-ipfs-1        | 
graphnode-ipfs-1        | Initializing daemon...
graphnode-ipfs-1        | Kubo version: 0.14.0-e0fabd6
graphnode-ipfs-1        | Repo version: 12
graphnode-ipfs-1        | System version: amd64/linux
graphnode-ipfs-1        | Golang version: go1.18.3
graphnode-postgres-1    | syncing data to disk ... ok
graphnode-postgres-1    | 
graphnode-postgres-1    | 
graphnode-postgres-1    | Success. You can now start the database server using:
graphnode-postgres-1    | 
graphnode-postgres-1    |     pg_ctl -D /var/lib/postgresql/data -l logfile start
graphnode-postgres-1    | 
graphnode-postgres-1    | initdb: warning: enabling "trust" authentication for local connections
graphnode-postgres-1    | You can change this by editing pg_hba.conf or using the option -A, or
graphnode-postgres-1    | --auth-local and --auth-host, the next time you run initdb.
graphnode-ipfs-1        | 2023/10/09 10:08:39 failed to sufficiently increase receive buffer size (was: 208 kiB, wanted: 2048 kiB, got: 416 kiB). See https://github.com/lucas-clemente/quic-go/wiki/UDP-Receive-Buffer-Size for details.
graphnode-postgres-1    | waiting for server to start....2023-10-09 10:08:39.532 UTC [49] LOG:  starting PostgreSQL 14.9 (Debian 14.9-1.pgdg120+1) on x86_64-pc-linux-gnu, compiled by gcc (Debian 12.2.0-14) 12.2.0, 64-bit
graphnode-postgres-1    | 2023-10-09 10:08:39.576 UTC [49] LOG:  listening on Unix socket "/var/run/postgresql/.s.PGSQL.5432"
graphnode-postgres-1    | 2023-10-09 10:08:39.777 UTC [50] LOG:  database system was shut down at 2023-10-09 10:08:32 UTC
graphnode-postgres-1    | 2023-10-09 10:08:39.904 UTC [49] LOG:  database system is ready to accept connections
graphnode-postgres-1    |  done
graphnode-postgres-1    | server started
graphnode-ipfs-1        | Swarm listening on /ip4/127.0.0.1/tcp/4001
graphnode-ipfs-1        | Swarm listening on /ip4/127.0.0.1/udp/4001/quic
graphnode-ipfs-1        | Swarm listening on /ip4/172.21.0.3/tcp/4001
graphnode-ipfs-1        | Swarm listening on /ip4/172.21.0.3/udp/4001/quic
graphnode-ipfs-1        | Swarm listening on /p2p-circuit
graphnode-ipfs-1        | Swarm announcing /ip4/127.0.0.1/tcp/4001
graphnode-ipfs-1        | Swarm announcing /ip4/127.0.0.1/udp/4001/quic
graphnode-ipfs-1        | Swarm announcing /ip4/171.242.12.100/udp/4001/quic
graphnode-ipfs-1        | Swarm announcing /ip4/171.242.12.202/udp/4001/quic
graphnode-ipfs-1        | Swarm announcing /ip4/172.21.0.3/tcp/4001
graphnode-ipfs-1        | Swarm announcing /ip4/172.21.0.3/udp/4001/quic
graphnode-ipfs-1        | API server listening on /ip4/0.0.0.0/tcp/5001
graphnode-ipfs-1        | WebUI: http://0.0.0.0:5001/webui
graphnode-ipfs-1        | Gateway (readonly) server listening on /ip4/0.0.0.0/tcp/8080
graphnode-ipfs-1        | Daemon is ready
graphnode-postgres-1    | CREATE DATABASE
graphnode-postgres-1    | 
graphnode-postgres-1    | 
graphnode-postgres-1    | /usr/local/bin/docker-entrypoint.sh: ignoring /docker-entrypoint-initdb.d/*
graphnode-postgres-1    | 
graphnode-postgres-1    | waiting for server to shut down...2023-10-09 10:08:40.881 UTC [49] LOG:  received fast shutdown request
graphnode-postgres-1    | .2023-10-09 10:08:40.931 UTC [49] LOG:  aborting any active transactions
graphnode-postgres-1    | 2023-10-09 10:08:40.932 UTC [49] LOG:  background worker "logical replication launcher" (PID 56) exited with exit code 1
graphnode-postgres-1    | 2023-10-09 10:08:40.932 UTC [51] LOG:  shutting down
graphnode-graph-node-1  | Waiting for Postgres (postgres:5432)
graphnode-postgres-1    | 2023-10-09 10:08:41.234 UTC [49] LOG:  database system is shut down
graphnode-postgres-1    |  done
graphnode-postgres-1    | server stopped
graphnode-postgres-1    | 
graphnode-postgres-1    | PostgreSQL init process complete; ready for start up.
graphnode-postgres-1    | 
graphnode-postgres-1    | 2023-10-09 10:08:41.364 UTC [1] LOG:  starting PostgreSQL 14.9 (Debian 14.9-1.pgdg120+1) on x86_64-pc-linux-gnu, compiled by gcc (Debian 12.2.0-14) 12.2.0, 64-bit
graphnode-postgres-1    | 2023-10-09 10:08:41.365 UTC [1] LOG:  listening on IPv4 address "0.0.0.0", port 5432
graphnode-postgres-1    | 2023-10-09 10:08:41.365 UTC [1] LOG:  listening on IPv6 address "::", port 5432
graphnode-postgres-1    | 2023-10-09 10:08:41.458 UTC [1] LOG:  listening on Unix socket "/var/run/postgresql/.s.PGSQL.5432"
graphnode-postgres-1    | 2023-10-09 10:08:41.526 UTC [64] LOG:  database system was shut down at 2023-10-09 10:08:41 UTC
graphnode-postgres-1    | 2023-10-09 10:08:41.578 UTC [1] LOG:  database system is ready to accept connections
graphnode-graph-node-1  | Oct 09 10:08:47.023 INFO Graph Node version: 0.32.0 (2023-08-21)
graphnode-graph-node-1  | Oct 09 10:08:47.023 WARN GRAPH_POI_ACCESS_TOKEN not set; might leak POIs to the public via GraphQL
graphnode-graph-node-1  | Oct 09 10:08:47.023 INFO Generating configuration from command line arguments
graphnode-graph-node-1  | Oct 09 10:08:47.023 WARN No fork base URL specified, subgraph forking is disabled
graphnode-graph-node-1  | Oct 09 10:08:47.023 INFO Starting up
graphnode-graph-node-1  | Oct 09 10:08:47.023 INFO Trying IPFS node at: http://ipfs:5001/
graphnode-graph-node-1  | Oct 09 10:08:47.028 INFO Creating transport, capabilities: archive, traces, url: https://rpc-mainnet.uniultra.xyz, provider: solaris-rpc-0
graphnode-graph-node-1  | Oct 09 10:08:47.029 INFO Successfully connected to IPFS node at: http://ipfs:5001/
graphnode-graph-node-1  | Oct 09 10:08:47.287 WARN Expensive queries file not set to a valid file: /etc/graph-node/expensive-queries.txt
graphnode-graph-node-1  | Oct 09 10:08:47.303 INFO Connecting to Postgres, weight: 1, conn_pool_size: 10, url: postgresql://graph-node:HIDDEN_PASSWORD@postgres:5432/graph-node?sslmode=prefer, pool: main, shard: primary
graphnode-graph-node-1  | Oct 09 10:08:47.303 INFO Pool successfully connected to Postgres, pool: main, shard: primary, component: Store
graphnode-graph-node-1  | Oct 09 10:08:47.309 INFO Setting up fdw, pool: main, shard: primary, component: ConnectionPool
graphnode-graph-node-1  | Oct 09 10:08:47.340 INFO Running migrations, pool: main, shard: primary, component: ConnectionPool
graphnode-graph-node-1  | Oct 09 10:08:58.857 INFO Migrations finished, pool: main, shard: primary, component: ConnectionPool
graphnode-graph-node-1  | Oct 09 10:08:58.858 INFO Mapping primary, pool: main, shard: primary, component: ConnectionPool
graphnode-graph-node-1  | Oct 09 10:08:58.877 INFO Connecting to Ethereum to get network identifier, capabilities: archive, traces, provider: solaris-rpc-0
graphnode-graph-node-1  | Oct 09 10:08:59.184 INFO Connected to Ethereum, capabilities: archive, traces, network_version: 39, provider: solaris-rpc-0
graphnode-graph-node-1  | Oct 09 10:08:59.691 INFO Creating LoadManager in disabled mode, component: LoadManager
graphnode-graph-node-1  | Oct 09 10:08:59.691 INFO Started block ingestor, network_name: solaris
graphnode-graph-node-1  | Oct 09 10:08:59.691 INFO Starting firehose block ingestor for network, network_name: solaris
graphnode-graph-node-1  | Oct 09 10:08:59.691 INFO Starting job runner with 5 jobs, component: JobRunner
graphnode-graph-node-1  | Oct 09 10:08:59.692 INFO Starting JSON-RPC admin server at: http://localhost:8020, component: JsonRpcServer
graphnode-graph-node-1  | Oct 09 10:08:59.692 INFO Starting GraphQL HTTP server at: http://localhost:8000, component: GraphQLServer
graphnode-graph-node-1  | Oct 09 10:08:59.692 INFO Starting index node server at: http://localhost:8030, component: IndexNodeServer
graphnode-graph-node-1  | Oct 09 10:08:59.692 INFO Started all assigned subgraphs, node_id: default, count: 0, component: SubgraphRegistrar
graphnode-graph-node-1  | Oct 09 10:08:59.692 INFO Starting GraphQL WebSocket server at: ws://localhost:8001, component: SubscriptionServer
graphnode-graph-node-1  | Oct 09 10:08:59.692 INFO Starting metrics server at: http://localhost:8040, component: MetricsServer
graphnode-graph-node-1  | Oct 09 10:08:59.866 INFO Downloading latest blocks from Ethereum, this may take a few minutes..., provider: solaris-rpc-0, component: EthereumPollingBlockIngestor
graphnode-graph-node-1  | Oct 09 10:09:46.238 INFO Syncing 27 blocks from Ethereum, code: BlockIngestionLagging, blocks_needed: 27, blocks_behind: 27, latest_block_head: 2043707, current_block_head: 2043680, provider: solaris-rpc-0, component: EthereumPollingBlockIngestor
graphnode-graph-node-1  | Oct 09 10:09:52.082 INFO Syncing 3 blocks from Ethereum, code: BlockIngestionStatus, blocks_needed: 3, blocks_behind: 3, latest_block_head: 2043710, current_block_head: 2043707, provider: solaris-rpc-0, component: EthereumPollingBlockIngestor
graphnode-graph-node-1  | Oct 09 10:09:53.731 INFO Syncing 1 blocks from Ethereum, code: BlockIngestionStatus, blocks_needed: 1, blocks_behind: 1, latest_block_head: 2043711, current_block_head: 2043710, provider: solaris-rpc-0, component: EthereumPollingBlockIngestor
```

{% endcode %}

Please take a look at the last line, graphnode has started to sync blocks with the RPC node. Your graphnode now is ready to [deploy a subgraph](/services/the-graph/deploy-a-subgraph).


# Deploy a Subgraph

Deploying a subgraph involves creating a GraphQL schema, defining mappings to extract data from a blockchain or data source, and deploying the subgraph to a GraphNode service. In this tutorial, we'll walk you through the process of deploying a subgraph using the Graph CLI.

## Prerequisites

1. Node.js and npm: Make sure you have Node.js and npm installed on your system by checking in Terminal (or you can download them from the [Node.js website](https://nodejs.org/)):

   ```
   $ node -v
   v19.9.0
   $ npm -v
   9.6.3
   ```
2. Graph CLI: Install the Graph CLI globally using npm:

   ```bash
   npm install -g @graphprotocol/graph-cli
   ```
3. Access to a graph node: Ensure that you have access to a running graph node service. You have set up your own graph node at [here](/services/the-graph/deploy-a-graph-node).

We will deploy a subgraph for smart contract `MyToken.sol` on Solaris mainnet: [0xb4C122037a433aEc9FcB25A415Fe1f91845e3958](https://u2uscan.xyz/address/0xb4C122037a433aEc9FcB25A415Fe1f91845e3958).

## Create new project

Create new Node.js project and install dependencies:

```
mkdir sample_subgraph
cd sample_subgraph
npm init -y
```

Let's modify your `package.json` file to set up Node.js project:

```
{
  "name": "sample-subgraph",
  "version": "1.0.0",
  "scripts": {
    "codegen": "graph codegen",
    "create": "graph create u2u/subgraph --node http://127.0.0.1:8020",
    "deploy": "graph deploy u2u/subgraph --ipfs http://127.0.0.1:5001 --node http://127.0.0.1:8020"
  },
  "devDependencies": {
    "@amxx/graphprotocol-utils": "^1.1.0",
    "@graphprotocol/graph-cli": "^0.59.0",
    "@graphprotocol/graph-ts": "^0.31.0"
  },
  "dependencies": {}
}
```

Now install dependencies:

```
npm install
```

## Add contract ABI

At project directory, create new folder called `abis`. Then create new file `MyToken.json` that located inside `abis` folder:

```
abis/
    MyToken.json
```

`MyToken.json` contains `MyToken` contract's ABI. You can retrieve ABI of verified contract via explorer (Contract detail page > tab Contract > button Code > Contract ABI) or copy from compiled ABI with hardhat (`artifacts` folder). It has this format:

```
{
    "contractName": "MyToken",
    "abi": [ /* copy ABI and paste here */ ]
}
```

## Define schema

A GraphQL schema that defines what data is stored for your subgraph, and how to query it via GraphQL. The schema for your subgraph is in the file `schema.graphql`. GraphQL schemas are defined using the GraphQL interface definition language. If you've never written a GraphQL schema, it is recommended that you check out this primer on the GraphQL type system. Reference documentation for GraphQL schemas can be found in the [GraphQL API](https://thegraph.com/docs/en/querying/graphql-api/) section.

At project directory, create new file called `schema.graphql` and paste following contents:

```
type Account @entity {
	id: Bytes!
	asERC20: ERC20Contract
	ERC20balances: [ERC20Balance!]! @derivedFrom(field: "account")
	ERC20approvalsOwner: [ERC20Approval!]! @derivedFrom(field: "owner")
	ERC20approvalsSpender: [ERC20Approval!]! @derivedFrom(field: "spender")
	ERC20transferFromEvent: [ERC20Transfer!]! @derivedFrom(field: "from")
	ERC20transferToEvent: [ERC20Transfer!]! @derivedFrom(field: "to")
	events: [Event!]! @derivedFrom(field: "emitter")
}
type ERC20Contract @entity(immutable: true) {
	id: Bytes!
	asAccount: Account!
	name: String
	symbol: String
	decimals: Int!
	totalSupply: ERC20Balance!
	balances: [ERC20Balance!]! @derivedFrom(field: "contract")
	approvals: [ERC20Approval!]! @derivedFrom(field: "contract")
	transfers: [ERC20Transfer!]! @derivedFrom(field: "contract")
}
type ERC20Balance @entity {
	id: ID!
	contract: ERC20Contract!
	account: Account
	value: BigDecimal!
	valueExact: BigInt!
	transferFromEvent: [ERC20Transfer!]! @derivedFrom(field: "fromBalance")
	transferToEvent: [ERC20Transfer!]! @derivedFrom(field: "toBalance")
}
type ERC20Approval @entity {
	id: ID!
	contract: ERC20Contract!
	owner: Account!
	spender: Account!
	value: BigDecimal!
	valueExact: BigInt!
}
type ERC20Transfer implements Event @entity(immutable: true) {
	id: ID!
	emitter: Account!
	transaction: Transaction!
	timestamp: BigInt!
	contract: ERC20Contract!
	from: Account
	fromBalance: ERC20Balance
	to: Account
	toBalance: ERC20Balance
	value: BigDecimal!
	valueExact: BigInt!
}
interface Event {
	id: ID!
	transaction: Transaction!
	emitter: Account!
	timestamp: BigInt!
}
type Transaction @entity(immutable: true) {
	id: ID!
	timestamp: BigInt!
	blockNumber: BigInt!
	events: [Event!]! @derivedFrom(field: "transaction")
}
```

[Learn more about defining entities in your subgraph](https://thegraph.com/docs/en/developing/creating-a-subgraph/#defining-entities).

## Subgraph manifest

Subgraph manifest is a configuration file for a subgraph. Below is the subgraph manifest for our sample:

```
specVersion: 0.0.4
description: Sample Subgraph
repository: https://github.com/unicornultrafoundation/subgraph
schema:
  file: ./schema.graphql
dataSources:
  - kind: ethereum/contract
    name: MyToken
    source:
      abi: MyToken
      address: "0xa3Aa4cb3DB300355613cb3388D4eD8823f4ED07A"
      startBlock: 7699806
    mapping:
      kind: ethereum/events
      apiVersion: 0.0.6
      language: wasm/assemblyscript
      entities:
        - TransferEvent
      abis:
        - name: MyToken
          file: ./abis/MyToken.json
      eventHandlers:
        - event: Transfer(indexed address,indexed address,uint256)
          handler: handleTransfer
      file: ./src/mytoken.ts
```

Let's break down the elements of this subgraph manifest:

* `specVersion: 0.0.4`: This specifies the version of the subgraph manifest. It indicates which version of the subgraph schema and configuration format is being used.
* `description: Sample Subgraph`: This is a human-readable description of the subgraph, providing information about its purpose or functionality.
* `schema.file`: This points to the GraphQL schema file used for defining the data structure and types that the subgraph will query and expose.
* `dataSources`: This section defines the data sources that the subgraph will query:
  * `kind`: Specifies that the data source is smart contract.
  * `name:` A user-assigned name for the data source.
  * `source.abi`: The ABI for the smart contract with the name `MyToken`.&#x20;
  * `source.address`: The address of contract `MyToken`.
  * `source.startBlock`: block number from which indexing should start.
* `mapping`: specifies how the data from the Ethereum smart contract is mapped to the subgraph:
  * `kind: ethereum/events`: This indicates that the data source is indexed based on events.
  * `apiVersion: 0.0.6`: The version of the AssemblyScript being used.
  * `language: wasm/assemblyscript`: The programming language used for writing the mapping logic.
  * `entities`: the entities that the data source writes to the store. The schema for each entity is defined in the schema.graphql file
  * `abis`: one or more named ABI files for the source contract as well as any other smart contracts that you interact with from within the mappings.
  * `eventHandlers`: lists the smart contract events this subgraph reacts to and the handlers in the mapping—`./src/mytoken.ts` in the example—that transform these events into entities in the store.

Check out this link to learn more about [subgraph manifest](https://thegraph.com/docs/en/developing/creating-a-subgraph/#the-subgraph-manifest).

## Define mappings

The mappings take data from a particular source and transform it into entities that are defined within your schema. Mappings are written in a subset of [TypeScript](https://www.typescriptlang.org/docs/handbook/typescript-in-5-minutes.html) called [AssemblyScript](https://github.com/AssemblyScript/assemblyscript/wiki) which can be compiled to WASM ([WebAssembly](https://webassembly.org/)). AssemblyScript is stricter than normal TypeScript, yet provides a familiar syntax.

For each event handler that is defined in `subgraph.yaml` under `mapping.eventHandlers`, create an exported function of the same name. Each handler must accept a single parameter called `event`with a type corresponding to the name of the event which is being handled.

At project directory, create a new folder `src`. Add 2 files as below:

```
src/
    fetch.ts
    mytoken.ts
```

```
// fetch.ts
import {
	Address,
} from '@graphprotocol/graph-ts'

import {
	Account,
	ERC20Contract,
	ERC20Balance,
	ERC20Approval,
} from '../generated/schema'

import {
	MyToken,
} from '../generated/MyToken/MyToken'

import {
	constants,
} from '@amxx/graphprotocol-utils'

export function fetchAccount(address: Address): Account {
	let account = new Account(address)
	account.save()
	return account
}

export function fetchERC20(address: Address): ERC20Contract {
	let contract = ERC20Contract.load(address)

	if (contract == null) {
		let endpoint = MyToken.bind(address)
		let name = endpoint.try_name()
		let symbol = endpoint.try_symbol()
		let decimals = endpoint.try_decimals()

		// Common
		contract = new ERC20Contract(address)
		contract.name = name.reverted ? null : name.value
		contract.symbol = symbol.reverted ? null : symbol.value
		contract.decimals = decimals.reverted ? 18 : decimals.value
		contract.totalSupply = fetchERC20Balance(contract as ERC20Contract, null).id
		contract.asAccount = address
		contract.save()

		let account = fetchAccount(address)
		account.asERC20 = address
		account.save()
	}

	return contract as ERC20Contract
}

export function fetchERC20Balance(contract: ERC20Contract, account: Account | null): ERC20Balance {
	let id = contract.id.toHex().concat('/').concat(account ? account.id.toHex() : 'totalSupply')
	let balance = ERC20Balance.load(id)

	if (balance == null) {
		balance = new ERC20Balance(id)
		balance.contract = contract.id
		balance.account = account ? account.id : null
		balance.value = constants.BIGDECIMAL_ZERO
		balance.valueExact = constants.BIGINT_ZERO
		balance.save()
	}

	return balance as ERC20Balance
}

export function fetchERC20Approval(contract: ERC20Contract, owner: Account, spender: Account): ERC20Approval {
	let id = contract.id.toHex().concat('/').concat(owner.id.toHex()).concat('/').concat(spender.id.toHex())
	let approval = ERC20Approval.load(id)

	if (approval == null) {
		approval = new ERC20Approval(id)
		approval.contract = contract.id
		approval.owner = owner.id
		approval.spender = spender.id
		approval.value = constants.BIGDECIMAL_ZERO
		approval.valueExact = constants.BIGINT_ZERO
	}

	return approval as ERC20Approval
}

```

```
// mytoken.ts
import {
	Address,
} from '@graphprotocol/graph-ts'

import {
	ERC20Transfer,
} from '../generated/schema'

import {
	Transfer as TransferEvent,
	Approval as ApprovalEvent,
} from '../generated/MyToken/MyToken'

import {
	decimals,
	events,
	transactions,
} from '@amxx/graphprotocol-utils'

import {
	fetchERC20,
	fetchERC20Balance,
	fetchERC20Approval,
	fetchAccount,
} from './fetch'

export function handleTransfer(event: TransferEvent): void {
	let contract = fetchERC20(event.address)
	let ev = new ERC20Transfer(events.id(event))
	ev.emitter = contract.id
	ev.transaction = transactions.log(event).id
	ev.timestamp = event.block.timestamp
	ev.contract = contract.id
	ev.value = decimals.toDecimals(event.params.value, contract.decimals)
	ev.valueExact = event.params.value

	if (event.params.from == Address.zero()) {
		let totalSupply = fetchERC20Balance(contract, null)
		totalSupply.valueExact = totalSupply.valueExact.plus(event.params.value)
		totalSupply.value = decimals.toDecimals(totalSupply.valueExact, contract.decimals)
		totalSupply.save()
	} else {
		let from = fetchAccount(event.params.from)
		let balance = fetchERC20Balance(contract, from)
		balance.valueExact = balance.valueExact.minus(event.params.value)
		balance.value = decimals.toDecimals(balance.valueExact, contract.decimals)
		balance.save()

		ev.from = from.id
		ev.fromBalance = balance.id
	}

	if (event.params.to == Address.zero()) {
		let totalSupply = fetchERC20Balance(contract, null)
		totalSupply.valueExact = totalSupply.valueExact.minus(event.params.value)
		totalSupply.value = decimals.toDecimals(totalSupply.valueExact, contract.decimals)
		totalSupply.save()
	} else {
		let to = fetchAccount(event.params.to)
		let balance = fetchERC20Balance(contract, to)
		balance.valueExact = balance.valueExact.plus(event.params.value)
		balance.value = decimals.toDecimals(balance.valueExact, contract.decimals)
		balance.save()

		ev.to = to.id
		ev.toBalance = balance.id
	}
	ev.save()
}

export function handleApproval(event: ApprovalEvent): void {
	let contract = fetchERC20(event.address)

	let owner = fetchAccount(event.params.owner)
	let spender = fetchAccount(event.params.spender)
	let approval = fetchERC20Approval(contract, owner, spender)
	approval.valueExact = event.params.value
	approval.value = decimals.toDecimals(event.params.value, contract.decimals)
	approval.save()
}
```

[Learn more about writing mappings here](https://thegraph.com/docs/en/developing/creating-a-subgraph/#writing-mappings).

## Codegen, create and deploy subgraph

At the project structure, open up your Terminal, to generate code:

```
npm run codegen
```

After finishing, `generated` folder will be created. It contains AssemblyScript files that defined in GraphQL schema and ABI files:

```
generated/
    MyToken/
        MyToken.ts
    schema.ts
```

Then create your subgraph on graphnode:

```
npm run create
```

You'll see something similar:

```
> sample-subgraph@1.0.0 create
> graph create u2u/subgraph --node http://127.0.0.1:8020

Created subgraph: u2u/subgraph
```

Next deploy your subgraph:

```
npm run deploy
```

The output is as below:

```
> sample-subgraph@1.0.0 deploy
> graph deploy u2u/subgraph --ipfs http://127.0.0.1:5001 --node http://127.0.0.1:8020

Which version label to use? (e.g. "v0.0.1"): v0.0.1
  Skip migration: Bump mapping apiVersion from 0.0.1 to 0.0.2
  Skip migration: Bump mapping apiVersion from 0.0.2 to 0.0.3
  Skip migration: Bump mapping apiVersion from 0.0.3 to 0.0.4
  Skip migration: Bump mapping apiVersion from 0.0.4 to 0.0.5
  Skip migration: Bump mapping apiVersion from 0.0.5 to 0.0.6
  Skip migration: Bump manifest specVersion from 0.0.1 to 0.0.2
  Skip migration: Bump manifest specVersion from 0.0.2 to 0.0.4
✔ Apply migrations
✔ Load subgraph from subgraph.yaml
  Compile data source: MyToken => build/MyToken/MyToken.wasm
✔ Compile subgraph
  Copy schema file build/schema.graphql
  Write subgraph file build/MyToken/abis/MyToken.json
  Write subgraph manifest build/subgraph.yaml
✔ Write compiled subgraph to build/
  Add file to IPFS build/schema.graphql
                .. QmTJC228tSzgV6ano5uSgVkk4yq3tdpUAZ11xBBnqtKbmm
  Add file to IPFS build/MyToken/abis/MyToken.json
                .. QmUfqVeUafPnxQbia1tCA9mCtvcRDAoxLjsCnvioEfK2P4
  Add file to IPFS build/MyToken/MyToken.wasm
                .. QmZjUQmrLP75UqCypjvQSLzfYs35nX5GvNRur3QCjgYq8P
✔ Upload subgraph to IPFS

Build completed: Qmf6snbu1krZwRL3MbjK1xBusxvbWeP39G2Z54WK6WPsfX

Deployed to http://127.0.0.1:8000/subgraphs/name/u2u/subgraph/graphql

Subgraph endpoints:
Queries (HTTP):     http://127.0.0.1:8000/subgraphs/name/u2u/subgraph
```

## Visit your subgraph's GraphiQL

Use your browser to access deployed subgraph: `http://127.0.0.1:8000/subgraphs/name/u2u/subgraph/graphql`

<figure><img src="/files/TxoRtYKIkNAlqW2qD6Ri" alt=""><figcaption></figcaption></figure>

## Summary

We have gone through how to deploy subgraph on graphnode that watches U2U network. For more detail please visit [The Graph documentation](https://thegraph.com/docs/en/developing/creating-a-subgraph/).

To sum up:

1. Add contract ABI
2. Write mappings for contract in `/src/*`
3. Define models in `schema.graphql`&#x20;
4. Wire up contract, its events, mappings in `subgraph.yaml`
5. Try `codegen` to see if any errors
6. Run `create` then `deploy`


# Bridge

## What and why&#x20;

***

Blockchains typically operate in isolated environments, which prevents them from naturally trading and communicating with one another. Consequently, despite substantial activity and innovation within a single ecosystem, this potential is constrained by the need for more connectivity and interoperability with other ecosystems.

A bridge in blockchain refers to a protocol that enables the transfer of data, assets, or tokens between two separate blockchain networks, such as between different Layer 1 (L1) blockchains (e.g., **U2U** and **BSC/ETH**) or between a Layer 1 and a Layer 2 network (e.g., **Ethereum and Arbitrum**). Bridges are critical for interoperability, allowing users to leverage features or benefits of one blockchain on another.

Bridges offer a way for isolated blockchain environments to connect with each other. They establish a transportation route between blockchains where tokens, messages, arbitrary data, and even smart contract calls can be transferred from one chain to another.

## How do bridges work

***

Although numerous [bridge design methodologies](https://li.fi/knowledge-hub/blockchain-bridges-and-classification/) exist, three prominent approaches to enhance the cross-chain transference of assets are particularly noteworthy:

* **Lock-and-Mint Mechanism**:
  * On the source blockchain, tokens are locked in a smart contract.
  * An equivalent representation of those tokens is minted on the destination blockchain.
* **Burn-and-Release Mechanism**:
  * When users want to move their assets back to the original chain, the minted tokens on the destination chain are burned, and the original tokens are released on the source chain.
* **Relayers and Validators**:

  * Bridges rely on relayers or validators to monitor transactions on the source chain and facilitate the transfer to the destination chain.
  * Validators may include trusted entities or decentralized networks.

## Benefits of Bridges

***

For users:

* Enhanced Access to Ecosystems
* Cost Savings
* Improved Liquidity and Investment Opportunities
* Cross-Chain Flexibility
* Multi-Chain Asset Management
* Access to Multi-Chain dApps

For developers:

* Data and assets transfer
* Collaboration with different blockchain ecosystems
* Attraction of users and communities

## U2U's Official Bridge Partnerships

***

* [Owlto Finance](https://owlto.finance/): Owlto Finance is a very concise cross-rollup bridge, and cross-rollup transfers are also very simple. At the same time, Owlto also has unique features and a very user-friendly experience.


# Smart Contracts & EOA

## U2U Official SMC & EOA&#x20;

### [Pegged-USDT SMC](https://u2uscan.xyz/token/0x0820957B320E901622385Cc6C4fca196b20b939F)

* **Total Supply:** 3,000,000 $pUSDT
* **Minter:** [0xaf8c28Cc25c9dfc5870841B0Ce7f94F0c38B4a0d](https://u2uscan.xyz/search-results?q=0xaf8c28Cc25c9dfc5870841B0Ce7f94F0c38B4a0d)

***

## Owlto SMC & EOA

| Name   | Address                                                                                                              |
| ------ | -------------------------------------------------------------------------------------------------------------------- |
| Sender | [0x5e809A85Aa182A9921EDD10a4163745bb3e36284](https://u2uscan.xyz/address/0x5e809A85Aa182A9921EDD10a4163745bb3e36284) |
| Maker  | [0x1A9b315367Fc746b479DBB6a143A10cd4642AAd8](https://u2uscan.xyz/address/0x1A9b315367Fc746b479DBB6a143A10cd4642AAd8) |


# Oracle

## What is Oracle&#x20;

An oracle is a cryptographically verifiable interface that **imports external facts** (price feeds, weather data, DAO votes, cross‑chain proofs) **and exports on‑chain intents** (triggering settlement, moving assets on another chain, releasing insurance payouts). With oracles embedded, the on‑chain world can finally respond to off‑chain reality *within the safety bounds of Layer‑1 consensus*.

## What is does

Oracles turn static contracts into reactive products: lending protocols auto‑manage collateral, DEXes and perps settle in a single click, prediction and insurance payouts trigger the moment data arrives, games provide instant provably‑fair randomness, bridges confirm transfers in‑app, wallets hide gas complexity, and DAOs execute votes without multisig hassles. In short, oracles slash user friction, raise security, and funnel liquidity—and developers—into **U2U**.

#### Applications That Depend on Oracles

* **Decentralised Lending & Stablecoins** – live price feeds for collateral health.
* **Perpetual DEXes & Options** – benchmark prices and funding rates.
* **Prediction Markets & Sports Betting** – event outcomes for instant settlement.
* **Randomness‑Driven Games & NFTs** – verifiable randomness (VRF).
* **Parametric Insurance** – weather/flight data for automatic payouts.
* **RWA Tokenisation & Asset‑Backed Loans** – audited NAV and appraisals.
* **Cross‑Chain Bridges & Omnichain Apps** – finalised headers or ZK proofs.
* **Gas / Fee Abstraction Layers** – real‑time gas and FX rates.
* **Decentralised Identity & Reputation** – KYC attestations and credit scores.
* **DAO Governance** – off‑chain vote tallies for auto‑execution.

In short, oracles slash user friction, raise security, and funnel liquidity—and developers—into **U2U**.

**Security Assumptions**—Any application that depends on an oracle inherits its trust model. If a dominant DeFi protocol uses a weak price feed, that oracle effectively caps the *economic security* of the whole chain.

**State & Gas Footprint**—High‑frequency data pushes enlarge the state and raise storage rent. L1s may adopt blob/event storage or stateless proofs to keep Oracle data cheap and pruneable.

**Latency & Throughput** — Block‑by‑block updates raise TPS pressure; batched or asynchronous proofs reduce contention but introduce settlement lag.

**Economic Composability**—Robust, low‑cost feeds unlock verticals such as perpetual, on‑chain options, and parametric insurance; poor Oracle support limits Total Value Locked (TVL) and developer interest.

## Official Oracle partner

* **Orochi Network (**[**https://www.orochi.network/**](https://www.orochi.network/)**)**

<br>


# Smart Contracts & EOA

U2U's official partner for oracle services and its implementations

### [Orochi ](https://docs.orochi.network/orochi-network)

* **Testnet:** [0x70523434ee6a9870410960E2615406f8F9850676](https://testnet.u2uscan.xyz/address/0x70523434ee6a9870410960E2615406f8F9850676)
* **Mainnet:** [0x6eFAA86dD3177d75d161A99e2c103409927f3C49](https://u2uscan.xyz/address/0x6eFAA86dD3177d75d161A99e2c103409927f3C49)


# Node Types

Types of U2U Nodes

## Normal node

A normal node or non-validator node can sync the latest events from the network. Users can submit their transactions into a normal node. Transactions will be propagated to the other nodes of the network.&#x20;

A normal node is usually run locally, however if you want to expose blockchain data (transactions, balances, smart contract interactions). You can expose to the public via `--http` or `--ws` flag.

To enable Tracing Node, use `--enabletxtracer` flag.&#x20;

{% hint style="warning" %}
IMPORTANT: Do not enable TX Tracer along while running Validator Node
{% endhint %}

Please head to [run normal node](/network/run-normal-node).

## Validator node

A validator node has the ability to emit new consensus events and along with the other validators, their responsibilities are verify transactions and secure the consensus. Events are transmitted to the network through Peer-to-peer messaging service. Users can send transactions into their own validators, a normal node, or an API node, and those transactions will then be propagated throughout the network.

Please head to [run validator node](/network/run-validator-node).


# Requirements

Installing dependencies and setting things up are required to run a node.

You can either run a node on your own hardware or use a cloud provider. We would recommend choosing one of the big cloud providers, e.g. Amazon AWS, Google Cloud.

Bare metal with equivalent or high specs are even better.&#x20;

## For normal node

Minimum hardware specifications:

* CPU: 4 cores
* RAM: 16 GB
* Network bandwidth: 1 Gbps
* Storage: SSD (solid-state drive)
* Storage capacity: depends on the types of your nodes.
  * **2.5 TB:** is sufficient if you're running using a pruned datadir.
  * **5 TB:** is needed if you'd like to run with a full size (non-pruned) datadir.
  * **1 TB:** is sufficient if you're running using a no-history genesis in snapsync mode (and then wait till it get synced to the latest block).

Operating system: Ubuntu Server 22.04 LTS (64 bit)

## For validator node

Minimum hardware specifications:

* CPU: 8 cores
* RAM: 32GB
* Network bandwidth: 1 Gbps
* Storage: SSD (solid-state drive)
* Storage capacity: depends on the types of your nodes.
  * **2.5 TB:** is sufficient if you're running using a pruned datadir.
  * **5 TB:** is needed if you'd like to run with a full size (non-pruned) datadir.
  * **1 TB:** is sufficient if you're running using a no-history genesis in snapsync mode (and then wait till it get synced to the latest block).

Operating system: Ubuntu Server 22.04 LTS (64 bit)

Once you have prepared your machine,&#x20;


# Build Dependencies

Before setting up your node, you need to prepare a machine that have installed dependencies.

## Network settings

These following ports must be exposed to the public internet:

* Port 22: for SSH
* Port 5050: for TCP and UDP traffic
* A custom port can be used with `--port <port>` flag when run your node.

## **Set up non-root user**

If there is already a non-root user available, you can skip this step.

```bash
# SSH into your machine
(local)$ ssh root@{IP_ADDRESS}
# Update the system
$ sudo apt-get update && sudo apt-get upgrade -y
# Create a non-root user
$ USER={USERNAME}
$ sudo mkdir -p /home/$USER/.ssh
$ sudo touch /home/$USER/.ssh/authorized_keys
$ sudo useradd -d /home/$USER $USER
$ sudo usermod -aG sudo $USER
$ sudo chown -R $USER:$USER /home/$USER/
$ sudo chmod 700 /home/$USER/.ssh
$ sudo chmod 644 /home/$USER/.ssh/authorized_keys
```

Make sure to paste your public SSH key into the **authorized\_keys** file of the newly created user in order to be able to log in via SSH.

```bash
# Enable sudo without password for the user
$ sudo vi /etc/sudoers
```

Add the following line to the end of the file:

```bash
{USERNAME} ALL=NOPASSWD: ALL
```

Now close the root SSH connection to the machine and log in as your newly created user:

```bash
# Close the root SSH connection
$ exit
# Log in as new user
(local)$ ssh {USERNAME}@{IP_ADDRESS}
```

## Install required tools

First, install the required build tools:

```bash
# Install build-essential
$ sudo apt-get install -y build-essential
```

Then install Go:

```bash
# Install go
$ wget <https://go.dev/dl/go1.19.3.linux-amd64.tar.gz>
$ sudo tar -xvf go1.19.3.linux-amd64.tar.gz
$ sudo mv go /usr/local
```

Export the required Go paths:

```bash
# Export go paths
$ vi ~/.bash_aliases
# Append the following lines
export GOROOT=/usr/local/go
export GOPATH=$HOME/go
export PATH=$GOPATH/bin:$GOROOT/bin:$PATH
```

Finally, validate your Go installation by checking its version:

```bash
$ go version
go version go1.19.3 linux/amd64
```


# Run Normal Node

This page will guide you how to run a normal node (or non-validator node).

Please follow to below guides to run your node:

* [Run mainnet normal node](/network/run-normal-node/mainnet-normal-node)
* [Run testnet normal node](/network/run-normal-node/testnet-normal-node)


# Mainnet Normal Node

## Build dependencies

Installing dependencies and setting things up are required to run a node, please check out [Build dependencies](#build-dependencies) if you have not done.

## Run a node

You can run your read node using [go-u2u](https://github.com/unicornultrafoundation/go-u2u) repository, branch `stable`.

**Note that https and ws must not be enabled on a server that stores wallet account.**

```bash
# Install go-u2u
$ git clone https://github.com/unicornultrafoundation/go-u2u.git
$ cd go-u2u/
$ git checkout stable
$ make
```

Validate your go-u2u installation:

```bash
$./build/u2u help

VERSION:
    x.x.x-rc.x
```

### **Running with mainnet genesis file**

You may use no-history genesis file and sync with `--syncmode snap`.

```bash
# Start u2u node
$ cd build/
$ wget https://github.com/unicornultrafoundation/u2u-genesis/raw/main/mainnet.g
$ nohup ./u2u --genesis mainnet.g --genesis.allowExperimental --syncmode snap &
```

Snapsync will sync much faster. Once it's fully synced, it will automatically switch to the full sync mode.

### **Syncing progress**

Once it's run, you should wait till it's synced up to the latest block before proceeding to the next step.

You may query the latest block number of your node:

```
$ ./u2u attach --exec u2u.blockNumber
```

Then you can compare with the latest block shown on the explorer ([u2uscan.xyz](https://u2uscan.xyz/)).

For trouble shooting your node, please check [this](/network/troubleshooting).


# Testnet Normal Node

## Build dependencies

Installing dependencies and setting things up are required to run a node, please check out [Build dependencies](#build-dependencies) if you have not done.

## Run a node

You can run your read node using [go-u2u](https://github.com/unicornultrafoundation/go-u2u) repository, branch `stable`.

**Note that https and ws must not be enabled on a server that stores wallet account.**

```bash
# Install go-u2u
$ git clone https://github.com/unicornultrafoundation/go-u2u.git
$ cd go-u2u/
$ git checkout stable
$ make
```

Validate your go-u2u installation:

```bash
$./build/u2u help

VERSION:
    x.x.x-rc.x
```

### **Running with testnet genesis file**

You may use no-history genesis file and sync with `--syncmode snap`.

```bash
# Start u2u node
$ cd build/
$ wget https://github.com/unicornultrafoundation/u2u-genesis/raw/main/testnet.g
$ nohup ./u2u --genesis testnet.g --genesis.allowExperimental --syncmode snap &
```

Snapsync will sync much faster. Once it's fully synced, it will automatically switch to the full sync mode.

### **Syncing progress**

Once it's run, you should wait till it's synced up to the latest block before proceeding to the next step.

You may query the latest block number of your node:

```
$ ./u2u attach --exec u2u.blockNumber
```

Then you can compare with the latest block shown on the explorer ([u2uscan.xyz](https://u2uscan.xyz/)).

For trouble shooting your node, please check [this](/network/troubleshooting).


# Run via Docker

## Prerequisites

### Docker and Docker compose

[Docker](https://docs.docker.com/get-docker/) and [Docker Compose](https://docs.docker.com/compose/install/) are required to run node.

### Pulling sources

First off, create a directory to store source codes and files for next steps (feel free to name it):

```
mkdir u2u_node
```

Change to created directory `u2u_node`:

```
cd u2u_node
```

#### Repository u2u-genesis

Clone the `u2u-genesis` repository to `u2u_node`:

```
git clone https://github.com/unicornultrafoundation/u2u-genesis.git
cd u2u-genesis
git checkout main
```

#### Repository go-u2u

Clone the `go-u2u` repository to `u2u_node`:

```
git clone https://github.com/unicornultrafoundation/go-u2u.git
cd go-u2u
git checkout stable
```

## Dockerfile

Create a file `Dockerfile` inside `u2u_node`. Below is the sample `Dockerfile`:

```
FROM golang:1.20-alpine as builder

RUN apk add --no-cache make gcc musl-dev linux-headers git

WORKDIR /go/go-u2u
COPY ./go-u2u .

ARG GOPROXY
RUN go mod download
RUN make u2u

FROM alpine:latest

RUN apk add --no-cache ca-certificates

COPY --from=builder /go/go-u2u/build/u2u /

EXPOSE 8545 8546 8547 30303

ENTRYPOINT ["/u2u"]
```

## docker-compose.yaml

Create a file `docker-compose.yaml` inside `u2u_node`. Below is sample `docker-compose.yaml` file:

```docker
version: "3"
services:
  u2u_node:
    build: .
    image: go-u2u:stable
    restart: always
    volumes:
      - u2u_node:/root/.u2u
      - ./u2u-genesis/mainnet.g:/genesis.g
    ports:
      - 8545:8545
      - 8546:8546
      - 30303:30303
    command: --genesis /genesis.g
      --genesis.allowExperimental
      --http
      --http.addr="0.0.0.0"
      --http.port=8545
      --http.corsdomain="*"
      --http.api="eth,debug,net,admin,web3,personal,txpool,dag"
      --ws
      --ws.addr "0.0.0.0"
      --ws.port=8546
      --ws.api "eth,debug,net,web3,txpool,dag"
      --ws.origins "*"
      --enabletxtracer
      --gcmode full
      --port 30303
    network_mode: host
volumes:
  u2u_node:
```

Note that:

* To run node on Solaris mainnet: you need to replace genesis file to `./u2u-genesis/mainnet.g`.
* To run node on Nebulas testnet: you need to replace genesis file to `./u2u-genesis/testnet.g`.

{% hint style="warning" %}
Since we have not published the testnet yet for external nodes to join. However, we are working on it, hang tight :tada:
{% endhint %}

## Run

Now your `u2u_node` folder will look like this:

```
docker-compose.yaml
Dockerfile
go-u2u/
u2u-genesis/
```

To run a node with Docker compose, open Terminal at `u2u_node` folder:

```
docker-compose up
```


# Run Validator Node

This page will guide you how to run a validator node.

Please follow to below guides to run your node:

* [Run mainnet validator node](/network/run-validator-node/mainnet-validator-node)
* [Run testnet validator node](/network/run-validator-node/testnet-validator-node)

Please visit [Troubleshooting validator node](https://docs.u2u.xyz/network/pages/0oRRCCKgH1eEcH1mwiAJ#3.-validator-node) if you face with any issues.


# Mainnet Validator Node

## Prepare a fully synced normal node

To run a validator node, a fully synced normal node is required. Please follow the link to [run a normal node](/network/run-normal-node).

You should use `--syncmode=full`, or use `--syncmode=snap` but wait til it is switched to full sync mode.

{% hint style="warning" %}
Note that https and ws must **NOT** be enabled on a server that stores wallet account because hackers can exploit via them.
{% endhint %}

## Register validator

After installing everything we need, you can continue by registering your validator node on-chain. To do this, you need to create a validator wallet. The wallet is the validator’s identity in the network which it uses to authenticate, sign messages, etc…

### Create a validator wallet

The node running and syncing the network in your current console, so you need to open up a new console window, connect via SSH to the server and enter the following commands to create a wallet:

```
$ ./u2u account new
```

After entering the command, you will get prompted to enter a password for the account (or wallet) — use a strong one! You can e.g. use a password manager to generate a 20+ digit password to secure your wallet.\
It will look something like this:

```
INFO [10-02|17:40:23.913] Maximum peer count                       total=50
INFO [10-02|17:40:23.913] Smartcard socket not found, disabling    err="stat /run/pcscd/pcscd.comm: no such file or directory"
INFO [10-02|17:40:23.913] Maximum peer count                       total=50
INFO [10-02|17:40:23.913] Smartcard socket not found, disabling    err="stat /run/pcscd/pcscd.comm: no such file or directory"
Your new account is locked with a password. Please give a password. Do not forget this password.
Passphrase: 
Repeat passphrase: 

Your new key was generated

Public address of the key:   0x1BB3BDF5BA61E9003706732F48e8734399473C16
Path of the secret key file: /home/steven/.u2u/keystore/UTC--2023-10-02T10-40-31.162498643Z--1bb3bdf5ba61e9003706732f48e8734399473c16

- You can share your public address with anyone. Others need it to interact with you.
- You must NEVER share the secret key with anyone! The key controls access to your funds!
- You must BACKUP your key file! Without the key, it's impossible to access account funds!
- You must REMEMBER your password! Without the password, it's impossible to decrypt the key!

```

{% hint style="danger" %}
NEVER share your private key or keystore with anyone!
{% endhint %}

***By the way:** The wallet above is not a real wallet we use, it’s just for demonstration purposes only.*&#x20;

### **Fund your validator wallet**

The next step is to fund your validator wallet with enough U2U to become a validator. That means you need to have at least 1,000,000 U2U in the wallet you just created (send a little more to cover transaction fees).

Make sure you wait for your node to be fully synced, otherwise your U2U will not show up in your wallet!

### Create a new validator key

We have to create validator private key to sign consensus messages with. It can be done only using go-u2u:

```
$ ./u2u validator new
```

Follow the prompts and supply the password, the output is as follows:

```
Your new key was generated

Public key:                  0xc004bcc53189fdeb42752bb2a40318e649aa03d3ff7ac65badc66f8768c5be4a04e1d03bea85fab33a94d6f6a576754fd6435183110482205336eb380dcf6094d5c9
Path of the secret key file: /home/steven/.u2u/keystore/validator/c004bcc53189fdeb42752bb2a40318e649aa03d3ff7ac65badc66f8768c5be4a04e1d03bea85fab33a94d6f6a576754fd6435183110482205336eb380dcf6094d5c9

- You can share your public key with anyone. Others need it to validate messages from you.
- You must NEVER share the secret key with anyone! The key controls access to your validator!
- You must BACKUP your key file! Without the key, it's impossible to operate the validator!
- You must REMEMBER your password! Without the password, it's impossible to decrypt the key!
```

### Create your validator via the SFC

You should wait for your node to sync to the latest block of the network before proceeding.&#x20;

Go to <https://staking.u2u.xyz/validator/register> to register your validator:

* Connect your wallet and make sure you have enough stake amount to become a validator.
* Fill in your validator public key
* Hit "Register" button
* Metamask pops up a confirmation, hit on "Confirm"
* Then wait for network confirms the transaction

<figure><img src="/files/49eL61u038V60eSepmOL" alt=""><figcaption></figcaption></figure>

You could use explorer to check your transaction status:

<figure><img src="/files/u3k9Jrz7qkxcllQYR2NZ" alt=""><figcaption></figcaption></figure>

To proceed, open up the console where you entered the commands to create the validator wallet previously and attach to the node console:

```
$ ./u2u attach
```

By doing so, you will get a JavaScript console where you can directly interact with the node and e.g. send transactions (which you will do in a moment):

```
Welcome to the Hashgraph JavaScript console!

instance: go-u2u/v1.0.0-rc.1-a2b8d980-1695987090/linux-amd64/go1.21.1
coinbase: 0x0000000000000000000000000000000000000000
at block: 1 (Sat Aug 26 2023 07:00:00 GMT+0700 (+07))
 datadir: /home/steven/.u2u
 modules: abft:1.0 admin:1.0 dag:1.0 debug:1.0 net:1.0 personal:1.0 rpc:1.0 trace:1.0 txpool:1.0 web3:1.0
```

From now on, when you see “>” prompt. That means you should type the command in Javascript console.&#x20;

Now initialize the SFC contract ABI variable:

```
abi = JSON.parse('[{"anonymous":false,"inputs":[{"indexed":true,"internalType":"uint256","name":"validatorID","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"status","type":"uint256"}],"name":"ChangedValidatorStatus","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"uint256","name":"validatorID","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"deactivatedEpoch","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"deactivatedTime","type":"uint256"}],"name":"DeactivatedValidator","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"previousOwner","type":"address"},{"indexed":true,"internalType":"address","name":"newOwner","type":"address"}],"name":"OwnershipTransferred","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"uint256","name":"value","type":"uint256"}],"name":"UpdatedBaseRewardPerSec","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"uint256","name":"blocksNum","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"period","type":"uint256"}],"name":"UpdatedOfflinePenaltyThreshold","type":"event"},{"payable":true,"stateMutability":"payable","type":"fallback"},{"constant":false,"inputs":[{"internalType":"uint256","name":"validatorID","type":"uint256"},{"internalType":"bool","name":"syncPubkey","type":"bool"}],"name":"_syncValidator","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":true,"inputs":[],"name":"currentEpoch","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[],"name":"currentSealedEpoch","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[{"internalType":"uint256","name":"","type":"uint256"}],"name":"getEpochSnapshot","outputs":[{"internalType":"uint256","name":"endTime","type":"uint256"},{"internalType":"uint256","name":"epochFee","type":"uint256"},{"internalType":"uint256","name":"totalBaseRewardWeight","type":"uint256"},{"internalType":"uint256","name":"totalTxRewardWeight","type":"uint256"},{"internalType":"uint256","name":"baseRewardPerSecond","type":"uint256"},{"internalType":"uint256","name":"totalStake","type":"uint256"},{"internalType":"uint256","name":"totalSupply","type":"uint256"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[{"internalType":"address","name":"delegator","type":"address"},{"internalType":"uint256","name":"toValidatorID","type":"uint256"}],"name":"getLockedStake","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[{"internalType":"address","name":"","type":"address"},{"internalType":"uint256","name":"","type":"uint256"}],"name":"getLockupInfo","outputs":[{"internalType":"uint256","name":"lockedStake","type":"uint256"},{"internalType":"uint256","name":"fromEpoch","type":"uint256"},{"internalType":"uint256","name":"endTime","type":"uint256"},{"internalType":"uint256","name":"duration","type":"uint256"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[{"internalType":"address","name":"","type":"address"},{"internalType":"uint256","name":"","type":"uint256"}],"name":"getStake","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[{"internalType":"address","name":"","type":"address"},{"internalType":"uint256","name":"","type":"uint256"}],"name":"getStashedLockupRewards","outputs":[{"internalType":"uint256","name":"lockupExtraReward","type":"uint256"},{"internalType":"uint256","name":"lockupBaseReward","type":"uint256"},{"internalType":"uint256","name":"unlockedReward","type":"uint256"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[{"internalType":"uint256","name":"","type":"uint256"}],"name":"getValidator","outputs":[{"internalType":"uint256","name":"status","type":"uint256"},{"internalType":"uint256","name":"deactivatedTime","type":"uint256"},{"internalType":"uint256","name":"deactivatedEpoch","type":"uint256"},{"internalType":"uint256","name":"receivedStake","type":"uint256"},{"internalType":"uint256","name":"createdEpoch","type":"uint256"},{"internalType":"uint256","name":"createdTime","type":"uint256"},{"internalType":"address","name":"auth","type":"address"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[{"internalType":"address","name":"","type":"address"}],"name":"getValidatorID","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[{"internalType":"uint256","name":"","type":"uint256"}],"name":"getValidatorPubkey","outputs":[{"internalType":"bytes","name":"","type":"bytes"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[{"internalType":"address","name":"","type":"address"},{"internalType":"uint256","name":"","type":"uint256"},{"internalType":"uint256","name":"","type":"uint256"}],"name":"getWithdrawalRequest","outputs":[{"internalType":"uint256","name":"epoch","type":"uint256"},{"internalType":"uint256","name":"time","type":"uint256"},{"internalType":"uint256","name":"amount","type":"uint256"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[{"internalType":"address","name":"delegator","type":"address"},{"internalType":"uint256","name":"toValidatorID","type":"uint256"}],"name":"isLockedUp","outputs":[{"internalType":"bool","name":"","type":"bool"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[],"name":"isOwner","outputs":[{"internalType":"bool","name":"","type":"bool"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[],"name":"lastValidatorID","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[],"name":"minGasPrice","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[],"name":"owner","outputs":[{"internalType":"address","name":"","type":"address"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":false,"inputs":[],"name":"renounceOwnership","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":true,"inputs":[{"internalType":"uint256","name":"","type":"uint256"}],"name":"slashingRefundRatio","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[],"name":"stakeTokenizerAddress","outputs":[{"internalType":"address","name":"","type":"address"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[{"internalType":"address","name":"","type":"address"},{"internalType":"uint256","name":"","type":"uint256"}],"name":"stashedRewardsUntilEpoch","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[],"name":"totalActiveStake","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[],"name":"totalSlashedStake","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[],"name":"totalStake","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[],"name":"totalSupply","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":false,"inputs":[{"internalType":"address","name":"newOwner","type":"address"}],"name":"transferOwnership","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":true,"inputs":[],"name":"treasuryAddress","outputs":[{"internalType":"address","name":"","type":"address"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[],"name":"version","outputs":[{"internalType":"bytes3","name":"","type":"bytes3"}],"payable":false,"stateMutability":"pure","type":"function"},{"constant":true,"inputs":[],"name":"voteBookAddress","outputs":[{"internalType":"address","name":"","type":"address"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":false,"inputs":[{"internalType":"uint256","name":"sealedEpoch","type":"uint256"},{"internalType":"uint256","name":"_totalSupply","type":"uint256"},{"internalType":"address","name":"nodeDriver","type":"address"},{"internalType":"address","name":"lib","type":"address"},{"internalType":"address","name":"_c","type":"address"},{"internalType":"address","name":"owner","type":"address"}],"name":"initialize","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":false,"inputs":[{"internalType":"address","name":"addr","type":"address"}],"name":"updateStakeTokenizerAddress","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":false,"inputs":[{"internalType":"address","name":"v","type":"address"}],"name":"updateLibAddress","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":false,"inputs":[{"internalType":"address","name":"v","type":"address"}],"name":"updateTreasuryAddress","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":false,"inputs":[{"internalType":"address","name":"v","type":"address"}],"name":"updateConstsAddress","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":true,"inputs":[],"name":"constsAddress","outputs":[{"internalType":"address","name":"","type":"address"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":false,"inputs":[{"internalType":"address","name":"v","type":"address"}],"name":"updateVoteBookAddress","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":false,"inputs":[{"internalType":"uint256[]","name":"offlineTime","type":"uint256[]"},{"internalType":"uint256[]","name":"offlineBlocks","type":"uint256[]"},{"internalType":"uint256[]","name":"uptimes","type":"uint256[]"},{"internalType":"uint256[]","name":"originatedTxsFee","type":"uint256[]"},{"internalType":"uint256","name":"epochGas","type":"uint256"}],"name":"sealEpoch","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":false,"inputs":[{"internalType":"uint256[]","name":"nextValidatorIDs","type":"uint256[]"}],"name":"sealEpochValidators","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"}]')
```

… as well as the SFC contract object itself:

```
sfc = web3.ftm.contract(abi).at("0xFC00FACE00000000000000000000000000000000")
```

After initializing both variables, you can now interact with the network’s SFC. Enter the following command to check that everything works as expected:

```
sfc.lastValidatorID()
```

Finally, execute the following command again to check your **validatorID**:

```
sfc.getValidatorID("{VALIDATOR_WALLET_ADDRESS}")
```

It should now return something other than “**0**”:

```
> sfc.getValidatorID("{VALIDATOR_WALLET_ADDRESS}")
3
```

Congrats, you are now a U2U validator! Close the console window by typing “exit”.

## Run your validator node

Before you run off celebrating, you need to restart your node in validator mode!\
\
Make sure your node is already synced to the latest block in read mode, and it's synced in `--syncmode full`. To stop the u2u process (read mode):

```
$ pkill u2u
```

Then wait a few seconds. Then head back to the console window where you started your node with the following command along with flags and options applied in synced normal node:

{% code overflow="wrap" %}

```
$ ./u2u --genesis mainnet.g --validator.id ID --validator.pubkey 0xPubkey --validator.password /path/to/password
```

{% endcode %}

## Troubleshooting

Please visit [Troubleshooting validator node](https://docs.u2u.xyz/network/run-validator-node/pages/0oRRCCKgH1eEcH1mwiAJ#3.-validator-node).


# Testnet Validator Node

## Prepare a fully synced normal node

To run a validator node, a fully synced normal node is required. Please follow the link to [run a normal node](/network/run-normal-node).

You should use `--syncmode=full`, or use `--syncmode=snap` but wait til it is switched to full sync mode.

{% hint style="warning" %}
Note that https and ws must **NOT** be enabled on a server that stores wallet account because hackers can exploit via them.
{% endhint %}

## Register validator

After installing everything we need, you can continue by registering your validator node on-chain. To do this, you need to create a validator wallet. The wallet is the validator’s identity in the network which it uses to authenticate, sign messages, etc…

### Create a validator wallet

The node running and syncing the network in your current console, so you need to open up a new console window, connect via SSH to the server and enter the following commands to create a wallet:

```
$ ./u2u account new
```

After entering the command, you will get prompted to enter a password for the account (or wallet) — use a strong one! You can e.g. use a password manager to generate a 20+ digit password to secure your wallet.\
It will look something like this:

```
INFO [10-02|17:40:23.913] Maximum peer count                       total=50
INFO [10-02|17:40:23.913] Smartcard socket not found, disabling    err="stat /run/pcscd/pcscd.comm: no such file or directory"
INFO [10-02|17:40:23.913] Maximum peer count                       total=50
INFO [10-02|17:40:23.913] Smartcard socket not found, disabling    err="stat /run/pcscd/pcscd.comm: no such file or directory"
Your new account is locked with a password. Please give a password. Do not forget this password.
Passphrase: 
Repeat passphrase: 

Your new key was generated

Public address of the key:   0x1BB3BDF5BA61E9003706732F48e8734399473C16
Path of the secret key file: /home/steven/.u2u/keystore/UTC--2023-10-02T10-40-31.162498643Z--1bb3bdf5ba61e9003706732f48e8734399473c16

- You can share your public address with anyone. Others need it to interact with you.
- You must NEVER share the secret key with anyone! The key controls access to your funds!
- You must BACKUP your key file! Without the key, it's impossible to access account funds!
- You must REMEMBER your password! Without the password, it's impossible to decrypt the key!

```

{% hint style="danger" %}
NEVER share your private key or keystore with anyone!
{% endhint %}

***By the way:** The wallet above is not a real wallet we use, it’s just for demonstration purposes only.*&#x20;

### **Fund your validator wallet**

The next step is to fund your validator wallet with enough U2U to become a validator. That means you need to have at least 1,000,000 U2U in the wallet you just created (send a little more to cover transaction fees).

Make sure you wait for your node to be fully synced, otherwise your U2U will not show up in your wallet!

### Create a new validator key

We have to create validator private key to sign consensus messages with. It can be done only using go-u2u:

```
$ ./u2u validator new
```

Follow the prompts and supply the password, the output is as follows:

```
Your new key was generated

Public key:                  0xc004bcc53189fdeb42752bb2a40318e649aa03d3ff7ac65badc66f8768c5be4a04e1d03bea85fab33a94d6f6a576754fd6435183110482205336eb380dcf6094d5c9
Path of the secret key file: /home/steven/.u2u/keystore/validator/c004bcc53189fdeb42752bb2a40318e649aa03d3ff7ac65badc66f8768c5be4a04e1d03bea85fab33a94d6f6a576754fd6435183110482205336eb380dcf6094d5c9

- You can share your public key with anyone. Others need it to validate messages from you.
- You must NEVER share the secret key with anyone! The key controls access to your validator!
- You must BACKUP your key file! Without the key, it's impossible to operate the validator!
- You must REMEMBER your password! Without the password, it's impossible to decrypt the key!
```

### Create your validator via the SFC

You should wait for your node to sync to the latest block of the network before proceeding.&#x20;

Go to <https://testnet-staking.u2u.xyz/validator/register> to register your validator:

* Connect your wallet and make sure you have enough stake amount to become a validator.
* Fill in your validator public key
* Hit "Register" button
* Metamask pops up a confirmation, hit on "Confirm"
* Then wait for network confirms the transaction

<figure><img src="/files/yR4miRHb3FjaKNvhPJaF" alt=""><figcaption></figcaption></figure>

You could use explorer to check your transaction status:

<figure><img src="/files/s5Wxx6spGDlfh1b0789C" alt=""><figcaption></figcaption></figure>

To proceed, open up the console where you entered the commands to create the validator wallet previously and attach to the node console:

```
$ ./u2u attach
```

By doing so, you will get a JavaScript console where you can directly interact with the node and e.g. send transactions (which you will do in a moment):

```
Welcome to the Hashgraph JavaScript console!

instance: go-u2u/v1.0.0-rc.1-a2b8d980-1695987090/linux-amd64/go1.21.1
coinbase: 0x0000000000000000000000000000000000000000
at block: 1 (Sat Aug 26 2023 07:00:00 GMT+0700 (+07))
 datadir: /home/steven/.u2u
 modules: abft:1.0 admin:1.0 dag:1.0 debug:1.0 net:1.0 personal:1.0 rpc:1.0 trace:1.0 txpool:1.0 web3:1.0
```

From now on, when you see “>” prompt. That means you should type the command in Javascript console.&#x20;

Now initialize the SFC contract ABI variable:

```
abi = JSON.parse('[{"anonymous":false,"inputs":[{"indexed":true,"internalType":"uint256","name":"validatorID","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"status","type":"uint256"}],"name":"ChangedValidatorStatus","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"uint256","name":"validatorID","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"deactivatedEpoch","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"deactivatedTime","type":"uint256"}],"name":"DeactivatedValidator","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"previousOwner","type":"address"},{"indexed":true,"internalType":"address","name":"newOwner","type":"address"}],"name":"OwnershipTransferred","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"uint256","name":"value","type":"uint256"}],"name":"UpdatedBaseRewardPerSec","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"uint256","name":"blocksNum","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"period","type":"uint256"}],"name":"UpdatedOfflinePenaltyThreshold","type":"event"},{"payable":true,"stateMutability":"payable","type":"fallback"},{"constant":false,"inputs":[{"internalType":"uint256","name":"validatorID","type":"uint256"},{"internalType":"bool","name":"syncPubkey","type":"bool"}],"name":"_syncValidator","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":true,"inputs":[],"name":"currentEpoch","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[],"name":"currentSealedEpoch","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[{"internalType":"uint256","name":"","type":"uint256"}],"name":"getEpochSnapshot","outputs":[{"internalType":"uint256","name":"endTime","type":"uint256"},{"internalType":"uint256","name":"epochFee","type":"uint256"},{"internalType":"uint256","name":"totalBaseRewardWeight","type":"uint256"},{"internalType":"uint256","name":"totalTxRewardWeight","type":"uint256"},{"internalType":"uint256","name":"baseRewardPerSecond","type":"uint256"},{"internalType":"uint256","name":"totalStake","type":"uint256"},{"internalType":"uint256","name":"totalSupply","type":"uint256"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[{"internalType":"address","name":"delegator","type":"address"},{"internalType":"uint256","name":"toValidatorID","type":"uint256"}],"name":"getLockedStake","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[{"internalType":"address","name":"","type":"address"},{"internalType":"uint256","name":"","type":"uint256"}],"name":"getLockupInfo","outputs":[{"internalType":"uint256","name":"lockedStake","type":"uint256"},{"internalType":"uint256","name":"fromEpoch","type":"uint256"},{"internalType":"uint256","name":"endTime","type":"uint256"},{"internalType":"uint256","name":"duration","type":"uint256"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[{"internalType":"address","name":"","type":"address"},{"internalType":"uint256","name":"","type":"uint256"}],"name":"getStake","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[{"internalType":"address","name":"","type":"address"},{"internalType":"uint256","name":"","type":"uint256"}],"name":"getStashedLockupRewards","outputs":[{"internalType":"uint256","name":"lockupExtraReward","type":"uint256"},{"internalType":"uint256","name":"lockupBaseReward","type":"uint256"},{"internalType":"uint256","name":"unlockedReward","type":"uint256"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[{"internalType":"uint256","name":"","type":"uint256"}],"name":"getValidator","outputs":[{"internalType":"uint256","name":"status","type":"uint256"},{"internalType":"uint256","name":"deactivatedTime","type":"uint256"},{"internalType":"uint256","name":"deactivatedEpoch","type":"uint256"},{"internalType":"uint256","name":"receivedStake","type":"uint256"},{"internalType":"uint256","name":"createdEpoch","type":"uint256"},{"internalType":"uint256","name":"createdTime","type":"uint256"},{"internalType":"address","name":"auth","type":"address"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[{"internalType":"address","name":"","type":"address"}],"name":"getValidatorID","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[{"internalType":"uint256","name":"","type":"uint256"}],"name":"getValidatorPubkey","outputs":[{"internalType":"bytes","name":"","type":"bytes"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[{"internalType":"address","name":"","type":"address"},{"internalType":"uint256","name":"","type":"uint256"},{"internalType":"uint256","name":"","type":"uint256"}],"name":"getWithdrawalRequest","outputs":[{"internalType":"uint256","name":"epoch","type":"uint256"},{"internalType":"uint256","name":"time","type":"uint256"},{"internalType":"uint256","name":"amount","type":"uint256"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[{"internalType":"address","name":"delegator","type":"address"},{"internalType":"uint256","name":"toValidatorID","type":"uint256"}],"name":"isLockedUp","outputs":[{"internalType":"bool","name":"","type":"bool"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[],"name":"isOwner","outputs":[{"internalType":"bool","name":"","type":"bool"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[],"name":"lastValidatorID","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[],"name":"minGasPrice","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[],"name":"owner","outputs":[{"internalType":"address","name":"","type":"address"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":false,"inputs":[],"name":"renounceOwnership","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":true,"inputs":[{"internalType":"uint256","name":"","type":"uint256"}],"name":"slashingRefundRatio","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[],"name":"stakeTokenizerAddress","outputs":[{"internalType":"address","name":"","type":"address"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[{"internalType":"address","name":"","type":"address"},{"internalType":"uint256","name":"","type":"uint256"}],"name":"stashedRewardsUntilEpoch","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[],"name":"totalActiveStake","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[],"name":"totalSlashedStake","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[],"name":"totalStake","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[],"name":"totalSupply","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":false,"inputs":[{"internalType":"address","name":"newOwner","type":"address"}],"name":"transferOwnership","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":true,"inputs":[],"name":"treasuryAddress","outputs":[{"internalType":"address","name":"","type":"address"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[],"name":"version","outputs":[{"internalType":"bytes3","name":"","type":"bytes3"}],"payable":false,"stateMutability":"pure","type":"function"},{"constant":true,"inputs":[],"name":"voteBookAddress","outputs":[{"internalType":"address","name":"","type":"address"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":false,"inputs":[{"internalType":"uint256","name":"sealedEpoch","type":"uint256"},{"internalType":"uint256","name":"_totalSupply","type":"uint256"},{"internalType":"address","name":"nodeDriver","type":"address"},{"internalType":"address","name":"lib","type":"address"},{"internalType":"address","name":"_c","type":"address"},{"internalType":"address","name":"owner","type":"address"}],"name":"initialize","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":false,"inputs":[{"internalType":"address","name":"addr","type":"address"}],"name":"updateStakeTokenizerAddress","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":false,"inputs":[{"internalType":"address","name":"v","type":"address"}],"name":"updateLibAddress","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":false,"inputs":[{"internalType":"address","name":"v","type":"address"}],"name":"updateTreasuryAddress","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":false,"inputs":[{"internalType":"address","name":"v","type":"address"}],"name":"updateConstsAddress","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":true,"inputs":[],"name":"constsAddress","outputs":[{"internalType":"address","name":"","type":"address"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":false,"inputs":[{"internalType":"address","name":"v","type":"address"}],"name":"updateVoteBookAddress","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":false,"inputs":[{"internalType":"uint256[]","name":"offlineTime","type":"uint256[]"},{"internalType":"uint256[]","name":"offlineBlocks","type":"uint256[]"},{"internalType":"uint256[]","name":"uptimes","type":"uint256[]"},{"internalType":"uint256[]","name":"originatedTxsFee","type":"uint256[]"},{"internalType":"uint256","name":"epochGas","type":"uint256"}],"name":"sealEpoch","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":false,"inputs":[{"internalType":"uint256[]","name":"nextValidatorIDs","type":"uint256[]"}],"name":"sealEpochValidators","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"}]')
```

… as well as the SFC contract object itself:

```
sfc = web3.ftm.contract(abi).at("0xFC00FACE00000000000000000000000000000000")
```

After initializing both variables, you can now interact with the network’s SFC. Enter the following command to check that everything works as expected:

```
sfc.lastValidatorID()
```

Finally, execute the following command again to check your **validatorID**:

```
sfc.getValidatorID("{VALIDATOR_WALLET_ADDRESS}")
```

It should now return something other than “**0**”:

```
> sfc.getValidatorID("{VALIDATOR_WALLET_ADDRESS}")
3
```

Congrats, you are now a U2U validator! Close the console window by typing “exit”.

## Run your validator node

Before you run off celebrating, you need to restart your node in validator mode!\
\
Make sure your node is already synced to the latest block in read mode, and it's synced in `--syncmode full`. To stop the u2u process (read mode):

```
$ pkill u2u
```

Then wait a few seconds. Then head back to the console window where you started your node with the following command along with flags and options applied in synced normal node:

{% code overflow="wrap" %}

```
$ ./u2u --genesis testnet.g --validator.id ID --validator.pubkey 0xPubkey --validator.password /path/to/password
```

{% endcode %}

## Troubleshooting

Please visit [Troubleshooting validator node](https://docs.u2u.xyz/network/run-validator-node/pages/0oRRCCKgH1eEcH1mwiAJ#3.-validator-node).


# Run A Local Test Network

This page guide you to run fakenet (private testing network) with N local nodes, primarily for testing/benchmarking purposes.

## Download go-u2u

Please check out and clone go-u2u source code:

```
git clone https://github.com/unicornultrafoundation/go-u2u
```

## Scripts

Scripts to run fakenet are located at `demo` folder, it contains these scripts:

* start network: `./start.sh`;
* stop network: `./stop.sh`;
* clean data and logs: `./clean.sh`;

You can specify number of genesis validators by setting N environment variable.

## Balance transfer example

from `demo/` dir

* Start network:

```sh
N=3 ./start.sh
```

* Attach js-console to running node0:

```sh
go run ../cmd/u2u attach http://localhost:4000
```

* Check the balance to ensure that node0 has something to transfer (node0 js-console):

```js
eth.getBalance(eth.accounts[0]);
```

output shows the balance value:

```js
1e+27
```

* Get node1 address:

```sh
go run ../cmd/u2u attach --exec "eth.accounts[0]" http://localhost:4001
```

output shows address:

```js
"0x02aff1d0a9ed566e644f06fcfe7efe00a3261d03"
```

* Transfer some amount from node0 to node1 address as receiver (node0 js-console):

```js
eth.sendTransaction(
	{from: eth.accounts[0], to: "0x02aff1d0a9ed566e644f06fcfe7efe00a3261d03", value:  "1000000000"},
	function(err, transactionHash) {
        if (!err)
            console.log(transactionHash + " success");
    });
```

output shows unique hash of the outgoing transaction:

```js
0x68a7c1daeee7e7ab5aedf0d0dba337dbf79ce0988387cf6d63ea73b98193adfd success
```

* Check the transaction status by its unique hash (js-console):

```sh
eth.getTransactionReceipt("0x68a7c1daeee7e7ab5aedf0d0dba337dbf79ce0988387cf6d63ea73b98193adfd").blockNumber
```

output shows number of block, transaction was included in:

```
174
```

* As soon as transaction is included into a block you will see new balance of both node addresses:

```sh
go run ../cmd/u2u attach --exec "eth.getBalance(eth.accounts[0])" http://localhost:4000
go run ../cmd/u2u attach --exec "eth.getBalance(eth.accounts[0])" http://localhost:4001
```

outputs:

```js
9.99999999978999e+26
1.000000000000001e+27
```


# Troubleshooting

## Current version of go-u2u

The current supported version is go-u2u, branch `stable` for both mainnet and testnet.

## Pruning node state

If your node is about to run out of space, you might think about adding more storage OR pruning the datadir on the current node. Please use the following steps to prune the datadir:

### **Manual pruning**

* Stop the node\
  `pkill u2u`
* Open up your Terminal, then run:\
  `./u2u snapshot --db.preset <preset> prune-state`

Depending on the machine's speed, the state pruning procedure could take a few hours for every several hundred gigabytes of data. So, you can run while using `nohup`.

### **Automatic pruning**

To enable automatic pruning, you can run a node with `--gcmode` flag, either `--gcmode full` or `--gcmode light`.\
\
Note that:

* Both `--gcmode full` and `--gcmode light`  will prune data that is processed after gcmode is enabled. Old data (before gcmode is enabled) is untouched.
* Validator node can use `--gcmode light` but should not use `--gcmode full`.
* `--gcmode full` option will prune much more EVM nodes than `--gcmode light` at expense of worse performance.

## Validator node

### **How to rerun a node if it is stopped**

If your node is down (for any reason), please review the server logs to determine if there is a problem. After fixing the problem (if any), you can run the node in read mode to synchronize it with the last block. Once synchronized, you can stop the node and run it in validator mode.&#x20;

Note that first make sure your node is synchronized under a normal node before running it in validator node.

### **Migration to a new server**

If you want to move your node to a new server, please follow these steps:

* Set up a normal node on the new server and enable it to run to sync with the latest block.
* Turn off the old node at least 40 minutes before running validator mode on the new server.
* After the old node is down for 40 minutes, you can run in authentication mode on the new server. Note that you should not leave the old node running again because this will cause your authentication node to be double-signed and slashing of your validator node.

### **How to stop a node**

Find u2u's running process by `ps`, then `kill` the process by id.&#x20;

Note that after your node is stopped, if you want to run it again, do not run it directly in validator mode. Instead, first make sure your node is synchronized in normal mode before running it in validator mode.

### **Offline node**

If your validator node is inactive for more than 5 days, it will go offline (i.e. removed from the network). For offline nodes, you can undelegate and wait 7 days for withdrawal (bonding time). You can then transfer funds to a new wallet and create a new validator if you want. Note that if you cancel a locked stake authorization or a locked authorization before the lockup period expires, this will result in a penalty.

### **How to permanently shut down a node**

To permanently disable a node, simply stop running it in validator mode for 5 days or more. It will then become offline.

### **How to unstake**

Please reference at [Staking](/services/staking).

## Troubleshooting&#x20;

### **Syncing error**

If your node is in dirty state (it may happen occasionally), please run:\
`u2u --db.preset legacy-ldb db heal --experimental`\
\
lternatively, you may do a fresh resync as follows:

* Stop the node
* Remove the current (broken) datadir (the default datadir is located at \~/.u2u)
* Download and build the latest version go-u2u
* Run your node again in normal mode

### **Slow syncing**

Check your machine specs if it meets the minimum requirements.

* IOPS greater than 5000 (higher is better)
* connection speed > 1 Gbps (some ppl run with 10 or 20, if they can)
* cores: more than 4 cores (the number of cores is not important unless you will use it for serving API calls).
* CPU: > 3GHz.

You can also check the following flags, if you're using them to run your node. You can adjust to  values suitable to your usage.

* `maxpeers` flag: default is 50, you can adjust it depending on your machine.
* `cache` flag: `--cache 15792` (A larger value can give better performance).
* `gcmode`: gcmode is not enabled by default. If enabled, [gcmode](#2.2-automatic-pruning) (light or full) it will take some extra CPU and time.

You can also increase the value of [`ulimit`](#increase-open-files-limit) on your machine as below.

## **Increase open files limit**

You can check your current limit value on Linux with the command `ulimit -n`. The default value of 1024, which may be not enough in some cases.

You can adjust the value to the recommended 500.000 open files limit by either:\
\- `ulimit -n 500000` \
\- change it in `/etc/security/limits.conf` configuration file, limit type nofile.


# Overview

Just a computer software

## Introduction

**U2U Subnet** is a set of peer-to-peer cryptography computers. It inherits the consensus and security layers of **U2U Network** . Subnet utilizes the **OVM** (Ostracism Virtual Machine), which is a high-speed graph reduction virtual machine designed to perform **Subnet DApps** (Subnet Decentralized Applications). The **OVM** compiles code written in various languages such as Python, Go, Rust, and TypeScript into a **Runtime**. This Runtime allows formally verified applications to run natively on the network, ensuring maximum mathematical security.

**Subnet** allows node operators contribute their computing resources to the network (eg CPU, RAM, GPU, Storage, Internet...), from mobile phone to super computer, forming a Decentralized Physical Infrastructure Network (**DePIN**) capable of hosting applications that stay up forever.


# Subnet Node Type

There are two types of Subnet Nodes

## Master Node

Master Nodes are integral components of the Subnet infrastructure, performing several critical functions:

**Transaction Management:**

* Store all Subnet transactions
* Validate all Subnet transactions

**Data Availability Layer (DAL):**

* Serve as the DAL for all Subnet Decentralized Applications
* Ensure data accessibility and integrity for the Subnet Ecosystem

**Cross-Network Operations:**

* Submit and Verify proofs between the Subnet and Mainnet
* Data Transmission between Subnet Protocols

**Reward Structure: Master Nodes receive compensation for their services through:**

* A portion of Subnet transaction fees
* Rewards for proof submission and verification between Subnet and Mainnet

*By fulfilling these roles, Master Nodes contribute to the security, reliability, and interoperability of the Subnet network, while also maintaining a connection with the main blockchain.*

## Verifier Node

Verifier Nodes leverage the **TEE** (Trusted Execution Environment) and **FHE** (Fully Homomorphic Encryption) technologies, it plays a crucial role for checking quality of service foreach Subnet Protocol, validate data integrity and maintaining the privacy of user's data.

* Data Versioning: Track changes in data and version control.
* Cyclic Redundancy Check (CRC): Detect errors in data transmission.
* Digital signatures: Use public key encryption to verify the origin and integrity of the data.
* Hash functions: Use algorithms such as MD5, SHA-256 to create a unique fingerprint for the data.

## Edge Node (or Contributor Node)

Edge Nodes are specialized components within the Subnet Ecosystem:

**Roles**: A node bound to specific protocols built on the Subnet Infrastructure

**Resource Contribution:** Edge Nodes can provide various computational resources to the Subnet, enhance the overall capacity and performance of the Subnet

* RAM (Memory)
* CPU (Processing power)
* GPU (Graphics processing capabilities)
* Storage (Data retention capacity)
* Internet bandwidth

**Reward Structure:**

Edge Nodes earn reward based on their contributed **DCU** (Distributed Computational Units) both from Network layer and Protocol layer (dual tokens mining)

**Protocol Specificity:** Each Edge Node is associated with a particular protocol, allowing for specialized functions within the Subnet Ecosystem

By leveraging these Edge Nodes, the Subnet can distribute computational tasks and storage requirements across a network of contributors, potentially improving scalability, resilience, and performance of the overall system.




---

[Next Page](/llms-full.txt/1)

