Skip to content

Commit

Permalink
Change multi call contract address
Browse files Browse the repository at this point in the history
  • Loading branch information
ebma committed Dec 2, 2024
1 parent ba8c554 commit fbf6417
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 3 deletions.
5 changes: 4 additions & 1 deletion mooncontracts/baseline.sol
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,9 @@ contract ReceiveCrossChainXToken {

address constant public axlUSDCAddress = 0xCa01a1D0993565291051daFF390892518ACfAD3A;
IERC20 constant axlUSDC = IERC20(axlUSDCAddress);

address constant public squidRouterMultiCallContract = 0xaD6Cea45f98444a922a2b4fE96b8C90F0862D2F4;

Xtokens constant xt = Xtokens(0x0000000000000000000000000000000000000804);

event ReceiveBalance(uint256 balance);
Expand Down Expand Up @@ -38,7 +41,7 @@ contract ReceiveCrossChainXToken {

function transferApprovedTokensToSelf(uint256 amount) internal {
IERC20 token = IERC20(axlUSDCAddress);
bool success = token.transferFrom(0xEa749Fd6bA492dbc14c24FE8A3d08769229b896c, address(this), amount);
bool success = token.transferFrom(squidRouterMultiCallContract, address(this), amount);
require(success, "Transfer failed");
}
}
7 changes: 5 additions & 2 deletions mooncontracts/splitReceiver.sol
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,9 @@ contract ReceiveCrossChainXToken {

address constant public axlUSDCAddress = 0xCa01a1D0993565291051daFF390892518ACfAD3A;
IERC20 constant axlUSDC = IERC20(axlUSDCAddress);

address constant public squidRouterMultiCallContract = 0xaD6Cea45f98444a922a2b4fE96b8C90F0862D2F4;

Xtokens constant xt = Xtokens(0x0000000000000000000000000000000000000804);

event ReceiveBalance(uint256 balance);
Expand All @@ -22,7 +25,7 @@ contract ReceiveCrossChainXToken {
) public {
require(amount > 0, "Amount cannot be zero");
require(xcmDataMapping[hash] == 0, "Hash already used");

xcmDataMapping[hash] = amount;

transferApprovedTokensToSelf(amount);
Expand Down Expand Up @@ -52,7 +55,7 @@ contract ReceiveCrossChainXToken {

function transferApprovedTokensToSelf(uint256 amount) internal {
IERC20 token = IERC20(axlUSDCAddress);
bool success = token.transferFrom(0xEa749Fd6bA492dbc14c24FE8A3d08769229b896c, address(this), amount);
bool success = token.transferFrom(squidRouterMultiCallContract, address(this), amount);
require(success, "Transfer failed");
}
}

0 comments on commit fbf6417

Please sign in to comment.