@sentio/sdk 2.57.12-rc.j → 2.57.13-rc.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 (250) hide show
  1. package/lib/core/template.d.ts +1 -5
  2. package/lib/core/template.d.ts.map +1 -1
  3. package/lib/core/template.js +1 -4
  4. package/lib/core/template.js.map +1 -1
  5. package/lib/store/store.d.ts +2 -2
  6. package/lib/store/store.d.ts.map +1 -1
  7. package/lib/store/store.js.map +1 -1
  8. package/package.json +3 -3
  9. package/src/core/template.ts +1 -6
  10. package/src/store/store.ts +2 -3
  11. package/lib/chunk-2F2KNF4Z.js +0 -71905
  12. package/lib/chunk-2F2KNF4Z.js.map +0 -1
  13. package/lib/chunk-43HP4DQZ.js +0 -47
  14. package/lib/chunk-43HP4DQZ.js.map +0 -1
  15. package/lib/chunk-4HPFNKDX.js +0 -6763
  16. package/lib/chunk-4HPFNKDX.js.map +0 -1
  17. package/lib/chunk-4OCWUYSJ.js +0 -898
  18. package/lib/chunk-4OCWUYSJ.js.map +0 -1
  19. package/lib/chunk-6UVWNOIX.js +0 -4207
  20. package/lib/chunk-6UVWNOIX.js.map +0 -1
  21. package/lib/chunk-73SHERGU.js +0 -23970
  22. package/lib/chunk-73SHERGU.js.map +0 -1
  23. package/lib/chunk-742S42NO.js +0 -1323
  24. package/lib/chunk-742S42NO.js.map +0 -1
  25. package/lib/chunk-7ECRTQD7.js +0 -26757
  26. package/lib/chunk-7ECRTQD7.js.map +0 -1
  27. package/lib/chunk-7IDGS56O.js +0 -5058
  28. package/lib/chunk-7IDGS56O.js.map +0 -1
  29. package/lib/chunk-7S6WQ4RL.js +0 -1069
  30. package/lib/chunk-7S6WQ4RL.js.map +0 -1
  31. package/lib/chunk-AZFMPZRN.js +0 -3613
  32. package/lib/chunk-AZFMPZRN.js.map +0 -1
  33. package/lib/chunk-BZCXYTDE.js +0 -1333
  34. package/lib/chunk-BZCXYTDE.js.map +0 -1
  35. package/lib/chunk-E2DS6WZF.js +0 -1690
  36. package/lib/chunk-E2DS6WZF.js.map +0 -1
  37. package/lib/chunk-GE6BRIGS.js +0 -1721
  38. package/lib/chunk-GE6BRIGS.js.map +0 -1
  39. package/lib/chunk-J3I3VNTV.js +0 -767
  40. package/lib/chunk-J3I3VNTV.js.map +0 -1
  41. package/lib/chunk-J3QOJ2RV.js +0 -661
  42. package/lib/chunk-J3QOJ2RV.js.map +0 -1
  43. package/lib/chunk-J5UEW4B7.js +0 -1351
  44. package/lib/chunk-J5UEW4B7.js.map +0 -1
  45. package/lib/chunk-LPSNAS2G.js +0 -460
  46. package/lib/chunk-LPSNAS2G.js.map +0 -1
  47. package/lib/chunk-LR232ZJV.js +0 -2593
  48. package/lib/chunk-LR232ZJV.js.map +0 -1
  49. package/lib/chunk-N36N7RXJ.js +0 -653
  50. package/lib/chunk-N36N7RXJ.js.map +0 -1
  51. package/lib/chunk-OJG2VJ5T.js +0 -7063
  52. package/lib/chunk-OJG2VJ5T.js.map +0 -1
  53. package/lib/chunk-ONBEMKI5.js +0 -323
  54. package/lib/chunk-ONBEMKI5.js.map +0 -1
  55. package/lib/chunk-PVX2LIM5.js +0 -205
  56. package/lib/chunk-PVX2LIM5.js.map +0 -1
  57. package/lib/chunk-R7PMHHKJ.js +0 -52
  58. package/lib/chunk-R7PMHHKJ.js.map +0 -1
  59. package/lib/chunk-RMT2JEWA.js +0 -7740
  60. package/lib/chunk-RMT2JEWA.js.map +0 -1
  61. package/lib/chunk-S6MJ3KIL.js +0 -27798
  62. package/lib/chunk-S6MJ3KIL.js.map +0 -1
  63. package/lib/chunk-UEFVZL4I.js +0 -199
  64. package/lib/chunk-UEFVZL4I.js.map +0 -1
  65. package/lib/chunk-UIBPOKNT.js +0 -945
  66. package/lib/chunk-UIBPOKNT.js.map +0 -1
  67. package/lib/chunk-ZR7UHHH2.js +0 -5
  68. package/lib/chunk-ZR7UHHH2.js.map +0 -1
  69. package/lib/multipart-parser-SQIYSR67.js +0 -368
  70. package/lib/multipart-parser-SQIYSR67.js.map +0 -1
  71. package/src/aptos/builtin/0x1.d.ts +0 -6451
  72. package/src/aptos/builtin/0x1.d.ts.map +0 -1
  73. package/src/aptos/builtin/0x1.js +0 -7138
  74. package/src/aptos/builtin/0x1.js.map +0 -1
  75. package/src/aptos/builtin/0x3.d.ts +0 -1122
  76. package/src/aptos/builtin/0x3.d.ts.map +0 -1
  77. package/src/aptos/builtin/0x3.js +0 -937
  78. package/src/aptos/builtin/0x3.js.map +0 -1
  79. package/src/aptos/builtin/0x4.d.ts +0 -551
  80. package/src/aptos/builtin/0x4.d.ts.map +0 -1
  81. package/src/aptos/builtin/0x4.js +0 -529
  82. package/src/aptos/builtin/0x4.js.map +0 -1
  83. package/src/aptos/builtin/index.d.ts +0 -4
  84. package/src/aptos/builtin/index.d.ts.map +0 -1
  85. package/src/aptos/builtin/index.js +0 -7
  86. package/src/aptos/builtin/index.js.map +0 -1
  87. package/src/eth/builtin/eacaggregatorproxy.d.ts +0 -5
  88. package/src/eth/builtin/eacaggregatorproxy.d.ts.map +0 -1
  89. package/src/eth/builtin/eacaggregatorproxy.js +0 -8
  90. package/src/eth/builtin/eacaggregatorproxy.js.map +0 -1
  91. package/src/eth/builtin/erc1155.d.ts +0 -5
  92. package/src/eth/builtin/erc1155.d.ts.map +0 -1
  93. package/src/eth/builtin/erc1155.js +0 -8
  94. package/src/eth/builtin/erc1155.js.map +0 -1
  95. package/src/eth/builtin/erc20.d.ts +0 -5
  96. package/src/eth/builtin/erc20.d.ts.map +0 -1
  97. package/src/eth/builtin/erc20.js +0 -8
  98. package/src/eth/builtin/erc20.js.map +0 -1
  99. package/src/eth/builtin/erc20bytes.d.ts +0 -5
  100. package/src/eth/builtin/erc20bytes.d.ts.map +0 -1
  101. package/src/eth/builtin/erc20bytes.js +0 -8
  102. package/src/eth/builtin/erc20bytes.js.map +0 -1
  103. package/src/eth/builtin/erc721.d.ts +0 -5
  104. package/src/eth/builtin/erc721.d.ts.map +0 -1
  105. package/src/eth/builtin/erc721.js +0 -8
  106. package/src/eth/builtin/erc721.js.map +0 -1
  107. package/src/eth/builtin/index.d.ts +0 -13
  108. package/src/eth/builtin/index.d.ts.map +0 -1
  109. package/src/eth/builtin/index.js +0 -16
  110. package/src/eth/builtin/index.js.map +0 -1
  111. package/src/eth/builtin/internal/EACAggregatorProxy.d.ts +0 -50
  112. package/src/eth/builtin/internal/EACAggregatorProxy.d.ts.map +0 -1
  113. package/src/eth/builtin/internal/EACAggregatorProxy.js +0 -2
  114. package/src/eth/builtin/internal/EACAggregatorProxy.js.map +0 -1
  115. package/src/eth/builtin/internal/ERC1155.d.ts +0 -57
  116. package/src/eth/builtin/internal/ERC1155.d.ts.map +0 -1
  117. package/src/eth/builtin/internal/ERC1155.js +0 -2
  118. package/src/eth/builtin/internal/ERC1155.js.map +0 -1
  119. package/src/eth/builtin/internal/ERC20.d.ts +0 -41
  120. package/src/eth/builtin/internal/ERC20.d.ts.map +0 -1
  121. package/src/eth/builtin/internal/ERC20.js +0 -2
  122. package/src/eth/builtin/internal/ERC20.js.map +0 -1
  123. package/src/eth/builtin/internal/ERC20Bytes.d.ts +0 -32
  124. package/src/eth/builtin/internal/ERC20Bytes.d.ts.map +0 -1
  125. package/src/eth/builtin/internal/ERC20Bytes.js +0 -2
  126. package/src/eth/builtin/internal/ERC20Bytes.js.map +0 -1
  127. package/src/eth/builtin/internal/ERC721.d.ts +0 -43
  128. package/src/eth/builtin/internal/ERC721.d.ts.map +0 -1
  129. package/src/eth/builtin/internal/ERC721.js +0 -2
  130. package/src/eth/builtin/internal/ERC721.js.map +0 -1
  131. package/src/eth/builtin/internal/WETH9.d.ts +0 -47
  132. package/src/eth/builtin/internal/WETH9.d.ts.map +0 -1
  133. package/src/eth/builtin/internal/WETH9.js +0 -2
  134. package/src/eth/builtin/internal/WETH9.js.map +0 -1
  135. package/src/eth/builtin/internal/common.d.ts +0 -3
  136. package/src/eth/builtin/internal/common.d.ts.map +0 -1
  137. package/src/eth/builtin/internal/common.js +0 -8
  138. package/src/eth/builtin/internal/common.js.map +0 -1
  139. package/src/eth/builtin/internal/eacaggregatorproxy-processor.d.ts +0 -373
  140. package/src/eth/builtin/internal/eacaggregatorproxy-processor.d.ts.map +0 -1
  141. package/src/eth/builtin/internal/eacaggregatorproxy-processor.js +0 -1355
  142. package/src/eth/builtin/internal/eacaggregatorproxy-processor.js.map +0 -1
  143. package/src/eth/builtin/internal/eacaggregatorproxy-test-utils.d.ts +0 -7
  144. package/src/eth/builtin/internal/eacaggregatorproxy-test-utils.d.ts.map +0 -1
  145. package/src/eth/builtin/internal/eacaggregatorproxy-test-utils.js +0 -55
  146. package/src/eth/builtin/internal/eacaggregatorproxy-test-utils.js.map +0 -1
  147. package/src/eth/builtin/internal/erc1155-processor.d.ts +0 -173
  148. package/src/eth/builtin/internal/erc1155-processor.d.ts.map +0 -1
  149. package/src/eth/builtin/internal/erc1155-processor.js +0 -596
  150. package/src/eth/builtin/internal/erc1155-processor.js.map +0 -1
  151. package/src/eth/builtin/internal/erc1155-test-utils.d.ts +0 -7
  152. package/src/eth/builtin/internal/erc1155-test-utils.d.ts.map +0 -1
  153. package/src/eth/builtin/internal/erc1155-test-utils.js +0 -55
  154. package/src/eth/builtin/internal/erc1155-test-utils.js.map +0 -1
  155. package/src/eth/builtin/internal/erc20-processor.d.ts +0 -244
  156. package/src/eth/builtin/internal/erc20-processor.d.ts.map +0 -1
  157. package/src/eth/builtin/internal/erc20-processor.js +0 -1109
  158. package/src/eth/builtin/internal/erc20-processor.js.map +0 -1
  159. package/src/eth/builtin/internal/erc20-test-utils.d.ts +0 -6
  160. package/src/eth/builtin/internal/erc20-test-utils.d.ts.map +0 -1
  161. package/src/eth/builtin/internal/erc20-test-utils.js +0 -44
  162. package/src/eth/builtin/internal/erc20-test-utils.js.map +0 -1
  163. package/src/eth/builtin/internal/erc20bytes-processor.d.ts +0 -144
  164. package/src/eth/builtin/internal/erc20bytes-processor.d.ts.map +0 -1
  165. package/src/eth/builtin/internal/erc20bytes-processor.js +0 -594
  166. package/src/eth/builtin/internal/erc20bytes-processor.js.map +0 -1
  167. package/src/eth/builtin/internal/erc20bytes-test-utils.d.ts +0 -5
  168. package/src/eth/builtin/internal/erc20bytes-test-utils.d.ts.map +0 -1
  169. package/src/eth/builtin/internal/erc20bytes-test-utils.js +0 -33
  170. package/src/eth/builtin/internal/erc20bytes-test-utils.js.map +0 -1
  171. package/src/eth/builtin/internal/erc721-processor.d.ts +0 -215
  172. package/src/eth/builtin/internal/erc721-processor.d.ts.map +0 -1
  173. package/src/eth/builtin/internal/erc721-processor.js +0 -895
  174. package/src/eth/builtin/internal/erc721-processor.js.map +0 -1
  175. package/src/eth/builtin/internal/erc721-test-utils.d.ts +0 -6
  176. package/src/eth/builtin/internal/erc721-test-utils.d.ts.map +0 -1
  177. package/src/eth/builtin/internal/erc721-test-utils.js +0 -44
  178. package/src/eth/builtin/internal/erc721-test-utils.js.map +0 -1
  179. package/src/eth/builtin/internal/factories/EACAggregatorProxy__factory.d.ts +0 -400
  180. package/src/eth/builtin/internal/factories/EACAggregatorProxy__factory.d.ts.map +0 -1
  181. package/src/eth/builtin/internal/factories/EACAggregatorProxy__factory.js +0 -524
  182. package/src/eth/builtin/internal/factories/EACAggregatorProxy__factory.js.map +0 -1
  183. package/src/eth/builtin/internal/factories/ERC1155__factory.d.ts +0 -251
  184. package/src/eth/builtin/internal/factories/ERC1155__factory.d.ts.map +0 -1
  185. package/src/eth/builtin/internal/factories/ERC1155__factory.js +0 -329
  186. package/src/eth/builtin/internal/factories/ERC1155__factory.js.map +0 -1
  187. package/src/eth/builtin/internal/factories/ERC20Bytes__factory.d.ts +0 -185
  188. package/src/eth/builtin/internal/factories/ERC20Bytes__factory.d.ts.map +0 -1
  189. package/src/eth/builtin/internal/factories/ERC20Bytes__factory.js +0 -251
  190. package/src/eth/builtin/internal/factories/ERC20Bytes__factory.js.map +0 -1
  191. package/src/eth/builtin/internal/factories/ERC20__factory.d.ts +0 -303
  192. package/src/eth/builtin/internal/factories/ERC20__factory.d.ts.map +0 -1
  193. package/src/eth/builtin/internal/factories/ERC20__factory.js +0 -401
  194. package/src/eth/builtin/internal/factories/ERC20__factory.js.map +0 -1
  195. package/src/eth/builtin/internal/factories/ERC721__factory.d.ts +0 -273
  196. package/src/eth/builtin/internal/factories/ERC721__factory.d.ts.map +0 -1
  197. package/src/eth/builtin/internal/factories/ERC721__factory.js +0 -361
  198. package/src/eth/builtin/internal/factories/ERC721__factory.js.map +0 -1
  199. package/src/eth/builtin/internal/factories/WETH9__factory.d.ts +0 -220
  200. package/src/eth/builtin/internal/factories/WETH9__factory.d.ts.map +0 -1
  201. package/src/eth/builtin/internal/factories/WETH9__factory.js +0 -294
  202. package/src/eth/builtin/internal/factories/WETH9__factory.js.map +0 -1
  203. package/src/eth/builtin/internal/factories/index.d.ts +0 -7
  204. package/src/eth/builtin/internal/factories/index.d.ts.map +0 -1
  205. package/src/eth/builtin/internal/factories/index.js +0 -10
  206. package/src/eth/builtin/internal/factories/index.js.map +0 -1
  207. package/src/eth/builtin/internal/index.d.ts +0 -14
  208. package/src/eth/builtin/internal/index.d.ts.map +0 -1
  209. package/src/eth/builtin/internal/index.js +0 -8
  210. package/src/eth/builtin/internal/index.js.map +0 -1
  211. package/src/eth/builtin/internal/weth9-processor.d.ts +0 -172
  212. package/src/eth/builtin/internal/weth9-processor.d.ts.map +0 -1
  213. package/src/eth/builtin/internal/weth9-processor.js +0 -729
  214. package/src/eth/builtin/internal/weth9-processor.js.map +0 -1
  215. package/src/eth/builtin/internal/weth9-test-utils.d.ts +0 -7
  216. package/src/eth/builtin/internal/weth9-test-utils.d.ts.map +0 -1
  217. package/src/eth/builtin/internal/weth9-test-utils.js +0 -55
  218. package/src/eth/builtin/internal/weth9-test-utils.js.map +0 -1
  219. package/src/eth/builtin/weth9.d.ts +0 -5
  220. package/src/eth/builtin/weth9.d.ts.map +0 -1
  221. package/src/eth/builtin/weth9.js +0 -8
  222. package/src/eth/builtin/weth9.js.map +0 -1
  223. package/src/solana/builtin/index.d.ts +0 -2
  224. package/src/solana/builtin/index.d.ts.map +0 -1
  225. package/src/solana/builtin/index.js +0 -2
  226. package/src/solana/builtin/index.js.map +0 -1
  227. package/src/solana/builtin/spl-token-processor.d.ts +0 -40
  228. package/src/solana/builtin/spl-token-processor.d.ts.map +0 -1
  229. package/src/solana/builtin/spl-token-processor.js +0 -254
  230. package/src/solana/builtin/spl-token-processor.js.map +0 -1
  231. package/src/solana/builtin/types.d.ts +0 -428
  232. package/src/solana/builtin/types.d.ts.map +0 -1
  233. package/src/solana/builtin/types.js +0 -201
  234. package/src/solana/builtin/types.js.map +0 -1
  235. package/src/sui/builtin/0x1.d.ts +0 -114
  236. package/src/sui/builtin/0x1.d.ts.map +0 -1
  237. package/src/sui/builtin/0x1.js +0 -159
  238. package/src/sui/builtin/0x1.js.map +0 -1
  239. package/src/sui/builtin/0x2.d.ts +0 -1250
  240. package/src/sui/builtin/0x2.d.ts.map +0 -1
  241. package/src/sui/builtin/0x2.js +0 -1511
  242. package/src/sui/builtin/0x2.js.map +0 -1
  243. package/src/sui/builtin/0x3.d.ts +0 -774
  244. package/src/sui/builtin/0x3.d.ts.map +0 -1
  245. package/src/sui/builtin/0x3.js +0 -720
  246. package/src/sui/builtin/0x3.js.map +0 -1
  247. package/src/sui/builtin/index.d.ts +0 -4
  248. package/src/sui/builtin/index.d.ts.map +0 -1
  249. package/src/sui/builtin/index.js +0 -7
  250. package/src/sui/builtin/index.js.map +0 -1
