Skip to content

Commit

Permalink
Merge pull request #311 from pendulum-chain/310-change-to-new-multi-c…
Browse files Browse the repository at this point in the history
…all-contract-for-squidrouter

Change to new multi call contract for squidrouter
  • Loading branch information
ebma authored Dec 3, 2024
2 parents ba8c554 + 4ed51ec commit 014625c
Show file tree
Hide file tree
Showing 4 changed files with 11 additions and 5 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");
}
}
2 changes: 1 addition & 1 deletion signer-service/src/constants/constants.js
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ const PENDULUM_FUNDING_AMOUNT_UNITS = '10'; // 10 PEN. Minimum balance of fundin
const STELLAR_FUNDING_AMOUNT_UNITS = '10'; // 10 XLM. Minimum balance of funding account
const MOONBEAM_FUNDING_AMOUNT_UNITS = '10'; // 10 GLMR. Minimum balance of funding account
const SUBSIDY_MINIMUM_RATIO_FUND_UNITS = '10'; // 10 Subsidies considering maximum subsidy amount use on each (worst case scenario)
const MOONBEAM_RECEIVER_CONTRACT_ADDRESS = '0x0004446021fe650c15fb0b2e046b39130e3bfe36';
const MOONBEAM_RECEIVER_CONTRACT_ADDRESS = '0x2AB52086e8edaB28193172209407FF9df1103CDc';
const STELLAR_EPHEMERAL_STARTING_BALANCE_UNITS = '2.5'; // Amount to send to the new stellar ephemeral account created
const PENDULUM_EPHEMERAL_STARTING_BALANCE_UNITS = '0.1'; // Amount to send to the new pendulum ephemeral account created
const DEFAULT_LOGIN_EXPIRATION_TIME_HOURS = 7 * 24;
Expand Down
2 changes: 1 addition & 1 deletion src/services/squidrouter/config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -11,5 +11,5 @@ export const squidRouterConfig: Config = {
toChainId: '1284',
axlUSDC_MOONBEAM: '0xca01a1d0993565291051daff390892518acfad3a',
integratorId: 'pendulum-7cffebc5-f84f-4669-96b4-4f8c82640811',
receivingContractAddress: '0x0004446021fe650c15fb0b2e046b39130e3bfe36',
receivingContractAddress: '0x2AB52086e8edaB28193172209407FF9df1103CDc',
};

0 comments on commit 014625c

Please sign in to comment.