@sentio/sdk 2.5.1-rc.1 → 2.5.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 (245) hide show
  1. package/lib/eth/codegen/event-handler.js.map +1 -1
  2. package/lib/eth/codegen/functions-handler.js +4 -9
  3. package/lib/eth/codegen/functions-handler.js.map +1 -1
  4. package/lib/eth/context.js.map +1 -1
  5. package/lib/eth/index.d.ts +0 -1
  6. package/lib/eth/index.js +0 -1
  7. package/lib/eth/index.js.map +1 -1
  8. package/lib/move/abstract-codegen.js +3 -9
  9. package/lib/move/abstract-codegen.js.map +1 -1
  10. package/lib/sui/sui-processor.js.map +1 -1
  11. package/lib/utils/dex-price.test.js.map +1 -1
  12. package/lib/utils/erc20.test.js.map +1 -1
  13. package/package.json +5 -8
  14. package/src/eth/codegen/event-handler.ts +1 -1
  15. package/src/eth/codegen/functions-handler.ts +4 -10
  16. package/src/eth/context.ts +0 -1
  17. package/src/eth/index.ts +0 -1
  18. package/src/move/abstract-codegen.ts +3 -10
  19. package/src/sui/sui-processor.ts +1 -1
  20. package/lib/aptos/tests/aptos.test.d.ts +0 -1
  21. package/lib/aptos/tests/aptos.test.js.map +0 -1
  22. package/lib/aptos/tests/souffl3.d.ts +0 -1
  23. package/lib/aptos/tests/souffl3.js +0 -43
  24. package/lib/aptos/tests/souffl3.js.map +0 -1
  25. package/lib/aptos/tests/types/index.d.ts +0 -3
  26. package/lib/aptos/tests/types/index.js +0 -7
  27. package/lib/aptos/tests/types/index.js.map +0 -1
  28. package/lib/aptos/tests/types/reserved.d.ts +0 -340
  29. package/lib/aptos/tests/types/reserved.js +0 -287
  30. package/lib/aptos/tests/types/reserved.js.map +0 -1
  31. package/lib/aptos/tests/types/soffl3.d.ts +0 -801
  32. package/lib/aptos/tests/types/soffl3.js +0 -514
  33. package/lib/aptos/tests/types/soffl3.js.map +0 -1
  34. package/lib/aptos/tests/types/souffle.d.ts +0 -335
  35. package/lib/aptos/tests/types/souffle.js +0 -281
  36. package/lib/aptos/tests/types/souffle.js.map +0 -1
  37. package/lib/eth/error.d.ts +0 -1
  38. package/lib/eth/error.js +0 -3
  39. package/lib/eth/error.js.map +0 -1
  40. package/lib/eth/tests/account.test.d.ts +0 -1
  41. package/lib/eth/tests/account.test.js.map +0 -1
  42. package/lib/eth/tests/codegen.test.d.ts +0 -1
  43. package/lib/eth/tests/codegen.test.js.map +0 -1
  44. package/lib/eth/tests/erc20-template.test.d.ts +0 -1
  45. package/lib/eth/tests/erc20-template.test.js.map +0 -1
  46. package/lib/eth/tests/erc20.d.ts +0 -1
  47. package/lib/eth/tests/erc20.js +0 -52
  48. package/lib/eth/tests/erc20.js.map +0 -1
  49. package/lib/eth/tests/erc20.test.d.ts +0 -1
  50. package/lib/eth/tests/erc20.test.js.map +0 -1
  51. package/lib/eth/tests/error-capture.test.d.ts +0 -1
  52. package/lib/eth/tests/error-capture.test.js.map +0 -1
  53. package/lib/eth/tests/logger.test.d.ts +0 -1
  54. package/lib/eth/tests/logger.test.js.map +0 -1
  55. package/lib/eth/tests/types/anyswaprouter.d.ts +0 -3
  56. package/lib/eth/tests/types/anyswaprouter.js +0 -7
  57. package/lib/eth/tests/types/anyswaprouter.js.map +0 -1
  58. package/lib/eth/tests/types/commitmentpool.d.ts +0 -3
  59. package/lib/eth/tests/types/commitmentpool.js +0 -7
  60. package/lib/eth/tests/types/commitmentpool.js.map +0 -1
  61. package/lib/eth/tests/types/index.d.ts +0 -12
  62. package/lib/eth/tests/types/index.js +0 -16
  63. package/lib/eth/tests/types/index.js.map +0 -1
  64. package/lib/eth/tests/types/internal/AnyswapRouter.d.ts +0 -122
  65. package/lib/eth/tests/types/internal/AnyswapRouter.js +0 -2
  66. package/lib/eth/tests/types/internal/AnyswapRouter.js.map +0 -1
  67. package/lib/eth/tests/types/internal/CommitmentPool.d.ts +0 -176
  68. package/lib/eth/tests/types/internal/CommitmentPool.js +0 -2
  69. package/lib/eth/tests/types/internal/CommitmentPool.js.map +0 -1
  70. package/lib/eth/tests/types/internal/MembershipStakerV3.d.ts +0 -81
  71. package/lib/eth/tests/types/internal/MembershipStakerV3.js +0 -2
  72. package/lib/eth/tests/types/internal/MembershipStakerV3.js.map +0 -1
  73. package/lib/eth/tests/types/internal/Pyth.d.ts +0 -204
  74. package/lib/eth/tests/types/internal/Pyth.js +0 -2
  75. package/lib/eth/tests/types/internal/Pyth.js.map +0 -1
  76. package/lib/eth/tests/types/internal/Seaport.d.ts +0 -350
  77. package/lib/eth/tests/types/internal/Seaport.js +0 -2
  78. package/lib/eth/tests/types/internal/Seaport.js.map +0 -1
  79. package/lib/eth/tests/types/internal/TokenExchange.d.ts +0 -128
  80. package/lib/eth/tests/types/internal/TokenExchange.js +0 -2
  81. package/lib/eth/tests/types/internal/TokenExchange.js.map +0 -1
  82. package/lib/eth/tests/types/internal/anyswaprouter-processor.d.ts +0 -463
  83. package/lib/eth/tests/types/internal/anyswaprouter-processor.js +0 -425
  84. package/lib/eth/tests/types/internal/anyswaprouter-processor.js.map +0 -1
  85. package/lib/eth/tests/types/internal/anyswaprouter-test-utils.d.ts +0 -9
  86. package/lib/eth/tests/types/internal/anyswaprouter-test-utils.js +0 -124
  87. package/lib/eth/tests/types/internal/anyswaprouter-test-utils.js.map +0 -1
  88. package/lib/eth/tests/types/internal/commitmentpool-processor.d.ts +0 -348
  89. package/lib/eth/tests/types/internal/commitmentpool-processor.js +0 -607
  90. package/lib/eth/tests/types/internal/commitmentpool-processor.js.map +0 -1
  91. package/lib/eth/tests/types/internal/commitmentpool-test-utils.d.ts +0 -9
  92. package/lib/eth/tests/types/internal/commitmentpool-test-utils.js +0 -87
  93. package/lib/eth/tests/types/internal/commitmentpool-test-utils.js.map +0 -1
  94. package/lib/eth/tests/types/internal/common.d.ts +0 -10
  95. package/lib/eth/tests/types/internal/common.js +0 -8
  96. package/lib/eth/tests/types/internal/common.js.map +0 -1
  97. package/lib/eth/tests/types/internal/factories/AnyswapRouter__factory.d.ts +0 -988
  98. package/lib/eth/tests/types/internal/factories/AnyswapRouter__factory.js +0 -1269
  99. package/lib/eth/tests/types/internal/factories/AnyswapRouter__factory.js.map +0 -1
  100. package/lib/eth/tests/types/internal/factories/CommitmentPool__factory.d.ts +0 -792
  101. package/lib/eth/tests/types/internal/factories/CommitmentPool__factory.js +0 -1040
  102. package/lib/eth/tests/types/internal/factories/CommitmentPool__factory.js.map +0 -1
  103. package/lib/eth/tests/types/internal/factories/MembershipStakerV3__factory.d.ts +0 -549
  104. package/lib/eth/tests/types/internal/factories/MembershipStakerV3__factory.js +0 -721
  105. package/lib/eth/tests/types/internal/factories/MembershipStakerV3__factory.js.map +0 -1
  106. package/lib/eth/tests/types/internal/factories/Pyth__factory.d.ts +0 -1130
  107. package/lib/eth/tests/types/internal/factories/Pyth__factory.js +0 -1486
  108. package/lib/eth/tests/types/internal/factories/Pyth__factory.js.map +0 -1
  109. package/lib/eth/tests/types/internal/factories/Seaport__factory.d.ts +0 -2018
  110. package/lib/eth/tests/types/internal/factories/Seaport__factory.js +0 -2610
  111. package/lib/eth/tests/types/internal/factories/Seaport__factory.js.map +0 -1
  112. package/lib/eth/tests/types/internal/factories/TokenExchange__factory.d.ts +0 -651
  113. package/lib/eth/tests/types/internal/factories/TokenExchange__factory.js +0 -853
  114. package/lib/eth/tests/types/internal/factories/TokenExchange__factory.js.map +0 -1
  115. package/lib/eth/tests/types/internal/factories/index.d.ts +0 -6
  116. package/lib/eth/tests/types/internal/factories/index.js +0 -10
  117. package/lib/eth/tests/types/internal/factories/index.js.map +0 -1
  118. package/lib/eth/tests/types/internal/index.d.ts +0 -13
  119. package/lib/eth/tests/types/internal/index.js +0 -8
  120. package/lib/eth/tests/types/internal/index.js.map +0 -1
  121. package/lib/eth/tests/types/internal/membershipstakerv3-processor.d.ts +0 -287
  122. package/lib/eth/tests/types/internal/membershipstakerv3-processor.js +0 -596
  123. package/lib/eth/tests/types/internal/membershipstakerv3-processor.js.map +0 -1
  124. package/lib/eth/tests/types/internal/membershipstakerv3-test-utils.d.ts +0 -11
  125. package/lib/eth/tests/types/internal/membershipstakerv3-test-utils.js +0 -109
  126. package/lib/eth/tests/types/internal/membershipstakerv3-test-utils.js.map +0 -1
  127. package/lib/eth/tests/types/internal/pyth-processor.d.ts +0 -422
  128. package/lib/eth/tests/types/internal/pyth-processor.js +0 -890
  129. package/lib/eth/tests/types/internal/pyth-processor.js.map +0 -1
  130. package/lib/eth/tests/types/internal/pyth-test-utils.d.ts +0 -13
  131. package/lib/eth/tests/types/internal/pyth-test-utils.js +0 -131
  132. package/lib/eth/tests/types/internal/pyth-test-utils.js.map +0 -1
  133. package/lib/eth/tests/types/internal/seaport-processor.d.ts +0 -211
  134. package/lib/eth/tests/types/internal/seaport-processor.js +0 -237
  135. package/lib/eth/tests/types/internal/seaport-processor.js.map +0 -1
  136. package/lib/eth/tests/types/internal/seaport-test-utils.d.ts +0 -6
  137. package/lib/eth/tests/types/internal/seaport-test-utils.js +0 -61
  138. package/lib/eth/tests/types/internal/seaport-test-utils.js.map +0 -1
  139. package/lib/eth/tests/types/internal/tokenexchange-processor.d.ts +0 -334
  140. package/lib/eth/tests/types/internal/tokenexchange-processor.js +0 -667
  141. package/lib/eth/tests/types/internal/tokenexchange-processor.js.map +0 -1
  142. package/lib/eth/tests/types/internal/tokenexchange-test-utils.d.ts +0 -13
  143. package/lib/eth/tests/types/internal/tokenexchange-test-utils.js +0 -149
  144. package/lib/eth/tests/types/internal/tokenexchange-test-utils.js.map +0 -1
  145. package/lib/eth/tests/types/membershipstakerv3.d.ts +0 -3
  146. package/lib/eth/tests/types/membershipstakerv3.js +0 -7
  147. package/lib/eth/tests/types/membershipstakerv3.js.map +0 -1
  148. package/lib/eth/tests/types/pyth.d.ts +0 -3
  149. package/lib/eth/tests/types/pyth.js +0 -7
  150. package/lib/eth/tests/types/pyth.js.map +0 -1
  151. package/lib/eth/tests/types/seaport.d.ts +0 -3
  152. package/lib/eth/tests/types/seaport.js +0 -7
  153. package/lib/eth/tests/types/seaport.js.map +0 -1
  154. package/lib/eth/tests/types/tokenexchange.d.ts +0 -3
  155. package/lib/eth/tests/types/tokenexchange.js +0 -7
  156. package/lib/eth/tests/types/tokenexchange.js.map +0 -1
  157. package/lib/solana/tests/solana.test.d.ts +0 -1
  158. package/lib/solana/tests/solana.test.js.map +0 -1
  159. package/lib/solana/tests/types/basic_1.d.ts +0 -26
  160. package/lib/solana/tests/types/basic_1.js +0 -63
  161. package/lib/solana/tests/types/basic_1.js.map +0 -1
  162. package/lib/solana/tests/types/basic_1_processor.d.ts +0 -21
  163. package/lib/solana/tests/types/basic_1_processor.js +0 -35
  164. package/lib/solana/tests/types/basic_1_processor.js.map +0 -1
  165. package/lib/solana/tests/types/token_bridge.d.ts +0 -29
  166. package/lib/solana/tests/types/token_bridge.js +0 -938
  167. package/lib/solana/tests/types/token_bridge.js.map +0 -1
  168. package/lib/solana/tests/types/token_bridge_processor.d.ts +0 -212
  169. package/lib/solana/tests/types/token_bridge_processor.js +0 -134
  170. package/lib/solana/tests/types/token_bridge_processor.js.map +0 -1
  171. package/lib/solana/tests/wormhole-token-bridge.d.ts +0 -15
  172. package/lib/solana/tests/wormhole-token-bridge.js +0 -79
  173. package/lib/solana/tests/wormhole-token-bridge.js.map +0 -1
  174. package/lib/sui/tests/sui.test.d.ts +0 -1
  175. package/lib/sui/tests/sui.test.js.map +0 -1
  176. package/lib/sui/tests/types/index.d.ts +0 -1
  177. package/lib/sui/tests/types/index.js +0 -5
  178. package/lib/sui/tests/types/index.js.map +0 -1
  179. package/lib/sui/tests/types/testnet/index.d.ts +0 -1
  180. package/lib/sui/tests/types/testnet/index.js +0 -5
  181. package/lib/sui/tests/types/testnet/index.js.map +0 -1
  182. package/lib/sui/tests/types/testnet/swap.d.ts +0 -249
  183. package/lib/sui/tests/types/testnet/swap.js +0 -310
  184. package/lib/sui/tests/types/testnet/swap.js.map +0 -1
  185. package/src/aptos/tests/abis/reserved.json +0 -402
  186. package/src/aptos/tests/abis/soffl3.json +0 -1411
  187. package/src/aptos/tests/abis/souffle.json +0 -389
  188. package/src/aptos/tests/souffl3.ts +0 -56
  189. package/src/aptos/tests/types/index.ts +0 -6
  190. package/src/aptos/tests/types/reserved.ts +0 -766
  191. package/src/aptos/tests/types/soffl3.ts +0 -1528
  192. package/src/aptos/tests/types/souffle.ts +0 -765
  193. package/src/eth/error.ts +0 -4
  194. package/src/eth/tests/abis/eth/CommitmentPool.json +0 -1034
  195. package/src/eth/tests/abis/eth/MembershipStakerV3.json +0 -706
  196. package/src/eth/tests/abis/eth/Pyth.json +0 -1471
  197. package/src/eth/tests/abis/eth/Seaport.json +0 -2595
  198. package/src/eth/tests/abis/eth/TokenExchange.json +0 -838
  199. package/src/eth/tests/abis/eth/anyswapRouter.json +0 -490
  200. package/src/eth/tests/erc20.ts +0 -63
  201. package/src/eth/tests/types/anyswaprouter.ts +0 -7
  202. package/src/eth/tests/types/commitmentpool.ts +0 -7
  203. package/src/eth/tests/types/index.ts +0 -33
  204. package/src/eth/tests/types/internal/AnyswapRouter.ts +0 -122
  205. package/src/eth/tests/types/internal/CommitmentPool.ts +0 -208
  206. package/src/eth/tests/types/internal/MembershipStakerV3.ts +0 -108
  207. package/src/eth/tests/types/internal/Pyth.ts +0 -246
  208. package/src/eth/tests/types/internal/Seaport.ts +0 -389
  209. package/src/eth/tests/types/internal/TokenExchange.ts +0 -142
  210. package/src/eth/tests/types/internal/anyswaprouter-processor.ts +0 -1396
  211. package/src/eth/tests/types/internal/anyswaprouter-test-utils.ts +0 -187
  212. package/src/eth/tests/types/internal/commitmentpool-processor.ts +0 -1575
  213. package/src/eth/tests/types/internal/commitmentpool-test-utils.ts +0 -150
  214. package/src/eth/tests/types/internal/common.ts +0 -23
  215. package/src/eth/tests/types/internal/factories/AnyswapRouter__factory.ts +0 -1278
  216. package/src/eth/tests/types/internal/factories/CommitmentPool__factory.ts +0 -1049
  217. package/src/eth/tests/types/internal/factories/MembershipStakerV3__factory.ts +0 -730
  218. package/src/eth/tests/types/internal/factories/Pyth__factory.ts +0 -1492
  219. package/src/eth/tests/types/internal/factories/Seaport__factory.ts +0 -2616
  220. package/src/eth/tests/types/internal/factories/TokenExchange__factory.ts +0 -862
  221. package/src/eth/tests/types/internal/factories/index.ts +0 -9
  222. package/src/eth/tests/types/internal/index.ts +0 -16
  223. package/src/eth/tests/types/internal/membershipstakerv3-processor.ts +0 -1399
  224. package/src/eth/tests/types/internal/membershipstakerv3-test-utils.ts +0 -188
  225. package/src/eth/tests/types/internal/pyth-processor.ts +0 -2043
  226. package/src/eth/tests/types/internal/pyth-test-utils.ts +0 -226
  227. package/src/eth/tests/types/internal/seaport-processor.ts +0 -678
  228. package/src/eth/tests/types/internal/seaport-test-utils.ts +0 -100
  229. package/src/eth/tests/types/internal/tokenexchange-processor.ts +0 -1570
  230. package/src/eth/tests/types/internal/tokenexchange-test-utils.ts +0 -244
  231. package/src/eth/tests/types/membershipstakerv3.ts +0 -7
  232. package/src/eth/tests/types/pyth.ts +0 -7
  233. package/src/eth/tests/types/seaport.ts +0 -7
  234. package/src/eth/tests/types/tokenexchange.ts +0 -7
  235. package/src/solana/tests/abis/basic_1.json +0 -62
  236. package/src/solana/tests/abis/token_bridge.json +0 -937
  237. package/src/solana/tests/types/basic_1.ts +0 -62
  238. package/src/solana/tests/types/basic_1_processor.ts +0 -42
  239. package/src/solana/tests/types/token_bridge.ts +0 -937
  240. package/src/solana/tests/types/token_bridge_processor.ts +0 -150
  241. package/src/solana/tests/wormhole-token-bridge.ts +0 -96
  242. package/src/sui/tests/abis/testnet/swap.json +0 -1752
  243. package/src/sui/tests/types/index.ts +0 -3
  244. package/src/sui/tests/types/testnet/index.ts +0 -4
  245. package/src/sui/tests/types/testnet/swap.ts +0 -698