@@ -1,729 +0,0 @@
1
- /* Autogenerated file. Do not edit manually. */
2
- /* tslint:disable */
3
- /* eslint-disable */
4
- import { Interface } from "ethers";
5
- import { addContractByABI, getContractByABI, addProcessor, getProcessor, getProvider, transformEtherError, BaseProcessor, BaseProcessorTemplate, BoundContractView, ContractView, DummyProvider, } from "@sentio/sdk/eth";
6
- import { WETH9__factory } from "./index.js";
7
- const templateContract = WETH9__factory.connect("0x0", DummyProvider);
8
- const iface = new Interface([
9
- "function name() view returns (string)",
10
- "function approve(address guy, uint256 wad) returns (bool)",
11
- "function totalSupply() view returns (uint256)",
12
- "function transferFrom(address src, address dst, uint256 wad) returns (bool)",
13
- "function withdraw(uint256 wad) returns ()",
14
- "function decimals() view returns (uint8)",
15
- "function balanceOf(address) view returns (uint256)",
16
- "function symbol() view returns (string)",
17
- "function transfer(address dst, uint256 wad) returns (bool)",
18
- "function deposit() payable returns ()",
19
- "function allowance(address, address) view returns (uint256)",
20
- ]);
21
- export class WETH9ContractView extends ContractView {
22
- constructor(contract) {
23
- super(contract);
24
- this.callStatic.contract = contract;
25
- }
26
- async name(overrides, preparedData, ethCallContext) {
27
- try {
28
- return await this.contract.getFunction("name()")(overrides || {});
29
- }
30
- catch (e) {
31
- const stack = new Error().stack;
32
- throw transformEtherError(e, undefined, stack);
33
- }
34
- }
35
- async totalSupply(overrides, preparedData, ethCallContext) {
36
- try {
37
- return await this.contract.getFunction("totalSupply()")(overrides || {});
38
- }
39
- catch (e) {
40
- const stack = new Error().stack;
41
- throw transformEtherError(e, undefined, stack);
42
- }
43
- }
44
- async decimals(overrides, preparedData, ethCallContext) {
45
- try {
46
- return await this.contract.getFunction("decimals()")(overrides || {});
47
- }
48
- catch (e) {
49
- const stack = new Error().stack;
50
- throw transformEtherError(e, undefined, stack);
51
- }
52
- }
53
- async balanceOf(arg0, overrides, preparedData, ethCallContext) {
54
- try {
55
- return await this.contract.getFunction("balanceOf(address)")(arg0, overrides || {});
56
- }
57
- catch (e) {
58
- const stack = new Error().stack;
59
- throw transformEtherError(e, undefined, stack);
60
- }
61
- }
62
- async symbol(overrides, preparedData, ethCallContext) {
63
- try {
64
- return await this.contract.getFunction("symbol()")(overrides || {});
65
- }
66
- catch (e) {
67
- const stack = new Error().stack;
68
- throw transformEtherError(e, undefined, stack);
69
- }
70
- }
71
- async allowance(arg0, arg1, overrides, preparedData, ethCallContext) {
72
- try {
73
- return await this.contract.getFunction("allowance(address,address)")(arg0, arg1, overrides || {});
74
- }
75
- catch (e) {
76
- const stack = new Error().stack;
77
- throw transformEtherError(e, undefined, stack);
78
- }
79
- }
80
- callStatic = {
81
- contract: this.contract,
82
- async approve(guy, wad, overrides, preparedData, ethCallContext) {
83
- try {
84
- return await this.contract
85
- .getFunction("approve(address,uint256)")
86
- .staticCall(guy, wad, overrides || {});
87
- }
88
- catch (e) {
89
- const stack = new Error().stack;
90
- throw transformEtherError(e, undefined, stack);
91
- }
92
- },
93
- async transferFrom(src, dst, wad, overrides, preparedData, ethCallContext) {
94
- try {
95
- return await this.contract
96
- .getFunction("transferFrom(address,address,uint256)")
97
- .staticCall(src, dst, wad, overrides || {});
98
- }
99
- catch (e) {
100
- const stack = new Error().stack;
101
- throw transformEtherError(e, undefined, stack);
102
- }
103
- },
104
- async withdraw(wad, overrides, preparedData, ethCallContext) {
105
- try {
106
- return await this.contract
107
- .getFunction("withdraw(uint256)")
108
- .staticCall(wad, overrides || {});
109
- }
110
- catch (e) {
111
- const stack = new Error().stack;
112
- throw transformEtherError(e, undefined, stack);
113
- }
114
- },
115
- async transfer(dst, wad, overrides, preparedData, ethCallContext) {
116
- try {
117
- return await this.contract
118
- .getFunction("transfer(address,uint256)")
119
- .staticCall(dst, wad, overrides || {});
120
- }
121
- catch (e) {
122
- const stack = new Error().stack;
123
- throw transformEtherError(e, undefined, stack);
124
- }
125
- },
126
- async deposit(overrides, preparedData, ethCallContext) {
127
- try {
128
- return await this.contract
129
- .getFunction("deposit()")
130
- .staticCall(overrides || {});
131
- }
132
- catch (e) {
133
- const stack = new Error().stack;
134
- throw transformEtherError(e, undefined, stack);
135
- }
136
- },
137
- };
138
- encodeCall = {
139
- name(ethCallContext) {
140
- try {
141
- const iface = new Interface(["function name()"]);
142
- const calldata = iface.encodeFunctionData("name", []);
143
- return {
144
- context: ethCallContext,
145
- calldata,
146
- };
147
- }
148
- catch (e) {
149
- const stack = new Error().stack;
150
- throw transformEtherError(e, undefined, stack);
151
- }
152
- },
153
- approve(guy, wad, ethCallContext) {
154
- try {
155
- const iface = new Interface(["function approve(address,uint256)"]);
156
- const calldata = iface.encodeFunctionData("approve", [guy, wad]);
157
- return {
158
- context: ethCallContext,
159
- calldata,
160
- };
161
- }
162
- catch (e) {
163
- const stack = new Error().stack;
164
- throw transformEtherError(e, undefined, stack);
165
- }
166
- },
167
- totalSupply(ethCallContext) {
168
- try {
169
- const iface = new Interface(["function totalSupply()"]);
170
- const calldata = iface.encodeFunctionData("totalSupply", []);
171
- return {
172
- context: ethCallContext,
173
- calldata,
174
- };
175
- }
176
- catch (e) {
177
- const stack = new Error().stack;
178
- throw transformEtherError(e, undefined, stack);
179
- }
180
- },
181
- transferFrom(src, dst, wad, ethCallContext) {
182
- try {
183
- const iface = new Interface([
184
- "function transferFrom(address,address,uint256)",
185
- ]);
186
- const calldata = iface.encodeFunctionData("transferFrom", [
187
- src,
188
- dst,
189
- wad,
190
- ]);
191
- return {
192
- context: ethCallContext,
193
- calldata,
194
- };
195
- }
196
- catch (e) {
197
- const stack = new Error().stack;
198
- throw transformEtherError(e, undefined, stack);
199
- }
200
- },
201
- withdraw(wad, ethCallContext) {
202
- try {
203
- const iface = new Interface(["function withdraw(uint256)"]);
204
- const calldata = iface.encodeFunctionData("withdraw", [wad]);
205
- return {
206
- context: ethCallContext,
207
- calldata,
208
- };
209
- }
210
- catch (e) {
211
- const stack = new Error().stack;
212
- throw transformEtherError(e, undefined, stack);
213
- }
214
- },
215
- decimals(ethCallContext) {
216
- try {
217
- const iface = new Interface(["function decimals()"]);
218
- const calldata = iface.encodeFunctionData("decimals", []);
219
- return {
220
- context: ethCallContext,
221
- calldata,
222
- };
223
- }
224
- catch (e) {
225
- const stack = new Error().stack;
226
- throw transformEtherError(e, undefined, stack);
227
- }
228
- },
229
- balanceOf(arg0, ethCallContext) {
230
- try {
231
- const iface = new Interface(["function balanceOf(address)"]);
232
- const calldata = iface.encodeFunctionData("balanceOf", [arg0]);
233
- return {
234
- context: ethCallContext,
235
- calldata,
236
- };
237
- }
238
- catch (e) {
239
- const stack = new Error().stack;
240
- throw transformEtherError(e, undefined, stack);
241
- }
242
- },
243
- symbol(ethCallContext) {
244
- try {
245
- const iface = new Interface(["function symbol()"]);
246
- const calldata = iface.encodeFunctionData("symbol", []);
247
- return {
248
- context: ethCallContext,
249
- calldata,
250
- };
251
- }
252
- catch (e) {
253
- const stack = new Error().stack;
254
- throw transformEtherError(e, undefined, stack);
255
- }
256
- },
257
- transfer(dst, wad, ethCallContext) {
258
- try {
259
- const iface = new Interface(["function transfer(address,uint256)"]);
260
- const calldata = iface.encodeFunctionData("transfer", [dst, wad]);
261
- return {
262
- context: ethCallContext,
263
- calldata,
264
- };
265
- }
266
- catch (e) {
267
- const stack = new Error().stack;
268
- throw transformEtherError(e, undefined, stack);
269
- }
270
- },
271
- deposit(ethCallContext) {
272
- try {
273
- const iface = new Interface(["function deposit()"]);
274
- const calldata = iface.encodeFunctionData("deposit", []);
275
- return {
276
- context: ethCallContext,
277
- calldata,
278
- };
279
- }
280
- catch (e) {
281
- const stack = new Error().stack;
282
- throw transformEtherError(e, undefined, stack);
283
- }
284
- },
285
- allowance(arg0, arg1, ethCallContext) {
286
- try {
287
- const iface = new Interface(["function allowance(address,address)"]);
288
- const calldata = iface.encodeFunctionData("allowance", [arg0, arg1]);
289
- return {
290
- context: ethCallContext,
291
- calldata,
292
- };
293
- }
294
- catch (e) {
295
- const stack = new Error().stack;
296
- throw transformEtherError(e, undefined, stack);
297
- }
298
- },
299
- };
300
- }
301
- export class WETH9BoundContractView extends BoundContractView {
302
- async name(overrides) {
303
- const ethCallContext = {
304
- chainId: this.context.chainId,
305
- blockTag: "0x" + this.context.blockNumber.toString(16),
306
- address: this.context.address,
307
- };
308
- return await this.view.name({
309
- blockTag: this.context.blockNumber,
310
- ...overrides,
311
- }, this.context.preparedData, ethCallContext);
312
- }
313
- async totalSupply(overrides) {
314
- const ethCallContext = {
315
- chainId: this.context.chainId,
316
- blockTag: "0x" + this.context.blockNumber.toString(16),
317
- address: this.context.address,
318
- };
319
- return await this.view.totalSupply({
320
- blockTag: this.context.blockNumber,
321
- ...overrides,
322
- }, this.context.preparedData, ethCallContext);
323
- }
324
- async decimals(overrides) {
325
- const ethCallContext = {
326
- chainId: this.context.chainId,
327
- blockTag: "0x" + this.context.blockNumber.toString(16),
328
- address: this.context.address,
329
- };
330
- return await this.view.decimals({
331
- blockTag: this.context.blockNumber,
332
- ...overrides,
333
- }, this.context.preparedData, ethCallContext);
334
- }
335
- async balanceOf(arg0, overrides) {
336
- const ethCallContext = {
337
- chainId: this.context.chainId,
338
- blockTag: "0x" + this.context.blockNumber.toString(16),
339
- address: this.context.address,
340
- };
341
- return await this.view.balanceOf(arg0, {
342
- blockTag: this.context.blockNumber,
343
- ...overrides,
344
- }, this.context.preparedData, ethCallContext);
345
- }
346
- async symbol(overrides) {
347
- const ethCallContext = {
348
- chainId: this.context.chainId,
349
- blockTag: "0x" + this.context.blockNumber.toString(16),
350
- address: this.context.address,
351
- };
352
- return await this.view.symbol({
353
- blockTag: this.context.blockNumber,
354
- ...overrides,
355
- }, this.context.preparedData, ethCallContext);
356
- }
357
- async allowance(arg0, arg1, overrides) {
358
- const ethCallContext = {
359
- chainId: this.context.chainId,
360
- blockTag: "0x" + this.context.blockNumber.toString(16),
361
- address: this.context.address,
362
- };
363
- return await this.view.allowance(arg0, arg1, {
364
- blockTag: this.context.blockNumber,
365
- ...overrides,
366
- }, this.context.preparedData, ethCallContext);
367
- }
368
- callStatic = {
369
- view: this.view,
370
- context: this.context,
371
- async approve(guy, wad, overrides) {
372
- const ethCallContext = {
373
- chainId: this.context.chainId,
374
- blockTag: "0x" + this.context.blockNumber.toString(16),
375
- address: this.context.address,
376
- };
377
- return await this.view.callStatic.approve(guy, wad, {
378
- blockTag: this.context.blockNumber,
379
- ...overrides,
380
- }, this.context.preparedData, ethCallContext);
381
- },
382
- async transferFrom(src, dst, wad, overrides) {
383
- const ethCallContext = {
384
- chainId: this.context.chainId,
385
- blockTag: "0x" + this.context.blockNumber.toString(16),
386
- address: this.context.address,
387
- };
388
- return await this.view.callStatic.transferFrom(src, dst, wad, {
389
- blockTag: this.context.blockNumber,
390
- ...overrides,
391
- }, this.context.preparedData, ethCallContext);
392
- },
393
- async withdraw(wad, overrides) {
394
- const ethCallContext = {
395
- chainId: this.context.chainId,
396
- blockTag: "0x" + this.context.blockNumber.toString(16),
397
- address: this.context.address,
398
- };
399
- return await this.view.callStatic.withdraw(wad, {
400
- blockTag: this.context.blockNumber,
401
- ...overrides,
402
- }, this.context.preparedData, ethCallContext);
403
- },
404
- async transfer(dst, wad, overrides) {
405
- const ethCallContext = {
406
- chainId: this.context.chainId,
407
- blockTag: "0x" + this.context.blockNumber.toString(16),
408
- address: this.context.address,
409
- };
410
- return await this.view.callStatic.transfer(dst, wad, {
411
- blockTag: this.context.blockNumber,
412
- ...overrides,
413
- }, this.context.preparedData, ethCallContext);
414
- },
415
- async deposit(overrides) {
416
- const ethCallContext = {
417
- chainId: this.context.chainId,
418
- blockTag: "0x" + this.context.blockNumber.toString(16),
419
- address: this.context.address,
420
- };
421
- return await this.view.callStatic.deposit({
422
- blockTag: this.context.blockNumber,
423
- ...overrides,
424
- }, this.context.preparedData, ethCallContext);
425
- },
426
- };
427
- encodeCall = {
428
- view: this.view,
429
- context: this.context,
430
- name(overrides) {
431
- let blockTagWithOverride = "0x" + this.context.blockNumber.toString(16);
432
- if (overrides?.blockTag) {
433
- blockTagWithOverride =
434
- typeof overrides.blockTag == "string"
435
- ? overrides.blockTag
436
- : "0x" + overrides.blockTag.toString(16);
437
- }
438
- return this.view.encodeCall.name({
439
- chainId: this.context.chainId.toString(),
440
- address: this.context.address,
441
- blockTag: blockTagWithOverride,
442
- });
443
- },
444
- approve(guy, wad, overrides) {
445
- let blockTagWithOverride = "0x" + this.context.blockNumber.toString(16);
446
- if (overrides?.blockTag) {
447
- blockTagWithOverride =
448
- typeof overrides.blockTag == "string"
449
- ? overrides.blockTag
450
- : "0x" + overrides.blockTag.toString(16);
451
- }
452
- return this.view.encodeCall.approve(guy, wad, {
453
- chainId: this.context.chainId.toString(),
454
- address: this.context.address,
455
- blockTag: blockTagWithOverride,
456
- });
457
- },
458
- totalSupply(overrides) {
459
- let blockTagWithOverride = "0x" + this.context.blockNumber.toString(16);
460
- if (overrides?.blockTag) {
461
- blockTagWithOverride =
462
- typeof overrides.blockTag == "string"
463
- ? overrides.blockTag
464
- : "0x" + overrides.blockTag.toString(16);
465
- }
466
- return this.view.encodeCall.totalSupply({
467
- chainId: this.context.chainId.toString(),
468
- address: this.context.address,
469
- blockTag: blockTagWithOverride,
470
- });
471
- },
472
- transferFrom(src, dst, wad, overrides) {
473
- let blockTagWithOverride = "0x" + this.context.blockNumber.toString(16);
474
- if (overrides?.blockTag) {
475
- blockTagWithOverride =
476
- typeof overrides.blockTag == "string"
477
- ? overrides.blockTag
478
- : "0x" + overrides.blockTag.toString(16);
479
- }
480
- return this.view.encodeCall.transferFrom(src, dst, wad, {
481
- chainId: this.context.chainId.toString(),
482
- address: this.context.address,
483
- blockTag: blockTagWithOverride,
484
- });
485
- },
486
- withdraw(wad, overrides) {
487
- let blockTagWithOverride = "0x" + this.context.blockNumber.toString(16);
488
- if (overrides?.blockTag) {
489
- blockTagWithOverride =
490
- typeof overrides.blockTag == "string"
491
- ? overrides.blockTag
492
- : "0x" + overrides.blockTag.toString(16);
493
- }
494
- return this.view.encodeCall.withdraw(wad, {
495
- chainId: this.context.chainId.toString(),
496
- address: this.context.address,
497
- blockTag: blockTagWithOverride,
498
- });
499
- },
500
- decimals(overrides) {
501
- let blockTagWithOverride = "0x" + this.context.blockNumber.toString(16);
502
- if (overrides?.blockTag) {
503
- blockTagWithOverride =
504
- typeof overrides.blockTag == "string"
505
- ? overrides.blockTag
506
- : "0x" + overrides.blockTag.toString(16);
507
- }
508
- return this.view.encodeCall.decimals({
509
- chainId: this.context.chainId.toString(),
510
- address: this.context.address,
511
- blockTag: blockTagWithOverride,
512
- });
513
- },
514
- balanceOf(arg0, overrides) {
515
- let blockTagWithOverride = "0x" + this.context.blockNumber.toString(16);
516
- if (overrides?.blockTag) {
517
- blockTagWithOverride =
518
- typeof overrides.blockTag == "string"
519
- ? overrides.blockTag
520
- : "0x" + overrides.blockTag.toString(16);
521
- }
522
- return this.view.encodeCall.balanceOf(arg0, {
523
- chainId: this.context.chainId.toString(),
524
- address: this.context.address,
525
- blockTag: blockTagWithOverride,
526
- });
527
- },
528
- symbol(overrides) {
529
- let blockTagWithOverride = "0x" + this.context.blockNumber.toString(16);
530
- if (overrides?.blockTag) {
531
- blockTagWithOverride =
532
- typeof overrides.blockTag == "string"
533
- ? overrides.blockTag
534
- : "0x" + overrides.blockTag.toString(16);
535
- }
536
- return this.view.encodeCall.symbol({
537
- chainId: this.context.chainId.toString(),
538
- address: this.context.address,
539
- blockTag: blockTagWithOverride,
540
- });
541
- },
542
- transfer(dst, wad, overrides) {
543
- let blockTagWithOverride = "0x" + this.context.blockNumber.toString(16);
544
- if (overrides?.blockTag) {
545
- blockTagWithOverride =
546
- typeof overrides.blockTag == "string"
547
- ? overrides.blockTag
548
- : "0x" + overrides.blockTag.toString(16);
549
- }
550
- return this.view.encodeCall.transfer(dst, wad, {
551
- chainId: this.context.chainId.toString(),
552
- address: this.context.address,
553
- blockTag: blockTagWithOverride,
554
- });
555
- },
556
- deposit(overrides) {
557
- let blockTagWithOverride = "0x" + this.context.blockNumber.toString(16);
558
- if (overrides?.blockTag) {
559
- blockTagWithOverride =
560
- typeof overrides.blockTag == "string"
561
- ? overrides.blockTag
562
- : "0x" + overrides.blockTag.toString(16);
563
- }
564
- return this.view.encodeCall.deposit({
565
- chainId: this.context.chainId.toString(),
566
- address: this.context.address,
567
- blockTag: blockTagWithOverride,
568
- });
569
- },
570
- allowance(arg0, arg1, overrides) {
571
- let blockTagWithOverride = "0x" + this.context.blockNumber.toString(16);
572
- if (overrides?.blockTag) {
573
- blockTagWithOverride =
574
- typeof overrides.blockTag == "string"
575
- ? overrides.blockTag
576
- : "0x" + overrides.blockTag.toString(16);
577
- }
578
- return this.view.encodeCall.allowance(arg0, arg1, {
579
- chainId: this.context.chainId.toString(),
580
- address: this.context.address,
581
- blockTag: blockTagWithOverride,
582
- });
583
- },
584
- };
585
- }
586
- export class WETH9Processor extends BaseProcessor {
587
- onEventApproval(handler, filter, fetchConfig, preprocessHandler) {
588
- if (!filter) {
589
- filter = templateContract.filters["Approval(address,address,uint256)"](null, null, null);
590
- }
591
- return super.onEthEvent(handler, filter, fetchConfig, preprocessHandler);
592
- }
593
- onEventTransfer(handler, filter, fetchConfig, preprocessHandler) {
594
- if (!filter) {
595
- filter = templateContract.filters["Transfer(address,address,uint256)"](null, null, null);
596
- }
597
- return super.onEthEvent(handler, filter, fetchConfig, preprocessHandler);
598
- }
599
- onEventDeposit(handler, filter, fetchConfig, preprocessHandler) {
600
- if (!filter) {
601
- filter = templateContract.filters["Deposit(address,uint256)"](null, null);
602
- }
603
- return super.onEthEvent(handler, filter, fetchConfig, preprocessHandler);
604
- }
605
- onEventWithdrawal(handler, filter, fetchConfig, preprocessHandler) {
606
- if (!filter) {
607
- filter = templateContract.filters["Withdrawal(address,uint256)"](null, null);
608
- }
609
- return super.onEthEvent(handler, filter, fetchConfig, preprocessHandler);
610
- }
611
- onCallName(handler, fetchConfig, preprocessHandler) {
612
- return super.onEthTrace("0x06fdde03", handler, fetchConfig, preprocessHandler);
613
- }
614
- onCallApprove(handler, fetchConfig, preprocessHandler) {
615
- return super.onEthTrace("0x095ea7b3", handler, fetchConfig, preprocessHandler);
616
- }
617
- onCallTotalSupply(handler, fetchConfig, preprocessHandler) {
618
- return super.onEthTrace("0x18160ddd", handler, fetchConfig, preprocessHandler);
619
- }
620
- onCallTransferFrom(handler, fetchConfig, preprocessHandler) {
621
- return super.onEthTrace("0x23b872dd", handler, fetchConfig, preprocessHandler);
622
- }
623
- onCallWithdraw(handler, fetchConfig, preprocessHandler) {
624
- return super.onEthTrace("0x2e1a7d4d", handler, fetchConfig, preprocessHandler);
625
- }
626
- onCallDecimals(handler, fetchConfig, preprocessHandler) {
627
- return super.onEthTrace("0x313ce567", handler, fetchConfig, preprocessHandler);
628
- }
629
- onCallBalanceOf(handler, fetchConfig, preprocessHandler) {
630
- return super.onEthTrace("0x70a08231", handler, fetchConfig, preprocessHandler);
631
- }
632
- onCallSymbol(handler, fetchConfig, preprocessHandler) {
633
- return super.onEthTrace("0x95d89b41", handler, fetchConfig, preprocessHandler);
634
- }
635
- onCallTransfer(handler, fetchConfig, preprocessHandler) {
636
- return super.onEthTrace("0xa9059cbb", handler, fetchConfig, preprocessHandler);
637
- }
638
- onCallDeposit(handler, fetchConfig, preprocessHandler) {
639
- return super.onEthTrace("0xd0e30db0", handler, fetchConfig, preprocessHandler);
640
- }
641
- onCallAllowance(handler, fetchConfig, preprocessHandler) {
642
- return super.onEthTrace("0xdd62ed3e", handler, fetchConfig, preprocessHandler);
643
- }
644
- static filters = {
645
- Approval(src, guy, wad) {
646
- return templateContract.filters["Approval(address,address,uint256)"](src, guy, wad);
647
- },
648
- Transfer(src, dst, wad) {
649
- return templateContract.filters["Transfer(address,address,uint256)"](src, dst, wad);
650
- },
651
- Deposit(dst, wad) {
652
- return templateContract.filters["Deposit(address,uint256)"](dst, wad);
653
- },
654
- Withdrawal(src, wad) {
655
- return templateContract.filters["Withdrawal(address,uint256)"](src, wad);
656
- },
657
- };
658
- CreateBoundContractView() {
659
- const view = getWETH9Contract(this.config.network, this.config.address);
660
- return new WETH9BoundContractView(this.config.address, view);
661
- }
662
- static bind(options) {
663
- if (!options.name) {
664
- options.name = "WETH9";
665
- }
666
- let processor = getProcessor(options);
667
- if (!processor) {
668
- processor = new WETH9Processor(options);
669
- addProcessor(options, processor);
670
- }
671
- return processor;
672
- }
673
- }
674
- export class WETH9ProcessorTemplate extends BaseProcessorTemplate {
675
- bindInternal(options) {
676
- if (!options.name) {
677
- options.name = "WETH9";
678
- }
679
- let processor = getProcessor(options);
680
- if (!processor) {
681
- processor = new WETH9Processor(options);
682
- addProcessor(options, processor);
683
- }
684
- return processor;
685
- }
686
- onEventApproval(handler, filter, fetchConfig, preprocessHandler) {
687
- if (!filter) {
688
- filter = templateContract.filters["Approval(address,address,uint256)"](null, null, null);
689
- }
690
- return super.onEthEvent(handler, filter, fetchConfig, preprocessHandler);
691
- }
692
- onEventTransfer(handler, filter, fetchConfig, preprocessHandler) {
693
- if (!filter) {
694
- filter = templateContract.filters["Transfer(address,address,uint256)"](null, null, null);
695
- }
696
- return super.onEthEvent(handler, filter, fetchConfig, preprocessHandler);
697
- }
698
- onEventDeposit(handler, filter, fetchConfig, preprocessHandler) {
699
- if (!filter) {
700
- filter = templateContract.filters["Deposit(address,uint256)"](null, null);
701
- }
702
- return super.onEthEvent(handler, filter, fetchConfig, preprocessHandler);
703
- }
704
- onEventWithdrawal(handler, filter, fetchConfig, preprocessHandler) {
705
- if (!filter) {
706
- filter = templateContract.filters["Withdrawal(address,uint256)"](null, null);
707
- }
708
- return super.onEthEvent(handler, filter, fetchConfig, preprocessHandler);
709
- }
710
- }
711
- export function getWETH9Contract(chainId, address) {
712
- let contract = getContractByABI("WETH9", address, chainId);
713
- if (!contract) {
714
- const rawContract = WETH9__factory.connect(address, getProvider(chainId));
715
- contract = new WETH9ContractView(rawContract);
716
- addContractByABI("WETH9", address, chainId, contract);
717
- }
718
- return contract;
719
- }
720
- export function getWETH9ContractOnContext(context, address) {
721
- const view = getWETH9Contract(context.getChainId(), address);
722
- const boundView = new WETH9BoundContractView(address, view);
723
- boundView.context = context;
724
- if (boundView.callStatic) {
725
- boundView.callStatic.context = context;
726
- }
727
- return boundView;
728
- }
729
- //# sourceMappingURL=weth9-processor.js.map