@xswap-link/sdk 0.3.5 → 0.4.0

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.
Files changed (199) hide show
  1. package/.eslintrc.json +9 -5
  2. package/CHANGELOG.md +10 -0
  3. package/README.md +2 -1
  4. package/dist/index.d.mts +106 -20
  5. package/dist/index.d.ts +106 -20
  6. package/dist/index.global.js +963 -164
  7. package/dist/index.global.js.map +1 -0
  8. package/dist/index.js +105 -3564
  9. package/dist/index.js.map +1 -0
  10. package/dist/index.mjs +105 -3534
  11. package/dist/index.mjs.map +1 -0
  12. package/nodemon.json +1 -1
  13. package/package.json +16 -9
  14. package/postcss.config.js +8 -1
  15. package/src/{components → assets}/icons/ArrowDownIcon.tsx +1 -2
  16. package/src/assets/icons/ArrowDownLongIcon.tsx +12 -0
  17. package/src/{components → assets}/icons/ArrowLeftIcon.tsx +1 -5
  18. package/src/{components → assets}/icons/ArrowRightIcon.tsx +1 -5
  19. package/src/assets/icons/ArrowUpIcon.tsx +12 -0
  20. package/src/{components → assets}/icons/ArrowUpRightIcon.tsx +1 -5
  21. package/src/assets/icons/CashbacklIcon.tsx +28 -0
  22. package/src/{components → assets}/icons/CheckIcon.tsx +1 -5
  23. package/src/assets/icons/ChevronDownIcon.tsx +12 -0
  24. package/src/assets/icons/ChevronUpIcon.tsx +7 -0
  25. package/src/{components → assets}/icons/CircularProgressIcon.tsx +1 -2
  26. package/src/assets/icons/CloseIcon.tsx +15 -0
  27. package/src/{components → assets}/icons/CoinsIcon.tsx +0 -2
  28. package/src/assets/icons/CopyIcon.tsx +15 -0
  29. package/src/assets/icons/DotGreenIcon.tsx +12 -0
  30. package/src/{components → assets}/icons/DownArrorIcon.tsx +0 -2
  31. package/src/{components → assets}/icons/ErrorIcon.tsx +0 -1
  32. package/src/assets/icons/ErrorModalStatusIcon.tsx +31 -0
  33. package/src/assets/icons/HelpIcon.tsx +21 -0
  34. package/src/assets/icons/HistoryGradientBgIcon.tsx +32 -0
  35. package/src/assets/icons/HistoryIcon.tsx +12 -0
  36. package/src/{components → assets}/icons/HourGlassIcon.tsx +1 -5
  37. package/src/assets/icons/Icon.tsx +5 -0
  38. package/src/{components → assets}/icons/InfoIcon.tsx +0 -1
  39. package/src/assets/icons/LinkExternalIcon.tsx +15 -0
  40. package/src/{components → assets}/icons/PercentageIcon.tsx +0 -1
  41. package/src/assets/icons/RankIcon.tsx +28 -0
  42. package/src/assets/icons/SettingsGradientBgIcon.tsx +32 -0
  43. package/src/assets/icons/SettingsIcon.tsx +12 -0
  44. package/src/{components → assets}/icons/SignIcon.tsx +0 -2
  45. package/src/{components → assets}/icons/SuccessIcon.tsx +0 -1
  46. package/src/assets/icons/SuccessModalStatusIcon.tsx +31 -0
  47. package/src/assets/icons/ThumbUpRoundedIcon.tsx +15 -0
  48. package/src/{components → assets}/icons/TimerIcon.tsx +0 -1
  49. package/src/assets/icons/TokensIcon.tsx +16 -0
  50. package/src/assets/icons/WaitingIcon.tsx +15 -0
  51. package/src/{components → assets}/icons/XMarkIcon.tsx +1 -5
  52. package/src/assets/icons/XPowerIcon.tsx +28 -0
  53. package/src/{components → assets}/icons/index.ts +16 -0
  54. package/src/components/Alert/index.tsx +1 -1
  55. package/src/components/Button/index.tsx +57 -0
  56. package/src/components/MessageBar/SnackMessage.tsx +32 -0
  57. package/src/components/MessageBar/index.tsx +44 -0
  58. package/src/components/Modal/index.tsx +52 -0
  59. package/src/components/PoweredBy/index.tsx +12 -0
  60. package/src/components/SafeInput/index.tsx +51 -0
  61. package/src/components/Skeleton/index.tsx +5 -9
  62. package/src/components/Spinner/index.tsx +6 -8
  63. package/src/components/Swap/Header/Controls/index.tsx +57 -0
  64. package/src/components/Swap/Header/index.tsx +16 -0
  65. package/src/components/Swap/HistoryView/index.tsx +34 -0
  66. package/src/components/Swap/SettingsView/Delivery/index.tsx +42 -0
  67. package/src/components/Swap/SettingsView/Slippage/index.tsx +80 -0
  68. package/src/components/Swap/SettingsView/index.tsx +11 -0
  69. package/src/components/Swap/SwapView/ConfirmationView/TxOverview/ArrowIcon.tsx +13 -0
  70. package/src/components/Swap/SwapView/ConfirmationView/TxOverview/Header/index.tsx +37 -0
  71. package/src/components/Swap/SwapView/ConfirmationView/TxOverview/Steps/index.tsx +145 -0
  72. package/src/components/Swap/SwapView/ConfirmationView/TxOverview/SwapPanel/index.tsx +61 -0
  73. package/src/components/Swap/SwapView/ConfirmationView/TxOverview/index.tsx +291 -0
  74. package/src/components/Swap/SwapView/ConfirmationView/TxResult/TokenItem/index.tsx +24 -0
  75. package/src/components/Swap/SwapView/ConfirmationView/TxResult/index.tsx +84 -0
  76. package/src/components/Swap/SwapView/ConfirmationView/index.tsx +17 -0
  77. package/src/components/Swap/SwapView/FeesPanel/DeliveryInfo/index.tsx +25 -0
  78. package/src/components/Swap/SwapView/FeesPanel/Fee/index.tsx +18 -0
  79. package/src/components/Swap/SwapView/FeesPanel/Fees/index.tsx +71 -0
  80. package/src/components/Swap/SwapView/FeesPanel/index.tsx +67 -0
  81. package/src/components/Swap/SwapView/SwapButton/index.tsx +154 -0
  82. package/src/components/Swap/SwapView/SwapPanel/AmountPanel/Balance/index.tsx +23 -0
  83. package/src/components/Swap/SwapView/SwapPanel/AmountPanel/index.tsx +56 -0
  84. package/src/components/Swap/SwapView/SwapPanel/ChainPanel/ChainPicker/ChainItem/index.tsx +70 -0
  85. package/src/components/Swap/SwapView/SwapPanel/ChainPanel/ChainPicker/index.tsx +62 -0
  86. package/src/components/Swap/SwapView/SwapPanel/ChainPanel/index.tsx +74 -0
  87. package/src/components/Swap/SwapView/SwapPanel/MaxPanel/index.tsx +35 -0
  88. package/src/components/Swap/SwapView/SwapPanel/TokenPanel/TokenPicker/QuickPickTokenItem/index.tsx +40 -0
  89. package/src/components/Swap/SwapView/SwapPanel/TokenPanel/TokenPicker/TokenItem/index.tsx +62 -0
  90. package/src/components/Swap/SwapView/SwapPanel/TokenPanel/TokenPicker/index.tsx +399 -0
  91. package/src/components/Swap/SwapView/SwapPanel/TokenPanel/index.tsx +104 -0
  92. package/src/components/Swap/SwapView/SwapPanel/index.tsx +42 -0
  93. package/src/components/Swap/SwapView/index.tsx +20 -0
  94. package/src/components/Swap/index.tsx +34 -0
  95. package/src/components/TextInput/index.tsx +67 -0
  96. package/src/components/Timer/index.tsx +57 -0
  97. package/src/components/ToggleButton/index.tsx +24 -0
  98. package/src/components/{UnknownTokenLogo/UnknownTokenLogo.tsx → TokenLogo/Unknown/index.tsx} +3 -4
  99. package/src/components/TokenLogo/WithChain/index.tsx +34 -0
  100. package/src/components/TokenLogo/index.tsx +22 -0
  101. package/src/components/Tooltip/index.tsx +108 -0
  102. package/src/components/TxConfigForm/index.tsx +63 -42
  103. package/src/components/TxDataCard/TokenDetails/index.tsx +30 -0
  104. package/src/components/TxDataCard/TxDataCardUI/index.tsx +133 -0
  105. package/src/components/TxDataCard/index.tsx +30 -0
  106. package/src/components/TxStatusButton/index.tsx +64 -108
  107. package/src/components/global.css +115 -4
  108. package/src/components/index.ts +18 -1
  109. package/src/config/fonts.ts +114 -0
  110. package/src/config/global.d.ts +4 -0
  111. package/src/config/init.tsx +35 -31
  112. package/src/constants/crosschainEstimationTimes.ts +52 -0
  113. package/src/constants/index.ts +8 -0
  114. package/src/context/GlobalDataProvider.tsx +165 -0
  115. package/src/context/HistoryProvider.tsx +339 -0
  116. package/src/context/ModalProvider.tsx +47 -0
  117. package/src/context/SwapProvider.tsx +664 -0
  118. package/src/context/TransactionProvider.tsx +86 -0
  119. package/src/context/TxUIWrapper.tsx +388 -0
  120. package/src/context/index.ts +5 -0
  121. package/src/contracts/abi/CustomXSwapRouter.json +953 -0
  122. package/src/contracts/abi/StakingStableAPR.json +1438 -0
  123. package/src/contracts/abi/XSwapRouter.json +1242 -0
  124. package/src/contracts/abi/XSwapTokenFeeDistributor.json +350 -0
  125. package/src/contracts/abi/index.ts +8 -0
  126. package/src/contracts/addresses.ts +24 -6
  127. package/src/fonts/Satoshi-Black.woff2 +0 -0
  128. package/src/fonts/Satoshi-BlackItalic.woff2 +0 -0
  129. package/src/fonts/Satoshi-Bold.woff2 +0 -0
  130. package/src/fonts/Satoshi-BoldItalic.woff2 +0 -0
  131. package/src/fonts/Satoshi-Light.woff2 +0 -0
  132. package/src/fonts/Satoshi-LightItalic.woff2 +0 -0
  133. package/src/fonts/Satoshi-Medium.woff2 +0 -0
  134. package/src/fonts/Satoshi-MediumItalic.woff2 +0 -0
  135. package/src/fonts/Satoshi-Regular.woff2 +0 -0
  136. package/src/fonts/Satoshi-RegularItalic.woff2 +0 -0
  137. package/src/fonts/Satoshi-Variable.woff2 +0 -0
  138. package/src/fonts/Satoshi-VariableItalic.woff2 +0 -0
  139. package/src/hooks/index.ts +5 -0
  140. package/src/hooks/networkManagement/clientToSigner.tsx +17 -0
  141. package/src/hooks/networkManagement/useNetworks.ts +51 -0
  142. package/src/hooks/useBatchQuery.ts +46 -0
  143. package/src/hooks/useDebounce.tsx +28 -0
  144. package/src/hooks/useEvmContractApi.ts +85 -0
  145. package/src/hooks/usePortal.ts +79 -0
  146. package/src/hooks/useXPower.ts +58 -0
  147. package/src/models/Addresses.ts +8 -2
  148. package/src/models/TokenData.ts +13 -0
  149. package/src/models/TransactionHistory.ts +2 -0
  150. package/src/models/TxUIWrapper.ts +51 -0
  151. package/src/models/XSwapConfig.ts +1 -0
  152. package/src/models/index.ts +1 -0
  153. package/src/models/payloads/GetBalancesPayload.ts +3 -0
  154. package/src/models/payloads/GetFinishedLeaderboardQuestsPayload.ts +3 -0
  155. package/src/models/payloads/GetLeaderboardChangePayload.ts +4 -0
  156. package/src/models/payloads/{GetSwapTxPayload.ts → ModalIntegrationPayload.ts} +3 -1
  157. package/src/models/payloads/index.ts +5 -2
  158. package/src/services/api.ts +34 -5
  159. package/src/services/integrations/monitoring.ts +49 -37
  160. package/src/services/integrations/transactions.ts +50 -6
  161. package/src/utils/contracts.ts +29 -0
  162. package/src/utils/index.ts +3 -3
  163. package/src/utils/numbers.ts +14 -0
  164. package/src/utils/parseWeb3Error.ts +7 -3
  165. package/tailwind.config.js +15 -5
  166. package/tsconfig.json +7 -7
  167. package/tsup.config.ts +61 -0
  168. package/xswap.config.ts +1 -0
  169. package/dist/index.css +0 -1
  170. package/src/components/TxConfigForm/BalanceComponent.tsx +0 -52
  171. package/src/components/TxConfigForm/Button.tsx +0 -20
  172. package/src/components/TxConfigForm/ChainListElement.tsx +0 -36
  173. package/src/components/TxConfigForm/ConfirmationAmount.tsx +0 -91
  174. package/src/components/TxConfigForm/ConfirmationView/ErrorView.tsx +0 -38
  175. package/src/components/TxConfigForm/ConfirmationView/SuccessView.tsx +0 -159
  176. package/src/components/TxConfigForm/ConfirmationView/index.tsx +0 -149
  177. package/src/components/TxConfigForm/ConnectWalletPrompt.tsx +0 -21
  178. package/src/components/TxConfigForm/Description.tsx +0 -17
  179. package/src/components/TxConfigForm/ErrorField.tsx +0 -19
  180. package/src/components/TxConfigForm/FeesDetails.tsx +0 -117
  181. package/src/components/TxConfigForm/Form.tsx +0 -574
  182. package/src/components/TxConfigForm/History.tsx +0 -131
  183. package/src/components/TxConfigForm/HistoryCard.tsx +0 -182
  184. package/src/components/TxConfigForm/PoweredBy.tsx +0 -12
  185. package/src/components/TxConfigForm/Settings.tsx +0 -143
  186. package/src/components/TxConfigForm/Summary.tsx +0 -105
  187. package/src/components/TxConfigForm/SwapPanel.tsx +0 -185
  188. package/src/components/TxConfigForm/TokenPicker.tsx +0 -176
  189. package/src/components/TxConfigForm/TopBar.tsx +0 -58
  190. package/src/components/TxConfigForm/UsdPrice.tsx +0 -44
  191. package/src/components/icons/ChevronDownIcon.tsx +0 -15
  192. package/src/components/icons/ChevronUpIcon.tsx +0 -10
  193. package/src/components/icons/CloseIcon.tsx +0 -15
  194. package/src/components/icons/HistoryIcon.tsx +0 -16
  195. package/src/components/icons/SettingsIcon.tsx +0 -16
  196. /package/src/{components → assets}/icons/ChainlinkCCIPIcon.tsx +0 -0
  197. /package/src/{components → assets}/icons/SearchIcon.tsx +0 -0
  198. /package/src/{components → assets}/icons/XSwapBadgeIcon.tsx +0 -0
  199. /package/src/{components → assets}/icons/XSwapLogo.tsx +0 -0
