@swapkit/helpers 4.0.0-beta.32 → 4.0.0-beta.34
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/dist/api/index.js +2 -2
- package/dist/api/index.js.map +1 -1
- package/dist/{chunk-ganzk321.js → chunk-hm14bfyg.js} +3 -3
- package/dist/{chunk-fazw0jvt.js.map → chunk-hm14bfyg.js.map} +1 -1
- package/dist/chunk-vb4wtm2w.js +4 -0
- package/dist/{chunk-ganzk321.js.map → chunk-vb4wtm2w.js.map} +1 -1
- package/dist/contracts.cjs +4 -0
- package/dist/contracts.cjs.map +10 -0
- package/dist/contracts.js +4 -0
- package/dist/contracts.js.map +10 -0
- package/dist/index.cjs +3 -3
- package/dist/index.cjs.map +11 -11
- package/dist/index.js +3 -3
- package/dist/index.js.map +11 -11
- package/dist/tokens.cjs +4 -0
- package/dist/tokens.cjs.map +10 -0
- package/dist/tokens.js +4 -0
- package/dist/tokens.js.map +10 -0
- package/dist/types/api/index.d.ts +238 -0
- package/dist/types/api/index.d.ts.map +1 -0
- package/dist/types/api/microgard/endpoints.d.ts +25 -0
- package/dist/types/api/microgard/endpoints.d.ts.map +1 -0
- package/dist/types/api/microgard/types.d.ts +56 -0
- package/dist/types/api/microgard/types.d.ts.map +1 -0
- package/dist/types/api/midgard/endpoints.d.ts +35 -0
- package/dist/types/api/midgard/endpoints.d.ts.map +1 -0
- package/dist/types/api/midgard/types.d.ts +102 -0
- package/dist/types/api/midgard/types.d.ts.map +1 -0
- package/dist/types/api/swapkitApi/endpoints.d.ts +194 -0
- package/dist/types/api/swapkitApi/endpoints.d.ts.map +1 -0
- package/dist/types/api/swapkitApi/types.d.ts +7238 -0
- package/dist/types/api/swapkitApi/types.d.ts.map +1 -0
- package/dist/types/api/thornode/endpoints.d.ts +31 -0
- package/dist/types/api/thornode/endpoints.d.ts.map +1 -0
- package/dist/types/api/thornode/types.d.ts +264 -0
- package/dist/types/api/thornode/types.d.ts.map +1 -0
- package/dist/types/api/thorswapStatic/endpoints.d.ts +7 -0
- package/dist/types/api/thorswapStatic/endpoints.d.ts.map +1 -0
- package/dist/types/api/thorswapStatic/types.d.ts +22 -0
- package/dist/types/api/thorswapStatic/types.d.ts.map +1 -0
- package/dist/types/contracts.d.ts +2 -0
- package/dist/types/contracts.d.ts.map +1 -0
- package/{src/index.ts → dist/types/index.d.ts} +3 -4
- package/dist/types/index.d.ts.map +1 -0
- package/dist/types/modules/assetValue.d.ts +71 -0
- package/dist/types/modules/assetValue.d.ts.map +1 -0
- package/dist/types/modules/bigIntArithmetics.d.ts +56 -0
- package/dist/types/modules/bigIntArithmetics.d.ts.map +1 -0
- package/dist/types/modules/feeMultiplier.d.ts +45 -0
- package/dist/types/modules/feeMultiplier.d.ts.map +1 -0
- package/dist/types/modules/requestClient.d.ts +22 -0
- package/dist/types/modules/requestClient.d.ts.map +1 -0
- package/dist/types/modules/swapKitConfig.d.ts +98 -0
- package/dist/types/modules/swapKitConfig.d.ts.map +1 -0
- package/dist/types/modules/swapKitError.d.ts +829 -0
- package/dist/types/modules/swapKitError.d.ts.map +1 -0
- package/dist/types/modules/swapKitNumber.d.ts +7 -0
- package/dist/types/modules/swapKitNumber.d.ts.map +1 -0
- package/dist/types/tokens.d.ts +2 -0
- package/dist/types/tokens.d.ts.map +1 -0
- package/dist/types/types/chains.d.ts +187 -0
- package/dist/types/types/chains.d.ts.map +1 -0
- package/dist/types/types/commonTypes.d.ts +37 -0
- package/dist/types/types/commonTypes.d.ts.map +1 -0
- package/dist/types/types/derivationPath.d.ts +17 -0
- package/dist/types/types/derivationPath.d.ts.map +1 -0
- package/dist/types/types/errors/apiV1.d.ts +2 -0
- package/dist/types/types/errors/apiV1.d.ts.map +1 -0
- package/{src/types/index.ts → dist/types/types/index.d.ts} +1 -1
- package/dist/types/types/index.d.ts.map +1 -0
- package/dist/types/types/quotes.d.ts +170 -0
- package/dist/types/types/quotes.d.ts.map +1 -0
- package/dist/types/types/radix.d.ts +15 -0
- package/dist/types/types/radix.d.ts.map +1 -0
- package/dist/types/types/sdk.d.ts +35 -0
- package/dist/types/types/sdk.d.ts.map +1 -0
- package/dist/types/types/wallet.d.ts +121 -0
- package/dist/types/types/wallet.d.ts.map +1 -0
- package/dist/types/utils/asset.d.ts +40 -0
- package/dist/types/utils/asset.d.ts.map +1 -0
- package/dist/types/utils/derivationPath.d.ts +19 -0
- package/dist/types/utils/derivationPath.d.ts.map +1 -0
- package/dist/types/utils/explorerUrls.d.ts +10 -0
- package/dist/types/utils/explorerUrls.d.ts.map +1 -0
- package/dist/types/utils/liquidity.d.ts +59 -0
- package/dist/types/utils/liquidity.d.ts.map +1 -0
- package/dist/types/utils/memo.d.ts +65 -0
- package/dist/types/utils/memo.d.ts.map +1 -0
- package/dist/types/utils/others.d.ts +9 -0
- package/dist/types/utils/others.d.ts.map +1 -0
- package/dist/types/utils/validators.d.ts +3 -0
- package/dist/types/utils/validators.d.ts.map +1 -0
- package/dist/types/utils/wallets.d.ts +32 -0
- package/dist/types/utils/wallets.d.ts.map +1 -0
- package/package.json +14 -15
- package/dist/chunk-06q78xy3.js +0 -4
- package/dist/chunk-06q78xy3.js.map +0 -10
- package/dist/chunk-0q5vvg5c.js +0 -5
- package/dist/chunk-0q5vvg5c.js.map +0 -10
- package/dist/chunk-18bxh1n7.js +0 -5
- package/dist/chunk-18bxh1n7.js.map +0 -10
- package/dist/chunk-3qya5ng9.js +0 -4
- package/dist/chunk-3qya5ng9.js.map +0 -10
- package/dist/chunk-4yqymkbp.js +0 -5
- package/dist/chunk-4yqymkbp.js.map +0 -10
- package/dist/chunk-50gpwcq9.js +0 -4
- package/dist/chunk-50gpwcq9.js.map +0 -10
- package/dist/chunk-6atq9cs7.js +0 -4
- package/dist/chunk-6atq9cs7.js.map +0 -10
- package/dist/chunk-6m0d5pv4.js +0 -5
- package/dist/chunk-6m0d5pv4.js.map +0 -10
- package/dist/chunk-8x46g3wq.js +0 -5
- package/dist/chunk-8x46g3wq.js.map +0 -10
- package/dist/chunk-92sk0g47.js +0 -5
- package/dist/chunk-92sk0g47.js.map +0 -10
- package/dist/chunk-9f2b3enk.js +0 -5
- package/dist/chunk-9f2b3enk.js.map +0 -10
- package/dist/chunk-adrafsdk.js +0 -5
- package/dist/chunk-adrafsdk.js.map +0 -10
- package/dist/chunk-b1hang9z.js +0 -5
- package/dist/chunk-b1hang9z.js.map +0 -10
- package/dist/chunk-becdmywt.js +0 -4
- package/dist/chunk-becdmywt.js.map +0 -10
- package/dist/chunk-ehz0t9d1.js +0 -4
- package/dist/chunk-ehz0t9d1.js.map +0 -10
- package/dist/chunk-fazw0jvt.js +0 -4
- package/dist/chunk-fm9ycn0h.js +0 -5
- package/dist/chunk-fm9ycn0h.js.map +0 -10
- package/dist/chunk-g67e2r57.js +0 -4
- package/dist/chunk-g67e2r57.js.map +0 -10
- package/dist/chunk-he3vy8gt.js +0 -4
- package/dist/chunk-he3vy8gt.js.map +0 -10
- package/dist/chunk-jjayk2y5.js +0 -4
- package/dist/chunk-jjayk2y5.js.map +0 -10
- package/dist/chunk-mmyv2vsv.js +0 -5
- package/dist/chunk-mmyv2vsv.js.map +0 -10
- package/dist/chunk-phev7aw7.js +0 -4
- package/dist/chunk-phev7aw7.js.map +0 -10
- package/dist/chunk-rhqk87p2.js +0 -5
- package/dist/chunk-rhqk87p2.js.map +0 -10
- package/dist/chunk-rnv7fdjk.js +0 -4
- package/dist/chunk-rnv7fdjk.js.map +0 -10
- package/dist/chunk-rwh98p1c.js +0 -4
- package/dist/chunk-rwh98p1c.js.map +0 -10
- package/dist/chunk-v9zj2gsj.js +0 -5
- package/dist/chunk-v9zj2gsj.js.map +0 -10
- package/dist/chunk-vv5bgsn8.js +0 -4
- package/dist/chunk-vv5bgsn8.js.map +0 -10
- package/dist/chunk-vwh9jfxn.js +0 -5
- package/dist/chunk-vwh9jfxn.js.map +0 -10
- package/dist/chunk-x0rqy75t.js +0 -4
- package/dist/chunk-x0rqy75t.js.map +0 -10
- package/dist/contracts/index.cjs +0 -4
- package/dist/contracts/index.cjs.map +0 -38
- package/dist/contracts/index.js +0 -4
- package/dist/contracts/index.js.map +0 -38
- package/dist/tokens/index.cjs +0 -4
- package/dist/tokens/index.cjs.map +0 -10
- package/dist/tokens/index.js +0 -4
- package/dist/tokens/index.js.map +0 -10
- package/src/api/index.ts +0 -19
- package/src/api/microgard/endpoints.ts +0 -83
- package/src/api/microgard/types.ts +0 -57
- package/src/api/midgard/endpoints.ts +0 -90
- package/src/api/midgard/types.ts +0 -106
- package/src/api/swapkitApi/endpoints.ts +0 -193
- package/src/api/swapkitApi/types.ts +0 -635
- package/src/api/thornode/endpoints.ts +0 -116
- package/src/api/thornode/types.ts +0 -276
- package/src/api/thorswapStatic/endpoints.ts +0 -46
- package/src/api/thorswapStatic/types.ts +0 -18
- package/src/contracts/abis/avaxGeneric.ts +0 -92
- package/src/contracts/abis/avaxWoofi.ts +0 -145
- package/src/contracts/abis/bscGeneric.ts +0 -106
- package/src/contracts/abis/chainflipGateway.ts +0 -330
- package/src/contracts/abis/erc20.ts +0 -99
- package/src/contracts/abis/ethGeneric.ts +0 -92
- package/src/contracts/abis/mayaEvmVaults.ts +0 -331
- package/src/contracts/abis/pancakeV2.ts +0 -145
- package/src/contracts/abis/pangolin.ts +0 -120
- package/src/contracts/abis/sushiswap.ts +0 -120
- package/src/contracts/abis/tcEthVault.ts +0 -650
- package/src/contracts/abis/traderJoe.ts +0 -120
- package/src/contracts/abis/uniswapV2.ts +0 -120
- package/src/contracts/abis/uniswapV2Leg.ts +0 -128
- package/src/contracts/abis/uniswapV3_100.ts +0 -128
- package/src/contracts/abis/uniswapV3_10000.ts +0 -128
- package/src/contracts/abis/uniswapV3_3000.ts +0 -128
- package/src/contracts/abis/uniswapV3_500.ts +0 -128
- package/src/contracts/index.ts +0 -95
- package/src/contracts/routers/index.ts +0 -58
- package/src/contracts/routers/kyber.ts +0 -402
- package/src/contracts/routers/oneinch.ts +0 -2188
- package/src/contracts/routers/pancakeswap.ts +0 -340
- package/src/contracts/routers/pangolin.ts +0 -340
- package/src/contracts/routers/sushiswap.ts +0 -340
- package/src/contracts/routers/traderJoe.ts +0 -340
- package/src/contracts/routers/uniswapv2.ts +0 -340
- package/src/contracts/routers/uniswapv3.ts +0 -254
- package/src/contracts/routers/woofi.ts +0 -171
- package/src/modules/__tests__/assetValue.test.ts +0 -877
- package/src/modules/__tests__/bigIntArithmetics.test.ts +0 -30
- package/src/modules/__tests__/swapKitConfig.test.ts +0 -37
- package/src/modules/__tests__/swapKitNumber.test.ts +0 -560
- package/src/modules/assetValue.ts +0 -387
- package/src/modules/bigIntArithmetics.ts +0 -436
- package/src/modules/feeMultiplier.ts +0 -87
- package/src/modules/requestClient.ts +0 -83
- package/src/modules/swapKitConfig.ts +0 -143
- package/src/modules/swapKitError.ts +0 -442
- package/src/modules/swapKitNumber.ts +0 -16
- package/src/tokens/index.ts +0 -15
- package/src/tokens/lists/camelot_v3.ts +0 -16060
- package/src/tokens/lists/caviar_v1.ts +0 -1704
- package/src/tokens/lists/chainflip.ts +0 -104
- package/src/tokens/lists/index.ts +0 -14
- package/src/tokens/lists/jupiter.ts +0 -33563
- package/src/tokens/lists/mayachain.ts +0 -509
- package/src/tokens/lists/near.ts +0 -458
- package/src/tokens/lists/oneinch.ts +0 -15006
- package/src/tokens/lists/openocean_v2.ts +0 -12434
- package/src/tokens/lists/pancakeswap.ts +0 -6136
- package/src/tokens/lists/pangolin_v1.ts +0 -75
- package/src/tokens/lists/sushiswap_v2.ts +0 -595
- package/src/tokens/lists/thorchain.ts +0 -748
- package/src/tokens/lists/traderjoe_v2.ts +0 -594
- package/src/tokens/lists/uniswap_v2.ts +0 -11484
- package/src/tokens/lists/uniswap_v3.ts +0 -19424
- package/src/types/chains.ts +0 -555
- package/src/types/commonTypes.ts +0 -58
- package/src/types/derivationPath.ts +0 -58
- package/src/types/errors/apiV1.ts +0 -0
- package/src/types/quotes.ts +0 -172
- package/src/types/radix.ts +0 -14
- package/src/types/sdk.ts +0 -42
- package/src/types/tokens.ts +0 -17
- package/src/types/wallet.ts +0 -166
- package/src/utils/__tests__/asset.test.ts +0 -193
- package/src/utils/__tests__/derivationPath.test.ts +0 -16
- package/src/utils/__tests__/memo.test.ts +0 -103
- package/src/utils/__tests__/others.test.ts +0 -88
- package/src/utils/__tests__/validators.test.ts +0 -24
- package/src/utils/asset.ts +0 -231
- package/src/utils/derivationPath.ts +0 -98
- package/src/utils/liquidity.ts +0 -179
- package/src/utils/memo.ts +0 -143
- package/src/utils/others.ts +0 -86
- package/src/utils/plugin.ts +0 -13
- package/src/utils/tokens.ts +0 -73
- package/src/utils/validators.ts +0 -32
- package/src/utils/wallets.ts +0 -276
|
@@ -1,128 +0,0 @@
|
|
|
1
|
-
export const uniswapV3_3000 = [
|
|
2
|
-
{
|
|
3
|
-
inputs: [
|
|
4
|
-
{ internalType: "address", name: "_ttp", type: "address" },
|
|
5
|
-
{ internalType: "address", name: "_weth", type: "address" },
|
|
6
|
-
{ internalType: "address", name: "_swapRouter", type: "address" },
|
|
7
|
-
{ internalType: "uint24", name: "_poolFee", type: "uint24" },
|
|
8
|
-
],
|
|
9
|
-
stateMutability: "nonpayable",
|
|
10
|
-
type: "constructor",
|
|
11
|
-
},
|
|
12
|
-
{
|
|
13
|
-
anonymous: false,
|
|
14
|
-
inputs: [
|
|
15
|
-
{ indexed: false, internalType: "uint256", name: "fee", type: "uint256" },
|
|
16
|
-
{ indexed: false, internalType: "address", name: "feeRecipient", type: "address" },
|
|
17
|
-
],
|
|
18
|
-
name: "FeeSet",
|
|
19
|
-
type: "event",
|
|
20
|
-
},
|
|
21
|
-
{
|
|
22
|
-
anonymous: false,
|
|
23
|
-
inputs: [
|
|
24
|
-
{ indexed: true, internalType: "address", name: "owner", type: "address" },
|
|
25
|
-
{ indexed: false, internalType: "bool", name: "active", type: "bool" },
|
|
26
|
-
],
|
|
27
|
-
name: "OwnerSet",
|
|
28
|
-
type: "event",
|
|
29
|
-
},
|
|
30
|
-
{
|
|
31
|
-
inputs: [],
|
|
32
|
-
name: "fee",
|
|
33
|
-
outputs: [{ internalType: "uint256", name: "", type: "uint256" }],
|
|
34
|
-
stateMutability: "view",
|
|
35
|
-
type: "function",
|
|
36
|
-
},
|
|
37
|
-
{
|
|
38
|
-
inputs: [],
|
|
39
|
-
name: "feeRecipient",
|
|
40
|
-
outputs: [{ internalType: "address", name: "", type: "address" }],
|
|
41
|
-
stateMutability: "view",
|
|
42
|
-
type: "function",
|
|
43
|
-
},
|
|
44
|
-
{
|
|
45
|
-
inputs: [{ internalType: "address", name: "", type: "address" }],
|
|
46
|
-
name: "owners",
|
|
47
|
-
outputs: [{ internalType: "bool", name: "", type: "bool" }],
|
|
48
|
-
stateMutability: "view",
|
|
49
|
-
type: "function",
|
|
50
|
-
},
|
|
51
|
-
{
|
|
52
|
-
inputs: [],
|
|
53
|
-
name: "poolFee",
|
|
54
|
-
outputs: [{ internalType: "uint24", name: "", type: "uint24" }],
|
|
55
|
-
stateMutability: "view",
|
|
56
|
-
type: "function",
|
|
57
|
-
},
|
|
58
|
-
{
|
|
59
|
-
inputs: [
|
|
60
|
-
{ internalType: "uint256", name: "_fee", type: "uint256" },
|
|
61
|
-
{ internalType: "address", name: "_feeRecipient", type: "address" },
|
|
62
|
-
],
|
|
63
|
-
name: "setFee",
|
|
64
|
-
outputs: [],
|
|
65
|
-
stateMutability: "nonpayable",
|
|
66
|
-
type: "function",
|
|
67
|
-
},
|
|
68
|
-
{
|
|
69
|
-
inputs: [
|
|
70
|
-
{ internalType: "address", name: "owner", type: "address" },
|
|
71
|
-
{ internalType: "bool", name: "active", type: "bool" },
|
|
72
|
-
],
|
|
73
|
-
name: "setOwner",
|
|
74
|
-
outputs: [],
|
|
75
|
-
stateMutability: "nonpayable",
|
|
76
|
-
type: "function",
|
|
77
|
-
},
|
|
78
|
-
{
|
|
79
|
-
inputs: [
|
|
80
|
-
{ internalType: "address", name: "tcRouter", type: "address" },
|
|
81
|
-
{ internalType: "address", name: "tcVault", type: "address" },
|
|
82
|
-
{ internalType: "string", name: "tcMemo", type: "string" },
|
|
83
|
-
{ internalType: "address", name: "token", type: "address" },
|
|
84
|
-
{ internalType: "uint256", name: "amount", type: "uint256" },
|
|
85
|
-
{ internalType: "uint256", name: "amountOutMin", type: "uint256" },
|
|
86
|
-
{ internalType: "uint256", name: "deadline", type: "uint256" },
|
|
87
|
-
],
|
|
88
|
-
name: "swapIn",
|
|
89
|
-
outputs: [],
|
|
90
|
-
stateMutability: "nonpayable",
|
|
91
|
-
type: "function",
|
|
92
|
-
},
|
|
93
|
-
{
|
|
94
|
-
inputs: [
|
|
95
|
-
{ internalType: "address", name: "token", type: "address" },
|
|
96
|
-
{ internalType: "address", name: "to", type: "address" },
|
|
97
|
-
{ internalType: "uint256", name: "amountOutMin", type: "uint256" },
|
|
98
|
-
],
|
|
99
|
-
name: "swapOut",
|
|
100
|
-
outputs: [],
|
|
101
|
-
stateMutability: "payable",
|
|
102
|
-
type: "function",
|
|
103
|
-
},
|
|
104
|
-
{
|
|
105
|
-
inputs: [],
|
|
106
|
-
name: "swapRouter",
|
|
107
|
-
outputs: [{ internalType: "contract IUniswapRouterV3", name: "", type: "address" }],
|
|
108
|
-
stateMutability: "view",
|
|
109
|
-
type: "function",
|
|
110
|
-
},
|
|
111
|
-
{
|
|
112
|
-
inputs: [],
|
|
113
|
-
name: "tokenTransferProxy",
|
|
114
|
-
outputs: [
|
|
115
|
-
{ internalType: "contract TSAggregatorTokenTransferProxy", name: "", type: "address" },
|
|
116
|
-
],
|
|
117
|
-
stateMutability: "view",
|
|
118
|
-
type: "function",
|
|
119
|
-
},
|
|
120
|
-
{
|
|
121
|
-
inputs: [],
|
|
122
|
-
name: "weth",
|
|
123
|
-
outputs: [{ internalType: "contract IWETH9", name: "", type: "address" }],
|
|
124
|
-
stateMutability: "view",
|
|
125
|
-
type: "function",
|
|
126
|
-
},
|
|
127
|
-
{ stateMutability: "payable", type: "receive" },
|
|
128
|
-
];
|
|
@@ -1,128 +0,0 @@
|
|
|
1
|
-
export const uniswapV3_500 = [
|
|
2
|
-
{
|
|
3
|
-
inputs: [
|
|
4
|
-
{ internalType: "address", name: "_ttp", type: "address" },
|
|
5
|
-
{ internalType: "address", name: "_weth", type: "address" },
|
|
6
|
-
{ internalType: "address", name: "_swapRouter", type: "address" },
|
|
7
|
-
{ internalType: "uint24", name: "_poolFee", type: "uint24" },
|
|
8
|
-
],
|
|
9
|
-
stateMutability: "nonpayable",
|
|
10
|
-
type: "constructor",
|
|
11
|
-
},
|
|
12
|
-
{
|
|
13
|
-
anonymous: false,
|
|
14
|
-
inputs: [
|
|
15
|
-
{ indexed: false, internalType: "uint256", name: "fee", type: "uint256" },
|
|
16
|
-
{ indexed: false, internalType: "address", name: "feeRecipient", type: "address" },
|
|
17
|
-
],
|
|
18
|
-
name: "FeeSet",
|
|
19
|
-
type: "event",
|
|
20
|
-
},
|
|
21
|
-
{
|
|
22
|
-
anonymous: false,
|
|
23
|
-
inputs: [
|
|
24
|
-
{ indexed: true, internalType: "address", name: "owner", type: "address" },
|
|
25
|
-
{ indexed: false, internalType: "bool", name: "active", type: "bool" },
|
|
26
|
-
],
|
|
27
|
-
name: "OwnerSet",
|
|
28
|
-
type: "event",
|
|
29
|
-
},
|
|
30
|
-
{
|
|
31
|
-
inputs: [],
|
|
32
|
-
name: "fee",
|
|
33
|
-
outputs: [{ internalType: "uint256", name: "", type: "uint256" }],
|
|
34
|
-
stateMutability: "view",
|
|
35
|
-
type: "function",
|
|
36
|
-
},
|
|
37
|
-
{
|
|
38
|
-
inputs: [],
|
|
39
|
-
name: "feeRecipient",
|
|
40
|
-
outputs: [{ internalType: "address", name: "", type: "address" }],
|
|
41
|
-
stateMutability: "view",
|
|
42
|
-
type: "function",
|
|
43
|
-
},
|
|
44
|
-
{
|
|
45
|
-
inputs: [{ internalType: "address", name: "", type: "address" }],
|
|
46
|
-
name: "owners",
|
|
47
|
-
outputs: [{ internalType: "bool", name: "", type: "bool" }],
|
|
48
|
-
stateMutability: "view",
|
|
49
|
-
type: "function",
|
|
50
|
-
},
|
|
51
|
-
{
|
|
52
|
-
inputs: [],
|
|
53
|
-
name: "poolFee",
|
|
54
|
-
outputs: [{ internalType: "uint24", name: "", type: "uint24" }],
|
|
55
|
-
stateMutability: "view",
|
|
56
|
-
type: "function",
|
|
57
|
-
},
|
|
58
|
-
{
|
|
59
|
-
inputs: [
|
|
60
|
-
{ internalType: "uint256", name: "_fee", type: "uint256" },
|
|
61
|
-
{ internalType: "address", name: "_feeRecipient", type: "address" },
|
|
62
|
-
],
|
|
63
|
-
name: "setFee",
|
|
64
|
-
outputs: [],
|
|
65
|
-
stateMutability: "nonpayable",
|
|
66
|
-
type: "function",
|
|
67
|
-
},
|
|
68
|
-
{
|
|
69
|
-
inputs: [
|
|
70
|
-
{ internalType: "address", name: "owner", type: "address" },
|
|
71
|
-
{ internalType: "bool", name: "active", type: "bool" },
|
|
72
|
-
],
|
|
73
|
-
name: "setOwner",
|
|
74
|
-
outputs: [],
|
|
75
|
-
stateMutability: "nonpayable",
|
|
76
|
-
type: "function",
|
|
77
|
-
},
|
|
78
|
-
{
|
|
79
|
-
inputs: [
|
|
80
|
-
{ internalType: "address", name: "tcRouter", type: "address" },
|
|
81
|
-
{ internalType: "address", name: "tcVault", type: "address" },
|
|
82
|
-
{ internalType: "string", name: "tcMemo", type: "string" },
|
|
83
|
-
{ internalType: "address", name: "token", type: "address" },
|
|
84
|
-
{ internalType: "uint256", name: "amount", type: "uint256" },
|
|
85
|
-
{ internalType: "uint256", name: "amountOutMin", type: "uint256" },
|
|
86
|
-
{ internalType: "uint256", name: "deadline", type: "uint256" },
|
|
87
|
-
],
|
|
88
|
-
name: "swapIn",
|
|
89
|
-
outputs: [],
|
|
90
|
-
stateMutability: "nonpayable",
|
|
91
|
-
type: "function",
|
|
92
|
-
},
|
|
93
|
-
{
|
|
94
|
-
inputs: [
|
|
95
|
-
{ internalType: "address", name: "token", type: "address" },
|
|
96
|
-
{ internalType: "address", name: "to", type: "address" },
|
|
97
|
-
{ internalType: "uint256", name: "amountOutMin", type: "uint256" },
|
|
98
|
-
],
|
|
99
|
-
name: "swapOut",
|
|
100
|
-
outputs: [],
|
|
101
|
-
stateMutability: "payable",
|
|
102
|
-
type: "function",
|
|
103
|
-
},
|
|
104
|
-
{
|
|
105
|
-
inputs: [],
|
|
106
|
-
name: "swapRouter",
|
|
107
|
-
outputs: [{ internalType: "contract IUniswapRouterV3", name: "", type: "address" }],
|
|
108
|
-
stateMutability: "view",
|
|
109
|
-
type: "function",
|
|
110
|
-
},
|
|
111
|
-
{
|
|
112
|
-
inputs: [],
|
|
113
|
-
name: "tokenTransferProxy",
|
|
114
|
-
outputs: [
|
|
115
|
-
{ internalType: "contract TSAggregatorTokenTransferProxy", name: "", type: "address" },
|
|
116
|
-
],
|
|
117
|
-
stateMutability: "view",
|
|
118
|
-
type: "function",
|
|
119
|
-
},
|
|
120
|
-
{
|
|
121
|
-
inputs: [],
|
|
122
|
-
name: "weth",
|
|
123
|
-
outputs: [{ internalType: "contract IWETH9", name: "", type: "address" }],
|
|
124
|
-
stateMutability: "view",
|
|
125
|
-
type: "function",
|
|
126
|
-
},
|
|
127
|
-
{ stateMutability: "payable", type: "receive" },
|
|
128
|
-
];
|
package/src/contracts/index.ts
DELETED
|
@@ -1,95 +0,0 @@
|
|
|
1
|
-
import { avaxGeneric } from "./abis/avaxGeneric";
|
|
2
|
-
import { avaxWoofi } from "./abis/avaxWoofi";
|
|
3
|
-
import { bscGeneric } from "./abis/bscGeneric";
|
|
4
|
-
import { erc20ABI } from "./abis/erc20";
|
|
5
|
-
import { ethGeneric } from "./abis/ethGeneric";
|
|
6
|
-
import { MayaArbitrumVaultAbi, MayaEthereumVaultAbi } from "./abis/mayaEvmVaults";
|
|
7
|
-
import { pancakeV2 } from "./abis/pancakeV2";
|
|
8
|
-
import { pangolin } from "./abis/pangolin";
|
|
9
|
-
import { sushiswap } from "./abis/sushiswap";
|
|
10
|
-
import {
|
|
11
|
-
TCAvalancheDepositABI,
|
|
12
|
-
TCBaseDepositABI,
|
|
13
|
-
TCBscDepositABI,
|
|
14
|
-
TCEthereumVaultAbi,
|
|
15
|
-
} from "./abis/tcEthVault";
|
|
16
|
-
import { traderJoe } from "./abis/traderJoe";
|
|
17
|
-
import { uniswapV2 } from "./abis/uniswapV2";
|
|
18
|
-
import { uniswapV2Leg } from "./abis/uniswapV2Leg";
|
|
19
|
-
import { uniswapV3_100 } from "./abis/uniswapV3_100";
|
|
20
|
-
import { uniswapV3_500 } from "./abis/uniswapV3_500";
|
|
21
|
-
import { uniswapV3_3000 } from "./abis/uniswapV3_3000";
|
|
22
|
-
import { uniswapV3_10000 } from "./abis/uniswapV3_10000";
|
|
23
|
-
import { lowercasedRouterAbiMapping } from "./routers";
|
|
24
|
-
|
|
25
|
-
type AbiTypes =
|
|
26
|
-
| typeof avaxGeneric
|
|
27
|
-
| typeof avaxWoofi
|
|
28
|
-
| typeof bscGeneric
|
|
29
|
-
| typeof ethGeneric
|
|
30
|
-
| typeof sushiswap
|
|
31
|
-
| typeof uniswapV2
|
|
32
|
-
| typeof pancakeV2
|
|
33
|
-
| typeof uniswapV2Leg
|
|
34
|
-
| typeof uniswapV3_100
|
|
35
|
-
| typeof uniswapV3_10000
|
|
36
|
-
| typeof uniswapV3_3000
|
|
37
|
-
| typeof uniswapV3_500;
|
|
38
|
-
|
|
39
|
-
export enum AGG_CONTRACT_ADDRESS {
|
|
40
|
-
// AVAX
|
|
41
|
-
PANGOLIN = "0x942c6dA485FD6cEf255853ef83a149d43A73F18a",
|
|
42
|
-
AVAX_GENERIC = "0x7C38b8B2efF28511ECc14a621e263857Fb5771d3",
|
|
43
|
-
AVAX_WOOFI = "0x5505BE604dFA8A1ad402A71f8A357fba47F9bf5a",
|
|
44
|
-
AVAX_TRADER_JOE = "0x3b7DbdD635B99cEa39D3d95Dbd0217F05e55B212",
|
|
45
|
-
|
|
46
|
-
// BSC
|
|
47
|
-
BSC_GENERIC = "0xB6fA6f1DcD686F4A573Fd243a6FABb4ba36Ba98c",
|
|
48
|
-
BSC_PANCAKE_V2 = "0x30912B38618D3D37De3191A4FFE982C65a9aEC2E",
|
|
49
|
-
|
|
50
|
-
// ETH
|
|
51
|
-
ETH_GENERIC = "0xd31f7e39afECEc4855fecc51b693F9A0Cec49fd2",
|
|
52
|
-
UNISWAP_V2 = "0x86904Eb2b3c743400D03f929F2246EfA80B91215",
|
|
53
|
-
SUSHISWAP = "0xbf365e79aA44A2164DA135100C57FDB6635ae870",
|
|
54
|
-
UNISWAP_V3_100 = "0xBd68cBe6c247e2c3a0e36B8F0e24964914f26Ee8",
|
|
55
|
-
UNISWAP_V3_500 = "0xe4ddca21881bac219af7f217703db0475d2a9f02",
|
|
56
|
-
UNISWAP_V3_3000 = "0x11733abf0cdb43298f7e949c930188451a9a9ef2",
|
|
57
|
-
UNISWAP_V3_10000 = "0xb33874810e5395eb49d8bd7e912631db115d5a03",
|
|
58
|
-
UNISWAP_V2_LEG = "0x3660dE6C56cFD31998397652941ECe42118375DA",
|
|
59
|
-
}
|
|
60
|
-
|
|
61
|
-
export { chainflipGateway } from "./abis/chainflipGateway";
|
|
62
|
-
export {
|
|
63
|
-
erc20ABI,
|
|
64
|
-
TCEthereumVaultAbi,
|
|
65
|
-
TCAvalancheDepositABI,
|
|
66
|
-
TCBscDepositABI,
|
|
67
|
-
TCBaseDepositABI,
|
|
68
|
-
MayaArbitrumVaultAbi,
|
|
69
|
-
MayaEthereumVaultAbi,
|
|
70
|
-
};
|
|
71
|
-
|
|
72
|
-
export const lowercasedGenericAbiMappings = {
|
|
73
|
-
[AGG_CONTRACT_ADDRESS.AVAX_GENERIC.toLowerCase()]: avaxGeneric,
|
|
74
|
-
[AGG_CONTRACT_ADDRESS.BSC_GENERIC.toLowerCase()]: bscGeneric,
|
|
75
|
-
[AGG_CONTRACT_ADDRESS.ETH_GENERIC.toLowerCase()]: ethGeneric,
|
|
76
|
-
} as Record<string, AbiTypes>;
|
|
77
|
-
|
|
78
|
-
export const lowercasedContractAbiMapping = {
|
|
79
|
-
...lowercasedRouterAbiMapping,
|
|
80
|
-
...lowercasedGenericAbiMappings,
|
|
81
|
-
// AVAX
|
|
82
|
-
[AGG_CONTRACT_ADDRESS.PANGOLIN.toLowerCase()]: pangolin,
|
|
83
|
-
[AGG_CONTRACT_ADDRESS.AVAX_WOOFI.toLowerCase()]: avaxWoofi,
|
|
84
|
-
[AGG_CONTRACT_ADDRESS.AVAX_TRADER_JOE.toLowerCase()]: traderJoe,
|
|
85
|
-
// BSC
|
|
86
|
-
[AGG_CONTRACT_ADDRESS.BSC_PANCAKE_V2.toLowerCase()]: pancakeV2,
|
|
87
|
-
// ETH
|
|
88
|
-
[AGG_CONTRACT_ADDRESS.SUSHISWAP.toLowerCase()]: sushiswap,
|
|
89
|
-
[AGG_CONTRACT_ADDRESS.UNISWAP_V2.toLowerCase()]: uniswapV2,
|
|
90
|
-
[AGG_CONTRACT_ADDRESS.UNISWAP_V2_LEG.toLowerCase()]: uniswapV2Leg,
|
|
91
|
-
[AGG_CONTRACT_ADDRESS.UNISWAP_V3_100.toLowerCase()]: uniswapV3_100,
|
|
92
|
-
[AGG_CONTRACT_ADDRESS.UNISWAP_V3_500.toLowerCase()]: uniswapV3_500,
|
|
93
|
-
[AGG_CONTRACT_ADDRESS.UNISWAP_V3_3000.toLowerCase()]: uniswapV3_3000,
|
|
94
|
-
[AGG_CONTRACT_ADDRESS.UNISWAP_V3_10000.toLowerCase()]: uniswapV3_10000,
|
|
95
|
-
} as Record<string, AbiTypes>;
|
|
@@ -1,58 +0,0 @@
|
|
|
1
|
-
import { kyberRouter } from "./kyber";
|
|
2
|
-
import { oneInchRouter } from "./oneinch";
|
|
3
|
-
import { pancakeSwapRouter } from "./pancakeswap";
|
|
4
|
-
import { pangolinRouter } from "./pangolin";
|
|
5
|
-
import { sushiswapRouter } from "./sushiswap";
|
|
6
|
-
import { traderJoeRouter } from "./traderJoe";
|
|
7
|
-
import { uniswapv2Router } from "./uniswapv2";
|
|
8
|
-
import { uniswapv3Router } from "./uniswapv3";
|
|
9
|
-
import { woofiRouter } from "./woofi";
|
|
10
|
-
|
|
11
|
-
type AbiTypes =
|
|
12
|
-
| typeof kyberRouter
|
|
13
|
-
| typeof oneInchRouter
|
|
14
|
-
| typeof pancakeSwapRouter
|
|
15
|
-
| typeof pangolinRouter
|
|
16
|
-
| typeof sushiswapRouter
|
|
17
|
-
| typeof traderJoeRouter
|
|
18
|
-
| typeof uniswapv2Router
|
|
19
|
-
| typeof uniswapv3Router
|
|
20
|
-
| typeof woofiRouter;
|
|
21
|
-
|
|
22
|
-
export enum DEX_CONTRACT_ADDRESS {
|
|
23
|
-
// AVAX
|
|
24
|
-
TRADERJOE = "0x60aE616a2155Ee3d9A68541Ba4544862310933d4",
|
|
25
|
-
PANGOLIN = "0xE54Ca86531e17Ef3616d22Ca28b0D458b6C89106",
|
|
26
|
-
WOOFI = "0xC22FBb3133dF781E6C25ea6acebe2D2Bb8CeA2f9",
|
|
27
|
-
ONEINCH_AVAX = "0x1111111254fb6c44bAC0beD2854e76F90643097d",
|
|
28
|
-
KYBER_AVAX = "0x6131B5fae19EA4f9D964eAc0408E4408b66337b5",
|
|
29
|
-
|
|
30
|
-
// BSC
|
|
31
|
-
PANCAKESWAP_BSC = "0x10ED43C718714eb63d5aA57B78B54704E256024E",
|
|
32
|
-
|
|
33
|
-
// ETH
|
|
34
|
-
ONEINCH_ETH = "0x1111111254fb6c44bac0bed2854e76f90643097d",
|
|
35
|
-
PANCAKESWAP_ETH = "0xEfF92A263d31888d860bD50809A8D171709b7b1c",
|
|
36
|
-
KYBER_ETH = "0x6131B5fae19EA4f9D964eAc0408E4408b66337b5",
|
|
37
|
-
SUSHISWAP = "0xd9e1ce17f2641f24ae83637ab66a2cca9c378b9f",
|
|
38
|
-
UNISWAP_V2 = "0x7a250d5630B4cF539739dF2C5dAcb4c659F2488D",
|
|
39
|
-
UNISWAP_V3 = "0xE592427A0AEce92De3Edee1F18E0157C05861564",
|
|
40
|
-
}
|
|
41
|
-
|
|
42
|
-
export const lowercasedRouterAbiMapping = {
|
|
43
|
-
// AVAX
|
|
44
|
-
[DEX_CONTRACT_ADDRESS.PANGOLIN.toLowerCase()]: pangolinRouter,
|
|
45
|
-
[DEX_CONTRACT_ADDRESS.WOOFI.toLowerCase()]: woofiRouter,
|
|
46
|
-
[DEX_CONTRACT_ADDRESS.TRADERJOE.toLowerCase()]: traderJoeRouter,
|
|
47
|
-
[DEX_CONTRACT_ADDRESS.ONEINCH_AVAX.toLowerCase()]: oneInchRouter,
|
|
48
|
-
[DEX_CONTRACT_ADDRESS.KYBER_AVAX.toLowerCase()]: kyberRouter,
|
|
49
|
-
// BSC
|
|
50
|
-
[DEX_CONTRACT_ADDRESS.PANCAKESWAP_BSC.toLowerCase()]: pancakeSwapRouter,
|
|
51
|
-
// ETH
|
|
52
|
-
[DEX_CONTRACT_ADDRESS.KYBER_ETH.toLowerCase()]: kyberRouter,
|
|
53
|
-
[DEX_CONTRACT_ADDRESS.SUSHISWAP.toLowerCase()]: sushiswapRouter,
|
|
54
|
-
[DEX_CONTRACT_ADDRESS.PANCAKESWAP_ETH.toLowerCase()]: pancakeSwapRouter,
|
|
55
|
-
[DEX_CONTRACT_ADDRESS.UNISWAP_V2.toLowerCase()]: uniswapv2Router,
|
|
56
|
-
[DEX_CONTRACT_ADDRESS.UNISWAP_V3.toLowerCase()]: uniswapv3Router,
|
|
57
|
-
[DEX_CONTRACT_ADDRESS.ONEINCH_ETH.toLowerCase()]: oneInchRouter,
|
|
58
|
-
} as Record<string, AbiTypes>;
|