-
Notifications
You must be signed in to change notification settings - Fork 54
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
fix(generic bridges): use scroll's canonical bridge function #1708
Conversation
Signed-off-by: bennett <[email protected]>
I'm confused by this. We should be happy to send WETH, because the bots should know how to unwrap WETH into ETH, right? This function should be run here before evaluating any WETH rebalances, allowing the bots to always assume it has enough ETH in its balance before evaluating WETH inventory sends. From the inventory manager's perspective, ETH is treated as gas balance and WETH is an inventory balance |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Couple questions, but nice to remove the Scroll(Atomic)WethBridge!
ERC20 transfer tracking is working now. |
Signed-off-by: bennett <[email protected]>
Signed-off-by: bennett <[email protected]>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I've tested this OK when rebalancing all 4 supported tokens. Cross-chain transfer tracking worked correctly. There are some items here that could be revisited for a post-merge cleanup, but for now this is OK to go in.
…protocol#1708) Fix Scroll cross-chain adapters: - Use the native ERC20 bridge for WETH, rather than the AtomicWethDepositor. - Correct the gateways used for USDC transfer tracking. - Add Scroll tests. - Fix an issue in the new Arbitrum cross-chain adapter. This new adapter is not active in prod yet. --------- Signed-off-by: bennett <[email protected]>
…protocol#1708) Fix Scroll cross-chain adapters: - Use the native ERC20 bridge for WETH, rather than the AtomicWethDepositor. - Correct the gateways used for USDC transfer tracking. - Add Scroll tests. - Fix an issue in the new Arbitrum cross-chain adapter. This new adapter is not active in prod yet. --------- Signed-off-by: bennett <[email protected]>
…protocol#1708) Fix Scroll cross-chain adapters: - Use the native ERC20 bridge for WETH, rather than the AtomicWethDepositor. - Correct the gateways used for USDC transfer tracking. - Add Scroll tests. - Fix an issue in the new Arbitrum cross-chain adapter. This new adapter is not active in prod yet. --------- Signed-off-by: bennett <[email protected]>
…protocol#1708) Fix Scroll cross-chain adapters: - Use the native ERC20 bridge for WETH, rather than the AtomicWethDepositor. - Correct the gateways used for USDC transfer tracking. - Add Scroll tests. - Fix an issue in the new Arbitrum cross-chain adapter. This new adapter is not active in prod yet. --------- Signed-off-by: bennett <[email protected]>
…protocol#1708) Fix Scroll cross-chain adapters: - Use the native ERC20 bridge for WETH, rather than the AtomicWethDepositor. - Correct the gateways used for USDC transfer tracking. - Add Scroll tests. - Fix an issue in the new Arbitrum cross-chain adapter. This new adapter is not active in prod yet. --------- Signed-off-by: bennett <[email protected]>
…protocol#1708) Fix Scroll cross-chain adapters: - Use the native ERC20 bridge for WETH, rather than the AtomicWethDepositor. - Correct the gateways used for USDC transfer tracking. - Add Scroll tests. - Fix an issue in the new Arbitrum cross-chain adapter. This new adapter is not active in prod yet. --------- Signed-off-by: bennett <[email protected]>
This fixes an improperly set method on Arbitrum (not sending any
msg.value
to theoutboundTransfer
function), as well as removesScrollWethBridge
in favor of theScrollERC20Bridge
. The latter is done since we can simply bridge WETH to Scroll via the gateway router, which can subsequently be wrapped/unwrapped, so a dedicated bridge to interface with an atomic depositor is not needed.As an overview. We recently merged in the generic adapters PR #1524, which at the time of writing, is dormant in production, since the generic AdapterManager in src/adapter/ is only activated if we set
RELAYER_USE_GENERIC_ADAPTER
and/orMONITOR_USE_GENERIC_ADAPTER
in the environment. Now that it is merged, instead of making an entirely new ScrollAdapter, we can make a wrapper for the genericBaseChainAdapter
and begin integrating the new code into our current structure. Going forward, we should continue to replace the existing specialized adapters (e.g. ArbitrumAdapter, LineaAdapter, ZkSyncAdapter, etc.) with wrappers forBaseChainAdapter
using the same format found hererelayer/src/adapter/AdapterManager.ts
Line 35 in 5bd2efd
CrossChainTransferClient
, which will remain unchanged.