Skip to content

Conversation

@thal0x
Copy link
Member

@thal0x thal0x commented May 19, 2025

Updates the AxelarHandler contract to support the new swap router. Axelar is unique to our other handler contracts because it is the only bridge we support transfer + swaps. The contract included a lot of swap logic that is now moved to the swap router itself.

@thal0x thal0x changed the base branch from main to jw/router-affiliate-fees May 19, 2025 18:01
@thal0x thal0x changed the title Jw/update axelar handler Update Axelar handler to support new swap router May 20, 2025
@thal0x thal0x self-assigned this May 20, 2025
@thal0x thal0x marked this pull request as ready for review May 20, 2025 11:27
Copy link
Collaborator

@dhfang dhfang left a comment

Choose a reason for hiding this comment

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

Just pointing out that since we are generally changing what calldata our handler expects without changing the interfaces, we will need to deploy an entirely new set of handler contracts when we migrate. Otherwise, if we deploy via contract upgrades instead we can run into edge cases where contracts get upgraded mid transfer and the transfer payload is no longer compatible with the updated contracts.

error NativePaymentFailed();
error WrappingNotEnabled();
error SwapFailed();
error SwapFailedError();
Copy link
Collaborator

Choose a reason for hiding this comment

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

why did we rename this?

Copy link
Member Author

Choose a reason for hiding this comment

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

I don't actually understand why but I randomly started running into compilation errors

import {Initializable} from "lib/openzeppelin-contracts-upgradeable/contracts/proxy/utils/Initializable.sol";

import {ISwapRouter02} from "./interfaces/ISwapRouter02.sol";
// import {ISwapRouter02} from "./interfaces/ISwapRouter02.sol";
Copy link
Collaborator

Choose a reason for hiding this comment

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

sir

@thal0x thal0x merged commit 6aa9402 into jw/router-affiliate-fees May 30, 2025
1 check failed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants