# Overview

Everclear is a novel public good mechanism for settling intents across chains. This mechanism:

1. Allows fillers to *socialize* the costs of rebalancing by netting off settlements against other fillers and users in the network.
2. Acts as a programmable layer for fillers or users to build and utilize any number of mechanisms for rebalancing/settling funds (e.g. by plugging into any messaging mechanism, liquidity pool, CEX, etc.)
3. Enables permissionless expansion to new chains and rollups, making it possible for any application on any chain to onboard users from any other chain.


# Background

Everclear is designed to solve problems experienced by participants in cross-domain intent protocols. Before diving into the protocol, let's learn about intents.

## Overview

Intents enable fast, cheap, and generalized transactions across chains. The core principle behind the model is simple: instead of needing to navigate the complexities of path-finding, bridging, switching chains, and paying gas for interchain transactions, users can just pay some service provider to do it on their behalf.

<figure><img src="/files/NfUY0LpLRj8QPx8XWReU" alt=""><figcaption><p>Architecture of intent based systems.</p></figcaption></figure>

Intent systems have three core steps:

1. **Intent Expression**: Users express their intent to do something on another chain (and their willingness to pay fees). Service providers (routers, solvers, fillers, etc.) listen for intents from users.
2. **Intent Execution:** Fillers compete against one another in an auction to fulfill a user’s intent at the best price in some form of auction, with the winning router submitting the user’s transaction to the target chain.
3. **Intent Settlement:** The protocol subsequently repays the winning filler the funds they filled with on the target chain.

In this model, users have their transactions on the target chain completed at the minimum base fee rate that fillers are able to provide.

## Solver Selection

Solver selection is specifically how intent protocols answer the question:

> When a user expresses their intent, how are they matched with a solver to fill it?

There are many approaches to this problem, each with their own set of tradeoffs:

<figure><img src="/files/2B661lT39lXVRCGE5Bqc" alt=""><figcaption><p>Comparison of common solver discovery and matching techniques.</p></figcaption></figure>

## Generalized Intents

While the majority of conversations around intents are focused on trading, intent-based bridging does not need to be limited to transfers of fungible assets. You can add arbitrary conditionality to solver settlement to get more interesting behavior out of solvers.

<figure><img src="/files/LPpoG0J361nBGBvzAnto" alt=""><figcaption><p>We can further generalize intents by making settlement conditions explicitly programmable.</p></figcaption></figure>


# How it Works

Let's dive deeper.


# Architecture

## Overview

<figure><img src="/files/M8qzAMyCI5XJvEwMvJkT" alt=""><figcaption><p>Everclear architecture.</p></figcaption></figure>

There are three types of messages related to intents within Everclear:

1. *Intent.* Created when a user generates an intent and dispatched periodically from the source chain to the clearing chain using the transport layer. Contains the source of truth information for the intent data.
2. *Fill. G*enerated when a solver fills an intent and dispatched periodically from the source chain to the clearing chain using the transport layer. Contains information about which solver should be credited in settlement.
3. *Settlement. G*enerated when both the intent and fill messages arrive on the clearing chain. Sent from the clearing chain to the settlement domain, which is where the solver will be repaid for intent execution.

### Flow of Funds

Funds are debited from the caller of `newIntent` and stored on a `Spoke` contract. The virtual balance for this spoke is incremented by the intent amount and can be used to settle solvers of other intents to this domain.&#x20;

Solvers must `deposit` into the `Spoke` contracts. This balance is debited when `fillIntent` is called.&#x20;

{% hint style="info" %}
`deposit` and `fillIntent` can be executed in the same call by the solver networks. `deposit` can also be called at any point in advance of filling.
{% endhint %}

Once an intent is filled and the message is added to the `FillQueue`, the solver can be thought of as possessing a claim on any of the available liquidity held on the `Spoke` contracts. Settlement of these claims happens via the `processSettlementQueue` function on the `Hub` contract.

{% hint style="info" %}
Intent settlement does *not* have to happen on the same domains associated with the intents, but can happen on any solver-configured spoke domain. \
\
This decouples repayment from intent routing and allows protocol participants to access a global settlement flow across chains.
{% endhint %}

Once the settlement messages arrive on the spokes, the settlement amounts are debited from the virtual balance held on that spoke and the associated solver has their balance incremented. At any point solvers can withdraw this virtual balance from the contracts or use it to fill new intents initiated from the settlement domain.

## Components

There are several on and off-chain components within this system.

### Contracts

* `Hub`. Handles inbound intent and fill messages on the clearing chain. Dispatches settlement of solver claims via the gateway contract.
* `HubGateway`. Dispatches messages to the transport layer and formats the inbound message payloads to properly call functions on the `Hub`.
* `Auctioneer`. Governs solver selection for routers. Routers compete in a race-to-the bottom auction. Only winning routers are reimbursed for transfers.
* `Spoke`. Holds funds from new intents (used as liquidity for settlement) and solver balances. Formats messages from the `Intent` and `Fill` queues and dispatches them via the `SpokeGateway` contract.
* `SpokeGateway`. Dispatches messages to the transport layer and formats the inbound settlement messages to properly call the functions on `Spoke`.

### Agents

* *Relayers.* These agents are responsible for executing periodic transactions across the network, primarily processing queues. Queues are processed according to configured age and size thresholds per chain.
* *Cartographer.* This agent is responsible for creating a natively cross-chain view of the network state. This view is derived from an indexing layer (i.e. subgraphs) on each chain.
* *Router.* The router is a solver that looks to execute crosschain transactions broadcast throughout the network. These solvers are useful for integrations of crosschain applications without their own solver network.

### Transport Layer

The transport layer is responsible for sending messages throughout the network. The messages are dispatched and processed by the `HubGateway` and `SpokeGateway` contracts. Everclear uses Hyperlane for message transport.


# Intents

Everclear supports the direct integration of solver networks and makes no assumptions about signaling, discovery, matching, or execution of the intent.

## Lifecycle

### Creation

Intents are created by calling `newIntent` on the `FeeAdapter` contract:

```solidity
/**
* @param fee The fee being charged on the inputAsset
* @param deadline The deadline timestamp after which the sig is no longer valid
* @param sig The signed payload from the fee signer for the intent 
*/
struct FeeParams {
  uint256 fee;
  uint256 deadline;
  bytes sig;
}

/**
   * @notice Creates a new intent
   * @param _destinations The destination chains of the intent
   * @param _to The destinantion address of the intent
   * @param _inputAsset The asset address on origin
   * @param _outputAsset The asset address on destination
   * @param _amount The amount of the asset
   * @param maxFee The maximum fee that can be taken by solvers
   * @param ttl The time to live of the intent
   * @param _data The data of the intent
   * @param _feeParams The fee parameters
   * @return _intentId The ID of the intent
   * @return _intent The intent object
   */
  function newIntent(
    uint32[] memory _destinations,
    address _to,
    address _inputAsset,
    address _outputAsset,
    uint256 _amount,
    uint24 _maxFee,
    uint48 _ttl,
    bytes calldata _data,
    IFeeAdapter.FeeParams calldata _feeParams
  ) external whenNotPaused returns (bytes32 _intentId, Intent memory _intent) {
```

This method will debit funds from the caller, charge a fee, and forward the call onto the EverclearSpoke contract. The Spoke will then emit an `IntentAdded` event, and insert an `Intent` message into the queue.&#x20;

### Intent Queue Dispatch

Periodically, messages within this queue are dispatched to the clearing chain by offchain agents.

{% hint style="info" %}
Offchain agents respect configured thresholds for queue size and age of oldest item when evaluating whether or not to dispatch messages.
{% endhint %}

Once the message arrives on the clearing chain, the intent is marked as `Added`.

### Intent Fulfillment

At any point after intent creation, solvers can fill the intent by calling `fillIntent` on the destination `Spoke` contract if they have sufficient balance stored on-chain:

{% hint style="info" %}
Everclear makes no assumptions about solver selection or intent execution. Adding liquidity can be done at the time of intent fulfillment.
{% endhint %}

```solidity
  /**
   * @notice fills an intent
   * @param _intent The intent structure
   * @return _fillMessage The enqueued fill message
   */
  function fillIntent(
    Intent calldata _intent,
    uint24 _fee
  ) external whenNotPaused returns (FillMessage memory _fillMessage) {

```

This method will debit funds from the stored balance of the caller, emit an `IntentFilled` event, and insert a `Fill` message into the queue.

### Fill Queue Dispatch

Periodically, messages within this queue is dispatched to the clearing chain by offchain agents.

{% hint style="info" %}
Offchain agents respect configured thresholds for queue size and age of oldest item when evaluating whether or not to dispatch messages.
{% endhint %}

Once the message arrives on the clearing chain, the intent is marked as `Filled` if the `Intent` message is not present. If both messages have arrived, the intent is marked as `ADDED_AND_FILLED` and is enqueued for settlement.

When intents are marked for settlement, their solver has balance on the clearing chain that can be claimed on any of the supported spokes with sufficient liquidity.

### Settlement Queue Dispatch

Periodically, offchain agents will dispatch the enqueued settlements. Offchain agents will by default settle to the intent's specified destination chain(s) if there is sufficient available liquidity, otherwise will settle to the solver-configured domain with the highest available liquidity.

{% hint style="info" %}
Offchain agents respect configured thresholds for queue size and age of oldest item when evaluating whether or not to dispatch messages.
{% endhint %}

Once an intent is dispatched for settlement, it is marked as `SETTLED`.

### Settlement Processing

Once the dispatched settlements arrive on the spoke contracts, funds are either sent to the solver directly or their virtual balance is incremented depending on their preference.

{% hint style="info" %}
This preference is set via the `setUpdateVirtualBalance` function on the `Hub` contract.
{% endhint %}

## How can I reduce my settlement latency?

There is a tradeoff between batch latency and system base messaging costs. Offchain agents hosted by Everclear will be subject to configured thresholds, but solvers can always make their own cost vs. latency tradeoffs by dispatching the queues themselves and including the estimated Hyperlane fee in the `msg.value` of the following functions:

**Intent and Fill Queue Methods**

```solidity
interface IGateway {
  /**
   * @notice Quotes cost of sending a message to the transport layer
   * @param _message The message to send
   * @return _fee The fee to send the message
   */
  function quoteMessage(uint32 _chainId, bytes memory _message) external view returns (uint256 _fee);
}

interface IEverclearSpoke {
  /**
   * @notice Process the intent queue messages to send a batched message to the transport layer
   * @param _intents The intents to process, must respect the intent queue order
   */
  function processIntentQueue(Intent[] calldata _intents) external payable;

  /**
   * @notice Process the fill queue messages to send a batching message to the transport layer
   * @param _amount The amount of messages to process and batch
   */
  function processFillQueue(uint32 _amount) external payable;
}
```

#### Settlement Queue Methods

```solidity
interface IGateway {
  /**
   * @notice Quotes cost of sending a message to the transport layer
   * @param _message The message to send
   * @return _fee The fee to send the message
   */
  function quoteMessage(uint32 _chainId, bytes memory _message) external view returns (uint256 _fee);
}

interface ISettler {
  /**
   * @notice Dispatches batch settlements to the transport layer for a domain and amount
   * @param _domain The domain which settlements queue is going to be processed
   * @param _amount The amount of settlements to be batched
   */
  function processSettlementQueue(uint32 _domain, uint32 _amount) external payable;
}
```


# Getting Started

## Everclear Overview

Everclear (prev Connext) is the first Clearing Layer.

More protocols such as UniswapX, 1Inch, CoWSwap, and Across are adopting intent-based order systems where users provide an intent and the protocol’s network of solvers compete to fill the request. This approach can provide optimal fulfillments and is becoming widely popular as more protocols aim to support account abstraction. However, once solvers are reimbursed for filling these orders, their funds are spread across chains and need to be moved back to the chain(s) they aim to provide their services from.

This is called `rebalancing` and for solvers it’s costly and complex to rebalance funds back to the chains they want to operate from. To do this today, solvers uses CEXs and bridges but close to 80% of `rebalancing` activity could be netted against each other. This would lead to a 10x cost reduction, simplify the process, and create opportunities to programmatically rebalance. For users, it would make intent fulfilment cheaper and enable liquidity to reach chains with ease.

We believe the future of on-chain activity will be intent based which will require solver networks to grow exponentially. Combined with the explosion of layer 2 and 3 chains, the biggest blocker to success of our ecosystems will be liquidity. By solving the `rebalancing` problem, we believe the potential of the multi-chain future can be unlocked.

#### How does Everclear work?

Rebalancers (solvers) deposit funds into a Spoke contract on any supported chain and specify the destination chain(s) they'd like to receive them on. As Rebalancers submit their intents, the Hub contract deployed on the Clearing chain will net their intents against others moving in the opposite direction.

When there are no Rebalancers to net the intent against, the Hub will discount the intent by a configured BPS per epoch. The intent will be discounted (up to a max threshold) until it is purchased by a new intent and the owner of the new intent will receive the discount as a bonus. For example:

* Origin intent of $100 discounted to $99 (moving from Arb to Op)
* New intent of $99 received (moving from Op to Arb)
* Origin intent owner receives $99 on Op
* New intent owner receives $100 on Arb

The discount approach is similar to a dutch auction and has been implemented to encourage Arbitrageurs to support the system. Arbitrageurs will monitor new intents on supported chains and purchase them once the discount applied reaches a profitable rate - competition between Arbitraguers should lead to optimal pricing for Rebalancers.

## Developing

Dedicated integration guides have been provided in the [Guides](/developers/guides) section for Rebalancers and Arbitrageurs. The [Everclear API](/developers/api)'s full OpenAPI specification is also available to reference. Finally, deployments for contracts and subgraphs can be found in [Resources](/resources/contracts).


# Fundamentals

**Architecture**

Everclear uses a Spoke and Hub model to transport intents and settlements between supported domains. Functions are triggered on the Spoke or Hub contracts, sent to the SpokeGateway or HubGateway, and transported between domains using Hyperlane. The Spoke domains are chains such as Ethereum Mainnet, Arbitrum, or Optimism whilst the Hub domain is the "Clearing chain" where the protocol's core logic is executed.&#x20;

Everclear is composed of Rebalancers using the system to rebalance funds across domains and Arbitrageurs monitoring the system to purchase discounted intents. Rebalancer intents will be netted against intents traveling in the opposing direction and when there are no intents to be matched with the transfer amount will be discounted by BPS every epoch. The amount will be discounted until a Rebalancer or Arbitrageur sends a matching new intent; up to a maximum discount threshold.

**Flow of Funds**

When a Rebalancer or Arbitraguer creates an intent, funds are pulled from their wallet and deposited in the Spoke contract. The unclaimed balance in the Spoke contract is increased by the intent amount, and it will be used to settle the user that purchases the original intent with a new intent.

New intents are added to the intent queue which is transported from the Spoke to the Clearing chain periodically. On the Hub domain, intents that cannot be matched with existing intents become invoices in the invoice queue whilst intents that can be matched become deposits in the deposit queue. The invoice and deposit queues are processed at the end of every epoch and matched items create settlements that are added to the settlement queue.

The settlements in the queue can be settled through different strategies depending on the intent type. An intent being netted would be settled with the netting strategy whereas xERC20 tokens being bridged would be settled with the xERC20 strategy. Two strategies that will be supported at launch: (1) Netting, and (2) xERC20.

Finally, the settlement queue is processed sending settlement messages from the Hub to the Spoke domains. Once the message has been transported to the corresponding Spoke domains, the destination domains for the matched intents, the user will receive tokens in their wallet or have an increased virtual balance depending on their settlement preference.

### **Components**

There are several on and off-chain components in the system.

#### **Supported Domains**

* `FeeAdapter`. This spoke contract is responsible for charging dynamic fees to users via the submission of a signed payload from our fee signer and it forwards all new intents onto the `EverclearSpoke`.
* `EverclearSpoke`. This spoke contract holds funds from created intents (used as liquidity for settlement). It formats messages from the `intentQueue` and dispatches them via the `SpokeGateway` contract.
* `SpokeGateway`. This spoke contract is responsible for dispatching messages to the transport layer, and formatting the inbound settlement messages to properly call the functions on the transport layer.
* `XERC20Module`. This spoke contract is responsible for burning and minting XERC20 tokens when interacting with the system.&#x20;

#### **Clearing Layer (Hub)**

* `Hub`. This clearing chain contract handles inbound intent messages and dispatches settlement via the gateway contract.
* `HubGateway`. This clearing chain contract is responsible for dispatching messages to the transport layer, and formatting the inbound message payloads to properly call the functions on the `Hub`.

#### Agents

* *Lighthouse.* This agent is responsible for managing the queues and executing cron jobs in the the network. Queues are processed according to configured age and size thresholds per chain.
* *Cartographer.* This agent is responsible for creating a natively cross-chain view of the network state. This view is derived from an indexing layer (i.e. subgraphs) on each chain.

#### **Transport Layer (Hyperlane)**

The transport layer is responsible for sending messages throughout the network. The messages are dispatched and processed by the `HubGateway` and `SpokeGateway` contracts.


# Protocol Mechanics

> For all integrations, follow the steps in the integration guides using the API which will construct a transaction request with a signed payload from our fee signer. The signed payload is required to submit a valid order to the `FeeAdapter` contract when creating a new intent.

## **Process Overview**

Everclear’s netting process is composed of five steps:

1. **Intent creation**: creation of a `newIntent` and transport from Spoke to Clearing chain
2. **Intent processing**: processing `newIntent` on the Clearing chain and converting to an `invoice` or `deposit`
3. **Invoice and deposit processing**: processing `invoices` and `deposits` to create `settlements`
4. **Intent settlement**: processing `settlements` and transporting the settlement information from Clearing chain to `Spoke`
5. **Intent fulfillment**: receiving the `settlementMessage` on the Spoke and crediting the recipient with funds (or virtual balance)

The two main actors in the system are:

* **Rebalancers**: centralised exchanges, solvers, market makers, and protocols rebalancing funds across chains
* **Arbitrageurs**: professional and individual actors monitoring invoices that have profitable discounts and providing liquidity when Rebalancers can not be netted against each other

### **Intent creation**

Intents can be created by anybody interacting with the Spoke contracts on supported domains. To create an intent users should call the API endpoint at `POST /intents` specifying the token, amount, and destination chain in the request body. The API response will include the contract address and transaction data that should be signed and submitted by the user.

See the [API docs](/developers/api) for more details.

The intent will be added to the IntentQueue on the Spoke contract and this will be periodically sent in a batch to the Hub contract on the Clearing chain when the queue size is more than a defined amount or the oldest item in the queue is older than a threshold.

### **Intent processing**

Once the intent reaches the Clearing chain, the Hub contract will check if there are invoices for the token being sent - invoices are intents waiting to be purchased/matched. If there are invoices, the new intent will be converted to a deposit and added to the deposit queue. If not, the intent will be converted to an invoice and be added to the invoice queue.&#x20;

Invoices and deposits create a queue for the token and destination domain pair such as a queue of 20x USDC invoices/deposits traveling to OP. As new intents reach the clearing chain, this process is repeated increasing the size of the queues until they are processed.

### **Invoice and deposit processing**

The intents stored in queues on the Hub contract as invoices and deposits are iterated to complete the processing step. The processing step occurs every epoch with a protocol configured epoch length - the epoch acts as a trigger to process queues and a reference point when calculating invoice discounts.

The invoice queue is iterated and the intents in the deposit queue will be checked to determine if there is enough liquidity to match the current invoice. When there is enough liquidity, the deposit queue is iterated. If the deposit can buy the rest of the invoice with surplus it will be decreased and remain in the queue to be matched with the next invoice. Whereas if the deposit will be entirely used to match the the current invoice, it will be removed from the deposit queue.

In this step, we compute the discount applied to the invoice (if any). The discount will translate to rewards for the depositor meaning they will receive the difference between the intent’s original amount and discounted amount as an additional reward in the settlement step. For example:

* Invoice of 100 USDC traveling from Optimism to Arbitrum
* Invoice discounted from 100 to 99
* Deposit of 99 traveling from Arbitrum to Optimism
* Invoice owner will receive 99 on Arbitrum
* Deposit owner will receive 100 on Optimism (+$1)

