@swapkit/helpers 2.4.3 → 3.0.0-beta.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 (106) hide show
  1. package/dist/api/index.cjs +3 -0
  2. package/dist/api/index.cjs.map +16 -0
  3. package/dist/api/index.js +3 -0
  4. package/dist/api/index.js.map +16 -0
  5. package/dist/chunk-fazw0jvt.js +3 -0
  6. package/dist/chunk-fazw0jvt.js.map +9 -0
  7. package/dist/chunk-nm00d52v.js +4 -0
  8. package/dist/chunk-nm00d52v.js.map +9 -0
  9. package/dist/contracts/index.cjs +3 -0
  10. package/dist/contracts/index.cjs.map +38 -0
  11. package/dist/contracts/index.js +3 -0
  12. package/dist/contracts/index.js.map +38 -0
  13. package/dist/index.cjs +6 -0
  14. package/dist/index.cjs.map +29 -0
  15. package/dist/index.js +3 -3
  16. package/dist/index.js.map +19 -20
  17. package/dist/tokens/index.cjs +3 -0
  18. package/dist/tokens/index.cjs.map +23 -0
  19. package/dist/tokens/index.js +3 -0
  20. package/dist/tokens/index.js.map +23 -0
  21. package/package.json +31 -15
  22. package/src/api/index.ts +19 -0
  23. package/src/api/microgard/endpoints.ts +83 -0
  24. package/src/api/microgard/types.ts +60 -0
  25. package/src/api/midgard/endpoints.ts +166 -0
  26. package/src/api/midgard/types.ts +155 -0
  27. package/src/api/swapkitApi/endpoints.ts +266 -0
  28. package/src/api/swapkitApi/types.ts +772 -0
  29. package/src/api/thornode/endpoints.ts +78 -0
  30. package/src/api/thornode/types.ts +241 -0
  31. package/src/api/thorswapStatic/endpoints.ts +30 -0
  32. package/src/api/thorswapStatic/types.ts +18 -0
  33. package/src/contracts/abis/avaxGeneric.ts +92 -0
  34. package/src/contracts/abis/avaxWoofi.ts +145 -0
  35. package/src/contracts/abis/bscGeneric.ts +106 -0
  36. package/src/contracts/abis/chainflipGateway.ts +330 -0
  37. package/src/contracts/abis/erc20.ts +99 -0
  38. package/src/contracts/abis/ethGeneric.ts +92 -0
  39. package/src/contracts/abis/mayaEvmVaults.ts +331 -0
  40. package/src/contracts/abis/pancakeV2.ts +145 -0
  41. package/src/contracts/abis/pangolin.ts +120 -0
  42. package/src/contracts/abis/sushiswap.ts +120 -0
  43. package/src/contracts/abis/tcEthVault.ts +650 -0
  44. package/src/contracts/abis/traderJoe.ts +120 -0
  45. package/src/contracts/abis/uniswapV2.ts +120 -0
  46. package/src/contracts/abis/uniswapV2Leg.ts +128 -0
  47. package/src/contracts/abis/uniswapV3_100.ts +128 -0
  48. package/src/contracts/abis/uniswapV3_10000.ts +128 -0
  49. package/src/contracts/abis/uniswapV3_3000.ts +128 -0
  50. package/src/contracts/abis/uniswapV3_500.ts +128 -0
  51. package/src/contracts/index.ts +95 -0
  52. package/src/contracts/routers/index.ts +58 -0
  53. package/src/contracts/routers/kyber.ts +402 -0
  54. package/src/contracts/routers/oneinch.ts +2188 -0
  55. package/src/contracts/routers/pancakeswap.ts +340 -0
  56. package/src/contracts/routers/pangolin.ts +340 -0
  57. package/src/contracts/routers/sushiswap.ts +340 -0
  58. package/src/contracts/routers/traderJoe.ts +340 -0
  59. package/src/contracts/routers/uniswapv2.ts +340 -0
  60. package/src/contracts/routers/uniswapv3.ts +254 -0
  61. package/src/contracts/routers/woofi.ts +171 -0
  62. package/src/index.ts +11 -12
  63. package/src/modules/__tests__/assetValue.test.ts +0 -2
  64. package/src/modules/__tests__/swapKitConfig.test.ts +37 -0
  65. package/src/modules/assetValue.ts +26 -92
  66. package/src/modules/bigIntArithmetics.ts +6 -2
  67. package/src/modules/requestClient.ts +26 -35
  68. package/src/modules/swapKitConfig.ts +131 -0
  69. package/src/modules/swapKitError.ts +6 -6
  70. package/src/tokens/index.ts +15 -0
  71. package/src/tokens/lists/camelot_v3.ts +15920 -0
  72. package/src/tokens/lists/caviar_v1.ts +1694 -0
  73. package/src/tokens/lists/chainflip.ts +104 -0
  74. package/src/tokens/lists/index.ts +13 -0
  75. package/src/tokens/lists/jupiter.ts +29606 -0
  76. package/src/tokens/lists/mayachain.ts +513 -0
  77. package/src/tokens/lists/oneinch.ts +14238 -0
  78. package/src/tokens/lists/openocean_v2.ts +11514 -0
  79. package/src/tokens/lists/pancakeswap.ts +4296 -0
  80. package/src/tokens/lists/pangolin_v1.ts +175 -0
  81. package/src/tokens/lists/sushiswap_v2.ts +965 -0
  82. package/src/tokens/lists/thorchain.ts +669 -0
  83. package/src/tokens/lists/traderjoe_v2.ts +1384 -0
  84. package/src/tokens/lists/uniswap_v2.ts +5596 -0
  85. package/src/tokens/lists/uniswap_v3.ts +5946 -0
  86. package/src/types/chains.ts +26 -46
  87. package/src/types/commonTypes.ts +3 -90
  88. package/src/types/index.ts +3 -4
  89. package/src/types/sdk.ts +0 -24
  90. package/src/types/tokens.ts +1 -1
  91. package/src/types/wallet.ts +37 -21
  92. package/src/{helpers → utils}/asset.ts +49 -19
  93. package/src/{helpers → utils}/derivationPath.ts +7 -2
  94. package/src/{helpers → utils}/memo.ts +0 -65
  95. package/src/{helpers → utils}/others.ts +12 -5
  96. package/src/utils/plugin.ts +13 -0
  97. package/src/{helpers/web3wallets.ts → utils/wallets.ts} +175 -148
  98. package/src/modules/walletUtils.ts +0 -30
  99. package/src/types/network.ts +0 -49
  100. /package/src/{helpers → utils}/__tests__/asset.test.ts +0 -0
  101. /package/src/{helpers/__tests__/derivationPath.ts → utils/__tests__/derivationPath.test.ts} +0 -0
  102. /package/src/{helpers → utils}/__tests__/memo.test.ts +0 -0
  103. /package/src/{helpers → utils}/__tests__/others.test.ts +0 -0
  104. /package/src/{helpers → utils}/__tests__/validators.test.ts +0 -0
  105. /package/src/{helpers → utils}/liquidity.ts +0 -0
  106. /package/src/{helpers → utils}/validators.ts +0 -0
