-
Notifications
You must be signed in to change notification settings - Fork 0
Update Axelar handler to support new swap router #32
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
Conversation
dhfang
left a comment
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.
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(); |
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.
why did we rename this?
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 don't actually understand why but I randomly started running into compilation errors
AxelarHandler/src/AxelarHandler.sol
Outdated
| import {Initializable} from "lib/openzeppelin-contracts-upgradeable/contracts/proxy/utils/Initializable.sol"; | ||
|
|
||
| import {ISwapRouter02} from "./interfaces/ISwapRouter02.sol"; | ||
| // import {ISwapRouter02} from "./interfaces/ISwapRouter02.sol"; |
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.
sir
[API-4248] Wrap and unwrap ETH
Minor swap router updates
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.