The discount applied to the intent amount is calculated as:

```solidity
discountBPS = (currentEpoch - entryEpoch) * discountPerEpoch
amountAfterDiscount = _invoice.amount - ((_amountToBeDiscounted * _discountBps) / Constants.BPS_FEE_DENOMINATOR);
```

Where:

* **amountToBeDiscounted:** the invoice amount or the deposit amount (when partially filled)
* **currentEpoch:** The current epoch
* **entryEpoch:** The epoch the invoice was created
* **discountPerEpoch:** The discount amount per epoch

When an invoice and deposit are matched, two settlement objects are added to the settlement queue on the Hub contract for each owner containing the token, amount, and destination chain. Using the example above: settlements of 99 USDC on Arb for invoice owner and 100 USDC on OP for deposit owner would be added to the settlement queue.

Once the invoice queue has been iterated and all possible matches with deposits have been made, the remaining deposits in the deposit queue are also iterated. The system checks if there is liquidity on the destination chain specified by each unmatched deposit and creates a settlement if so. In essence, the unmatched deposits in the queue are netted against each other to improve settlement efficiency and prevent them from becoming invoices.

Deposits are only eligible to be matched with invoices in the epoch they are received. After this epoch passes, an unmatched deposit that can not be netted against anything will be removed from the deposit queue, converted to an invoice, and added to the invoice queue. The process above will then repeat until a new intent (deposit) can be used to match with the invoice.

### **Intent settlement**

Once settlement objects have been added to the settlement queue on Hub, they are marked as `SETTLED` and are processed by Everclear. The settlement queue is processed by domain meaning all settlements for all assets on a domain are processed in one transaction each on Hub.

This step will iterate through the settlement queue, create SettlementMessage’s for each settlement, and remove each item from the queue. When all settlements for the assets provided have been iterated, the SettlementMessages will be batched and transported to the Spoke contract on the specified domain.

When the message arrives on the Spoke, funds will be transferred from the contract to the recipient or the recipient's virtual balance will be increased depending on the settlement strategy.

## Netting Auction

The netting auction is used to discount invoices that have not been matched via the netting system.&#x20;

New intents received by the Hub contract will have a one epoch exemption period before a discount is applied. Once the invoice has been in the invoice queue for more than one epoch, a BPS discount will be applied for every passing epoch. The invoice can be discounted by a maximum threshold which is defined by the user in BPS when `newIntent` is called.&#x20;

As the discount increases, the system relies on Arbitrageurs to fill the invoice when it becomes profitable for them to do so. By fostering a healthy ecosystem of Arbitrageurs, invoices that can not be netted should be filled at efficient prices as the Arbitrageurs race to fill invoices and risk missing out on rewards if they try to take too much profit. We plan to reduce the barriers to entry for new Arbitrageurs to create an efficient marketplace that will provide optimal pricing for users.

Invoices in the invoice queue can also be filled when new intents from Rebalancers are received. If the invoice has been discounted the new intent from a Rebalancer will receive their intent amount plus the discounted amount as a reward; meaning they will receive more than they transferred. This provides additional pressure for Arbitrageurs to fill intents because Rebalancer may equally fill intents in the meantime.

## **Fees**

There are a few costs that will reduce the amount a user will receive when using Everclear:

* Dynamic protocol fee
* Gas
* Solver fee (if applicable)
* Discounts (if intents become invoices)

When creating a `newIntent`, the user will be charged the protocol fee to use the netting system currently calculated off-chain and charged when submitting an order to the `FeeAdapter` contract plus the gas fee for submitting a transaction onchain.

In addition, a solver fee should be supplied if the user specifies `ttl > 0` when creating a new intent. This is the gas cost for a solver to execute the intent on destination. It should be high enough to incentivize solvers to fill the intent.

Finally, if an intent is not filled within the `ttl` and no other intents are netted against it, it will be converted into an invoice and get discounted.&#x20;

For users transferring xERC20s, view the xERC20 section for more information.&#x20;

## **Batch frequency**

There are three points where queues are batch processed:

* Intent queues sent from Spoke(s) to Hub
* Invoice and deposit queues processed on Hub
* Settlement queues sent from Hub to Spoke

The queue processing speeds impacts how quickly intents are settled when using the netting system. Increasing the pace of processing will lead to a faster settlement experience for Rebalancers and higher APRs for Arbers as they can recycle funds in more epochs to purchase invoices. However, all queues are processed by Everclear and increasing the speed will lead to higher protocol costs and consequently a higher protocol fee applied to all intents.

All processing functions for queues are public meaning they could be executed by Rebalancers or Arbers who would like to speed up the process. The examples below will describe each queue process and reference how a user could execute a transaction to speed up a queue.

### Intent Queue

The intent queues holds the intents that have been submitted to the Spoke contracts that are waiting to be transported to the Hub. The processing speed for this queue may vary by chain based on the whether there are more than a number of items in the queue OR the oldest item is older than an amount of minutes.

The `processIntentQueue` function is public, allowing anybody to process the intentQueue by calling the function with a list of intents. To successfully call this function:

1. Query the Subgraph on the origin domain to fetch the intentQueue
2. Provide the list of intents in the correct order they are stored in the intentQueue
3. Provide msg.value that will pay Hyperlane to send the message from Spoke to Clearing chain

```solidity
/**
 * @notice Process the intent queue messages to send a batched message to the transport layer
 * @param _intents The intents to process, must respect the intent queue order
*/
function processIntentQueue(Intent[] calldata _intents) external payable;
```

### Invoice & Deposit Queue

The invoice and deposit queues hold intents received by the Hub, which are categorised depending on whether they can be matched with an existing invoice or not. This will be processed when there are more than a defined number of items in the queue or the oldest item is older than a threshold.

The `processDepositsAndInvoices` function is public, allowing anybody to process the deposit and invoice queue by calling the function with a ticker hash.

```solidity
/**
 * @notice Process the epochs for a specific asset
 * @param _tickerHash The asset for which epochs are going to be processed
 *
*/
function processDepositsAndInvoices(bytes32 _tickerHash) external;
```

### Settlement Queue

The settlement queue holds the invoices and deposits that have been matched on the Hub, where two settlements are generated to pay both of the owners on their corresponding chains. This will be processed when there are more than a defined number items in the queue or the oldest item is older than a threshold.

The `processSettlementQueue` function is public, allowing anybody to process the settlement queue by calling the function with a domain and amount. To successfully call the function:

1. Provide the domain that is being settled to
2. Provide the amount of settlements that should be processed

```solidity
/**
 * @notice Dispatches batch settlements to the transport layer for a domain and amount
 * @param _domain The domain which settlements queue is going to be processed
 * @param _amount The amount of settlements to be batched
*/
function processSettlementQueue(uint32 _domain, uint32 _amount) external payable;
```


# Guides

Here you'll find some helpful guides for getting started building with the Everclear protocol.


# Quickstarter

## 🧩 Everclear Intents Overview

The **Everclear system** supports multiple types of **intents**, depending on user needs — speed, cost, and liquidity availability.\
Each intent represents a user’s instruction to transfer or swap assets across chains.

***

### 🔹 Intent Types

#### 1. **Basic Intent (Netting Path)**

* **Description:** The standard route for intent execution.
* **Speed:** \~20 minutes
* **Fees:** Lowest among all intent types
* **Path:** Uses the **regular netting path** where settlement happens after batching.

***

#### 2. **Priority Settlement (Same Asset)**

* **Description:** Faster settlement for transfers of the **same asset** across chains.
* **Speed:** < 2 minutes
* **Fees:** Slightly higher than Basic
* **Execution:** Filled directly by the **solver** from inventory.

***

#### 3. **Priority Settlement Swap (Bridge + Swap)**

* **Description:** Enables **cross-chain swaps** (different assets between chains).
* **Speed:** < 2 minutes
* **Fees:** Depends on liquidity and route (includes swap fees)
* **Execution:** Solver fulfills both **bridge + swap** in a single fast operation.

***

### ⚙️ Creating Intents

All intents are created through the **API**.\
Before creation, it’s recommended to **fetch quotes** to understand fees, expected output, and available routes.

***

### 💬 Getting Quotes

Use the **`/routes/quotes`** endpoint to get an estimate of:

* Expected output amount after fees
* Fee breakdown (fixed + variable)
* Route limits
* Settlement time estimates
* Availability of fast path options

***

#### 🧠 Example: Get Quote for Sending 10K USDC Optimism → USDT Ethereum

```js
const axios = require('axios');

const data = JSON.stringify({
  "origin": "10", // Origin chain ID (Optimism)
  "destinations": ["1"], // Destination chain IDs (Ethereum)
  "inputAsset": "0x0b2C639c533813f4Aa9D7837CAf62653d097Ff85", // USDC on OP
  "amount": "10000000000", // Amount in asset decimals (10,000 USDC = 1e10)
  "to": "0xade09131C6f43fe22C2CbABb759636C43cFc181e", // Receiver address
  "from": "0xade09131C6f43fe22C2CbABb759636C43cFc181e" // Sender address
});

const config = {
  method: 'post',
  url: 'https://api.everclear.org/routes/quotes',
  headers: { 
    'Content-Type': 'application/json'
  },
  data
};

axios.request(config)
  .then((response) => console.log(JSON.stringify(response.data, null, 2)))
  .catch((error) => console.error(error));
```

***

#### 💡 For Priority Settlement Swap

To request a quote for **Priority Settlement Swap** (different input/output assets), include `outputAsset` on the destination chain:

```js
const data = JSON.stringify({
  "origin": "10",
  "destinations": ["1"],
  "inputAsset": "0x0b2C639c533813f4Aa9D7837CAf62653d097Ff85", // USDC on OP
  "outputAsset": "0xdAC17F958D2ee523a2206206994597C13D831ec7", // USDT on ETH
  "amount": "10000000000",
  "to": "0xade09131C6f43fe22C2CbABb759636C43cFc181e",
  "from": "0xade09131C6f43fe22C2CbABb759636C43cFc181e"
});
```

***

### 📦 Sample Response

```json
{
  "fixedFeeUnits": "537600",
  "variableFeeBps": 0,
  "totalFeeBps": 0.5376,
  "expectedAmount": "9999462400",
  "currentLimit": "4999959549397",
  "settlementEstimate": {
    "p25Minutes": 11.75,
    "p50Minutes": 15,
    "p75Minutes": 19.75
  },
  "splitCount": 1,
  "fastPathQuote": {
    "fixedFeeUnits": "537600",
    "variableFeeBps": 3,
    "totalFeeBps": 3.5376,
    "expectedAmount": "9996462400"
  },
  "reqType": "bridge"
}
```

***

#### 🧾 Response Fields Explained

| Field                | Description                                       |
| -------------------- | ------------------------------------------------- |
| `fixedFeeUnits`      | Flat fee for the route                            |
| `variableFeeBps`     | Variable fee (in basis points) based on liquidity |
| `totalFeeBps`        | Combined total fee in basis points                |
| `expectedAmount`     | Expected output after all fees                    |
| `currentLimit`       | Current route capacity                            |
| `settlementEstimate` | Estimated time (in minutes) for completion        |
| `splitCount`         | Number of route splits (if multi-path)            |
| `fastPathQuote`      | Fee + output estimate for Fast Path execution     |
| `reqType`            | Request type (`bridge` / `swap`)                  |

***

#### 🧭 Notes

* Always **check `currentLimit`** to ensure your intent can be routed immediately.
* Fast path routes may be unavailable if solver liquidity is low.
* Basic path provides more predictable execution but slower settlement.

## 🚀 Creating Intents

After obtaining a quote via the `/routes/quotes` endpoint, you can create an **Intent** using the `/intents/` endpoint.\
The intent defines the exact on-chain transaction parameters required to initiate a transfer or swap through Everclear.

***

### 🧭 Intent Creation Flow

1. **Get Quote** → `/routes/quotes`\
   Preview available routes, estimated output, and fees.
2. **Create Intent** → `/intents/`\
   Submit chosen parameters (origin, destination, input/output assets).
3. **Execute Transaction** → On-chain\
   Use the returned calldata + target address from the API response.

***

### 🔹 Endpoint

```
POST https://api.everclear.org/intents/
```

***

### ⚙️ Common Request Parameters

| Field          | Type       | Required | Description                                           |
| -------------- | ---------- | -------- | ----------------------------------------------------- |
| `amount`       | `string`   | ✅        | Amount to send (in token decimals).                   |
| `origin`       | `string`   | ✅        | Chain ID of the source network.                       |
| `destinations` | `string[]` | ✅        | Array of destination chain IDs.                       |
| `inputAsset`   | `string`   | ✅        | Asset address on the origin chain.                    |
| `outputAsset`  | `string`   | Optional | Destination asset address (only for swaps).           |
| `to`           | `string`   | ✅        | Receiver wallet address.                              |
| `from`         | `string`   | ✅        | Sender wallet address.                                |
| `callData`     | `string`   | Optional | Additional encoded calldata (if any).                 |
| `isFastPath`   | `boolean`  | Optional | `true` for Fast Path, omit or `false` for Basic Path. |

***

### 🧠 Example 1: **Basic Intent (Netting Path)**

For the **regular 15–20 minute netting route** (lowest fees),\
➡️ **Remove both `outputAsset` and `isFastPath`**.

```js
const data = JSON.stringify({
  "amount": "10000000000",
  "origin": "10",
  "destinations": ["1"],
  "inputAsset": "0x0b2C639c533813f4Aa9D7837CAf62653d097Ff85", // USDC on OP
  "to": "0xade09131C6f43fe22C2CbABb759636C43cFc181e",
  "from": "0xade09131C6f43fe22C2CbABb759636C43cFc181e"
});
```

This will route the intent through the **standard netting system**, ideal for larger or lower-fee transfers.

***

### 🧠 Example 2: **Fast Path (Same Asset)**

Transfer **10,000 USDT** from **Optimism** → **Ethereum**, same token (no swap).\
➡️ Remove the `outputAsset` field.

```js
const data = JSON.stringify({
  "amount": "10000000000",
  "origin": "10",
  "destinations": ["1"],
  "inputAsset": "0xdAC17F958D2ee523a2206206994597C13D831ec7", // USDT on OP
  "to": "0xade09131C6f43fe22C2CbABb759636C43cFc181e",
  "from": "0xade09131C6f43fe22C2CbABb759636C43cFc181e",
  "isFastPath": true
});
```

***

### 🧠 Example 3: **Fast Path Swap (Bridge + Swap)**

Transfer **10,000 USDC** from **Optimism (chainId 10)** → **Ethereum (chainId 1)** as **USDT**, via Fast Path.

```js
const axios = require('axios');

const data = JSON.stringify({
  "amount": "10000000000", // 10,000 USDC (in decimals)
  "origin": "10", // Optimism
  "destinations": ["1"], // Ethereum
  "inputAsset": "0x0b2C639c533813f4Aa9D7837CAf62653d097Ff85", // USDC on OP
  "outputAsset": "0xdAC17F958D2ee523a2206206994597C13D831ec7", // USDT on ETH
  "to": "0xade09131C6f43fe22C2CbABb759636C43cFc181e",
  "from": "0xade09131C6f43fe22C2CbABb759636C43cFc181e",
  "callData": "",
  "isFastPath": true // Fast Path = under ~2 mins
});

const config = {
  method: 'post',
  url: 'https://api.everclear.org/intents/',
  headers: { 
    'Content-Type': 'application/json'
  },
  data
};

axios.request(config)
  .then((response) => console.log(JSON.stringify(response.data, null, 2)))
  .catch((error) => console.error(error));
```

***

### 📦 Response

```json
{
  "to": "0xd0185bfb8107c5b2336bC73cE3fdd9Bfb504540e",
  "data": "0x...",
  "chainId": 10,
  "value": "0"
}
```

***

### 🧾 Response Fields

| Field     | Type     | Description                                                                 |
| --------- | -------- | --------------------------------------------------------------------------- |
| `to`      | `string` | The **Fees Adapter** contract address — transaction target.                 |
| `data`    | `string` | Encoded calldata required for execution.                                    |
| `chainId` | `number` | Origin chain ID where transaction must be broadcast.                        |
| `value`   | `string` | Native token (in wei) to send along with the transaction (typically `"0"`). |


# Priority Settlement

#### **Priority Settlement (Same Asset)**

Priority settlement provides 1-2min cross chain transfers for the same asset on the origin and destination chains e.g. USDC Arbitrum to Ethereum.&#x20;

These intents are filled optimistically by the Everclear solver using our inventory. Fees are slightly higher than regular intents.

### 🧭 Intent Creation Flow

1. **Get Quote** → `/routes/quotes`\
   Preview available routes, estimated output, and fees.
2. **Create Intent** → `/intents/`\
   Submit chosen parameters (origin, destination, input/output assets).
3. **Execute Transaction** → On-chain\
   Use the returned calldata + target address from the API response.

### 🔹 Endpoints