@@ -0,0 +1,106 @@
1
+ export const bscGeneric = [
2
+ {
3
+ inputs: [{ internalType: "address", name: "_ttp", type: "address" }],
4
+ stateMutability: "nonpayable",
5
+ type: "constructor",
6
+ },
7
+ {
8
+ anonymous: false,
9
+ inputs: [
10
+ { indexed: false, internalType: "uint256", name: "fee", type: "uint256" },
11
+ { indexed: false, internalType: "address", name: "feeRecipient", type: "address" },
12
+ ],
13
+ name: "FeeSet",
14
+ type: "event",
15
+ },
16
+ {
17
+ anonymous: false,
18
+ inputs: [
19
+ { indexed: true, internalType: "address", name: "owner", type: "address" },
20
+ { indexed: false, internalType: "bool", name: "active", type: "bool" },
21
+ ],
22
+ name: "OwnerSet",
23
+ type: "event",
24
+ },
25
+ {
26
+ anonymous: false,
27
+ inputs: [
28
+ { indexed: false, internalType: "address", name: "from", type: "address" },
29
+ { indexed: false, internalType: "address", name: "token", type: "address" },
30
+ { indexed: false, internalType: "uint256", name: "amount", type: "uint256" },
31
+ { indexed: false, internalType: "uint256", name: "out", type: "uint256" },
32
+ { indexed: false, internalType: "uint256", name: "fee", type: "uint256" },
33
+ { indexed: false, internalType: "address", name: "vault", type: "address" },
34
+ { indexed: false, internalType: "string", name: "memo", type: "string" },
35
+ ],
36
+ name: "SwapIn",
37
+ type: "event",
38
+ },
39
+ {
40
+ inputs: [],
41
+ name: "fee",
42
+ outputs: [{ internalType: "uint256", name: "", type: "uint256" }],
43
+ stateMutability: "view",
44
+ type: "function",
45
+ },
46
+ {
47
+ inputs: [],
48
+ name: "feeRecipient",
49
+ outputs: [{ internalType: "address", name: "", type: "address" }],
50
+ stateMutability: "view",
51
+ type: "function",
52
+ },
53
+ {
54
+ inputs: [{ internalType: "address", name: "", type: "address" }],
55
+ name: "owners",
56
+ outputs: [{ internalType: "bool", name: "", type: "bool" }],
57
+ stateMutability: "view",
58
+ type: "function",
59
+ },
60
+ {
61
+ inputs: [
62
+ { internalType: "uint256", name: "_fee", type: "uint256" },
63
+ { internalType: "address", name: "_feeRecipient", type: "address" },
64
+ ],
65
+ name: "setFee",
66
+ outputs: [],
67
+ stateMutability: "nonpayable",
68
+ type: "function",
69
+ },
70
+ {
71
+ inputs: [
72
+ { internalType: "address", name: "owner", type: "address" },
73
+ { internalType: "bool", name: "active", type: "bool" },
74
+ ],
75
+ name: "setOwner",
76
+ outputs: [],
77
+ stateMutability: "nonpayable",
78
+ type: "function",
79
+ },
80
+ {
81
+ inputs: [
82
+ { internalType: "address", name: "router", type: "address" },
83
+ { internalType: "address", name: "vault", type: "address" },
84
+ { internalType: "string", name: "memo", type: "string" },
85
+ { internalType: "address", name: "token", type: "address" },
86
+ { internalType: "uint256", name: "amount", type: "uint256" },
87
+ { internalType: "address", name: "swapRouter", type: "address" },
88
+ { internalType: "bytes", name: "data", type: "bytes" },
89
+ { internalType: "uint256", name: "deadline", type: "uint256" },
90
+ ],
91
+ name: "swapIn",
92
+ outputs: [],
93
+ stateMutability: "nonpayable",
94
+ type: "function",
95
+ },
96
+ {
97
+ inputs: [],
98
+ name: "tokenTransferProxy",
99
+ outputs: [
100
+ { internalType: "contract TSAggregatorTokenTransferProxy", name: "", type: "address" },
101
+ ],
102
+ stateMutability: "view",
103
+ type: "function",
104
+ },
105
+ { stateMutability: "payable", type: "receive" },
106
+ ];
@@ -0,0 +1,330 @@
1
+ export const chainflipGateway = [
2
+ {
3
+ inputs: [
4
+ { internalType: "contract IKeyManager", name: "keyManager", type: "address" },
5
+ { internalType: "uint256", name: "minFunding", type: "uint256" },
6
+ { internalType: "uint48", name: "redemptionDelay", type: "uint48" },
7
+ ],
8
+ stateMutability: "nonpayable",
9
+ type: "constructor",
10
+ },
11
+ {
12
+ anonymous: false,
13
+ inputs: [
14
+ { indexed: false, internalType: "bool", name: "communityGuardDisabled", type: "bool" },
15
+ ],
16
+ name: "CommunityGuardDisabled",
17
+ type: "event",
18
+ },
19
+ {
20
+ anonymous: false,
21
+ inputs: [{ indexed: false, internalType: "address", name: "flip", type: "address" }],
22
+ name: "FLIPSet",
23
+ type: "event",
24
+ },
25
+ {
26
+ anonymous: false,
27
+ inputs: [
28
+ { indexed: false, internalType: "uint256", name: "oldSupply", type: "uint256" },
29
+ { indexed: false, internalType: "uint256", name: "newSupply", type: "uint256" },
30
+ { indexed: false, internalType: "uint256", name: "stateChainBlockNumber", type: "uint256" },
31
+ ],
32
+ name: "FlipSupplyUpdated",
33
+ type: "event",
34
+ },
35
+ {
36
+ anonymous: false,
37
+ inputs: [
38
+ { indexed: true, internalType: "bytes32", name: "nodeID", type: "bytes32" },
39
+ { indexed: false, internalType: "uint256", name: "amount", type: "uint256" },
40
+ { indexed: false, internalType: "address", name: "funder", type: "address" },
41
+ ],
42
+ name: "Funded",
43
+ type: "event",
44
+ },
45
+ {
46
+ anonymous: false,
47
+ inputs: [
48
+ { indexed: false, internalType: "address", name: "to", type: "address" },
49
+ { indexed: false, internalType: "uint256", name: "amount", type: "uint256" },
50
+ ],
51
+ name: "GovernanceWithdrawal",
52
+ type: "event",
53
+ },
54
+ {
55
+ anonymous: false,
56
+ inputs: [
57
+ { indexed: false, internalType: "uint256", name: "oldMinFunding", type: "uint256" },
58
+ { indexed: false, internalType: "uint256", name: "newMinFunding", type: "uint256" },
59
+ ],
60
+ name: "MinFundingChanged",
61
+ type: "event",
62
+ },
63
+ {
64
+ anonymous: false,
65
+ inputs: [
66
+ { indexed: true, internalType: "bytes32", name: "nodeID", type: "bytes32" },
67
+ { indexed: false, internalType: "uint256", name: "amount", type: "uint256" },
68
+ ],
69
+ name: "RedemptionExecuted",
70
+ type: "event",
71
+ },
72
+ {
73
+ anonymous: false,
74
+ inputs: [
75
+ { indexed: true, internalType: "bytes32", name: "nodeID", type: "bytes32" },
76
+ { indexed: false, internalType: "uint256", name: "amount", type: "uint256" },
77
+ ],
78
+ name: "RedemptionExpired",
79
+ type: "event",
80
+ },
81
+ {
82
+ anonymous: false,
83
+ inputs: [
84
+ { indexed: true, internalType: "bytes32", name: "nodeID", type: "bytes32" },
85
+ { indexed: false, internalType: "uint256", name: "amount", type: "uint256" },
86
+ { indexed: true, internalType: "address", name: "redeemAddress", type: "address" },
87
+ { indexed: false, internalType: "uint48", name: "startTime", type: "uint48" },
88
+ { indexed: false, internalType: "uint48", name: "expiryTime", type: "uint48" },
89
+ { indexed: false, internalType: "address", name: "executor", type: "address" },
90
+ ],
91
+ name: "RedemptionRegistered",
92
+ type: "event",
93
+ },
94
+ {
95
+ anonymous: false,
96
+ inputs: [{ indexed: false, internalType: "bool", name: "suspended", type: "bool" }],
97
+ name: "Suspended",
98
+ type: "event",
99
+ },
100
+ {
101
+ anonymous: false,
102
+ inputs: [{ indexed: false, internalType: "address", name: "keyManager", type: "address" }],
103
+ name: "UpdatedKeyManager",
104
+ type: "event",
105
+ },
106
+ {
107
+ inputs: [],
108
+ name: "REDEMPTION_DELAY",
109
+ outputs: [{ internalType: "uint48", name: "", type: "uint48" }],
110
+ stateMutability: "view",
111
+ type: "function",
112
+ },
113
+ {
114
+ inputs: [],
115
+ name: "disableCommunityGuard",
116
+ outputs: [],
117
+ stateMutability: "nonpayable",
118
+ type: "function",
119
+ },
120
+ {
121
+ inputs: [],
122
+ name: "enableCommunityGuard",
123
+ outputs: [],
124
+ stateMutability: "nonpayable",
125
+ type: "function",
126
+ },
127
+ {
128
+ inputs: [{ internalType: "bytes32", name: "nodeID", type: "bytes32" }],
129
+ name: "executeRedemption",
130
+ outputs: [
131
+ { internalType: "address", name: "", type: "address" },
132
+ { internalType: "uint256", name: "", type: "uint256" },
133
+ ],
134
+ stateMutability: "nonpayable",
135
+ type: "function",
136
+ },
137
+ {
138
+ inputs: [
139
+ { internalType: "bytes32", name: "nodeID", type: "bytes32" },
140
+ { internalType: "uint256", name: "amount", type: "uint256" },
141
+ ],
142
+ name: "fundStateChainAccount",
143
+ outputs: [],
144
+ stateMutability: "nonpayable",
145
+ type: "function",
146
+ },
147
+ {
148
+ inputs: [],
149
+ name: "getCommunityGuardDisabled",
150
+ outputs: [{ internalType: "bool", name: "", type: "bool" }],
151
+ stateMutability: "view",
152
+ type: "function",
153
+ },
154
+ {
155
+ inputs: [],
156
+ name: "getCommunityKey",
157
+ outputs: [{ internalType: "address", name: "", type: "address" }],
158
+ stateMutability: "view",
159
+ type: "function",
160
+ },
161
+ {
162
+ inputs: [],
163
+ name: "getFLIP",
164
+ outputs: [{ internalType: "contract IFLIP", name: "", type: "address" }],
165
+ stateMutability: "view",
166
+ type: "function",
167
+ },
168
+ {
169
+ inputs: [],
170
+ name: "getGovernor",
171
+ outputs: [{ internalType: "address", name: "", type: "address" }],
172
+ stateMutability: "view",
173
+ type: "function",
174
+ },
175
+ {
176
+ inputs: [],
177
+ name: "getKeyManager",
178
+ outputs: [{ internalType: "contract IKeyManager", name: "", type: "address" }],
179
+ stateMutability: "view",
180
+ type: "function",
181
+ },
182
+ {
183
+ inputs: [],
184
+ name: "getLastSupplyUpdateBlockNumber",
185
+ outputs: [{ internalType: "uint256", name: "", type: "uint256" }],
186
+ stateMutability: "view",
187
+ type: "function",
188
+ },
189
+ {
190
+ inputs: [],
191
+ name: "getMinimumFunding",
192
+ outputs: [{ internalType: "uint256", name: "", type: "uint256" }],
193
+ stateMutability: "view",
194
+ type: "function",
195
+ },
196
+ {
197
+ inputs: [{ internalType: "bytes32", name: "nodeID", type: "bytes32" }],
198
+ name: "getPendingRedemption",
199
+ outputs: [
200
+ {
201
+ components: [
202
+ { internalType: "uint256", name: "amount", type: "uint256" },
203
+ { internalType: "address", name: "redeemAddress", type: "address" },
204
+ { internalType: "uint48", name: "startTime", type: "uint48" },
205
+ { internalType: "uint48", name: "expiryTime", type: "uint48" },
206
+ { internalType: "address", name: "executor", type: "address" },
207
+ ],
208
+ internalType: "struct IStateChainGateway.Redemption",
209
+ name: "",
210
+ type: "tuple",
211
+ },
212
+ ],
213
+ stateMutability: "view",
214
+ type: "function",
215
+ },
216
+ {
217
+ inputs: [],
218
+ name: "getSuspendedState",
219
+ outputs: [{ internalType: "bool", name: "", type: "bool" }],
220
+ stateMutability: "view",
221
+ type: "function",
222
+ },
223
+ {
224
+ inputs: [],
225
+ name: "govUpdateFlipIssuer",
226
+ outputs: [],
227
+ stateMutability: "nonpayable",
228
+ type: "function",
229
+ },
230
+ { inputs: [], name: "govWithdraw", outputs: [], stateMutability: "nonpayable", type: "function" },
231
+ {
232
+ inputs: [
233
+ {
234
+ components: [
235
+ { internalType: "uint256", name: "sig", type: "uint256" },
236
+ { internalType: "uint256", name: "nonce", type: "uint256" },
237
+ { internalType: "address", name: "kTimesGAddress", type: "address" },
238
+ ],
239
+ internalType: "struct IShared.SigData",
240
+ name: "sigData",
241
+ type: "tuple",
242
+ },
243
+ { internalType: "bytes32", name: "nodeID", type: "bytes32" },
244
+ { internalType: "uint256", name: "amount", type: "uint256" },
245
+ { internalType: "address", name: "redeemAddress", type: "address" },
246
+ { internalType: "uint48", name: "expiryTime", type: "uint48" },
247
+ { internalType: "address", name: "executor", type: "address" },
248
+ ],
249
+ name: "registerRedemption",
250
+ outputs: [],
251
+ stateMutability: "nonpayable",
252
+ type: "function",
253
+ },
254
+ { inputs: [], name: "resume", outputs: [], stateMutability: "nonpayable", type: "function" },
255
+ {
256
+ inputs: [{ internalType: "contract IFLIP", name: "flip", type: "address" }],
257
+ name: "setFlip",
258
+ outputs: [],
259
+ stateMutability: "nonpayable",
260
+ type: "function",
261
+ },
262
+ {
263
+ inputs: [{ internalType: "uint256", name: "newMinFunding", type: "uint256" }],
264
+ name: "setMinFunding",
265
+ outputs: [],
266
+ stateMutability: "nonpayable",
267
+ type: "function",
268
+ },
269
+ { inputs: [], name: "suspend", outputs: [], stateMutability: "nonpayable", type: "function" },
270
+ {
271
+ inputs: [
272
+ {
273
+ components: [
274
+ { internalType: "uint256", name: "sig", type: "uint256" },
275
+ { internalType: "uint256", name: "nonce", type: "uint256" },
276
+ { internalType: "address", name: "kTimesGAddress", type: "address" },
277
+ ],
278
+ internalType: "struct IShared.SigData",
279
+ name: "sigData",
280
+ type: "tuple",
281
+ },
282
+ { internalType: "address", name: "newIssuer", type: "address" },
283
+ { internalType: "bool", name: "omitChecks", type: "bool" },
284
+ ],
285
+ name: "updateFlipIssuer",
286
+ outputs: [],
287
+ stateMutability: "nonpayable",
288
+ type: "function",
289
+ },
290
+ {
291
+ inputs: [
292
+ {
293
+ components: [
294
+ { internalType: "uint256", name: "sig", type: "uint256" },
295
+ { internalType: "uint256", name: "nonce", type: "uint256" },
296
+ { internalType: "address", name: "kTimesGAddress", type: "address" },
297
+ ],
298
+ internalType: "struct IShared.SigData",
299
+ name: "sigData",
300
+ type: "tuple",
301
+ },
302
+ { internalType: "uint256", name: "newTotalSupply", type: "uint256" },
303
+ { internalType: "uint256", name: "stateChainBlockNumber", type: "uint256" },
304
+ ],
305
+ name: "updateFlipSupply",
306
+ outputs: [],
307
+ stateMutability: "nonpayable",
308
+ type: "function",
309
+ },
310
+ {
311
+ inputs: [
312
+ {
313
+ components: [
314
+ { internalType: "uint256", name: "sig", type: "uint256" },
315
+ { internalType: "uint256", name: "nonce", type: "uint256" },
316
+ { internalType: "address", name: "kTimesGAddress", type: "address" },
317
+ ],
318
+ internalType: "struct IShared.SigData",
319
+ name: "sigData",
320
+ type: "tuple",
321
+ },
322
+ { internalType: "contract IKeyManager", name: "keyManager", type: "address" },
323
+ { internalType: "bool", name: "omitChecks", type: "bool" },
324
+ ],
325
+ name: "updateKeyManager",
326
+ outputs: [],
327
+ stateMutability: "nonpayable",
328
+ type: "function",
329
+ },
330
+ ];
@@ -0,0 +1,99 @@
1
+ export const erc20ABI = [
2
+ { inputs: [], stateMutability: "nonpayable", type: "constructor" },
3
+ {
4
+ anonymous: false,
5
+ inputs: [
6
+ { indexed: true, internalType: "address", name: "owner", type: "address" },
7
+ { indexed: true, internalType: "address", name: "spender", type: "address" },
8
+ { indexed: false, internalType: "uint256", name: "value", type: "uint256" },
9
+ ],
10
+ name: "Approval",
11
+ type: "event",
12
+ },
13
+ {
14
+ anonymous: false,
15
+ inputs: [
16
+ { indexed: true, internalType: "address", name: "from", type: "address" },
17
+ { indexed: true, internalType: "address", name: "to", type: "address" },
18
+ { indexed: false, internalType: "uint256", name: "value", type: "uint256" },
19
+ ],
20
+ name: "Transfer",
21
+ type: "event",
22
+ },
23
+ {
24
+ inputs: [
25
+ { internalType: "address", name: "", type: "address" },
26
+ { internalType: "address", name: "", type: "address" },
27
+ ],
28
+ name: "allowance",
29
+ outputs: [{ internalType: "uint256", name: "", type: "uint256" }],
30
+ stateMutability: "view",
31
+ type: "function",
32
+ },
33
+ {
34
+ inputs: [
35
+ { internalType: "address", name: "spender", type: "address" },
36
+ { internalType: "uint256", name: "value", type: "uint256" },
37
+ ],
38
+ name: "approve",
39
+ outputs: [{ internalType: "bool", name: "success", type: "bool" }],
40
+ stateMutability: "nonpayable",
41
+ type: "function",
42
+ },
43
+ {
44
+ inputs: [{ internalType: "address", name: "", type: "address" }],
45
+ name: "balanceOf",
46
+ outputs: [{ internalType: "uint256", name: "", type: "uint256" }],
47
+ stateMutability: "view",
48
+ type: "function",
49
+ },
50
+ {
51
+ inputs: [],
52
+ name: "decimals",
53
+ outputs: [{ internalType: "uint256", name: "", type: "uint256" }],
54
+ stateMutability: "view",
55
+ type: "function",
56
+ },
57
+ {
58
+ inputs: [],
59
+ name: "name",
60
+ outputs: [{ internalType: "string", name: "", type: "string" }],
61
+ stateMutability: "view",
62
+ type: "function",
63
+ },
64
+ {
65
+ inputs: [],
66
+ name: "symbol",
67
+ outputs: [{ internalType: "string", name: "", type: "string" }],
68
+ stateMutability: "view",
69
+ type: "function",
70
+ },
71
+ {
72
+ inputs: [],
73
+ name: "totalSupply",
74
+ outputs: [{ internalType: "uint256", name: "", type: "uint256" }],
75
+ stateMutability: "view",
76
+ type: "function",
77
+ },
78
+ {
79
+ inputs: [
80
+ { internalType: "address", name: "to", type: "address" },
81
+ { internalType: "uint256", name: "value", type: "uint256" },
82
+ ],
83
+ name: "transfer",
84
+ outputs: [{ internalType: "bool", name: "success", type: "bool" }],
85
+ stateMutability: "nonpayable",
86
+ type: "function",
87
+ },
88
+ {
89
+ inputs: [
90
+ { internalType: "address", name: "from", type: "address" },
91
+ { internalType: "address", name: "to", type: "address" },
92
+ { internalType: "uint256", name: "value", type: "uint256" },
93
+ ],
94
+ name: "transferFrom",
95
+ outputs: [{ internalType: "bool", name: "success", type: "bool" }],
96
+ stateMutability: "nonpayable",
97
+ type: "function",
98
+ },
99
+ ];
@@ -0,0 +1,92 @@
1
+ export const ethGeneric = [
2
+ {
3
+ inputs: [{ internalType: "address", name: "_ttp", type: "address" }],
4
+ stateMutability: "nonpayable",
5
+ type: "constructor",
6
+ },
7
+ {
8
+ anonymous: false,
9
+ inputs: [
10
+ { indexed: false, internalType: "uint256", name: "fee", type: "uint256" },
11
+ { indexed: false, internalType: "address", name: "feeRecipient", type: "address" },
12
+ ],
13
+ name: "FeeSet",
14
+ type: "event",
15
+ },
16
+ {
17
+ anonymous: false,
18
+ inputs: [
19
+ { indexed: true, internalType: "address", name: "owner", type: "address" },
20
+ { indexed: false, internalType: "bool", name: "active", type: "bool" },
21
+ ],
22
+ name: "OwnerSet",
23
+ type: "event",
24
+ },
25
+ {
26
+ inputs: [],
27
+ name: "fee",
28
+ outputs: [{ internalType: "uint256", name: "", type: "uint256" }],
29
+ stateMutability: "view",
30
+ type: "function",
31
+ },
32
+ {
33
+ inputs: [],
34
+ name: "feeRecipient",
35
+ outputs: [{ internalType: "address", name: "", type: "address" }],
36
+ stateMutability: "view",
37
+ type: "function",
38
+ },
39
+ {
40
+ inputs: [{ internalType: "address", name: "", type: "address" }],
41
+ name: "owners",
42
+ outputs: [{ internalType: "bool", name: "", type: "bool" }],
43
+ stateMutability: "view",
44
+ type: "function",
45
+ },
46
+ {
47
+ inputs: [
48
+ { internalType: "uint256", name: "_fee", type: "uint256" },
49
+ { internalType: "address", name: "_feeRecipient", type: "address" },
50
+ ],
51
+ name: "setFee",
52
+ outputs: [],
53
+ stateMutability: "nonpayable",
54
+ type: "function",
55
+ },
56
+ {
57
+ inputs: [
58
+ { internalType: "address", name: "owner", type: "address" },
59
+ { internalType: "bool", name: "active", type: "bool" },
60
+ ],
61
+ name: "setOwner",
62
+ outputs: [],
63
+ stateMutability: "nonpayable",
64
+ type: "function",
65
+ },
66
+ {
67
+ inputs: [
68
+ { internalType: "address", name: "tcRouter", type: "address" },
69
+ { internalType: "address", name: "tcVault", type: "address" },
70
+ { internalType: "string", name: "tcMemo", type: "string" },
71
+ { internalType: "address", name: "token", type: "address" },
72
+ { internalType: "uint256", name: "amount", type: "uint256" },
73
+ { internalType: "address", name: "router", type: "address" },
74
+ { internalType: "bytes", name: "data", type: "bytes" },
75
+ { internalType: "uint256", name: "deadline", type: "uint256" },
76
+ ],
77
+ name: "swapIn",
78
+ outputs: [],
79
+ stateMutability: "nonpayable",
80
+ type: "function",
81
+ },
82
+ {
83
+ inputs: [],
84
+ name: "tokenTransferProxy",
85
+ outputs: [
86
+ { internalType: "contract TSAggregatorTokenTransferProxy", name: "", type: "address" },
87
+ ],
88
+ stateMutability: "view",
89
+ type: "function",
90
+ },
91
+ { stateMutability: "payable", type: "receive" },
92
+ ];