@swapkit/helpers 2.6.0 → 3.0.0-beta.1

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 (167) 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-1gwdyyeh.js +4 -0
  6. package/dist/chunk-1gwdyyeh.js.map +10 -0
  7. package/dist/chunk-2bhvezjh.js +4 -0
  8. package/dist/chunk-2bhvezjh.js.map +10 -0
  9. package/dist/chunk-3ptwhtpd.js +3 -0
  10. package/dist/chunk-3ptwhtpd.js.map +10 -0
  11. package/dist/chunk-3wnfcm30.js +4 -0
  12. package/dist/chunk-3wnfcm30.js.map +9 -0
  13. package/dist/chunk-40epvqbm.js +3 -0
  14. package/dist/chunk-40epvqbm.js.map +10 -0
  15. package/dist/chunk-49nsjaay.js +3 -0
  16. package/dist/chunk-49nsjaay.js.map +10 -0
  17. package/dist/chunk-4b66tryh.js +4 -0
  18. package/dist/chunk-4b66tryh.js.map +10 -0
  19. package/dist/chunk-4kzjrrjv.js +3 -0
  20. package/dist/chunk-4kzjrrjv.js.map +10 -0
  21. package/dist/chunk-5m49s8z8.js +4 -0
  22. package/dist/chunk-5m49s8z8.js.map +10 -0
  23. package/dist/chunk-9b6y7r75.js +4 -0
  24. package/dist/chunk-9b6y7r75.js.map +10 -0
  25. package/dist/chunk-9zcbvqq2.js +3 -0
  26. package/dist/chunk-9zcbvqq2.js.map +10 -0
  27. package/dist/chunk-a0bpx1q3.js +4 -0
  28. package/dist/chunk-a0bpx1q3.js.map +10 -0
  29. package/dist/chunk-a0fxkkfh.js +4 -0
  30. package/dist/chunk-a0fxkkfh.js.map +10 -0
  31. package/dist/chunk-a6bjd9ar.js +3 -0
  32. package/dist/chunk-a6bjd9ar.js.map +10 -0
  33. package/dist/chunk-bg6pz5qh.js +3 -0
  34. package/dist/chunk-bg6pz5qh.js.map +10 -0
  35. package/dist/chunk-cpdcnp2x.js +4 -0
  36. package/dist/chunk-cpdcnp2x.js.map +10 -0
  37. package/dist/chunk-fazw0jvt.js +3 -0
  38. package/dist/chunk-fazw0jvt.js.map +9 -0
  39. package/dist/chunk-fr86y3rx.js +4 -0
  40. package/dist/chunk-fr86y3rx.js.map +10 -0
  41. package/dist/chunk-ftdtdkhk.js +3 -0
  42. package/dist/chunk-ftdtdkhk.js.map +10 -0
  43. package/dist/chunk-gjeaw024.js +4 -0
  44. package/dist/chunk-gjeaw024.js.map +10 -0
  45. package/dist/chunk-hdcdd2cf.js +4 -0
  46. package/dist/chunk-hdcdd2cf.js.map +10 -0
  47. package/dist/chunk-q2pb6ggs.js +3 -0
  48. package/dist/chunk-q2pb6ggs.js.map +10 -0
  49. package/dist/chunk-t9s9811k.js +3 -0
  50. package/dist/chunk-t9s9811k.js.map +10 -0
  51. package/dist/chunk-v4dvhh90.js +4 -0
  52. package/dist/chunk-v4dvhh90.js.map +10 -0
  53. package/dist/chunk-vzptz52h.js +4 -0
  54. package/dist/chunk-vzptz52h.js.map +10 -0
  55. package/dist/chunk-wyr5d8ad.js +3 -0
  56. package/dist/chunk-wyr5d8ad.js.map +10 -0
  57. package/dist/chunk-x0jsq6ag.js +3 -0
  58. package/dist/chunk-x0jsq6ag.js.map +10 -0
  59. package/dist/chunk-x2fe9scs.js +3 -0
  60. package/dist/chunk-x2fe9scs.js.map +10 -0
  61. package/dist/chunk-xm5jkehh.js +4 -0
  62. package/dist/chunk-xm5jkehh.js.map +10 -0
  63. package/dist/chunk-xzb1nshn.js +3 -0
  64. package/dist/chunk-xzb1nshn.js.map +10 -0
  65. package/dist/contracts/index.cjs +3 -0
  66. package/dist/contracts/index.cjs.map +38 -0
  67. package/dist/contracts/index.js +3 -0
  68. package/dist/contracts/index.js.map +38 -0
  69. package/dist/index.cjs +6 -0
  70. package/dist/index.cjs.map +30 -0
  71. package/dist/index.js +3 -3
  72. package/dist/index.js.map +23 -23
  73. package/dist/tokens/index.cjs +3 -0
  74. package/dist/tokens/index.cjs.map +10 -0
  75. package/dist/tokens/index.js +3 -0
  76. package/dist/tokens/index.js.map +10 -0
  77. package/package.json +35 -16
  78. package/src/api/index.ts +19 -0
  79. package/src/api/microgard/endpoints.ts +83 -0
  80. package/src/api/microgard/types.ts +60 -0
  81. package/src/api/midgard/endpoints.ts +154 -0
  82. package/src/api/midgard/types.ts +155 -0
  83. package/src/api/swapkitApi/endpoints.ts +161 -0
  84. package/src/api/swapkitApi/types.ts +576 -0
  85. package/src/api/thornode/endpoints.ts +78 -0
  86. package/src/api/thornode/types.ts +241 -0
  87. package/src/api/thorswapStatic/endpoints.ts +46 -0
  88. package/src/api/thorswapStatic/types.ts +18 -0
  89. package/src/contracts/abis/avaxGeneric.ts +92 -0
  90. package/src/contracts/abis/avaxWoofi.ts +145 -0
  91. package/src/contracts/abis/bscGeneric.ts +106 -0
  92. package/src/contracts/abis/chainflipGateway.ts +330 -0
  93. package/src/contracts/abis/erc20.ts +99 -0
  94. package/src/contracts/abis/ethGeneric.ts +92 -0
  95. package/src/contracts/abis/mayaEvmVaults.ts +331 -0
  96. package/src/contracts/abis/pancakeV2.ts +145 -0
  97. package/src/contracts/abis/pangolin.ts +120 -0
  98. package/src/contracts/abis/sushiswap.ts +120 -0
  99. package/src/contracts/abis/tcEthVault.ts +650 -0
  100. package/src/contracts/abis/traderJoe.ts +120 -0
  101. package/src/contracts/abis/uniswapV2.ts +120 -0
  102. package/src/contracts/abis/uniswapV2Leg.ts +128 -0
  103. package/src/contracts/abis/uniswapV3_100.ts +128 -0
  104. package/src/contracts/abis/uniswapV3_10000.ts +128 -0
  105. package/src/contracts/abis/uniswapV3_3000.ts +128 -0
  106. package/src/contracts/abis/uniswapV3_500.ts +128 -0
  107. package/src/contracts/index.ts +95 -0
  108. package/src/contracts/routers/index.ts +58 -0
  109. package/src/contracts/routers/kyber.ts +402 -0
  110. package/src/contracts/routers/oneinch.ts +2188 -0
  111. package/src/contracts/routers/pancakeswap.ts +340 -0
  112. package/src/contracts/routers/pangolin.ts +340 -0
  113. package/src/contracts/routers/sushiswap.ts +340 -0
  114. package/src/contracts/routers/traderJoe.ts +340 -0
  115. package/src/contracts/routers/uniswapv2.ts +340 -0
  116. package/src/contracts/routers/uniswapv3.ts +254 -0
  117. package/src/contracts/routers/woofi.ts +171 -0
  118. package/src/index.ts +19 -15
  119. package/src/modules/__tests__/assetValue.test.ts +50 -24
  120. package/src/modules/__tests__/swapKitConfig.test.ts +37 -0
  121. package/src/modules/assetValue.ts +82 -141
  122. package/src/modules/bigIntArithmetics.ts +6 -2
  123. package/src/modules/requestClient.ts +53 -65
  124. package/src/modules/swapKitConfig.ts +134 -0
  125. package/src/modules/swapKitError.ts +19 -14
  126. package/src/tokens/index.ts +15 -0
  127. package/src/tokens/lists/camelot_v3.ts +15920 -0
  128. package/src/tokens/lists/caviar_v1.ts +1694 -0
  129. package/src/tokens/lists/chainflip.ts +104 -0
  130. package/src/tokens/lists/index.ts +14 -0
  131. package/src/tokens/lists/jupiter.ts +29606 -0
  132. package/src/tokens/lists/mayachain.ts +513 -0
  133. package/src/tokens/lists/oneinch.ts +14238 -0
  134. package/src/tokens/lists/openocean_v2.ts +11514 -0
  135. package/src/tokens/lists/pancakeswap.ts +4296 -0
  136. package/src/tokens/lists/pangolin_v1.ts +175 -0
  137. package/src/tokens/lists/sushiswap_v2.ts +965 -0
  138. package/src/tokens/lists/thorchain.ts +669 -0
  139. package/src/tokens/lists/traderjoe_v2.ts +1384 -0
  140. package/src/tokens/lists/uniswap_v2.ts +5596 -0
  141. package/src/tokens/lists/uniswap_v3.ts +5946 -0
  142. package/src/types/chains.ts +48 -51
  143. package/src/types/commonTypes.ts +3 -90
  144. package/src/types/derivationPath.ts +11 -24
  145. package/src/types/index.ts +3 -4
  146. package/src/types/quotes.ts +0 -1
  147. package/src/types/radix.ts +2 -2
  148. package/src/types/sdk.ts +0 -40
  149. package/src/types/tokens.ts +14 -17
  150. package/src/types/wallet.ts +70 -33
  151. package/src/{helpers → utils}/__tests__/asset.test.ts +0 -27
  152. package/src/utils/asset.ts +235 -0
  153. package/src/{helpers → utils}/derivationPath.ts +31 -9
  154. package/src/{helpers → utils}/memo.ts +0 -82
  155. package/src/{helpers → utils}/others.ts +12 -5
  156. package/src/utils/plugin.ts +13 -0
  157. package/src/utils/tokens.ts +73 -0
  158. package/src/{helpers → utils}/validators.ts +7 -5
  159. package/src/{helpers/web3wallets.ts → utils/wallets.ts} +189 -145
  160. package/src/helpers/asset.ts +0 -324
  161. package/src/modules/walletUtils.ts +0 -30
  162. package/src/types/network.ts +0 -49
  163. /package/src/{helpers/__tests__/derivationPath.ts → utils/__tests__/derivationPath.test.ts} +0 -0
  164. /package/src/{helpers → utils}/__tests__/memo.test.ts +0 -0
  165. /package/src/{helpers → utils}/__tests__/others.test.ts +0 -0
  166. /package/src/{helpers → utils}/__tests__/validators.test.ts +0 -0
  167. /package/src/{helpers → utils}/liquidity.ts +0 -0