Get quote ([Documentation](/developers/api#post-intents)):

```
GET https://api.everclear.org/routes/quotes
```

Create intent ([Documentation](/developers/api#post-routes-quotes)):

```
POST https://api.everclear.org/intents/
```

### 🧠 Example: **Fast Path (Same Asset)**

Transfer **10,000 USDT** from **Optimism** → **Ethereum**, same token (no swap).\
➡️ Remove the `outputAsset` field.

```js
const axios = require('axios');

// Construct intent
const data = JSON.stringify({
  "amount": "10000000000",
  "origin": "10",
  "destinations": ["1"],
  "inputAsset": "0xdAC17F958D2ee523a2206206994597C13D831ec7", // USDT on OP
  "to": "0xade09131C6f43fe22C2CbABb759636C43cFc181e",
  "from": "0xade09131C6f43fe22C2CbABb759636C43cFc181e",
  "isFastPath": true
});

const config = {
  method: 'post',
  url: 'https://api.everclear.org/routes/quotes',
  headers: { 
    'Content-Type': 'application/json'
  },
  data
};

// Get Quote
axios.request(config)
  .then((response) => console.log(JSON.stringify(response.data, null, 2)))
  .catch((error) => console.error(error));
```


# Cross Chain Swaps

#### **Cross Chain Swaps (Different Assets)**

Cross chain swaps provides 1-2min swaps between assets on the origin and destination chains e.g. USDC Arbitrum to USDT on Ethereum.&#x20;

These intents are filled optimistically by the Everclear solver using our inventory. Fees are slightly higher than regular intents and depend on available liquidity and the route.

### 🧠 Example: **Fast Path Swap (Bridge + Swap)**

Transfer **10,000 USDC** from **Optimism (chainId 10)** → **Ethereum (chainId 1)** as **USDT**, via Fast Path.

➡️ Must include the `outputAsset` field for Swaps.

```js
const axios = require('axios');

const data = JSON.stringify({
  "amount": "10000000000", // 10,000 USDC (in decimals)
  "origin": "10", // Optimism
  "destinations": ["1"], // Ethereum
  "inputAsset": "0x0b2C639c533813f4Aa9D7837CAf62653d097Ff85", // USDC on OP
  "outputAsset": "0xdAC17F958D2ee523a2206206994597C13D831ec7", // USDT on ETH
  "to": "0xade09131C6f43fe22C2CbABb759636C43cFc181e",
  "from": "0xade09131C6f43fe22C2CbABb759636C43cFc181e",
  "callData": "",
  "isFastPath": true // Fast Path = under ~2 mins
});

const config = {
  method: 'post',
  url: 'https://api.everclear.org/intents/',
  headers: { 
    'Content-Type': 'application/json'
  },
  data
};

axios.request(config)
  .then((response) => console.log(JSON.stringify(response.data, null, 2)))
  .catch((error) => console.error(error));
```


# xERC20

> For all integrations, follow the steps in the Creating a new Intent section using the API which will construct a transaction request with a signed payload from our fee signer. The signed payload is required to submit a valid order to the `FeeAdapter` contract when creating a new intent.

## Process Overview

The XERC20 open token standard for a multi-chain ERC20 which can be transferred across chains with no slippage and without compromising security. Token issuers can control the chains their token is deployed to and set rate limits on a per-bridge basis - making the token natively multichain without compromises.

The process of setting up XERC20 infrastructure can be found in this guide; token issuers should contact our team once they would like their XERC20 to be supported by Everclear and provide a list of chains they would like to be supported (where the XERC20 token exists).

`XERC20` bridging **should only be used** once:

* XERC20 infrastructure deployed by the token issuer
* XERC20 token approved on the Hub&#x20;
* XERC20 token status stored on Spokes (as per request from token issuer)
* Token issuer has given `XERC20Module` mint and burn limits on supported chains

The process of bridging an XERC20 with the Spoke is as follows:

1. User approves the `FeeAdapter` contract to pull `XERC20` from wallet
2. User calls `newIntent` on the `FeeAdapter`, funds are pulled from wallet to `FeeAdapter` contract, fees are applied, the call is forwarded onto the `EverclearSpoke`, and tokens are burned by the `XERC20Module`
3. Intents are transported from Spoke to clearing chain periodically when the queue size is more than a threshold of items or the oldest item in the queue is more than threshold of minutes
4. Clearing chain receives intent and adds to the invoice queue if it’s the only intent for the xERC20 tickerHash on Hub OR adds the intent to the deposit queue
5. Invoice and deposit queues are processed every epoch. As the `XERC20` does not need to be matched with another invoice, a settlement is automatically created and added to the settlement queue
6. The settlement queue is processed on the Hub and transported to the Spoke contract when the queue size is more than a threshold of item or the oldest item in the queue is more than threshold of minutes
7. Spoke contract receives SettlementMessage’s and calls the `XERC20Module` contract to mint tokens to the recipient

*If the minting limit has been reached, the `XERC20Module` will store the amount and recipient. The tokens can be minted when the limit resets by calling `mintDebt` .*

## Creating an xERC20 Intent

As a user, you will need to interact with the FeeAdapter contract on the origin domain to create a new intent that will be processed by the netting system.

### `newIntent` called on `FeeAdapter` contract

The entry point to bridge an XERC20 is newIntent on the FeeAdapter contract of the origin domain. The `destinations` field can be defined as a single item or an array - the Hub will select the first supported domain to bridge to so we recommend solely providing a supported domain.

The `maxFee` **must be set to 0** as `maxFee` is not applicable to the XERC20 order type. The `ttl` must **be set to 0** to indicate the order should be routed via the native XERC20 route.

The `feeParams` consists of `fee`, `deadline`, and `signature` which would be generated through interacting with the API. The `fee` will be the amount being charged to the user, the `deadline` is the period of time where the fee is valid, and the `signature` will be the signed payload from the Everclear fee signer to confirm the provided inputs provided are valid.&#x20;

```solidity
  /**
  * @param fee The fee being charged on the inputAsset
  * @param deadline The deadline timestamp after which the sig is no longer valid
  * @param sig The signed payload from the fee signer for the intent 
  */
  struct FeeParams {
    uint256 fee;
    uint256 deadline;
    bytes sig;
  }
  
  /**
 * @notice Creates a new intent
 * @param _destinations The possible destination chains of the intent
 * @param _receiver The destinantion address of the intent
 * @param _inputAsset The asset address on origin
 * @param _outputAsset The asset address on destination
 * @param _amount The amount of the asset
 * @param _maxFee The maximum fee that can be taken by solvers
 * @param _ttl The time to live of the intent
 * @param _data The data of the intent
 * @param _feeParams The fee parameters
 * @return _intentId The ID of the intent
 * @return _intent The intent object
*/
  function newIntent(
    uint32[] memory _destinations,
    address _receiver,
    address _inputAsset,
    address _outputAsset,
    uint256 _amount,
    uint24 _maxFee,
    uint48 _ttl,
    bytes calldata _data
    IFeeAdapter.FeeParams calldata _feeParams
  ) external returns (bytes32 _intentId, Intent memory _intent);
```

When the `FeeAdapter` contract completes the `newIntent` call, it will charge the user fees, forward the call to the `EverclearSpoke`, and the `XERC20Module` will use its burning limit to burn the assets being bridged. The intent will then be added to the `intentQueue`, and periodically sent to the `Hub` contract on the clearing chain - depending on the configuration of the max queue size and age for the origin domain.

An intent can be created by interacting directly with the contract. The following is a simple example sending 100 xTOKEN via the XERC20 route from Sepolia Testnet to BNB Testnet.

```tsx
import { ethers, BigNumberish } from 'ethers'

// Wallet and contract configuration //
const PRIVATE_KEY = "<PRIVATE_KEY>";
const RPC_URL_ARB = "<RPC_URL>";
const FEE_ADAPTER = ""; // FeeAdapter on origin chain
const ERC20_ABI = ["function approve(address spender, uint256 amount) external"]

// Function inputs //
const ORIGIN = "11155111"
const DEST = ["97"] // Single item - Sending to BNB testnet
const DESTS = ["97","xyz"] // Multiple items - Sepolia and xyz testnet
const TO = "0x..." // Receiver address on destination domain
const XTOKEN_SEPOLIA_TEST = "0x...."; // XTOKEN on Sepolia testnet
const XTOKEN_BNB_TEST = "0x...."; // XTOKEN on BNB testnet
const AMOUNT_IN = ethers.toBigInt(100_000_000); // Amount being transferred
const MAX_FEE = 0; // No max fee applicable to XERC20 orders
const TTL = 0; // Specifying ttl as 0 for an XERC20 bridges via native XERC20 route

async function newIntent(): Promise<void> {
	// Configuring the provider and wallet for the solver
	const provider = new ethers.JsonRpcProvider(RPC_URL_ARB);
	const wallet = new ethers.Wallet(PRIVATE_KEY, provider);
	
	// Configuring the contract instance
	const xTokenContract = new ethers.Contract(XTOKEN_SEPOLIA_TEST, ERC20_ABI, wallet);
	const spokeContract = new ethers.Contract(SPOKE_ADDRESS, SPOKE_ABI, wallet);
	
	// Approving and waiting for tx to be mined
	const approveTx = await xTokenContract.approve(FEE_ADAPTER, amount);
        await approveTx.wait(5);
    
        // Constructing the payload
        const payload = {
            origin: ORIGIN, // Example: Arbitrum Sepolia
            destinations: DEST, // Array of destination domains
            to: TO,
            inputAsset: XTOKEN_SEPOLIA_TEST,
            amount: AMOUNT_IN.toString(),
            callData: "0x", // empty callData for netting orders
            maxFee: MAX_FEE.toString(),
            permit2Params: {
              nonce: "0",        // Placeholder values
              deadline: "0",
              signature: "0x"
            }
        };
    
        // Using API to generate TransactionRequest for a newIntent
        const txRequest = await fetch('https://api.testnet.everclear.org/intents', {
            method: 'POST',
            headers: {
              "Content-Type": "application/json"
            },
            body: JSON.stringify(payload)
        });
    
        // Submitting the order
        const txResponse = await wallet.sendTransaction(txRequest);
        const receipt = await txResponse.wait();
}

newIntent(); 
```

Domain Ids will correspond to standard chain Ids.

## **Monitoring Intents**

The status of an intent can be fetched from the Subgraph which will update the intent on each domain as they are being processed. Token issuers should be able to query the Subgraph using the `intentId` to monitor the progress it has made through the system whilst users bridging via the UI will be able to find all of the required information there.

For token issuers, intents created on the `Spoke` contract will be added to the origin domain Subgraph as an `OriginIntent` entity. The status of the processing on the hub domain will be added to the Subgraph as a `HubIntent` entity. The settlement of the intent will be added to the destination domain Subgraph under `IntentSettleEvent` entity.

There are 3 statuses used for `OriginIntent` entities:

* NONE: does not exist
* ADDED: signifies added to the message queue
* DISPATCHED: signifies the batch containing the message has been sent

There are 9 statuses used for `HubIntent` entities:

* NONE: does not exist
* ADDED: intent has been added to the Hub
* DEPOSIT\_PROCESSED: has been added to the depositQueue
* FILLED: deposit has purchased an invoice in the queue
* COMPLETED: has been added to settlement queue on Hub
* INVOICED: has been added to the invoiceQueue
* SETTLED: settlement has been sent from Hub to Spoke
* UNSUPPORTED: the asset is not supported on the origin/destination domains or the wrong output asset has been provided
* UNSUPPORTED\_RETURNED: the unsupported intent has been returned to the origin domain

The existence of the `IntentSettleEvent` entity for an intentId implies it has been settled on the destination domain.

### 1 - Monitoring intent status

The Subgraph can be queried on the origin domain to pull information about the intent using the `intentId`; Id will remain the same across the domains. Schema for `OriginIntent`:

```graphql
type OriginIntent @entity {
  id: Bytes! # intent id
  queueIdx: BigInt!
  message: Message

  status: IntentStatus!

  initiator: Bytes!
  receiver: Bytes!
  inputAsset: Bytes!
  outputAsset: Bytes!
  maxRoutersFee: BigInt!
  origin: BigInt!
  destination: BigInt!
  nonce: BigInt!
  amount: BigInt!
  data: Bytes

  isTransfer: Boolean!

  # Add Intent Transaction
  addEvent: IntentAddEvent!

  # Bumps
  bumps: [IntentBumpedEvent!]! @derivedFrom(field: "intent")
}
```

For example, if the origin domain Subgraph was being queried to fetch the status of an intent, it could be constructed as follows using its `intentId`:

```tsx
import { gql, request } from 'graphql-request'

const intentStatus = gql`
  query GetIntentStatus($id: Bytes!) {
    originIntents(where: { id: $id }) {
      status
    }
  }
`;

await request('EVERCLEAR_GRAPH_URL_ORIGIN', intentStatus, { id: 'YOUR_INTENT_ID' });
```

### **2 - Monitoring purchase status**

The Subgraph on the hub domain can be queried to pull information about the intent’s processing status using the `intentId`. Schema for `HubIntent`:

```graphql
type HubIntent @entity {
  id: Bytes!
  status: HubIntentStatus!

  settlement: SettlementMessage

  addEvent: IntentAddEvent
  fillEvent: IntentFillEvent

  queue: SettlementQueue
  queueNode: Bytes

  bumps: [BumpProcessedEvent!]! @derivedFrom(field: "intent")
}
```

For example, if the hub domain Subgraph was queried to fetch the status of the intent, it could be constructed as follows using its `intentId`:

```tsx
import { gql, request } from 'graphql-request'

const purchaseStatus = gql`
  query GetPurchaseStatus($id: Bytes!) {
    hubIntents(where: { id: $id }) {
      status
    }
  }
`;

await request('EVERCLEAR_GRAPH_URL_HUB', purchaseStatus, { id: 'YOUR_INTENT_ID' });
```

### 3 - Monitoring settlement status

The Subgraph on the destination domain can be queried to pull information about the settlement using the `intentId`. Schema for `IntentSettledEvent`:

```graphql
type IntentSettleEvent @entity(immutable: true) {
  id: Bytes!
  intentId: Bytes!

  filler: Bytes!
  asset: Bytes!
  amount: BigInt!

  # Settle Transaction
  transactionHash: Bytes!
  timestamp: BigInt!
  gasPrice: BigInt!
  gasLimit: BigInt!
  blockNumber: BigInt!
  txOrigin: Bytes!

  txNonce: BigInt!
}
```

For example, if the destination domain Subgraph was queried to fetch the status of the settlement, it could be constructed as follows using its `intentId`:

```tsx
import { gql, request } from 'graphql-request'

const settleStatus = gql`
  query getSettledStatus($intentId: Bytes!) {
    intentSettleEvents(where: { intentId: $intentId }) {
      asset
      amount
    }
  }
`;

await request('EVERCLEAR_GRAPH_URL_DEST', settleStatus, { intentId: 'YOUR_INTENT_ID' });
```


# API

The Everclear API contains endpoints to create new intents, track intent statuses, and more.

{% hint style="success" %}
Testnet API: `https://api.testnet.everclear.org`

Mainnet API: `https://api.everclear.org`
{% endhint %}

## Create new intent(s)

> Endpoint to generate a TransactionRequest for one or multiple intents. For multiple intents, the transaction will target a fee adapter contract with appropriately formatted calldata.

```json
{"openapi":"3.0.1","info":{"title":"Chimera API","version":"1.0.0"},"servers":[{"url":"https://api.testnet.everclear.org"},{"url":"https://api.everclear.org"}],"paths":{"/intents":{"post":{"summary":"Create new intent(s)","description":"Endpoint to generate a TransactionRequest for one or multiple intents. For multiple intents, the transaction will target a fee adapter contract with appropriately formatted calldata.","requestBody":{"required":true,"content":{"application/json":{"schema":{"oneOf":[{"$ref":"#/components/schemas/IntentRequest"},{"type":"array","items":{"$ref":"#/components/schemas/IntentRequest"}}]}}}},"responses":{"200":{"description":"Successful response with a TransactionRequest object","content":{"application/json":{"schema":{"$ref":"#/components/schemas/TransactionRequest"}}}},"400":{"description":"Invalid input","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"}}}}}},"404":{"description":"Registries not found and deployed for given domain","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"}}}}}},"500":{"description":"Server error","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"}}}}}}}}}},"components":{"schemas":{"IntentRequest":{"type":"object","required":["origin","destinations","to","inputAsset","amount","callData"],"properties":{"origin":{"type":"string"},"destinations":{"type":"array","items":{"type":"string"},"nullable":false},"to":{"type":"string"},"from":{"type":"string","description":"intent creator address"},"inputAsset":{"type":"string"},"outputAsset":{"type":"string"},"amount":{"type":"string","format":"bigint","description":"Input asset amount, denominated in the asset's decimal units on the origin chain"},"callData":{"type":"string"},"ttl":{"type":"integer","description":"Time-to-live in seconds for fast-path execution (optional)"},"max_fee":{"type":"string","description":"Max Fees used in intent system (depricated after swaps)"},"permit2Params":{"type":"object","properties":{"nonce":{"type":"string","format":"bigint"},"deadline":{"type":"string","format":"bigint"},"signature":{"type":"string"}},"required":["nonce","deadline","signature"]},"order_id":{"type":"string","description":"Order ID for newOrder requests"},"isFastPath":{"type":"boolean","description":"Boolean for sending intent through fast path"}}},"TransactionRequest":{"type":"object","properties":{"to":{"type":"string","nullable":true},"from":{"type":"string","nullable":true},"nonce":{"type":"string","format":"bigint"},"gasLimit":{"type":"string","format":"bigint"},"gasPrice":{"type":"string","format":"bigint"},"data":{"type":"string","format":"byte"},"value":{"type":"string","format":"bigint"},"chainId":{"type":"integer"},"type":{"type":"integer","nullable":true},"accessList":{"type":"array","items":{"type":"object","properties":{"address":{"type":"string"},"storageKeys":{"type":"array","items":{"type":"string"}}}},"nullable":true},"maxPriorityFeePerGas":{"type":"string","format":"bigint","nullable":true},"maxFeePerGas":{"type":"string","format":"bigint","nullable":true},"customData":{"type":"object","additionalProperties":true,"nullable":true},"ccipReadEnabled":{"type":"boolean","nullable":true}},"required":["to","data","chainId"]}}}}
```

## Get intents

> Retrieves a paginated list of intents based on query parameters

```json
{"openapi":"3.0.1","info":{"title":"Chimera API","version":"1.0.0"},"servers":[{"url":"https://api.testnet.everclear.org"},{"url":"https://api.everclear.org"}],"paths":{"/batched-intents":{"get":{"summary":"Get intents","description":"Retrieves a paginated list of intents based on query parameters","parameters":[{"in":"query","name":"cursor","required":false,"schema":{"type":"string"}},{"in":"query","name":"prevCursor","required":false,"schema":{"type":"string"}},{"in":"query","name":"limit","required":false,"schema":{"type":"integer"},"default":10},{"in":"query","name":"statuses","required":false,"schema":{"type":"array","items":{"type":"string"}}},{"in":"query","name":"origins","required":false,"schema":{"type":"array","items":{"type":"string"}}},{"in":"query","name":"destinations","required":false,"schema":{"type":"array","items":{"type":"string"}}},{"in":"query","name":"allDestinations","required":false,"schema":{"type":"array","items":{"type":"string"}}},{"in":"query","name":"txHash","required":false,"schema":{"type":"string"}},{"in":"query","name":"userAddress","required":false,"schema":{"type":"string"}},{"in":"query","name":"startDate","required":false,"schema":{"type":"string"}},{"in":"query","name":"endDate","required":false,"schema":{"type":"string"}},{"in":"query","name":"tickerHash","required":false,"schema":{"type":"string"}},{"in":"query","name":"isFastPath","required":false,"schema":{"type":"boolean"},"description":"Filter for fast path intents (intents with TTL > 0)"}],"responses":{"200":{"description":"Successful retrieval of intents","content":{"application/json":{"schema":{"type":"object","required":["items","nextCursor"],"properties":{"items":{"type":"array","items":{"anyOf":[{"type":"object","required":["type","batchId","intents","token_fee","native_fee"],"properties":{"type":{"type":"string","enum":["batch"]},"batchId":{"type":"string"},"token_fee":{"type":"string"},"native_fee":{"type":"string"},"intents":{"type":"array","items":{"$ref":"#/components/schemas/Intent"}}}},{"type":"object","required":["type","intent"],"properties":{"type":{"type":"string","enum":["intent"]},"intent":{"$ref":"#/components/schemas/Intent"}}}]}},"nextCursor":{"type":"string","required":true,"nullable":true}}}}}},"400":{"description":"Invalid input","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"}}}}}},"500":{"description":"Server error","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"}}}}}}}}}},"components":{"schemas":{"Intent":{"type":"object","properties":{"intent_id":{"type":"string","description":"A string representing the intent ID"},"batch_id":{"type":"string","nullable":true,"description":"A string representing the batch ID"},"queue_idx":{"type":"integer","format":"int64","description":"Queue index"},"message_id":{"type":"string","description":"A string representing the message ID"},"status":{"$ref":"#/components/schemas/IntentStatus","description":"The status of the intent"},"receiver":{"type":"string","description":"Receiver address"},"input_asset":{"type":"string","description":"Input asset"},"output_asset":{"type":"string","description":"Output asset"},"origin_amount":{"type":"string","description":"Origin amount"},"destination_amount":{"type":"string","nullable":true,"description":"Destination amount"},"origin":{"type":"string","description":"Origin address"},"destinations":{"type":"array","items":{"type":"string","description":"Destination address"}},"nonce":{"type":"integer","format":"int64","description":"Nonce"},"transaction_hash":{"type":"string","description":"Transaction hash (intent_created tx hash)"},"receive_tx_hash":{"type":"string","nullable":true,"description":"Receive transaction hash"},"intent_created_timestamp":{"type":"integer","format":"int64","description":"Intent Created timestamp"},"settlement_timestamp":{"type":"integer","format":"int64","nullable":true,"description":"Receive timestamp"},"intent_created_block_number":{"type":"integer","format":"int64","description":"Intent created block number"},"receive_blocknumber":{"type":"integer","format":"int64","nullable":true,"description":"Receive block number"},"tx_origin":{"type":"string","description":"Transaction origin address"},"tx_nonce":{"type":"integer","format":"int64","description":"Transaction nonce"},"auto_id":{"type":"integer","format":"int64","description":"Auto-generated identifier"},"amount_out_min":{"type":"string","description":"amount_out_min used in intent"},"call_data":{"type":"string","nullable":true,"description":"Call data"},"filled":{"type":"boolean","nullable":true,"description":"Filler address"},"initiator":{"type":"string","nullable":true,"description":"Initiator address"},"native_fee":{"type":"string","nullable":true,"description":"Native fee"},"token_fee":{"type":"string","nullable":true,"description":"Token fee"},"fee_adapter_initiator":{"type":"string","nullable":true,"description":"Fee adapter initiator address"},"origin_gas_fees":{"type":"string","description":"Origin gas fees"},"destination_gas_fees":{"type":"string","nullable":true,"description":"Destination gas fees"},"hub_settlement_domain":{"type":"string","description":"Settlement domain for an intent","nullable":true},"ttl":{"type":"number","description":"TTL set for an intent","nullable":true},"is_fast_path":{"type":"boolean","description":"Is the intent for fast path service"},"fill_solver":{"type":"string","nullable":true,"description":"Solver/filler address on destination domain"},"fill_domain":{"type":"string","nullable":true,"description":"Destination domain that was actually filled"},"fill_destinations":{"type":"array","nullable":true,"items":{"type":"string"},"description":"All destination domains from the destination leg"},"fill_transaction_hash":{"type":"string","nullable":true,"description":"Destination chain transaction hash for fill"},"fill_timestamp":{"type":"integer","format":"int64","nullable":true,"description":"Timestamp when destination was filled"},"fill_amount":{"type":"string","nullable":true,"description":"Amount filled on destination chain (raw units)"},"fill_fee_token":{"type":"string","nullable":true,"description":"Fee charged on destination chain in token terms"},"fill_fee_dbps":{"type":"string","nullable":true,"description":"Fee charged on destination chain in dbps"},"fill_input_asset":{"type":"string","nullable":true,"description":"Input asset used on destination chain"},"fill_output_asset":{"type":"string","nullable":true,"description":"Output asset received on destination chain"},"fill_sender":{"type":"string","nullable":true,"description":"EOA/contract that submitted destination tx"},"fill_status":{"type":"string","nullable":true,"description":"Status of the destination leg"},"fill_initiator":{"type":"string","nullable":true,"description":"Initiator for the destination leg"},"fill_receiver":{"type":"string","nullable":true,"description":"Receiver for the destination leg"},"max_fee":{"type":"string","description":"Max Fee for intent in V1 system (defaulted to 0 in new system)"}},"required":["intent_id","queue_idx","message_id","status","receiver","input_asset","output_asset","origin_amount","origin","destinations","nonce","data","transaction_hash","intent_created_timestamp","intent_created_block_number","tx_origin","tx_nonce","auto_id","amount_out_min","origin_gas_fees","ttl"]},"IntentStatus":{"type":"string","enum":["NONE","ADDED","ADDED_SPOKE","ADDED_HUB","DEPOSIT_PROCESSED","FILLED","ADDED_AND_FILLED","INVOICED","SETTLED","SETTLED_AND_COMPLETED","SETTLED_AND_MANUALLY_EXECUTED","UNSUPPORTED","UNSUPPORTED_RETURNED","DISPATCHED_HUB","DISPATCHED_SPOKE","DISPATCHED_UNSUPPORTED"]}}}}
```

## Get batched intents

> Retrieves a list of intents for a given batch ID

```json
{"openapi":"3.0.1","info":{"title":"Chimera API","version":"1.0.0"},"servers":[{"url":"https://api.testnet.everclear.org"},{"url":"https://api.everclear.org"}],"paths":{"/batched-intents/{batchId}":{"get":{"summary":"Get batched intents","description":"Retrieves a list of intents for a given batch ID","parameters":[{"in":"path","name":"batchId","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Successful retrieval of intents","content":{"application/json":{"schema":{"type":"object","required":["batchId","intents","token_fee","native_fee"],"properties":{"batchId":{"type":"string"},"token_fee":{"type":"string"},"native_fee":{"type":"string"},"intents":{"type":"array","items":{"$ref":"#/components/schemas/Intent"}}}}}}},"400":{"description":"Invalid input","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"}}}}}},"500":{"description":"Server error","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"}}}}}}}}}},"components":{"schemas":{"Intent":{"type":"object","properties":{"intent_id":{"type":"string","description":"A string representing the intent ID"},"batch_id":{"type":"string","nullable":true,"description":"A string representing the batch ID"},"queue_idx":{"type":"integer","format":"int64","description":"Queue index"},"message_id":{"type":"string","description":"A string representing the message ID"},"status":{"$ref":"#/components/schemas/IntentStatus","description":"The status of the intent"},"receiver":{"type":"string","description":"Receiver address"},"input_asset":{"type":"string","description":"Input asset"},"output_asset":{"type":"string","description":"Output asset"},"origin_amount":{"type":"string","description":"Origin amount"},"destination_amount":{"type":"string","nullable":true,"description":"Destination amount"},"origin":{"type":"string","description":"Origin address"},"destinations":{"type":"array","items":{"type":"string","description":"Destination address"}},"nonce":{"type":"integer","format":"int64","description":"Nonce"},"transaction_hash":{"type":"string","description":"Transaction hash (intent_created tx hash)"},"receive_tx_hash":{"type":"string","nullable":true,"description":"Receive transaction hash"},"intent_created_timestamp":{"type":"integer","format":"int64","description":"Intent Created timestamp"},"settlement_timestamp":{"type":"integer","format":"int64","nullable":true,"description":"Receive timestamp"},"intent_created_block_number":{"type":"integer","format":"int64","description":"Intent created block number"},"receive_blocknumber":{"type":"integer","format":"int64","nullable":true,"description":"Receive block number"},"tx_origin":{"type":"string","description":"Transaction origin address"},"tx_nonce":{"type":"integer","format":"int64","description":"Transaction nonce"},"auto_id":{"type":"integer","format":"int64","description":"Auto-generated identifier"},"amount_out_min":{"type":"string","description":"amount_out_min used in intent"},"call_data":{"type":"string","nullable":true,"description":"Call data"},"filled":{"type":"boolean","nullable":true,"description":"Filler address"},"initiator":{"type":"string","nullable":true,"description":"Initiator address"},"native_fee":{"type":"string","nullable":true,"description":"Native fee"},"token_fee":{"type":"string","nullable":true,"description":"Token fee"},"fee_adapter_initiator":{"type":"string","nullable":true,"description":"Fee adapter initiator address"},"origin_gas_fees":{"type":"string","description":"Origin gas fees"},"destination_gas_fees":{"type":"string","nullable":true,"description":"Destination gas fees"},"hub_settlement_domain":{"type":"string","description":"Settlement domain for an intent","nullable":true},"ttl":{"type":"number","description":"TTL set for an intent","nullable":true},"is_fast_path":{"type":"boolean","description":"Is the intent for fast path service"},"fill_solver":{"type":"string","nullable":true,"description":"Solver/filler address on destination domain"},"fill_domain":{"type":"string","nullable":true,"description":"Destination domain that was actually filled"},"fill_destinations":{"type":"array","nullable":true,"items":{"type":"string"},"description":"All destination domains from the destination leg"},"fill_transaction_hash":{"type":"string","nullable":true,"description":"Destination chain transaction hash for fill"},"fill_timestamp":{"type":"integer","format":"int64","nullable":true,"description":"Timestamp when destination was filled"},"fill_amount":{"type":"string","nullable":true,"description":"Amount filled on destination chain (raw units)"},"fill_fee_token":{"type":"string","nullable":true,"description":"Fee charged on destination chain in token terms"},"fill_fee_dbps":{"type":"string","nullable":true,"description":"Fee charged on destination chain in dbps"},"fill_input_asset":{"type":"string","nullable":true,"description":"Input asset used on destination chain"},"fill_output_asset":{"type":"string","nullable":true,"description":"Output asset received on destination chain"},"fill_sender":{"type":"string","nullable":true,"description":"EOA/contract that submitted destination tx"},"fill_status":{"type":"string","nullable":true,"description":"Status of the destination leg"},"fill_initiator":{"type":"string","nullable":true,"description":"Initiator for the destination leg"},"fill_receiver":{"type":"string","nullable":true,"description":"Receiver for the destination leg"},"max_fee":{"type":"string","description":"Max Fee for intent in V1 system (defaulted to 0 in new system)"}},"required":["intent_id","queue_idx","message_id","status","receiver","input_asset","output_asset","origin_amount","origin","destinations","nonce","data","transaction_hash","intent_created_timestamp","intent_created_block_number","tx_origin","tx_nonce","auto_id","amount_out_min","origin_gas_fees","ttl"]},"IntentStatus":{"type":"string","enum":["NONE","ADDED","ADDED_SPOKE","ADDED_HUB","DEPOSIT_PROCESSED","FILLED","ADDED_AND_FILLED","INVOICED","SETTLED","SETTLED_AND_COMPLETED","SETTLED_AND_MANUALLY_EXECUTED","UNSUPPORTED","UNSUPPORTED_RETURNED","DISPATCHED_HUB","DISPATCHED_SPOKE","DISPATCHED_UNSUPPORTED"]}}}}
```

## Create a new intent on Solana

> Submits a new intent transaction to the Solana blockchain using the specified parameters and configuration.

```json
{"openapi":"3.0.1","info":{"title":"Chimera API","version":"1.0.0"},"servers":[{"url":"https://api.testnet.everclear.org"},{"url":"https://api.everclear.org"}],"paths":{"/solana/intents":{"post":{"summary":"Create a new intent on Solana","description":"Submits a new intent transaction to the Solana blockchain using the specified parameters and configuration.","operationId":"callNewIntentSolana","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["origin","destinations","to","inputAsset","amount","callData","maxFee","user"],"properties":{"origin":{"type":"string"},"destinations":{"type":"array","items":{"type":"string"},"nullable":false},"to":{"type":"string"},"from":{"type":"string","description":"intent creator address"},"inputAsset":{"type":"string"},"amount":{"type":"string","format":"bigint","description":"Token amount, denominated in the asset's decimal units on the origin chain"},"callData":{"type":"string"},"maxFee":{"type":"string","format":"bigint","description":"Maximum fee amount, denominated in the asset's decimal units on the origin chain"},"user":{"type":"string"},"userTokenAccountPublicKey":{"type":"string"},"programVaultAccountPublicKey":{"type":"string"},"permit2Params":{"type":"object","properties":{"nonce":{"type":"string","format":"bigint","description":"Nonce as a bigint"},"deadline":{"type":"string","format":"bigint","description":"Deadline as a bigint"},"signature":{"type":"string"}},"required":["nonce","deadline","signature"]},"order_id":{"type":"string","description":"Order ID for newOrder requests"}}}}}},"responses":{"200":{"description":"Successfully created intent transaction","content":{"application/json":{"schema":{"$ref":"#/components/schemas/TransactionRequest"}}}},"400":{"description":"Registries not found and deployed for given domain","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"}}}}}},"404":{"description":"Registries not found and deployed for given domain","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"}}}}}},"500":{"description":"Registries not found and deployed for given domain","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"}}}}}}}}}},"components":{"schemas":{"TransactionRequest":{"type":"object","properties":{"to":{"type":"string","nullable":true},"from":{"type":"string","nullable":true},"nonce":{"type":"string","format":"bigint"},"gasLimit":{"type":"string","format":"bigint"},"gasPrice":{"type":"string","format":"bigint"},"data":{"type":"string","format":"byte"},"value":{"type":"string","format":"bigint"},"chainId":{"type":"integer"},"type":{"type":"integer","nullable":true},"accessList":{"type":"array","items":{"type":"object","properties":{"address":{"type":"string"},"storageKeys":{"type":"array","items":{"type":"string"}}}},"nullable":true},"maxPriorityFeePerGas":{"type":"string","format":"bigint","nullable":true},"maxFeePerGas":{"type":"string","format":"bigint","nullable":true},"customData":{"type":"object","additionalProperties":true,"nullable":true},"ccipReadEnabled":{"type":"boolean","nullable":true}},"required":["to","data","chainId"]}}}}
```

## To create lookup tables for new account + asset

> Creating lookup tables for new users to save account space on chain

```json
{"openapi":"3.0.1","info":{"title":"Chimera API","version":"1.0.0"},"servers":[{"url":"https://api.testnet.everclear.org"},{"url":"https://api.everclear.org"}],"paths":{"/solana/create-lookup-table":{"post":{"summary":"To create lookup tables for new account + asset","description":"Creating lookup tables for new users to save account space on chain","operationId":"createSolanaLookupTable","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["inputAsset","user","userTokenAccountPublicKey","programVaultAccountPublicKey"],"properties":{"inputAsset":{"type":"string"},"user":{"type":"string"},"userTokenAccountPublicKey":{"type":"string"},"programVaultAccountPublicKey":{"type":"string"}}}}}},"responses":{"200":{"description":"Succesfull serialise data fetch transaction data","content":{"application/json":{"schema":{"$ref":"#/components/schemas/TransactionRequest"}}}},"400":{"description":"Registries not found and deployed for given domain","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"}}}}}},"404":{"description":"Registries not found and deployed for given domain","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"}}}}}},"500":{"description":"Registries not found and deployed for given domain","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"}}}}}}}}}},"components":{"schemas":{"TransactionRequest":{"type":"object","properties":{"to":{"type":"string","nullable":true},"from":{"type":"string","nullable":true},"nonce":{"type":"string","format":"bigint"},"gasLimit":{"type":"string","format":"bigint"},"gasPrice":{"type":"string","format":"bigint"},"data":{"type":"string","format":"byte"},"value":{"type":"string","format":"bigint"},"chainId":{"type":"integer"},"type":{"type":"integer","nullable":true},"accessList":{"type":"array","items":{"type":"object","properties":{"address":{"type":"string"},"storageKeys":{"type":"array","items":{"type":"string"}}}},"nullable":true},"maxPriorityFeePerGas":{"type":"string","format":"bigint","nullable":true},"maxFeePerGas":{"type":"string","format":"bigint","nullable":true},"customData":{"type":"object","additionalProperties":true,"nullable":true},"ccipReadEnabled":{"type":"boolean","nullable":true}},"required":["to","data","chainId"]}}}}
```

## Create a new intent on Tron

> Submits a new intent transaction to the Tron blockchain using the specified parameters and configuration.

```json
{"openapi":"3.0.1","info":{"title":"Chimera API","version":"1.0.0"},"servers":[{"url":"https://api.testnet.everclear.org"},{"url":"https://api.everclear.org"}],"paths":{"/tron/intents":{"post":{"summary":"Create a new intent on Tron","description":"Submits a new intent transaction to the Tron blockchain using the specified parameters and configuration.","operationId":"callNewIntentTron","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["origin","destinations","to","inputAsset","amount","callData"],"properties":{"origin":{"type":"string"},"destinations":{"type":"array","items":{"type":"string"},"nullable":false},"to":{"type":"string"},"from":{"type":"string","description":"intent creator address"},"inputAsset":{"type":"string"},"outputAsset":{"type":"string"},"amount":{"type":"string","format":"bigint","description":"Input asset amount, denominated in the asset's decimal units on the origin chain"},"callData":{"type":"string"},"ttl":{"type":"integer","description":"Time-to-live in seconds for fast-path execution (optional)"},"max_fee":{"type":"string","description":"Max Fees used in intent system (depricated after swaps)"},"permit2Params":{"type":"object","properties":{"nonce":{"type":"string","format":"bigint"},"deadline":{"type":"string","format":"bigint"},"signature":{"type":"string"}},"required":["nonce","deadline","signature"]},"order_id":{"type":"string","description":"Order ID for newOrder requests"},"isFastPath":{"type":"boolean","description":"Boolean for sending intent through fast path"}}}}}},"responses":{"200":{"description":"Successfully created intent transaction","content":{"application/json":{"schema":{"$ref":"#/components/schemas/TransactionRequest"}}}},"400":{"description":"Registries not found and deployed for given domain","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"}}}}}},"404":{"description":"Registries not found and deployed for given domain","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"}}}}}},"500":{"description":"Registries not found and deployed for given domain","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"}}}}}}}}}},"components":{"schemas":{"TransactionRequest":{"type":"object","properties":{"to":{"type":"string","nullable":true},"from":{"type":"string","nullable":true},"nonce":{"type":"string","format":"bigint"},"gasLimit":{"type":"string","format":"bigint"},"gasPrice":{"type":"string","format":"bigint"},"data":{"type":"string","format":"byte"},"value":{"type":"string","format":"bigint"},"chainId":{"type":"integer"},"type":{"type":"integer","nullable":true},"accessList":{"type":"array","items":{"type":"object","properties":{"address":{"type":"string"},"storageKeys":{"type":"array","items":{"type":"string"}}}},"nullable":true},"maxPriorityFeePerGas":{"type":"string","format":"bigint","nullable":true},"maxFeePerGas":{"type":"string","format":"bigint","nullable":true},"customData":{"type":"object","additionalProperties":true,"nullable":true},"ccipReadEnabled":{"type":"boolean","nullable":true}},"required":["to","data","chainId"]}}}}
```

## Get intent details

> Fetches detailed information for a specified intent by its ID

```json
{"openapi":"3.0.1","info":{"title":"Chimera API","version":"1.0.0"},"servers":[{"url":"https://api.testnet.everclear.org"},{"url":"https://api.everclear.org"}],"paths":{"/intents/{intentId}":{"get":{"summary":"Get intent details","description":"Fetches detailed information for a specified intent by its ID","parameters":[{"in":"path","name":"intentId","required":true,"schema":{"type":"string","description":"The unique identifier for the intent"}}],"responses":{"200":{"description":"Successful retrieval of intent details","content":{"application/json":{"schema":{"type":"object","required":["intent"],"properties":{"intent":{"$ref":"#/components/schemas/Intent"}}}}}},"400":{"description":"Invalid Intent ID","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"}}}}}},"500":{"description":"Server error","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"}}}}}}}}}},"components":{"schemas":{"Intent":{"type":"object","properties":{"intent_id":{"type":"string","description":"A string representing the intent ID"},"batch_id":{"type":"string","nullable":true,"description":"A string representing the batch ID"},"queue_idx":{"type":"integer","format":"int64","description":"Queue index"},"message_id":{"type":"string","description":"A string representing the message ID"},"status":{"$ref":"#/components/schemas/IntentStatus","description":"The status of the intent"},"receiver":{"type":"string","description":"Receiver address"},"input_asset":{"type":"string","description":"Input asset"},"output_asset":{"type":"string","description":"Output asset"},"origin_amount":{"type":"string","description":"Origin amount"},"destination_amount":{"type":"string","nullable":true,"description":"Destination amount"},"origin":{"type":"string","description":"Origin address"},"destinations":{"type":"array","items":{"type":"string","description":"Destination address"}},"nonce":{"type":"integer","format":"int64","description":"Nonce"},"transaction_hash":{"type":"string","description":"Transaction hash (intent_created tx hash)"},"receive_tx_hash":{"type":"string","nullable":true,"description":"Receive transaction hash"},"intent_created_timestamp":{"type":"integer","format":"int64","description":"Intent Created timestamp"},"settlement_timestamp":{"type":"integer","format":"int64","nullable":true,"description":"Receive timestamp"},"intent_created_block_number":{"type":"integer","format":"int64","description":"Intent created block number"},"receive_blocknumber":{"type":"integer","format":"int64","nullable":true,"description":"Receive block number"},"tx_origin":{"type":"string","description":"Transaction origin address"},"tx_nonce":{"type":"integer","format":"int64","description":"Transaction nonce"},"auto_id":{"type":"integer","format":"int64","description":"Auto-generated identifier"},"amount_out_min":{"type":"string","description":"amount_out_min used in intent"},"call_data":{"type":"string","nullable":true,"description":"Call data"},"filled":{"type":"boolean","nullable":true,"description":"Filler address"},"initiator":{"type":"string","nullable":true,"description":"Initiator address"},"native_fee":{"type":"string","nullable":true,"description":"Native fee"},"token_fee":{"type":"string","nullable":true,"description":"Token fee"},"fee_adapter_initiator":{"type":"string","nullable":true,"description":"Fee adapter initiator address"},"origin_gas_fees":{"type":"string","description":"Origin gas fees"},"destination_gas_fees":{"type":"string","nullable":true,"description":"Destination gas fees"},"hub_settlement_domain":{"type":"string","description":"Settlement domain for an intent","nullable":true},"ttl":{"type":"number","description":"TTL set for an intent","nullable":true},"is_fast_path":{"type":"boolean","description":"Is the intent for fast path service"},"fill_solver":{"type":"string","nullable":true,"description":"Solver/filler address on destination domain"},"fill_domain":{"type":"string","nullable":true,"description":"Destination domain that was actually filled"},"fill_destinations":{"type":"array","nullable":true,"items":{"type":"string"},"description":"All destination domains from the destination leg"},"fill_transaction_hash":{"type":"string","nullable":true,"description":"Destination chain transaction hash for fill"},"fill_timestamp":{"type":"integer","format":"int64","nullable":true,"description":"Timestamp when destination was filled"},"fill_amount":{"type":"string","nullable":true,"description":"Amount filled on destination chain (raw units)"},"fill_fee_token":{"type":"string","nullable":true,"description":"Fee charged on destination chain in token terms"},"fill_fee_dbps":{"type":"string","nullable":true,"description":"Fee charged on destination chain in dbps"},"fill_input_asset":{"type":"string","nullable":true,"description":"Input asset used on destination chain"},"fill_output_asset":{"type":"string","nullable":true,"description":"Output asset received on destination chain"},"fill_sender":{"type":"string","nullable":true,"description":"EOA/contract that submitted destination tx"},"fill_status":{"type":"string","nullable":true,"description":"Status of the destination leg"},"fill_initiator":{"type":"string","nullable":true,"description":"Initiator for the destination leg"},"fill_receiver":{"type":"string","nullable":true,"description":"Receiver for the destination leg"},"max_fee":{"type":"string","description":"Max Fee for intent in V1 system (defaulted to 0 in new system)"}},"required":["intent_id","queue_idx","message_id","status","receiver","input_asset","output_asset","origin_amount","origin","destinations","nonce","data","transaction_hash","intent_created_timestamp","intent_created_block_number","tx_origin","tx_nonce","auto_id","amount_out_min","origin_gas_fees","ttl"]},"IntentStatus":{"type":"string","enum":["NONE","ADDED","ADDED_SPOKE","ADDED_HUB","DEPOSIT_PROCESSED","FILLED","ADDED_AND_FILLED","INVOICED","SETTLED","SETTLED_AND_COMPLETED","SETTLED_AND_MANUALLY_EXECUTED","UNSUPPORTED","UNSUPPORTED_RETURNED","DISPATCHED_HUB","DISPATCHED_SPOKE","DISPATCHED_UNSUPPORTED"]}}}}
```

## Execute calldata

> The request object for \`executeIntentCalldata\`, used for self-execution

```json
{"openapi":"3.0.1","info":{"title":"Chimera API","version":"1.0.0"},"servers":[{"url":"https://api.testnet.everclear.org"},{"url":"https://api.everclear.org"}],"paths":{"/intents/{intentId}/execute":{"post":{"summary":"Execute calldata","description":"The request object for `executeIntentCalldata`, used for self-execution","parameters":[{"in":"path","name":"intentId","required":true,"schema":{"type":"string","description":"The unique identifier for the intent"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["domain"],"properties":{"domain":{"type":"string","description":"The domain for the request"}}}}}},"responses":{"200":{"description":"Successful response with a TransactionRequest object","content":{"application/json":{"schema":{"$ref":"#/components/schemas/TransactionRequest"}}}},"400":{"description":"Invalid input","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"}}}}}},"500":{"description":"Server error","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"}}}}}}}}}},"components":{"schemas":{"TransactionRequest":{"type":"object","properties":{"to":{"type":"string","nullable":true},"from":{"type":"string","nullable":true},"nonce":{"type":"string","format":"bigint"},"gasLimit":{"type":"string","format":"bigint"},"gasPrice":{"type":"string","format":"bigint"},"data":{"type":"string","format":"byte"},"value":{"type":"string","format":"bigint"},"chainId":{"type":"integer"},"type":{"type":"integer","nullable":true},"accessList":{"type":"array","items":{"type":"object","properties":{"address":{"type":"string"},"storageKeys":{"type":"array","items":{"type":"string"}}}},"nullable":true},"maxPriorityFeePerGas":{"type":"string","format":"bigint","nullable":true},"maxFeePerGas":{"type":"string","format":"bigint","nullable":true},"customData":{"type":"object","additionalProperties":true,"nullable":true},"ccipReadEnabled":{"type":"boolean","nullable":true}},"required":["to","data","chainId"]}}}}
```

## Return unsupported intent

> The request object for \`returnUnsupportedIntent\` on hub domain

```json
{"openapi":"3.0.1","info":{"title":"Chimera API","version":"1.0.0"},"servers":[{"url":"https://api.testnet.everclear.org"},{"url":"https://api.everclear.org"}],"paths":{"/intents/{intentId}/return-unsupported":{"post":{"summary":"Return unsupported intent","description":"The request object for `returnUnsupportedIntent` on hub domain","parameters":[{"in":"path","name":"intentId","required":true,"schema":{"type":"string","description":"The unique identifier for the intent"}}],"responses":{"200":{"description":"Successful response with a TransactionRequest object","content":{"application/json":{"schema":{"$ref":"#/components/schemas/TransactionRequest"}}}},"400":{"description":"Invalid input","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"}}}}}},"500":{"description":"Server error","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"}}}}}}}}}},"components":{"schemas":{"TransactionRequest":{"type":"object","properties":{"to":{"type":"string","nullable":true},"from":{"type":"string","nullable":true},"nonce":{"type":"string","format":"bigint"},"gasLimit":{"type":"string","format":"bigint"},"gasPrice":{"type":"string","format":"bigint"},"data":{"type":"string","format":"byte"},"value":{"type":"string","format":"bigint"},"chainId":{"type":"integer"},"type":{"type":"integer","nullable":true},"accessList":{"type":"array","items":{"type":"object","properties":{"address":{"type":"string"},"storageKeys":{"type":"array","items":{"type":"string"}}}},"nullable":true},"maxPriorityFeePerGas":{"type":"string","format":"bigint","nullable":true},"maxFeePerGas":{"type":"string","format":"bigint","nullable":true},"customData":{"type":"object","additionalProperties":true,"nullable":true},"ccipReadEnabled":{"type":"boolean","nullable":true}},"required":["to","data","chainId"]}}}}
```

## Get invoices

> Retrieves a paginated list of invoices in FIFO queue order

```json
{"openapi":"3.0.1","info":{"title":"Chimera API","version":"1.0.0"},"servers":[{"url":"https://api.testnet.everclear.org"},{"url":"https://api.everclear.org"}],"paths":{"/invoices":{"get":{"summary":"Get invoices","description":"Retrieves a paginated list of invoices in FIFO queue order","parameters":[{"in":"query","name":"cursor","required":false,"schema":{"type":"string"}},{"in":"query","name":"prevCursor","required":false,"schema":{"type":"string"}},{"in":"query","name":"limit","required":false,"schema":{"type":"integer"},"default":10},{"in":"query","name":"tickerHash","required":false,"schema":{"type":"string"}},{"in":"query","name":"origins","required":false,"schema":{"type":"array","items":{"type":"string"}}},{"in":"query","name":"destinations","required":false,"schema":{"type":"array","items":{"type":"string"}}},{"in":"query","name":"sortOrderByDiscount","required":false,"schema":{"type":"string"}}],"responses":{"200":{"description":"Successful retrieval of invoices","content":{"application/json":{"schema":{"type":"object","required":["invoices","nextCursor","maxCount","prevCursor"],"properties":{"invoices":{"type":"array","items":{"$ref":"#/components/schemas/Invoice"}},"nextCursor":{"type":"string","required":true,"nullable":true},"prevCursor":{"type":"string","required":true,"nullable":true},"maxCount":{"type":"number","required":true}}}}}},"400":{"description":"Invalid input","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"}}}}}},"500":{"description":"Server error","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"}}}}}}}}}},"components":{"schemas":{"Invoice":{"type":"object","required":["intent_id","owner","entry_epoch","amount","discount","origin","destinations","ticker_hash","hub_invoice_enqueued_timestamp","discountBps"],"properties":{"intent_id":{"type":"string","description":"A string representing the intent ID"},"owner":{"type":"string","description":"Invoice owner address"},"entry_epoch":{"type":"integer","format":"int64","description":"The epoch when the invoice was created"},"amount":{"type":"string","description":"Amount of the invoice"},"discountBps":{"type":"integer","format":"int64","description":"The current discount of the invoice in BPS"},"origin":{"type":"string"},"destinations":{"type":"array","items":{"type":"string"}},"hub_status":{"$ref":"#/components/schemas/IntentStatus","description":"The status of the intent on Hub domain","nullable":true},"ticker_hash":{"type":"string"},"hub_invoice_enqueued_timestamp":{"type":"string"}}},"IntentStatus":{"type":"string","enum":["NONE","ADDED","ADDED_SPOKE","ADDED_HUB","DEPOSIT_PROCESSED","FILLED","ADDED_AND_FILLED","INVOICED","SETTLED","SETTLED_AND_COMPLETED","SETTLED_AND_MANUALLY_EXECUTED","UNSUPPORTED","UNSUPPORTED_RETURNED","DISPATCHED_HUB","DISPATCHED_SPOKE","DISPATCHED_UNSUPPORTED"]}}}}
```

## Return invoice details

> Fetches detailed information for a specified invoice by its intentID

```json
{"openapi":"3.0.1","info":{"title":"Chimera API","version":"1.0.0"},"servers":[{"url":"https://api.testnet.everclear.org"},{"url":"https://api.everclear.org"}],"paths":{"/invoices/{intentId}":{"get":{"summary":"Return invoice details","description":"Fetches detailed information for a specified invoice by its intentID","parameters":[{"in":"path","name":"intentId","required":true,"schema":{"type":"string","description":"The unique identifier for the intent"}}],"responses":{"200":{"description":"Successful retrieval of invoice details","content":{"application/json":{"schema":{"type":"object","properties":{"invoice":{"$ref":"#/components/schemas/Invoice"}}}}}},"400":{"description":"Invalid Intent ID","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"}}}}}},"500":{"description":"Server error","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"}}}}}}}}}},"components":{"schemas":{"Invoice":{"type":"object","required":["intent_id","owner","entry_epoch","amount","discount","origin","destinations","ticker_hash","hub_invoice_enqueued_timestamp","discountBps"],"properties":{"intent_id":{"type":"string","description":"A string representing the intent ID"},"owner":{"type":"string","description":"Invoice owner address"},"entry_epoch":{"type":"integer","format":"int64","description":"The epoch when the invoice was created"},"amount":{"type":"string","description":"Amount of the invoice"},"discountBps":{"type":"integer","format":"int64","description":"The current discount of the invoice in BPS"},"origin":{"type":"string"},"destinations":{"type":"array","items":{"type":"string"}},"hub_status":{"$ref":"#/components/schemas/IntentStatus","description":"The status of the intent on Hub domain","nullable":true},"ticker_hash":{"type":"string"},"hub_invoice_enqueued_timestamp":{"type":"string"}}},"IntentStatus":{"type":"string","enum":["NONE","ADDED","ADDED_SPOKE","ADDED_HUB","DEPOSIT_PROCESSED","FILLED","ADDED_AND_FILLED","INVOICED","SETTLED","SETTLED_AND_COMPLETED","SETTLED_AND_MANUALLY_EXECUTED","UNSUPPORTED","UNSUPPORTED_RETURNED","DISPATCHED_HUB","DISPATCHED_SPOKE","DISPATCHED_UNSUPPORTED"]}}}}
```

## Calculate minimum amounts needed to settle invoice

> Calculates the minimum amounts per destination domain to settle a specified invoice. This returns a map of destination domain to minimum amount required in standardized 1e18 decimals.

```json
{"openapi":"3.0.1","info":{"title":"Chimera API","version":"1.0.0"},"servers":[{"url":"https://api.testnet.everclear.org"},{"url":"https://api.everclear.org"}],"paths":{"/invoices/{intentId}/min-amounts":{"get":{"summary":"Calculate minimum amounts needed to settle invoice","description":"Calculates the minimum amounts per destination domain to settle a specified invoice. This returns a map of destination domain to minimum amount required in standardized 1e18 decimals.","parameters":[{"in":"path","name":"intentId","required":true,"schema":{"type":"string","description":"The unique identifier for the invoice intent"}}],"responses":{"200":{"description":"Successful calculation of minimum amounts","content":{"application/json":{"schema":{"type":"object","required":["invoiceAmount","amountAfterDiscounts","discountBps","custodiedAmounts","minAmounts"],"properties":{"invoiceAmount":{"type":"string","description":"Original invoice amount before discount"},"amountAfterDiscounts":{"type":"object","additionalProperties":{"type":"string"},"description":"Map of domain to amount after applying the discount"},"discountBps":{"type":"string","description":"Current discount in basis points"},"custodiedAmounts":{"type":"object","additionalProperties":{"type":"string"},"description":"Map of domain to custodied amount"},"minAmounts":{"type":"object","additionalProperties":{"type":"string"},"description":"Map of domain to minimum required amount"}}}}}},"400":{"description":"Invalid input","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"}}}}}},"500":{"description":"Server error","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"}}}}}}}}}}}
```

## Get supported assets

> Lists assets supported by the protocol, with pagination and optional filtering by type

```json
{"openapi":"3.0.1","info":{"title":"Chimera API","version":"1.0.0"},"servers":[{"url":"https://api.testnet.everclear.org"},{"url":"https://api.everclear.org"}],"paths":{"/configs/assets":{"get":{"summary":"Get supported assets","description":"Lists assets supported by the protocol, with pagination and optional filtering by type","parameters":[{"in":"query","name":"page","required":true,"schema":{"type":"integer"}},{"in":"query","name":"limit","required":true,"schema":{"type":"integer"}},{"in":"query","name":"type","required":false,"schema":{"type":"string","enum":["xERC20","other"]}}],"responses":{"200":{"description":"Successful retrieval of assets","content":{"application/json":{"schema":{"type":"object","properties":{"assets":{"type":"array","items":{"$ref":"#/components/schemas/Asset"}}}}}}},"400":{"description":"Invalid Request","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"}}}}}},"500":{"description":"Server error","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"}}}}}}}}}},"components":{"schemas":{"Asset":{"type":"object","required":["local","adopted","canonical_id","canonical_domain","domain","key","id","decimal","adopted_decimal"],"properties":{"local":{"type":"string","maxLength":66},"adopted":{"type":"string"},"canonical_id":{"type":"string","maxLength":66},"canonical_domain":{"type":"string","maxLength":66},"domain":{"type":"string"},"key":{"type":"string"},"id":{"type":"string"},"decimal":{"type":"number"},"adopted_decimal":{"type":"number"}}}}}}
```

## POST /routes/quotes

> Get quote for a route, including fees and limits

```json
{"openapi":"3.0.1","info":{"title":"Chimera API","version":"1.0.0"},"servers":[{"url":"https://api.testnet.everclear.org"},{"url":"https://api.everclear.org"}],"paths":{"/routes/quotes":{"post":{"summary":"Get quote for a route, including fees and limits","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["origin","destinations","inputAsset","amount"],"properties":{"origin":{"type":"string"},"destinations":{"type":"array","items":{"type":"string"},"nullable":false},"inputAsset":{"type":"string"},"outputAsset":{"type":"string"},"amount":{"type":"string","description":"Token amount, denominated in the asset's decimal units on the origin chain"},"to":{"type":"string"},"from":{"type":"string","description":"intent creator address"},"order_id":{"type":"string","description":"Order ID for newOrder requests"}}}}}},"responses":{"200":{"description":"Successfully retrieved quote.","content":{"application/json":{"schema":{"type":"object","required":["fixedFeeUnits","variableFeeBps","totalFeeBps","currentLimit","reqType","splitCount","expectedAmount"],"properties":{"fixedFeeUnits":{"type":"string","format":"float","description":"Fixed fee in token units."},"variableFeeBps":{"type":"number","format":"float","description":"Variable fee in basis points."},"totalFeeBps":{"type":"number","format":"float","description":"Total fee in basis points given the amount."},"expectedAmount":{"type":"string","format":"float","description":"Expected amount after fees are deducted."},"currentLimit":{"type":"string","format":"float","description":"Current limit in token amount."},"splitCount":{"type":"integer","description":"Number of splits for the intent"},"reqType":{"type":"string","description":"Type of quote operation. 'bridge' | 'swap' | 'x-swap' | 'invalid'"},"fastPathQuote":{"description":"Fast path quote details if fast path is available, or error message if over limit","anyOf":[{"type":"object","description":"Fast path quote details","required":["fixedFeeUnits","variableFeeBps","totalFeeBps","expectedAmount"],"properties":{"fixedFeeUnits":{"type":"string","format":"float","description":"Fixed fee in token units for fast path."},"variableFeeBps":{"type":"number","format":"float","description":"Variable fee in basis points for fast path."},"totalFeeBps":{"type":"number","format":"float","description":"Total fee in basis points for fast path."},"expectedAmount":{"type":"string","format":"float","description":"Expected amount after fast path fees are deducted."},"expectedFillTime":{"type":"string","format":"number","description":"Expected time to get fast path intent filled by solver"}}},{"type":"object","description":"Error message when fast path is over limit","required":["message"],"properties":{"message":{"type":"string","description":"Error message indicating the amount is over the fast path limit."}}}]},"settlementEstimate":{"anyOf":[{"type":"object","required":["p25Minutes","p50Minutes","p75Minutes"],"properties":{"p25Minutes":{"type":"number","format":"float","description":"Estimated settlement time in minutes."},"p50Minutes":{"type":"number","format":"float","description":"Estimated settlement time in minutes."},"p75Minutes":{"type":"number","format":"float","description":"Estimated settlement time in minutes."}}},{"type":"object","required":["message"],"properties":{"message":{"type":"string","description":"Error message if no estimate is available."}}}]}}}}}},"400":{"description":"Invalid request parameters."},"500":{"description":"Internal server error."}}}}}}
```

## POST /routes/limits

> Get current limits for a route

```json
{"openapi":"3.0.1","info":{"title":"Chimera API","version":"1.0.0"},"servers":[{"url":"https://api.testnet.everclear.org"},{"url":"https://api.everclear.org"}],"paths":{"/routes/limits":{"post":{"summary":"Get current limits for a route","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["origin","destinations","inputAsset"],"properties":{"origin":{"type":"string"},"destinations":{"type":"array","items":{"type":"string"},"nullable":false},"inputAsset":{"type":"string"}}}}}},"responses":{"200":{"description":"Successfully retrieved limits.","content":{"application/json":{"schema":{"type":"object","required":["currentLimit"],"properties":{"currentLimit":{"type":"string","format":"float","description":"Current limit in token's native decimal units."}}}}}},"400":{"description":"Invalid request parameters."},"500":{"description":"Internal server error."}}}}}}
```

## Get intents

> Retrieves a paginated list of intents based on query parameters

```json
{"openapi":"3.0.1","info":{"title":"Chimera API","version":"1.0.0"},"servers":[{"url":"https://api.testnet.everclear.org"},{"url":"https://api.everclear.org"}],"paths":{"/intents":{"get":{"summary":"Get intents","description":"Retrieves a paginated list of intents based on query parameters","parameters":[{"in":"query","name":"cursor","required":false,"schema":{"type":"string"}},{"in":"query","name":"prevCursor","required":false,"schema":{"type":"string"}},{"in":"query","name":"limit","required":false,"schema":{"type":"integer"},"default":10},{"in":"query","name":"statuses","required":false,"schema":{"type":"array","items":{"type":"string"}}},{"in":"query","name":"origins","required":false,"schema":{"type":"array","items":{"type":"string"}}},{"in":"query","name":"destinations","required":false,"schema":{"type":"array","items":{"type":"string"}}},{"in":"query","name":"allDestinations","required":false,"schema":{"type":"array","items":{"type":"string"}}},{"in":"query","name":"txHash","required":false,"schema":{"type":"string"}},{"in":"query","name":"userAddress","required":false,"schema":{"type":"string"}},{"in":"query","name":"startDate","required":false,"schema":{"type":"string"}},{"in":"query","name":"endDate","required":false,"schema":{"type":"string"}},{"in":"query","name":"tickerHash","required":false,"schema":{"type":"string"}},{"in":"query","name":"isFastPath","required":false,"schema":{"type":"boolean"},"description":"Filter for fast path intents (intents with TTL > 0)"}],"responses":{"200":{"description":"Successful retrieval of intents","content":{"application/json":{"schema":{"type":"object","required":["intents","nextCursor","maxCount","prevCursor"],"properties":{"intents":{"type":"array","items":{"$ref":"#/components/schemas/Intent"}},"nextCursor":{"type":"string","required":true,"nullable":true},"prevCursor":{"type":"string","required":true,"nullable":true},"maxCount":{"type":"number","required":true}}}}}},"400":{"description":"Invalid input","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"}}}}}},"500":{"description":"Server error","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"}}}}}}}}}},"components":{"schemas":{"Intent":{"type":"object","properties":{"intent_id":{"type":"string","description":"A string representing the intent ID"},"batch_id":{"type":"string","nullable":true,"description":"A string representing the batch ID"},"queue_idx":{"type":"integer","format":"int64","description":"Queue index"},"message_id":{"type":"string","description":"A string representing the message ID"},"status":{"$ref":"#/components/schemas/IntentStatus","description":"The status of the intent"},"receiver":{"type":"string","description":"Receiver address"},"input_asset":{"type":"string","description":"Input asset"},"output_asset":{"type":"string","description":"Output asset"},"origin_amount":{"type":"string","description":"Origin amount"},"destination_amount":{"type":"string","nullable":true,"description":"Destination amount"},"origin":{"type":"string","description":"Origin address"},"destinations":{"type":"array","items":{"type":"string","description":"Destination address"}},"nonce":{"type":"integer","format":"int64","description":"Nonce"},"transaction_hash":{"type":"string","description":"Transaction hash (intent_created tx hash)"},"receive_tx_hash":{"type":"string","nullable":true,"description":"Receive transaction hash"},"intent_created_timestamp":{"type":"integer","format":"int64","description":"Intent Created timestamp"},"settlement_timestamp":{"type":"integer","format":"int64","nullable":true,"description":"Receive timestamp"},"intent_created_block_number":{"type":"integer","format":"int64","description":"Intent created block number"},"receive_blocknumber":{"type":"integer","format":"int64","nullable":true,"description":"Receive block number"},"tx_origin":{"type":"string","description":"Transaction origin address"},"tx_nonce":{"type":"integer","format":"int64","description":"Transaction nonce"},"auto_id":{"type":"integer","format":"int64","description":"Auto-generated identifier"},"amount_out_min":{"type":"string","description":"amount_out_min used in intent"},"call_data":{"type":"string","nullable":true,"description":"Call data"},"filled":{"type":"boolean","nullable":true,"description":"Filler address"},"initiator":{"type":"string","nullable":true,"description":"Initiator address"},"native_fee":{"type":"string","nullable":true,"description":"Native fee"},"token_fee":{"type":"string","nullable":true,"description":"Token fee"},"fee_adapter_initiator":{"type":"string","nullable":true,"description":"Fee adapter initiator address"},"origin_gas_fees":{"type":"string","description":"Origin gas fees"},"destination_gas_fees":{"type":"string","nullable":true,"description":"Destination gas fees"},"hub_settlement_domain":{"type":"string","description":"Settlement domain for an intent","nullable":true},"ttl":{"type":"number","description":"TTL set for an intent","nullable":true},"is_fast_path":{"type":"boolean","description":"Is the intent for fast path service"},"fill_solver":{"type":"string","nullable":true,"description":"Solver/filler address on destination domain"},"fill_domain":{"type":"string","nullable":true,"description":"Destination domain that was actually filled"},"fill_destinations":{"type":"array","nullable":true,"items":{"type":"string"},"description":"All destination domains from the destination leg"},"fill_transaction_hash":{"type":"string","nullable":true,"description":"Destination chain transaction hash for fill"},"fill_timestamp":{"type":"integer","format":"int64","nullable":true,"description":"Timestamp when destination was filled"},"fill_amount":{"type":"string","nullable":true,"description":"Amount filled on destination chain (raw units)"},"fill_fee_token":{"type":"string","nullable":true,"description":"Fee charged on destination chain in token terms"},"fill_fee_dbps":{"type":"string","nullable":true,"description":"Fee charged on destination chain in dbps"},"fill_input_asset":{"type":"string","nullable":true,"description":"Input asset used on destination chain"},"fill_output_asset":{"type":"string","nullable":true,"description":"Output asset received on destination chain"},"fill_sender":{"type":"string","nullable":true,"description":"EOA/contract that submitted destination tx"},"fill_status":{"type":"string","nullable":true,"description":"Status of the destination leg"},"fill_initiator":{"type":"string","nullable":true,"description":"Initiator for the destination leg"},"fill_receiver":{"type":"string","nullable":true,"description":"Receiver for the destination leg"},"max_fee":{"type":"string","description":"Max Fee for intent in V1 system (defaulted to 0 in new system)"}},"required":["intent_id","queue_idx","message_id","status","receiver","input_asset","output_asset","origin_amount","origin","destinations","nonce","data","transaction_hash","intent_created_timestamp","intent_created_block_number","tx_origin","tx_nonce","auto_id","amount_out_min","origin_gas_fees","ttl"]},"IntentStatus":{"type":"string","enum":["NONE","ADDED","ADDED_SPOKE","ADDED_HUB","DEPOSIT_PROCESSED","FILLED","ADDED_AND_FILLED","INVOICED","SETTLED","SETTLED_AND_COMPLETED","SETTLED_AND_MANUALLY_EXECUTED","UNSUPPORTED","UNSUPPORTED_RETURNED","DISPATCHED_HUB","DISPATCHED_SPOKE","DISPATCHED_UNSUPPORTED"]}}}}
```

## Get history of invoice processing

> Retrieves detailed history of a specific invoice, including epochs and details of processing as deposit and invoice.

```json
{"openapi":"3.0.1","info":{"title":"Chimera API","version":"1.0.0"},"servers":[{"url":"https://api.testnet.everclear.org"},{"url":"https://api.everclear.org"}],"paths":{"/history/{intentId}/invoice-processing":{"get":{"summary":"Get history of invoice processing","description":"Retrieves detailed history of a specific invoice, including epochs and details of processing as deposit and invoice.","parameters":[{"in":"path","name":"intentId","required":true,"schema":{"type":"string"},"description":"Unique identifier for the intent."},{"in":"query","name":"cursor","required":false,"schema":{"type":"string"}},{"in":"query","name":"limit","required":false,"schema":{"type":"number"}}],"responses":{"200":{"description":"Successful response with history of invoice processing","content":{"application/json":{"schema":{"type":"object","required":["invoiceProcessingHistory","nextCursor"],"properties":{"invoiceProcessingHistory":{"type":"array","description":"Array containing history records of invoice processing.","items":{"type":"object","required":["epoch","domain","custodiedAssets","amountToBeDiscounted","rewardsForDepositors","amountAfterDiscount","discountdbps","selectedDestinationDomain","selectedDestinationDomainLiquidity","timestamp"],"properties":{"epoch":{"type":"integer","description":"Epoch in which the processing took place."},"domain":{"type":"integer","description":"Domain identifier for the processing step."},"custodiedAssets":{"type":"number","format":"float","description":"Total assets custodied during the epoch."},"amountToBeDiscounted":{"type":"number","format":"float","description":"Amount of assets subject to discount."},"rewardsForDepositors":{"type":"number","format":"float","description":"Rewards allocated for depositors."},"amountAfterDiscount":{"type":"number","format":"float","description":"Total amount after applying discounts."},"discountdbps":{"type":"integer","description":"Discount basis points applied."},"selectedDestinationDomain":{"type":"integer","description":"Selected destination domain for the intent."},"selectedDestinationDomainLiquidity":{"type":"number","format":"float","description":"Liquidity available in the selected destination domain."},"timestamp":{"type":"string"}}}},"nextCursor":{"type":"string","nullable":true}}}}}},"400":{"description":"Invalid chain or asset parameter."},"500":{"description":"Internal server error."}}}}}}
```


# Audits

### List of Audits

Chimera - September 2024: [Creed](https://github.com/everclearorg/audits/blob/main/reports/%5BCREED%5D%202024-08%20Everclear%20Chimera%20Mitigations.pdf)

Swaps - September 2025: [Creed](https://github.com/everclearorg/audits/blob/main/reports/%5BCREED%5D%20Everclear%20Swaps%20September%202025.pdf)

### Audit Documentation

All audits can be found in our Github repo: [Here](https://github.com/everclearorg/audits)

### **Immunefi Bug Bounty**

Everclear’s Bug Bounty program allows you report a vulnerability and be rewarded for your findings. The focus of the program is prevention of loss of user funds, denial of service, and governance hijacks.

To submit a bug via Immunefi, please follow these steps:

1. Visit the Immunefi portal (Coming soon)
2. Submit a report for Everclear
3. Input program name
4. Provide security level and detailed explanation
5. Provide wallet address

The Everclear team will aim to respond about the finding within the 72 hours of being received and resolve the outcome of findings in two weeks.

The active programs can be found here: *Coming soon.*


# Glossary

**Rebalancers** - centralised exchanges, solvers, market makers, and protocols rebalancing funds across chains

**Arbitrageurs** - professional and individual actors monitoring intents that have profitable discounts and providing liquidity when Rebalancers can not be netted against each other

**Intents** - requests to move token from origin chain to destination chain(s)

**Spoke** - the entry contract on domains used to create and fulfil intents

**Hub** - the clearing chain contract used to process epochs and settlements

**SpokeGateway** - the contract on domains receiving messages from the Spoke to send via Hyperlane to the Hub and receiving messages from Hyperlane sent by the Hub that should be forwarded to the Spoke contract

**HubGateway** - the contract on domains receiving messages from the Hub to send via Hyperlane to the Spoke and receiving messages from Hyperlane sent by the Spoke that should be forwarded to the Hub contract

**Intent creator/ owner** - user creating an intent

**Intent filler** - user fulfilling an intent

**Creating an intent** - moving a token from origin chain to destination chain(s) via Everclear

**Purchasing an intent** - providing funds via Everclear to purchase an invoice in the invoice queue

**Filling an intent** - providing funds via Everclear to fill an existing intent which may include sending tokens and executing calldata

**Settling an intent** - the process of sending the settlements from the Hub to the Spoke contracts to pay the intent creators the amount they are due from the netting process

**Invoices** - intents will be converted into invoices and added to the invoiceQueue when there are no invoices in the queue or when deposits remain unmatched after the processing step

**Deposits** - intents will be converted into deposits and added to the depositQueue when there are invoices in the queue - deposits can only be used to match invoices in the epoch they are received

**Settlements** - the amount that an intent creator should receive on a domain after an invoice and deposit has been matched will be converted into a settlement and added to the settlementQueue

**InvoiceQueue** - queue of intents on the clearing chain waiting to be fulfilled by items in the depositQueue when the epoch is processed

**DepositQueue** - queue of deposits on the clearing chain waiting to be matched with items in the invoiceQueue when the epoch is processed

**SettlementQueue** - once invoices and deposits are matched they will be removed from their respective queue, converted into a settlement and added to the settlement queue

**Intent processing** - processing the intent queue on the Spoke to transport intents to Hub

**Epoch Processing** - processing the invoice and deposit queues on Hub to match intents and convert to settlements

**Settlement Processing** - processing the settlement queue on Hub and sending messages to the Spoke contract to settle the intent owner

**Batch frequency** - The frequency queues are processed depends on the size of the queue or the age of the oldest item in the queue, varies by chain

**Netting Auction** - each invoice in the system is added to the auction where its price discounts by a predefined BPS for each epoch that passes until an arbitrageur fills the intent - invoices are exempt from discounts for the first epoch they are in the invoice queue

**Exemption period** - the first epoch an invoice is in the queue where it is exempt from being discounted

**Epoch** - the auction uses epochs to increase discounts on invoices

**Epoch length** - the number of blocks each epoch lasts

**Discount formula** - the formula used to calculate the amount an invoice should be discounted by

```tsx
discountBPS = (currentEpoch - entryEpoch - 1) * discountPerEpoch
```

**Discounted intent (full) -** the amount the original intent amount is discounted by

```tsx
discountBPS = (currentEpoch - entryEpoch - 1) * discountPerEpoch
amountAfterDiscount = _invoice.amount - ((_invoice.amount * _discountBps) / Constants.BPS_FEE_DENOMINATOR);
```

**Discounted intent (partial)** - if an invoice is only partially filled, the deposit amount filling the intent will be used to calculate a partial discount

```tsx
discountBPS = (currentEpoch - entryEpoch - 1) * discountPerEpoch
amountAfterDiscount = _invoice.amount - ((depositsAmount * _discountBps) / Constants.BPS_FEE_DENOMINATOR);
```


# FAQs

### **What is an intent?**

An intent is a transaction sent from an origin domain that should be delivered to a destination domain. In Everclear’s system, intents are rebalancing transactions where funds are moving between domains via our netting system or xERC20 bridge transactions.

### What is a Rebalancer?

Centralised exchanges, solvers, market makers, and protocols rebalancing funds across chains.

### What is an Arbitrageur?

Arbitrageurs are professional and individual actors monitoring intents that have profitable discounts. The Arbitrageurs in Everclear act as a source of funds when there are no Rebalancers to net intents against and improve the efficiency of our netting system.

### What is rebalancing?

Rebalancing is a core task professional actors such as market makers, solvers, intent protocols, and CEXs use to support the crypto ecosystem. Funds held by these actors are moved between different domains to ensure user orders can be filled, withdrawals can be supported, and risk can be adequately managed.

### **What is netting an intent?**

Intents are netted when they are processed successfully by our netting system. Netting is the simple process of taking multiple intents moving in opposing directions and matching them with each other so the intent owners receive what they desire but their assets do not need to move across chains.&#x20;

## Processes - Overview

### **How does the netting system work?**

The netting system creates queues of invoices and deposits from intents received on the Spoke domains on the Clearing chain. These queues are then matched with each other to enable users to travel between domains using our netting system. Invoices wait in the invoice queue for deposits moving in the opposing direction and they are netted against each other to achieve a low cost rebalancing transaction.

Our network is composed of professional actors who want to rebalance large sums of funds between domains at a low cost. The netting system provides a plug-and-play solution to achieve rebalancing goals - widespread adoption will enable participants to access an institutional grade transport mechanism between domains similar to the interbank infrastructure in traditional finance.

## Processes - Intent Creation

### **What is the process of a creating a new intent?**

To create an intent, request the transaction data from the Everclear API at [`POST /intents`](/developers/api#post-intents). Sign and send the transaction data onchain.

### How is the intentId created?

The `intentId` is created by taking the function inputs plus the initiator (msg.sender), origin domain, timestamp, and a nonce - encoding and then hashing this information. This approach ensures each `intentId` is unique even if the intent is identical to a previous requests due to the uniqueness of the domain, iterating nonce, and timestamp.

### What happens to ERC20 funds in an active intent?

The `Spoke` will pull funds from the `msg.sender` when calling `newIntent` and custody them on the contract. This allows Everclear to use the funds to finalise the settlement of the intent i.e. pay the user that is netted against the intent on the origin domain.

### How does an intent reach the Hub?

The intents created on a `Spoke` will be added to the `intentQueue` for that contract. This queue is processed by our relayers periodically based on whether (a) the size of the queue is larger than a threshold or (b) the oldest item in the queue is older than a threshold.

The `processIntentQueue` function takes an array of intents; the array is iterated upon and each item is hashed to and checked against an intentId in the queue (in order of the queue). Once all of the items are validly checked, the intents are encoded with the message type corresponding to process intents, and sent to the `SpokeGateway` which will send the message to the clearing chain.

The `processIntentQueue` function is publicly accessible, meaning any EOA can call it and if the intents provided are in the same order as the queue then the call will succeed. The Subgraph can be queried for this information and the example query for this can be found in the Rebalancer or Arbitrageur integration guides.

## Processes - Intent Netting

### How is an intent netted?

Intents in the system are netted against new intents created on the opposing domain that is being travelled to i.e. an existing intent moving USDC from Optimism to Arbitrum would be netted against a new intent moving USDC from Arbitrum to Optimism. The new intent is added to the `intentQueue` and processed as seen above.

### What is the process of netting an intent?

The first intent is delivered to the Hub domain and converted to an invoice, which waits to be netted against a deposit. When a new intent from the destination domain is delivered to the Hub domain and there are invoices it can be matched with, it will be converted to a deposit.

The invoices and deposits are then iterated matching the invoice with deposit(s) until the full amount has been netted. As this happens, the netted invoice will be added to the settlement queue as a settlement object and each deposit used will also be added to the settlement queue as a settlement object.

### How are multiple domains used?

Multiple domains can be provided as an input when creating a newIntent. If there are multiple domains, they will be iterated at the invoice/deposit queue processing time and the domain with the highest liquidity and lowest discount will be selected. Deposits from this domain will then be used to net against the invoice until it has been filled. Deposits will also follow a similar process, where the highest liquidity and lowest discount domain is used at settlement.

### What happens to the funds of the intent used as a deposit?

Just like the original intent, the funds from an intent that is used as a deposit will he custodied on the Spoke contract on the domain the `newIntent` was sent from. These funds will then be used to repay intents that have been netted through our system when they reach the domain.

### How does an intent reach the Hub?

Intents reach the hub through the `intentQueue` being processed in the `processIntentQueue` function on the `Spoke` contract. This queue is processed by our relayers periodically based on whether (a) the size of the queue is larger than a threshold or (b) the oldest item in the queue is older than a threshold.

The `processIntentQueue` function takes an array of Intent objects and the Spoke will check the intent exists before transporting it to the Hub. Each of the items are dequeued and the intents are sent to the `SpokeGateway` which will use Hyperlane to send the message to the clearing chain.

The `processIntentQueue` function is publicly accessible, meaning any EOA can call it by simply providing the current list of intents in order that the would like to process. Everclear will execute this process periodically based on a threshold related to the size of the queue and oldest item in the queue.

## Netting Auction Pricing

### What is the netting auction discount approach?

The netting auction discount, is the discount applied to an invoice when it has been in the invoice queue for more than one epoch. The invoice will be discounted for every passing epoch until there is a new intent that is received to match with it.

### When are invoices exempt from the discount?

Invoices will be exempt from being discounted for the first epoch they are in the invoice queue.&#x20;

### What is the max discount?

The max discount applicable to an invoice is provided by the user when they create a new intent.

### When would an invoice be discounted?

The discount would apply to an invoice when it is in the invoice queue for more than one epoch.

### **What is the discount formula?**

```solidity
discountBPS = (currentEpoch - entryEpoch - 1) * discountPerEpoch
amountAfterDiscount = _invoice.amount - ((_amountToBeDiscounted * _discountBps) / Constants.BPS_FEE_DENOMINATOR);
```

*Where the amountToBeDiscounted is the value of the invoice when it is being fulled netted or the value of the deposit when it is being partially filled.*

## Batch Frequency

### How often are batches sent from Spoke to Hub and Hub to Spoke?

Batches are sent to the hub by relayers periodically based on whether (a) the size of the queue is larger than a threshold or (b) the oldest item in the queue is older than a threshold.

Specific timings coming soon.

### Can I make the timeframes faster?

Yes, the process function on the `Spoke` that sends intents to the `Hub` are public. This means it can be called to increase the speed of queue processing. To do this, an array of intents would need to be provided in the correct order to call the `processIntentQueue` function successfully.

The same applies to processing functions from Hub to Spoke - view the Fundamental Mechanics section for more information about this.

## Costs & Pricing

### What fees are incurred sending an intent via Everclear?

An intent will expire three possible fees:

1. Protocol fee
2. Gas Fee

### What is the protocol fee?

Protocol fees are charged dynamically depending on the route (combination of asset, origin, destinations). Fees are levied against the amount sent.


# Contracts

Here you can find deployed contracts by environment.


# Testnet

The contract addresses for the deployed Everclear contracts in our testnet environment.

{% hint style="warning" %}
This is a testnet environment, subject to frequent changes.
{% endhint %}

## Supported Chains

| Chain                | ChainID  | DomainID | Role  |
| -------------------- | -------- | -------- | ----- |
| Everclear-Sepolia    | 6398     | 6398     | Hub   |
| Sepolia              | 11155111 | 11155111 | Spoke |
| Chapel (BNB Testnet) | 97       | 97       | Spoke |
| Optimism Sepolia     | 11155420 | 11155420 | Spoke |
| Arbitrum Sepolia     | 421614   | 421614   | Spoke |

## Deployed Contracts

| Contract Name  | DomainID | Address                                    |
| -------------- | -------- | ------------------------------------------ |
| EverclearHub   | 6398     | 0x4C526917051ee1981475BB6c49361B0756F505a8 |
| HubGateway     | 6398     | 0x4b0017AD0CAbdf72106fC5d6B15e366A9A47DD25 |
| EverclearSpoke | 11155111 | 0x3650432cB5331e6dc95be8C1d8168b7c37f677e2 |
| SpokeGateway   | 11155111 | 0x37f1E1C89306c0e95bfa3221Ef7D364886e43047 |
| EverclearSpoke | 97       | 0xFeaaF6291E40252413aA6cb5214F486c8088207e |
| SpokeGateway   | 97       | 0xCBFCE40d758564B855506Db7Ff15F1978B8E0Fa1 |
| EverclearSpoke | 11155420 | 0xf9A4d8cED1b8c53B39429BB9a8A391b74E85aE5C |
| SpokeGateway   | 11155420 | 0xfea15B6F776aA3a84d70e5D98E48f19556F76eb7 |
| EverclearSpoke | 421614   | 0x97f24e4eeD4d05D48cb8a45ADfE5e6aF2de14F71 |
| SpokeGateway   | 421614   | 0x0A1bcEE4F09B691EbFbb3a5b83221A7Ce896c6bd |

## Registered Assets

A few varieties of tokens are available to test with.

* TEST: Generic ERC20 with 18 decimals across all chains.&#x20;
* DTT: ERC20 with different decimal denominations on certain chains.
* TestxERC20: xERC20 with 18 decimals across all chains.

<table><thead><tr><th width="147">Asset Name</th><th width="89">Symbol</th><th width="104">Decimals</th><th width="109">DomainID</th><th width="175">Address</th><th width="166">Faucet</th><th width="134">Faucet Limit</th></tr></thead><tbody><tr><td>Test Token</td><td>TEST</td><td>18</td><td>11155111</td><td>0xd26e3540A0A368845B234736A0700E0a5A821bBA</td><td>(open mint)</td><td>N/A</td></tr><tr><td>Test Token</td><td>TEST</td><td>18</td><td>97</td><td>0x5f921E4DE609472632CEFc72a3846eCcfbed4ed8</td><td>(open mint)</td><td>N/A</td></tr><tr><td>Test Token</td><td>TEST</td><td>18</td><td>11155420</td><td>0x7Fa13D6CB44164ea09dF8BCc673A8849092D435b</td><td>(open mint)</td><td>N/A</td></tr><tr><td>Test Token</td><td>TEST</td><td>18</td><td>421614</td><td>0xaBF282c88DeD3e386701a322e76456c062468Ac2</td><td>(open mint)</td><td>N/A</td></tr><tr><td>DecimalsTestToken</td><td>DTT</td><td>6</td><td>11155111</td><td>0xd18C5E22E67947C8f3E112C622036E65a49773ab</td><td>0x277b67ce20c83e1ad9825c152762ba2b9b297aa6</td><td>100 * 1e6 per day</td></tr><tr><td>DecimalsTestToken</td><td>DTT</td><td>18</td><td>97</td><td>0xdef63AA35372780f8F92498a94CD0fA30A9beFbB</td><td>0xca7c45a3e5bdf9d6db5dae64c41204195879042f</td><td>100 * 1e18 per  day</td></tr><tr><td>DecimalsTestToken</td><td>DTT</td><td>6</td><td>11155420</td><td>0x294FD6cfb1AB97Ad5EA325207fF1d0E85b9C693f</td><td>0x1f150e59d87e53b6543cdaee964b7f4f074e2867</td><td>100 * 1e6 per day</td></tr><tr><td>DecimalsTestToken</td><td>DTT</td><td>6</td><td>421614</td><td>0xDFEA0bb49bcdCaE920eb39F48156B857e817840F</td><td>0xc194c96430a43ebcd6a19c13813343f019492e5b</td><td>100 * 1e6 per day</td></tr><tr><td>TestxERC20</td><td>xTEST</td><td>18</td><td>11155111</td><td>0x8F936120b6c5557e7Cd449c69443FfCb13005751</td><td>0x2de7cc4291078d1e49b41ee382ec702f5e29b6ff</td><td>1000000 * 1e18 per day</td></tr><tr><td>TestxERC20</td><td>xTEST</td><td>18</td><td>97</td><td>0x9064cD072D5cEfe70f854155d1b23171013be5c7</td><td>0x3bb905a81de6928002e79cb2dd22badca5e78e2c</td><td>1000000 * 1e18 per day</td></tr><tr><td>TestxERC20</td><td>xTEST</td><td>18</td><td>11155420</td><td>0xD3D4c6845e297e99e219BD8e3CaC84CA013c0770</td><td>0x4902cd7bacda179cd8b08f824124821c62a493fc</td><td>1000000 * 1e18 per day</td></tr><tr><td>TestxERC20</td><td>xTEST</td><td>18</td><td>421614</td><td>0xd6dF5E67e2DEF6b1c98907d9a09c18b2b7cd32C3</td><td>0xb6abe199f9256c598df0646ca9c073276d412c90</td><td>1000000 * 1e18 per day</td></tr></tbody></table>


# Mainnet

The contract addresses for the deployed Everclear contracts in our mainnet environment.

## Supported Chains

| Chain     | ChainID    | DomainID   | Role  |
| --------- | ---------- | ---------- | ----- |
| Everclear | 25327      | 25327      | Hub   |
| Ethereum  | 1          | 1          | Spoke |
| Optimism  | 10         | 10         | Spoke |
| BSC       | 56         | 56         | Spoke |
| Unichain  | 130        | 130        | Spoke |
| Polygon   | 137        | 137        | Spoke |
| ZkSync    | 324        | 324        | Spoke |
| Ronin     | 2020       | 2020       | Spoke |
| Base      | 8453       | 8453       | Spoke |
| Apechain  | 33139      | 33139      | Spoke |
| Mode      | 34443      | 34443      | Spoke |
| Arbitrum  | 42161      | 421614     | Spoke |
| Avalanche | 43114      | 43114      | Spoke |
| Zircuit   | 48900      | 48900      | Spoke |
| Linea     | 59144      | 59144      | Spoke |
| Blast     | 81457      | 81457      | Spoke |
| Scroll    | 534352     | 534352     | Spoke |
| Taiko     | 167000     | 167000     | Spoke |
| Berachain | 80094      | 80094      | Spoke |
| Gnosis    | 100        | 100        | Spoke |
| Mantle    | 5000       | 5000       | Spoke |
| Sonic     | 146        | 146        | Spoke |
| Ink       | 57073      | 57073      | Spoke |
| TAC       | 239        | 239        | Spoke |
| TRON      | 728126428  | 728126428  | Spoke |
| Solana    | 1399811149 | 1399811149 | Spoke |

## Deployed Contracts

| Contract Name  | DomainID | Address                                    |
| -------------- | -------- | ------------------------------------------ |
| EverclearHub   | 25327    | 0xa05A3380889115bf313f1Db9d5f335157Be4D816 |
| HubGateway     | 25327    | 0xEFfAB7cCEBF63FbEFB4884964b12259d4374FaAa |
| EverclearSpoke | 1        | 0xa05A3380889115bf313f1Db9d5f335157Be4D816 |
| SpokeGateway   | 1        | 0x9ADA72CCbAfe94248aFaDE6B604D1bEAacc899A7 |
| XERC20Module   | 1        | 0xD1daF260951B8d350a4AeD5C80d74Fd7298C93F4 |
| FeeAdapter     | 1        | 0xd0185bfb8107c5b2336bC73cE3fdd9Bfb504540e |
| EverclearSpoke | 10       | 0xa05A3380889115bf313f1Db9d5f335157Be4D816 |
| SpokeGateway   | 10       | 0x9ADA72CCbAfe94248aFaDE6B604D1bEAacc899A7 |
| XERC20Module   | 10       | 0xD1daF260951B8d350a4AeD5C80d74Fd7298C93F4 |
| FeeAdapter     | 10       | 0xd0185bfb8107c5b2336bC73cE3fdd9Bfb504540e |
| EverclearSpoke | 56       | 0xa05A3380889115bf313f1Db9d5f335157Be4D816 |
| SpokeGateway   | 56       | 0x9ADA72CCbAfe94248aFaDE6B604D1bEAacc899A7 |
| XERC20Module   | 56       | 0xD1daF260951B8d350a4AeD5C80d74Fd7298C93F4 |
| FeeAdapter     | 56       | 0xd0185bfb8107c5b2336bC73cE3fdd9Bfb504540e |
| EverclearSpoke | 130      | 0xa05A3380889115bf313f1Db9d5f335157Be4D816 |
| SpokeGateway   | 130      | 0x9ADA72CCbAfe94248aFaDE6B604D1bEAacc899A7 |
| XERC20Module   | 130      | 0xD1daF260951B8d350a4AeD5C80d74Fd7298C93F4 |
| FeeAdapter     | 130      | 0x877Fd0A881B63eBE413124EeE6abbCD7E82cf10b |
| EverclearSpoke | 137      | 0x7189C59e245135696bFd2906b56607755F84F3fD |
| SpokeGateway   | 137      | 0x26CFF54f11608Cd3060408690803AB4a43f462f2 |
| XERC20Module   | 137      | 0x4aade9F812d2160A1b3c6e77f30f1bF14eC7e2a5 |
| FeeAdapter     | 137      | 0xd0185bfb8107c5b2336bC73cE3fdd9Bfb504540e |
| EverclearSpoke | 324      | 0x7F5e085981C93C579c865554B9b723B058AaE4D3 |
| SpokeGateway   | 324      | 0xbD82E5503461913a70566E66a454465a46F5C903 |
| XERC20Module   | 324      | 0x6ACf19603C8588885250F7a02F0EaFFa4FcafB04 |
| FeeAdapter     | 324      | 0xa537f0d027cBA1661dd1eB46fCd79030CD75A2cd |
| EverclearSpoke | 2020     | 0xdCA40903E271Cc76AECd62dF8d6c19f3Ac873E64 |
| SpokeGateway   | 2020     | 0x1FC1f47a6a7c61f53321643A14bEc044213AbF95 |
| XERC20Module   | 2020     | 0x92dcaf947DB325ac023b105591d76315743883eD |
| FeeAdapter     | 2020     | 0x5443DF583Cc039881Fe30A730310A4f43016df88 |
| EverclearSpoke | 8453     | 0xa05A3380889115bf313f1Db9d5f335157Be4D816 |
| SpokeGateway   | 8453     | 0x9ADA72CCbAfe94248aFaDE6B604D1bEAacc899A7 |
| XERC20Module   | 8453     | 0xD1daF260951B8d350a4AeD5C80d74Fd7298C93F4 |
| FeeAdapter     | 8453     | 0xd0185bfb8107c5b2336bC73cE3fdd9Bfb504540e |
| EverclearSpoke | 33139    | 0xa05A3380889115bf313f1Db9d5f335157Be4D816 |
| SpokeGateway   | 33139    | 0x9ADA72CCbAfe94248aFaDE6B604D1bEAacc899A7 |
| XERC20Module   | 33139    | 0xD1daF260951B8d350a4AeD5C80d74Fd7298C93F4 |
| FeeAdapter     | 33139    | 0xd0185bfb8107c5b2336bC73cE3fdd9Bfb504540e |
| EverclearSpoke | 34443    | 0xeFa6Ac3F931620fD0449eC8c619f2A14A0A78E99 |
| SpokeGateway   | 34443    | 0xD1daF260951B8d350a4AeD5C80d74Fd7298C93F4 |
| XERC20Module   | 34443    | 0x7B435CCF350DBC773e077410e8FEFcd46A1cDfAA |
| FeeAdapter     | 34443    | 0xd0185bfb8107c5b2336bC73cE3fdd9Bfb504540e |
| EverclearSpoke | 42161    | 0xa05A3380889115bf313f1Db9d5f335157Be4D816 |
| SpokeGateway   | 42161    | 0x9ADA72CCbAfe94248aFaDE6B604D1bEAacc899A7 |
| XERC20Module   | 42161    | 0xD1daF260951B8d350a4AeD5C80d74Fd7298C93F4 |
| FeeAdapter     | 42161    | 0xd0185bfb8107c5b2336bC73cE3fdd9Bfb504540e |
| EverclearSpoke | 43114    | 0x9aA2Ecad5C77dfcB4f34893993f313ec4a370460 |
| SpokeGateway   | 43114    | 0x7EB63a646721de65eBa79ffe91c55DCE52b73c12 |
| XERC20Module   | 43114    | 0x255aba6E7f08d40B19872D11313688c2ED65d1C9 |
| FeeAdapter     | 43114    | 0xd0185bfb8107c5b2336bC73cE3fdd9Bfb504540e |
| EverclearSpoke | 48900    | 0xD0E86F280D26Be67A672d1bFC9bB70500adA76fe |
| SpokeGateway   | 48900    | 0x2Ec2b2CC1813941b638D3ADBA86A1af7F6488A9E |
| XERC20Module   | 48900    | 0xE4197BC6b18E2BE0BAF09c13DA8239B40005D541 |
| FeeAdapter     | 48900    | 0xe5F2F4afAd6211cfBD6a882D5a6a435530Ee3909 |
| EverclearSpoke | 59144    | 0xc24dC29774fD2c1c0c5FA31325Bb9cbC11D8b751 |
| SpokeGateway   | 59144    | 0xC1E5b7bE6c62948eeAb40523B33e5d0121ccae94 |
| XERC20Module   | 59144    | 0xBBd3546f8FB1A335E2Cc1AeE5d7f3FC696D853aB |
| FeeAdapter     | 59144    | 0xAa7ee09f745a3c5De329EB0CD67878Ba87B70Ffe |
| EverclearSpoke | 81457    | 0x9ADA72CCbAfe94248aFaDE6B604D1bEAacc899A7 |
| SpokeGateway   | 81457    | 0x4e2bbbFb10058E0D248a78fe2F469562f4eDbe66 |
| XERC20Module   | 81457    | 0xdCA40903E271Cc76AECd62dF8d6c19f3Ac873E64 |
| FeeAdapter     | 81457    | 0xd0185bfb8107c5b2336bC73cE3fdd9Bfb504540e |
| EverclearSpoke | 534352   | 0xa05A3380889115bf313f1Db9d5f335157Be4D816 |
| SpokeGateway   | 534352   | 0x9ADA72CCbAfe94248aFaDE6B604D1bEAacc899A7 |
| XERC20Module   | 534352   | 0xD1daF260951B8d350a4AeD5C80d74Fd7298C93F4 |
| FeeAdapter     | 534352   | 0xd0185bfb8107c5b2336bC73cE3fdd9Bfb504540e |
| EverclearSpoke | 167000   | 0x9ADA72CCbAfe94248aFaDE6B604D1bEAacc899A7 |
| SpokeGateway   | 167000   | 0x4e2bbbFb10058E0D248a78fe2F469562f4eDbe66 |
| XERC20Module   | 167000   | 0xdCA40903E271Cc76AECd62dF8d6c19f3Ac873E64 |
| FeeAdapter     | 167000   | 0x986962C73059e06303efaD1F4c61Ed4905Fc5431 |
| EverclearSpoke | 80094    | 0xa05A3380889115bf313f1Db9d5f335157Be4D816 |
| SpokeGateway   | 80094    | 0x9ADA72CCbAfe94248aFaDE6B604D1bEAacc899A7 |
| XERC20Module   | 80094    | 0xD1daF260951B8d350a4AeD5C80d74Fd7298C93F4 |
| FeeAdapter     | 80094    | 0x3c135048306b412Ad8F4375F6a8CBe94b5D56184 |
| EverclearSpoke | 100      | 0xe0F010e465f15dcD42098dF9b99F1038c11B3056 |
| SpokeGateway   | 100      | 0xeFa6Ac3F931620fD0449eC8c619f2A14A0A78E99 |
| XERC20Module   | 100      | 0xEFfAB7cCEBF63FbEFB4884964b12259d4374FaAa |
| FeeAdapter     | 100      | 0xd0185bfb8107c5b2336bC73cE3fdd9Bfb504540e |
| EverclearSpoke | 5000     | 0xe0F010e465f15dcD42098dF9b99F1038c11B3056 |
| SpokeGateway   | 5000     | 0xeFa6Ac3F931620fD0449eC8c619f2A14A0A78E99 |
| XERC20Module   | 5000     | 0xEFfAB7cCEBF63FbEFB4884964b12259d4374FaAa |
| FeeAdapter     | 5000     | 0xd0185bfb8107c5b2336bC73cE3fdd9Bfb504540e |
| EverclearSpoke | 146      | 0xa05A3380889115bf313f1Db9d5f335157Be4D816 |
| SpokeGateway   | 146      | 0x9ADA72CCbAfe94248aFaDE6B604D1bEAacc899A7 |
| XERC20Module   | 146      | 0xD1daF260951B8d350a4AeD5C80d74Fd7298C93F4 |
| FeeAdapter     | 146      | 0xd0185bfb8107c5b2336bC73cE3fdd9Bfb504540e |
| EverclearSpoke | 57073    | 0xa05A3380889115bf313f1Db9d5f335157Be4D816 |
| SpokeGateway   | 57073    | 0x9ADA72CCbAfe94248aFaDE6B604D1bEAacc899A7 |
| XERC20Module   | 57073    | 0xD1daF260951B8d350a4AeD5C80d74Fd7298C93F4 |
| FeeAdapter     | 57073    | 0x877Fd0A881B63eBE413124EeE6abbCD7E82cf10b |

## Registered Assets

| Asset Name           | Symbol   | Decimals | DomainID   | Address                                                            |
| -------------------- | -------- | -------- | ---------- | ------------------------------------------------------------------ |
| CLEAR Token          | CLEAR    | 18       | 1          | 0x58b9cB810A68a7f3e1E4f8Cb45D1B9B3c79705E8                         |
| CLEAR Token          | CLEAR    | 18       | 10         | 0x58b9cB810A68a7f3e1E4f8Cb45D1B9B3c79705E8                         |
| CLEAR Token          | CLEAR    | 18       | 56         | 0x58b9cB810A68a7f3e1E4f8Cb45D1B9B3c79705E8                         |
| CLEAR Token          | CLEAR    | 18       | 137        | 0x58b9cB810A68a7f3e1E4f8Cb45D1B9B3c79705E8                         |
| CLEAR Token          | CLEAR    | 18       | 25327      | 0x58b9cB810A68a7f3e1E4f8Cb45D1B9B3c79705E8                         |
| CLEAR Token          | CLEAR    | 18       | 42161      | 0x58b9cB810A68a7f3e1E4f8Cb45D1B9B3c79705E8                         |
| Coinbase Wrapped BTC | cbBTC    | 8        | 1          | 0xcbB7C0000aB88B473b1f5aFd9ef808440eed33Bf                         |
| Coinbase Wrapped BTC | cbBTC    | 8        | 8453       | 0xcbB7C0000aB88B473b1f5aFd9ef808440eed33Bf                         |
| EURC                 | EURC     | 6        | 1          | 0x1aBaEA1f7C830bD89Acc67eC4af516284b1bC33c                         |
| EURC                 | EURC     | 6        | 8453       | 0x60a3E35Cc302bFA44Cb288Bc5a4F316Fdb1adb42                         |
| mETH                 | mETH     | 18       | 1          | 0xd5f7838f5c461feff7fe49ea5ebaf7728bb0adfa                         |
| mETH                 | mETH     | 18       | 5000       | 0xcda86a272531e8640cd7f1a92c01839911b90bb0                         |
| PT-sUSDE             | PT-sUSDE | 18       | 1          | 0xE8483517077afa11A9B07f849cee2552f040d7b2                         |
| PT-sUSDE             | PT-sUSDE | 6        | 1399811149 | 0x05c0ad344d082fe99030a0414acc5726b24c89e1a511eac6e58d809145dd6503 |
| Tether USD           | USDT     | 6        | 1          | 0xdAC17F958D2ee523a2206206994597C13D831ec7                         |
| Tether USD           | USDT     | 6        | 10         | 0x94b008aA00579c1307B0EF2c499aD98a8ce58e58                         |
| Tether USD           | USDT     | 18       | 56         | 0x55d398326f99059fF775485246999027B3197955                         |
| Tether USD           | USDT     | 6        | 130        | 0x588CE4F028D8e7B53B687865d6A67b3A54C75518                         |
| Tether USD           | USDT     | 6        | 137        | 0xc2132d05d31c914a87c6611c10748aeb04b58e8f                         |
| Tether USD           | USDT     | 6        | 324        | 0x493257fD37EDB34451f62EDf8D2a0C418852bA4C                         |
| Tether USD           | USDT     | 6        | 34443      | 0xf0F161fDA2712DB8b566946122a5af183995e2eD                         |
| Tether USD           | USDT     | 6        | 42161      | 0x3f3f5dF88dC9F13eac63DF89EC16ef6e7E25DdE7                         |
| Tether USD           | USDT     | 6        | 43114      | 0x9702230A8Ea53601f5cD2dc00fDBc13d4dF4A8c7                         |
| Tether USD           | USDT     | 6        | 59144      | 0xa219439258ca9da29e9cc4ce5596924745e12b93                         |
| Tether USD           | USDT     | 6        | 167000     | 0x2DEF195713CF4a606B49D07E520e22C17899a736                         |
| Tether USD           | USDT     | 6        | 534532     | 0xf55BEC9cafDbE8730f096Aa55dad6D22d44099Df                         |
| Tether USD           | USDT     | 6        | 146        | 0x6047828dc181963ba44974801FF68e538dA5eaF9                         |
| Tether USD           | USDT     | 6        | 239        | 0xAF988C3f7CB2AceAbB15f96b19388a259b6C438f                         |
| Tether USD           | USDT     | 6        | 5000       | 0x201EBa5CC46D216Ce6DC03F6a759e8E766e956aE                         |
| Tether USD           | USDT     | 6        | 8453       | 0xfde4C96c8593536E31F229EA8f37b2ADa2699bb2                         |
| Tether USD           | USDT     | 6        | 42161      | 0xFd086bC7CD5C481DCC9C85ebE478A1C0b69FCbb9                         |
| Tether USD           | USDT     | 6        | 48900      | 0x46dDa6a5a559d861c06EC9a95Fb395f5C3Db0742                         |
| Tether USD           | USDT     | 6        | 534352     | 0xf55BEC9cafDbE8730f096Aa55dad6D22d44099Df                         |
| Tether USD           | USDT     | 6        | 728126428  | TR7NHqjeKQxGTCi8q8ZY4pL8otSzgjLj6t                                 |
| Tether USD           | USDT     | 6        | 1399811149 | 0xce010e60afedb22717bd63192f54145a3f965a33bb82d2c7029eb2ce1e208264 |
| USD Coin             | USDC     | 6        | 1          | 0xA0b86991c6218b36c1d19D4a2e9Eb0cE3606eB48                         |
| USD Coin             | USDC     | 6        | 10         | 0x0b2C639c533813f4Aa9D7837CAf62653d097Ff85                         |
| USD Coin             | USDC     | 18       | 56         | 0x8AC76a51cc950d9822D68b83fE1Ad97B32Cd580d                         |
| USD Coin             | USDC     | 6        | 130        | 0x078D782b760474a361dDA0AF3839290b0EF57AD6                         |
| USD Coin             | USDC     | 6        | 137        | 0x3c499c542cEF5E3811e1192ce70d8cC03d5c3359                         |
| USD Coin             | USDC     | 6        | 324        | 0x1d17CBcF0D6D143135aE902365D2E5e2A16538D4                         |
| USD Coin             | USDC     | 6        | 2020       | 0x0B7007c13325C48911F73A2daD5FA5dCBf808aDc                         |
| USD Coin             | USDC     | 6        | 8453       | 0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913                         |
| USD Coin             | USDC     | 6        | 34443      | 0xd988097fb8612cc24eeC14542bC03424c656005f                         |
| USD Coin             | USDC     | 6        | 42161      | 0xaf88d065e77c8cC2239327C5EDb3A432268e5831                         |
| USD Coin             | USDC     | 6        | 43114      | 0xB97EF9Ef8734C71904D8002F8b6Bc66Dd9c48a6E                         |
| USD Coin             | USDC     | 6        | 59144      | 0x176211869cA2b568f2A7D4EE941E073a821EE1ff                         |
| USD Coin             | USDC     | 6        | 167000     | 0x07d83526730c7438048D55A4fc0b850e2aaB6f0b                         |
| USD Coin             | USDC     | 6        | 534352     | 0x06eFdBFf2a14a7c8E15944D1F4A48F9F95F663A4                         |
| USD Coin             | USDC     | 6        | 146        | 0x29219dd400f2Bf60E5a23d13Be72B486D4038894                         |
| USD Coin             | USDC     | 6        | 5000       | 0x09Bc4E0D864854c6aFB6eB9A9cdF58aC190D0dF9                         |
| USD Coin             | USDC     | 6        | 48900      | 0x3b952c8C9C44e8Fe201e2b26F6B2200203214cfF                         |
| USD Coin             | USDC     | 6        | 57073      | 0x2D270e6886d130D724215A266106e6832161EAEd                         |
| USD Coin             | USDC     | 6        | 80094      | 0x549943e04f40284185054145c6E4e9568C1D3241                         |
| USD Coin             | USDC     | 6        | 1399811149 | 0xc6fa7af3bedbad3a3d65f36aabc97431b1bbe4c2d2f6e0e47ca60203452f5d61 |
| USDC.E               | USDC.E   | 6        | 57073      | 0xF1815bd50389c46847f0Bda824eC8da914045D14                         |
| Wrapped Bitcoin      | WBTC     | 8        | 1          | 0x2260FAC5E5542a773Aa44fBCfeDf7C193bc2C599                         |
| Wrapped Bitcoin      | WBTC     | 8        | 8453       | 0x0555E30da8f98308EdB960aa94C0Db47230d2B9c                         |
| Wrapped Bitcoin      | WBTC     | 8        | 42161      | 0x2f2a2543B76A4166549F7aaB2e75Bef0aefC5B0f                         |
| Wrapped Bitcoin      | WBTC     | 8        | 1399811149 | 0x233cea474d6cb513dad421c82e681f80ed7512455dfb91fc68363b99d9156582 |
| Wrapped Ether        | WETH     | 18       | 1          | 0xC02aaA39b223FE8D0A0e5C4F27eAD9083C756Cc2                         |
| Wrapped Ether        | WETH     | 18       | 10         | 0x4200000000000000000000000000000000000006                         |
| Wrapped Ether        | WETH     | 18       | 56         | 0x2170Ed0880ac9A755fd29B2688956BD959F933F8                         |
| Wrapped Ether        | WETH     | 18       | 130        | 0x4200000000000000000000000000000000000006                         |
| Wrapped Ether        | WETH     | 18       | 137        | 0x7ceB23fD6bC0adD59E62ac25578270cFf1b9f619                         |
| Wrapped Ether        | WETH     | 18       | 324        | 0x5AEa5775959fBC2557Cc8789bC1bf90A239D9a91                         |
| Wrapped Ether        | WETH     | 18       | 2020       | 0xc99a6A985eD2Cac1ef41640596C5A5f9F4E19Ef5                         |
| Wrapped Ether        | WETH     | 18       | 8453       | 0x4200000000000000000000000000000000000006                         |
| Wrapped Ether        | WETH     | 18       | 33139      | 0xcF800F4948D16F23333508191B1B1591daF70438                         |
| Wrapped Ether        | WETH     | 18       | 34443      | 0x4200000000000000000000000000000000000006                         |
| Wrapped Ether        | WETH     | 18       | 42161      | 0x82aF49447D8a07e3bd95BD0d56f35241523fBab1                         |
| Wrapped Ether        | WETH     | 18       | 167000     | 0xA51894664A773981C6C112C43ce576f315d5b1B6                         |
| Wrapped Ether        | WETH     | 18       | 43114      | 0x49d5c2bdffac6ce2bfdb6640f4f80f226bc10bab                         |
| Wrapped Ether        | WETH     | 18       | 59144      | 0xe5d7c2a44ffddf6b295a15c148167daaaf5cf34f                         |
| Wrapped Ether        | WETH     | 18       | 81457      | 0x4300000000000000000000000000000000000004                         |
| Wrapped Ether        | WETH     | 18       | 534352     | 0x5300000000000000000000000000000000000004                         |
| Wrapped Ether        | WETH     | 18       | 146        | 0x50c42dEAcD8Fc9773493ED674b675bE577f2634b                         |
| Wrapped Ether        | WETH     | 18       | 5000       | 0xdEAddEaDdeadDEadDEADDEAddEADDEAddead1111                         |
| Wrapped Ether        | WETH     | 18       | 25327      | 0x2e31ebD2eB114943630Db6ba8c7f7687bdA5835F                         |
| Wrapped Ether        | WETH     | 18       | 48900      | 0x4200000000000000000000000000000000000006                         |
| Wrapped Ether        | WETH     | 18       | 57073      | 0x4200000000000000000000000000000000000006                         |
| Wrapped Ether        | WETH     | 18       | 80094      | 0x2F6F07CDcf3588944Bf4C42aC74ff24bF56e7590                         |
| Wrapped Ether        | WETH     | 8        | 1399811149 | 0x66e5188a1308a1db90b6d31f3fbdca8c3df2678c8112dfdd3d192c5a3cc457a8 |
| xPufETH              | xPufETH  | 18       | 1          | 0xD7D2802f6b19843ac4DfE25022771FD83b5A7464                         |
| xPufETH              | xPufETH  | 18       | 33139      | 0x6234E5ef39B12EFdFcbd99dd7F452F27F3fEAE3b                         |
| xPufETH              | xPufETH  | 18       | 48900      | 0x9346A5043C590133FE900aec643D9622EDddBA57                         |
| xPufETH              | xPufETH  | 18       | 56         | 0x64274835D88F5c0215da8AADd9A5f2D2A2569381                         |
| xPufETH              | xPufETH  | 18       | 8453       | 0x23dA5F2d509cb43A59d43C108a43eDf34510eff1                         |


# Subgraphs

Y can find deployed subgraphs by environment in the sub-sections. Below, the main entities are described.

## **Spoke Entities**

The main entities that can be queried in the Spoke Subgraph are:

* **OriginIntent**: tracks status and information related to an intent created on this domain
* **DestinationIntent**: tracks status and information related to an intent settled on this domain
* **IntentSettleEvent**: created when an intent is settled on destination via `_handleSettlement`
* **Queue**: the intent queue on the domain

**IntentStatus**

```graphql
enum IntentStatus {
  NONE
  ADDED # signifies added to the message queue
  DISPATCHED # signifies the batch containing the message has been sent
  SETTLED # signifies settlement has arrived on spoke domain for intent
  SETTLED_AND_MANUALLY_EXECUTED # settlement has arrived & calldata executed
}
```

**OriginIntent**

```graphql
type OriginIntent @entity {
  id: Bytes! # intent id
  queueIdx: BigInt!
  message: Message
  settlement: SpokeSettlement

  status: IntentStatus!

  initiator: Bytes!
  receiver: Bytes!
  inputAsset: Bytes!
  outputAsset: Bytes!
  maxFee: BigInt!
  origin: BigInt!
  nonce: BigInt!
  timestamp: BigInt!
  ttl: BigInt!
  amount: BigInt!
  destinations: [BigInt!]
  data: Bytes!

  # Add Intent Transaction
  addEvent: IntentAddEvent!
}
```

**DestinationIntent**

```graphql
type DestinationIntent @entity {
  id: Bytes! # intent id
  queueIdx: BigInt!
  message: Message
  status: IntentStatus!
  settlement: SpokeSettlement

  initiator: Bytes!
  receiver: Bytes!
  inputAsset: Bytes!
  outputAsset: Bytes!
  maxFee: BigInt!
  origin: BigInt!
  nonce: BigInt!
  timestamp: BigInt!
  ttl: BigInt!
  amount: BigInt!
  destinations: [BigInt!]
  data: Bytes!

  fillEvent: IntentFillEvent!
  calldataExecutedEvent: ExternalCalldataExecutedEvent
}
```

**IntentSettleEvent**

```graphql
type IntentSettleEvent @entity(immutable: true) {
  id: Bytes!
  intentId: Bytes!

  account: Bytes!
  asset: Bytes!
  amount: BigInt!

  # Settle Transaction
  transactionHash: Bytes!
  timestamp: BigInt!
  gasPrice: BigInt!
  gasLimit: BigInt!
  blockNumber: BigInt!
  txOrigin: Bytes!

  txNonce: BigInt!
}
```

**Queue**

```graphql
type Queue @entity {
  id: Bytes! # 'INTENT' or 'FILL'
  type: QueueType!
  lastProcessed: BigInt
  size: BigInt!
  first: BigInt!
  last: BigInt!
}
```

## **Hub Entities**

The main entities that can be queried in the Hub Subgraph are:

* **HubIntent:** tracks the status of an intent on the Hub
* **SettlementQueue:** tracks settlements in the queue
* **SettlementMessage:** settlement message being sent to the Spoke
* **Token:** information related to a token including fees, feeRecipients, and related assets
* **Asset:** information related to an asset on a domain
* **Solver:** information related to a Solver's configuration

**HubIntentStatus**

```graphql
enum HubIntentStatus {
  NONE
  ADDED
  DEPOSIT_PROCESSED
  FILLED
  ADDED_AND_FILLED
  INVOICED
  SETTLED
  SETTLED_AND_MANUALLY_EXECUTED
  UNSUPPORTED
  UNSUPPORTED_RETURNED
}
```

**HubIntent**

```graphql
type HubIntent @entity {
  id: Bytes!
  status: HubIntentStatus!
  pendingRewards: BigInt!

  settlement: HubSettlement

  addEvent: IntentAddEvent
  fillEvent: IntentFillEvent
  message: SettlementMessage
  pendingRewardsAddedEvents: [PendingRewardsAddedEvent!]!
}
```

**SettlementQueue**

```graphql
type SettlementQueue @entity {
  id: Bytes! # domain
  domain: BigInt!
  lastProcessed: BigInt
  size: BigInt!
  first: BigInt!
  last: BigInt!
}
```

**SettlementMessageType**

```graphql
enum SettlementMessageType {
  SETTLED
  UNSUPPORTED_RETURNED
}
```

**SettlementMessage**

```graphql
type SettlementMessage @entity(immutable: true) {
  id: Bytes!
  quote: BigInt!
  domain: BigInt!
  intentIds: [Bytes!]!
  type: SettlementMessageType!

  txOrigin: Bytes!
  transactionHash: Bytes!
  timestamp: BigInt!
  blockNumber: BigInt!
  txNonce: BigInt!
  gasLimit: BigInt!
  gasPrice: BigInt!
}
```

**Token**

```graphql
type Token @entity {
  id: Bytes! # Ticker Hash
  feeRecipients: [Bytes!]
  feeAmounts: [BigInt!]
  maxDiscountBps: BigInt!
  assets: [Asset!]! @derivedFrom(field: "token")
}
```

**Asset**

```graphql
type Asset @entity(immutable: true) {
  id: Bytes! # Asset hash
  token: Token
  domain: BigInt
  adopted: Bytes!
  approval: Boolean!
}
```

#### Solver

```graphql
type Solver @entity {
  id: Bytes! # solver address
  supportedDomains: [BigInt!]
  updateVirtualBalance: Boolean!
}
```

For more information visit the Github repo: *Coming soon.*


# Testnet

The subgraph deployments in our testnet environment.

{% hint style="warning" %}
This is a testnet environment, subject to frequent changes.
{% endhint %}

<table><thead><tr><th>Subgraph Name</th><th width="245">Query URL</th><th>Chain</th></tr></thead><tbody><tr><td>Everclear Hub</td><td>https://api.goldsky.com/api/public/project_clssc64y57n5r010yeoly05up/subgraphs/everclear-hub-scroll-sepolia/v0.0.6/gn</td><td>Everclear-Sepolia</td></tr><tr><td>Everclear Spoke</td><td>https://api.goldsky.com/api/public/project_clssc64y57n5r010yeoly05up/subgraphs/everclear-spoke-sepolia/v0.0.8/gn</td><td>Sepolia</td></tr><tr><td>Everclear Spoke</td><td>https://api.goldsky.com/api/public/project_clssc64y57n5r010yeoly05up/subgraphs/everclear-spoke-chapel/v0.0.8/gn</td><td>Chapel (BNB Testnet)</td></tr><tr><td>Everclear Spoke</td><td>https://api.goldsky.com/api/public/project_clssc64y57n5r010yeoly05up/subgraphs/everclear-spoke-op-sepolia/production-v0.0.3/gn</td><td>Optimism-Sepolia</td></tr><tr><td>Everclear Spoke</td><td>https://api.goldsky.com/api/public/project_clssc64y57n5r010yeoly05up/subgraphs/everclear-spoke-arb-sepolia/production-v0.0.3/gn</td><td>Arbitrum-Sepolia</td></tr></tbody></table>


# Mainnet

The subgraph deployments in our mainnet environment.

<table><thead><tr><th>Subgraph Name</th><th width="245">Query URL</th><th>Chain</th></tr></thead><tbody><tr><td>Everclear Hub</td><td>https://api.goldsky.com/api/public/project_clssc64y57n5r010yeoly05up/subgraphs/everclear-hub/production-v0.0.1/gn</td><td>Everclear</td></tr><tr><td>Everclear Spoke</td><td>https://api.goldsky.com/api/public/project_clssc64y57n5r010yeoly05up/subgraphs/everclear-spoke-mainnet/production-v0.0.1/gn</td><td>Ethereum</td></tr><tr><td>Everclear Spoke</td><td>https://api.goldsky.com/api/public/project_clssc64y57n5r010yeoly05up/subgraphs/everclear-spoke-optimism/production-v0.0.1/gn</td><td>Optimism</td></tr><tr><td>Everclear Spoke</td><td>https://api.goldsky.com/api/public/project_clssc64y57n5r010yeoly05up/subgraphs/everclear-spoke-bnb/production-v0.0.1/gn</td><td>BSC</td></tr><tr><td>Everclear Spoke</td><td>https://api.goldsky.com/api/public/project_clssc64y57n5r010yeoly05up/subgraphs/everclear-spoke-base/production-v0.0.1/gn</td><td>Base</td></tr><tr><td>Everclear Spoke</td><td>https://api.goldsky.com/api/public/project_clssc64y57n5r010yeoly05up/subgraphs/everclear-spoke-arbitrum/production-v0.0.1/gn</td><td>Arbitrum</td></tr><tr><td>Everclear Spoke</td><td>https://api.goldsky.com/api/public/project_clssc64y57n5r010yeoly05up/subgraphs/everclear-spoke-zircuit/production-v0.0.1/gn</td><td>Zircuit</td></tr><tr><td>Everclear Spoke</td><td>https://api.goldsky.com/api/public/project_clssc64y57n5r010yeoly05up/subgraphs/everclear-spoke-linea/production-v0.0.1/gn</td><td>Linea</td></tr><tr><td>Everclear Spoke</td><td>https://api.goldsky.com/api/public/project_clssc64y57n5r010yeoly05up/subgraphs/everclear-spoke-polygon/production-v0.0.1/gn</td><td>Polygon</td></tr><tr><td>Everclear Spoke</td><td>https://api.goldsky.com/api/public/project_clssc64y57n5r010yeoly05up/subgraphs/everclear-spoke-avalanche/production-v0.0.1/gn</td><td>Avalanche</td></tr><tr><td>Everclear Spoke</td><td>https://api.goldsky.com/api/public/project_clssc64y57n5r010yeoly05up/subgraphs/everclear-spoke-blast/production-v0.0.1/gn</td><td>Blast</td></tr></tbody></table>


