Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add example about multi chain relayer + gas station #1819

Conversation

bucanero
Copy link
Collaborator

No description provided.

@bucanero bucanero linked an issue Mar 15, 2024 that may be closed by this pull request
Copy link

render bot commented Mar 15, 2024

@ravigautham
Copy link

@anthony-near @bucanero I think we need to add details on Paymaster accounts to this example as well as details on manual settlement. Since those are both key aspects of a partner integrating with the service.

Here are some notes that I drafted on Paymasters, but I'm not sure if this should be added to the example or if it should be a separate section? Maybe we should create a separate section in the docs titled "Paymasters and Settlement". Thoughts on this?

Paymaster

  • A paymaster represents an address on a destination chain that holds a balance of that chain’s native gas token.
  • User addresses on destination chains will be funded directly from paymaster accounts
  • Partners that want to integrate with the Multichain Gas Relayer service will need to create, fund, and manage paymaster accounts on the destination chains that they want to have support for
  • Manual settlement between the NEAR Gas Station contract and paymaster accounts will also be required on a regular basis to ensure a consistent balance of funds

@bucanero
Copy link
Collaborator Author

@ravigautham , if I understand correctly:

Then in the Example doc, we could just add a "tip" or "note" with a link to the other articles.

@ravigautham
Copy link

@bucanero I think that split up makes sense. Let's go with that approach.

Also in the the "Multichain Relayer Server" docs we should update the supported chains section to the following:

  • BSC Testnet
  • BSC Mainnet (March 27)
  • Ethereum Mainnet (March 27)
  • More chains coming soon!

We can remove Solana for now, it will be something we look to add support for in Q2. Or we can also add it under the coming soon section along with Ethereum L2s

@bucanero
Copy link
Collaborator Author

Thanks for the feedback @ravigautham , I'll start working on it and ping back when a new draft is ready 👍🏻

@ravigautham
Copy link

@bucanero Thanks!

Here's the info re-Settlement that Anthony drafted:

Settlement is needed because the Gas Station contract is accumulating NEAR, while the paymaster accounts on foreign chains are spending native foreign chain gas tokens (ETH, BNB, SOL, etc). Manual Settlement involves several steps:

Withdrawing the NEAR held in the gas station contract and swapping for a token that can be bridged
i. may be the native gas token of the foreign chain, another token like USDC that has wide bridge support, or NEAR
Bridging the token from NEAR to the foreign chain
i. Here's an overview of bridging related to NEAR: https://knotty-marsupial-f6d.notion.site/NEAR-Bridging-Guides-f4359bd35c794dc184b098f7ed00c4ce
Sending the native gas tokens to the paymaster accounts on the foreign chains
i. A swap from the bridged token to the native gas token before sending to the paymaster accounts is necessary if the token that was bridged was not the foreign chain native gas token

Copy link

@anthony-near anthony-near left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Everything looks good except generating eip-1559 transactions

@bucanero bucanero merged commit 54f9975 into master Mar 20, 2024
4 of 5 checks passed
@bucanero bucanero deleted the 1742-create-full-example-about-multi-chain-relayer-+-gas-station branch March 20, 2024 17:39
@bucanero bucanero linked an issue Mar 20, 2024 that may be closed by this pull request
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Status: Shipped 🚀
3 participants