@@ -1,1278 +0,0 @@
1
- /* Autogenerated file. Do not edit manually. */
2
- /* tslint:disable */
3
- /* eslint-disable */
4
- // @ts-nocheck
5
-
6
- import { Contract, Signer, Provider, Interface } from "ethers";
7
- import type {
8
- AnyswapRouter,
9
- AnyswapRouterInterface,
10
- } from "../AnyswapRouter.js";
11
-
12
- const _abi = [
13
- {
14
- inputs: [
15
- {
16
- internalType: "address",
17
- name: "_factory",
18
- type: "address",
19
- },
20
- {
21
- internalType: "address",
22
- name: "_wNATIVE",
23
- type: "address",
24
- },
25
- {
26
- internalType: "address",
27
- name: "_mpc",
28
- type: "address",
29
- },
30
- ],
31
- stateMutability: "nonpayable",
32
- type: "constructor",
33
- },
34
- {
35
- anonymous: false,
36
- inputs: [
37
- {
38
- indexed: true,
39
- internalType: "bytes32",
40
- name: "txhash",
41
- type: "bytes32",
42
- },
43
- {
44
- indexed: true,
45
- internalType: "address",
46
- name: "token",
47
- type: "address",
48
- },
49
- {
50
- indexed: true,
51
- internalType: "address",
52
- name: "to",
53
- type: "address",
54
- },
55
- {
56
- indexed: false,
57
- internalType: "uint256",
58
- name: "amount",
59
- type: "uint256",
60
- },
61
- {
62
- indexed: false,
63
- internalType: "uint256",
64
- name: "fromChainID",
65
- type: "uint256",
66
- },
67
- {
68
- indexed: false,
69
- internalType: "uint256",
70
- name: "toChainID",
71
- type: "uint256",
72
- },
73
- ],
74
- name: "LogAnySwapIn",
75
- type: "event",
76
- },
77
- {
78
- anonymous: false,
79
- inputs: [
80
- {
81
- indexed: true,
82
- internalType: "address",
83
- name: "token",
84
- type: "address",
85
- },
86
- {
87
- indexed: true,
88
- internalType: "address",
89
- name: "from",
90
- type: "address",
91
- },
92
- {
93
- indexed: true,
94
- internalType: "address",
95
- name: "to",
96
- type: "address",
97
- },
98
- {
99
- indexed: false,
100
- internalType: "uint256",
101
- name: "amount",
102
- type: "uint256",
103
- },
104
- {
105
- indexed: false,
106
- internalType: "uint256",
107
- name: "fromChainID",
108
- type: "uint256",
109
- },
110
- {
111
- indexed: false,
112
- internalType: "uint256",
113
- name: "toChainID",
114
- type: "uint256",
115
- },
116
- ],
117
- name: "LogAnySwapOut",
118
- type: "event",
119
- },
120
- {
121
- anonymous: false,
122
- inputs: [
123
- {
124
- indexed: true,
125
- internalType: "address",
126
- name: "token",
127
- type: "address",
128
- },
129
- {
130
- indexed: true,
131
- internalType: "address",
132
- name: "from",
133
- type: "address",
134
- },
135
- {
136
- indexed: false,
137
- internalType: "string",
138
- name: "to",
139
- type: "string",
140
- },
141
- {
142
- indexed: false,
143
- internalType: "uint256",
144
- name: "amount",
145
- type: "uint256",
146
- },
147
- {
148
- indexed: false,
149
- internalType: "uint256",
150
- name: "fromChainID",
151
- type: "uint256",
152
- },
153
- {
154
- indexed: false,
155
- internalType: "uint256",
156
- name: "toChainID",
157
- type: "uint256",
158
- },
159
- ],
160
- name: "LogAnySwapOut",
161
- type: "event",
162
- },
163
- {
164
- anonymous: false,
165
- inputs: [
166
- {
167
- indexed: false,
168
- internalType: "address[]",
169
- name: "path",
170
- type: "address[]",
171
- },
172
- {
173
- indexed: true,
174
- internalType: "address",
175
- name: "from",
176
- type: "address",
177
- },
178
- {
179
- indexed: true,
180
- internalType: "address",
181
- name: "to",
182
- type: "address",
183
- },
184
- {
185
- indexed: false,
186
- internalType: "uint256",
187
- name: "amountIn",
188
- type: "uint256",
189
- },
190
- {
191
- indexed: false,
192
- internalType: "uint256",
193
- name: "amountOutMin",
194
- type: "uint256",
195
- },
196
- {
197
- indexed: false,
198
- internalType: "uint256",
199
- name: "fromChainID",
200
- type: "uint256",
201
- },
202
- {
203
- indexed: false,
204
- internalType: "uint256",
205
- name: "toChainID",
206
- type: "uint256",
207
- },
208
- ],
209
- name: "LogAnySwapTradeTokensForNative",
210
- type: "event",
211
- },
212
- {
213
- anonymous: false,
214
- inputs: [
215
- {
216
- indexed: false,
217
- internalType: "address[]",
218
- name: "path",
219
- type: "address[]",
220
- },
221
- {
222
- indexed: true,
223
- internalType: "address",
224
- name: "from",
225
- type: "address",
226
- },
227
- {
228
- indexed: true,
229
- internalType: "address",
230
- name: "to",
231
- type: "address",
232
- },
233
- {
234
- indexed: false,
235
- internalType: "uint256",
236
- name: "amountIn",
237
- type: "uint256",
238
- },
239
- {
240
- indexed: false,
241
- internalType: "uint256",
242
- name: "amountOutMin",
243
- type: "uint256",
244
- },
245
- {
246
- indexed: false,
247
- internalType: "uint256",
248
- name: "fromChainID",
249
- type: "uint256",
250
- },
251
- {
252
- indexed: false,
253
- internalType: "uint256",
254
- name: "toChainID",
255
- type: "uint256",
256
- },
257
- ],
258
- name: "LogAnySwapTradeTokensForTokens",
259
- type: "event",
260
- },
261
- {
262
- anonymous: false,
263
- inputs: [
264
- {
265
- indexed: true,
266
- internalType: "address",
267
- name: "oldMPC",
268
- type: "address",
269
- },
270
- {
271
- indexed: true,
272
- internalType: "address",
273
- name: "newMPC",
274
- type: "address",
275
- },
276
- {
277
- indexed: true,
278
- internalType: "uint256",
279
- name: "effectiveTime",
280
- type: "uint256",
281
- },
282
- {
283
- indexed: false,
284
- internalType: "uint256",
285
- name: "chainID",
286
- type: "uint256",
287
- },
288
- ],
289
- name: "LogChangeMPC",
290
- type: "event",
291
- },
292
- {
293
- anonymous: false,
294
- inputs: [
295
- {
296
- indexed: true,
297
- internalType: "address",
298
- name: "oldRouter",
299
- type: "address",
300
- },
301
- {
302
- indexed: true,
303
- internalType: "address",
304
- name: "newRouter",
305
- type: "address",
306
- },
307
- {
308
- indexed: false,
309
- internalType: "uint256",
310
- name: "chainID",
311
- type: "uint256",
312
- },
313
- ],
314
- name: "LogChangeRouter",
315
- type: "event",
316
- },
317
- {
318
- inputs: [
319
- {
320
- internalType: "address",
321
- name: "token",
322
- type: "address",
323
- },
324
- {
325
- internalType: "uint256",
326
- name: "amount",
327
- type: "uint256",
328
- },
329
- ],
330
- name: "anySwapFeeTo",
331
- outputs: [],
332
- stateMutability: "nonpayable",
333
- type: "function",
334
- },
335
- {
336
- inputs: [
337
- {
338
- internalType: "bytes32[]",
339
- name: "txs",
340
- type: "bytes32[]",
341
- },
342
- {
343
- internalType: "address[]",
344
- name: "tokens",
345
- type: "address[]",
346
- },
347
- {
348
- internalType: "address[]",
349
- name: "to",
350
- type: "address[]",
351
- },
352
- {
353
- internalType: "uint256[]",
354
- name: "amounts",
355
- type: "uint256[]",
356
- },
357
- {
358
- internalType: "uint256[]",
359
- name: "fromChainIDs",
360
- type: "uint256[]",
361
- },
362
- ],
363
- name: "anySwapIn",
364
- outputs: [],
365
- stateMutability: "nonpayable",
366
- type: "function",
367
- },
368
- {
369
- inputs: [
370
- {
371
- internalType: "bytes32",
372
- name: "txs",
373
- type: "bytes32",
374
- },
375
- {
376
- internalType: "address",
377
- name: "token",
378
- type: "address",
379
- },
380
- {
381
- internalType: "address",
382
- name: "to",
383
- type: "address",
384
- },
385
- {
386
- internalType: "uint256",
387
- name: "amount",
388
- type: "uint256",
389
- },
390
- {
391
- internalType: "uint256",
392
- name: "fromChainID",
393
- type: "uint256",
394
- },
395
- ],
396
- name: "anySwapIn",
397
- outputs: [],
398
- stateMutability: "nonpayable",
399
- type: "function",
400
- },
401
- {
402
- inputs: [
403
- {
404
- internalType: "bytes32",
405
- name: "txs",
406
- type: "bytes32",
407
- },
408
- {
409
- internalType: "address",
410
- name: "token",
411
- type: "address",
412
- },
413
- {
414
- internalType: "address",
415
- name: "to",
416
- type: "address",
417
- },
418
- {
419
- internalType: "uint256",
420
- name: "amount",
421
- type: "uint256",
422
- },
423
- {
424
- internalType: "uint256",
425
- name: "fromChainID",
426
- type: "uint256",
427
- },
428
- ],
429
- name: "anySwapInAuto",
430
- outputs: [],
431
- stateMutability: "nonpayable",
432
- type: "function",
433
- },
434
- {
435
- inputs: [
436
- {
437
- internalType: "bytes32",
438
- name: "txs",
439
- type: "bytes32",
440
- },
441
- {
442
- internalType: "uint256",
443
- name: "amountIn",
444
- type: "uint256",
445
- },
446
- {
447
- internalType: "uint256",
448
- name: "amountOutMin",
449
- type: "uint256",
450
- },
451
- {
452
- internalType: "address[]",
453
- name: "path",
454
- type: "address[]",
455
- },
456
- {
457
- internalType: "address",
458
- name: "to",
459
- type: "address",
460
- },
461
- {
462
- internalType: "uint256",
463
- name: "deadline",
464
- type: "uint256",
465
- },
466
- {
467
- internalType: "uint256",
468
- name: "fromChainID",
469
- type: "uint256",
470
- },
471
- ],
472
- name: "anySwapInExactTokensForNative",
473
- outputs: [
474
- {
475
- internalType: "uint256[]",
476
- name: "amounts",
477
- type: "uint256[]",
478
- },
479
- ],
480
- stateMutability: "nonpayable",
481
- type: "function",
482
- },
483
- {
484
- inputs: [
485
- {
486
- internalType: "bytes32",
487
- name: "txs",
488
- type: "bytes32",
489
- },
490
- {
491
- internalType: "uint256",
492
- name: "amountIn",
493
- type: "uint256",
494
- },
495
- {
496
- internalType: "uint256",
497
- name: "amountOutMin",
498
- type: "uint256",
499
- },
500
- {
501
- internalType: "address[]",
502
- name: "path",
503
- type: "address[]",
504
- },
505
- {
506
- internalType: "address",
507
- name: "to",
508
- type: "address",
509
- },
510
- {
511
- internalType: "uint256",
512
- name: "deadline",
513
- type: "uint256",
514
- },
515
- {
516
- internalType: "uint256",
517
- name: "fromChainID",
518
- type: "uint256",
519
- },
520
- ],
521
- name: "anySwapInExactTokensForTokens",
522
- outputs: [
523
- {
524
- internalType: "uint256[]",
525
- name: "amounts",
526
- type: "uint256[]",
527
- },
528
- ],
529
- stateMutability: "nonpayable",
530
- type: "function",
531
- },
532
- {
533
- inputs: [
534
- {
535
- internalType: "bytes32",
536
- name: "txs",
537
- type: "bytes32",
538
- },
539
- {
540
- internalType: "address",
541
- name: "token",
542
- type: "address",
543
- },
544
- {
545
- internalType: "address",
546
- name: "to",
547
- type: "address",
548
- },
549
- {
550
- internalType: "uint256",
551
- name: "amount",
552
- type: "uint256",
553
- },
554
- {
555
- internalType: "uint256",
556
- name: "fromChainID",
557
- type: "uint256",
558
- },
559
- ],
560
- name: "anySwapInUnderlying",
561
- outputs: [],
562
- stateMutability: "nonpayable",
563
- type: "function",
564
- },
565
- {
566
- inputs: [
567
- {
568
- internalType: "address",
569
- name: "token",
570
- type: "address",
571
- },
572
- {
573
- internalType: "address",
574
- name: "to",
575
- type: "address",
576
- },
577
- {
578
- internalType: "uint256",
579
- name: "amount",
580
- type: "uint256",
581
- },
582
- {
583
- internalType: "uint256",
584
- name: "toChainID",
585
- type: "uint256",
586
- },
587
- ],
588
- name: "anySwapOut",
589
- outputs: [],
590
- stateMutability: "nonpayable",
591
- type: "function",
592
- },
593
- {
594
- inputs: [
595
- {
596
- internalType: "address",
597
- name: "token",
598
- type: "address",
599
- },
600
- {
601
- internalType: "string",
602
- name: "to",
603
- type: "string",
604
- },
605
- {
606
- internalType: "uint256",
607
- name: "amount",
608
- type: "uint256",
609
- },
610
- {
611
- internalType: "uint256",
612
- name: "toChainID",
613
- type: "uint256",
614
- },
615
- ],
616
- name: "anySwapOut",
617
- outputs: [],
618
- stateMutability: "nonpayable",
619
- type: "function",
620
- },
621
- {
622
- inputs: [
623
- {
624
- internalType: "address[]",
625
- name: "tokens",
626
- type: "address[]",
627
- },
628
- {
629
- internalType: "address[]",
630
- name: "to",
631
- type: "address[]",
632
- },
633
- {
634
- internalType: "uint256[]",
635
- name: "amounts",
636
- type: "uint256[]",
637
- },
638
- {
639
- internalType: "uint256[]",
640
- name: "toChainIDs",
641
- type: "uint256[]",
642
- },
643
- ],
644
- name: "anySwapOut",
645
- outputs: [],
646
- stateMutability: "nonpayable",
647
- type: "function",
648
- },
649
- {
650
- inputs: [
651
- {
652
- internalType: "uint256",
653
- name: "amountIn",
654
- type: "uint256",
655
- },
656
- {
657
- internalType: "uint256",
658
- name: "amountOutMin",
659
- type: "uint256",
660
- },
661
- {
662
- internalType: "address[]",
663
- name: "path",
664
- type: "address[]",
665
- },
666
- {
667
- internalType: "address",
668
- name: "to",
669
- type: "address",
670
- },
671
- {
672
- internalType: "uint256",
673
- name: "deadline",
674
- type: "uint256",
675
- },
676
- {
677
- internalType: "uint256",
678
- name: "toChainID",
679
- type: "uint256",
680
- },
681
- ],
682
- name: "anySwapOutExactTokensForNative",
683
- outputs: [],
684
- stateMutability: "nonpayable",
685
- type: "function",
686
- },
687
- {
688
- inputs: [
689
- {
690
- internalType: "uint256",
691
- name: "amountIn",
692
- type: "uint256",
693
- },
694
- {
695
- internalType: "uint256",
696
- name: "amountOutMin",
697
- type: "uint256",
698
- },
699
- {
700
- internalType: "address[]",
701
- name: "path",
702
- type: "address[]",
703
- },
704
- {
705
- internalType: "address",
706
- name: "to",
707
- type: "address",
708
- },
709
- {
710
- internalType: "uint256",
711
- name: "deadline",
712
- type: "uint256",
713
- },
714
- {
715
- internalType: "uint256",
716
- name: "toChainID",
717
- type: "uint256",
718
- },
719
- ],
720
- name: "anySwapOutExactTokensForNativeUnderlying",
721
- outputs: [],
722
- stateMutability: "nonpayable",
723
- type: "function",
724
- },
725
- {
726
- inputs: [
727
- {
728
- internalType: "uint256",
729
- name: "amountIn",
730
- type: "uint256",
731
- },
732
- {
733
- internalType: "uint256",
734
- name: "amountOutMin",
735
- type: "uint256",
736
- },
737
- {
738
- internalType: "address[]",
739
- name: "path",
740
- type: "address[]",
741
- },
742
- {
743
- internalType: "address",
744
- name: "to",
745
- type: "address",
746
- },
747
- {
748
- internalType: "uint256",
749
- name: "deadline",
750
- type: "uint256",
751
- },
752
- {
753
- internalType: "uint256",
754
- name: "toChainID",
755
- type: "uint256",
756
- },
757
- ],
758
- name: "anySwapOutExactTokensForTokens",
759
- outputs: [],
760
- stateMutability: "nonpayable",
761
- type: "function",
762
- },
763
- {
764
- inputs: [
765
- {
766
- internalType: "uint256",
767
- name: "amountIn",
768
- type: "uint256",
769
- },
770
- {
771
- internalType: "uint256",
772
- name: "amountOutMin",
773
- type: "uint256",
774
- },
775
- {
776
- internalType: "address[]",
777
- name: "path",
778
- type: "address[]",
779
- },
780
- {
781
- internalType: "address",
782
- name: "to",
783
- type: "address",
784
- },
785
- {
786
- internalType: "uint256",
787
- name: "deadline",
788
- type: "uint256",
789
- },
790
- {
791
- internalType: "uint256",
792
- name: "toChainID",
793
- type: "uint256",
794
- },
795
- ],
796
- name: "anySwapOutExactTokensForTokensUnderlying",
797
- outputs: [],
798
- stateMutability: "nonpayable",
799
- type: "function",
800
- },
801
- {
802
- inputs: [
803
- {
804
- internalType: "address",
805
- name: "token",
806
- type: "address",
807
- },
808
- {
809
- internalType: "string",
810
- name: "to",
811
- type: "string",
812
- },
813
- {
814
- internalType: "uint256",
815
- name: "toChainID",
816
- type: "uint256",
817
- },
818
- ],
819
- name: "anySwapOutNative",
820
- outputs: [],
821
- stateMutability: "payable",
822
- type: "function",
823
- },
824
- {
825
- inputs: [
826
- {
827
- internalType: "address",
828
- name: "token",
829
- type: "address",
830
- },
831
- {
832
- internalType: "address",
833
- name: "to",
834
- type: "address",
835
- },
836
- {
837
- internalType: "uint256",
838
- name: "toChainID",
839
- type: "uint256",
840
- },
841
- ],
842
- name: "anySwapOutNative",
843
- outputs: [],
844
- stateMutability: "payable",
845
- type: "function",
846
- },
847
- {
848
- inputs: [
849
- {
850
- internalType: "address",
851
- name: "token",
852
- type: "address",
853
- },
854
- {
855
- internalType: "string",
856
- name: "to",
857
- type: "string",
858
- },
859
- {
860
- internalType: "uint256",
861
- name: "amount",
862
- type: "uint256",
863
- },
864
- {
865
- internalType: "uint256",
866
- name: "toChainID",
867
- type: "uint256",
868
- },
869
- ],
870
- name: "anySwapOutUnderlying",
871
- outputs: [],
872
- stateMutability: "nonpayable",
873
- type: "function",
874
- },
875
- {
876
- inputs: [
877
- {
878
- internalType: "address",
879
- name: "token",
880
- type: "address",
881
- },
882
- {
883
- internalType: "address",
884
- name: "to",
885
- type: "address",
886
- },
887
- {
888
- internalType: "uint256",
889
- name: "amount",
890
- type: "uint256",
891
- },
892
- {
893
- internalType: "uint256",
894
- name: "toChainID",
895
- type: "uint256",
896
- },
897
- ],
898
- name: "anySwapOutUnderlying",
899
- outputs: [],
900
- stateMutability: "nonpayable",
901
- type: "function",
902
- },
903
- {
904
- inputs: [
905
- {
906
- internalType: "address",
907
- name: "token",
908
- type: "address",
909
- },
910
- ],
911
- name: "applyMinter",
912
- outputs: [],
913
- stateMutability: "nonpayable",
914
- type: "function",
915
- },
916
- {
917
- inputs: [],
918
- name: "cID",
919
- outputs: [
920
- {
921
- internalType: "uint256",
922
- name: "id",
923
- type: "uint256",
924
- },
925
- ],
926
- stateMutability: "view",
927
- type: "function",
928
- },
929
- {
930
- inputs: [
931
- {
932
- internalType: "address",
933
- name: "newMPC",
934
- type: "address",
935
- },
936
- ],
937
- name: "changeMPC",
938
- outputs: [
939
- {
940
- internalType: "bool",
941
- name: "",
942
- type: "bool",
943
- },
944
- ],
945
- stateMutability: "nonpayable",
946
- type: "function",
947
- },
948
- {
949
- inputs: [
950
- {
951
- internalType: "address",
952
- name: "token",
953
- type: "address",
954
- },
955
- {
956
- internalType: "address",
957
- name: "newVault",
958
- type: "address",
959
- },
960
- ],
961
- name: "changeVault",
962
- outputs: [
963
- {
964
- internalType: "bool",
965
- name: "",
966
- type: "bool",
967
- },
968
- ],
969
- stateMutability: "nonpayable",
970
- type: "function",
971
- },
972
- {
973
- inputs: [
974
- {
975
- internalType: "address",
976
- name: "token",
977
- type: "address",
978
- },
979
- {
980
- internalType: "address",
981
- name: "to",
982
- type: "address",
983
- },
984
- ],
985
- name: "depositNative",
986
- outputs: [
987
- {
988
- internalType: "uint256",
989
- name: "",
990
- type: "uint256",
991
- },
992
- ],
993
- stateMutability: "payable",
994
- type: "function",
995
- },
996
- {
997
- inputs: [],
998
- name: "enableSwapTrade",
999
- outputs: [
1000
- {
1001
- internalType: "bool",
1002
- name: "",
1003
- type: "bool",
1004
- },
1005
- ],
1006
- stateMutability: "view",
1007
- type: "function",
1008
- },
1009
- {
1010
- inputs: [],
1011
- name: "factory",
1012
- outputs: [
1013
- {
1014
- internalType: "address",
1015
- name: "",
1016
- type: "address",
1017
- },
1018
- ],
1019
- stateMutability: "view",
1020
- type: "function",
1021
- },
1022
- {
1023
- inputs: [
1024
- {
1025
- internalType: "uint256",
1026
- name: "amountOut",
1027
- type: "uint256",
1028
- },
1029
- {
1030
- internalType: "uint256",
1031
- name: "reserveIn",
1032
- type: "uint256",
1033
- },
1034
- {
1035
- internalType: "uint256",
1036
- name: "reserveOut",
1037
- type: "uint256",
1038
- },
1039
- ],
1040
- name: "getAmountIn",
1041
- outputs: [
1042
- {
1043
- internalType: "uint256",
1044
- name: "amountIn",
1045
- type: "uint256",
1046
- },
1047
- ],
1048
- stateMutability: "pure",
1049
- type: "function",
1050
- },
1051
- {
1052
- inputs: [
1053
- {
1054
- internalType: "uint256",
1055
- name: "amountIn",
1056
- type: "uint256",
1057
- },
1058
- {
1059
- internalType: "uint256",
1060
- name: "reserveIn",
1061
- type: "uint256",
1062
- },
1063
- {
1064
- internalType: "uint256",
1065
- name: "reserveOut",
1066
- type: "uint256",
1067
- },
1068
- ],
1069
- name: "getAmountOut",
1070
- outputs: [
1071
- {
1072
- internalType: "uint256",
1073
- name: "amountOut",
1074
- type: "uint256",
1075
- },
1076
- ],
1077
- stateMutability: "pure",
1078
- type: "function",
1079
- },
1080
- {
1081
- inputs: [
1082
- {
1083
- internalType: "uint256",
1084
- name: "amountOut",
1085
- type: "uint256",
1086
- },
1087
- {
1088
- internalType: "address[]",
1089
- name: "path",
1090
- type: "address[]",
1091
- },
1092
- ],
1093
- name: "getAmountsIn",
1094
- outputs: [
1095
- {
1096
- internalType: "uint256[]",
1097
- name: "amounts",
1098
- type: "uint256[]",
1099
- },
1100
- ],
1101
- stateMutability: "view",
1102
- type: "function",
1103
- },
1104
- {
1105
- inputs: [
1106
- {
1107
- internalType: "uint256",
1108
- name: "amountIn",
1109
- type: "uint256",
1110
- },
1111
- {
1112
- internalType: "address[]",
1113
- name: "path",
1114
- type: "address[]",
1115
- },
1116
- ],
1117
- name: "getAmountsOut",
1118
- outputs: [
1119
- {
1120
- internalType: "uint256[]",
1121
- name: "amounts",
1122
- type: "uint256[]",
1123
- },
1124
- ],
1125
- stateMutability: "view",
1126
- type: "function",
1127
- },
1128
- {
1129
- inputs: [],
1130
- name: "mpc",
1131
- outputs: [
1132
- {
1133
- internalType: "address",
1134
- name: "",
1135
- type: "address",
1136
- },
1137
- ],
1138
- stateMutability: "view",
1139
- type: "function",
1140
- },
1141
- {
1142
- inputs: [
1143
- {
1144
- internalType: "uint256",
1145
- name: "amountA",
1146
- type: "uint256",
1147
- },
1148
- {
1149
- internalType: "uint256",
1150
- name: "reserveA",
1151
- type: "uint256",
1152
- },
1153
- {
1154
- internalType: "uint256",
1155
- name: "reserveB",
1156
- type: "uint256",
1157
- },
1158
- ],
1159
- name: "quote",
1160
- outputs: [
1161
- {
1162
- internalType: "uint256",
1163
- name: "amountB",
1164
- type: "uint256",
1165
- },
1166
- ],
1167
- stateMutability: "pure",
1168
- type: "function",
1169
- },
1170
- {
1171
- inputs: [
1172
- {
1173
- internalType: "address",
1174
- name: "token",
1175
- type: "address",
1176
- },
1177
- {
1178
- internalType: "address",
1179
- name: "_auth",
1180
- type: "address",
1181
- },
1182
- ],
1183
- name: "revokeMinter",
1184
- outputs: [],
1185
- stateMutability: "nonpayable",
1186
- type: "function",
1187
- },
1188
- {
1189
- inputs: [
1190
- {
1191
- internalType: "bool",
1192
- name: "enable",
1193
- type: "bool",
1194
- },
1195
- ],
1196
- name: "setEnableSwapTrade",
1197
- outputs: [],
1198
- stateMutability: "nonpayable",
1199
- type: "function",
1200
- },
1201
- {
1202
- inputs: [
1203
- {
1204
- internalType: "address",
1205
- name: "token",
1206
- type: "address",
1207
- },
1208
- {
1209
- internalType: "address",
1210
- name: "_auth",
1211
- type: "address",
1212
- },
1213
- ],
1214
- name: "setMinter",
1215
- outputs: [],
1216
- stateMutability: "nonpayable",
1217
- type: "function",
1218
- },
1219
- {
1220
- inputs: [],
1221
- name: "wNATIVE",
1222
- outputs: [
1223
- {
1224
- internalType: "address",
1225
- name: "",
1226
- type: "address",
1227
- },
1228
- ],
1229
- stateMutability: "view",
1230
- type: "function",
1231
- },
1232
- {
1233
- inputs: [
1234
- {
1235
- internalType: "address",
1236
- name: "token",
1237
- type: "address",
1238
- },
1239
- {
1240
- internalType: "uint256",
1241
- name: "amount",
1242
- type: "uint256",
1243
- },
1244
- {
1245
- internalType: "address",
1246
- name: "to",
1247
- type: "address",
1248
- },
1249
- ],
1250
- name: "withdrawNative",
1251
- outputs: [
1252
- {
1253
- internalType: "uint256",
1254
- name: "",
1255
- type: "uint256",
1256
- },
1257
- ],
1258
- stateMutability: "nonpayable",
1259
- type: "function",
1260
- },
1261
- {
1262
- stateMutability: "payable",
1263
- type: "receive",
1264
- },
1265
- ] as const;
1266
-
1267
- export class AnyswapRouter__factory {
1268
- static readonly abi = _abi;
1269
- static createInterface(): AnyswapRouterInterface {
1270
- return new Interface(_abi) as AnyswapRouterInterface;
1271
- }
1272
- static connect(
1273
- address: string,
1274
- signerOrProvider: Signer | Provider
1275
- ): AnyswapRouter {
1276
- return new Contract(address, _abi, signerOrProvider) as AnyswapRouter;
1277
- }
1278
- }