Skip to content

Commit

Permalink
additional changes
Browse files Browse the repository at this point in the history
  • Loading branch information
thal0x committed Nov 13, 2024
1 parent ae453d0 commit 41ddbc9
Show file tree
Hide file tree
Showing 21 changed files with 2,377 additions and 166 deletions.
50 changes: 50 additions & 0 deletions AxelarHandler/broadcast/Deploy.s.sol/1/run-1731421860.json

Large diffs are not rendered by default.

140 changes: 140 additions & 0 deletions AxelarHandler/broadcast/Deploy.s.sol/1/run-1731422230.json

Large diffs are not rendered by default.

140 changes: 140 additions & 0 deletions AxelarHandler/broadcast/Deploy.s.sol/1/run-1731422274.json

Large diffs are not rendered by default.

123 changes: 99 additions & 24 deletions AxelarHandler/broadcast/Deploy.s.sol/1/run-latest.json

Large diffs are not rendered by default.

152 changes: 152 additions & 0 deletions AxelarHandler/broadcast/Deploy.s.sol/10/run-1731421479.json

Large diffs are not rendered by default.

137 changes: 109 additions & 28 deletions AxelarHandler/broadcast/Deploy.s.sol/10/run-latest.json

Large diffs are not rendered by default.

172 changes: 172 additions & 0 deletions AxelarHandler/broadcast/Deploy.s.sol/137/run-1731421596.json

Large diffs are not rendered by default.

153 changes: 122 additions & 31 deletions AxelarHandler/broadcast/Deploy.s.sol/137/run-latest.json

Large diffs are not rendered by default.

144 changes: 144 additions & 0 deletions AxelarHandler/broadcast/Deploy.s.sol/42161/run-1731409615.json

Large diffs are not rendered by default.

50 changes: 50 additions & 0 deletions AxelarHandler/broadcast/Deploy.s.sol/42161/run-1731409673.json

Large diffs are not rendered by default.

144 changes: 144 additions & 0 deletions AxelarHandler/broadcast/Deploy.s.sol/42161/run-1731409809.json

Large diffs are not rendered by default.

144 changes: 144 additions & 0 deletions AxelarHandler/broadcast/Deploy.s.sol/42161/run-1731409929.json

Large diffs are not rendered by default.

144 changes: 144 additions & 0 deletions AxelarHandler/broadcast/Deploy.s.sol/42161/run-1731409933.json

Large diffs are not rendered by default.

144 changes: 144 additions & 0 deletions AxelarHandler/broadcast/Deploy.s.sol/42161/run-1731410111.json

Large diffs are not rendered by default.

129 changes: 103 additions & 26 deletions AxelarHandler/broadcast/Deploy.s.sol/42161/run-latest.json

Large diffs are not rendered by default.

140 changes: 140 additions & 0 deletions AxelarHandler/broadcast/Deploy.s.sol/43114/run-1731421834.json

Large diffs are not rendered by default.

123 changes: 99 additions & 24 deletions AxelarHandler/broadcast/Deploy.s.sol/43114/run-latest.json

Large diffs are not rendered by default.

158 changes: 158 additions & 0 deletions AxelarHandler/broadcast/Deploy.s.sol/8453/run-1731421745.json

Large diffs are not rendered by default.

143 changes: 114 additions & 29 deletions AxelarHandler/broadcast/Deploy.s.sol/8453/run-latest.json

Large diffs are not rendered by default.

10 changes: 7 additions & 3 deletions AxelarHandler/script/Deploy.s.sol
Original file line number Diff line number Diff line change
Expand Up @@ -26,24 +26,28 @@ contract GoFastHandlerDeploy is Script {
address public constant SWAP_ROUTER_ETHEREUM = 0x68b3465833fb72A70ecDF485E0e4C7bD8665Fc45;
address public constant FAST_TRANSFER_GATEWAY_ETHEREUM = 0xE7935104c9670015b21c6300E5b95d2F75474CDA;

GoFastHandler public handler;

function run() external {
(address swapRouter, address fastTransferGateway) = _getInitValues(block.chainid);

vm.startBroadcast();

GoFastHandler handlerImpl = new GoFastHandler();

ERC1967Proxy handlerProxy = new ERC1967Proxy(
address(handlerImpl),
abi.encodeWithSignature("initialize(address,address)", address(this), swapRouter, fastTransferGateway)
abi.encodeWithSignature("initialize(address,address)", swapRouter, fastTransferGateway)
);
GoFastHandler handler = GoFastHandler(payable(address(handlerProxy)));

handler = GoFastHandler(payable(address(handlerProxy)));

vm.stopBroadcast();

console.log("GoFastHandler deployed at: ", address(handler));
}

function _getInitValues(uint256 chainID) internal view returns (address, address) {
function _getInitValues(uint256 chainID) internal pure returns (address, address) {
if (chainID == 42161) {
return (SWAP_ROUTER_ABRITRUM, FAST_TRANSFER_GATEWAY_ABRITRUM);
}
Expand Down
3 changes: 2 additions & 1 deletion AxelarHandler/src/GoFastHandler.sol
Original file line number Diff line number Diff line change
Expand Up @@ -20,8 +20,9 @@ contract GoFastHandler is Initializable, UUPSUpgradeable, OwnableUpgradeable {
_disableInitializers();
}

function initialize(address _swapRouter, address _fastTransferGateway) public initializer {
function initialize(address _swapRouter, address _fastTransferGateway) external initializer {
__Ownable_init();
__UUPSUpgradeable_init();

swapRouter = ISwapRouter02(_swapRouter);
fastTransferGateway = IFastTransferGateway(_fastTransferGateway);
Expand Down

0 comments on commit 41ddbc9

Please sign in to comment.