Skip to content

Commit

Permalink
make contract ownable and add setters for gateway and swap router add…
Browse files Browse the repository at this point in the history
…resses
  • Loading branch information
thal0x committed Nov 8, 2024
1 parent 3ddda67 commit 6c99236
Showing 1 changed file with 10 additions and 1 deletion.
11 changes: 10 additions & 1 deletion AxelarHandler/src/GoFastHandler.sol
Original file line number Diff line number Diff line change
Expand Up @@ -3,11 +3,12 @@ pragma solidity ^0.8.18;

import {IERC20} from "lib/openzeppelin-contracts/contracts/token/ERC20/IERC20.sol";
import {SafeERC20} from "lib/openzeppelin-contracts/contracts/token/ERC20/utils/SafeERC20.sol";
import {Ownable} from "lib/openzeppelin-contracts/contracts/access/Ownable.sol";

import {ISwapRouter02} from "./interfaces/ISwapRouter02.sol";
import {IFastTransferGateway} from "./interfaces/IFastTransferGateway.sol";

contract GoFastHandler {
contract GoFastHandler is Ownable {
using SafeERC20 for IERC20;

ISwapRouter02 public swapRouter;
Expand All @@ -18,6 +19,14 @@ contract GoFastHandler {
fastTransferGateway = IFastTransferGateway(_fastTransferGateway);
}

function setSwapRouter(address _swapRouter) public onlyOwner {
swapRouter = ISwapRouter02(_swapRouter);
}

function setFastTransferGateway(address _fastTransferGateway) public onlyOwner {
fastTransferGateway = IFastTransferGateway(_fastTransferGateway);
}

function swapAndSubmitOrder(
address tokenIn,
uint256 swapAmountIn,
Expand Down

0 comments on commit 6c99236

Please sign in to comment.