From e8d16552d7d5c65b1607abbb35fb23b505c59690 Mon Sep 17 00:00:00 2001 From: Damian Parrino Date: Wed, 24 Jul 2024 10:17:44 -0300 Subject: [PATCH 1/4] Update multichain-server.md --- .../multichain-gas-relayer/multichain-server.md | 17 +++++++++++++++-- 1 file changed, 15 insertions(+), 2 deletions(-) diff --git a/docs/2.build/1.chain-abstraction/multichain-gas-relayer/multichain-server.md b/docs/2.build/1.chain-abstraction/multichain-gas-relayer/multichain-server.md index 6eeed4e3b0e..2f2d98e1614 100644 --- a/docs/2.build/1.chain-abstraction/multichain-gas-relayer/multichain-server.md +++ b/docs/2.build/1.chain-abstraction/multichain-gas-relayer/multichain-server.md @@ -68,8 +68,21 @@ For independent deployments of gas station contracts, generally, nonce synchroni ## Supported Chains -- BSC testnet -- BSC mainnet, Ethereum mainnet, and more chains coming soon! +#### Testnet + +- Arbitrum (ETH L2) +- Base (ETH L2) +- BSC +- Ethereum (Sepolia) +- Optimism (ETH L2) + +#### Mainnet + +- Arbitrum (ETH L2) +- Base (ETH L2) +- BSC +- Ethereum +- Optimism (ETH L2) :::info Check the Relayer's [GitHub repository](https://github.com/near/multichain-relayer-server) to learn more about upcoming features and updates. From aa19b8b7de931736452a0090ed9fddead59d0e77 Mon Sep 17 00:00:00 2001 From: Damian Parrino Date: Fri, 26 Jul 2024 11:03:42 -0300 Subject: [PATCH 2/4] update --- .../multichain-gas-relayer/gas-station.md | 19 +++++++++++-------- .../multichain-server.md | 18 ++++++------------ 2 files changed, 17 insertions(+), 20 deletions(-) diff --git a/docs/2.build/1.chain-abstraction/multichain-gas-relayer/gas-station.md b/docs/2.build/1.chain-abstraction/multichain-gas-relayer/gas-station.md index 0b15d1b863b..790cdff81aa 100644 --- a/docs/2.build/1.chain-abstraction/multichain-gas-relayer/gas-station.md +++ b/docs/2.build/1.chain-abstraction/multichain-gas-relayer/gas-station.md @@ -6,12 +6,6 @@ sidebar_label: Multichain Gas Station Contract The [multichain gas station smart contract](https://github.com/near/multichain-gas-station-contract) accepts payments in NEAR tokens in exchange for gas funding on non-NEAR foreign chains. Part of the NEAR Multichain effort, it works in conjunction with the [MPC recovery service](https://github.com/near/mpc-recovery) to generate on-chain signatures. -:::info Alpha stage - -The Multichain Relayer solution is currently under development. Users who want to test-drive this solution should keep in mind that the product is in alpha stage, and a code audit is pending. - -::: - ## What is it? This smart contract is a piece of the NEAR Multichain project, which makes NEAR Protocol an effortlessly cross-chain network. This contract accepts EVM transaction request payloads and facilitates the signing, gas funding, and relaying of the signed transactions to their destination chains. It works in conjunction with a few different services, including: @@ -97,6 +91,13 @@ You can review the complete smart contract source code in [this GitHub repositor - Pyth oracle price fee IDs can be [found here](https://pyth.network/developers/price-feed-ids) 4. Add paymasters to each foreign chain with `add_paymaster`. +### Price Pusher + +In order to get up-to-date information on gas prices for foreign chains, a price pusher service must be run, either on demand or as a `cron` job. + +A separate price pusher should be used for each token: +- [Pyth Price Pusher](https://github.com/pyth-network/pyth-crosschain/tree/main/apps/price_pusher): this price pusher supports `BNB` and `ETH` + ### Usage Users who wish to get transactions signed and relayed by this contract and its accompanying infrastructure should perform the following steps: @@ -110,9 +111,11 @@ Users who wish to get transactions signed and relayed by this contract and its a - Repeat `pending_transactions_count` times. 4. Relay each signed payload to the foreign chain RPC in the order they were requested. -:::tip testnet contract +:::tip Contract address -If you want to try things out, this smart contract is available on `canhazgas.testnet`. +If you want to try things out, this smart contract is available on: +- testnet: `canhazgas.testnet` +- mainnet: `TBD` ::: diff --git a/docs/2.build/1.chain-abstraction/multichain-gas-relayer/multichain-server.md b/docs/2.build/1.chain-abstraction/multichain-gas-relayer/multichain-server.md index 2f2d98e1614..f6eca5d0674 100644 --- a/docs/2.build/1.chain-abstraction/multichain-gas-relayer/multichain-server.md +++ b/docs/2.build/1.chain-abstraction/multichain-gas-relayer/multichain-server.md @@ -6,12 +6,6 @@ sidebar_label: Multichain Relayer Server The [Multichain Relayer Server](https://github.com/near/multichain-relayer-server) facilitates cross-chain transactions and enables Chain Abstraction. -:::info Alpha stage - -The Multichain Relayer solution is currently under development. Users who want to test-drive this solution should keep in mind that the product is in alpha stage, and a code audit is pending. - -::: - ## Overview The main function of this server is interfacing with foreign chain RPCs sending both presigned funding transactions to cover gas and the actual presigned transaction once the funding is done. @@ -70,19 +64,19 @@ For independent deployments of gas station contracts, generally, nonce synchroni #### Testnet -- Arbitrum (ETH L2) -- Base (ETH L2) +- Arbitrum (Ethereum Sepolia) +- Base (Ethereum Sepolia) - BSC - Ethereum (Sepolia) -- Optimism (ETH L2) +- Optimism (Ethereum Sepolia) #### Mainnet -- Arbitrum (ETH L2) -- Base (ETH L2) +- Arbitrum (Ethereum L2) +- Base (Ethereum L2) - BSC - Ethereum -- Optimism (ETH L2) +- Optimism (Ethereum L2) :::info Check the Relayer's [GitHub repository](https://github.com/near/multichain-relayer-server) to learn more about upcoming features and updates. From 274481439bd0c66459339308b678e255084f1ab2 Mon Sep 17 00:00:00 2001 From: Damian Parrino Date: Fri, 26 Jul 2024 11:10:33 -0300 Subject: [PATCH 3/4] update --- .../multichain-gas-relayer/gas-station.md | 6 +++++- .../multichain-gas-relayer/multichain-server.md | 2 +- 2 files changed, 6 insertions(+), 2 deletions(-) diff --git a/docs/2.build/1.chain-abstraction/multichain-gas-relayer/gas-station.md b/docs/2.build/1.chain-abstraction/multichain-gas-relayer/gas-station.md index 790cdff81aa..b8d1d1255d5 100644 --- a/docs/2.build/1.chain-abstraction/multichain-gas-relayer/gas-station.md +++ b/docs/2.build/1.chain-abstraction/multichain-gas-relayer/gas-station.md @@ -95,9 +95,13 @@ You can review the complete smart contract source code in [this GitHub repositor In order to get up-to-date information on gas prices for foreign chains, a price pusher service must be run, either on demand or as a `cron` job. -A separate price pusher should be used for each token: +Suggested tools: - [Pyth Price Pusher](https://github.com/pyth-network/pyth-crosschain/tree/main/apps/price_pusher): this price pusher supports `BNB` and `ETH` +:::tip +A separate price pusher should be used for each token. +::: + ### Usage Users who wish to get transactions signed and relayed by this contract and its accompanying infrastructure should perform the following steps: diff --git a/docs/2.build/1.chain-abstraction/multichain-gas-relayer/multichain-server.md b/docs/2.build/1.chain-abstraction/multichain-gas-relayer/multichain-server.md index f6eca5d0674..e0c018b7529 100644 --- a/docs/2.build/1.chain-abstraction/multichain-gas-relayer/multichain-server.md +++ b/docs/2.build/1.chain-abstraction/multichain-gas-relayer/multichain-server.md @@ -13,7 +13,7 @@ The main function of this server is interfacing with foreign chain RPCs sending Although the multichain relayer is a server in current design of this system, the goal is to package this as a library that can be called on the client side of the wallet. This will make the system more decentralized. :::tip -The Multichain Relayer is meant to be deployed alongside the [Gas Station Event Indexer](https://github.com/near/gas-station-event-indexer) on the same server so that the gas station event indexer can call the multichain relayer server via IPC instead of having to send the request over the network introducing extra latency to the system. +The Multichain Relayer is meant to be deployed alongside the [Gas Station Event Indexer](https://github.com/near/gas-station-event-indexer) on the same server so that the Gas Station event indexer can call the Multichain Relayer server via IPC instead of having to send the request over the network introducing extra latency to the system. ::: ## Paymaster From 4d97f3a3401902b4df44fe0760747c51df8d0f12 Mon Sep 17 00:00:00 2001 From: Damian Parrino Date: Fri, 26 Jul 2024 11:15:29 -0300 Subject: [PATCH 4/4] Update overview.md --- .../1.chain-abstraction/multichain-gas-relayer/overview.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/docs/2.build/1.chain-abstraction/multichain-gas-relayer/overview.md b/docs/2.build/1.chain-abstraction/multichain-gas-relayer/overview.md index 39acdfff45a..199324ba8a6 100644 --- a/docs/2.build/1.chain-abstraction/multichain-gas-relayer/overview.md +++ b/docs/2.build/1.chain-abstraction/multichain-gas-relayer/overview.md @@ -40,7 +40,7 @@ Below is a design diagram of the entire Multichain Relayer system: - The [gas station contract](gas-station.md) and the [MPC signing service contract](https://github.com/near/mpc-recovery/tree/main/contract) are in the green box which take place on NEAR. - The [multichain relayer server](multichain-server.md) focuses on the blue _Multichain Relayer Core Backend Services_ box in the middle and the connections to the XChain systems in the red box via RPCs. -- The [XChain Settlement](gas-station.md#settlement) process happening in the yellow box can be either manual or automated. Automated settlement is available for select partners based on their xChain transaction volume. +- The [XChain Settlement](gas-station.md#settlement) process happening in the yellow box can be either manual or automated. [Automated settlement](gas-station.md#automated-settlement) is available for select partners based on their xChain transaction volume. ::: @@ -60,7 +60,7 @@ Below is a design diagram of the entire Multichain Relayer system: - **Paymaster Accounts**: These are accounts on the destination chains that hold the native gas tokens. They ensure users have enough gas to complete their transactions on foreign chains. - **xChain Settlement**: regular [cross-chain settlement](gas-station.md#settlement) is needed to ensure paymaster accounts have sufficient funds. This can be manual or automated, and involves swapping NEAR tokens for foreign chain tokens and transferring them to the paymaster accounts. - - Automated settlement is available for select partners based on their cross-chain transaction volume. + - [Automated settlement](gas-station.md#automated-settlement) is available for select partners based on their cross-chain transaction volume. - **Supported Chains**: Initially supports BSC, Ethereum, Base, Arbitrum, and Optimism with plans to expand to other chains. ## Limitations and Considerations