@xswap-link/sdk 0.1.2 → 0.1.4
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +17 -0
- package/dist/index.css +95 -71
- package/dist/index.d.mts +60 -155
- package/dist/index.d.ts +60 -155
- package/dist/index.js +923 -1842
- package/dist/index.mjs +875 -1801
- package/package.json +1 -1
- package/src/components/Skeleton/index.tsx +8 -5
- package/src/components/TxConfigForm/Button.tsx +20 -0
- package/src/components/TxConfigForm/FeesDetails.tsx +5 -5
- package/src/components/TxConfigForm/Form.tsx +13 -7
- package/src/components/TxConfigForm/History.tsx +1 -1
- package/src/components/TxConfigForm/HistoryCard.tsx +19 -40
- package/src/components/TxConfigForm/Summary.tsx +57 -28
- package/src/components/TxConfigForm/SwapPanel.tsx +70 -77
- package/src/components/TxConfigForm/TokenPicker.tsx +2 -2
- package/src/components/TxConfigForm/TopBar.tsx +2 -2
- package/src/components/TxConfigForm/UsdPrice.tsx +41 -0
- package/src/components/TxConfigForm/index.tsx +1 -2
- package/src/components/TxHistoryButton/index.tsx +150 -0
- package/src/components/global.css +0 -4
- package/src/components/icons/ArrowLeftIcon.tsx +16 -0
- package/src/components/icons/ChevronUpIcon.tsx +1 -6
- package/src/components/icons/CircularProgressIcon.tsx +13 -15
- package/src/components/icons/XSwapLogo.tsx +98 -0
- package/src/components/icons/index.ts +2 -0
- package/src/components/index.ts +1 -0
- package/src/constants/index.ts +1 -0
- package/src/contracts/abi/index.ts +0 -2
- package/src/contracts/addresses.ts +6 -0
- package/src/models/Addresses.ts +1 -0
- package/src/models/TransactionHistory.ts +44 -29
- package/src/services/integrations/transactions.ts +166 -1
- package/src/utils/index.ts +7 -0
- package/tailwind.config.js +6 -1
- package/tsconfig.json +3 -7
- package/src/contracts/abi/XSwapRouter.json +0 -1242
package/dist/index.js
CHANGED
|
@@ -34,6 +34,7 @@ __export(src_exports, {
|
|
|
34
34
|
Alert: () => Alert,
|
|
35
35
|
BALANCES_CHUNK_SIZE: () => BALANCES_CHUNK_SIZE,
|
|
36
36
|
BatchQueryAbi: () => BatchQueryAbi,
|
|
37
|
+
CCIP_EXPLORER: () => CCIP_EXPLORER,
|
|
37
38
|
ContractName: () => ContractName,
|
|
38
39
|
DEFAULT_ECOSYSTEM: () => DEFAULT_ECOSYSTEM,
|
|
39
40
|
DEFAULT_SOURCE_CHAIN_ID: () => DEFAULT_SOURCE_CHAIN_ID,
|
|
@@ -48,9 +49,10 @@ __export(src_exports, {
|
|
|
48
49
|
ROUTE_TIMEOUT_MS: () => ROUTE_TIMEOUT_MS,
|
|
49
50
|
SLIPPAGE_PRESETS: () => SLIPPAGE_PRESETS,
|
|
50
51
|
Skeleton: () => Skeleton,
|
|
52
|
+
TxHistoryButton: () => TxHistoryButton,
|
|
51
53
|
Web3Environment: () => Web3Environment,
|
|
52
54
|
XSwapCallType: () => XSwapCallType,
|
|
53
|
-
|
|
55
|
+
addTransactionToRenderedTransactions: () => addTransactionToRenderedTransactions,
|
|
54
56
|
chunkArray: () => chunkArray,
|
|
55
57
|
deepMergeObjects: () => deepMergeObjects,
|
|
56
58
|
findPlaceholderIndex: () => findPlaceholderIndex,
|
|
@@ -63,15 +65,20 @@ __export(src_exports, {
|
|
|
63
65
|
getBridgeTokens: () => getBridgeTokens,
|
|
64
66
|
getChainData: () => getChainData,
|
|
65
67
|
getChains: () => getChains,
|
|
68
|
+
getDate: () => getDate,
|
|
66
69
|
getHistory: () => getHistory,
|
|
67
70
|
getPrices: () => getPrices,
|
|
68
71
|
getRoute: () => getRoute,
|
|
69
72
|
getSwapTx: () => getSwapTx,
|
|
70
73
|
getTokens: () => getTokens,
|
|
74
|
+
monitorTransactionStatus: () => monitorTransactionStatus,
|
|
71
75
|
openTxConfigForm: () => openTxConfigForm,
|
|
76
|
+
removeTransactionFromRenderedTransactions: () => removeTransactionFromRenderedTransactions,
|
|
77
|
+
renderTxHistoryButtons: () => renderTxHistoryButtons,
|
|
72
78
|
replaceNull: () => replaceNull,
|
|
73
79
|
safeBigNumberFrom: () => safeBigNumberFrom,
|
|
74
80
|
shortAddress: () => shortAddress,
|
|
81
|
+
updateTransactionDoneInRenderedTransactions: () => updateTransactionDoneInRenderedTransactions,
|
|
75
82
|
weiToHumanReadable: () => weiToHumanReadable
|
|
76
83
|
});
|
|
77
84
|
module.exports = __toCommonJS(src_exports);
|
|
@@ -86,7 +93,7 @@ var Alert = ({ desc }) => {
|
|
|
86
93
|
};
|
|
87
94
|
|
|
88
95
|
// src/components/TxConfigForm/index.tsx
|
|
89
|
-
var
|
|
96
|
+
var import_react11 = require("react");
|
|
90
97
|
var import_client = require("react-dom/client");
|
|
91
98
|
var import_react_query = require("@tanstack/react-query");
|
|
92
99
|
var import_wagmi3 = require("wagmi");
|
|
@@ -149,8 +156,8 @@ var CloseIcon = () => {
|
|
|
149
156
|
};
|
|
150
157
|
|
|
151
158
|
// src/components/TxConfigForm/Form.tsx
|
|
152
|
-
var
|
|
153
|
-
var
|
|
159
|
+
var import_react10 = require("react");
|
|
160
|
+
var import_ethers5 = require("ethers");
|
|
154
161
|
var import_wagmi2 = require("wagmi");
|
|
155
162
|
|
|
156
163
|
// xswap.config.ts
|
|
@@ -237,6 +244,7 @@ var import_ethers3 = require("ethers");
|
|
|
237
244
|
var ContractName = /* @__PURE__ */ ((ContractName2) => {
|
|
238
245
|
ContractName2["BatchQuery"] = "BatchQuery";
|
|
239
246
|
ContractName2["FeeCollector"] = "FeeCollector";
|
|
247
|
+
ContractName2["XSwapRouter"] = "XSwapRouter";
|
|
240
248
|
return ContractName2;
|
|
241
249
|
})(ContractName || {});
|
|
242
250
|
|
|
@@ -586,1422 +594,185 @@ var ERC20_default = [
|
|
|
586
594
|
}
|
|
587
595
|
];
|
|
588
596
|
|
|
589
|
-
// src/contracts/abi/
|
|
590
|
-
var
|
|
591
|
-
|
|
592
|
-
|
|
593
|
-
|
|
594
|
-
|
|
595
|
-
|
|
596
|
-
{
|
|
597
|
-
|
|
598
|
-
|
|
599
|
-
|
|
600
|
-
name: "destinationChainSelector",
|
|
601
|
-
type: "uint64"
|
|
602
|
-
}
|
|
603
|
-
],
|
|
604
|
-
name: "DestinationChainNotWhitelisted",
|
|
605
|
-
type: "error"
|
|
606
|
-
},
|
|
607
|
-
{
|
|
608
|
-
inputs: [],
|
|
609
|
-
name: "FailedToSendNative",
|
|
610
|
-
type: "error"
|
|
611
|
-
},
|
|
612
|
-
{
|
|
613
|
-
inputs: [],
|
|
614
|
-
name: "IncorrectArrayLength",
|
|
615
|
-
type: "error"
|
|
616
|
-
},
|
|
617
|
-
{
|
|
618
|
-
inputs: [],
|
|
619
|
-
name: "InvalidAddress",
|
|
620
|
-
type: "error"
|
|
621
|
-
},
|
|
622
|
-
{
|
|
623
|
-
inputs: [
|
|
624
|
-
{
|
|
625
|
-
internalType: "address",
|
|
626
|
-
name: "router",
|
|
627
|
-
type: "address"
|
|
628
|
-
}
|
|
629
|
-
],
|
|
630
|
-
name: "InvalidRouter",
|
|
631
|
-
type: "error"
|
|
597
|
+
// src/contracts/abi/index.ts
|
|
598
|
+
var BatchQueryAbi = BatchQuery_default;
|
|
599
|
+
var ERC20Abi = ERC20_default;
|
|
600
|
+
|
|
601
|
+
// src/contracts/addresses.ts
|
|
602
|
+
var ADDRESSES = {
|
|
603
|
+
// arbitrum
|
|
604
|
+
"42161": {
|
|
605
|
+
["BatchQuery" /* BatchQuery */]: "0xb5f9934ea0810ef5faa677e8c68c6983b88664b1",
|
|
606
|
+
["XSwapRouter" /* XSwapRouter */]: "0xe1c14b9f065dead2e89ee35382f8bd42bdb87a04",
|
|
607
|
+
["FeeCollector" /* FeeCollector */]: "0xb37275558f02f05104c2ba35199d16adeb43432f"
|
|
632
608
|
},
|
|
633
|
-
|
|
634
|
-
|
|
635
|
-
|
|
636
|
-
|
|
637
|
-
|
|
638
|
-
type: "address"
|
|
639
|
-
}
|
|
640
|
-
],
|
|
641
|
-
name: "MessageAlreadyExecuted",
|
|
642
|
-
type: "error"
|
|
609
|
+
// avalanche
|
|
610
|
+
"43114": {
|
|
611
|
+
["BatchQuery" /* BatchQuery */]: "0xb5f9934ea0810ef5faa677e8c68c6983b88664b1",
|
|
612
|
+
["XSwapRouter" /* XSwapRouter */]: "0xe1c14b9f065dead2e89ee35382f8bd42bdb87a04",
|
|
613
|
+
["FeeCollector" /* FeeCollector */]: "0xb37275558f02f05104c2ba35199d16adeb43432f"
|
|
643
614
|
},
|
|
644
|
-
|
|
645
|
-
|
|
646
|
-
|
|
647
|
-
|
|
615
|
+
// base
|
|
616
|
+
"8453": {
|
|
617
|
+
["BatchQuery" /* BatchQuery */]: "0xb5f9934ea0810ef5faa677e8c68c6983b88664b1",
|
|
618
|
+
["XSwapRouter" /* XSwapRouter */]: "0xe1c14b9f065dead2e89ee35382f8bd42bdb87a04",
|
|
619
|
+
["FeeCollector" /* FeeCollector */]: "0xb37275558f02f05104c2ba35199d16adeb43432f"
|
|
648
620
|
},
|
|
649
|
-
|
|
650
|
-
|
|
651
|
-
|
|
652
|
-
|
|
653
|
-
|
|
654
|
-
type: "uint64"
|
|
655
|
-
}
|
|
656
|
-
],
|
|
657
|
-
name: "NoXSwapRouterOnSelectedChain",
|
|
658
|
-
type: "error"
|
|
621
|
+
// ethereum
|
|
622
|
+
"1": {
|
|
623
|
+
["BatchQuery" /* BatchQuery */]: "0xb5f9934ea0810ef5faa677e8c68c6983b88664b1",
|
|
624
|
+
["XSwapRouter" /* XSwapRouter */]: "0xe1c14b9f065dead2e89ee35382f8bd42bdb87a04",
|
|
625
|
+
["FeeCollector" /* FeeCollector */]: "0xb37275558f02f05104c2ba35199d16adeb43432f"
|
|
659
626
|
},
|
|
660
|
-
|
|
661
|
-
|
|
662
|
-
|
|
663
|
-
|
|
664
|
-
|
|
665
|
-
type: "uint256"
|
|
666
|
-
},
|
|
667
|
-
{
|
|
668
|
-
internalType: "uint256",
|
|
669
|
-
name: "calculatedFees",
|
|
670
|
-
type: "uint256"
|
|
671
|
-
}
|
|
672
|
-
],
|
|
673
|
-
name: "NotEnoughBalance",
|
|
674
|
-
type: "error"
|
|
627
|
+
// optimism
|
|
628
|
+
"10": {
|
|
629
|
+
["BatchQuery" /* BatchQuery */]: "0xb5f9934ea0810ef5faa677e8c68c6983b88664b1",
|
|
630
|
+
["XSwapRouter" /* XSwapRouter */]: "0xe1c14b9f065dead2e89ee35382f8bd42bdb87a04",
|
|
631
|
+
["FeeCollector" /* FeeCollector */]: "0xb37275558f02f05104c2ba35199d16adeb43432f"
|
|
675
632
|
},
|
|
676
|
-
|
|
677
|
-
|
|
678
|
-
|
|
679
|
-
|
|
680
|
-
|
|
681
|
-
|
|
682
|
-
|
|
683
|
-
|
|
684
|
-
|
|
685
|
-
|
|
686
|
-
|
|
633
|
+
// polygon
|
|
634
|
+
"137": {
|
|
635
|
+
["BatchQuery" /* BatchQuery */]: "0xb5f9934ea0810ef5faa677e8c68c6983b88664b1",
|
|
636
|
+
["XSwapRouter" /* XSwapRouter */]: "0xe1c14b9f065dead2e89ee35382f8bd42bdb87a04",
|
|
637
|
+
["FeeCollector" /* FeeCollector */]: "0xb37275558f02f05104c2ba35199d16adeb43432f"
|
|
638
|
+
}
|
|
639
|
+
};
|
|
640
|
+
|
|
641
|
+
// src/constants/index.ts
|
|
642
|
+
var DEFAULT_ECOSYSTEM = "evm" /* EVM */;
|
|
643
|
+
var NUMBER_INPUT_REGEX = /^[0-9]*[.,]?[0-9]*$/;
|
|
644
|
+
var SLIPPAGE_PRESETS = [0.5, 1.5, 3];
|
|
645
|
+
var DELIVERY_TIME = 30 * 1e3 * 60;
|
|
646
|
+
var EXPRESS_DELIVERY_TIME = 30 * 1e3;
|
|
647
|
+
var BALANCES_CHUNK_SIZE = 500;
|
|
648
|
+
var ROUTE_TIMEOUT_MS = 5e3;
|
|
649
|
+
var MINIMUM_DISPLAYED_TOKEN_AMOUNT = 1e-4;
|
|
650
|
+
var DEFAULT_SOURCE_CHAIN_ID = "1";
|
|
651
|
+
var CCIP_EXPLORER = "https://ccip.chain.link/";
|
|
652
|
+
|
|
653
|
+
// src/utils/contracts.ts
|
|
654
|
+
var IERC20 = new import_ethers2.ethers.utils.Interface(ERC20Abi);
|
|
655
|
+
var getBalanceOf = async (wallet, token, rpcUrl) => {
|
|
656
|
+
const provider = import_ethers2.ethers.getDefaultProvider(rpcUrl);
|
|
657
|
+
if (token === import_ethers2.ethers.constants.AddressZero) {
|
|
658
|
+
return import_ethers2.ethers.utils.formatEther(await provider.getBalance(wallet));
|
|
659
|
+
}
|
|
660
|
+
const contract = new import_ethers2.ethers.Contract(token, ERC20Abi, provider);
|
|
661
|
+
return import_ethers2.ethers.utils.formatUnits(
|
|
662
|
+
await contract.balanceOf(wallet),
|
|
663
|
+
await contract.decimals()
|
|
664
|
+
);
|
|
665
|
+
};
|
|
666
|
+
var getBalances = async (chain, wallet) => {
|
|
667
|
+
return {
|
|
668
|
+
...await getNativeBalance(chain, wallet),
|
|
669
|
+
...await getErc20Balances(chain, wallet)
|
|
670
|
+
};
|
|
671
|
+
};
|
|
672
|
+
var getNativeBalance = async (chain, wallet) => {
|
|
673
|
+
const native = chain.tokens.find(
|
|
674
|
+
({ address }) => address === import_ethers2.ethers.constants.AddressZero
|
|
675
|
+
);
|
|
676
|
+
if (native) {
|
|
677
|
+
const provider = import_ethers2.ethers.getDefaultProvider(chain.publicRpcUrls[0]);
|
|
678
|
+
const balance = await provider.getBalance(wallet);
|
|
679
|
+
return {
|
|
680
|
+
[native.address]: balance
|
|
681
|
+
};
|
|
682
|
+
}
|
|
683
|
+
return {};
|
|
684
|
+
};
|
|
685
|
+
var getErc20Balances = async (chain, wallet) => {
|
|
686
|
+
const erc20Tokens = chain.tokens.filter(
|
|
687
|
+
({ address }) => address !== import_ethers2.ethers.constants.AddressZero
|
|
688
|
+
);
|
|
689
|
+
const tokenChunks = chunkArray(erc20Tokens, BALANCES_CHUNK_SIZE);
|
|
690
|
+
const promises = tokenChunks.map(async (tokenChunk) => {
|
|
691
|
+
const tokenAddresses = tokenChunk.map((token) => token.address);
|
|
692
|
+
const calldatas = tokenChunk.map(
|
|
693
|
+
() => IERC20.encodeFunctionData("balanceOf", [wallet])
|
|
694
|
+
);
|
|
695
|
+
const contractAddress = ADDRESSES[chain.chainId]?.BatchQuery;
|
|
696
|
+
const rpcUrl = chain.publicRpcUrls[0];
|
|
697
|
+
if (contractAddress && rpcUrl) {
|
|
698
|
+
const contract = new import_ethers2.ethers.Contract(
|
|
699
|
+
contractAddress,
|
|
700
|
+
BatchQueryAbi,
|
|
701
|
+
import_ethers2.ethers.getDefaultProvider(rpcUrl)
|
|
702
|
+
);
|
|
703
|
+
return await contract["batchQuery"](tokenAddresses, calldatas);
|
|
704
|
+
}
|
|
705
|
+
return Promise.resolve();
|
|
706
|
+
});
|
|
707
|
+
const tokenBalances = (await Promise.all(promises)).flat().map(
|
|
708
|
+
(encodedBalance) => import_ethers2.ethers.utils.defaultAbiCoder.decode(["uint256"], encodedBalance)[0]
|
|
709
|
+
);
|
|
710
|
+
const balances = {};
|
|
711
|
+
erc20Tokens.forEach((token, index) => {
|
|
712
|
+
balances[token.address] = tokenBalances[index];
|
|
713
|
+
});
|
|
714
|
+
return balances;
|
|
715
|
+
};
|
|
716
|
+
var generateApproveTxData = (tokenAddress, spender, amount) => {
|
|
717
|
+
return tokenAddress !== import_ethers2.ethers.constants.AddressZero ? {
|
|
718
|
+
to: tokenAddress,
|
|
719
|
+
value: safeBigNumberFrom("0"),
|
|
720
|
+
data: IERC20.encodeFunctionData("approve", [spender, amount])
|
|
721
|
+
} : void 0;
|
|
722
|
+
};
|
|
723
|
+
var findPlaceholderIndex = (abi, funName, funParams, placeholderValue) => {
|
|
724
|
+
if (funParams.flat(Infinity).filter((param) => param === placeholderValue).length !== 1) {
|
|
725
|
+
throw new Error("Random placeholder value must be provided and unique.");
|
|
726
|
+
}
|
|
727
|
+
const iface = new import_ethers2.ethers.utils.Interface(abi);
|
|
728
|
+
const functionFragment = iface.getFunction(funName);
|
|
729
|
+
if (!functionFragment) {
|
|
730
|
+
throw new Error(`Can't find function "${funName}" in provided ABI.`);
|
|
731
|
+
}
|
|
732
|
+
const encodedFunData = iface.encodeFunctionData(functionFragment, funParams);
|
|
733
|
+
const paramData = encodedFunData.slice(10);
|
|
734
|
+
const chunks = [];
|
|
735
|
+
for (let i = 0; i < paramData.length; i += 64) {
|
|
736
|
+
chunks.push(paramData.slice(i, i + 64));
|
|
737
|
+
}
|
|
738
|
+
const searchValue = placeholderValue.toHexString().slice(2).padStart(64, "0");
|
|
739
|
+
const result = chunks.findIndex((chunk) => chunk === searchValue);
|
|
740
|
+
if (result === -1) {
|
|
741
|
+
throw new Error("Randomized parameter not found in the encoded data.");
|
|
742
|
+
}
|
|
743
|
+
return result;
|
|
744
|
+
};
|
|
745
|
+
|
|
746
|
+
// src/utils/strings.ts
|
|
747
|
+
var shortAddress = (address) => {
|
|
748
|
+
return `${address?.substring(0, 5)}...${address?.substring(
|
|
749
|
+
address.length - 5,
|
|
750
|
+
address.length
|
|
751
|
+
)}`;
|
|
752
|
+
};
|
|
753
|
+
|
|
754
|
+
// src/utils/index.ts
|
|
755
|
+
var import_date_fns = require("date-fns");
|
|
756
|
+
var replaceNull = (values, newValue) => {
|
|
757
|
+
const modifiedValues = [...values];
|
|
758
|
+
for (let i = 0; i < modifiedValues.length; i++) {
|
|
759
|
+
if (Array.isArray(modifiedValues[i])) {
|
|
760
|
+
modifiedValues[i] = replaceNull(modifiedValues[i], newValue);
|
|
761
|
+
} else {
|
|
762
|
+
if (modifiedValues[i] === null) {
|
|
763
|
+
modifiedValues[i] = newValue;
|
|
687
764
|
}
|
|
688
|
-
|
|
689
|
-
|
|
690
|
-
|
|
691
|
-
|
|
692
|
-
|
|
693
|
-
|
|
694
|
-
|
|
695
|
-
|
|
696
|
-
|
|
697
|
-
|
|
698
|
-
|
|
699
|
-
],
|
|
700
|
-
name: "TokenNotWhitelisted",
|
|
701
|
-
type: "error"
|
|
702
|
-
},
|
|
703
|
-
{
|
|
704
|
-
anonymous: false,
|
|
705
|
-
inputs: [
|
|
706
|
-
{
|
|
707
|
-
indexed: false,
|
|
708
|
-
internalType: "address",
|
|
709
|
-
name: "previousAdmin",
|
|
710
|
-
type: "address"
|
|
711
|
-
},
|
|
712
|
-
{
|
|
713
|
-
indexed: false,
|
|
714
|
-
internalType: "address",
|
|
715
|
-
name: "newAdmin",
|
|
716
|
-
type: "address"
|
|
717
|
-
}
|
|
718
|
-
],
|
|
719
|
-
name: "AdminChanged",
|
|
720
|
-
type: "event"
|
|
721
|
-
},
|
|
722
|
-
{
|
|
723
|
-
anonymous: false,
|
|
724
|
-
inputs: [
|
|
725
|
-
{
|
|
726
|
-
indexed: true,
|
|
727
|
-
internalType: "address",
|
|
728
|
-
name: "beacon",
|
|
729
|
-
type: "address"
|
|
730
|
-
}
|
|
731
|
-
],
|
|
732
|
-
name: "BeaconUpgraded",
|
|
733
|
-
type: "event"
|
|
734
|
-
},
|
|
735
|
-
{
|
|
736
|
-
anonymous: false,
|
|
737
|
-
inputs: [
|
|
738
|
-
{
|
|
739
|
-
indexed: false,
|
|
740
|
-
internalType: "address",
|
|
741
|
-
name: "token",
|
|
742
|
-
type: "address"
|
|
743
|
-
},
|
|
744
|
-
{
|
|
745
|
-
indexed: false,
|
|
746
|
-
internalType: "uint256",
|
|
747
|
-
name: "tokenAmount",
|
|
748
|
-
type: "uint256"
|
|
749
|
-
}
|
|
750
|
-
],
|
|
751
|
-
name: "EmergencyWithdraw",
|
|
752
|
-
type: "event"
|
|
753
|
-
},
|
|
754
|
-
{
|
|
755
|
-
anonymous: false,
|
|
756
|
-
inputs: [
|
|
757
|
-
{
|
|
758
|
-
indexed: true,
|
|
759
|
-
internalType: "bytes32",
|
|
760
|
-
name: "messageId",
|
|
761
|
-
type: "bytes32"
|
|
762
|
-
},
|
|
763
|
-
{
|
|
764
|
-
indexed: true,
|
|
765
|
-
internalType: "uint64",
|
|
766
|
-
name: "sourceChainSelector",
|
|
767
|
-
type: "uint64"
|
|
768
|
-
},
|
|
769
|
-
{
|
|
770
|
-
indexed: true,
|
|
771
|
-
internalType: "address",
|
|
772
|
-
name: "sender",
|
|
773
|
-
type: "address"
|
|
774
|
-
},
|
|
775
|
-
{
|
|
776
|
-
indexed: false,
|
|
777
|
-
internalType: "bytes",
|
|
778
|
-
name: "data",
|
|
779
|
-
type: "bytes"
|
|
780
|
-
},
|
|
781
|
-
{
|
|
782
|
-
indexed: false,
|
|
783
|
-
internalType: "address",
|
|
784
|
-
name: "token",
|
|
785
|
-
type: "address"
|
|
786
|
-
},
|
|
787
|
-
{
|
|
788
|
-
indexed: false,
|
|
789
|
-
internalType: "uint256",
|
|
790
|
-
name: "tokenAmount",
|
|
791
|
-
type: "uint256"
|
|
792
|
-
}
|
|
793
|
-
],
|
|
794
|
-
name: "ExecutorRunFailed",
|
|
795
|
-
type: "event"
|
|
796
|
-
},
|
|
797
|
-
{
|
|
798
|
-
anonymous: false,
|
|
799
|
-
inputs: [
|
|
800
|
-
{
|
|
801
|
-
indexed: false,
|
|
802
|
-
internalType: "address",
|
|
803
|
-
name: "newExecutor",
|
|
804
|
-
type: "address"
|
|
805
|
-
}
|
|
806
|
-
],
|
|
807
|
-
name: "ExecutorUpdated",
|
|
808
|
-
type: "event"
|
|
809
|
-
},
|
|
810
|
-
{
|
|
811
|
-
anonymous: false,
|
|
812
|
-
inputs: [
|
|
813
|
-
{
|
|
814
|
-
indexed: true,
|
|
815
|
-
internalType: "bytes32",
|
|
816
|
-
name: "messageId",
|
|
817
|
-
type: "bytes32"
|
|
818
|
-
},
|
|
819
|
-
{
|
|
820
|
-
indexed: true,
|
|
821
|
-
internalType: "address",
|
|
822
|
-
name: "messageExecutor",
|
|
823
|
-
type: "address"
|
|
824
|
-
},
|
|
825
|
-
{
|
|
826
|
-
indexed: true,
|
|
827
|
-
internalType: "bytes32",
|
|
828
|
-
name: "executionHash",
|
|
829
|
-
type: "bytes32"
|
|
830
|
-
},
|
|
831
|
-
{
|
|
832
|
-
indexed: false,
|
|
833
|
-
internalType: "address",
|
|
834
|
-
name: "token",
|
|
835
|
-
type: "address"
|
|
836
|
-
},
|
|
837
|
-
{
|
|
838
|
-
indexed: false,
|
|
839
|
-
internalType: "uint256",
|
|
840
|
-
name: "tokenAmount",
|
|
841
|
-
type: "uint256"
|
|
842
|
-
}
|
|
843
|
-
],
|
|
844
|
-
name: "FundsReturnedForMessageExecution",
|
|
845
|
-
type: "event"
|
|
846
|
-
},
|
|
847
|
-
{
|
|
848
|
-
anonymous: false,
|
|
849
|
-
inputs: [
|
|
850
|
-
{
|
|
851
|
-
indexed: false,
|
|
852
|
-
internalType: "uint8",
|
|
853
|
-
name: "version",
|
|
854
|
-
type: "uint8"
|
|
855
|
-
}
|
|
856
|
-
],
|
|
857
|
-
name: "Initialized",
|
|
858
|
-
type: "event"
|
|
859
|
-
},
|
|
860
|
-
{
|
|
861
|
-
anonymous: false,
|
|
862
|
-
inputs: [
|
|
863
|
-
{
|
|
864
|
-
indexed: true,
|
|
865
|
-
internalType: "bytes32",
|
|
866
|
-
name: "messageId",
|
|
867
|
-
type: "bytes32"
|
|
868
|
-
},
|
|
869
|
-
{
|
|
870
|
-
indexed: true,
|
|
871
|
-
internalType: "uint64",
|
|
872
|
-
name: "sourceChainSelector",
|
|
873
|
-
type: "uint64"
|
|
874
|
-
},
|
|
875
|
-
{
|
|
876
|
-
indexed: true,
|
|
877
|
-
internalType: "address",
|
|
878
|
-
name: "sender",
|
|
879
|
-
type: "address"
|
|
880
|
-
},
|
|
881
|
-
{
|
|
882
|
-
indexed: false,
|
|
883
|
-
internalType: "bytes",
|
|
884
|
-
name: "data",
|
|
885
|
-
type: "bytes"
|
|
886
|
-
},
|
|
887
|
-
{
|
|
888
|
-
indexed: false,
|
|
889
|
-
internalType: "address",
|
|
890
|
-
name: "token",
|
|
891
|
-
type: "address"
|
|
892
|
-
},
|
|
893
|
-
{
|
|
894
|
-
indexed: false,
|
|
895
|
-
internalType: "uint256",
|
|
896
|
-
name: "tokenAmount",
|
|
897
|
-
type: "uint256"
|
|
898
|
-
}
|
|
899
|
-
],
|
|
900
|
-
name: "MessageReceived",
|
|
901
|
-
type: "event"
|
|
902
|
-
},
|
|
903
|
-
{
|
|
904
|
-
anonymous: false,
|
|
905
|
-
inputs: [
|
|
906
|
-
{
|
|
907
|
-
indexed: true,
|
|
908
|
-
internalType: "bytes32",
|
|
909
|
-
name: "messageId",
|
|
910
|
-
type: "bytes32"
|
|
911
|
-
},
|
|
912
|
-
{
|
|
913
|
-
indexed: true,
|
|
914
|
-
internalType: "uint64",
|
|
915
|
-
name: "destinationChainSelector",
|
|
916
|
-
type: "uint64"
|
|
917
|
-
},
|
|
918
|
-
{
|
|
919
|
-
indexed: true,
|
|
920
|
-
internalType: "address",
|
|
921
|
-
name: "sender",
|
|
922
|
-
type: "address"
|
|
923
|
-
},
|
|
924
|
-
{
|
|
925
|
-
indexed: false,
|
|
926
|
-
internalType: "bytes",
|
|
927
|
-
name: "data",
|
|
928
|
-
type: "bytes"
|
|
929
|
-
},
|
|
930
|
-
{
|
|
931
|
-
indexed: false,
|
|
932
|
-
internalType: "address",
|
|
933
|
-
name: "token",
|
|
934
|
-
type: "address"
|
|
935
|
-
},
|
|
936
|
-
{
|
|
937
|
-
indexed: false,
|
|
938
|
-
internalType: "uint256",
|
|
939
|
-
name: "tokenAmount",
|
|
940
|
-
type: "uint256"
|
|
941
|
-
},
|
|
942
|
-
{
|
|
943
|
-
indexed: false,
|
|
944
|
-
internalType: "uint256",
|
|
945
|
-
name: "valueForInstantCcipRecieve",
|
|
946
|
-
type: "uint256"
|
|
947
|
-
},
|
|
948
|
-
{
|
|
949
|
-
indexed: false,
|
|
950
|
-
internalType: "address",
|
|
951
|
-
name: "transferedToken",
|
|
952
|
-
type: "address"
|
|
953
|
-
},
|
|
954
|
-
{
|
|
955
|
-
indexed: false,
|
|
956
|
-
internalType: "uint256",
|
|
957
|
-
name: "transferedTokenAmount",
|
|
958
|
-
type: "uint256"
|
|
959
|
-
}
|
|
960
|
-
],
|
|
961
|
-
name: "MessageSent",
|
|
962
|
-
type: "event"
|
|
963
|
-
},
|
|
964
|
-
{
|
|
965
|
-
anonymous: false,
|
|
966
|
-
inputs: [
|
|
967
|
-
{
|
|
968
|
-
indexed: true,
|
|
969
|
-
internalType: "address",
|
|
970
|
-
name: "previousOwner",
|
|
971
|
-
type: "address"
|
|
972
|
-
},
|
|
973
|
-
{
|
|
974
|
-
indexed: true,
|
|
975
|
-
internalType: "address",
|
|
976
|
-
name: "newOwner",
|
|
977
|
-
type: "address"
|
|
978
|
-
}
|
|
979
|
-
],
|
|
980
|
-
name: "OwnershipTransferred",
|
|
981
|
-
type: "event"
|
|
982
|
-
},
|
|
983
|
-
{
|
|
984
|
-
anonymous: false,
|
|
985
|
-
inputs: [
|
|
986
|
-
{
|
|
987
|
-
indexed: false,
|
|
988
|
-
internalType: "address",
|
|
989
|
-
name: "newFeeCollectorAddress",
|
|
990
|
-
type: "address"
|
|
991
|
-
}
|
|
992
|
-
],
|
|
993
|
-
name: "SetFeeCollectorAddress",
|
|
994
|
-
type: "event"
|
|
995
|
-
},
|
|
996
|
-
{
|
|
997
|
-
anonymous: false,
|
|
998
|
-
inputs: [
|
|
999
|
-
{
|
|
1000
|
-
indexed: false,
|
|
1001
|
-
internalType: "address",
|
|
1002
|
-
name: "newFeeOracleAddress",
|
|
1003
|
-
type: "address"
|
|
1004
|
-
}
|
|
1005
|
-
],
|
|
1006
|
-
name: "SetFeeOracleAddress",
|
|
1007
|
-
type: "event"
|
|
1008
|
-
},
|
|
1009
|
-
{
|
|
1010
|
-
anonymous: false,
|
|
1011
|
-
inputs: [
|
|
1012
|
-
{
|
|
1013
|
-
indexed: true,
|
|
1014
|
-
internalType: "address",
|
|
1015
|
-
name: "implementation",
|
|
1016
|
-
type: "address"
|
|
1017
|
-
}
|
|
1018
|
-
],
|
|
1019
|
-
name: "Upgraded",
|
|
1020
|
-
type: "event"
|
|
1021
|
-
},
|
|
1022
|
-
{
|
|
1023
|
-
inputs: [
|
|
1024
|
-
{
|
|
1025
|
-
components: [
|
|
1026
|
-
{
|
|
1027
|
-
internalType: "bytes32",
|
|
1028
|
-
name: "messageId",
|
|
1029
|
-
type: "bytes32"
|
|
1030
|
-
},
|
|
1031
|
-
{
|
|
1032
|
-
internalType: "uint64",
|
|
1033
|
-
name: "sourceChainSelector",
|
|
1034
|
-
type: "uint64"
|
|
1035
|
-
},
|
|
1036
|
-
{
|
|
1037
|
-
internalType: "bytes",
|
|
1038
|
-
name: "sender",
|
|
1039
|
-
type: "bytes"
|
|
1040
|
-
},
|
|
1041
|
-
{
|
|
1042
|
-
internalType: "bytes",
|
|
1043
|
-
name: "data",
|
|
1044
|
-
type: "bytes"
|
|
1045
|
-
},
|
|
1046
|
-
{
|
|
1047
|
-
components: [
|
|
1048
|
-
{
|
|
1049
|
-
internalType: "address",
|
|
1050
|
-
name: "token",
|
|
1051
|
-
type: "address"
|
|
1052
|
-
},
|
|
1053
|
-
{
|
|
1054
|
-
internalType: "uint256",
|
|
1055
|
-
name: "amount",
|
|
1056
|
-
type: "uint256"
|
|
1057
|
-
}
|
|
1058
|
-
],
|
|
1059
|
-
internalType: "struct Client.EVMTokenAmount[]",
|
|
1060
|
-
name: "destTokenAmounts",
|
|
1061
|
-
type: "tuple[]"
|
|
1062
|
-
}
|
|
1063
|
-
],
|
|
1064
|
-
internalType: "struct Client.Any2EVMMessage",
|
|
1065
|
-
name: "message",
|
|
1066
|
-
type: "tuple"
|
|
1067
|
-
}
|
|
1068
|
-
],
|
|
1069
|
-
name: "ccipReceive",
|
|
1070
|
-
outputs: [],
|
|
1071
|
-
stateMutability: "nonpayable",
|
|
1072
|
-
type: "function"
|
|
1073
|
-
},
|
|
1074
|
-
{
|
|
1075
|
-
inputs: [
|
|
1076
|
-
{
|
|
1077
|
-
internalType: "uint64",
|
|
1078
|
-
name: "",
|
|
1079
|
-
type: "uint64"
|
|
1080
|
-
}
|
|
1081
|
-
],
|
|
1082
|
-
name: "chainSelectorToXSwapRouterMap",
|
|
1083
|
-
outputs: [
|
|
1084
|
-
{
|
|
1085
|
-
internalType: "address",
|
|
1086
|
-
name: "",
|
|
1087
|
-
type: "address"
|
|
1088
|
-
}
|
|
1089
|
-
],
|
|
1090
|
-
stateMutability: "view",
|
|
1091
|
-
type: "function"
|
|
1092
|
-
},
|
|
1093
|
-
{
|
|
1094
|
-
inputs: [
|
|
1095
|
-
{
|
|
1096
|
-
internalType: "address",
|
|
1097
|
-
name: "_tokenToWithdraw",
|
|
1098
|
-
type: "address"
|
|
1099
|
-
},
|
|
1100
|
-
{
|
|
1101
|
-
internalType: "uint256",
|
|
1102
|
-
name: "_amountToWithdraw",
|
|
1103
|
-
type: "uint256"
|
|
1104
|
-
}
|
|
1105
|
-
],
|
|
1106
|
-
name: "emergencyWithdraw",
|
|
1107
|
-
outputs: [],
|
|
1108
|
-
stateMutability: "nonpayable",
|
|
1109
|
-
type: "function"
|
|
1110
|
-
},
|
|
1111
|
-
{
|
|
1112
|
-
inputs: [],
|
|
1113
|
-
name: "feeCollectorAddress",
|
|
1114
|
-
outputs: [
|
|
1115
|
-
{
|
|
1116
|
-
internalType: "address",
|
|
1117
|
-
name: "",
|
|
1118
|
-
type: "address"
|
|
1119
|
-
}
|
|
1120
|
-
],
|
|
1121
|
-
stateMutability: "view",
|
|
1122
|
-
type: "function"
|
|
1123
|
-
},
|
|
1124
|
-
{
|
|
1125
|
-
inputs: [],
|
|
1126
|
-
name: "feeOracleAddress",
|
|
1127
|
-
outputs: [
|
|
1128
|
-
{
|
|
1129
|
-
internalType: "address",
|
|
1130
|
-
name: "",
|
|
1131
|
-
type: "address"
|
|
1132
|
-
}
|
|
1133
|
-
],
|
|
1134
|
-
stateMutability: "view",
|
|
1135
|
-
type: "function"
|
|
1136
|
-
},
|
|
1137
|
-
{
|
|
1138
|
-
inputs: [
|
|
1139
|
-
{
|
|
1140
|
-
internalType: "address",
|
|
1141
|
-
name: "_paymentToken",
|
|
1142
|
-
type: "address"
|
|
1143
|
-
},
|
|
1144
|
-
{
|
|
1145
|
-
internalType: "uint64",
|
|
1146
|
-
name: "_destinationChainSelector",
|
|
1147
|
-
type: "uint64"
|
|
1148
|
-
},
|
|
1149
|
-
{
|
|
1150
|
-
components: [
|
|
1151
|
-
{
|
|
1152
|
-
internalType: "address",
|
|
1153
|
-
name: "receiver",
|
|
1154
|
-
type: "address"
|
|
1155
|
-
},
|
|
1156
|
-
{
|
|
1157
|
-
internalType: "address",
|
|
1158
|
-
name: "tokenOut",
|
|
1159
|
-
type: "address"
|
|
1160
|
-
},
|
|
1161
|
-
{
|
|
1162
|
-
internalType: "uint256",
|
|
1163
|
-
name: "estimatedAmountOut",
|
|
1164
|
-
type: "uint256"
|
|
1165
|
-
},
|
|
1166
|
-
{
|
|
1167
|
-
components: [
|
|
1168
|
-
{
|
|
1169
|
-
internalType: "enum CallType",
|
|
1170
|
-
name: "callType",
|
|
1171
|
-
type: "uint8"
|
|
1172
|
-
},
|
|
1173
|
-
{
|
|
1174
|
-
internalType: "address",
|
|
1175
|
-
name: "target",
|
|
1176
|
-
type: "address"
|
|
1177
|
-
},
|
|
1178
|
-
{
|
|
1179
|
-
internalType: "uint256",
|
|
1180
|
-
name: "value",
|
|
1181
|
-
type: "uint256"
|
|
1182
|
-
},
|
|
1183
|
-
{
|
|
1184
|
-
internalType: "bytes",
|
|
1185
|
-
name: "callData",
|
|
1186
|
-
type: "bytes"
|
|
1187
|
-
},
|
|
1188
|
-
{
|
|
1189
|
-
internalType: "bytes",
|
|
1190
|
-
name: "payload",
|
|
1191
|
-
type: "bytes"
|
|
1192
|
-
}
|
|
1193
|
-
],
|
|
1194
|
-
internalType: "struct Call[]",
|
|
1195
|
-
name: "calls",
|
|
1196
|
-
type: "tuple[]"
|
|
1197
|
-
}
|
|
1198
|
-
],
|
|
1199
|
-
internalType: "struct SwapDataDestination",
|
|
1200
|
-
name: "_swapDestinationData",
|
|
1201
|
-
type: "tuple"
|
|
1202
|
-
},
|
|
1203
|
-
{
|
|
1204
|
-
internalType: "address",
|
|
1205
|
-
name: "_token",
|
|
1206
|
-
type: "address"
|
|
1207
|
-
},
|
|
1208
|
-
{
|
|
1209
|
-
internalType: "uint256",
|
|
1210
|
-
name: "_amount",
|
|
1211
|
-
type: "uint256"
|
|
1212
|
-
},
|
|
1213
|
-
{
|
|
1214
|
-
internalType: "uint256",
|
|
1215
|
-
name: "_gasLimit",
|
|
1216
|
-
type: "uint256"
|
|
1217
|
-
}
|
|
1218
|
-
],
|
|
1219
|
-
name: "getFees",
|
|
1220
|
-
outputs: [
|
|
1221
|
-
{
|
|
1222
|
-
components: [
|
|
1223
|
-
{
|
|
1224
|
-
internalType: "uint256",
|
|
1225
|
-
name: "ccipFee",
|
|
1226
|
-
type: "uint256"
|
|
1227
|
-
},
|
|
1228
|
-
{
|
|
1229
|
-
components: [
|
|
1230
|
-
{
|
|
1231
|
-
internalType: "uint256",
|
|
1232
|
-
name: "tokenFee",
|
|
1233
|
-
type: "uint256"
|
|
1234
|
-
},
|
|
1235
|
-
{
|
|
1236
|
-
internalType: "uint256",
|
|
1237
|
-
name: "nativeFee",
|
|
1238
|
-
type: "uint256"
|
|
1239
|
-
}
|
|
1240
|
-
],
|
|
1241
|
-
internalType: "struct XSwapFee",
|
|
1242
|
-
name: "xSwapFee",
|
|
1243
|
-
type: "tuple"
|
|
1244
|
-
}
|
|
1245
|
-
],
|
|
1246
|
-
internalType: "struct MessageFees",
|
|
1247
|
-
name: "fees",
|
|
1248
|
-
type: "tuple"
|
|
1249
|
-
}
|
|
1250
|
-
],
|
|
1251
|
-
stateMutability: "view",
|
|
1252
|
-
type: "function"
|
|
1253
|
-
},
|
|
1254
|
-
{
|
|
1255
|
-
inputs: [],
|
|
1256
|
-
name: "getRouter",
|
|
1257
|
-
outputs: [
|
|
1258
|
-
{
|
|
1259
|
-
internalType: "address",
|
|
1260
|
-
name: "",
|
|
1261
|
-
type: "address"
|
|
1262
|
-
}
|
|
1263
|
-
],
|
|
1264
|
-
stateMutability: "view",
|
|
1265
|
-
type: "function"
|
|
1266
|
-
},
|
|
1267
|
-
{
|
|
1268
|
-
inputs: [
|
|
1269
|
-
{
|
|
1270
|
-
internalType: "address",
|
|
1271
|
-
name: "_ccipRouter",
|
|
1272
|
-
type: "address"
|
|
1273
|
-
},
|
|
1274
|
-
{
|
|
1275
|
-
internalType: "address",
|
|
1276
|
-
name: "_feeOracle",
|
|
1277
|
-
type: "address"
|
|
1278
|
-
},
|
|
1279
|
-
{
|
|
1280
|
-
internalType: "address",
|
|
1281
|
-
name: "_feeCollector",
|
|
1282
|
-
type: "address"
|
|
1283
|
-
},
|
|
1284
|
-
{
|
|
1285
|
-
internalType: "address",
|
|
1286
|
-
name: "_xSwapExecutor",
|
|
1287
|
-
type: "address"
|
|
1288
|
-
},
|
|
1289
|
-
{
|
|
1290
|
-
internalType: "address",
|
|
1291
|
-
name: "_owner",
|
|
1292
|
-
type: "address"
|
|
1293
|
-
}
|
|
1294
|
-
],
|
|
1295
|
-
name: "initialize",
|
|
1296
|
-
outputs: [],
|
|
1297
|
-
stateMutability: "nonpayable",
|
|
1298
|
-
type: "function"
|
|
1299
|
-
},
|
|
1300
|
-
{
|
|
1301
|
-
inputs: [
|
|
1302
|
-
{
|
|
1303
|
-
components: [
|
|
1304
|
-
{
|
|
1305
|
-
internalType: "bytes32",
|
|
1306
|
-
name: "messageId",
|
|
1307
|
-
type: "bytes32"
|
|
1308
|
-
},
|
|
1309
|
-
{
|
|
1310
|
-
internalType: "uint64",
|
|
1311
|
-
name: "sourceChainSelector",
|
|
1312
|
-
type: "uint64"
|
|
1313
|
-
},
|
|
1314
|
-
{
|
|
1315
|
-
internalType: "bytes",
|
|
1316
|
-
name: "sender",
|
|
1317
|
-
type: "bytes"
|
|
1318
|
-
},
|
|
1319
|
-
{
|
|
1320
|
-
internalType: "bytes",
|
|
1321
|
-
name: "data",
|
|
1322
|
-
type: "bytes"
|
|
1323
|
-
},
|
|
1324
|
-
{
|
|
1325
|
-
components: [
|
|
1326
|
-
{
|
|
1327
|
-
internalType: "address",
|
|
1328
|
-
name: "token",
|
|
1329
|
-
type: "address"
|
|
1330
|
-
},
|
|
1331
|
-
{
|
|
1332
|
-
internalType: "uint256",
|
|
1333
|
-
name: "amount",
|
|
1334
|
-
type: "uint256"
|
|
1335
|
-
}
|
|
1336
|
-
],
|
|
1337
|
-
internalType: "struct Client.EVMTokenAmount[]",
|
|
1338
|
-
name: "destTokenAmounts",
|
|
1339
|
-
type: "tuple[]"
|
|
1340
|
-
}
|
|
1341
|
-
],
|
|
1342
|
-
internalType: "struct Client.Any2EVMMessage",
|
|
1343
|
-
name: "_any2EvmMessage",
|
|
1344
|
-
type: "tuple"
|
|
1345
|
-
}
|
|
1346
|
-
],
|
|
1347
|
-
name: "instantCcipReceive",
|
|
1348
|
-
outputs: [],
|
|
1349
|
-
stateMutability: "nonpayable",
|
|
1350
|
-
type: "function"
|
|
1351
|
-
},
|
|
1352
|
-
{
|
|
1353
|
-
inputs: [
|
|
1354
|
-
{
|
|
1355
|
-
internalType: "bytes32",
|
|
1356
|
-
name: "",
|
|
1357
|
-
type: "bytes32"
|
|
1358
|
-
}
|
|
1359
|
-
],
|
|
1360
|
-
name: "messageExecutionHashToExecutorMap",
|
|
1361
|
-
outputs: [
|
|
1362
|
-
{
|
|
1363
|
-
internalType: "address",
|
|
1364
|
-
name: "",
|
|
1365
|
-
type: "address"
|
|
1366
|
-
}
|
|
1367
|
-
],
|
|
1368
|
-
stateMutability: "view",
|
|
1369
|
-
type: "function"
|
|
1370
|
-
},
|
|
1371
|
-
{
|
|
1372
|
-
inputs: [],
|
|
1373
|
-
name: "owner",
|
|
1374
|
-
outputs: [
|
|
1375
|
-
{
|
|
1376
|
-
internalType: "address",
|
|
1377
|
-
name: "",
|
|
1378
|
-
type: "address"
|
|
1379
|
-
}
|
|
1380
|
-
],
|
|
1381
|
-
stateMutability: "view",
|
|
1382
|
-
type: "function"
|
|
1383
|
-
},
|
|
1384
|
-
{
|
|
1385
|
-
inputs: [],
|
|
1386
|
-
name: "proxiableUUID",
|
|
1387
|
-
outputs: [
|
|
1388
|
-
{
|
|
1389
|
-
internalType: "bytes32",
|
|
1390
|
-
name: "",
|
|
1391
|
-
type: "bytes32"
|
|
1392
|
-
}
|
|
1393
|
-
],
|
|
1394
|
-
stateMutability: "view",
|
|
1395
|
-
type: "function"
|
|
1396
|
-
},
|
|
1397
|
-
{
|
|
1398
|
-
inputs: [],
|
|
1399
|
-
name: "renounceOwnership",
|
|
1400
|
-
outputs: [],
|
|
1401
|
-
stateMutability: "nonpayable",
|
|
1402
|
-
type: "function"
|
|
1403
|
-
},
|
|
1404
|
-
{
|
|
1405
|
-
inputs: [
|
|
1406
|
-
{
|
|
1407
|
-
internalType: "address",
|
|
1408
|
-
name: "_feeCollectorAddress",
|
|
1409
|
-
type: "address"
|
|
1410
|
-
}
|
|
1411
|
-
],
|
|
1412
|
-
name: "setFeeCollectorAddress",
|
|
1413
|
-
outputs: [],
|
|
1414
|
-
stateMutability: "nonpayable",
|
|
1415
|
-
type: "function"
|
|
1416
|
-
},
|
|
1417
|
-
{
|
|
1418
|
-
inputs: [
|
|
1419
|
-
{
|
|
1420
|
-
internalType: "address",
|
|
1421
|
-
name: "_feeOracleAddress",
|
|
1422
|
-
type: "address"
|
|
1423
|
-
}
|
|
1424
|
-
],
|
|
1425
|
-
name: "setFeeOracleAddress",
|
|
1426
|
-
outputs: [],
|
|
1427
|
-
stateMutability: "nonpayable",
|
|
1428
|
-
type: "function"
|
|
1429
|
-
},
|
|
1430
|
-
{
|
|
1431
|
-
inputs: [
|
|
1432
|
-
{
|
|
1433
|
-
internalType: "address",
|
|
1434
|
-
name: "_router",
|
|
1435
|
-
type: "address"
|
|
1436
|
-
}
|
|
1437
|
-
],
|
|
1438
|
-
name: "setRouter",
|
|
1439
|
-
outputs: [],
|
|
1440
|
-
stateMutability: "nonpayable",
|
|
1441
|
-
type: "function"
|
|
1442
|
-
},
|
|
1443
|
-
{
|
|
1444
|
-
inputs: [
|
|
1445
|
-
{
|
|
1446
|
-
internalType: "address",
|
|
1447
|
-
name: "_xSwapExecutor",
|
|
1448
|
-
type: "address"
|
|
1449
|
-
}
|
|
1450
|
-
],
|
|
1451
|
-
name: "setXSwapExecutor",
|
|
1452
|
-
outputs: [],
|
|
1453
|
-
stateMutability: "nonpayable",
|
|
1454
|
-
type: "function"
|
|
1455
|
-
},
|
|
1456
|
-
{
|
|
1457
|
-
inputs: [
|
|
1458
|
-
{
|
|
1459
|
-
internalType: "bytes4",
|
|
1460
|
-
name: "interfaceId",
|
|
1461
|
-
type: "bytes4"
|
|
1462
|
-
}
|
|
1463
|
-
],
|
|
1464
|
-
name: "supportsInterface",
|
|
1465
|
-
outputs: [
|
|
1466
|
-
{
|
|
1467
|
-
internalType: "bool",
|
|
1468
|
-
name: "",
|
|
1469
|
-
type: "bool"
|
|
1470
|
-
}
|
|
1471
|
-
],
|
|
1472
|
-
stateMutability: "pure",
|
|
1473
|
-
type: "function"
|
|
1474
|
-
},
|
|
1475
|
-
{
|
|
1476
|
-
inputs: [
|
|
1477
|
-
{
|
|
1478
|
-
internalType: "address",
|
|
1479
|
-
name: "_paymentToken",
|
|
1480
|
-
type: "address"
|
|
1481
|
-
},
|
|
1482
|
-
{
|
|
1483
|
-
internalType: "uint64",
|
|
1484
|
-
name: "_destinationChainSelector",
|
|
1485
|
-
type: "uint64"
|
|
1486
|
-
},
|
|
1487
|
-
{
|
|
1488
|
-
components: [
|
|
1489
|
-
{
|
|
1490
|
-
internalType: "address",
|
|
1491
|
-
name: "receiver",
|
|
1492
|
-
type: "address"
|
|
1493
|
-
},
|
|
1494
|
-
{
|
|
1495
|
-
internalType: "address",
|
|
1496
|
-
name: "tokenOut",
|
|
1497
|
-
type: "address"
|
|
1498
|
-
},
|
|
1499
|
-
{
|
|
1500
|
-
internalType: "uint256",
|
|
1501
|
-
name: "estimatedAmountOut",
|
|
1502
|
-
type: "uint256"
|
|
1503
|
-
},
|
|
1504
|
-
{
|
|
1505
|
-
components: [
|
|
1506
|
-
{
|
|
1507
|
-
internalType: "enum CallType",
|
|
1508
|
-
name: "callType",
|
|
1509
|
-
type: "uint8"
|
|
1510
|
-
},
|
|
1511
|
-
{
|
|
1512
|
-
internalType: "address",
|
|
1513
|
-
name: "target",
|
|
1514
|
-
type: "address"
|
|
1515
|
-
},
|
|
1516
|
-
{
|
|
1517
|
-
internalType: "uint256",
|
|
1518
|
-
name: "value",
|
|
1519
|
-
type: "uint256"
|
|
1520
|
-
},
|
|
1521
|
-
{
|
|
1522
|
-
internalType: "bytes",
|
|
1523
|
-
name: "callData",
|
|
1524
|
-
type: "bytes"
|
|
1525
|
-
},
|
|
1526
|
-
{
|
|
1527
|
-
internalType: "bytes",
|
|
1528
|
-
name: "payload",
|
|
1529
|
-
type: "bytes"
|
|
1530
|
-
}
|
|
1531
|
-
],
|
|
1532
|
-
internalType: "struct Call[]",
|
|
1533
|
-
name: "calls",
|
|
1534
|
-
type: "tuple[]"
|
|
1535
|
-
}
|
|
1536
|
-
],
|
|
1537
|
-
internalType: "struct SwapDataDestination",
|
|
1538
|
-
name: "_swapDestinationData",
|
|
1539
|
-
type: "tuple"
|
|
1540
|
-
},
|
|
1541
|
-
{
|
|
1542
|
-
components: [
|
|
1543
|
-
{
|
|
1544
|
-
internalType: "address",
|
|
1545
|
-
name: "tokenIn",
|
|
1546
|
-
type: "address"
|
|
1547
|
-
},
|
|
1548
|
-
{
|
|
1549
|
-
internalType: "uint256",
|
|
1550
|
-
name: "amountIn",
|
|
1551
|
-
type: "uint256"
|
|
1552
|
-
},
|
|
1553
|
-
{
|
|
1554
|
-
internalType: "address",
|
|
1555
|
-
name: "tokenOut",
|
|
1556
|
-
type: "address"
|
|
1557
|
-
},
|
|
1558
|
-
{
|
|
1559
|
-
internalType: "uint256",
|
|
1560
|
-
name: "estimatedAmountOut",
|
|
1561
|
-
type: "uint256"
|
|
1562
|
-
},
|
|
1563
|
-
{
|
|
1564
|
-
internalType: "uint256",
|
|
1565
|
-
name: "valueForDestinationGas",
|
|
1566
|
-
type: "uint256"
|
|
1567
|
-
},
|
|
1568
|
-
{
|
|
1569
|
-
internalType: "uint256",
|
|
1570
|
-
name: "valueForInstantCcipRecieve",
|
|
1571
|
-
type: "uint256"
|
|
1572
|
-
},
|
|
1573
|
-
{
|
|
1574
|
-
components: [
|
|
1575
|
-
{
|
|
1576
|
-
internalType: "enum CallType",
|
|
1577
|
-
name: "callType",
|
|
1578
|
-
type: "uint8"
|
|
1579
|
-
},
|
|
1580
|
-
{
|
|
1581
|
-
internalType: "address",
|
|
1582
|
-
name: "target",
|
|
1583
|
-
type: "address"
|
|
1584
|
-
},
|
|
1585
|
-
{
|
|
1586
|
-
internalType: "uint256",
|
|
1587
|
-
name: "value",
|
|
1588
|
-
type: "uint256"
|
|
1589
|
-
},
|
|
1590
|
-
{
|
|
1591
|
-
internalType: "bytes",
|
|
1592
|
-
name: "callData",
|
|
1593
|
-
type: "bytes"
|
|
1594
|
-
},
|
|
1595
|
-
{
|
|
1596
|
-
internalType: "bytes",
|
|
1597
|
-
name: "payload",
|
|
1598
|
-
type: "bytes"
|
|
1599
|
-
}
|
|
1600
|
-
],
|
|
1601
|
-
internalType: "struct Call[]",
|
|
1602
|
-
name: "calls",
|
|
1603
|
-
type: "tuple[]"
|
|
1604
|
-
}
|
|
1605
|
-
],
|
|
1606
|
-
internalType: "struct SwapDataOrigin",
|
|
1607
|
-
name: "_swapOriginData",
|
|
1608
|
-
type: "tuple"
|
|
1609
|
-
},
|
|
1610
|
-
{
|
|
1611
|
-
internalType: "uint256",
|
|
1612
|
-
name: "_gasLimit",
|
|
1613
|
-
type: "uint256"
|
|
1614
|
-
}
|
|
1615
|
-
],
|
|
1616
|
-
name: "swapAndSendMessage",
|
|
1617
|
-
outputs: [
|
|
1618
|
-
{
|
|
1619
|
-
internalType: "bytes32",
|
|
1620
|
-
name: "messageId",
|
|
1621
|
-
type: "bytes32"
|
|
1622
|
-
}
|
|
1623
|
-
],
|
|
1624
|
-
stateMutability: "payable",
|
|
1625
|
-
type: "function"
|
|
1626
|
-
},
|
|
1627
|
-
{
|
|
1628
|
-
inputs: [
|
|
1629
|
-
{
|
|
1630
|
-
internalType: "address",
|
|
1631
|
-
name: "newOwner",
|
|
1632
|
-
type: "address"
|
|
1633
|
-
}
|
|
1634
|
-
],
|
|
1635
|
-
name: "transferOwnership",
|
|
1636
|
-
outputs: [],
|
|
1637
|
-
stateMutability: "nonpayable",
|
|
1638
|
-
type: "function"
|
|
1639
|
-
},
|
|
1640
|
-
{
|
|
1641
|
-
inputs: [
|
|
1642
|
-
{
|
|
1643
|
-
internalType: "uint64",
|
|
1644
|
-
name: "_chainSelector",
|
|
1645
|
-
type: "uint64"
|
|
1646
|
-
},
|
|
1647
|
-
{
|
|
1648
|
-
internalType: "address",
|
|
1649
|
-
name: "_xSwapRouter",
|
|
1650
|
-
type: "address"
|
|
1651
|
-
}
|
|
1652
|
-
],
|
|
1653
|
-
name: "updateChainSelectorToXSwapRouterMap",
|
|
1654
|
-
outputs: [],
|
|
1655
|
-
stateMutability: "nonpayable",
|
|
1656
|
-
type: "function"
|
|
1657
|
-
},
|
|
1658
|
-
{
|
|
1659
|
-
inputs: [
|
|
1660
|
-
{
|
|
1661
|
-
internalType: "uint64[]",
|
|
1662
|
-
name: "_chainSelectors",
|
|
1663
|
-
type: "uint64[]"
|
|
1664
|
-
},
|
|
1665
|
-
{
|
|
1666
|
-
internalType: "address[]",
|
|
1667
|
-
name: "_xSwapRouters",
|
|
1668
|
-
type: "address[]"
|
|
1669
|
-
}
|
|
1670
|
-
],
|
|
1671
|
-
name: "updateChainSelectorToXSwapRouterMapMany",
|
|
1672
|
-
outputs: [],
|
|
1673
|
-
stateMutability: "nonpayable",
|
|
1674
|
-
type: "function"
|
|
1675
|
-
},
|
|
1676
|
-
{
|
|
1677
|
-
inputs: [
|
|
1678
|
-
{
|
|
1679
|
-
internalType: "uint64",
|
|
1680
|
-
name: "_sourceChainSelector",
|
|
1681
|
-
type: "uint64"
|
|
1682
|
-
},
|
|
1683
|
-
{
|
|
1684
|
-
internalType: "address",
|
|
1685
|
-
name: "_sender",
|
|
1686
|
-
type: "address"
|
|
1687
|
-
},
|
|
1688
|
-
{
|
|
1689
|
-
internalType: "bool",
|
|
1690
|
-
name: "_isWhitelisted",
|
|
1691
|
-
type: "bool"
|
|
1692
|
-
}
|
|
1693
|
-
],
|
|
1694
|
-
name: "updateWhitelistSender",
|
|
1695
|
-
outputs: [],
|
|
1696
|
-
stateMutability: "nonpayable",
|
|
1697
|
-
type: "function"
|
|
1698
|
-
},
|
|
1699
|
-
{
|
|
1700
|
-
inputs: [
|
|
1701
|
-
{
|
|
1702
|
-
internalType: "uint64[]",
|
|
1703
|
-
name: "_sourceChainSelectors",
|
|
1704
|
-
type: "uint64[]"
|
|
1705
|
-
},
|
|
1706
|
-
{
|
|
1707
|
-
internalType: "address[]",
|
|
1708
|
-
name: "_senders",
|
|
1709
|
-
type: "address[]"
|
|
1710
|
-
},
|
|
1711
|
-
{
|
|
1712
|
-
internalType: "bool[]",
|
|
1713
|
-
name: "_areWhitelisted",
|
|
1714
|
-
type: "bool[]"
|
|
1715
|
-
}
|
|
1716
|
-
],
|
|
1717
|
-
name: "updateWhitelistSenderMany",
|
|
1718
|
-
outputs: [],
|
|
1719
|
-
stateMutability: "nonpayable",
|
|
1720
|
-
type: "function"
|
|
1721
|
-
},
|
|
1722
|
-
{
|
|
1723
|
-
inputs: [
|
|
1724
|
-
{
|
|
1725
|
-
internalType: "address",
|
|
1726
|
-
name: "_token",
|
|
1727
|
-
type: "address"
|
|
1728
|
-
},
|
|
1729
|
-
{
|
|
1730
|
-
internalType: "bool",
|
|
1731
|
-
name: "_isWhitelisted",
|
|
1732
|
-
type: "bool"
|
|
1733
|
-
}
|
|
1734
|
-
],
|
|
1735
|
-
name: "updateWhitelistToken",
|
|
1736
|
-
outputs: [],
|
|
1737
|
-
stateMutability: "nonpayable",
|
|
1738
|
-
type: "function"
|
|
1739
|
-
},
|
|
1740
|
-
{
|
|
1741
|
-
inputs: [
|
|
1742
|
-
{
|
|
1743
|
-
internalType: "address",
|
|
1744
|
-
name: "newImplementation",
|
|
1745
|
-
type: "address"
|
|
1746
|
-
}
|
|
1747
|
-
],
|
|
1748
|
-
name: "upgradeTo",
|
|
1749
|
-
outputs: [],
|
|
1750
|
-
stateMutability: "nonpayable",
|
|
1751
|
-
type: "function"
|
|
1752
|
-
},
|
|
1753
|
-
{
|
|
1754
|
-
inputs: [
|
|
1755
|
-
{
|
|
1756
|
-
internalType: "address",
|
|
1757
|
-
name: "newImplementation",
|
|
1758
|
-
type: "address"
|
|
1759
|
-
},
|
|
1760
|
-
{
|
|
1761
|
-
internalType: "bytes",
|
|
1762
|
-
name: "data",
|
|
1763
|
-
type: "bytes"
|
|
1764
|
-
}
|
|
1765
|
-
],
|
|
1766
|
-
name: "upgradeToAndCall",
|
|
1767
|
-
outputs: [],
|
|
1768
|
-
stateMutability: "payable",
|
|
1769
|
-
type: "function"
|
|
1770
|
-
},
|
|
1771
|
-
{
|
|
1772
|
-
inputs: [
|
|
1773
|
-
{
|
|
1774
|
-
internalType: "uint64",
|
|
1775
|
-
name: "",
|
|
1776
|
-
type: "uint64"
|
|
1777
|
-
},
|
|
1778
|
-
{
|
|
1779
|
-
internalType: "address",
|
|
1780
|
-
name: "",
|
|
1781
|
-
type: "address"
|
|
1782
|
-
}
|
|
1783
|
-
],
|
|
1784
|
-
name: "whitelistedSenders",
|
|
1785
|
-
outputs: [
|
|
1786
|
-
{
|
|
1787
|
-
internalType: "bool",
|
|
1788
|
-
name: "",
|
|
1789
|
-
type: "bool"
|
|
1790
|
-
}
|
|
1791
|
-
],
|
|
1792
|
-
stateMutability: "view",
|
|
1793
|
-
type: "function"
|
|
1794
|
-
},
|
|
1795
|
-
{
|
|
1796
|
-
inputs: [
|
|
1797
|
-
{
|
|
1798
|
-
internalType: "address",
|
|
1799
|
-
name: "",
|
|
1800
|
-
type: "address"
|
|
1801
|
-
}
|
|
1802
|
-
],
|
|
1803
|
-
name: "whitelistedTokens",
|
|
1804
|
-
outputs: [
|
|
1805
|
-
{
|
|
1806
|
-
internalType: "bool",
|
|
1807
|
-
name: "",
|
|
1808
|
-
type: "bool"
|
|
1809
|
-
}
|
|
1810
|
-
],
|
|
1811
|
-
stateMutability: "view",
|
|
1812
|
-
type: "function"
|
|
1813
|
-
},
|
|
1814
|
-
{
|
|
1815
|
-
inputs: [],
|
|
1816
|
-
name: "xSwapExecutor",
|
|
1817
|
-
outputs: [
|
|
1818
|
-
{
|
|
1819
|
-
internalType: "address",
|
|
1820
|
-
name: "",
|
|
1821
|
-
type: "address"
|
|
1822
|
-
}
|
|
1823
|
-
],
|
|
1824
|
-
stateMutability: "view",
|
|
1825
|
-
type: "function"
|
|
1826
|
-
},
|
|
1827
|
-
{
|
|
1828
|
-
stateMutability: "payable",
|
|
1829
|
-
type: "receive"
|
|
1830
|
-
}
|
|
1831
|
-
];
|
|
1832
|
-
|
|
1833
|
-
// src/contracts/abi/index.ts
|
|
1834
|
-
var BatchQueryAbi = BatchQuery_default;
|
|
1835
|
-
var ERC20Abi = ERC20_default;
|
|
1836
|
-
var XSwapRouterAbi = XSwapRouter_default;
|
|
1837
|
-
|
|
1838
|
-
// src/contracts/addresses.ts
|
|
1839
|
-
var ADDRESSES = {
|
|
1840
|
-
// arbitrum
|
|
1841
|
-
"42161": {
|
|
1842
|
-
["BatchQuery" /* BatchQuery */]: "0xb5f9934ea0810ef5faa677e8c68c6983b88664b1",
|
|
1843
|
-
["FeeCollector" /* FeeCollector */]: "0xb37275558f02f05104c2ba35199d16adeb43432f"
|
|
1844
|
-
},
|
|
1845
|
-
// avalanche
|
|
1846
|
-
"43114": {
|
|
1847
|
-
["BatchQuery" /* BatchQuery */]: "0xb5f9934ea0810ef5faa677e8c68c6983b88664b1",
|
|
1848
|
-
["FeeCollector" /* FeeCollector */]: "0xb37275558f02f05104c2ba35199d16adeb43432f"
|
|
1849
|
-
},
|
|
1850
|
-
// base
|
|
1851
|
-
"8453": {
|
|
1852
|
-
["BatchQuery" /* BatchQuery */]: "0xb5f9934ea0810ef5faa677e8c68c6983b88664b1",
|
|
1853
|
-
["FeeCollector" /* FeeCollector */]: "0xb37275558f02f05104c2ba35199d16adeb43432f"
|
|
1854
|
-
},
|
|
1855
|
-
// ethereum
|
|
1856
|
-
"1": {
|
|
1857
|
-
["BatchQuery" /* BatchQuery */]: "0xb5f9934ea0810ef5faa677e8c68c6983b88664b1",
|
|
1858
|
-
["FeeCollector" /* FeeCollector */]: "0xb37275558f02f05104c2ba35199d16adeb43432f"
|
|
1859
|
-
},
|
|
1860
|
-
// optimism
|
|
1861
|
-
"10": {
|
|
1862
|
-
["BatchQuery" /* BatchQuery */]: "0xb5f9934ea0810ef5faa677e8c68c6983b88664b1",
|
|
1863
|
-
["FeeCollector" /* FeeCollector */]: "0xb37275558f02f05104c2ba35199d16adeb43432f"
|
|
1864
|
-
},
|
|
1865
|
-
// polygon
|
|
1866
|
-
"137": {
|
|
1867
|
-
["BatchQuery" /* BatchQuery */]: "0xb5f9934ea0810ef5faa677e8c68c6983b88664b1",
|
|
1868
|
-
["FeeCollector" /* FeeCollector */]: "0xb37275558f02f05104c2ba35199d16adeb43432f"
|
|
1869
|
-
}
|
|
1870
|
-
};
|
|
1871
|
-
|
|
1872
|
-
// src/constants/index.ts
|
|
1873
|
-
var DEFAULT_ECOSYSTEM = "evm" /* EVM */;
|
|
1874
|
-
var NUMBER_INPUT_REGEX = /^[0-9]*[.,]?[0-9]*$/;
|
|
1875
|
-
var SLIPPAGE_PRESETS = [0.5, 1.5, 3];
|
|
1876
|
-
var DELIVERY_TIME = 30 * 1e3 * 60;
|
|
1877
|
-
var EXPRESS_DELIVERY_TIME = 30 * 1e3;
|
|
1878
|
-
var BALANCES_CHUNK_SIZE = 500;
|
|
1879
|
-
var ROUTE_TIMEOUT_MS = 5e3;
|
|
1880
|
-
var MINIMUM_DISPLAYED_TOKEN_AMOUNT = 1e-4;
|
|
1881
|
-
var DEFAULT_SOURCE_CHAIN_ID = "1";
|
|
1882
|
-
|
|
1883
|
-
// src/utils/contracts.ts
|
|
1884
|
-
var IERC20 = new import_ethers2.ethers.utils.Interface(ERC20Abi);
|
|
1885
|
-
var getBalanceOf = async (wallet, token, rpcUrl) => {
|
|
1886
|
-
const provider = import_ethers2.ethers.getDefaultProvider(rpcUrl);
|
|
1887
|
-
if (token === import_ethers2.ethers.constants.AddressZero) {
|
|
1888
|
-
return import_ethers2.ethers.utils.formatEther(await provider.getBalance(wallet));
|
|
1889
|
-
}
|
|
1890
|
-
const contract = new import_ethers2.ethers.Contract(token, ERC20Abi, provider);
|
|
1891
|
-
return import_ethers2.ethers.utils.formatUnits(
|
|
1892
|
-
await contract.balanceOf(wallet),
|
|
1893
|
-
await contract.decimals()
|
|
1894
|
-
);
|
|
1895
|
-
};
|
|
1896
|
-
var getBalances = async (chain, wallet) => {
|
|
1897
|
-
return {
|
|
1898
|
-
...await getNativeBalance(chain, wallet),
|
|
1899
|
-
...await getErc20Balances(chain, wallet)
|
|
1900
|
-
};
|
|
1901
|
-
};
|
|
1902
|
-
var getNativeBalance = async (chain, wallet) => {
|
|
1903
|
-
const native = chain.tokens.find(
|
|
1904
|
-
({ address }) => address === import_ethers2.ethers.constants.AddressZero
|
|
1905
|
-
);
|
|
1906
|
-
if (native) {
|
|
1907
|
-
const provider = import_ethers2.ethers.getDefaultProvider(chain.publicRpcUrls[0]);
|
|
1908
|
-
const balance = await provider.getBalance(wallet);
|
|
1909
|
-
return {
|
|
1910
|
-
[native.address]: balance
|
|
1911
|
-
};
|
|
1912
|
-
}
|
|
1913
|
-
return {};
|
|
1914
|
-
};
|
|
1915
|
-
var getErc20Balances = async (chain, wallet) => {
|
|
1916
|
-
const erc20Tokens = chain.tokens.filter(
|
|
1917
|
-
({ address }) => address !== import_ethers2.ethers.constants.AddressZero
|
|
1918
|
-
);
|
|
1919
|
-
const tokenChunks = chunkArray(erc20Tokens, BALANCES_CHUNK_SIZE);
|
|
1920
|
-
const promises = tokenChunks.map(async (tokenChunk) => {
|
|
1921
|
-
const tokenAddresses = tokenChunk.map((token) => token.address);
|
|
1922
|
-
const calldatas = tokenChunk.map(
|
|
1923
|
-
() => IERC20.encodeFunctionData("balanceOf", [wallet])
|
|
1924
|
-
);
|
|
1925
|
-
const contractAddress = ADDRESSES[chain.chainId]?.BatchQuery;
|
|
1926
|
-
const rpcUrl = chain.publicRpcUrls[0];
|
|
1927
|
-
if (contractAddress && rpcUrl) {
|
|
1928
|
-
const contract = new import_ethers2.ethers.Contract(
|
|
1929
|
-
contractAddress,
|
|
1930
|
-
BatchQueryAbi,
|
|
1931
|
-
import_ethers2.ethers.getDefaultProvider(rpcUrl)
|
|
1932
|
-
);
|
|
1933
|
-
return await contract["batchQuery"](tokenAddresses, calldatas);
|
|
1934
|
-
}
|
|
1935
|
-
return Promise.resolve();
|
|
1936
|
-
});
|
|
1937
|
-
const tokenBalances = (await Promise.all(promises)).flat().map(
|
|
1938
|
-
(encodedBalance) => import_ethers2.ethers.utils.defaultAbiCoder.decode(["uint256"], encodedBalance)[0]
|
|
1939
|
-
);
|
|
1940
|
-
const balances = {};
|
|
1941
|
-
erc20Tokens.forEach((token, index) => {
|
|
1942
|
-
balances[token.address] = tokenBalances[index];
|
|
1943
|
-
});
|
|
1944
|
-
return balances;
|
|
1945
|
-
};
|
|
1946
|
-
var generateApproveTxData = (tokenAddress, spender, amount) => {
|
|
1947
|
-
return tokenAddress !== import_ethers2.ethers.constants.AddressZero ? {
|
|
1948
|
-
to: tokenAddress,
|
|
1949
|
-
value: safeBigNumberFrom("0"),
|
|
1950
|
-
data: IERC20.encodeFunctionData("approve", [spender, amount])
|
|
1951
|
-
} : void 0;
|
|
1952
|
-
};
|
|
1953
|
-
var findPlaceholderIndex = (abi, funName, funParams, placeholderValue) => {
|
|
1954
|
-
if (funParams.flat(Infinity).filter((param) => param === placeholderValue).length !== 1) {
|
|
1955
|
-
throw new Error("Random placeholder value must be provided and unique.");
|
|
1956
|
-
}
|
|
1957
|
-
const iface = new import_ethers2.ethers.utils.Interface(abi);
|
|
1958
|
-
const functionFragment = iface.getFunction(funName);
|
|
1959
|
-
if (!functionFragment) {
|
|
1960
|
-
throw new Error(`Can't find function "${funName}" in provided ABI.`);
|
|
1961
|
-
}
|
|
1962
|
-
const encodedFunData = iface.encodeFunctionData(functionFragment, funParams);
|
|
1963
|
-
const paramData = encodedFunData.slice(10);
|
|
1964
|
-
const chunks = [];
|
|
1965
|
-
for (let i = 0; i < paramData.length; i += 64) {
|
|
1966
|
-
chunks.push(paramData.slice(i, i + 64));
|
|
1967
|
-
}
|
|
1968
|
-
const searchValue = placeholderValue.toHexString().slice(2).padStart(64, "0");
|
|
1969
|
-
const result = chunks.findIndex((chunk) => chunk === searchValue);
|
|
1970
|
-
if (result === -1) {
|
|
1971
|
-
throw new Error("Randomized parameter not found in the encoded data.");
|
|
1972
|
-
}
|
|
1973
|
-
return result;
|
|
1974
|
-
};
|
|
1975
|
-
|
|
1976
|
-
// src/utils/strings.ts
|
|
1977
|
-
var shortAddress = (address) => {
|
|
1978
|
-
return `${address?.substring(0, 5)}...${address?.substring(
|
|
1979
|
-
address.length - 5,
|
|
1980
|
-
address.length
|
|
1981
|
-
)}`;
|
|
1982
|
-
};
|
|
1983
|
-
|
|
1984
|
-
// src/utils/index.ts
|
|
1985
|
-
var replaceNull = (values, newValue) => {
|
|
1986
|
-
const modifiedValues = [...values];
|
|
1987
|
-
for (let i = 0; i < modifiedValues.length; i++) {
|
|
1988
|
-
if (Array.isArray(modifiedValues[i])) {
|
|
1989
|
-
modifiedValues[i] = replaceNull(modifiedValues[i], newValue);
|
|
1990
|
-
} else {
|
|
1991
|
-
if (modifiedValues[i] === null) {
|
|
1992
|
-
modifiedValues[i] = newValue;
|
|
1993
|
-
}
|
|
1994
|
-
}
|
|
1995
|
-
}
|
|
1996
|
-
return modifiedValues;
|
|
1997
|
-
};
|
|
1998
|
-
var deepMergeObjects = (obj1, obj2) => {
|
|
1999
|
-
for (const key in obj2) {
|
|
2000
|
-
if (obj2.hasOwnProperty(key)) {
|
|
2001
|
-
if (obj1.hasOwnProperty(key) && typeof obj1[key] === "object" && typeof obj2[key] === "object") {
|
|
2002
|
-
deepMergeObjects(obj1[key], obj2[key]);
|
|
2003
|
-
} else {
|
|
2004
|
-
obj1[key] = obj2[key];
|
|
765
|
+
}
|
|
766
|
+
}
|
|
767
|
+
return modifiedValues;
|
|
768
|
+
};
|
|
769
|
+
var deepMergeObjects = (obj1, obj2) => {
|
|
770
|
+
for (const key in obj2) {
|
|
771
|
+
if (obj2.hasOwnProperty(key)) {
|
|
772
|
+
if (obj1.hasOwnProperty(key) && typeof obj1[key] === "object" && typeof obj2[key] === "object") {
|
|
773
|
+
deepMergeObjects(obj1[key], obj2[key]);
|
|
774
|
+
} else {
|
|
775
|
+
obj1[key] = obj2[key];
|
|
2005
776
|
}
|
|
2006
777
|
}
|
|
2007
778
|
}
|
|
@@ -2014,6 +785,10 @@ var chunkArray = (array, chunkSize) => {
|
|
|
2014
785
|
}
|
|
2015
786
|
return result;
|
|
2016
787
|
};
|
|
788
|
+
var getDate = (blockTimestamp) => {
|
|
789
|
+
const date = new Date(blockTimestamp * 1e3);
|
|
790
|
+
return (0, import_date_fns.format)(date, "d MMM yyyy HH:mm:ss");
|
|
791
|
+
};
|
|
2017
792
|
|
|
2018
793
|
// src/services/integrations/customCalls/staking.ts
|
|
2019
794
|
var generateStakingCalls = ({
|
|
@@ -2081,6 +856,7 @@ var generateStakingCalls = ({
|
|
|
2081
856
|
};
|
|
2082
857
|
|
|
2083
858
|
// src/services/integrations/transactions.ts
|
|
859
|
+
var import_ethers4 = require("ethers");
|
|
2084
860
|
var getSwapTx = async ({
|
|
2085
861
|
dstChain,
|
|
2086
862
|
dstToken,
|
|
@@ -2090,6 +866,7 @@ var getSwapTx = async ({
|
|
|
2090
866
|
const supportedChains = (await getChains()).filter(
|
|
2091
867
|
({ web3Environment, swapSupported }) => web3Environment === "mainnet" /* MAINNET */ && swapSupported
|
|
2092
868
|
);
|
|
869
|
+
validateSwapTxData(supportedChains, dstChain, dstToken);
|
|
2093
870
|
const route = await openTxConfigForm({
|
|
2094
871
|
dstChainId: dstChain,
|
|
2095
872
|
dstTokenAddr: dstToken,
|
|
@@ -2099,6 +876,119 @@ var getSwapTx = async ({
|
|
|
2099
876
|
});
|
|
2100
877
|
return route.transactions;
|
|
2101
878
|
};
|
|
879
|
+
var validateSwapTxData = (supportedChains, dstChain, dstToken) => {
|
|
880
|
+
const supportedDstChain = supportedChains.find(
|
|
881
|
+
({ chainId }) => chainId === dstChain
|
|
882
|
+
);
|
|
883
|
+
if (!supportedDstChain) {
|
|
884
|
+
throw new Error(`Provided chain '${dstChain}' is not supported`);
|
|
885
|
+
}
|
|
886
|
+
if (!supportedDstChain.tokens.some(({ address }) => address === dstToken)) {
|
|
887
|
+
throw new Error(`Provided token '${dstToken}' is not supported`);
|
|
888
|
+
}
|
|
889
|
+
};
|
|
890
|
+
var monitorTransactionStatus = async (srcChainId, txHash) => {
|
|
891
|
+
const txReceipt = await getTxReceipt(srcChainId, txHash);
|
|
892
|
+
if (!txReceipt) {
|
|
893
|
+
throw new Error(
|
|
894
|
+
`No transaction found for chain ${srcChainId} tx ${txHash}`
|
|
895
|
+
);
|
|
896
|
+
}
|
|
897
|
+
const supportedChains = (await getChains()).filter(
|
|
898
|
+
({ web3Environment, swapSupported }) => web3Environment === "mainnet" /* MAINNET */ && swapSupported
|
|
899
|
+
);
|
|
900
|
+
const messageSentEventSignature = "MessageSent(bytes32,uint64,address,bytes,address,uint256,uint256,address,uint256)";
|
|
901
|
+
const messageSentEventAbi = [
|
|
902
|
+
"event MessageSent(bytes32 indexed messageId, uint64 indexed destinationChainSelector, address indexed sender, bytes data, address token, uint256 tokenAmount, uint256 valueForInstantCcipRecieve, address transferedToken, uint256 transferedTokenAmount)"
|
|
903
|
+
];
|
|
904
|
+
const messageReceivedEventSignature = "MessageReceived(bytes32,uint64,address,bytes,address,uint256)";
|
|
905
|
+
const messageReceivedEventAbi = [
|
|
906
|
+
"event MessageReceived(bytes32 indexed messageId, uint64 indexed sourceChainSelector, address indexed sender, bytes data, address token, uint256 tokenAmount)"
|
|
907
|
+
];
|
|
908
|
+
const messageSentEvent = txReceipt.logs?.find((log) => {
|
|
909
|
+
return log.topics[0] === import_ethers4.ethers.utils.id(messageSentEventSignature);
|
|
910
|
+
});
|
|
911
|
+
if (!messageSentEvent) {
|
|
912
|
+
throw new Error(
|
|
913
|
+
`No transaction event found for chain ${srcChainId} tx ${txHash}`
|
|
914
|
+
);
|
|
915
|
+
}
|
|
916
|
+
const messageId = messageSentEvent?.topics[1];
|
|
917
|
+
const iface = new import_ethers4.ethers.utils.Interface(messageSentEventAbi);
|
|
918
|
+
const decodedMessageSentEvent = iface.parseLog(messageSentEvent);
|
|
919
|
+
if (!decodedMessageSentEvent) {
|
|
920
|
+
throw new Error(
|
|
921
|
+
`No transaction event arguments found for chain ${srcChainId} tx ${txHash}`
|
|
922
|
+
);
|
|
923
|
+
}
|
|
924
|
+
const srcChain = supportedChains.find(
|
|
925
|
+
(chain) => chain.chainId === srcChainId.toString()
|
|
926
|
+
);
|
|
927
|
+
const srcToken = srcChain?.tokens.find(
|
|
928
|
+
(token) => token.address === decodedMessageSentEvent.args?.token.toString()
|
|
929
|
+
);
|
|
930
|
+
const targetChain = supportedChains.find(
|
|
931
|
+
(chain) => chain.ccipChainId === decodedMessageSentEvent.args?.destinationChainSelector?.toString()
|
|
932
|
+
);
|
|
933
|
+
const toChainId = targetChain?.chainId;
|
|
934
|
+
if (!toChainId) {
|
|
935
|
+
throw new Error(`Unknown destination chain!`);
|
|
936
|
+
}
|
|
937
|
+
const transaction = {
|
|
938
|
+
txHash,
|
|
939
|
+
fromChain: srcChain?.displayName,
|
|
940
|
+
fromChainImage: srcChain?.image,
|
|
941
|
+
toChain: targetChain.displayName,
|
|
942
|
+
toChainImage: targetChain.image,
|
|
943
|
+
fromToken: srcToken?.symbol,
|
|
944
|
+
fromTokenImage: srcToken?.image,
|
|
945
|
+
fromAmount: weiToHumanReadable({
|
|
946
|
+
amount: decodedMessageSentEvent.args?.tokenAmount.toString(),
|
|
947
|
+
decimals: srcToken?.decimals || 18,
|
|
948
|
+
precisionFractionalPlaces: 4
|
|
949
|
+
}),
|
|
950
|
+
isDone: false,
|
|
951
|
+
explorer: `${CCIP_EXPLORER}/tx/${txHash}`
|
|
952
|
+
};
|
|
953
|
+
addTransactionToRenderedTransactions(transaction);
|
|
954
|
+
renderTxHistoryButtons();
|
|
955
|
+
const xSwapRouterOnDestinationAddress = ADDRESSES[toChainId]?.XSwapRouter;
|
|
956
|
+
if (!xSwapRouterOnDestinationAddress) {
|
|
957
|
+
throw new Error(`Unknown destination XSwapRouter!`);
|
|
958
|
+
}
|
|
959
|
+
const xSwapRouterOnDestination = new import_ethers4.ethers.Contract(
|
|
960
|
+
xSwapRouterOnDestinationAddress,
|
|
961
|
+
messageReceivedEventAbi,
|
|
962
|
+
import_ethers4.ethers.getDefaultProvider(
|
|
963
|
+
supportedChains.find((chain) => chain.chainId === toChainId)?.publicRpcUrls[0]
|
|
964
|
+
)
|
|
965
|
+
);
|
|
966
|
+
const eventFilter = {
|
|
967
|
+
address: xSwapRouterOnDestinationAddress,
|
|
968
|
+
topics: [import_ethers4.ethers.utils.id(messageReceivedEventSignature), messageId]
|
|
969
|
+
};
|
|
970
|
+
const onSuccess = async () => {
|
|
971
|
+
updateTransactionDoneInRenderedTransactions(txHash);
|
|
972
|
+
renderTxHistoryButtons();
|
|
973
|
+
await new Promise((resolve) => setTimeout(() => resolve(true), 5e3));
|
|
974
|
+
removeTransactionFromRenderedTransactions(txHash);
|
|
975
|
+
renderTxHistoryButtons();
|
|
976
|
+
};
|
|
977
|
+
xSwapRouterOnDestination.once(eventFilter, () => onSuccess());
|
|
978
|
+
};
|
|
979
|
+
var getTxReceipt = async (txChainId, txHash) => {
|
|
980
|
+
const chains = await getChains();
|
|
981
|
+
const chain = chains.find((chain2) => chain2.chainId === txChainId.toString());
|
|
982
|
+
const provider = new import_ethers4.ethers.providers.JsonRpcProvider(
|
|
983
|
+
chain?.publicRpcUrls[0]
|
|
984
|
+
);
|
|
985
|
+
try {
|
|
986
|
+
return await provider.getTransactionReceipt(txHash);
|
|
987
|
+
} catch (error) {
|
|
988
|
+
console.error("Error fetching transaction receipt:", error);
|
|
989
|
+
return null;
|
|
990
|
+
}
|
|
991
|
+
};
|
|
2102
992
|
|
|
2103
993
|
// src/hooks/useDebounce.tsx
|
|
2104
994
|
var import_react = require("react");
|
|
@@ -2125,7 +1015,6 @@ var import_bignumber2 = __toESM(require("bignumber.js"));
|
|
|
2125
1015
|
|
|
2126
1016
|
// src/components/TxConfigForm/HistoryCard.tsx
|
|
2127
1017
|
var import_react2 = require("react");
|
|
2128
|
-
var import_date_fns = require("date-fns");
|
|
2129
1018
|
|
|
2130
1019
|
// src/components/icons/ArrowRightIcon.tsx
|
|
2131
1020
|
var import_jsx_runtime3 = require("react/jsx-runtime");
|
|
@@ -2163,115 +1052,123 @@ var ArrowDownIcon = () => {
|
|
|
2163
1052
|
);
|
|
2164
1053
|
};
|
|
2165
1054
|
|
|
2166
|
-
// src/components/icons/
|
|
1055
|
+
// src/components/icons/ArrowLeftIcon.tsx
|
|
2167
1056
|
var import_jsx_runtime5 = require("react/jsx-runtime");
|
|
2168
|
-
var
|
|
1057
|
+
var ArrowLeftIcon = () => {
|
|
2169
1058
|
return /* @__PURE__ */ (0, import_jsx_runtime5.jsx)(
|
|
2170
1059
|
"svg",
|
|
2171
1060
|
{
|
|
1061
|
+
width: "10",
|
|
1062
|
+
height: "16",
|
|
1063
|
+
viewBox: "0 0 10 16",
|
|
1064
|
+
fill: "none",
|
|
2172
1065
|
xmlns: "http://www.w3.org/2000/svg",
|
|
2173
|
-
|
|
2174
|
-
|
|
2175
|
-
|
|
1066
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime5.jsx)(
|
|
1067
|
+
"path",
|
|
1068
|
+
{
|
|
1069
|
+
d: "M0.5 8L8.13251 15.5L9.5 14.1562L3.20318 8L9.4682 1.84375L8.10071 0.5L0.5 8Z",
|
|
1070
|
+
fill: "white"
|
|
1071
|
+
}
|
|
1072
|
+
)
|
|
2176
1073
|
}
|
|
2177
1074
|
);
|
|
2178
1075
|
};
|
|
2179
1076
|
|
|
2180
|
-
// src/components/icons/
|
|
1077
|
+
// src/components/icons/ArrowUpRightIcon.tsx
|
|
2181
1078
|
var import_jsx_runtime6 = require("react/jsx-runtime");
|
|
2182
|
-
var
|
|
1079
|
+
var ArrowUpRightIcon = () => {
|
|
2183
1080
|
return /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(
|
|
2184
1081
|
"svg",
|
|
2185
1082
|
{
|
|
2186
1083
|
xmlns: "http://www.w3.org/2000/svg",
|
|
2187
|
-
viewBox: "0 0
|
|
1084
|
+
viewBox: "0 0 512 512",
|
|
2188
1085
|
fill: "currentColor",
|
|
2189
|
-
children: /* @__PURE__ */ (0, import_jsx_runtime6.jsx)("path", { d: "
|
|
1086
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime6.jsx)("path", { d: "M320 0c-17.7 0-32 14.3-32 32s14.3 32 32 32h82.7L201.4 265.4c-12.5 12.5-12.5 32.8 0 45.3s32.8 12.5 45.3 0L448 109.3V192c0 17.7 14.3 32 32 32s32-14.3 32-32V32c0-17.7-14.3-32-32-32H320zM80 32C35.8 32 0 67.8 0 112V432c0 44.2 35.8 80 80 80H400c44.2 0 80-35.8 80-80V320c0-17.7-14.3-32-32-32s-32 14.3-32 32V432c0 8.8-7.2 16-16 16H80c-8.8 0-16-7.2-16-16V112c0-8.8 7.2-16 16-16H192c17.7 0 32-14.3 32-32s-14.3-32-32-32H80z" })
|
|
2190
1087
|
}
|
|
2191
1088
|
);
|
|
2192
1089
|
};
|
|
2193
1090
|
|
|
2194
|
-
// src/components/icons/
|
|
1091
|
+
// src/components/icons/CheckIcon.tsx
|
|
2195
1092
|
var import_jsx_runtime7 = require("react/jsx-runtime");
|
|
2196
|
-
var
|
|
1093
|
+
var CheckIcon = () => {
|
|
2197
1094
|
return /* @__PURE__ */ (0, import_jsx_runtime7.jsx)(
|
|
2198
1095
|
"svg",
|
|
2199
1096
|
{
|
|
2200
|
-
width: "12",
|
|
2201
|
-
height: "12",
|
|
2202
1097
|
xmlns: "http://www.w3.org/2000/svg",
|
|
2203
|
-
viewBox: "0 0
|
|
2204
|
-
|
|
2205
|
-
|
|
2206
|
-
{
|
|
2207
|
-
fill: "currentColor",
|
|
2208
|
-
d: "M233.4 406.6c12.5 12.5 32.8 12.5 45.3 0l192-192c12.5-12.5 12.5-32.8 0-45.3s-32.8-12.5-45.3 0L256 338.7 86.6 169.4c-12.5-12.5-32.8-12.5-45.3 0s-12.5 32.8 0 45.3l192 192z"
|
|
2209
|
-
}
|
|
2210
|
-
)
|
|
1098
|
+
viewBox: "0 0 448 512",
|
|
1099
|
+
fill: "currentColor",
|
|
1100
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime7.jsx)("path", { d: "M438.6 105.4c12.5 12.5 12.5 32.8 0 45.3l-256 256c-12.5 12.5-32.8 12.5-45.3 0l-128-128c-12.5-12.5-12.5-32.8 0-45.3s32.8-12.5 45.3 0L160 338.7 393.4 105.4c12.5-12.5 32.8-12.5 45.3 0z" })
|
|
2211
1101
|
}
|
|
2212
1102
|
);
|
|
2213
1103
|
};
|
|
2214
1104
|
|
|
2215
|
-
// src/components/icons/
|
|
1105
|
+
// src/components/icons/ChevronDownIcon.tsx
|
|
2216
1106
|
var import_jsx_runtime8 = require("react/jsx-runtime");
|
|
2217
|
-
var
|
|
1107
|
+
var ChevronDownIcon = () => {
|
|
2218
1108
|
return /* @__PURE__ */ (0, import_jsx_runtime8.jsx)(
|
|
2219
1109
|
"svg",
|
|
2220
1110
|
{
|
|
2221
|
-
height: "12",
|
|
2222
1111
|
width: "12",
|
|
1112
|
+
height: "12",
|
|
2223
1113
|
xmlns: "http://www.w3.org/2000/svg",
|
|
2224
1114
|
viewBox: "0 0 512 512",
|
|
2225
1115
|
children: /* @__PURE__ */ (0, import_jsx_runtime8.jsx)(
|
|
2226
1116
|
"path",
|
|
2227
1117
|
{
|
|
2228
1118
|
fill: "currentColor",
|
|
2229
|
-
d: "M233.4
|
|
1119
|
+
d: "M233.4 406.6c12.5 12.5 32.8 12.5 45.3 0l192-192c12.5-12.5 12.5-32.8 0-45.3s-32.8-12.5-45.3 0L256 338.7 86.6 169.4c-12.5-12.5-32.8-12.5-45.3 0s-12.5 32.8 0 45.3l192 192z"
|
|
2230
1120
|
}
|
|
2231
1121
|
)
|
|
2232
1122
|
}
|
|
2233
1123
|
);
|
|
2234
1124
|
};
|
|
2235
1125
|
|
|
2236
|
-
// src/components/icons/
|
|
1126
|
+
// src/components/icons/ChevronUpIcon.tsx
|
|
2237
1127
|
var import_jsx_runtime9 = require("react/jsx-runtime");
|
|
1128
|
+
var ChevronUpIcon = () => {
|
|
1129
|
+
return /* @__PURE__ */ (0, import_jsx_runtime9.jsx)("svg", { xmlns: "http://www.w3.org/2000/svg", viewBox: "0 0 512 512", children: /* @__PURE__ */ (0, import_jsx_runtime9.jsx)(
|
|
1130
|
+
"path",
|
|
1131
|
+
{
|
|
1132
|
+
fill: "currentColor",
|
|
1133
|
+
d: "M233.4 105.4c12.5-12.5 32.8-12.5 45.3 0l192 192c12.5 12.5 12.5 32.8 0 45.3s-32.8 12.5-45.3 0L256 173.3 86.6 342.6c-12.5 12.5-32.8 12.5-45.3 0s-12.5-32.8 0-45.3l192-192z"
|
|
1134
|
+
}
|
|
1135
|
+
) });
|
|
1136
|
+
};
|
|
1137
|
+
|
|
1138
|
+
// src/components/icons/CircularProgressIcon.tsx
|
|
1139
|
+
var import_jsx_runtime10 = require("react/jsx-runtime");
|
|
2238
1140
|
var CircularProgressIcon = () => {
|
|
2239
|
-
return /* @__PURE__ */ (0,
|
|
1141
|
+
return /* @__PURE__ */ (0, import_jsx_runtime10.jsxs)(
|
|
2240
1142
|
"svg",
|
|
2241
1143
|
{
|
|
2242
|
-
className: "animate-spin
|
|
2243
|
-
|
|
1144
|
+
className: "animate-spin-slow text-white",
|
|
1145
|
+
width: "33",
|
|
1146
|
+
height: "33",
|
|
1147
|
+
viewBox: "0 0 33 33",
|
|
2244
1148
|
fill: "none",
|
|
2245
|
-
|
|
1149
|
+
xmlns: "http://www.w3.org/2000/svg",
|
|
2246
1150
|
children: [
|
|
2247
|
-
/* @__PURE__ */ (0,
|
|
1151
|
+
/* @__PURE__ */ (0, import_jsx_runtime10.jsx)(
|
|
2248
1152
|
"circle",
|
|
2249
1153
|
{
|
|
2250
|
-
|
|
2251
|
-
|
|
2252
|
-
|
|
2253
|
-
|
|
2254
|
-
|
|
2255
|
-
strokeWidth: "
|
|
1154
|
+
cx: "16.5",
|
|
1155
|
+
cy: "16.5",
|
|
1156
|
+
r: "15.5",
|
|
1157
|
+
stroke: "white",
|
|
1158
|
+
strokeOpacity: "0.2",
|
|
1159
|
+
strokeWidth: "2"
|
|
2256
1160
|
}
|
|
2257
1161
|
),
|
|
2258
|
-
/* @__PURE__ */ (0,
|
|
2259
|
-
"path",
|
|
2260
|
-
{
|
|
2261
|
-
className: "opacity-75",
|
|
2262
|
-
fill: "currentColor",
|
|
2263
|
-
d: "M4 12a8 8 0 018-8V0C5.373 0 0 5.373 0 12h4zm2 5.291A7.962 7.962 0 014 12H0c0 3.042 1.135 5.824 3 7.938l3-2.647z"
|
|
2264
|
-
}
|
|
2265
|
-
)
|
|
1162
|
+
/* @__PURE__ */ (0, import_jsx_runtime10.jsx)("path", { d: "M1 16C1 7.71573 7.71573 1 16 1", stroke: "white", strokeWidth: "2" })
|
|
2266
1163
|
]
|
|
2267
1164
|
}
|
|
2268
1165
|
);
|
|
2269
1166
|
};
|
|
2270
1167
|
|
|
2271
1168
|
// src/components/icons/CoinsIcon.tsx
|
|
2272
|
-
var
|
|
1169
|
+
var import_jsx_runtime11 = require("react/jsx-runtime");
|
|
2273
1170
|
var CoinsIcon = () => {
|
|
2274
|
-
return /* @__PURE__ */ (0,
|
|
1171
|
+
return /* @__PURE__ */ (0, import_jsx_runtime11.jsx)(
|
|
2275
1172
|
"svg",
|
|
2276
1173
|
{
|
|
2277
1174
|
width: "24",
|
|
@@ -2279,7 +1176,7 @@ var CoinsIcon = () => {
|
|
|
2279
1176
|
viewBox: "0 0 24 24",
|
|
2280
1177
|
fill: "none",
|
|
2281
1178
|
xmlns: "http://www.w3.org/2000/svg",
|
|
2282
|
-
children: /* @__PURE__ */ (0,
|
|
1179
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime11.jsx)(
|
|
2283
1180
|
"path",
|
|
2284
1181
|
{
|
|
2285
1182
|
d: "M15 20C12.7667 20 10.875 19.225 9.325 17.675C7.775 16.125 7 14.2333 7 12C7 9.76667 7.775 7.875 9.325 6.325C10.875 4.775 12.7667 4 15 4C17.2333 4 19.125 4.775 20.675 6.325C22.225 7.875 23 9.76667 23 12C23 14.2333 22.225 16.125 20.675 17.675C19.125 19.225 17.2333 20 15 20ZM7 19.75C5.23333 19.2833 3.79167 18.3333 2.675 16.9C1.55833 15.4667 1 13.8333 1 12C1 10.1667 1.55833 8.53333 2.675 7.1C3.79167 5.66667 5.23333 4.71667 7 4.25V6.35C5.8 6.76667 4.83333 7.49167 4.1 8.525C3.36667 9.55833 3 10.7167 3 12C3 13.2833 3.36667 14.4417 4.1 15.475C4.83333 16.5083 5.8 17.2333 7 17.65V19.75ZM15 18C16.6667 18 18.0833 17.4167 19.25 16.25C20.4167 15.0833 21 13.6667 21 12C21 10.3333 20.4167 8.91667 19.25 7.75C18.0833 6.58333 16.6667 6 15 6C13.3333 6 11.9167 6.58333 10.75 7.75C9.58333 8.91667 9 10.3333 9 12C9 13.6667 9.58333 15.0833 10.75 16.25C11.9167 17.4167 13.3333 18 15 18Z",
|
|
@@ -2292,9 +1189,9 @@ var CoinsIcon = () => {
|
|
|
2292
1189
|
};
|
|
2293
1190
|
|
|
2294
1191
|
// src/components/icons/DownArrorIcon.tsx
|
|
2295
|
-
var
|
|
1192
|
+
var import_jsx_runtime12 = require("react/jsx-runtime");
|
|
2296
1193
|
var DownArrowIcon = () => {
|
|
2297
|
-
return /* @__PURE__ */ (0,
|
|
1194
|
+
return /* @__PURE__ */ (0, import_jsx_runtime12.jsx)(
|
|
2298
1195
|
"svg",
|
|
2299
1196
|
{
|
|
2300
1197
|
width: 16,
|
|
@@ -2302,7 +1199,7 @@ var DownArrowIcon = () => {
|
|
|
2302
1199
|
viewBox: "0 0 16 16",
|
|
2303
1200
|
fill: "none",
|
|
2304
1201
|
xmlns: "http://www.w3.org/2000/svg",
|
|
2305
|
-
children: /* @__PURE__ */ (0,
|
|
1202
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime12.jsx)(
|
|
2306
1203
|
"path",
|
|
2307
1204
|
{
|
|
2308
1205
|
d: "M8.00008 9.76921L5.06421 6.83334H10.9359L8.00008 9.76921Z",
|
|
@@ -2315,9 +1212,9 @@ var DownArrowIcon = () => {
|
|
|
2315
1212
|
};
|
|
2316
1213
|
|
|
2317
1214
|
// src/components/icons/HistoryIcon.tsx
|
|
2318
|
-
var
|
|
1215
|
+
var import_jsx_runtime13 = require("react/jsx-runtime");
|
|
2319
1216
|
var HistoryIcon = () => {
|
|
2320
|
-
return /* @__PURE__ */ (0,
|
|
1217
|
+
return /* @__PURE__ */ (0, import_jsx_runtime13.jsx)(
|
|
2321
1218
|
"svg",
|
|
2322
1219
|
{
|
|
2323
1220
|
width: "20",
|
|
@@ -2325,7 +1222,7 @@ var HistoryIcon = () => {
|
|
|
2325
1222
|
viewBox: "0 0 20 20",
|
|
2326
1223
|
fill: "none",
|
|
2327
1224
|
xmlns: "http://www.w3.org/2000/svg",
|
|
2328
|
-
children: /* @__PURE__ */ (0,
|
|
1225
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime13.jsx)(
|
|
2329
1226
|
"path",
|
|
2330
1227
|
{
|
|
2331
1228
|
d: "M9.98413 17.5C8.1633 17.5 6.57667 16.8646 5.22424 15.5938C3.8718 14.3229 3.09663 12.7361 2.89871 10.8333H4.52163C4.70635 12.2778 5.3166 13.4722 6.35236 14.4167C7.38812 15.3611 8.59871 15.8333 9.98413 15.8333C11.5279 15.8333 12.8374 15.2674 13.9128 14.1354C14.9881 13.0035 15.5258 11.625 15.5258 10C15.5258 8.375 14.9881 6.99653 13.9128 5.86458C12.8374 4.73264 11.5279 4.16667 9.98413 4.16667C9.07371 4.16667 8.22267 4.38889 7.43101 4.83333C6.63934 5.27778 5.97302 5.88889 5.43205 6.66667H7.60913V8.33333H2.85913V3.33333H4.44246V5.29167C5.11538 4.40278 5.93673 3.71528 6.90653 3.22917C7.87632 2.74306 8.90219 2.5 9.98413 2.5C10.9737 2.5 11.9006 2.69792 12.7649 3.09375C13.6291 3.48958 14.3812 4.02431 15.0211 4.69792C15.661 5.37153 16.169 6.16319 16.5451 7.07292C16.9211 7.98264 17.1091 8.95833 17.1091 10C17.1091 11.0417 16.9211 12.0174 16.5451 12.9271C16.169 13.8368 15.661 14.6285 15.0211 15.3021C14.3812 15.9757 13.6291 16.5104 12.7649 16.9062C11.9006 17.3021 10.9737 17.5 9.98413 17.5ZM12.2008 13.5L9.19246 10.3333V5.83333H10.7758V9.66667L13.3091 12.3333L12.2008 13.5Z",
|
|
@@ -2337,23 +1234,12 @@ var HistoryIcon = () => {
|
|
|
2337
1234
|
};
|
|
2338
1235
|
|
|
2339
1236
|
// src/components/icons/HourGlassIcon.tsx
|
|
2340
|
-
var
|
|
2341
|
-
var HourGlassIcon = () => {
|
|
2342
|
-
return /* @__PURE__ */ (0, import_jsx_runtime13.jsx)(
|
|
2343
|
-
"svg",
|
|
2344
|
-
{
|
|
2345
|
-
xmlns: "http://www.w3.org/2000/svg",
|
|
2346
|
-
viewBox: "0 0 384 512",
|
|
2347
|
-
fill: "currentColor",
|
|
2348
|
-
children: /* @__PURE__ */ (0, import_jsx_runtime13.jsx)("path", { d: "M0 32C0 14.3 14.3 0 32 0H64 320h32c17.7 0 32 14.3 32 32s-14.3 32-32 32V75c0 42.4-16.9 83.1-46.9 113.1L237.3 256l67.9 67.9c30 30 46.9 70.7 46.9 113.1v11c17.7 0 32 14.3 32 32s-14.3 32-32 32H320 64 32c-17.7 0-32-14.3-32-32s14.3-32 32-32V437c0-42.4 16.9-83.1 46.9-113.1L146.7 256 78.9 188.1C48.9 158.1 32 117.4 32 75V64C14.3 64 0 49.7 0 32zM96 64V75c0 25.5 10.1 49.9 28.1 67.9L192 210.7l67.9-67.9c18-18 28.1-42.4 28.1-67.9V64H96zm0 384H288V437c0-25.5-10.1-49.9-28.1-67.9L192 301.3l-67.9 67.9c-18 18-28.1 42.4-28.1 67.9v11z" })
|
|
2349
|
-
}
|
|
2350
|
-
);
|
|
2351
|
-
};
|
|
1237
|
+
var import_jsx_runtime14 = require("react/jsx-runtime");
|
|
2352
1238
|
|
|
2353
1239
|
// src/components/icons/SearchIcon.tsx
|
|
2354
|
-
var
|
|
1240
|
+
var import_jsx_runtime15 = require("react/jsx-runtime");
|
|
2355
1241
|
var SearchIcon = () => {
|
|
2356
|
-
return /* @__PURE__ */ (0,
|
|
1242
|
+
return /* @__PURE__ */ (0, import_jsx_runtime15.jsx)(
|
|
2357
1243
|
"svg",
|
|
2358
1244
|
{
|
|
2359
1245
|
xmlns: "http://www.w3.org/2000/svg",
|
|
@@ -2361,29 +1247,18 @@ var SearchIcon = () => {
|
|
|
2361
1247
|
width: "24",
|
|
2362
1248
|
viewBox: "0 -960 960 960",
|
|
2363
1249
|
fill: "#ffffffc0",
|
|
2364
|
-
children: /* @__PURE__ */ (0,
|
|
1250
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime15.jsx)("path", { d: "M784-120 532-372q-30 24-69 38t-83 14q-109 0-184.5-75.5T120-580q0-109 75.5-184.5T380-840q109 0 184.5 75.5T640-580q0 44-14 83t-38 69l252 252-56 56ZM380-400q75 0 127.5-52.5T560-580q0-75-52.5-127.5T380-760q-75 0-127.5 52.5T200-580q0 75 52.5 127.5T380-400Z" })
|
|
2365
1251
|
}
|
|
2366
1252
|
);
|
|
2367
1253
|
};
|
|
2368
1254
|
|
|
2369
1255
|
// src/components/icons/XMarkIcon.tsx
|
|
2370
|
-
var
|
|
2371
|
-
var XMarkIcon = () => {
|
|
2372
|
-
return /* @__PURE__ */ (0, import_jsx_runtime15.jsx)(
|
|
2373
|
-
"svg",
|
|
2374
|
-
{
|
|
2375
|
-
xmlns: "http://www.w3.org/2000/svg",
|
|
2376
|
-
viewBox: "0 0 384 512",
|
|
2377
|
-
fill: "current",
|
|
2378
|
-
children: /* @__PURE__ */ (0, import_jsx_runtime15.jsx)("path", { d: "M342.6 150.6c12.5-12.5 12.5-32.8 0-45.3s-32.8-12.5-45.3 0L192 210.7 86.6 105.4c-12.5-12.5-32.8-12.5-45.3 0s-12.5 32.8 0 45.3L146.7 256 41.4 361.4c-12.5 12.5-12.5 32.8 0 45.3s32.8 12.5 45.3 0L192 301.3 297.4 406.6c12.5 12.5 32.8 12.5 45.3 0s12.5-32.8 0-45.3L237.3 256 342.6 150.6z" })
|
|
2379
|
-
}
|
|
2380
|
-
);
|
|
2381
|
-
};
|
|
1256
|
+
var import_jsx_runtime16 = require("react/jsx-runtime");
|
|
2382
1257
|
|
|
2383
1258
|
// src/components/icons/PercentageIcon.tsx
|
|
2384
|
-
var
|
|
1259
|
+
var import_jsx_runtime17 = require("react/jsx-runtime");
|
|
2385
1260
|
var PercentageIcon = () => {
|
|
2386
|
-
return /* @__PURE__ */ (0,
|
|
1261
|
+
return /* @__PURE__ */ (0, import_jsx_runtime17.jsxs)(
|
|
2387
1262
|
"svg",
|
|
2388
1263
|
{
|
|
2389
1264
|
width: "12",
|
|
@@ -2392,14 +1267,14 @@ var PercentageIcon = () => {
|
|
|
2392
1267
|
fill: "none",
|
|
2393
1268
|
xmlns: "http://www.w3.org/2000/svg",
|
|
2394
1269
|
children: [
|
|
2395
|
-
/* @__PURE__ */ (0,
|
|
1270
|
+
/* @__PURE__ */ (0, import_jsx_runtime17.jsx)(
|
|
2396
1271
|
"path",
|
|
2397
1272
|
{
|
|
2398
1273
|
d: "M3.00008 5.33329C2.35564 5.33329 1.80564 5.10552 1.35008 4.64996C0.894526 4.1944 0.666748 3.6444 0.666748 2.99996C0.666748 2.35551 0.894526 1.80551 1.35008 1.34996C1.80564 0.894404 2.35564 0.666626 3.00008 0.666626C3.64453 0.666626 4.19453 0.894404 4.65008 1.34996C5.10564 1.80551 5.33342 2.35551 5.33342 2.99996C5.33342 3.6444 5.10564 4.1944 4.65008 4.64996C4.19453 5.10552 3.64453 5.33329 3.00008 5.33329ZM3.00008 3.99996C3.27786 3.99996 3.51397 3.90274 3.70841 3.70829C3.90286 3.51385 4.00008 3.27774 4.00008 2.99996C4.00008 2.72218 3.90286 2.48607 3.70841 2.29163C3.51397 2.09718 3.27786 1.99996 3.00008 1.99996C2.7223 1.99996 2.48619 2.09718 2.29175 2.29163C2.0973 2.48607 2.00008 2.72218 2.00008 2.99996C2.00008 3.27774 2.0973 3.51385 2.29175 3.70829C2.48619 3.90274 2.7223 3.99996 3.00008 3.99996ZM9.00008 11.3333C8.35564 11.3333 7.80564 11.1055 7.35008 10.65C6.89453 10.1944 6.66675 9.6444 6.66675 8.99996C6.66675 8.35552 6.89453 7.80552 7.35008 7.34996C7.80564 6.8944 8.35564 6.66663 9.00008 6.66663C9.64453 6.66663 10.1945 6.8944 10.6501 7.34996C11.1056 7.80552 11.3334 8.35552 11.3334 8.99996C11.3334 9.6444 11.1056 10.1944 10.6501 10.65C10.1945 11.1055 9.64453 11.3333 9.00008 11.3333ZM9.00008 9.99996C9.27786 9.99996 9.51397 9.90274 9.70842 9.70829C9.90286 9.51385 10.0001 9.27774 10.0001 8.99996C10.0001 8.72218 9.90286 8.48607 9.70842 8.29163C9.51397 8.09718 9.27786 7.99996 9.00008 7.99996C8.7223 7.99996 8.48619 8.09718 8.29175 8.29163C8.0973 8.48607 8.00008 8.72218 8.00008 8.99996C8.00008 9.27774 8.0973 9.51385 8.29175 9.70829C8.48619 9.90274 8.7223 9.99996 9.00008 9.99996ZM1.60008 11.3333L0.666748 10.4L10.4001 0.666626L11.3334 1.59996L1.60008 11.3333Z",
|
|
2399
1274
|
fill: "url(#paint0_linear_32_1164)"
|
|
2400
1275
|
}
|
|
2401
1276
|
),
|
|
2402
|
-
/* @__PURE__ */ (0,
|
|
1277
|
+
/* @__PURE__ */ (0, import_jsx_runtime17.jsx)("defs", { children: /* @__PURE__ */ (0, import_jsx_runtime17.jsxs)(
|
|
2403
1278
|
"linearGradient",
|
|
2404
1279
|
{
|
|
2405
1280
|
id: "paint0_linear_32_1164",
|
|
@@ -2409,8 +1284,8 @@ var PercentageIcon = () => {
|
|
|
2409
1284
|
y2: "1.31767",
|
|
2410
1285
|
gradientUnits: "userSpaceOnUse",
|
|
2411
1286
|
children: [
|
|
2412
|
-
/* @__PURE__ */ (0,
|
|
2413
|
-
/* @__PURE__ */ (0,
|
|
1287
|
+
/* @__PURE__ */ (0, import_jsx_runtime17.jsx)("stop", { stopColor: "#3681C6" }),
|
|
1288
|
+
/* @__PURE__ */ (0, import_jsx_runtime17.jsx)("stop", { offset: "1", stopColor: "#2B4A9D" })
|
|
2414
1289
|
]
|
|
2415
1290
|
}
|
|
2416
1291
|
) })
|
|
@@ -2420,9 +1295,9 @@ var PercentageIcon = () => {
|
|
|
2420
1295
|
};
|
|
2421
1296
|
|
|
2422
1297
|
// src/components/icons/TimerIcon.tsx
|
|
2423
|
-
var
|
|
1298
|
+
var import_jsx_runtime18 = require("react/jsx-runtime");
|
|
2424
1299
|
var TimerIcon = () => {
|
|
2425
|
-
return /* @__PURE__ */ (0,
|
|
1300
|
+
return /* @__PURE__ */ (0, import_jsx_runtime18.jsx)(
|
|
2426
1301
|
"svg",
|
|
2427
1302
|
{
|
|
2428
1303
|
xmlns: "http://www.w3.org/2000/svg",
|
|
@@ -2430,15 +1305,15 @@ var TimerIcon = () => {
|
|
|
2430
1305
|
viewBox: "0 -960 960 960",
|
|
2431
1306
|
width: "16",
|
|
2432
1307
|
fill: "currentColor",
|
|
2433
|
-
children: /* @__PURE__ */ (0,
|
|
1308
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime18.jsx)("path", { d: "M360-840v-80h240v80H360Zm80 440h80v-240h-80v240Zm40 320q-74 0-139.5-28.5T226-186q-49-49-77.5-114.5T120-440q0-74 28.5-139.5T226-694q49-49 114.5-77.5T480-800q62 0 119 20t107 58l56-56 56 56-56 56q38 50 58 107t20 119q0 74-28.5 139.5T734-186q-49 49-114.5 77.5T480-80Zm0-80q116 0 198-82t82-198q0-116-82-198t-198-82q-116 0-198 82t-82 198q0 116 82 198t198 82Zm0-280Z" })
|
|
2434
1309
|
}
|
|
2435
1310
|
);
|
|
2436
1311
|
};
|
|
2437
1312
|
|
|
2438
1313
|
// src/components/icons/InfoIcon.tsx
|
|
2439
|
-
var
|
|
1314
|
+
var import_jsx_runtime19 = require("react/jsx-runtime");
|
|
2440
1315
|
var InfoIcon = () => {
|
|
2441
|
-
return /* @__PURE__ */ (0,
|
|
1316
|
+
return /* @__PURE__ */ (0, import_jsx_runtime19.jsx)(
|
|
2442
1317
|
"svg",
|
|
2443
1318
|
{
|
|
2444
1319
|
width: "28",
|
|
@@ -2446,15 +1321,15 @@ var InfoIcon = () => {
|
|
|
2446
1321
|
viewBox: "0 0 28 28",
|
|
2447
1322
|
xmlns: "http://www.w3.org/2000/svg",
|
|
2448
1323
|
fill: "currentColor",
|
|
2449
|
-
children: /* @__PURE__ */ (0,
|
|
1324
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime19.jsx)("path", { d: "M12.6667 20.6666H15.3334V12.6666H12.6667V20.6666ZM14.0001 9.99996C14.3779 9.99996 14.6945 9.87218 14.9501 9.61663C15.2056 9.36107 15.3334 9.0444 15.3334 8.66663C15.3334 8.28885 15.2056 7.97218 14.9501 7.71663C14.6945 7.46107 14.3779 7.33329 14.0001 7.33329C13.6223 7.33329 13.3056 7.46107 13.0501 7.71663C12.7945 7.97218 12.6667 8.28885 12.6667 8.66663C12.6667 9.0444 12.7945 9.36107 13.0501 9.61663C13.3056 9.87218 13.6223 9.99996 14.0001 9.99996ZM14.0001 27.3333C12.1556 27.3333 10.4223 26.9833 8.80008 26.2833C7.17786 25.5833 5.76675 24.6333 4.56675 23.4333C3.36675 22.2333 2.41675 20.8222 1.71675 19.2C1.01675 17.5777 0.666748 15.8444 0.666748 14C0.666748 12.1555 1.01675 10.4222 1.71675 8.79996C2.41675 7.17774 3.36675 5.76663 4.56675 4.56663C5.76675 3.36663 7.17786 2.41663 8.80008 1.71663C10.4223 1.01663 12.1556 0.666626 14.0001 0.666626C15.8445 0.666626 17.5779 1.01663 19.2001 1.71663C20.8223 2.41663 22.2334 3.36663 23.4334 4.56663C24.6334 5.76663 25.5834 7.17774 26.2834 8.79996C26.9834 10.4222 27.3334 12.1555 27.3334 14C27.3334 15.8444 26.9834 17.5777 26.2834 19.2C25.5834 20.8222 24.6334 22.2333 23.4334 23.4333C22.2334 24.6333 20.8223 25.5833 19.2001 26.2833C17.5779 26.9833 15.8445 27.3333 14.0001 27.3333ZM14.0001 24.6666C16.9779 24.6666 19.5001 23.6333 21.5667 21.5666C23.6334 19.5 24.6667 16.9777 24.6667 14C24.6667 11.0222 23.6334 8.49996 21.5667 6.43329C19.5001 4.36663 16.9779 3.33329 14.0001 3.33329C11.0223 3.33329 8.50008 4.36663 6.43341 6.43329C4.36675 8.49996 3.33341 11.0222 3.33341 14C3.33341 16.9777 4.36675 19.5 6.43341 21.5666C8.50008 23.6333 11.0223 24.6666 14.0001 24.6666Z" })
|
|
2450
1325
|
}
|
|
2451
1326
|
);
|
|
2452
1327
|
};
|
|
2453
1328
|
|
|
2454
1329
|
// src/components/icons/SettingsIcon.tsx
|
|
2455
|
-
var
|
|
1330
|
+
var import_jsx_runtime20 = require("react/jsx-runtime");
|
|
2456
1331
|
var SettingsIcon = () => {
|
|
2457
|
-
return /* @__PURE__ */ (0,
|
|
1332
|
+
return /* @__PURE__ */ (0, import_jsx_runtime20.jsx)(
|
|
2458
1333
|
"svg",
|
|
2459
1334
|
{
|
|
2460
1335
|
width: "18",
|
|
@@ -2462,7 +1337,7 @@ var SettingsIcon = () => {
|
|
|
2462
1337
|
viewBox: "0 0 18 18",
|
|
2463
1338
|
fill: "none",
|
|
2464
1339
|
xmlns: "http://www.w3.org/2000/svg",
|
|
2465
|
-
children: /* @__PURE__ */ (0,
|
|
1340
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime20.jsx)(
|
|
2466
1341
|
"path",
|
|
2467
1342
|
{
|
|
2468
1343
|
d: "M6.62325 17.5L6.26504 14.78C6.07101 14.7092 5.88818 14.6242 5.71653 14.525C5.54489 14.4258 5.37698 14.3196 5.2128 14.2063L2.54862 15.2688L0.0859375 11.2312L2.39191 9.57375C2.37698 9.47458 2.36952 9.37896 2.36952 9.28687V8.71313C2.36952 8.62104 2.37698 8.52542 2.39191 8.42625L0.0859375 6.76875L2.54862 2.73125L5.2128 3.79375C5.37698 3.68042 5.54862 3.57417 5.72773 3.475C5.90683 3.37583 6.08594 3.29083 6.26504 3.22L6.62325 0.5H11.5486L11.9068 3.22C12.1009 3.29083 12.2837 3.37583 12.4553 3.475C12.627 3.57417 12.7949 3.68042 12.9591 3.79375L15.6233 2.73125L18.0859 6.76875L15.78 8.42625C15.7949 8.52542 15.8024 8.62104 15.8024 8.71313V9.28687C15.8024 9.37896 15.7874 9.47458 15.7576 9.57375L18.0635 11.2312L15.6009 15.2688L12.9591 14.2063C12.7949 14.3196 12.6233 14.4258 12.4441 14.525C12.265 14.6242 12.0859 14.7092 11.9068 14.78L11.5486 17.5H6.62325ZM9.13071 11.975C9.99639 11.975 10.7352 11.6846 11.3471 11.1038C11.9591 10.5229 12.265 9.82167 12.265 9C12.265 8.17833 11.9591 7.47708 11.3471 6.89625C10.7352 6.31542 9.99639 6.025 9.13071 6.025C8.25012 6.025 7.50758 6.31542 6.9031 6.89625C6.29862 7.47708 5.99639 8.17833 5.99639 9C5.99639 9.82167 6.29862 10.5229 6.9031 11.1038C7.50758 11.6846 8.25012 11.975 9.13071 11.975ZM9.13071 10.275C8.75758 10.275 8.44042 10.151 8.17922 9.90312C7.91803 9.65521 7.78743 9.35417 7.78743 9C7.78743 8.64583 7.91803 8.34479 8.17922 8.09688C8.44042 7.84896 8.75758 7.725 9.13071 7.725C9.50385 7.725 9.82101 7.84896 10.0822 8.09688C10.3434 8.34479 10.474 8.64583 10.474 9C10.474 9.35417 10.3434 9.65521 10.0822 9.90312C9.82101 10.151 9.50385 10.275 9.13071 10.275ZM8.19042 15.8H9.95907L10.2725 13.5475C10.7352 13.4342 11.1643 13.2677 11.5598 13.0481C11.9553 12.8285 12.3173 12.5629 12.6456 12.2513L14.8621 13.1225L15.7352 11.6775L13.8098 10.2963C13.8844 10.0979 13.9367 9.88896 13.9665 9.66938C13.9964 9.44979 14.0113 9.22667 14.0113 9C14.0113 8.77333 13.9964 8.55021 13.9665 8.33063C13.9367 8.11104 13.8844 7.90208 13.8098 7.70375L15.7352 6.3225L14.8621 4.8775L12.6456 5.77C12.3173 5.44417 11.9553 5.17146 11.5598 4.95188C11.1643 4.73229 10.7352 4.56583 10.2725 4.4525L9.98146 2.2H8.2128L7.89937 4.4525C7.43668 4.56583 7.00758 4.73229 6.61206 4.95188C6.21653 5.17146 5.85459 5.43708 5.52624 5.74875L3.30982 4.8775L2.43668 6.3225L4.36206 7.6825C4.28743 7.895 4.23519 8.1075 4.20534 8.32C4.17549 8.5325 4.16056 8.75917 4.16056 9C4.16056 9.22667 4.17549 9.44625 4.20534 9.65875C4.23519 9.87125 4.28743 10.0837 4.36206 10.2963L2.43668 11.6775L3.30982 13.1225L5.52624 12.23C5.85459 12.5558 6.21653 12.8285 6.61206 13.0481C7.00758 13.2677 7.43668 13.4342 7.89937 13.5475L8.19042 15.8Z",
|
|
@@ -2474,9 +1349,9 @@ var SettingsIcon = () => {
|
|
|
2474
1349
|
};
|
|
2475
1350
|
|
|
2476
1351
|
// src/components/icons/XSwapBadgeIcon.tsx
|
|
2477
|
-
var
|
|
1352
|
+
var import_jsx_runtime21 = require("react/jsx-runtime");
|
|
2478
1353
|
var XSwapBadgeIcon = () => {
|
|
2479
|
-
return /* @__PURE__ */ (0,
|
|
1354
|
+
return /* @__PURE__ */ (0, import_jsx_runtime21.jsxs)(
|
|
2480
1355
|
"svg",
|
|
2481
1356
|
{
|
|
2482
1357
|
version: "1.2",
|
|
@@ -2485,8 +1360,8 @@ var XSwapBadgeIcon = () => {
|
|
|
2485
1360
|
width: "80",
|
|
2486
1361
|
height: "27",
|
|
2487
1362
|
children: [
|
|
2488
|
-
/* @__PURE__ */ (0,
|
|
2489
|
-
/* @__PURE__ */ (0,
|
|
1363
|
+
/* @__PURE__ */ (0, import_jsx_runtime21.jsx)("title", { children: "xswap-badge" }),
|
|
1364
|
+
/* @__PURE__ */ (0, import_jsx_runtime21.jsx)("defs", { children: /* @__PURE__ */ (0, import_jsx_runtime21.jsx)(
|
|
2490
1365
|
"image",
|
|
2491
1366
|
{
|
|
2492
1367
|
width: "80",
|
|
@@ -2495,17 +1370,17 @@ var XSwapBadgeIcon = () => {
|
|
|
2495
1370
|
href: "data:image/png;base64,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"
|
|
2496
1371
|
}
|
|
2497
1372
|
) }),
|
|
2498
|
-
/* @__PURE__ */ (0,
|
|
2499
|
-
/* @__PURE__ */ (0,
|
|
1373
|
+
/* @__PURE__ */ (0, import_jsx_runtime21.jsx)("style", {}),
|
|
1374
|
+
/* @__PURE__ */ (0, import_jsx_runtime21.jsx)("use", { id: "Background", href: "#img1iVBORw0KGgoAAAANSUhEUgAAAF", x: "0", y: "1" })
|
|
2500
1375
|
]
|
|
2501
1376
|
}
|
|
2502
1377
|
);
|
|
2503
1378
|
};
|
|
2504
1379
|
|
|
2505
1380
|
// src/components/icons/ChainlinkCCIPIcon.tsx
|
|
2506
|
-
var
|
|
1381
|
+
var import_jsx_runtime22 = require("react/jsx-runtime");
|
|
2507
1382
|
var ChainlinkCCIPIcon = () => {
|
|
2508
|
-
return /* @__PURE__ */ (0,
|
|
1383
|
+
return /* @__PURE__ */ (0, import_jsx_runtime22.jsxs)(
|
|
2509
1384
|
"svg",
|
|
2510
1385
|
{
|
|
2511
1386
|
version: "1.2",
|
|
@@ -2514,8 +1389,8 @@ var ChainlinkCCIPIcon = () => {
|
|
|
2514
1389
|
width: "67",
|
|
2515
1390
|
height: "27",
|
|
2516
1391
|
children: [
|
|
2517
|
-
/* @__PURE__ */ (0,
|
|
2518
|
-
/* @__PURE__ */ (0,
|
|
1392
|
+
/* @__PURE__ */ (0, import_jsx_runtime22.jsx)("title", { children: "chainlink-CCIP" }),
|
|
1393
|
+
/* @__PURE__ */ (0, import_jsx_runtime22.jsx)("defs", { children: /* @__PURE__ */ (0, import_jsx_runtime22.jsx)(
|
|
2519
1394
|
"image",
|
|
2520
1395
|
{
|
|
2521
1396
|
width: "67",
|
|
@@ -2524,20 +1399,42 @@ var ChainlinkCCIPIcon = () => {
|
|
|
2524
1399
|
href: "data:image/png;base64,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"
|
|
2525
1400
|
}
|
|
2526
1401
|
) }),
|
|
2527
|
-
/* @__PURE__ */ (0,
|
|
2528
|
-
/* @__PURE__ */ (0,
|
|
1402
|
+
/* @__PURE__ */ (0, import_jsx_runtime22.jsx)("style", {}),
|
|
1403
|
+
/* @__PURE__ */ (0, import_jsx_runtime22.jsx)("use", { id: "Background", href: "#imgiVBORw0KGgoAAA", x: "0", y: "0" })
|
|
2529
1404
|
]
|
|
2530
1405
|
}
|
|
2531
1406
|
);
|
|
2532
1407
|
};
|
|
2533
1408
|
|
|
1409
|
+
// src/components/icons/XSwapLogo.tsx
|
|
1410
|
+
var import_jsx_runtime23 = require("react/jsx-runtime");
|
|
1411
|
+
var XSwapLogo = () => {
|
|
1412
|
+
return /* @__PURE__ */ (0, import_jsx_runtime23.jsx)(
|
|
1413
|
+
"svg",
|
|
1414
|
+
{
|
|
1415
|
+
version: "1.1",
|
|
1416
|
+
id: "Layer_1",
|
|
1417
|
+
xmlns: "http://www.w3.org/2000/svg",
|
|
1418
|
+
x: "0px",
|
|
1419
|
+
y: "0px",
|
|
1420
|
+
viewBox: "0 0 50 50",
|
|
1421
|
+
enableBackground: "new 0 0 50 50",
|
|
1422
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime23.jsx)(
|
|
1423
|
+
"image",
|
|
1424
|
+
{
|
|
1425
|
+
id: "image0",
|
|
1426
|
+
x: "0",
|
|
1427
|
+
y: "0",
|
|
1428
|
+
href: "data:image/png;base64,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"
|
|
1429
|
+
}
|
|
1430
|
+
)
|
|
1431
|
+
}
|
|
1432
|
+
);
|
|
1433
|
+
};
|
|
1434
|
+
|
|
2534
1435
|
// src/components/TxConfigForm/HistoryCard.tsx
|
|
2535
|
-
var
|
|
1436
|
+
var import_jsx_runtime24 = require("react/jsx-runtime");
|
|
2536
1437
|
var HistoryCard = ({ transaction, supportedChains }) => {
|
|
2537
|
-
const getDate = (0, import_react2.useCallback)((blockTimestamp) => {
|
|
2538
|
-
const date2 = new Date(blockTimestamp * 1e3);
|
|
2539
|
-
return (0, import_date_fns.format)(date2, "d MMM yyyy HH:mm:ss");
|
|
2540
|
-
}, []);
|
|
2541
1438
|
const date = getDate(transaction.timestamp);
|
|
2542
1439
|
const supportedTokens = (0, import_react2.useMemo)(() => {
|
|
2543
1440
|
const customTokens = JSON.parse(
|
|
@@ -2582,23 +1479,14 @@ var HistoryCard = ({ transaction, supportedChains }) => {
|
|
|
2582
1479
|
const targetChainData = supportedChains.find(
|
|
2583
1480
|
(chain) => chain.chainId === transaction.targetChainId
|
|
2584
1481
|
);
|
|
2585
|
-
return /* @__PURE__ */ (0,
|
|
2586
|
-
/* @__PURE__ */ (0,
|
|
2587
|
-
/* @__PURE__ */ (0,
|
|
2588
|
-
/* @__PURE__ */ (0,
|
|
2589
|
-
transaction.status === "IN_PROGRESS" && /* @__PURE__ */ (0,
|
|
2590
|
-
|
|
2591
|
-
|
|
2592
|
-
|
|
2593
|
-
transaction.status === "DONE" && /* @__PURE__ */ (0, import_jsx_runtime22.jsxs)("div", { className: "flex items-center", children: [
|
|
2594
|
-
/* @__PURE__ */ (0, import_jsx_runtime22.jsx)("div", { className: "w-3.5 h-3.5 mr-1 text-[rgb(100,200,100)]", children: /* @__PURE__ */ (0, import_jsx_runtime22.jsx)(CheckIcon, {}) }),
|
|
2595
|
-
/* @__PURE__ */ (0, import_jsx_runtime22.jsx)("div", { className: "text-xs text-[rgb(100,200,100)]", children: "Done" })
|
|
2596
|
-
] }),
|
|
2597
|
-
transaction.status === "REVERTED" && /* @__PURE__ */ (0, import_jsx_runtime22.jsxs)("div", { className: "flex items-center", children: [
|
|
2598
|
-
/* @__PURE__ */ (0, import_jsx_runtime22.jsx)("div", { className: "w-4 h-4 mr-1 text-[rgb(255,100,100)]", children: /* @__PURE__ */ (0, import_jsx_runtime22.jsx)(XMarkIcon, {}) }),
|
|
2599
|
-
/* @__PURE__ */ (0, import_jsx_runtime22.jsx)("div", { className: "text-xs text-[rgb(255,100,100)]", children: "Reverted" })
|
|
2600
|
-
] }),
|
|
2601
|
-
/* @__PURE__ */ (0, import_jsx_runtime22.jsx)(
|
|
1482
|
+
return /* @__PURE__ */ (0, import_jsx_runtime24.jsxs)("div", { className: "flex flex-col globalBorder rounded-xl bg-[rgb(15,15,15)] text-white text-xs sm:text-sm p-4 gap-3 mb-2", children: [
|
|
1483
|
+
/* @__PURE__ */ (0, import_jsx_runtime24.jsxs)("div", { className: "flex w-full items-center justify-between", children: [
|
|
1484
|
+
/* @__PURE__ */ (0, import_jsx_runtime24.jsx)("div", { className: "text-sm sm:text-base", children: date }),
|
|
1485
|
+
/* @__PURE__ */ (0, import_jsx_runtime24.jsxs)("div", { className: "flex items-center", children: [
|
|
1486
|
+
transaction.status === "IN_PROGRESS" && /* @__PURE__ */ (0, import_jsx_runtime24.jsx)("div", { className: "flex items-center", children: /* @__PURE__ */ (0, import_jsx_runtime24.jsx)("div", { className: "text-[rgb(250,200,100)]", children: "In progress" }) }),
|
|
1487
|
+
transaction.status === "DONE" && /* @__PURE__ */ (0, import_jsx_runtime24.jsx)("div", { className: "flex items-center", children: /* @__PURE__ */ (0, import_jsx_runtime24.jsx)("div", { className: "text-[rgb(100,200,100)]", children: "Done" }) }),
|
|
1488
|
+
transaction.status === "REVERTED" && /* @__PURE__ */ (0, import_jsx_runtime24.jsx)("div", { className: "flex items-center", children: /* @__PURE__ */ (0, import_jsx_runtime24.jsx)("div", { className: "text-[rgb(255,100,100)]", children: "Reverted" }) }),
|
|
1489
|
+
/* @__PURE__ */ (0, import_jsx_runtime24.jsx)(
|
|
2602
1490
|
"a",
|
|
2603
1491
|
{
|
|
2604
1492
|
href: `${supportedChains.find(
|
|
@@ -2608,15 +1496,15 @@ var HistoryCard = ({ transaction, supportedChains }) => {
|
|
|
2608
1496
|
rel: "noreferrer",
|
|
2609
1497
|
className: "ml-2 no-underline",
|
|
2610
1498
|
"aria-label": "Show the transaction in the chain explorer",
|
|
2611
|
-
children: /* @__PURE__ */ (0,
|
|
1499
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime24.jsx)("div", { className: "w-3.5 h-3.5", children: /* @__PURE__ */ (0, import_jsx_runtime24.jsx)(ArrowUpRightIcon, {}) })
|
|
2612
1500
|
}
|
|
2613
1501
|
)
|
|
2614
1502
|
] })
|
|
2615
1503
|
] }),
|
|
2616
|
-
/* @__PURE__ */ (0,
|
|
2617
|
-
/* @__PURE__ */ (0,
|
|
2618
|
-
/* @__PURE__ */ (0,
|
|
2619
|
-
/* @__PURE__ */ (0,
|
|
1504
|
+
/* @__PURE__ */ (0, import_jsx_runtime24.jsxs)("div", { className: "flex justify-between flex-wrap gap-2", children: [
|
|
1505
|
+
/* @__PURE__ */ (0, import_jsx_runtime24.jsxs)("div", { className: "flex items-center", children: [
|
|
1506
|
+
/* @__PURE__ */ (0, import_jsx_runtime24.jsxs)("div", { className: "flex items-center", children: [
|
|
1507
|
+
/* @__PURE__ */ (0, import_jsx_runtime24.jsx)(
|
|
2620
1508
|
"img",
|
|
2621
1509
|
{
|
|
2622
1510
|
src: sourceChainData?.image,
|
|
@@ -2624,11 +1512,11 @@ var HistoryCard = ({ transaction, supportedChains }) => {
|
|
|
2624
1512
|
className: "w-5 h-5 mr-1"
|
|
2625
1513
|
}
|
|
2626
1514
|
),
|
|
2627
|
-
/* @__PURE__ */ (0,
|
|
1515
|
+
/* @__PURE__ */ (0, import_jsx_runtime24.jsx)("div", { children: sourceChainData?.displayName })
|
|
2628
1516
|
] }),
|
|
2629
|
-
/* @__PURE__ */ (0,
|
|
2630
|
-
/* @__PURE__ */ (0,
|
|
2631
|
-
/* @__PURE__ */ (0,
|
|
1517
|
+
/* @__PURE__ */ (0, import_jsx_runtime24.jsx)("div", { className: "w-3.5 h-3.5 my-0 mx-1.5", children: /* @__PURE__ */ (0, import_jsx_runtime24.jsx)(ArrowRightIcon, {}) }),
|
|
1518
|
+
/* @__PURE__ */ (0, import_jsx_runtime24.jsxs)("div", { className: "flex items-center", children: [
|
|
1519
|
+
/* @__PURE__ */ (0, import_jsx_runtime24.jsx)(
|
|
2632
1520
|
"img",
|
|
2633
1521
|
{
|
|
2634
1522
|
src: targetChainData?.image,
|
|
@@ -2636,35 +1524,35 @@ var HistoryCard = ({ transaction, supportedChains }) => {
|
|
|
2636
1524
|
className: "w-5 h-5 mr-1"
|
|
2637
1525
|
}
|
|
2638
1526
|
),
|
|
2639
|
-
/* @__PURE__ */ (0,
|
|
1527
|
+
/* @__PURE__ */ (0, import_jsx_runtime24.jsx)("div", { children: targetChainData?.displayName })
|
|
2640
1528
|
] })
|
|
2641
1529
|
] }),
|
|
2642
|
-
/* @__PURE__ */ (0,
|
|
2643
|
-
/* @__PURE__ */ (0,
|
|
1530
|
+
/* @__PURE__ */ (0, import_jsx_runtime24.jsx)("div", { className: "flex items-center mb-2 last:mb-0", children: /* @__PURE__ */ (0, import_jsx_runtime24.jsxs)("div", { className: "flex items-center flex-wrap", children: [
|
|
1531
|
+
/* @__PURE__ */ (0, import_jsx_runtime24.jsxs)("div", { className: "flex items-center", children: [
|
|
2644
1532
|
Number(transferredAmount) < MINIMUM_DISPLAYED_TOKEN_AMOUNT ? `<${MINIMUM_DISPLAYED_TOKEN_AMOUNT}` : transferredAmount,
|
|
2645
|
-
/* @__PURE__ */ (0,
|
|
2646
|
-
tokenData?.image ? /* @__PURE__ */ (0,
|
|
1533
|
+
/* @__PURE__ */ (0, import_jsx_runtime24.jsx)("div", { className: "ml-1", children: tokenData?.symbol }),
|
|
1534
|
+
tokenData?.image ? /* @__PURE__ */ (0, import_jsx_runtime24.jsx)(
|
|
2647
1535
|
"img",
|
|
2648
1536
|
{
|
|
2649
1537
|
src: tokenData?.image,
|
|
2650
1538
|
alt: tokenData?.name || "",
|
|
2651
1539
|
className: "w-5 h-5 ml-1"
|
|
2652
1540
|
}
|
|
2653
|
-
) : /* @__PURE__ */ (0,
|
|
1541
|
+
) : /* @__PURE__ */ (0, import_jsx_runtime24.jsx)("div", { className: "flex items-center justify-center w-5 h-5 text-[10px] ml-1 rounded-full bg-[#272e40] text-[#e0e7fa]", children: tokenData?.symbol.substring(0, 1) })
|
|
2654
1542
|
] }),
|
|
2655
|
-
transaction.tokenOutAddress && /* @__PURE__ */ (0,
|
|
2656
|
-
/* @__PURE__ */ (0,
|
|
2657
|
-
/* @__PURE__ */ (0,
|
|
1543
|
+
transaction.tokenOutAddress && /* @__PURE__ */ (0, import_jsx_runtime24.jsxs)(import_jsx_runtime24.Fragment, { children: [
|
|
1544
|
+
/* @__PURE__ */ (0, import_jsx_runtime24.jsx)("div", { className: "w-3.5 h-3.5 my-0 mx-1.5", children: /* @__PURE__ */ (0, import_jsx_runtime24.jsx)(ArrowRightIcon, {}) }),
|
|
1545
|
+
/* @__PURE__ */ (0, import_jsx_runtime24.jsxs)("div", { className: "flex items-center", children: [
|
|
2658
1546
|
Number(receivedAmount) < 1e-4 ? "<0.0001" : receivedAmount,
|
|
2659
|
-
/* @__PURE__ */ (0,
|
|
2660
|
-
tokenOutData?.image ? /* @__PURE__ */ (0,
|
|
1547
|
+
/* @__PURE__ */ (0, import_jsx_runtime24.jsx)("div", { className: "ml-1", children: tokenOutData?.symbol }),
|
|
1548
|
+
tokenOutData?.image ? /* @__PURE__ */ (0, import_jsx_runtime24.jsx)(
|
|
2661
1549
|
"img",
|
|
2662
1550
|
{
|
|
2663
1551
|
src: tokenOutData?.image,
|
|
2664
1552
|
alt: tokenOutData?.name || "",
|
|
2665
1553
|
className: "w-5 h-5 ml-1"
|
|
2666
1554
|
}
|
|
2667
|
-
) : /* @__PURE__ */ (0,
|
|
1555
|
+
) : /* @__PURE__ */ (0, import_jsx_runtime24.jsx)("div", { className: "flex items-center justify-center w-5 h-5 text-[10px] ml-1 rounded-full bg-[#272e40] text-[#e0e7fa]", children: tokenData?.symbol.substring(0, 1) })
|
|
2668
1556
|
] })
|
|
2669
1557
|
] })
|
|
2670
1558
|
] }) })
|
|
@@ -2673,7 +1561,7 @@ var HistoryCard = ({ transaction, supportedChains }) => {
|
|
|
2673
1561
|
};
|
|
2674
1562
|
|
|
2675
1563
|
// src/components/TxConfigForm/History.tsx
|
|
2676
|
-
var
|
|
1564
|
+
var import_jsx_runtime25 = require("react/jsx-runtime");
|
|
2677
1565
|
var History = ({ signer, supportedChains }) => {
|
|
2678
1566
|
const [fetchedHistory, setFetchedHistory] = (0, import_react3.useState)();
|
|
2679
1567
|
const [historyLoadedOnce, setHistoryLoadedOnce] = (0, import_react3.useState)(false);
|
|
@@ -2727,11 +1615,11 @@ var History = ({ signer, supportedChains }) => {
|
|
|
2727
1615
|
return () => clearInterval(timer);
|
|
2728
1616
|
}, [signer, fetchHistory, getHistory, historyLoadedOnce]);
|
|
2729
1617
|
if (!signer)
|
|
2730
|
-
return /* @__PURE__ */ (0,
|
|
2731
|
-
return /* @__PURE__ */ (0,
|
|
2732
|
-
fetchedHistory?.length === 0 && historyLoadedOnce && /* @__PURE__ */ (0,
|
|
2733
|
-
!fetchedHistory && !historyLoadedOnce && /* @__PURE__ */ (0,
|
|
2734
|
-
fetchedHistory?.map((transaction, index) => /* @__PURE__ */ (0,
|
|
1618
|
+
return /* @__PURE__ */ (0, import_jsx_runtime25.jsx)("div", { className: "flex items-center justify-center w-full h-[30vh]", children: "Connect a wallet to browse history" });
|
|
1619
|
+
return /* @__PURE__ */ (0, import_jsx_runtime25.jsx)("div", { className: "flex items-center justify-center w-full", children: /* @__PURE__ */ (0, import_jsx_runtime25.jsxs)("div", { className: "w-full h-96 overflow-scroll overflow-x-hidden", children: [
|
|
1620
|
+
fetchedHistory?.length === 0 && historyLoadedOnce && /* @__PURE__ */ (0, import_jsx_runtime25.jsx)("div", { className: "w-full text-center py-4 px-0 text-[rgb(158,158,158)]", children: "Your history is empty..." }),
|
|
1621
|
+
!fetchedHistory && !historyLoadedOnce && /* @__PURE__ */ (0, import_jsx_runtime25.jsx)("div", { className: "flex w-full h-full items-center justify-center", children: /* @__PURE__ */ (0, import_jsx_runtime25.jsx)(CircularProgressIcon, {}) }),
|
|
1622
|
+
fetchedHistory?.map((transaction, index) => /* @__PURE__ */ (0, import_jsx_runtime25.jsx)(
|
|
2735
1623
|
HistoryCard,
|
|
2736
1624
|
{
|
|
2737
1625
|
transaction,
|
|
@@ -2743,30 +1631,30 @@ var History = ({ signer, supportedChains }) => {
|
|
|
2743
1631
|
};
|
|
2744
1632
|
|
|
2745
1633
|
// src/components/TxConfigForm/TopBar.tsx
|
|
2746
|
-
var
|
|
1634
|
+
var import_jsx_runtime26 = require("react/jsx-runtime");
|
|
2747
1635
|
var TopBar = ({
|
|
2748
1636
|
signer,
|
|
2749
1637
|
setSettingsShown,
|
|
2750
1638
|
setHistoryTabShown,
|
|
2751
1639
|
historyTabShown
|
|
2752
1640
|
}) => {
|
|
2753
|
-
return /* @__PURE__ */ (0,
|
|
2754
|
-
/* @__PURE__ */ (0,
|
|
2755
|
-
/* @__PURE__ */ (0,
|
|
2756
|
-
!historyTabShown && /* @__PURE__ */ (0,
|
|
1641
|
+
return /* @__PURE__ */ (0, import_jsx_runtime26.jsxs)("div", { className: "flex w-full justify-between items-center mx-auto sm:pl-4 pr-8 pt-2", children: [
|
|
1642
|
+
/* @__PURE__ */ (0, import_jsx_runtime26.jsx)("div", { className: "rounded-lg text-[rgba(255,255,255,0.6)] text-xs sm:text-base whitespace-nowrap", children: signer ? `Connected wallet: ${shortAddress(signer)}` : `Wallet disconnected` }),
|
|
1643
|
+
/* @__PURE__ */ (0, import_jsx_runtime26.jsxs)("div", { className: "flex gap-2", children: [
|
|
1644
|
+
!historyTabShown && /* @__PURE__ */ (0, import_jsx_runtime26.jsx)(
|
|
2757
1645
|
"div",
|
|
2758
1646
|
{
|
|
2759
1647
|
onClick: () => setSettingsShown(true),
|
|
2760
1648
|
className: "flex items-center text-xs gap-1 cursor-pointer",
|
|
2761
|
-
children: /* @__PURE__ */ (0,
|
|
1649
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime26.jsx)("div", { className: "w-7 h-7 rounded-full bg-gradient-to-r from-x_blue_light to-x_blue_dark flex items-center justify-center", children: /* @__PURE__ */ (0, import_jsx_runtime26.jsx)(SettingsIcon, {}) })
|
|
2762
1650
|
}
|
|
2763
1651
|
),
|
|
2764
|
-
/* @__PURE__ */ (0,
|
|
1652
|
+
/* @__PURE__ */ (0, import_jsx_runtime26.jsx)(
|
|
2765
1653
|
"div",
|
|
2766
1654
|
{
|
|
2767
1655
|
onClick: () => setHistoryTabShown((x) => !x),
|
|
2768
1656
|
className: "flex items-center text-sm gap-1 cursor-pointer",
|
|
2769
|
-
children: !historyTabShown ? /* @__PURE__ */ (0,
|
|
1657
|
+
children: !historyTabShown ? /* @__PURE__ */ (0, import_jsx_runtime26.jsx)(import_jsx_runtime26.Fragment, { children: /* @__PURE__ */ (0, import_jsx_runtime26.jsx)("div", { className: "w-7 h-7 rounded-full bg-gradient-to-r from-x_blue_light to-x_blue_dark flex items-center justify-center", children: /* @__PURE__ */ (0, import_jsx_runtime26.jsx)(HistoryIcon, {}) }) }) : /* @__PURE__ */ (0, import_jsx_runtime26.jsx)("div", { children: "Back" })
|
|
2770
1658
|
}
|
|
2771
1659
|
)
|
|
2772
1660
|
] })
|
|
@@ -2775,7 +1663,7 @@ var TopBar = ({
|
|
|
2775
1663
|
|
|
2776
1664
|
// src/components/TxConfigForm/Settings.tsx
|
|
2777
1665
|
var import_react4 = require("react");
|
|
2778
|
-
var
|
|
1666
|
+
var import_jsx_runtime27 = require("react/jsx-runtime");
|
|
2779
1667
|
var Settings = ({
|
|
2780
1668
|
setSlippage,
|
|
2781
1669
|
setSettingsShown,
|
|
@@ -2792,22 +1680,22 @@ var Settings = ({
|
|
|
2792
1680
|
);
|
|
2793
1681
|
}
|
|
2794
1682
|
}, [slippageActivePresetIndex, usingSlippageInput]);
|
|
2795
|
-
return /* @__PURE__ */ (0,
|
|
2796
|
-
/* @__PURE__ */ (0,
|
|
2797
|
-
/* @__PURE__ */ (0,
|
|
2798
|
-
/* @__PURE__ */ (0,
|
|
1683
|
+
return /* @__PURE__ */ (0, import_jsx_runtime27.jsx)("div", { className: "absolute w-[310px] right-0 top-[46px] z-10 bg-black border border-solid border-[rgba(54,129,198,1)] p-4 rounded-xl", children: /* @__PURE__ */ (0, import_jsx_runtime27.jsxs)("div", { className: "flex flex-col gap-4 justify-between", children: [
|
|
1684
|
+
/* @__PURE__ */ (0, import_jsx_runtime27.jsxs)("div", { className: "flex justify-between", children: [
|
|
1685
|
+
/* @__PURE__ */ (0, import_jsx_runtime27.jsx)("div", { className: "text-base", children: "Settings" }),
|
|
1686
|
+
/* @__PURE__ */ (0, import_jsx_runtime27.jsx)(
|
|
2799
1687
|
"div",
|
|
2800
1688
|
{
|
|
2801
1689
|
className: "cursor-pointer",
|
|
2802
1690
|
onClick: () => setSettingsShown(false),
|
|
2803
|
-
children: /* @__PURE__ */ (0,
|
|
1691
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime27.jsx)(CloseIcon, {})
|
|
2804
1692
|
}
|
|
2805
1693
|
)
|
|
2806
1694
|
] }),
|
|
2807
|
-
/* @__PURE__ */ (0,
|
|
2808
|
-
/* @__PURE__ */ (0,
|
|
2809
|
-
/* @__PURE__ */ (0,
|
|
2810
|
-
/* @__PURE__ */ (0,
|
|
1695
|
+
/* @__PURE__ */ (0, import_jsx_runtime27.jsxs)("div", { children: [
|
|
1696
|
+
/* @__PURE__ */ (0, import_jsx_runtime27.jsxs)("div", { className: "flex gap-2 items-center", children: [
|
|
1697
|
+
/* @__PURE__ */ (0, import_jsx_runtime27.jsx)("div", { className: "text-sm text-[rgba(255,255,255,0.6)]", children: "Express delivery" }),
|
|
1698
|
+
/* @__PURE__ */ (0, import_jsx_runtime27.jsx)("div", { children: /* @__PURE__ */ (0, import_jsx_runtime27.jsxs)(
|
|
2811
1699
|
"span",
|
|
2812
1700
|
{
|
|
2813
1701
|
className: "inline-flex w-14 h-9 p-3 relative align-middle box-border overflow-hidden cursor-pointer",
|
|
@@ -2815,8 +1703,8 @@ var Settings = ({
|
|
|
2815
1703
|
setExpressChecked((x) => !x);
|
|
2816
1704
|
},
|
|
2817
1705
|
children: [
|
|
2818
|
-
/* @__PURE__ */ (0,
|
|
2819
|
-
/* @__PURE__ */ (0,
|
|
1706
|
+
/* @__PURE__ */ (0, import_jsx_runtime27.jsx)("span", { className: "h-full, w-full rounded-lg bg-[rgba(255,255,255,0.3)]" }),
|
|
1707
|
+
/* @__PURE__ */ (0, import_jsx_runtime27.jsx)(
|
|
2820
1708
|
"span",
|
|
2821
1709
|
{
|
|
2822
1710
|
className: `transition-all w-5 h-5 rounded-full absolute translate-y-[-4px]
|
|
@@ -2827,15 +1715,15 @@ var Settings = ({
|
|
|
2827
1715
|
}
|
|
2828
1716
|
) })
|
|
2829
1717
|
] }),
|
|
2830
|
-
/* @__PURE__ */ (0,
|
|
2831
|
-
/* @__PURE__ */ (0,
|
|
2832
|
-
/* @__PURE__ */ (0,
|
|
1718
|
+
/* @__PURE__ */ (0, import_jsx_runtime27.jsxs)("div", { className: "flex gap-4", children: [
|
|
1719
|
+
/* @__PURE__ */ (0, import_jsx_runtime27.jsx)("div", { className: "min-w-[26px] min-h-[26px] text-[#ffa726]", children: /* @__PURE__ */ (0, import_jsx_runtime27.jsx)(InfoIcon, {}) }),
|
|
1720
|
+
/* @__PURE__ */ (0, import_jsx_runtime27.jsx)("div", { className: "text-xs text-left", children: "Express delivery is a special feature of XSwap that reduces transaction time across chains to around 30 seconds. It is currently available for swaps below a value of $ 1000 USD." })
|
|
2833
1721
|
] })
|
|
2834
1722
|
] }),
|
|
2835
|
-
/* @__PURE__ */ (0,
|
|
2836
|
-
/* @__PURE__ */ (0,
|
|
2837
|
-
/* @__PURE__ */ (0,
|
|
2838
|
-
/* @__PURE__ */ (0,
|
|
1723
|
+
/* @__PURE__ */ (0, import_jsx_runtime27.jsxs)("div", { className: "flex flex-col gap-2 ", children: [
|
|
1724
|
+
/* @__PURE__ */ (0, import_jsx_runtime27.jsx)("div", { className: " text-[rgba(255,255,255,0.6)] text-sm", children: "Slippage" }),
|
|
1725
|
+
/* @__PURE__ */ (0, import_jsx_runtime27.jsxs)("div", { className: "flex gap-2", children: [
|
|
1726
|
+
/* @__PURE__ */ (0, import_jsx_runtime27.jsx)("div", { className: "flex items-center bg-[rgba(15,15,15,1)] p-1 globalBorder rounded-xl", children: SLIPPAGE_PRESETS.map((preset, index) => /* @__PURE__ */ (0, import_jsx_runtime27.jsx)(
|
|
2839
1727
|
"div",
|
|
2840
1728
|
{
|
|
2841
1729
|
className: `transition-all cursor-pointer block rounded-lg p-2 border-none text-sm leading-[10px] ${index === slippageActivePresetIndex && !usingSlippageInput ? "text-white" : "text-[rgba(255,255,255,0.2)]"} ${index === slippageActivePresetIndex && !usingSlippageInput ? "bg-gradient-to-r from-[#3681c6] to-[#2b4a9d]" : ""}`,
|
|
@@ -2847,8 +1735,8 @@ var Settings = ({
|
|
|
2847
1735
|
},
|
|
2848
1736
|
index
|
|
2849
1737
|
)) }),
|
|
2850
|
-
/* @__PURE__ */ (0,
|
|
2851
|
-
/* @__PURE__ */ (0,
|
|
1738
|
+
/* @__PURE__ */ (0, import_jsx_runtime27.jsxs)("div", { className: "bg-[rgba(39,39,39,1)] p-2 border border-solid border-[rgba(82,82,82,1)] rounded-xl text-white flex items-center", children: [
|
|
1739
|
+
/* @__PURE__ */ (0, import_jsx_runtime27.jsx)(
|
|
2852
1740
|
"input",
|
|
2853
1741
|
{
|
|
2854
1742
|
className: "text-white border-none bg-[rgba(39,39,39,1)] w-10 placeholder:text-[rgba(255,255,255,0.2)] focus:outline-none text-sm leading-none",
|
|
@@ -2867,16 +1755,16 @@ var Settings = ({
|
|
|
2867
1755
|
}
|
|
2868
1756
|
}
|
|
2869
1757
|
),
|
|
2870
|
-
/* @__PURE__ */ (0,
|
|
1758
|
+
/* @__PURE__ */ (0, import_jsx_runtime27.jsx)(PercentageIcon, {})
|
|
2871
1759
|
] })
|
|
2872
1760
|
] }),
|
|
2873
|
-
/* @__PURE__ */ (0,
|
|
2874
|
-
/* @__PURE__ */ (0,
|
|
2875
|
-
/* @__PURE__ */ (0,
|
|
1761
|
+
/* @__PURE__ */ (0, import_jsx_runtime27.jsxs)("div", { className: "flex gap-4", children: [
|
|
1762
|
+
/* @__PURE__ */ (0, import_jsx_runtime27.jsx)("div", { className: "min-w-[26px] min-h-[26px] text-[#ffa726]", children: /* @__PURE__ */ (0, import_jsx_runtime27.jsx)(InfoIcon, {}) }),
|
|
1763
|
+
/* @__PURE__ */ (0, import_jsx_runtime27.jsxs)("div", { className: "text-xs text-left", children: [
|
|
2876
1764
|
"Slippage is the price variation you are willing to accept in the event that the price of the trade changes while it is processing.",
|
|
2877
|
-
/* @__PURE__ */ (0,
|
|
1765
|
+
/* @__PURE__ */ (0, import_jsx_runtime27.jsx)("br", {}),
|
|
2878
1766
|
" ",
|
|
2879
|
-
/* @__PURE__ */ (0,
|
|
1767
|
+
/* @__PURE__ */ (0, import_jsx_runtime27.jsx)("br", {}),
|
|
2880
1768
|
"If the trade fails due to too-low slippage, you will receive USDC on the destination chain."
|
|
2881
1769
|
] })
|
|
2882
1770
|
] })
|
|
@@ -2885,7 +1773,7 @@ var Settings = ({
|
|
|
2885
1773
|
};
|
|
2886
1774
|
|
|
2887
1775
|
// src/components/TxConfigForm/FeesDetails.tsx
|
|
2888
|
-
var
|
|
1776
|
+
var import_jsx_runtime28 = require("react/jsx-runtime");
|
|
2889
1777
|
var FeesDetails = ({
|
|
2890
1778
|
isGettingRoute,
|
|
2891
1779
|
route,
|
|
@@ -2896,12 +1784,12 @@ var FeesDetails = ({
|
|
|
2896
1784
|
feesDetailsShown,
|
|
2897
1785
|
setFeesDetailsShown
|
|
2898
1786
|
}) => {
|
|
2899
|
-
return /* @__PURE__ */ (0,
|
|
2900
|
-
/* @__PURE__ */ (0,
|
|
2901
|
-
/* @__PURE__ */ (0,
|
|
2902
|
-
/* @__PURE__ */ (0,
|
|
2903
|
-
/* @__PURE__ */ (0,
|
|
2904
|
-
isGettingRoute ? /* @__PURE__ */ (0,
|
|
1787
|
+
return /* @__PURE__ */ (0, import_jsx_runtime28.jsxs)("div", { className: "flex flex-col gap-3 globalBorder rounded-lg bg-[rgba(15,15,15,1)] p-4 mb-1", children: [
|
|
1788
|
+
/* @__PURE__ */ (0, import_jsx_runtime28.jsxs)("div", { className: "flex w-full items-center justify-between text-xs sm:text-sm ", children: [
|
|
1789
|
+
/* @__PURE__ */ (0, import_jsx_runtime28.jsxs)("div", { className: "flex items-center gap-1 font-medium text-white opacity-60", children: [
|
|
1790
|
+
/* @__PURE__ */ (0, import_jsx_runtime28.jsx)(CoinsIcon, {}),
|
|
1791
|
+
/* @__PURE__ */ (0, import_jsx_runtime28.jsx)("div", { className: "mr-1", children: "Fees:" }),
|
|
1792
|
+
isGettingRoute ? /* @__PURE__ */ (0, import_jsx_runtime28.jsx)("div", { className: "bg-current rounded animate-pulse w-20 h-4" }) : ` ${weiToHumanReadable({
|
|
2905
1793
|
amount: safeBigNumberFrom(
|
|
2906
1794
|
route?.xSwapFees.xSwapFee.nativeFee || "0"
|
|
2907
1795
|
).add(safeBigNumberFrom(route?.xSwapFees.ccipFee || "0")).add(
|
|
@@ -2911,30 +1799,30 @@ var FeesDetails = ({
|
|
|
2911
1799
|
precisionFractionalPlaces: 5
|
|
2912
1800
|
})} ${paymentToken?.symbol}`
|
|
2913
1801
|
] }),
|
|
2914
|
-
/* @__PURE__ */ (0,
|
|
2915
|
-
/* @__PURE__ */ (0,
|
|
1802
|
+
/* @__PURE__ */ (0, import_jsx_runtime28.jsxs)("div", { className: "flex gap-1 items-center", children: [
|
|
1803
|
+
/* @__PURE__ */ (0, import_jsx_runtime28.jsxs)(
|
|
2916
1804
|
"div",
|
|
2917
1805
|
{
|
|
2918
|
-
className: `flex gap-1
|
|
1806
|
+
className: `flex gap-1 items-center font-medium ${expressChecked ? "text-x_green" : "text-white opacity-60"}`,
|
|
2919
1807
|
children: [
|
|
2920
|
-
/* @__PURE__ */ (0,
|
|
1808
|
+
/* @__PURE__ */ (0, import_jsx_runtime28.jsx)(TimerIcon, {}),
|
|
2921
1809
|
expressChecked ? "Fast ~ 30sec " : "Normal ~ 30min"
|
|
2922
1810
|
]
|
|
2923
1811
|
}
|
|
2924
1812
|
),
|
|
2925
|
-
/* @__PURE__ */ (0,
|
|
1813
|
+
/* @__PURE__ */ (0, import_jsx_runtime28.jsx)(
|
|
2926
1814
|
"div",
|
|
2927
1815
|
{
|
|
2928
1816
|
onClick: () => setFeesDetailsShown((x) => !x),
|
|
2929
|
-
className: "
|
|
2930
|
-
children: feesDetailsShown ? /* @__PURE__ */ (0,
|
|
1817
|
+
className: "font-medium text-white opacity-60 cursor-pointer flex items-center w-[15px] h-[9px]",
|
|
1818
|
+
children: feesDetailsShown ? /* @__PURE__ */ (0, import_jsx_runtime28.jsx)(ChevronUpIcon, {}) : /* @__PURE__ */ (0, import_jsx_runtime28.jsx)(ChevronDownIcon, {})
|
|
2931
1819
|
}
|
|
2932
1820
|
)
|
|
2933
1821
|
] })
|
|
2934
1822
|
] }),
|
|
2935
|
-
feesDetailsShown && /* @__PURE__ */ (0,
|
|
2936
|
-
/* @__PURE__ */ (0,
|
|
2937
|
-
/* @__PURE__ */ (0,
|
|
1823
|
+
feesDetailsShown && /* @__PURE__ */ (0, import_jsx_runtime28.jsxs)("div", { className: "flex w-full items-center justify-between ", children: [
|
|
1824
|
+
/* @__PURE__ */ (0, import_jsx_runtime28.jsxs)("div", { className: "flex flex-col text-[10px] gap-1", children: [
|
|
1825
|
+
/* @__PURE__ */ (0, import_jsx_runtime28.jsxs)("div", { className: "font-medium text-white opacity-60", children: [
|
|
2938
1826
|
"CCIP Fee:",
|
|
2939
1827
|
` ${weiToHumanReadable({
|
|
2940
1828
|
amount: route?.xSwapFees.ccipFee || "0",
|
|
@@ -2942,7 +1830,7 @@ var FeesDetails = ({
|
|
|
2942
1830
|
precisionFractionalPlaces: 5
|
|
2943
1831
|
})} ${paymentToken?.symbol}`
|
|
2944
1832
|
] }),
|
|
2945
|
-
/* @__PURE__ */ (0,
|
|
1833
|
+
/* @__PURE__ */ (0, import_jsx_runtime28.jsxs)("div", { className: "font-medium text-white opacity-60", children: [
|
|
2946
1834
|
"Native Fee:",
|
|
2947
1835
|
` ${weiToHumanReadable({
|
|
2948
1836
|
amount: route?.xSwapFees.xSwapFee.nativeFee || "0",
|
|
@@ -2951,12 +1839,12 @@ var FeesDetails = ({
|
|
|
2951
1839
|
})} ${paymentToken?.symbol}`
|
|
2952
1840
|
] })
|
|
2953
1841
|
] }),
|
|
2954
|
-
/* @__PURE__ */ (0,
|
|
2955
|
-
/* @__PURE__ */ (0,
|
|
1842
|
+
/* @__PURE__ */ (0, import_jsx_runtime28.jsxs)("div", { className: "flex flex-col text-[10px] gap-1", children: [
|
|
1843
|
+
/* @__PURE__ */ (0, import_jsx_runtime28.jsxs)("div", { className: "font-medium text-white opacity-60", children: [
|
|
2956
1844
|
"Slippage: ",
|
|
2957
1845
|
`${slippage}%`
|
|
2958
1846
|
] }),
|
|
2959
|
-
/* @__PURE__ */ (0,
|
|
1847
|
+
/* @__PURE__ */ (0, import_jsx_runtime28.jsxs)("div", { className: "font-medium text-white opacity-60", children: [
|
|
2960
1848
|
"Min amount out:",
|
|
2961
1849
|
" ",
|
|
2962
1850
|
weiToHumanReadable({
|
|
@@ -2973,45 +1861,95 @@ var FeesDetails = ({
|
|
|
2973
1861
|
};
|
|
2974
1862
|
|
|
2975
1863
|
// src/components/TxConfigForm/Summary.tsx
|
|
2976
|
-
var
|
|
1864
|
+
var import_react6 = require("react");
|
|
1865
|
+
|
|
1866
|
+
// src/components/TxConfigForm/UsdPrice.tsx
|
|
1867
|
+
var import_react5 = require("react");
|
|
1868
|
+
var import_jsx_runtime29 = require("react/jsx-runtime");
|
|
1869
|
+
var UsdPrice = ({
|
|
1870
|
+
prices,
|
|
1871
|
+
token,
|
|
1872
|
+
amount = "0",
|
|
1873
|
+
loading = false
|
|
1874
|
+
}) => {
|
|
1875
|
+
const [usdPrice, setUsdPrice] = (0, import_react5.useState)("0.00");
|
|
1876
|
+
(0, import_react5.useEffect)(() => {
|
|
1877
|
+
if (token && prices && prices[token.address]) {
|
|
1878
|
+
setUsdPrice((Number(amount) * Number(prices[token.address])).toFixed(2));
|
|
1879
|
+
}
|
|
1880
|
+
}, [token, prices, amount]);
|
|
1881
|
+
return /* @__PURE__ */ (0, import_jsx_runtime29.jsx)("div", { className: "opacity-60 py-4", children: loading ? /* @__PURE__ */ (0, import_jsx_runtime29.jsx)(Skeleton, { width: "w-12", height: "h-4" }) : token ? prices && prices[token.address] ? /* @__PURE__ */ (0, import_jsx_runtime29.jsx)("div", { children: `$${usdPrice}` }) : /* @__PURE__ */ (0, import_jsx_runtime29.jsx)(Alert, { desc: "Unknown price" }) : /* @__PURE__ */ (0, import_jsx_runtime29.jsx)(import_jsx_runtime29.Fragment, { children: "$0.00" }) });
|
|
1882
|
+
};
|
|
1883
|
+
|
|
1884
|
+
// src/components/TxConfigForm/Summary.tsx
|
|
1885
|
+
var import_jsx_runtime30 = require("react/jsx-runtime");
|
|
2977
1886
|
var Summary = ({
|
|
2978
1887
|
isGettingRoute,
|
|
2979
|
-
amount,
|
|
2980
1888
|
route,
|
|
2981
1889
|
dstToken,
|
|
2982
1890
|
dstChain
|
|
2983
1891
|
}) => {
|
|
2984
|
-
|
|
2985
|
-
|
|
2986
|
-
|
|
2987
|
-
|
|
2988
|
-
|
|
2989
|
-
|
|
2990
|
-
|
|
2991
|
-
|
|
2992
|
-
|
|
2993
|
-
|
|
2994
|
-
|
|
2995
|
-
|
|
2996
|
-
|
|
2997
|
-
|
|
2998
|
-
|
|
2999
|
-
|
|
3000
|
-
|
|
3001
|
-
|
|
1892
|
+
const [prices, setPrices] = (0, import_react6.useState)();
|
|
1893
|
+
const amountReadable = (0, import_react6.useMemo)(
|
|
1894
|
+
() => weiToHumanReadable({
|
|
1895
|
+
amount: route?.estAmountOut || "0",
|
|
1896
|
+
decimals: dstToken?.decimals || 18,
|
|
1897
|
+
precisionFractionalPlaces: 5
|
|
1898
|
+
}),
|
|
1899
|
+
[route, dstToken]
|
|
1900
|
+
);
|
|
1901
|
+
(0, import_react6.useEffect)(() => {
|
|
1902
|
+
if (dstChain) {
|
|
1903
|
+
getPrices({ chainId: dstChain.chainId, currency: "USD" }).then(
|
|
1904
|
+
(prices2) => setPrices(prices2)
|
|
1905
|
+
);
|
|
1906
|
+
}
|
|
1907
|
+
}, [dstChain]);
|
|
1908
|
+
return /* @__PURE__ */ (0, import_jsx_runtime30.jsxs)("div", { className: "flex flex-col globalBorder rounded-lg bg-[rgba(15,15,15,1)] p-4 relative", children: [
|
|
1909
|
+
/* @__PURE__ */ (0, import_jsx_runtime30.jsxs)("div", { className: "flex justify-between", children: [
|
|
1910
|
+
/* @__PURE__ */ (0, import_jsx_runtime30.jsxs)("div", { className: "flex flex-col gap-1", children: [
|
|
1911
|
+
/* @__PURE__ */ (0, import_jsx_runtime30.jsx)("p", { className: "text-[rgba(255,255,255,0.6)] text-sm", children: "You receive" }),
|
|
1912
|
+
isGettingRoute ? /* @__PURE__ */ (0, import_jsx_runtime30.jsx)(
|
|
1913
|
+
Skeleton,
|
|
1914
|
+
{
|
|
1915
|
+
width: "w-[100px]",
|
|
1916
|
+
height: "h-[36px]",
|
|
1917
|
+
other: "sm:w-[190px]"
|
|
1918
|
+
}
|
|
1919
|
+
) : /* @__PURE__ */ (0, import_jsx_runtime30.jsxs)("div", { className: "flex gap-2 items-center text-white text-xl sm:text-3xl", children: [
|
|
1920
|
+
amountReadable,
|
|
1921
|
+
/* @__PURE__ */ (0, import_jsx_runtime30.jsx)("div", { className: "w-4 sm:w-6 h-4 sm:h-6", children: /* @__PURE__ */ (0, import_jsx_runtime30.jsx)("img", { src: dstToken?.image, alt: dstToken?.name }) }),
|
|
1922
|
+
/* @__PURE__ */ (0, import_jsx_runtime30.jsx)("p", { className: "text-base sm:text-xl", children: dstToken?.symbol })
|
|
1923
|
+
] })
|
|
1924
|
+
] }),
|
|
1925
|
+
/* @__PURE__ */ (0, import_jsx_runtime30.jsxs)("div", { className: "flex flex-col gap-1 text-sm", children: [
|
|
1926
|
+
/* @__PURE__ */ (0, import_jsx_runtime30.jsx)("p", { className: "text-[rgba(255,255,255,0.6)] text-right", children: "on chain:" }),
|
|
1927
|
+
/* @__PURE__ */ (0, import_jsx_runtime30.jsxs)("div", { className: "flex items-center gap-1 text-white", children: [
|
|
1928
|
+
/* @__PURE__ */ (0, import_jsx_runtime30.jsx)("div", { className: "w-4 h-4", children: /* @__PURE__ */ (0, import_jsx_runtime30.jsx)("img", { src: dstChain?.image, alt: dstChain?.name }) }),
|
|
1929
|
+
/* @__PURE__ */ (0, import_jsx_runtime30.jsx)("div", { children: dstChain?.displayName })
|
|
1930
|
+
] })
|
|
3002
1931
|
] })
|
|
3003
1932
|
] }),
|
|
3004
|
-
/* @__PURE__ */ (0,
|
|
1933
|
+
/* @__PURE__ */ (0, import_jsx_runtime30.jsx)(
|
|
1934
|
+
UsdPrice,
|
|
1935
|
+
{
|
|
1936
|
+
prices,
|
|
1937
|
+
token: dstToken,
|
|
1938
|
+
amount: amountReadable,
|
|
1939
|
+
loading: isGettingRoute
|
|
1940
|
+
}
|
|
1941
|
+
),
|
|
1942
|
+
/* @__PURE__ */ (0, import_jsx_runtime30.jsx)("div", { className: "absolute right-[50%] top-0 translate-x-1/2 translate-y-[-60%] globalBorder rounded-xl p-[5px] bg-[rgba(15,15,15,1)]", children: /* @__PURE__ */ (0, import_jsx_runtime30.jsx)("div", { className: " flex items-center justify-center rounded-lg w-8 h-8 bg-gradient-to-l from-[rgba(54,129,198,1)] to-[rgba(43,74,157,1)] ", children: /* @__PURE__ */ (0, import_jsx_runtime30.jsx)(ArrowDownIcon, {}) }) })
|
|
3005
1943
|
] });
|
|
3006
1944
|
};
|
|
3007
1945
|
|
|
3008
1946
|
// src/components/TxConfigForm/SwapPanel.tsx
|
|
3009
|
-
var
|
|
1947
|
+
var import_react9 = require("react");
|
|
3010
1948
|
|
|
3011
1949
|
// src/components/TxConfigForm/TokenPicker.tsx
|
|
3012
|
-
var
|
|
1950
|
+
var import_react7 = require("react");
|
|
3013
1951
|
var import_react_dom = require("react-dom");
|
|
3014
|
-
var
|
|
1952
|
+
var import_jsx_runtime31 = require("react/jsx-runtime");
|
|
3015
1953
|
var TokenPicker = ({
|
|
3016
1954
|
onCloseClick,
|
|
3017
1955
|
tokens,
|
|
@@ -3020,8 +1958,8 @@ var TokenPicker = ({
|
|
|
3020
1958
|
signer,
|
|
3021
1959
|
balances
|
|
3022
1960
|
}) => {
|
|
3023
|
-
const [searchValue, setSearchValue] = (0,
|
|
3024
|
-
const modalRoot = document.querySelector("
|
|
1961
|
+
const [searchValue, setSearchValue] = (0, import_react7.useState)("");
|
|
1962
|
+
const modalRoot = document.querySelector("#xswap-modal");
|
|
3025
1963
|
const onBackdropClick = (e) => {
|
|
3026
1964
|
e.stopPropagation();
|
|
3027
1965
|
e.nativeEvent.stopImmediatePropagation();
|
|
@@ -3029,7 +1967,7 @@ var TokenPicker = ({
|
|
|
3029
1967
|
onCloseClick();
|
|
3030
1968
|
}
|
|
3031
1969
|
};
|
|
3032
|
-
const filteredTokens = (0,
|
|
1970
|
+
const filteredTokens = (0, import_react7.useMemo)(() => {
|
|
3033
1971
|
const isMatch = (value, searchValue2) => value.toLowerCase().indexOf(searchValue2.toLowerCase()) > -1;
|
|
3034
1972
|
return tokens?.filter(
|
|
3035
1973
|
(token) => isMatch(token.symbol, searchValue) || isMatch(token.name, searchValue) || token.address === searchValue.toLowerCase()
|
|
@@ -3038,24 +1976,24 @@ var TokenPicker = ({
|
|
|
3038
1976
|
);
|
|
3039
1977
|
}, [searchValue, tokens]);
|
|
3040
1978
|
return modalRoot ? (0, import_react_dom.createPortal)(
|
|
3041
|
-
/* @__PURE__ */ (0,
|
|
1979
|
+
/* @__PURE__ */ (0, import_jsx_runtime31.jsx)(
|
|
3042
1980
|
"div",
|
|
3043
1981
|
{
|
|
3044
1982
|
onClick: onBackdropClick,
|
|
3045
1983
|
className: "box-border fixed h-full w-full z-[999] top-0 left-0 bg-[rgba(0,0,0,0.8)] flex items-center justify-center p-5",
|
|
3046
|
-
children: /* @__PURE__ */ (0,
|
|
3047
|
-
/* @__PURE__ */ (0,
|
|
1984
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime31.jsxs)("div", { className: "relative bg-black rounded-3xl p-6 max-h-[70%] flex flex-col text-base text-white w-[452px] h-[70%] border border-solid border-[rgba(255,255,255,0.2)]", children: [
|
|
1985
|
+
/* @__PURE__ */ (0, import_jsx_runtime31.jsx)(
|
|
3048
1986
|
"div",
|
|
3049
1987
|
{
|
|
3050
1988
|
onClick: onCloseClick,
|
|
3051
1989
|
className: "absolute top-4 right-4 cursor-pointer",
|
|
3052
|
-
children: /* @__PURE__ */ (0,
|
|
1990
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime31.jsx)(CloseIcon, {})
|
|
3053
1991
|
}
|
|
3054
1992
|
),
|
|
3055
|
-
/* @__PURE__ */ (0,
|
|
3056
|
-
/* @__PURE__ */ (0,
|
|
3057
|
-
/* @__PURE__ */ (0,
|
|
3058
|
-
/* @__PURE__ */ (0,
|
|
1993
|
+
/* @__PURE__ */ (0, import_jsx_runtime31.jsx)("p", { className: "text-base mb-4", children: "Pick a token" }),
|
|
1994
|
+
/* @__PURE__ */ (0, import_jsx_runtime31.jsxs)("div", { className: "flex items-center border border-solid border-[rgba(255,255,255,0.1)] rounded-lg py-0 px-3 gap-2 bg-[rgba(15,15,15,1)]", children: [
|
|
1995
|
+
/* @__PURE__ */ (0, import_jsx_runtime31.jsx)("div", { className: "w-6 h-6", children: /* @__PURE__ */ (0, import_jsx_runtime31.jsx)(SearchIcon, {}) }),
|
|
1996
|
+
/* @__PURE__ */ (0, import_jsx_runtime31.jsx)(
|
|
3059
1997
|
"input",
|
|
3060
1998
|
{
|
|
3061
1999
|
placeholder: "Search name or paste address",
|
|
@@ -3065,7 +2003,7 @@ var TokenPicker = ({
|
|
|
3065
2003
|
}
|
|
3066
2004
|
)
|
|
3067
2005
|
] }),
|
|
3068
|
-
/* @__PURE__ */ (0,
|
|
2006
|
+
/* @__PURE__ */ (0, import_jsx_runtime31.jsx)("div", { className: "my-4 mx-0 flex flex-wrap gap-3", children: tokens?.filter((token) => token?.quickPick).map((token) => /* @__PURE__ */ (0, import_jsx_runtime31.jsxs)(
|
|
3069
2007
|
"div",
|
|
3070
2008
|
{
|
|
3071
2009
|
className: `flex gap-2 py-1 px-2 items-center bg-[rgb(15,15,15)] rounded-2xl border border-solid border-[rgba(255,255,255,0.1)] hover:bg-[rgb(25,25,25)] hover:cursor-pointer ${token.address === selectedToken?.address ? "bg-[rgb(35, 35, 35)]" : ""}`,
|
|
@@ -3074,14 +2012,14 @@ var TokenPicker = ({
|
|
|
3074
2012
|
onCloseClick();
|
|
3075
2013
|
},
|
|
3076
2014
|
children: [
|
|
3077
|
-
/* @__PURE__ */ (0,
|
|
3078
|
-
/* @__PURE__ */ (0,
|
|
2015
|
+
/* @__PURE__ */ (0, import_jsx_runtime31.jsx)("img", { src: token.image, alt: token.name, className: "w-5" }),
|
|
2016
|
+
/* @__PURE__ */ (0, import_jsx_runtime31.jsx)("div", { className: "text-sm", children: token.symbol })
|
|
3079
2017
|
]
|
|
3080
2018
|
},
|
|
3081
2019
|
token.address
|
|
3082
2020
|
)) }),
|
|
3083
|
-
/* @__PURE__ */ (0,
|
|
3084
|
-
/* @__PURE__ */ (0,
|
|
2021
|
+
/* @__PURE__ */ (0, import_jsx_runtime31.jsx)("div", { className: "h-[2px] my-0 mx-[-24px] w-[100%+48px] px-12 bg-[rgba(255,255,255,0.1)]" }),
|
|
2022
|
+
/* @__PURE__ */ (0, import_jsx_runtime31.jsx)("div", { className: "overflow-y-scroll h-full mx-[-24px] w-[100%+48px] flex flex-col", children: filteredTokens && filteredTokens.length > 0 ? filteredTokens.map((token, index) => /* @__PURE__ */ (0, import_jsx_runtime31.jsxs)(
|
|
3085
2023
|
"div",
|
|
3086
2024
|
{
|
|
3087
2025
|
className: `flex gap-3 py-2 px-[24px] w-full items-center hover:bg-[rgb(25,25,25)] hover:cursor-pointer ${token.address === selectedToken?.address ? "bg-[rgb(35,35,35)]" : ""}`,
|
|
@@ -3090,29 +2028,29 @@ var TokenPicker = ({
|
|
|
3090
2028
|
onCloseClick();
|
|
3091
2029
|
},
|
|
3092
2030
|
children: [
|
|
3093
|
-
token.image ? /* @__PURE__ */ (0,
|
|
2031
|
+
token.image ? /* @__PURE__ */ (0, import_jsx_runtime31.jsx)(
|
|
3094
2032
|
"img",
|
|
3095
2033
|
{
|
|
3096
2034
|
src: token.image,
|
|
3097
2035
|
alt: token.name,
|
|
3098
2036
|
className: "token-picker__all__logo"
|
|
3099
2037
|
}
|
|
3100
|
-
) : /* @__PURE__ */ (0,
|
|
3101
|
-
/* @__PURE__ */ (0,
|
|
3102
|
-
/* @__PURE__ */ (0,
|
|
3103
|
-
/* @__PURE__ */ (0,
|
|
3104
|
-
/* @__PURE__ */ (0,
|
|
2038
|
+
) : /* @__PURE__ */ (0, import_jsx_runtime31.jsx)("div", { className: "flex items-center justify-center w-9 h-9 text-[15px] ml-1 rounded-full bg-[#272e40] text-[#e0e7fa]", children: token?.symbol.substring(0, 1) }),
|
|
2039
|
+
/* @__PURE__ */ (0, import_jsx_runtime31.jsxs)("div", { className: "flex justify-between items-center gap-1 overflow-hidden grow", children: [
|
|
2040
|
+
/* @__PURE__ */ (0, import_jsx_runtime31.jsxs)("div", { className: "flex flex-col leading-[16px]", children: [
|
|
2041
|
+
/* @__PURE__ */ (0, import_jsx_runtime31.jsx)("div", { className: "overflow-hidden whitespace-nowrap text-ellipsis text-[15px]", children: token.name }),
|
|
2042
|
+
/* @__PURE__ */ (0, import_jsx_runtime31.jsx)("div", { className: "text-[#888] text-[11px]", children: token.symbol })
|
|
3105
2043
|
] }),
|
|
3106
|
-
signer && /* @__PURE__ */ (0,
|
|
2044
|
+
signer && /* @__PURE__ */ (0, import_jsx_runtime31.jsx)(import_jsx_runtime31.Fragment, { children: balances && balances[token.address] && token.decimals ? /* @__PURE__ */ (0, import_jsx_runtime31.jsx)("div", { className: "text-xs", children: weiToHumanReadable({
|
|
3107
2045
|
amount: balances[token.address]?.toString() || "0",
|
|
3108
2046
|
decimals: token.decimals,
|
|
3109
2047
|
precisionFractionalPlaces: 4
|
|
3110
|
-
}) }) : /* @__PURE__ */ (0,
|
|
2048
|
+
}) }) : /* @__PURE__ */ (0, import_jsx_runtime31.jsx)(Skeleton, { width: "w-12", height: "h-3" }) })
|
|
3111
2049
|
] })
|
|
3112
2050
|
]
|
|
3113
2051
|
},
|
|
3114
2052
|
`${index}_${token.address}`
|
|
3115
|
-
)) : /* @__PURE__ */ (0,
|
|
2053
|
+
)) : /* @__PURE__ */ (0, import_jsx_runtime31.jsx)("div", { className: "mt-4 flex justify-center", children: /* @__PURE__ */ (0, import_jsx_runtime31.jsx)("p", { className: "text-sm text-white", children: "No tokens found." }) }) })
|
|
3116
2054
|
] })
|
|
3117
2055
|
}
|
|
3118
2056
|
),
|
|
@@ -3121,7 +2059,7 @@ var TokenPicker = ({
|
|
|
3121
2059
|
};
|
|
3122
2060
|
|
|
3123
2061
|
// src/components/TxConfigForm/ChainListElement.tsx
|
|
3124
|
-
var
|
|
2062
|
+
var import_jsx_runtime32 = require("react/jsx-runtime");
|
|
3125
2063
|
var ChainListElement = ({
|
|
3126
2064
|
chain,
|
|
3127
2065
|
setSrcChain,
|
|
@@ -3129,8 +2067,8 @@ var ChainListElement = ({
|
|
|
3129
2067
|
index,
|
|
3130
2068
|
length
|
|
3131
2069
|
}) => {
|
|
3132
|
-
return /* @__PURE__ */ (0,
|
|
3133
|
-
/* @__PURE__ */ (0,
|
|
2070
|
+
return /* @__PURE__ */ (0, import_jsx_runtime32.jsxs)("div", { children: [
|
|
2071
|
+
/* @__PURE__ */ (0, import_jsx_runtime32.jsxs)(
|
|
3134
2072
|
"li",
|
|
3135
2073
|
{
|
|
3136
2074
|
className: "bg-transparent border-none flex gap-1 items-center cursor-pointer py-2 w-full",
|
|
@@ -3139,21 +2077,21 @@ var ChainListElement = ({
|
|
|
3139
2077
|
setChainListShown(false);
|
|
3140
2078
|
},
|
|
3141
2079
|
children: [
|
|
3142
|
-
/* @__PURE__ */ (0,
|
|
2080
|
+
/* @__PURE__ */ (0, import_jsx_runtime32.jsx)("img", { width: 12, height: 12, src: chain.image, alt: chain.displayName }),
|
|
3143
2081
|
chain.displayName
|
|
3144
2082
|
]
|
|
3145
2083
|
}
|
|
3146
2084
|
),
|
|
3147
|
-
index !== length - 1 && /* @__PURE__ */ (0,
|
|
2085
|
+
index !== length - 1 && /* @__PURE__ */ (0, import_jsx_runtime32.jsx)("div", { className: "h-px mx-2 bg-[rgba(255,255,255,0.15)]" })
|
|
3148
2086
|
] }, `${chain.ecosystem}-${chain.chainId}`);
|
|
3149
2087
|
};
|
|
3150
2088
|
|
|
3151
2089
|
// src/components/TxConfigForm/BalanceComponent.tsx
|
|
3152
|
-
var
|
|
2090
|
+
var import_react8 = require("react");
|
|
3153
2091
|
var import_bignumber3 = __toESM(require("bignumber.js"));
|
|
3154
|
-
var
|
|
2092
|
+
var import_jsx_runtime33 = require("react/jsx-runtime");
|
|
3155
2093
|
var BalanceComponent = ({ srcToken, balances }) => {
|
|
3156
|
-
const balanceText = (0,
|
|
2094
|
+
const balanceText = (0, import_react8.useMemo)(() => {
|
|
3157
2095
|
if (!balances || !srcToken)
|
|
3158
2096
|
return "0";
|
|
3159
2097
|
if (balances[srcToken.address]?.toString() === "0")
|
|
@@ -3173,7 +2111,7 @@ var BalanceComponent = ({ srcToken, balances }) => {
|
|
|
3173
2111
|
precisionFractionalPlaces: 5
|
|
3174
2112
|
});
|
|
3175
2113
|
}, [srcToken, balances]);
|
|
3176
|
-
return /* @__PURE__ */ (0,
|
|
2114
|
+
return /* @__PURE__ */ (0, import_jsx_runtime33.jsxs)(import_jsx_runtime33.Fragment, { children: [
|
|
3177
2115
|
"Balance:",
|
|
3178
2116
|
" ",
|
|
3179
2117
|
srcToken && balances ? weiToHumanReadable({
|
|
@@ -3181,12 +2119,12 @@ var BalanceComponent = ({ srcToken, balances }) => {
|
|
|
3181
2119
|
decimals: srcToken.decimals,
|
|
3182
2120
|
precisionFractionalPlaces: 4
|
|
3183
2121
|
}) : 0,
|
|
3184
|
-
/* @__PURE__ */ (0,
|
|
2122
|
+
/* @__PURE__ */ (0, import_jsx_runtime33.jsx)("span", { className: "bg-gradient-to-r from-x_blue_light to-x_blue_dark bg-clip-text text-transparent", children: "Max" })
|
|
3185
2123
|
] });
|
|
3186
2124
|
};
|
|
3187
2125
|
|
|
3188
2126
|
// src/components/TxConfigForm/SwapPanel.tsx
|
|
3189
|
-
var
|
|
2127
|
+
var import_jsx_runtime34 = require("react/jsx-runtime");
|
|
3190
2128
|
var SwapPanel = ({
|
|
3191
2129
|
amount,
|
|
3192
2130
|
setAmount,
|
|
@@ -3199,10 +2137,10 @@ var SwapPanel = ({
|
|
|
3199
2137
|
prices,
|
|
3200
2138
|
supportedChains
|
|
3201
2139
|
}) => {
|
|
3202
|
-
const [chainListShown, setChainListShown] = (0,
|
|
3203
|
-
const [tokenListShown, setTokenListShown] = (0,
|
|
3204
|
-
const listRef = (0,
|
|
3205
|
-
const buttonRef = (0,
|
|
2140
|
+
const [chainListShown, setChainListShown] = (0, import_react9.useState)(false);
|
|
2141
|
+
const [tokenListShown, setTokenListShown] = (0, import_react9.useState)(false);
|
|
2142
|
+
const listRef = (0, import_react9.useRef)(null);
|
|
2143
|
+
const buttonRef = (0, import_react9.useRef)(null);
|
|
3206
2144
|
const handleClickOutside = (event) => {
|
|
3207
2145
|
if (listRef.current && buttonRef.current) {
|
|
3208
2146
|
const listElement = listRef.current;
|
|
@@ -3221,21 +2159,21 @@ var SwapPanel = ({
|
|
|
3221
2159
|
})
|
|
3222
2160
|
);
|
|
3223
2161
|
};
|
|
3224
|
-
(0,
|
|
2162
|
+
(0, import_react9.useEffect)(() => {
|
|
3225
2163
|
if (chainListShown) {
|
|
3226
2164
|
document.addEventListener("mousedown", handleClickOutside);
|
|
3227
2165
|
return () => document.removeEventListener("mousedown", handleClickOutside);
|
|
3228
2166
|
}
|
|
3229
2167
|
}, [chainListShown]);
|
|
3230
|
-
const chainListOptions = (0,
|
|
2168
|
+
const chainListOptions = (0, import_react9.useMemo)(
|
|
3231
2169
|
() => supportedChains.filter((chain) => chain.chainId !== srcChain?.chainId),
|
|
3232
2170
|
[supportedChains, srcChain]
|
|
3233
2171
|
);
|
|
3234
|
-
return /* @__PURE__ */ (0,
|
|
3235
|
-
/* @__PURE__ */ (0,
|
|
3236
|
-
/* @__PURE__ */ (0,
|
|
3237
|
-
/* @__PURE__ */ (0,
|
|
3238
|
-
/* @__PURE__ */ (0,
|
|
2172
|
+
return /* @__PURE__ */ (0, import_jsx_runtime34.jsxs)("div", { className: "flex justify-between globalBorder rounded-lg bg-[rgba(15,15,15,1)] p-4", children: [
|
|
2173
|
+
/* @__PURE__ */ (0, import_jsx_runtime34.jsxs)("div", { className: "flex flex-col justify-between gap-2 overflow-hidden w-1/2", children: [
|
|
2174
|
+
/* @__PURE__ */ (0, import_jsx_runtime34.jsxs)("div", { className: "flex flex-col gap-1", children: [
|
|
2175
|
+
/* @__PURE__ */ (0, import_jsx_runtime34.jsx)("p", { className: "text-white opacity-60 text-xs sm:text-sm font-medium", children: "You pay" }),
|
|
2176
|
+
/* @__PURE__ */ (0, import_jsx_runtime34.jsx)(
|
|
3239
2177
|
"input",
|
|
3240
2178
|
{
|
|
3241
2179
|
className: "p-0 border-none outline-none bg-transparent text-2xl overflow-ellipsis",
|
|
@@ -3255,90 +2193,94 @@ var SwapPanel = ({
|
|
|
3255
2193
|
}
|
|
3256
2194
|
)
|
|
3257
2195
|
] }),
|
|
3258
|
-
/* @__PURE__ */ (0,
|
|
3259
|
-
|
|
3260
|
-
|
|
3261
|
-
|
|
3262
|
-
|
|
3263
|
-
|
|
3264
|
-
|
|
3265
|
-
|
|
3266
|
-
|
|
3267
|
-
|
|
3268
|
-
|
|
3269
|
-
|
|
3270
|
-
|
|
3271
|
-
|
|
3272
|
-
|
|
3273
|
-
|
|
3274
|
-
|
|
3275
|
-
|
|
3276
|
-
|
|
3277
|
-
|
|
3278
|
-
|
|
3279
|
-
),
|
|
3280
|
-
chainListShown && /* @__PURE__ */ (0, import_jsx_runtime31.jsx)(
|
|
3281
|
-
"ul",
|
|
3282
|
-
{
|
|
3283
|
-
ref: listRef,
|
|
3284
|
-
className: "bg-black globalBorder rounded-lg whitespace-nowrap z-1 right-0 top-10 px-2 max-w-full max-h-[40vh] overflow-auto absolute text-sm z-20",
|
|
3285
|
-
children: chainListOptions.map((chain, index) => /* @__PURE__ */ (0, import_jsx_runtime31.jsx)(
|
|
3286
|
-
ChainListElement,
|
|
2196
|
+
/* @__PURE__ */ (0, import_jsx_runtime34.jsx)("div", { className: "flex items-center text-sm text-[rgba(255,255,255,0.6)]", children: /* @__PURE__ */ (0, import_jsx_runtime34.jsx)(
|
|
2197
|
+
UsdPrice,
|
|
2198
|
+
{
|
|
2199
|
+
prices,
|
|
2200
|
+
token: srcToken,
|
|
2201
|
+
amount,
|
|
2202
|
+
loading: false
|
|
2203
|
+
}
|
|
2204
|
+
) })
|
|
2205
|
+
] }),
|
|
2206
|
+
/* @__PURE__ */ (0, import_jsx_runtime34.jsxs)("div", { className: "flex flex-col relative items-end gap-2.5 w-1/2 text-xs", children: [
|
|
2207
|
+
/* @__PURE__ */ (0, import_jsx_runtime34.jsxs)(
|
|
2208
|
+
"div",
|
|
2209
|
+
{
|
|
2210
|
+
className: "flex gap-2 items-center p-2 max-w-full cursor-pointer bg-black text-white globalBorder rounded-3xl whitespace-nowrap",
|
|
2211
|
+
onClick: () => {
|
|
2212
|
+
setTokenListShown((state) => !state);
|
|
2213
|
+
},
|
|
2214
|
+
children: [
|
|
2215
|
+
/* @__PURE__ */ (0, import_jsx_runtime34.jsx)(
|
|
2216
|
+
"img",
|
|
3287
2217
|
{
|
|
3288
|
-
|
|
3289
|
-
|
|
3290
|
-
|
|
3291
|
-
|
|
3292
|
-
chain
|
|
2218
|
+
height: 16,
|
|
2219
|
+
width: 16,
|
|
2220
|
+
src: srcToken?.image,
|
|
2221
|
+
alt: srcToken?.name
|
|
3293
2222
|
}
|
|
3294
|
-
)
|
|
3295
|
-
|
|
3296
|
-
|
|
3297
|
-
|
|
3298
|
-
|
|
3299
|
-
|
|
3300
|
-
|
|
3301
|
-
|
|
3302
|
-
|
|
3303
|
-
|
|
3304
|
-
|
|
3305
|
-
|
|
3306
|
-
|
|
3307
|
-
|
|
3308
|
-
|
|
3309
|
-
|
|
3310
|
-
|
|
3311
|
-
|
|
3312
|
-
}
|
|
3313
|
-
),
|
|
3314
|
-
/* @__PURE__ */ (0, import_jsx_runtime31.jsx)("div", { children: srcToken?.symbol }),
|
|
3315
|
-
/* @__PURE__ */ (0, import_jsx_runtime31.jsx)(DownArrowIcon, {})
|
|
3316
|
-
]
|
|
3317
|
-
}
|
|
3318
|
-
),
|
|
3319
|
-
tokenListShown && /* @__PURE__ */ (0, import_jsx_runtime31.jsx)(
|
|
3320
|
-
TokenPicker,
|
|
3321
|
-
{
|
|
3322
|
-
onCloseClick: () => setTokenListShown(false),
|
|
3323
|
-
tokens: srcChain?.tokens,
|
|
3324
|
-
signer,
|
|
3325
|
-
selectedToken: srcToken,
|
|
3326
|
-
setSelectedToken: (token) => setSrcToken(token),
|
|
3327
|
-
balances
|
|
3328
|
-
}
|
|
3329
|
-
)
|
|
3330
|
-
] })
|
|
3331
|
-
] }),
|
|
3332
|
-
/* @__PURE__ */ (0, import_jsx_runtime31.jsxs)("div", { className: "flex justify-between items-center w-full text-sm text-[rgba(255,255,255,0.6)] relative", children: [
|
|
3333
|
-
srcToken ? prices && prices[srcToken.address] ? /* @__PURE__ */ (0, import_jsx_runtime31.jsx)("div", { children: `$${(Number(amount) * Number(prices[srcToken.address])).toFixed(
|
|
3334
|
-
2
|
|
3335
|
-
)}` }) : /* @__PURE__ */ (0, import_jsx_runtime31.jsx)(Alert, { desc: "Unknown price" }) : /* @__PURE__ */ (0, import_jsx_runtime31.jsx)(import_jsx_runtime31.Fragment, { children: "$0.00" }),
|
|
3336
|
-
/* @__PURE__ */ (0, import_jsx_runtime31.jsx)(
|
|
2223
|
+
),
|
|
2224
|
+
/* @__PURE__ */ (0, import_jsx_runtime34.jsx)("div", { children: srcToken?.symbol }),
|
|
2225
|
+
/* @__PURE__ */ (0, import_jsx_runtime34.jsx)(DownArrowIcon, {})
|
|
2226
|
+
]
|
|
2227
|
+
}
|
|
2228
|
+
),
|
|
2229
|
+
tokenListShown && /* @__PURE__ */ (0, import_jsx_runtime34.jsx)(
|
|
2230
|
+
TokenPicker,
|
|
2231
|
+
{
|
|
2232
|
+
onCloseClick: () => setTokenListShown(false),
|
|
2233
|
+
tokens: srcChain?.tokens,
|
|
2234
|
+
signer,
|
|
2235
|
+
selectedToken: srcToken,
|
|
2236
|
+
setSelectedToken: (token) => setSrcToken(token),
|
|
2237
|
+
balances
|
|
2238
|
+
}
|
|
2239
|
+
),
|
|
2240
|
+
/* @__PURE__ */ (0, import_jsx_runtime34.jsx)(
|
|
3337
2241
|
"div",
|
|
3338
2242
|
{
|
|
3339
2243
|
onClick: handleMaxClick,
|
|
3340
2244
|
className: "flex gap-1 items-center font-medium text-white opacity-60 py-0.5 cursor-pointer",
|
|
3341
|
-
children: signer && /* @__PURE__ */ (0,
|
|
2245
|
+
children: signer && /* @__PURE__ */ (0, import_jsx_runtime34.jsx)(BalanceComponent, { balances, srcToken })
|
|
2246
|
+
}
|
|
2247
|
+
),
|
|
2248
|
+
/* @__PURE__ */ (0, import_jsx_runtime34.jsxs)(
|
|
2249
|
+
"div",
|
|
2250
|
+
{
|
|
2251
|
+
ref: buttonRef,
|
|
2252
|
+
className: "bg-black globalBorder rounded-2xl whitespace-nowrap flex items-center p-2 cursor-pointer gap-2",
|
|
2253
|
+
onClick: () => setChainListShown((prev) => !prev),
|
|
2254
|
+
children: [
|
|
2255
|
+
/* @__PURE__ */ (0, import_jsx_runtime34.jsx)(
|
|
2256
|
+
"img",
|
|
2257
|
+
{
|
|
2258
|
+
width: "16",
|
|
2259
|
+
height: "16",
|
|
2260
|
+
src: srcChain?.image,
|
|
2261
|
+
alt: srcChain?.name
|
|
2262
|
+
}
|
|
2263
|
+
),
|
|
2264
|
+
/* @__PURE__ */ (0, import_jsx_runtime34.jsx)("div", { children: srcChain?.displayName }),
|
|
2265
|
+
/* @__PURE__ */ (0, import_jsx_runtime34.jsx)(DownArrowIcon, {})
|
|
2266
|
+
]
|
|
2267
|
+
}
|
|
2268
|
+
),
|
|
2269
|
+
chainListShown && /* @__PURE__ */ (0, import_jsx_runtime34.jsx)(
|
|
2270
|
+
"ul",
|
|
2271
|
+
{
|
|
2272
|
+
ref: listRef,
|
|
2273
|
+
className: "bg-black globalBorder rounded-lg whitespace-nowrap z-1 right-0 top-10 px-2 max-w-full max-h-[40vh] overflow-auto absolute text-sm z-20",
|
|
2274
|
+
children: chainListOptions.map((chain, index) => /* @__PURE__ */ (0, import_jsx_runtime34.jsx)(
|
|
2275
|
+
ChainListElement,
|
|
2276
|
+
{
|
|
2277
|
+
index,
|
|
2278
|
+
length: supportedChains.length,
|
|
2279
|
+
setSrcChain,
|
|
2280
|
+
setChainListShown,
|
|
2281
|
+
chain
|
|
2282
|
+
}
|
|
2283
|
+
))
|
|
3342
2284
|
}
|
|
3343
2285
|
)
|
|
3344
2286
|
] })
|
|
@@ -3346,9 +2288,9 @@ var SwapPanel = ({
|
|
|
3346
2288
|
};
|
|
3347
2289
|
|
|
3348
2290
|
// src/components/TxConfigForm/ErrorField.tsx
|
|
3349
|
-
var
|
|
2291
|
+
var import_jsx_runtime35 = require("react/jsx-runtime");
|
|
3350
2292
|
var ErrorField = ({ error }) => {
|
|
3351
|
-
return /* @__PURE__ */ (0,
|
|
2293
|
+
return /* @__PURE__ */ (0, import_jsx_runtime35.jsx)(
|
|
3352
2294
|
"div",
|
|
3353
2295
|
{
|
|
3354
2296
|
className: `flex justify-center mb-1 items-center w-full rounded-2xl bg-x_error_background border border-solid ${error.length > 0 ? "border-x_error_border" : "border-transparent"}`,
|
|
@@ -3358,13 +2300,28 @@ var ErrorField = ({ error }) => {
|
|
|
3358
2300
|
};
|
|
3359
2301
|
|
|
3360
2302
|
// src/components/TxConfigForm/Description.tsx
|
|
3361
|
-
var
|
|
2303
|
+
var import_jsx_runtime36 = require("react/jsx-runtime");
|
|
3362
2304
|
var Description = ({ description }) => {
|
|
3363
|
-
return /* @__PURE__ */ (0,
|
|
2305
|
+
return /* @__PURE__ */ (0, import_jsx_runtime36.jsx)("div", { className: "flex flex-col items-start rounded-lg px-4 py-2", children: /* @__PURE__ */ (0, import_jsx_runtime36.jsx)("div", { className: "w-full flex gap-4 items-start justify-between text-xl", children: description }) });
|
|
2306
|
+
};
|
|
2307
|
+
|
|
2308
|
+
// src/components/TxConfigForm/Button.tsx
|
|
2309
|
+
var import_jsx_runtime37 = require("react/jsx-runtime");
|
|
2310
|
+
var Button = ({ children, onClick, type, disabled }) => {
|
|
2311
|
+
return /* @__PURE__ */ (0, import_jsx_runtime37.jsx)(
|
|
2312
|
+
"button",
|
|
2313
|
+
{
|
|
2314
|
+
className: "text-white border-none rounded-2xl text-xl py-4 cursor-pointer w-full bg-gradient-to-r from-[#3681c6] to-[#2b4a9d] disabled:opacity-25",
|
|
2315
|
+
onClick,
|
|
2316
|
+
type,
|
|
2317
|
+
disabled,
|
|
2318
|
+
children
|
|
2319
|
+
}
|
|
2320
|
+
);
|
|
3364
2321
|
};
|
|
3365
2322
|
|
|
3366
2323
|
// src/components/TxConfigForm/Form.tsx
|
|
3367
|
-
var
|
|
2324
|
+
var import_jsx_runtime38 = require("react/jsx-runtime");
|
|
3368
2325
|
var Form = ({
|
|
3369
2326
|
dstChainId,
|
|
3370
2327
|
dstTokenAddr,
|
|
@@ -3373,30 +2330,30 @@ var Form = ({
|
|
|
3373
2330
|
supportedChains,
|
|
3374
2331
|
onSubmit
|
|
3375
2332
|
}) => {
|
|
3376
|
-
const [signer, setSigner] = (0,
|
|
3377
|
-
const [dstChain, setDstChain] = (0,
|
|
3378
|
-
const [dstToken, setDstToken] = (0,
|
|
3379
|
-
const [srcChain, setSrcChain] = (0,
|
|
3380
|
-
const [srcToken, setSrcToken] = (0,
|
|
3381
|
-
const [amount, setAmount] = (0,
|
|
3382
|
-
const [paymentToken, setPaymentToken] = (0,
|
|
3383
|
-
const [route, setRoute] = (0,
|
|
3384
|
-
const [expressChecked, setExpressChecked] = (0,
|
|
3385
|
-
const [historyTabShown, setHistoryTabShown] = (0,
|
|
3386
|
-
const [isGettingRoute, setIsGettingRoute] = (0,
|
|
3387
|
-
const [prices, setPrices] = (0,
|
|
3388
|
-
const [balances, setBalances] = (0,
|
|
3389
|
-
const [settingsShown, setSettingsShown] = (0,
|
|
3390
|
-
const [formError, setFormError] = (0,
|
|
3391
|
-
const [slippage, setSlippage] = (0,
|
|
3392
|
-
const [feesDetailsShown, setFeesDetailsShown] = (0,
|
|
2333
|
+
const [signer, setSigner] = (0, import_react10.useState)();
|
|
2334
|
+
const [dstChain, setDstChain] = (0, import_react10.useState)();
|
|
2335
|
+
const [dstToken, setDstToken] = (0, import_react10.useState)();
|
|
2336
|
+
const [srcChain, setSrcChain] = (0, import_react10.useState)();
|
|
2337
|
+
const [srcToken, setSrcToken] = (0, import_react10.useState)();
|
|
2338
|
+
const [amount, setAmount] = (0, import_react10.useState)("");
|
|
2339
|
+
const [paymentToken, setPaymentToken] = (0, import_react10.useState)();
|
|
2340
|
+
const [route, setRoute] = (0, import_react10.useState)();
|
|
2341
|
+
const [expressChecked, setExpressChecked] = (0, import_react10.useState)(true);
|
|
2342
|
+
const [historyTabShown, setHistoryTabShown] = (0, import_react10.useState)(false);
|
|
2343
|
+
const [isGettingRoute, setIsGettingRoute] = (0, import_react10.useState)(false);
|
|
2344
|
+
const [prices, setPrices] = (0, import_react10.useState)();
|
|
2345
|
+
const [balances, setBalances] = (0, import_react10.useState)();
|
|
2346
|
+
const [settingsShown, setSettingsShown] = (0, import_react10.useState)(false);
|
|
2347
|
+
const [formError, setFormError] = (0, import_react10.useState)("");
|
|
2348
|
+
const [slippage, setSlippage] = (0, import_react10.useState)("1.5");
|
|
2349
|
+
const [feesDetailsShown, setFeesDetailsShown] = (0, import_react10.useState)(false);
|
|
3393
2350
|
const debouncedAmount = useDebounce(amount, 1e3);
|
|
3394
2351
|
const account = (0, import_wagmi2.useAccount)();
|
|
3395
2352
|
const { switchChainAsync } = (0, import_wagmi2.useSwitchChain)();
|
|
3396
|
-
(0,
|
|
2353
|
+
(0, import_react10.useEffect)(() => {
|
|
3397
2354
|
setSigner(account.address);
|
|
3398
2355
|
}, [account.address]);
|
|
3399
|
-
(0,
|
|
2356
|
+
(0, import_react10.useEffect)(() => {
|
|
3400
2357
|
const defaultChain = supportedChains.find(
|
|
3401
2358
|
({ chainId }) => chainId === account.chainId?.toString()
|
|
3402
2359
|
);
|
|
@@ -3406,17 +2363,17 @@ var Form = ({
|
|
|
3406
2363
|
)
|
|
3407
2364
|
);
|
|
3408
2365
|
}, [account.chainId]);
|
|
3409
|
-
(0,
|
|
2366
|
+
(0, import_react10.useEffect)(() => {
|
|
3410
2367
|
setDstChain(supportedChains.find((chain) => chain.chainId === dstChainId));
|
|
3411
2368
|
}, [supportedChains, dstChainId]);
|
|
3412
|
-
(0,
|
|
2369
|
+
(0, import_react10.useEffect)(() => {
|
|
3413
2370
|
setDstToken(
|
|
3414
2371
|
dstChain?.tokens.find(
|
|
3415
2372
|
(token) => token.address.toLowerCase() === dstTokenAddr.toLowerCase()
|
|
3416
2373
|
)
|
|
3417
2374
|
);
|
|
3418
2375
|
}, [dstChain]);
|
|
3419
|
-
(0,
|
|
2376
|
+
(0, import_react10.useEffect)(() => {
|
|
3420
2377
|
if (srcChain && srcToken && dstChain && debouncedAmount && paymentToken && slippage) {
|
|
3421
2378
|
setFormError("");
|
|
3422
2379
|
const timeout = setTimeout(() => {
|
|
@@ -3424,8 +2381,12 @@ var Form = ({
|
|
|
3424
2381
|
}, ROUTE_TIMEOUT_MS);
|
|
3425
2382
|
setIsGettingRoute(true);
|
|
3426
2383
|
setFeesDetailsShown(false);
|
|
2384
|
+
if (!srcToken.decimals)
|
|
2385
|
+
throw new Error(
|
|
2386
|
+
`Configuration error: selected token ($${srcToken.symbol} ${srcToken.name}) has unknown decimals param.`
|
|
2387
|
+
);
|
|
3427
2388
|
getRoute({
|
|
3428
|
-
fromAmount:
|
|
2389
|
+
fromAmount: import_ethers5.ethers.utils.parseUnits(debouncedAmount, srcToken.decimals).toString(),
|
|
3429
2390
|
fromAddress: signer || ADDRESSES[srcChain.chainId].FeeCollector,
|
|
3430
2391
|
fromChain: srcChain.chainId,
|
|
3431
2392
|
fromToken: srcToken.address,
|
|
@@ -3455,30 +2416,30 @@ var Form = ({
|
|
|
3455
2416
|
slippage,
|
|
3456
2417
|
expressChecked
|
|
3457
2418
|
]);
|
|
3458
|
-
(0,
|
|
2419
|
+
(0, import_react10.useEffect)(() => {
|
|
3459
2420
|
if (srcChain) {
|
|
3460
2421
|
setPaymentToken(
|
|
3461
2422
|
srcChain.tokens.find(
|
|
3462
|
-
(token) => token.address.toLowerCase() ===
|
|
2423
|
+
(token) => token.address.toLowerCase() === import_ethers5.ethers.constants.AddressZero.toLowerCase()
|
|
3463
2424
|
)
|
|
3464
2425
|
);
|
|
3465
2426
|
}
|
|
3466
2427
|
}, [srcChain]);
|
|
3467
|
-
(0,
|
|
2428
|
+
(0, import_react10.useEffect)(() => {
|
|
3468
2429
|
setAmount("");
|
|
3469
2430
|
setFormError("");
|
|
3470
2431
|
}, [srcToken]);
|
|
3471
|
-
(0,
|
|
2432
|
+
(0, import_react10.useEffect)(() => {
|
|
3472
2433
|
setSrcToken(srcChain?.tokens[0]);
|
|
3473
2434
|
}, [srcChain]);
|
|
3474
|
-
(0,
|
|
2435
|
+
(0, import_react10.useEffect)(() => {
|
|
3475
2436
|
if (srcChain) {
|
|
3476
2437
|
getPrices({ chainId: srcChain.chainId, currency: "USD" }).then(
|
|
3477
2438
|
(prices2) => setPrices(prices2)
|
|
3478
2439
|
);
|
|
3479
2440
|
}
|
|
3480
2441
|
}, [srcChain]);
|
|
3481
|
-
(0,
|
|
2442
|
+
(0, import_react10.useEffect)(() => {
|
|
3482
2443
|
if (srcChain && signer) {
|
|
3483
2444
|
getBalances(srcChain, signer).then((balances2) => setBalances(balances2));
|
|
3484
2445
|
}
|
|
@@ -3491,13 +2452,13 @@ var Form = ({
|
|
|
3491
2452
|
const handleSwitchChain = async () => {
|
|
3492
2453
|
await switchChainAsync({ chainId: Number(srcChain?.chainId) });
|
|
3493
2454
|
};
|
|
3494
|
-
return /* @__PURE__ */ (0,
|
|
2455
|
+
return /* @__PURE__ */ (0, import_jsx_runtime38.jsxs)(
|
|
3495
2456
|
"form",
|
|
3496
2457
|
{
|
|
3497
2458
|
className: "flex flex-col gap-2 z-10 my-0 mx-auto p-4 rounded-3xl overflow-hidden font-light w-x_mobile sm:w-x_desktop",
|
|
3498
2459
|
onSubmit: handleSubmit,
|
|
3499
2460
|
children: [
|
|
3500
|
-
/* @__PURE__ */ (0,
|
|
2461
|
+
/* @__PURE__ */ (0, import_jsx_runtime38.jsx)(
|
|
3501
2462
|
TopBar,
|
|
3502
2463
|
{
|
|
3503
2464
|
signer,
|
|
@@ -3506,7 +2467,7 @@ var Form = ({
|
|
|
3506
2467
|
setSettingsShown
|
|
3507
2468
|
}
|
|
3508
2469
|
),
|
|
3509
|
-
settingsShown && /* @__PURE__ */ (0,
|
|
2470
|
+
settingsShown && /* @__PURE__ */ (0, import_jsx_runtime38.jsx)(
|
|
3510
2471
|
Settings,
|
|
3511
2472
|
{
|
|
3512
2473
|
expressChecked,
|
|
@@ -3516,9 +2477,9 @@ var Form = ({
|
|
|
3516
2477
|
setSlippage
|
|
3517
2478
|
}
|
|
3518
2479
|
),
|
|
3519
|
-
historyTabShown ? /* @__PURE__ */ (0,
|
|
3520
|
-
desc && /* @__PURE__ */ (0,
|
|
3521
|
-
/* @__PURE__ */ (0,
|
|
2480
|
+
historyTabShown ? /* @__PURE__ */ (0, import_jsx_runtime38.jsx)(History, { signer, supportedChains }) : /* @__PURE__ */ (0, import_jsx_runtime38.jsxs)("div", { className: "flex flex-col gap-2", children: [
|
|
2481
|
+
desc && /* @__PURE__ */ (0, import_jsx_runtime38.jsx)(Description, { description: desc }),
|
|
2482
|
+
/* @__PURE__ */ (0, import_jsx_runtime38.jsx)(
|
|
3522
2483
|
SwapPanel,
|
|
3523
2484
|
{
|
|
3524
2485
|
amount,
|
|
@@ -3533,17 +2494,16 @@ var Form = ({
|
|
|
3533
2494
|
setSrcChain
|
|
3534
2495
|
}
|
|
3535
2496
|
),
|
|
3536
|
-
/* @__PURE__ */ (0,
|
|
2497
|
+
/* @__PURE__ */ (0, import_jsx_runtime38.jsx)(
|
|
3537
2498
|
Summary,
|
|
3538
2499
|
{
|
|
3539
2500
|
isGettingRoute,
|
|
3540
|
-
amount,
|
|
3541
2501
|
route,
|
|
3542
2502
|
dstToken,
|
|
3543
2503
|
dstChain
|
|
3544
2504
|
}
|
|
3545
2505
|
),
|
|
3546
|
-
/* @__PURE__ */ (0,
|
|
2506
|
+
/* @__PURE__ */ (0, import_jsx_runtime38.jsx)(
|
|
3547
2507
|
FeesDetails,
|
|
3548
2508
|
{
|
|
3549
2509
|
route,
|
|
@@ -3556,9 +2516,9 @@ var Form = ({
|
|
|
3556
2516
|
setFeesDetailsShown
|
|
3557
2517
|
}
|
|
3558
2518
|
),
|
|
3559
|
-
formError.length > 0 && /* @__PURE__ */ (0,
|
|
3560
|
-
srcChain && srcChain.chainId !== account.chainId?.toString() ? /* @__PURE__ */ (0,
|
|
3561
|
-
|
|
2519
|
+
formError.length > 0 && /* @__PURE__ */ (0, import_jsx_runtime38.jsx)(ErrorField, { error: formError }),
|
|
2520
|
+
signer && srcChain && srcChain.chainId !== account.chainId?.toString() ? /* @__PURE__ */ (0, import_jsx_runtime38.jsx)(Button, { type: "button", onClick: handleSwitchChain, children: "Switch chain" }) : /* @__PURE__ */ (0, import_jsx_runtime38.jsx)(
|
|
2521
|
+
Button,
|
|
3562
2522
|
{
|
|
3563
2523
|
type: "submit",
|
|
3564
2524
|
disabled: !signer || !route || isGettingRoute,
|
|
@@ -3572,7 +2532,7 @@ var Form = ({
|
|
|
3572
2532
|
};
|
|
3573
2533
|
|
|
3574
2534
|
// src/components/TxConfigForm/index.tsx
|
|
3575
|
-
var
|
|
2535
|
+
var import_jsx_runtime39 = require("react/jsx-runtime");
|
|
3576
2536
|
var TxConfigForm = ({
|
|
3577
2537
|
dstChainId,
|
|
3578
2538
|
dstTokenAddr,
|
|
@@ -3590,17 +2550,17 @@ var TxConfigForm = ({
|
|
|
3590
2550
|
}
|
|
3591
2551
|
};
|
|
3592
2552
|
const queryClient = new import_react_query.QueryClient();
|
|
3593
|
-
const wagmiConfig = (0,
|
|
2553
|
+
const wagmiConfig = (0, import_react11.useMemo)(
|
|
3594
2554
|
() => getWagmiConfig(supportedChains),
|
|
3595
2555
|
supportedChains
|
|
3596
2556
|
);
|
|
3597
|
-
return /* @__PURE__ */ (0,
|
|
2557
|
+
return /* @__PURE__ */ (0, import_jsx_runtime39.jsx)(import_wagmi3.WagmiProvider, { config: wagmiConfig, children: /* @__PURE__ */ (0, import_jsx_runtime39.jsx)(import_react_query.QueryClientProvider, { client: queryClient, children: /* @__PURE__ */ (0, import_jsx_runtime39.jsx)(
|
|
3598
2558
|
"div",
|
|
3599
2559
|
{
|
|
3600
2560
|
className: "top-0 left-0 right-0 bottom-0 bg-[rgba(0,0,0,0.8)] fixed flex items-center justify-center z-10",
|
|
3601
2561
|
onClick: onBackdropClick,
|
|
3602
|
-
children: /* @__PURE__ */ (0,
|
|
3603
|
-
/* @__PURE__ */ (0,
|
|
2562
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime39.jsxs)("div", { className: "relative bg-black rounded-3xl w-lg overflow-auto text-white border-2 border-solid border-[rgba(255,255,255,0.1)]", children: [
|
|
2563
|
+
/* @__PURE__ */ (0, import_jsx_runtime39.jsx)(
|
|
3604
2564
|
Form,
|
|
3605
2565
|
{
|
|
3606
2566
|
dstChainId,
|
|
@@ -3611,19 +2571,19 @@ var TxConfigForm = ({
|
|
|
3611
2571
|
onSubmit
|
|
3612
2572
|
}
|
|
3613
2573
|
),
|
|
3614
|
-
/* @__PURE__ */ (0,
|
|
2574
|
+
/* @__PURE__ */ (0, import_jsx_runtime39.jsx)(
|
|
3615
2575
|
"div",
|
|
3616
2576
|
{
|
|
3617
2577
|
className: "absolute top-7 right-4 cursor-pointer text-white",
|
|
3618
2578
|
onClick: onClose,
|
|
3619
|
-
children: /* @__PURE__ */ (0,
|
|
2579
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime39.jsx)(CloseIcon, {})
|
|
3620
2580
|
}
|
|
3621
2581
|
),
|
|
3622
|
-
/* @__PURE__ */ (0,
|
|
3623
|
-
/* @__PURE__ */ (0,
|
|
3624
|
-
/* @__PURE__ */ (0,
|
|
3625
|
-
/* @__PURE__ */ (0,
|
|
3626
|
-
/* @__PURE__ */ (0,
|
|
2582
|
+
/* @__PURE__ */ (0, import_jsx_runtime39.jsxs)("div", { className: "swappage__poweredby", children: [
|
|
2583
|
+
/* @__PURE__ */ (0, import_jsx_runtime39.jsx)("span", { children: "Powered by" }),
|
|
2584
|
+
/* @__PURE__ */ (0, import_jsx_runtime39.jsx)(XSwapBadgeIcon, {}),
|
|
2585
|
+
/* @__PURE__ */ (0, import_jsx_runtime39.jsx)("span", { children: "\u2715" }),
|
|
2586
|
+
/* @__PURE__ */ (0, import_jsx_runtime39.jsx)(ChainlinkCCIPIcon, {})
|
|
3627
2587
|
] })
|
|
3628
2588
|
] })
|
|
3629
2589
|
}
|
|
@@ -3639,7 +2599,7 @@ var openTxConfigForm = async ({
|
|
|
3639
2599
|
try {
|
|
3640
2600
|
return await new Promise((resolve) => {
|
|
3641
2601
|
txConfigFormRoot.render(
|
|
3642
|
-
/* @__PURE__ */ (0,
|
|
2602
|
+
/* @__PURE__ */ (0, import_jsx_runtime39.jsx)(
|
|
3643
2603
|
TxConfigForm,
|
|
3644
2604
|
{
|
|
3645
2605
|
dstChainId,
|
|
@@ -3665,16 +2625,130 @@ var openTxConfigForm = async ({
|
|
|
3665
2625
|
var txConfigFormRoot;
|
|
3666
2626
|
if (typeof document !== "undefined") {
|
|
3667
2627
|
const xswapElement = document.createElement("div");
|
|
3668
|
-
xswapElement.setAttribute("id", "
|
|
3669
|
-
xswapElement.classList.add("xswap");
|
|
2628
|
+
xswapElement.setAttribute("id", "xswap-modal");
|
|
3670
2629
|
document.body.appendChild(xswapElement);
|
|
3671
2630
|
txConfigFormRoot = (0, import_client.createRoot)(xswapElement);
|
|
3672
2631
|
}
|
|
3673
2632
|
|
|
2633
|
+
// src/components/TxHistoryButton/index.tsx
|
|
2634
|
+
var import_react12 = require("react");
|
|
2635
|
+
var import_client2 = require("react-dom/client");
|
|
2636
|
+
var import_jsx_runtime40 = require("react/jsx-runtime");
|
|
2637
|
+
var TxHistoryButton = ({ transaction }) => {
|
|
2638
|
+
const {
|
|
2639
|
+
fromChain,
|
|
2640
|
+
fromChainImage,
|
|
2641
|
+
fromToken,
|
|
2642
|
+
fromTokenImage,
|
|
2643
|
+
fromAmount,
|
|
2644
|
+
toChain,
|
|
2645
|
+
toChainImage,
|
|
2646
|
+
isDone,
|
|
2647
|
+
txHash,
|
|
2648
|
+
explorer
|
|
2649
|
+
} = transaction;
|
|
2650
|
+
const [isWide, setIsWide] = (0, import_react12.useState)(false);
|
|
2651
|
+
return /* @__PURE__ */ (0, import_jsx_runtime40.jsxs)("div", { className: "flex gap-2", onClick: () => setIsWide((x) => !x), children: [
|
|
2652
|
+
isWide && /* @__PURE__ */ (0, import_jsx_runtime40.jsxs)(
|
|
2653
|
+
"div",
|
|
2654
|
+
{
|
|
2655
|
+
className: `flex items-center min-w-60 sm:w-[520px] text-white h-14 px-4 text-sm gap-3 rounded-xl bg-gradient-to-r ${isDone ? "from-[rgba(76,175,80,0.1)] to-[rgba(46,125,50,0.1)] border border-solid border-x_green_dark" : "from-[rgba(54,129,198,0.1)] to-[rgba(43,74,157,0.1)] border border-solid border-x_blue_dark"}`,
|
|
2656
|
+
children: [
|
|
2657
|
+
/* @__PURE__ */ (0, import_jsx_runtime40.jsxs)("div", { className: "flex justify-between flex-col gap-2 sm:gap-5 sm:flex-row w-full", children: [
|
|
2658
|
+
/* @__PURE__ */ (0, import_jsx_runtime40.jsxs)("div", { className: "flex items-center gap-2", children: [
|
|
2659
|
+
/* @__PURE__ */ (0, import_jsx_runtime40.jsx)(
|
|
2660
|
+
"img",
|
|
2661
|
+
{
|
|
2662
|
+
className: "w-5 h-5",
|
|
2663
|
+
src: fromChainImage,
|
|
2664
|
+
alt: "source chain"
|
|
2665
|
+
}
|
|
2666
|
+
),
|
|
2667
|
+
/* @__PURE__ */ (0, import_jsx_runtime40.jsx)("div", { children: fromChain }),
|
|
2668
|
+
/* @__PURE__ */ (0, import_jsx_runtime40.jsx)("div", { className: "w-3.5 h-3.5", children: /* @__PURE__ */ (0, import_jsx_runtime40.jsx)(ArrowRightIcon, {}) }),
|
|
2669
|
+
/* @__PURE__ */ (0, import_jsx_runtime40.jsx)("img", { className: "w-5 h-5", src: toChainImage, alt: "to chain" }),
|
|
2670
|
+
/* @__PURE__ */ (0, import_jsx_runtime40.jsx)("div", { children: toChain })
|
|
2671
|
+
] }),
|
|
2672
|
+
/* @__PURE__ */ (0, import_jsx_runtime40.jsxs)("div", { className: "flex items-center gap-2", children: [
|
|
2673
|
+
/* @__PURE__ */ (0, import_jsx_runtime40.jsx)("div", { children: "Sent" }),
|
|
2674
|
+
/* @__PURE__ */ (0, import_jsx_runtime40.jsx)("div", { children: fromAmount }),
|
|
2675
|
+
/* @__PURE__ */ (0, import_jsx_runtime40.jsx)("div", { children: fromToken }),
|
|
2676
|
+
/* @__PURE__ */ (0, import_jsx_runtime40.jsx)(
|
|
2677
|
+
"img",
|
|
2678
|
+
{
|
|
2679
|
+
className: "w-5 h-5",
|
|
2680
|
+
src: fromTokenImage,
|
|
2681
|
+
alt: "source token"
|
|
2682
|
+
}
|
|
2683
|
+
)
|
|
2684
|
+
] })
|
|
2685
|
+
] }),
|
|
2686
|
+
/* @__PURE__ */ (0, import_jsx_runtime40.jsx)(
|
|
2687
|
+
"a",
|
|
2688
|
+
{
|
|
2689
|
+
href: explorer,
|
|
2690
|
+
target: "_blank",
|
|
2691
|
+
rel: "noreferrer",
|
|
2692
|
+
className: "no-underline cursor-pointer",
|
|
2693
|
+
"aria-label": "Show the transaction in the chain explorer",
|
|
2694
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime40.jsx)("div", { className: "w-3.5 h-3.5", children: /* @__PURE__ */ (0, import_jsx_runtime40.jsx)(ArrowUpRightIcon, {}) })
|
|
2695
|
+
}
|
|
2696
|
+
)
|
|
2697
|
+
]
|
|
2698
|
+
}
|
|
2699
|
+
),
|
|
2700
|
+
/* @__PURE__ */ (0, import_jsx_runtime40.jsx)(
|
|
2701
|
+
"div",
|
|
2702
|
+
{
|
|
2703
|
+
className: `text-white rounded-xl cursor-pointer bg-gradient-to-r
|
|
2704
|
+
${isDone ? "from-[rgba(76,175,80,0.1)] to-[rgba(46,125,50,0.1)] border border-solid border-x_green_dark" : "from-[rgba(54,129,198,0.1)] to-[rgba(43,74,157,0.1)] border border-solid border-x_blue_dark"}`,
|
|
2705
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime40.jsxs)("div", { className: "flex gap-2 items-center h-14 w-20 justify-center", children: [
|
|
2706
|
+
/* @__PURE__ */ (0, import_jsx_runtime40.jsx)(ArrowLeftIcon, {}),
|
|
2707
|
+
/* @__PURE__ */ (0, import_jsx_runtime40.jsx)("div", { className: "relative flex items-center justify-center w-9 h-9", children: isDone ? /* @__PURE__ */ (0, import_jsx_runtime40.jsx)("div", { className: "text-x_green w-5 h-5", children: /* @__PURE__ */ (0, import_jsx_runtime40.jsx)(CheckIcon, {}) }) : /* @__PURE__ */ (0, import_jsx_runtime40.jsxs)(import_jsx_runtime40.Fragment, { children: [
|
|
2708
|
+
/* @__PURE__ */ (0, import_jsx_runtime40.jsx)("div", { className: "w-5 h-5", children: /* @__PURE__ */ (0, import_jsx_runtime40.jsx)(XSwapLogo, {}) }),
|
|
2709
|
+
/* @__PURE__ */ (0, import_jsx_runtime40.jsx)("div", { className: "absolute flex items-center justify-center top-0 left-0 right-0 bottom-0 text-white", children: /* @__PURE__ */ (0, import_jsx_runtime40.jsx)(CircularProgressIcon, {}) })
|
|
2710
|
+
] }) })
|
|
2711
|
+
] })
|
|
2712
|
+
}
|
|
2713
|
+
)
|
|
2714
|
+
] });
|
|
2715
|
+
};
|
|
2716
|
+
var renderedTransactions = [];
|
|
2717
|
+
var addTransactionToRenderedTransactions = (transaction) => {
|
|
2718
|
+
if (!renderedTransactions.some(({ txHash }) => txHash === transaction.txHash))
|
|
2719
|
+
renderedTransactions.push(transaction);
|
|
2720
|
+
};
|
|
2721
|
+
var removeTransactionFromRenderedTransactions = (txHash) => {
|
|
2722
|
+
const filteredRenderedTransactions = renderedTransactions.filter(
|
|
2723
|
+
(item) => item.txHash !== txHash
|
|
2724
|
+
);
|
|
2725
|
+
renderedTransactions = [...filteredRenderedTransactions];
|
|
2726
|
+
};
|
|
2727
|
+
var updateTransactionDoneInRenderedTransactions = (txHash) => {
|
|
2728
|
+
const transaction = renderedTransactions.find(
|
|
2729
|
+
(item) => item.txHash === txHash
|
|
2730
|
+
);
|
|
2731
|
+
if (transaction) {
|
|
2732
|
+
transaction.isDone = true;
|
|
2733
|
+
}
|
|
2734
|
+
};
|
|
2735
|
+
var historyElement = document.createElement("div");
|
|
2736
|
+
historyElement.setAttribute("id", "xswap-history");
|
|
2737
|
+
historyElement.setAttribute(
|
|
2738
|
+
"class",
|
|
2739
|
+
"absolute bottom-5 right-2 flex flex-col gap-3 pl-9 items-end w-full z-50"
|
|
2740
|
+
);
|
|
2741
|
+
document.body.appendChild(historyElement);
|
|
2742
|
+
var txHistoryButtonRoot = (0, import_client2.createRoot)(historyElement);
|
|
2743
|
+
var renderTxHistoryButtons = () => {
|
|
2744
|
+
const buttons = renderedTransactions.map((item) => /* @__PURE__ */ (0, import_jsx_runtime40.jsx)(TxHistoryButton, { transaction: item }, item.txHash));
|
|
2745
|
+
txHistoryButtonRoot.render(buttons);
|
|
2746
|
+
};
|
|
2747
|
+
|
|
3674
2748
|
// src/components/Skeleton/index.tsx
|
|
3675
|
-
var
|
|
3676
|
-
var Skeleton = ({
|
|
3677
|
-
return /* @__PURE__ */ (0,
|
|
2749
|
+
var import_jsx_runtime41 = require("react/jsx-runtime");
|
|
2750
|
+
var Skeleton = ({ width, height }) => {
|
|
2751
|
+
return /* @__PURE__ */ (0, import_jsx_runtime41.jsx)("div", { className: `bg-current rounded animate-pulse ${width} ${height}` });
|
|
3678
2752
|
};
|
|
3679
2753
|
// Annotate the CommonJS export names for ESM import in node:
|
|
3680
2754
|
0 && (module.exports = {
|
|
@@ -3682,6 +2756,7 @@ var Skeleton = ({ w, h }) => {
|
|
|
3682
2756
|
Alert,
|
|
3683
2757
|
BALANCES_CHUNK_SIZE,
|
|
3684
2758
|
BatchQueryAbi,
|
|
2759
|
+
CCIP_EXPLORER,
|
|
3685
2760
|
ContractName,
|
|
3686
2761
|
DEFAULT_ECOSYSTEM,
|
|
3687
2762
|
DEFAULT_SOURCE_CHAIN_ID,
|
|
@@ -3696,9 +2771,10 @@ var Skeleton = ({ w, h }) => {
|
|
|
3696
2771
|
ROUTE_TIMEOUT_MS,
|
|
3697
2772
|
SLIPPAGE_PRESETS,
|
|
3698
2773
|
Skeleton,
|
|
2774
|
+
TxHistoryButton,
|
|
3699
2775
|
Web3Environment,
|
|
3700
2776
|
XSwapCallType,
|
|
3701
|
-
|
|
2777
|
+
addTransactionToRenderedTransactions,
|
|
3702
2778
|
chunkArray,
|
|
3703
2779
|
deepMergeObjects,
|
|
3704
2780
|
findPlaceholderIndex,
|
|
@@ -3711,14 +2787,19 @@ var Skeleton = ({ w, h }) => {
|
|
|
3711
2787
|
getBridgeTokens,
|
|
3712
2788
|
getChainData,
|
|
3713
2789
|
getChains,
|
|
2790
|
+
getDate,
|
|
3714
2791
|
getHistory,
|
|
3715
2792
|
getPrices,
|
|
3716
2793
|
getRoute,
|
|
3717
2794
|
getSwapTx,
|
|
3718
2795
|
getTokens,
|
|
2796
|
+
monitorTransactionStatus,
|
|
3719
2797
|
openTxConfigForm,
|
|
2798
|
+
removeTransactionFromRenderedTransactions,
|
|
2799
|
+
renderTxHistoryButtons,
|
|
3720
2800
|
replaceNull,
|
|
3721
2801
|
safeBigNumberFrom,
|
|
3722
2802
|
shortAddress,
|
|
2803
|
+
updateTransactionDoneInRenderedTransactions,
|
|
3723
2804
|
weiToHumanReadable
|
|
3724
2805
|
});
|