@@ -0,0 +1,120 @@
1
+ export const traderJoe = [
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
+ ],
8
+ stateMutability: "nonpayable",
9
+ type: "constructor",
10
+ },
11
+ {
12
+ anonymous: false,
13
+ inputs: [
14
+ { indexed: false, internalType: "uint256", name: "fee", type: "uint256" },
15
+ { indexed: false, internalType: "address", name: "feeRecipient", type: "address" },
16
+ ],
17
+ name: "FeeSet",
18
+ type: "event",
19
+ },
20
+ {
21
+ anonymous: false,
22
+ inputs: [
23
+ { indexed: true, internalType: "address", name: "owner", type: "address" },
24
+ { indexed: false, internalType: "bool", name: "active", type: "bool" },
25
+ ],
26
+ name: "OwnerSet",
27
+ type: "event",
28
+ },
29
+ {
30
+ inputs: [],
31
+ name: "fee",
32
+ outputs: [{ internalType: "uint256", name: "", type: "uint256" }],
33
+ stateMutability: "view",
34
+ type: "function",
35
+ },
36
+ {
37
+ inputs: [],
38
+ name: "feeRecipient",
39
+ outputs: [{ internalType: "address", name: "", type: "address" }],
40
+ stateMutability: "view",
41
+ type: "function",
42
+ },
43
+ {
44
+ inputs: [{ internalType: "address", name: "", type: "address" }],
45
+ name: "owners",
46
+ outputs: [{ internalType: "bool", name: "", type: "bool" }],
47
+ stateMutability: "view",
48
+ type: "function",
49
+ },
50
+ {
51
+ inputs: [
52
+ { internalType: "uint256", name: "_fee", type: "uint256" },
53
+ { internalType: "address", name: "_feeRecipient", type: "address" },
54
+ ],
55
+ name: "setFee",
56
+ outputs: [],
57
+ stateMutability: "nonpayable",
58
+ type: "function",
59
+ },
60
+ {
61
+ inputs: [
62
+ { internalType: "address", name: "owner", type: "address" },
63
+ { internalType: "bool", name: "active", type: "bool" },
64
+ ],
65
+ name: "setOwner",
66
+ outputs: [],
67
+ stateMutability: "nonpayable",
68
+ type: "function",
69
+ },
70
+ {
71
+ inputs: [
72
+ { internalType: "address", name: "tcRouter", type: "address" },
73
+ { internalType: "address", name: "tcVault", type: "address" },
74
+ { internalType: "string", name: "tcMemo", type: "string" },
75
+ { internalType: "address", name: "token", type: "address" },
76
+ { internalType: "uint256", name: "amount", type: "uint256" },
77
+ { internalType: "uint256", name: "amountOutMin", type: "uint256" },
78
+ { internalType: "uint256", name: "deadline", type: "uint256" },
79
+ ],
80
+ name: "swapIn",
81
+ outputs: [],
82
+ stateMutability: "nonpayable",
83
+ type: "function",
84
+ },
85
+ {
86
+ inputs: [
87
+ { internalType: "address", name: "token", type: "address" },
88
+ { internalType: "address", name: "to", type: "address" },
89
+ { internalType: "uint256", name: "amountOutMin", type: "uint256" },
90
+ ],
91
+ name: "swapOut",
92
+ outputs: [],
93
+ stateMutability: "payable",
94
+ type: "function",
95
+ },
96
+ {
97
+ inputs: [],
98
+ name: "swapRouter",
99
+ outputs: [{ internalType: "contract IUniswapRouterV2AVAX", name: "", type: "address" }],
100
+ stateMutability: "view",
101
+ type: "function",
102
+ },
103
+ {
104
+ inputs: [],
105
+ name: "tokenTransferProxy",
106
+ outputs: [
107
+ { internalType: "contract TSAggregatorTokenTransferProxy", name: "", type: "address" },
108
+ ],
109
+ stateMutability: "view",
110
+ type: "function",
111
+ },
112
+ {
113
+ inputs: [],
114
+ name: "weth",
115
+ outputs: [{ internalType: "address", name: "", type: "address" }],
116
+ stateMutability: "view",
117
+ type: "function",
118
+ },
119
+ { stateMutability: "payable", type: "receive" },
120
+ ];
@@ -0,0 +1,120 @@
1
+ export const uniswapV2 = [
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
+ ],
8
+ stateMutability: "nonpayable",
9
+ type: "constructor",
10
+ },
11
+ {
12
+ anonymous: false,
13
+ inputs: [
14
+ { indexed: false, internalType: "uint256", name: "fee", type: "uint256" },
15
+ { indexed: false, internalType: "address", name: "feeRecipient", type: "address" },
16
+ ],
17
+ name: "FeeSet",
18
+ type: "event",
19
+ },
20
+ {
21
+ anonymous: false,
22
+ inputs: [
23
+ { indexed: true, internalType: "address", name: "owner", type: "address" },
24
+ { indexed: false, internalType: "bool", name: "active", type: "bool" },
25
+ ],
26
+ name: "OwnerSet",
27
+ type: "event",
28
+ },
29
+ {
30
+ inputs: [],
31
+ name: "fee",
32
+ outputs: [{ internalType: "uint256", name: "", type: "uint256" }],
33
+ stateMutability: "view",
34
+ type: "function",
35
+ },
36
+ {
37
+ inputs: [],
38
+ name: "feeRecipient",
39
+ outputs: [{ internalType: "address", name: "", type: "address" }],
40
+ stateMutability: "view",
41
+ type: "function",
42
+ },
43
+ {
44
+ inputs: [{ internalType: "address", name: "", type: "address" }],
45
+ name: "owners",
46
+ outputs: [{ internalType: "bool", name: "", type: "bool" }],
47
+ stateMutability: "view",
48
+ type: "function",
49
+ },
50
+ {
51
+ inputs: [
52
+ { internalType: "uint256", name: "_fee", type: "uint256" },
53
+ { internalType: "address", name: "_feeRecipient", type: "address" },
54
+ ],
55
+ name: "setFee",
56
+ outputs: [],
57
+ stateMutability: "nonpayable",
58
+ type: "function",
59
+ },
60
+ {
61
+ inputs: [
62
+ { internalType: "address", name: "owner", type: "address" },
63
+ { internalType: "bool", name: "active", type: "bool" },
64
+ ],
65
+ name: "setOwner",
66
+ outputs: [],
67
+ stateMutability: "nonpayable",
68
+ type: "function",
69
+ },
70
+ {
71
+ inputs: [
72
+ { internalType: "address", name: "tcRouter", type: "address" },
73
+ { internalType: "address", name: "tcVault", type: "address" },
74
+ { internalType: "string", name: "tcMemo", type: "string" },
75
+ { internalType: "address", name: "token", type: "address" },
76
+ { internalType: "uint256", name: "amount", type: "uint256" },
77
+ { internalType: "uint256", name: "amountOutMin", type: "uint256" },
78
+ { internalType: "uint256", name: "deadline", type: "uint256" },
79
+ ],
80
+ name: "swapIn",
81
+ outputs: [],
82
+ stateMutability: "nonpayable",
83
+ type: "function",
84
+ },
85
+ {
86
+ inputs: [
87
+ { internalType: "address", name: "token", type: "address" },
88
+ { internalType: "address", name: "to", type: "address" },
89
+ { internalType: "uint256", name: "amountOutMin", type: "uint256" },
90
+ ],
91
+ name: "swapOut",
92
+ outputs: [],
93
+ stateMutability: "payable",
94
+ type: "function",
95
+ },
96
+ {
97
+ inputs: [],
98
+ name: "swapRouter",
99
+ outputs: [{ internalType: "contract IUniswapRouterV2", name: "", type: "address" }],
100
+ stateMutability: "view",
101
+ type: "function",
102
+ },
103
+ {
104
+ inputs: [],
105
+ name: "tokenTransferProxy",
106
+ outputs: [
107
+ { internalType: "contract TSAggregatorTokenTransferProxy", name: "", type: "address" },
108
+ ],
109
+ stateMutability: "view",
110
+ type: "function",
111
+ },
112
+ {
113
+ inputs: [],
114
+ name: "weth",
115
+ outputs: [{ internalType: "address", name: "", type: "address" }],
116
+ stateMutability: "view",
117
+ type: "function",
118
+ },
119
+ { stateMutability: "payable", type: "receive" },
120
+ ];
@@ -0,0 +1,128 @@
1
+ export const uniswapV2Leg = [
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: "address", name: "_legToken", type: "address" },
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: [],
46
+ name: "legToken",
47
+ outputs: [{ internalType: "address", name: "", type: "address" }],
48
+ stateMutability: "view",
49
+ type: "function",
50
+ },
51
+ {
52
+ inputs: [{ internalType: "address", name: "", type: "address" }],
53
+ name: "owners",
54
+ outputs: [{ internalType: "bool", name: "", type: "bool" }],
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 IUniswapRouterV2", 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: "address", name: "", type: "address" }],
124
+ stateMutability: "view",
125
+ type: "function",
126
+ },
127
+ { stateMutability: "payable", type: "receive" },
128
+ ];
@@ -0,0 +1,128 @@
1
+ export const uniswapV3_100 = [
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
+ ];
@@ -0,0 +1,128 @@
1
+ export const uniswapV3_10000 = [
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
+ ];