@@ -0,0 +1,953 @@
1
+ [
2
+ {
3
+ "inputs": [],
4
+ "stateMutability": "nonpayable",
5
+ "type": "constructor"
6
+ },
7
+ {
8
+ "inputs": [
9
+ {
10
+ "internalType": "uint64",
11
+ "name": "destinationChainSelector",
12
+ "type": "uint64"
13
+ }
14
+ ],
15
+ "name": "DestinationChainNotWhitelisted",
16
+ "type": "error"
17
+ },
18
+ {
19
+ "inputs": [],
20
+ "name": "FailedToSendNative",
21
+ "type": "error"
22
+ },
23
+ {
24
+ "inputs": [],
25
+ "name": "IncorrectArrayLength",
26
+ "type": "error"
27
+ },
28
+ {
29
+ "inputs": [
30
+ {
31
+ "internalType": "address",
32
+ "name": "token",
33
+ "type": "address"
34
+ }
35
+ ],
36
+ "name": "InsufficientTokenBalance",
37
+ "type": "error"
38
+ },
39
+ {
40
+ "inputs": [],
41
+ "name": "InvalidAddress",
42
+ "type": "error"
43
+ },
44
+ {
45
+ "inputs": [
46
+ {
47
+ "internalType": "address",
48
+ "name": "sourceTokenAddress",
49
+ "type": "address"
50
+ },
51
+ {
52
+ "internalType": "uint64",
53
+ "name": "chainId",
54
+ "type": "uint64"
55
+ },
56
+ {
57
+ "internalType": "address",
58
+ "name": "destinationTokenAddress",
59
+ "type": "address"
60
+ }
61
+ ],
62
+ "name": "InvalidMappedTokenOnSelectedChain",
63
+ "type": "error"
64
+ },
65
+ {
66
+ "inputs": [
67
+ {
68
+ "internalType": "address",
69
+ "name": "router",
70
+ "type": "address"
71
+ }
72
+ ],
73
+ "name": "InvalidRouter",
74
+ "type": "error"
75
+ },
76
+ {
77
+ "inputs": [
78
+ {
79
+ "internalType": "uint64",
80
+ "name": "chainId",
81
+ "type": "uint64"
82
+ }
83
+ ],
84
+ "name": "NoCorrespondingRouterOnSelectedChain",
85
+ "type": "error"
86
+ },
87
+ {
88
+ "inputs": [
89
+ {
90
+ "internalType": "uint256",
91
+ "name": "currentBalance",
92
+ "type": "uint256"
93
+ },
94
+ {
95
+ "internalType": "uint256",
96
+ "name": "calculatedFees",
97
+ "type": "uint256"
98
+ }
99
+ ],
100
+ "name": "NotEnoughBalance",
101
+ "type": "error"
102
+ },
103
+ {
104
+ "inputs": [
105
+ {
106
+ "internalType": "uint64",
107
+ "name": "sourceChainSelector",
108
+ "type": "uint64"
109
+ },
110
+ {
111
+ "internalType": "address",
112
+ "name": "sender",
113
+ "type": "address"
114
+ }
115
+ ],
116
+ "name": "SenderNotWhitelisted",
117
+ "type": "error"
118
+ },
119
+ {
120
+ "inputs": [
121
+ {
122
+ "internalType": "address",
123
+ "name": "token",
124
+ "type": "address"
125
+ }
126
+ ],
127
+ "name": "TokenNotWhitelisted",
128
+ "type": "error"
129
+ },
130
+ {
131
+ "anonymous": false,
132
+ "inputs": [
133
+ {
134
+ "indexed": false,
135
+ "internalType": "address",
136
+ "name": "previousAdmin",
137
+ "type": "address"
138
+ },
139
+ {
140
+ "indexed": false,
141
+ "internalType": "address",
142
+ "name": "newAdmin",
143
+ "type": "address"
144
+ }
145
+ ],
146
+ "name": "AdminChanged",
147
+ "type": "event"
148
+ },
149
+ {
150
+ "anonymous": false,
151
+ "inputs": [
152
+ {
153
+ "indexed": true,
154
+ "internalType": "address",
155
+ "name": "beacon",
156
+ "type": "address"
157
+ }
158
+ ],
159
+ "name": "BeaconUpgraded",
160
+ "type": "event"
161
+ },
162
+ {
163
+ "anonymous": false,
164
+ "inputs": [
165
+ {
166
+ "indexed": false,
167
+ "internalType": "address",
168
+ "name": "token",
169
+ "type": "address"
170
+ },
171
+ {
172
+ "indexed": false,
173
+ "internalType": "uint256",
174
+ "name": "tokenAmount",
175
+ "type": "uint256"
176
+ }
177
+ ],
178
+ "name": "EmergencyWithdraw",
179
+ "type": "event"
180
+ },
181
+ {
182
+ "anonymous": false,
183
+ "inputs": [
184
+ {
185
+ "indexed": false,
186
+ "internalType": "uint8",
187
+ "name": "version",
188
+ "type": "uint8"
189
+ }
190
+ ],
191
+ "name": "Initialized",
192
+ "type": "event"
193
+ },
194
+ {
195
+ "anonymous": false,
196
+ "inputs": [
197
+ {
198
+ "indexed": true,
199
+ "internalType": "bytes32",
200
+ "name": "messageId",
201
+ "type": "bytes32"
202
+ },
203
+ {
204
+ "indexed": true,
205
+ "internalType": "uint64",
206
+ "name": "sourceChainSelector",
207
+ "type": "uint64"
208
+ },
209
+ {
210
+ "indexed": true,
211
+ "internalType": "address",
212
+ "name": "sender",
213
+ "type": "address"
214
+ },
215
+ {
216
+ "indexed": false,
217
+ "internalType": "bytes",
218
+ "name": "data",
219
+ "type": "bytes"
220
+ }
221
+ ],
222
+ "name": "MessageReceived",
223
+ "type": "event"
224
+ },
225
+ {
226
+ "anonymous": false,
227
+ "inputs": [
228
+ {
229
+ "indexed": true,
230
+ "internalType": "bytes32",
231
+ "name": "messageId",
232
+ "type": "bytes32"
233
+ },
234
+ {
235
+ "indexed": true,
236
+ "internalType": "uint64",
237
+ "name": "destinationChainSelector",
238
+ "type": "uint64"
239
+ },
240
+ {
241
+ "indexed": true,
242
+ "internalType": "address",
243
+ "name": "sender",
244
+ "type": "address"
245
+ },
246
+ {
247
+ "indexed": false,
248
+ "internalType": "address",
249
+ "name": "receiver",
250
+ "type": "address"
251
+ },
252
+ {
253
+ "indexed": false,
254
+ "internalType": "address",
255
+ "name": "burnedToken",
256
+ "type": "address"
257
+ },
258
+ {
259
+ "indexed": false,
260
+ "internalType": "address",
261
+ "name": "mintedToken",
262
+ "type": "address"
263
+ },
264
+ {
265
+ "indexed": false,
266
+ "internalType": "uint256",
267
+ "name": "amount",
268
+ "type": "uint256"
269
+ }
270
+ ],
271
+ "name": "MessageSent",
272
+ "type": "event"
273
+ },
274
+ {
275
+ "anonymous": false,
276
+ "inputs": [
277
+ {
278
+ "indexed": true,
279
+ "internalType": "address",
280
+ "name": "previousOwner",
281
+ "type": "address"
282
+ },
283
+ {
284
+ "indexed": true,
285
+ "internalType": "address",
286
+ "name": "newOwner",
287
+ "type": "address"
288
+ }
289
+ ],
290
+ "name": "OwnershipTransferred",
291
+ "type": "event"
292
+ },
293
+ {
294
+ "anonymous": false,
295
+ "inputs": [
296
+ {
297
+ "indexed": false,
298
+ "internalType": "address",
299
+ "name": "newFeeCollectorAddress",
300
+ "type": "address"
301
+ }
302
+ ],
303
+ "name": "SetFeeCollectorAddress",
304
+ "type": "event"
305
+ },
306
+ {
307
+ "anonymous": false,
308
+ "inputs": [
309
+ {
310
+ "indexed": false,
311
+ "internalType": "address",
312
+ "name": "newFeeOracleAddress",
313
+ "type": "address"
314
+ }
315
+ ],
316
+ "name": "SetFeeOracleAddress",
317
+ "type": "event"
318
+ },
319
+ {
320
+ "anonymous": false,
321
+ "inputs": [
322
+ {
323
+ "indexed": true,
324
+ "internalType": "address",
325
+ "name": "implementation",
326
+ "type": "address"
327
+ }
328
+ ],
329
+ "name": "Upgraded",
330
+ "type": "event"
331
+ },
332
+ {
333
+ "inputs": [
334
+ {
335
+ "components": [
336
+ {
337
+ "internalType": "bytes32",
338
+ "name": "messageId",
339
+ "type": "bytes32"
340
+ },
341
+ {
342
+ "internalType": "uint64",
343
+ "name": "sourceChainSelector",
344
+ "type": "uint64"
345
+ },
346
+ {
347
+ "internalType": "bytes",
348
+ "name": "sender",
349
+ "type": "bytes"
350
+ },
351
+ {
352
+ "internalType": "bytes",
353
+ "name": "data",
354
+ "type": "bytes"
355
+ },
356
+ {
357
+ "components": [
358
+ {
359
+ "internalType": "address",
360
+ "name": "token",
361
+ "type": "address"
362
+ },
363
+ {
364
+ "internalType": "uint256",
365
+ "name": "amount",
366
+ "type": "uint256"
367
+ }
368
+ ],
369
+ "internalType": "struct Client.EVMTokenAmount[]",
370
+ "name": "destTokenAmounts",
371
+ "type": "tuple[]"
372
+ }
373
+ ],
374
+ "internalType": "struct Client.Any2EVMMessage",
375
+ "name": "message",
376
+ "type": "tuple"
377
+ }
378
+ ],
379
+ "name": "ccipReceive",
380
+ "outputs": [],
381
+ "stateMutability": "nonpayable",
382
+ "type": "function"
383
+ },
384
+ {
385
+ "inputs": [
386
+ {
387
+ "internalType": "uint64",
388
+ "name": "",
389
+ "type": "uint64"
390
+ }
391
+ ],
392
+ "name": "chainSelectorToCorrespondingRouterMap",
393
+ "outputs": [
394
+ {
395
+ "internalType": "address",
396
+ "name": "",
397
+ "type": "address"
398
+ }
399
+ ],
400
+ "stateMutability": "view",
401
+ "type": "function"
402
+ },
403
+ {
404
+ "inputs": [
405
+ {
406
+ "internalType": "address",
407
+ "name": "_tokenToWithdraw",
408
+ "type": "address"
409
+ },
410
+ {
411
+ "internalType": "uint256",
412
+ "name": "_amountToWithdraw",
413
+ "type": "uint256"
414
+ }
415
+ ],
416
+ "name": "emergencyWithdraw",
417
+ "outputs": [],
418
+ "stateMutability": "nonpayable",
419
+ "type": "function"
420
+ },
421
+ {
422
+ "inputs": [],
423
+ "name": "feeCollectorAddress",
424
+ "outputs": [
425
+ {
426
+ "internalType": "address",
427
+ "name": "",
428
+ "type": "address"
429
+ }
430
+ ],
431
+ "stateMutability": "view",
432
+ "type": "function"
433
+ },
434
+ {
435
+ "inputs": [],
436
+ "name": "feeOracleAddress",
437
+ "outputs": [
438
+ {
439
+ "internalType": "address",
440
+ "name": "",
441
+ "type": "address"
442
+ }
443
+ ],
444
+ "stateMutability": "view",
445
+ "type": "function"
446
+ },
447
+ {
448
+ "inputs": [
449
+ {
450
+ "internalType": "address",
451
+ "name": "_paymentToken",
452
+ "type": "address"
453
+ },
454
+ {
455
+ "internalType": "uint64",
456
+ "name": "_destinationChainSelector",
457
+ "type": "uint64"
458
+ },
459
+ {
460
+ "components": [
461
+ {
462
+ "internalType": "address",
463
+ "name": "receiver",
464
+ "type": "address"
465
+ },
466
+ {
467
+ "internalType": "address",
468
+ "name": "sourceTokenAddress",
469
+ "type": "address"
470
+ },
471
+ {
472
+ "internalType": "address",
473
+ "name": "destinationTokenAddress",
474
+ "type": "address"
475
+ },
476
+ {
477
+ "internalType": "uint256",
478
+ "name": "amount",
479
+ "type": "uint256"
480
+ }
481
+ ],
482
+ "internalType": "struct TokenData",
483
+ "name": "_tokenData",
484
+ "type": "tuple"
485
+ },
486
+ {
487
+ "internalType": "uint256",
488
+ "name": "_gasLimit",
489
+ "type": "uint256"
490
+ }
491
+ ],
492
+ "name": "getFees",
493
+ "outputs": [
494
+ {
495
+ "components": [
496
+ {
497
+ "internalType": "uint256",
498
+ "name": "ccipFee",
499
+ "type": "uint256"
500
+ },
501
+ {
502
+ "components": [
503
+ {
504
+ "internalType": "uint256",
505
+ "name": "tokenFee",
506
+ "type": "uint256"
507
+ },
508
+ {
509
+ "internalType": "uint256",
510
+ "name": "nativeFee",
511
+ "type": "uint256"
512
+ }
513
+ ],
514
+ "internalType": "struct XSwapFee",
515
+ "name": "xSwapFee",
516
+ "type": "tuple"
517
+ }
518
+ ],
519
+ "internalType": "struct MessageFees",
520
+ "name": "fees",
521
+ "type": "tuple"
522
+ }
523
+ ],
524
+ "stateMutability": "view",
525
+ "type": "function"
526
+ },
527
+ {
528
+ "inputs": [],
529
+ "name": "getRouter",
530
+ "outputs": [
531
+ {
532
+ "internalType": "address",
533
+ "name": "",
534
+ "type": "address"
535
+ }
536
+ ],
537
+ "stateMutability": "view",
538
+ "type": "function"
539
+ },
540
+ {
541
+ "inputs": [
542
+ {
543
+ "internalType": "address",
544
+ "name": "_ccipRouter",
545
+ "type": "address"
546
+ },
547
+ {
548
+ "internalType": "address",
549
+ "name": "_feeOracle",
550
+ "type": "address"
551
+ },
552
+ {
553
+ "internalType": "address",
554
+ "name": "_feeCollector",
555
+ "type": "address"
556
+ },
557
+ {
558
+ "internalType": "address",
559
+ "name": "_owner",
560
+ "type": "address"
561
+ }
562
+ ],
563
+ "name": "initialize",
564
+ "outputs": [],
565
+ "stateMutability": "nonpayable",
566
+ "type": "function"
567
+ },
568
+ {
569
+ "inputs": [],
570
+ "name": "owner",
571
+ "outputs": [
572
+ {
573
+ "internalType": "address",
574
+ "name": "",
575
+ "type": "address"
576
+ }
577
+ ],
578
+ "stateMutability": "view",
579
+ "type": "function"
580
+ },
581
+ {
582
+ "inputs": [],
583
+ "name": "proxiableUUID",
584
+ "outputs": [
585
+ {
586
+ "internalType": "bytes32",
587
+ "name": "",
588
+ "type": "bytes32"
589
+ }
590
+ ],
591
+ "stateMutability": "view",
592
+ "type": "function"
593
+ },
594
+ {
595
+ "inputs": [],
596
+ "name": "renounceOwnership",
597
+ "outputs": [],
598
+ "stateMutability": "nonpayable",
599
+ "type": "function"
600
+ },
601
+ {
602
+ "inputs": [
603
+ {
604
+ "internalType": "address",
605
+ "name": "_paymentToken",
606
+ "type": "address"
607
+ },
608
+ {
609
+ "internalType": "uint64",
610
+ "name": "_destinationChainSelector",
611
+ "type": "uint64"
612
+ },
613
+ {
614
+ "components": [
615
+ {
616
+ "internalType": "address",
617
+ "name": "receiver",
618
+ "type": "address"
619
+ },
620
+ {
621
+ "internalType": "address",
622
+ "name": "sourceTokenAddress",
623
+ "type": "address"
624
+ },
625
+ {
626
+ "internalType": "address",
627
+ "name": "destinationTokenAddress",
628
+ "type": "address"
629
+ },
630
+ {
631
+ "internalType": "uint256",
632
+ "name": "amount",
633
+ "type": "uint256"
634
+ }
635
+ ],
636
+ "internalType": "struct TokenData",
637
+ "name": "_tokenData",
638
+ "type": "tuple"
639
+ },
640
+ {
641
+ "internalType": "uint256",
642
+ "name": "_gasLimit",
643
+ "type": "uint256"
644
+ }
645
+ ],
646
+ "name": "sendMessage",
647
+ "outputs": [
648
+ {
649
+ "internalType": "bytes32",
650
+ "name": "messageId",
651
+ "type": "bytes32"
652
+ }
653
+ ],
654
+ "stateMutability": "payable",
655
+ "type": "function"
656
+ },
657
+ {
658
+ "inputs": [
659
+ {
660
+ "internalType": "address",
661
+ "name": "_feeCollectorAddress",
662
+ "type": "address"
663
+ }
664
+ ],
665
+ "name": "setFeeCollectorAddress",
666
+ "outputs": [],
667
+ "stateMutability": "nonpayable",
668
+ "type": "function"
669
+ },
670
+ {
671
+ "inputs": [
672
+ {
673
+ "internalType": "address",
674
+ "name": "_feeOracleAddress",
675
+ "type": "address"
676
+ }
677
+ ],
678
+ "name": "setFeeOracleAddress",
679
+ "outputs": [],
680
+ "stateMutability": "nonpayable",
681
+ "type": "function"
682
+ },
683
+ {
684
+ "inputs": [
685
+ {
686
+ "internalType": "address",
687
+ "name": "_sourceTokenAddress",
688
+ "type": "address"
689
+ },
690
+ {
691
+ "internalType": "uint64",
692
+ "name": "_destinationChainSelector",
693
+ "type": "uint64"
694
+ },
695
+ {
696
+ "internalType": "address",
697
+ "name": "_destinationTokenAddress",
698
+ "type": "address"
699
+ }
700
+ ],
701
+ "name": "setMappedTokens",
702
+ "outputs": [],
703
+ "stateMutability": "nonpayable",
704
+ "type": "function"
705
+ },
706
+ {
707
+ "inputs": [
708
+ {
709
+ "internalType": "address",
710
+ "name": "_router",
711
+ "type": "address"
712
+ }
713
+ ],
714
+ "name": "setRouter",
715
+ "outputs": [],
716
+ "stateMutability": "nonpayable",
717
+ "type": "function"
718
+ },
719
+ {
720
+ "inputs": [
721
+ {
722
+ "internalType": "address",
723
+ "name": "",
724
+ "type": "address"
725
+ },
726
+ {
727
+ "internalType": "uint64",
728
+ "name": "",
729
+ "type": "uint64"
730
+ }
731
+ ],
732
+ "name": "sourceTokenToDestinationChainSelectorToDestinationTokenMap",
733
+ "outputs": [
734
+ {
735
+ "internalType": "address",
736
+ "name": "",
737
+ "type": "address"
738
+ }
739
+ ],
740
+ "stateMutability": "view",
741
+ "type": "function"
742
+ },
743
+ {
744
+ "inputs": [
745
+ {
746
+ "internalType": "bytes4",
747
+ "name": "interfaceId",
748
+ "type": "bytes4"
749
+ }
750
+ ],
751
+ "name": "supportsInterface",
752
+ "outputs": [
753
+ {
754
+ "internalType": "bool",
755
+ "name": "",
756
+ "type": "bool"
757
+ }
758
+ ],
759
+ "stateMutability": "pure",
760
+ "type": "function"
761
+ },
762
+ {
763
+ "inputs": [
764
+ {
765
+ "internalType": "address",
766
+ "name": "newOwner",
767
+ "type": "address"
768
+ }
769
+ ],
770
+ "name": "transferOwnership",
771
+ "outputs": [],
772
+ "stateMutability": "nonpayable",
773
+ "type": "function"
774
+ },
775
+ {
776
+ "inputs": [
777
+ {
778
+ "internalType": "uint64",
779
+ "name": "_chainSelector",
780
+ "type": "uint64"
781
+ },
782
+ {
783
+ "internalType": "address",
784
+ "name": "_correspondingRouter",
785
+ "type": "address"
786
+ }
787
+ ],
788
+ "name": "updateChainSelectorToCorrespondingRouterMap",
789
+ "outputs": [],
790
+ "stateMutability": "nonpayable",
791
+ "type": "function"
792
+ },
793
+ {
794
+ "inputs": [
795
+ {
796
+ "internalType": "uint64[]",
797
+ "name": "_chainSelectors",
798
+ "type": "uint64[]"
799
+ },
800
+ {
801
+ "internalType": "address[]",
802
+ "name": "_correspondingRouters",
803
+ "type": "address[]"
804
+ }
805
+ ],
806
+ "name": "updateChainSelectorToCorrespondingRouterMapMany",
807
+ "outputs": [],
808
+ "stateMutability": "nonpayable",
809
+ "type": "function"
810
+ },
811
+ {
812
+ "inputs": [
813
+ {
814
+ "internalType": "uint64",
815
+ "name": "_sourceChainSelector",
816
+ "type": "uint64"
817
+ },
818
+ {
819
+ "internalType": "address",
820
+ "name": "_sender",
821
+ "type": "address"
822
+ },
823
+ {
824
+ "internalType": "bool",
825
+ "name": "_isWhitelisted",
826
+ "type": "bool"
827
+ }
828
+ ],
829
+ "name": "updateWhitelistSender",
830
+ "outputs": [],
831
+ "stateMutability": "nonpayable",
832
+ "type": "function"
833
+ },
834
+ {
835
+ "inputs": [
836
+ {
837
+ "internalType": "uint64[]",
838
+ "name": "_sourceChainSelectors",
839
+ "type": "uint64[]"
840
+ },
841
+ {
842
+ "internalType": "address[]",
843
+ "name": "_senders",
844
+ "type": "address[]"
845
+ },
846
+ {
847
+ "internalType": "bool[]",
848
+ "name": "_areWhitelisted",
849
+ "type": "bool[]"
850
+ }
851
+ ],
852
+ "name": "updateWhitelistSenderMany",
853
+ "outputs": [],
854
+ "stateMutability": "nonpayable",
855
+ "type": "function"
856
+ },
857
+ {
858
+ "inputs": [
859
+ {
860
+ "internalType": "address",
861
+ "name": "_token",
862
+ "type": "address"
863
+ },
864
+ {
865
+ "internalType": "bool",
866
+ "name": "_isWhitelisted",
867
+ "type": "bool"
868
+ }
869
+ ],
870
+ "name": "updateWhitelistToken",
871
+ "outputs": [],
872
+ "stateMutability": "nonpayable",
873
+ "type": "function"
874
+ },
875
+ {
876
+ "inputs": [
877
+ {
878
+ "internalType": "address",
879
+ "name": "newImplementation",
880
+ "type": "address"
881
+ }
882
+ ],
883
+ "name": "upgradeTo",
884
+ "outputs": [],
885
+ "stateMutability": "nonpayable",
886
+ "type": "function"
887
+ },
888
+ {
889
+ "inputs": [
890
+ {
891
+ "internalType": "address",
892
+ "name": "newImplementation",
893
+ "type": "address"
894
+ },
895
+ {
896
+ "internalType": "bytes",
897
+ "name": "data",
898
+ "type": "bytes"
899
+ }
900
+ ],
901
+ "name": "upgradeToAndCall",
902
+ "outputs": [],
903
+ "stateMutability": "payable",
904
+ "type": "function"
905
+ },
906
+ {
907
+ "inputs": [
908
+ {
909
+ "internalType": "uint64",
910
+ "name": "",
911
+ "type": "uint64"
912
+ },
913
+ {
914
+ "internalType": "address",
915
+ "name": "",
916
+ "type": "address"
917
+ }
918
+ ],
919
+ "name": "whitelistedSenders",
920
+ "outputs": [
921
+ {
922
+ "internalType": "bool",
923
+ "name": "",
924
+ "type": "bool"
925
+ }
926
+ ],
927
+ "stateMutability": "view",
928
+ "type": "function"
929
+ },
930
+ {
931
+ "inputs": [
932
+ {
933
+ "internalType": "address",
934
+ "name": "",
935
+ "type": "address"
936
+ }
937
+ ],
938
+ "name": "whitelistedTokens",
939
+ "outputs": [
940
+ {
941
+ "internalType": "bool",
942
+ "name": "",
943
+ "type": "bool"
944
+ }
945
+ ],
946
+ "stateMutability": "view",
947
+ "type": "function"
948
+ },
949
+ {
950
+ "stateMutability": "payable",
951
+ "type": "receive"
952
+ }
953
+ ]