@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,895 +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 { ERC721__factory } from "./index.js";
7
- const templateContract = ERC721__factory.connect("0x0", DummyProvider);
8
- const iface = new Interface([
9
- "function approve(address to, uint256 tokenId) returns ()",
10
- "function totalSupply() view returns (uint256)",
11
- "function balanceOf(address owner) view returns (uint256 balance)",
12
- "function getApproved(uint256 tokenId) view returns (address operator)",
13
- "function isApprovedForAll(address owner, address operator) view returns (bool)",
14
- "function name() view returns (string)",
15
- "function ownerOf(uint256 tokenId) view returns (address owner)",
16
- "function safeTransferFrom(address from, address to, uint256 tokenId) returns ()",
17
- "function safeTransferFrom(address from, address to, uint256 tokenId, bytes data) returns ()",
18
- "function setApprovalForAll(address operator, bool _approved) returns ()",
19
- "function supportsInterface(bytes4 interfaceId) view returns (bool)",
20
- "function symbol() view returns (string)",
21
- "function tokenURI(uint256 tokenId) view returns (string)",
22
- "function transferFrom(address from, address to, uint256 tokenId) returns ()",
23
- ]);
24
- export class ERC721ContractView extends ContractView {
25
- constructor(contract) {
26
- super(contract);
27
- this.callStatic.contract = contract;
28
- }
29
- async totalSupply(overrides, preparedData, ethCallContext) {
30
- try {
31
- return await this.contract.getFunction("totalSupply()")(overrides || {});
32
- }
33
- catch (e) {
34
- const stack = new Error().stack;
35
- throw transformEtherError(e, undefined, stack);
36
- }
37
- }
38
- async balanceOf(owner, overrides, preparedData, ethCallContext) {
39
- try {
40
- return await this.contract.getFunction("balanceOf(address)")(owner, overrides || {});
41
- }
42
- catch (e) {
43
- const stack = new Error().stack;
44
- throw transformEtherError(e, undefined, stack);
45
- }
46
- }
47
- async getApproved(tokenId, overrides, preparedData, ethCallContext) {
48
- try {
49
- return await this.contract.getFunction("getApproved(uint256)")(tokenId, overrides || {});
50
- }
51
- catch (e) {
52
- const stack = new Error().stack;
53
- throw transformEtherError(e, undefined, stack);
54
- }
55
- }
56
- async isApprovedForAll(owner, operator, overrides, preparedData, ethCallContext) {
57
- try {
58
- return await this.contract.getFunction("isApprovedForAll(address,address)")(owner, operator, overrides || {});
59
- }
60
- catch (e) {
61
- const stack = new Error().stack;
62
- throw transformEtherError(e, undefined, stack);
63
- }
64
- }
65
- async name(overrides, preparedData, ethCallContext) {
66
- try {
67
- return await this.contract.getFunction("name()")(overrides || {});
68
- }
69
- catch (e) {
70
- const stack = new Error().stack;
71
- throw transformEtherError(e, undefined, stack);
72
- }
73
- }
74
- async ownerOf(tokenId, overrides, preparedData, ethCallContext) {
75
- try {
76
- return await this.contract.getFunction("ownerOf(uint256)")(tokenId, overrides || {});
77
- }
78
- catch (e) {
79
- const stack = new Error().stack;
80
- throw transformEtherError(e, undefined, stack);
81
- }
82
- }
83
- async supportsInterface(interfaceId, overrides, preparedData, ethCallContext) {
84
- try {
85
- return await this.contract.getFunction("supportsInterface(bytes4)")(interfaceId, overrides || {});
86
- }
87
- catch (e) {
88
- const stack = new Error().stack;
89
- throw transformEtherError(e, undefined, stack);
90
- }
91
- }
92
- async symbol(overrides, preparedData, ethCallContext) {
93
- try {
94
- return await this.contract.getFunction("symbol()")(overrides || {});
95
- }
96
- catch (e) {
97
- const stack = new Error().stack;
98
- throw transformEtherError(e, undefined, stack);
99
- }
100
- }
101
- async tokenURI(tokenId, overrides, preparedData, ethCallContext) {
102
- try {
103
- return await this.contract.getFunction("tokenURI(uint256)")(tokenId, overrides || {});
104
- }
105
- catch (e) {
106
- const stack = new Error().stack;
107
- throw transformEtherError(e, undefined, stack);
108
- }
109
- }
110
- callStatic = {
111
- contract: this.contract,
112
- async approve(to, tokenId, overrides, preparedData, ethCallContext) {
113
- try {
114
- return await this.contract
115
- .getFunction("approve(address,uint256)")
116
- .staticCall(to, tokenId, overrides || {});
117
- }
118
- catch (e) {
119
- const stack = new Error().stack;
120
- throw transformEtherError(e, undefined, stack);
121
- }
122
- },
123
- async safeTransferFrom_address_address_uint256(from, to, tokenId, overrides, preparedData, ethCallContext) {
124
- try {
125
- return await this.contract
126
- .getFunction("safeTransferFrom(address,address,uint256)")
127
- .staticCall(from, to, tokenId, overrides || {});
128
- }
129
- catch (e) {
130
- const stack = new Error().stack;
131
- throw transformEtherError(e, undefined, stack);
132
- }
133
- },
134
- async safeTransferFrom_address_address_uint256_bytes(from, to, tokenId, data, overrides, preparedData, ethCallContext) {
135
- try {
136
- return await this.contract
137
- .getFunction("safeTransferFrom(address,address,uint256,bytes)")
138
- .staticCall(from, to, tokenId, data, overrides || {});
139
- }
140
- catch (e) {
141
- const stack = new Error().stack;
142
- throw transformEtherError(e, undefined, stack);
143
- }
144
- },
145
- async setApprovalForAll(operator, _approved, overrides, preparedData, ethCallContext) {
146
- try {
147
- return await this.contract
148
- .getFunction("setApprovalForAll(address,bool)")
149
- .staticCall(operator, _approved, overrides || {});
150
- }
151
- catch (e) {
152
- const stack = new Error().stack;
153
- throw transformEtherError(e, undefined, stack);
154
- }
155
- },
156
- async transferFrom(from, to, tokenId, overrides, preparedData, ethCallContext) {
157
- try {
158
- return await this.contract
159
- .getFunction("transferFrom(address,address,uint256)")
160
- .staticCall(from, to, tokenId, overrides || {});
161
- }
162
- catch (e) {
163
- const stack = new Error().stack;
164
- throw transformEtherError(e, undefined, stack);
165
- }
166
- },
167
- };
168
- encodeCall = {
169
- approve(to, tokenId, ethCallContext) {
170
- try {
171
- const iface = new Interface(["function approve(address,uint256)"]);
172
- const calldata = iface.encodeFunctionData("approve", [to, tokenId]);
173
- return {
174
- context: ethCallContext,
175
- calldata,
176
- };
177
- }
178
- catch (e) {
179
- const stack = new Error().stack;
180
- throw transformEtherError(e, undefined, stack);
181
- }
182
- },
183
- totalSupply(ethCallContext) {
184
- try {
185
- const iface = new Interface(["function totalSupply()"]);
186
- const calldata = iface.encodeFunctionData("totalSupply", []);
187
- return {
188
- context: ethCallContext,
189
- calldata,
190
- };
191
- }
192
- catch (e) {
193
- const stack = new Error().stack;
194
- throw transformEtherError(e, undefined, stack);
195
- }
196
- },
197
- balanceOf(owner, ethCallContext) {
198
- try {
199
- const iface = new Interface(["function balanceOf(address)"]);
200
- const calldata = iface.encodeFunctionData("balanceOf", [owner]);
201
- return {
202
- context: ethCallContext,
203
- calldata,
204
- };
205
- }
206
- catch (e) {
207
- const stack = new Error().stack;
208
- throw transformEtherError(e, undefined, stack);
209
- }
210
- },
211
- getApproved(tokenId, ethCallContext) {
212
- try {
213
- const iface = new Interface(["function getApproved(uint256)"]);
214
- const calldata = iface.encodeFunctionData("getApproved", [tokenId]);
215
- return {
216
- context: ethCallContext,
217
- calldata,
218
- };
219
- }
220
- catch (e) {
221
- const stack = new Error().stack;
222
- throw transformEtherError(e, undefined, stack);
223
- }
224
- },
225
- isApprovedForAll(owner, operator, ethCallContext) {
226
- try {
227
- const iface = new Interface([
228
- "function isApprovedForAll(address,address)",
229
- ]);
230
- const calldata = iface.encodeFunctionData("isApprovedForAll", [
231
- owner,
232
- operator,
233
- ]);
234
- return {
235
- context: ethCallContext,
236
- calldata,
237
- };
238
- }
239
- catch (e) {
240
- const stack = new Error().stack;
241
- throw transformEtherError(e, undefined, stack);
242
- }
243
- },
244
- name(ethCallContext) {
245
- try {
246
- const iface = new Interface(["function name()"]);
247
- const calldata = iface.encodeFunctionData("name", []);
248
- return {
249
- context: ethCallContext,
250
- calldata,
251
- };
252
- }
253
- catch (e) {
254
- const stack = new Error().stack;
255
- throw transformEtherError(e, undefined, stack);
256
- }
257
- },
258
- ownerOf(tokenId, ethCallContext) {
259
- try {
260
- const iface = new Interface(["function ownerOf(uint256)"]);
261
- const calldata = iface.encodeFunctionData("ownerOf", [tokenId]);
262
- return {
263
- context: ethCallContext,
264
- calldata,
265
- };
266
- }
267
- catch (e) {
268
- const stack = new Error().stack;
269
- throw transformEtherError(e, undefined, stack);
270
- }
271
- },
272
- safeTransferFrom_address_address_uint256(from, to, tokenId, ethCallContext) {
273
- try {
274
- const iface = new Interface([
275
- "function safeTransferFrom(address,address,uint256)",
276
- ]);
277
- const calldata = iface.encodeFunctionData("safeTransferFrom", [
278
- from,
279
- to,
280
- tokenId,
281
- ]);
282
- return {
283
- context: ethCallContext,
284
- calldata,
285
- };
286
- }
287
- catch (e) {
288
- const stack = new Error().stack;
289
- throw transformEtherError(e, undefined, stack);
290
- }
291
- },
292
- safeTransferFrom_address_address_uint256_bytes(from, to, tokenId, data, ethCallContext) {
293
- try {
294
- const iface = new Interface([
295
- "function safeTransferFrom(address,address,uint256,bytes)",
296
- ]);
297
- const calldata = iface.encodeFunctionData("safeTransferFrom", [
298
- from,
299
- to,
300
- tokenId,
301
- data,
302
- ]);
303
- return {
304
- context: ethCallContext,
305
- calldata,
306
- };
307
- }
308
- catch (e) {
309
- const stack = new Error().stack;
310
- throw transformEtherError(e, undefined, stack);
311
- }
312
- },
313
- setApprovalForAll(operator, _approved, ethCallContext) {
314
- try {
315
- const iface = new Interface([
316
- "function setApprovalForAll(address,bool)",
317
- ]);
318
- const calldata = iface.encodeFunctionData("setApprovalForAll", [
319
- operator,
320
- _approved,
321
- ]);
322
- return {
323
- context: ethCallContext,
324
- calldata,
325
- };
326
- }
327
- catch (e) {
328
- const stack = new Error().stack;
329
- throw transformEtherError(e, undefined, stack);
330
- }
331
- },
332
- supportsInterface(interfaceId, ethCallContext) {
333
- try {
334
- const iface = new Interface(["function supportsInterface(bytes4)"]);
335
- const calldata = iface.encodeFunctionData("supportsInterface", [
336
- interfaceId,
337
- ]);
338
- return {
339
- context: ethCallContext,
340
- calldata,
341
- };
342
- }
343
- catch (e) {
344
- const stack = new Error().stack;
345
- throw transformEtherError(e, undefined, stack);
346
- }
347
- },
348
- symbol(ethCallContext) {
349
- try {
350
- const iface = new Interface(["function symbol()"]);
351
- const calldata = iface.encodeFunctionData("symbol", []);
352
- return {
353
- context: ethCallContext,
354
- calldata,
355
- };
356
- }
357
- catch (e) {
358
- const stack = new Error().stack;
359
- throw transformEtherError(e, undefined, stack);
360
- }
361
- },
362
- tokenURI(tokenId, ethCallContext) {
363
- try {
364
- const iface = new Interface(["function tokenURI(uint256)"]);
365
- const calldata = iface.encodeFunctionData("tokenURI", [tokenId]);
366
- return {
367
- context: ethCallContext,
368
- calldata,
369
- };
370
- }
371
- catch (e) {
372
- const stack = new Error().stack;
373
- throw transformEtherError(e, undefined, stack);
374
- }
375
- },
376
- transferFrom(from, to, tokenId, ethCallContext) {
377
- try {
378
- const iface = new Interface([
379
- "function transferFrom(address,address,uint256)",
380
- ]);
381
- const calldata = iface.encodeFunctionData("transferFrom", [
382
- from,
383
- to,
384
- tokenId,
385
- ]);
386
- return {
387
- context: ethCallContext,
388
- calldata,
389
- };
390
- }
391
- catch (e) {
392
- const stack = new Error().stack;
393
- throw transformEtherError(e, undefined, stack);
394
- }
395
- },
396
- };
397
- }
398
- export class ERC721BoundContractView extends BoundContractView {
399
- async totalSupply(overrides) {
400
- const ethCallContext = {
401
- chainId: this.context.chainId,
402
- blockTag: "0x" + this.context.blockNumber.toString(16),
403
- address: this.context.address,
404
- };
405
- return await this.view.totalSupply({
406
- blockTag: this.context.blockNumber,
407
- ...overrides,
408
- }, this.context.preparedData, ethCallContext);
409
- }
410
- async balanceOf(owner, overrides) {
411
- const ethCallContext = {
412
- chainId: this.context.chainId,
413
- blockTag: "0x" + this.context.blockNumber.toString(16),
414
- address: this.context.address,
415
- };
416
- return await this.view.balanceOf(owner, {
417
- blockTag: this.context.blockNumber,
418
- ...overrides,
419
- }, this.context.preparedData, ethCallContext);
420
- }
421
- async getApproved(tokenId, overrides) {
422
- const ethCallContext = {
423
- chainId: this.context.chainId,
424
- blockTag: "0x" + this.context.blockNumber.toString(16),
425
- address: this.context.address,
426
- };
427
- return await this.view.getApproved(tokenId, {
428
- blockTag: this.context.blockNumber,
429
- ...overrides,
430
- }, this.context.preparedData, ethCallContext);
431
- }
432
- async isApprovedForAll(owner, operator, overrides) {
433
- const ethCallContext = {
434
- chainId: this.context.chainId,
435
- blockTag: "0x" + this.context.blockNumber.toString(16),
436
- address: this.context.address,
437
- };
438
- return await this.view.isApprovedForAll(owner, operator, {
439
- blockTag: this.context.blockNumber,
440
- ...overrides,
441
- }, this.context.preparedData, ethCallContext);
442
- }
443
- async name(overrides) {
444
- const ethCallContext = {
445
- chainId: this.context.chainId,
446
- blockTag: "0x" + this.context.blockNumber.toString(16),
447
- address: this.context.address,
448
- };
449
- return await this.view.name({
450
- blockTag: this.context.blockNumber,
451
- ...overrides,
452
- }, this.context.preparedData, ethCallContext);
453
- }
454
- async ownerOf(tokenId, overrides) {
455
- const ethCallContext = {
456
- chainId: this.context.chainId,
457
- blockTag: "0x" + this.context.blockNumber.toString(16),
458
- address: this.context.address,
459
- };
460
- return await this.view.ownerOf(tokenId, {
461
- blockTag: this.context.blockNumber,
462
- ...overrides,
463
- }, this.context.preparedData, ethCallContext);
464
- }
465
- async supportsInterface(interfaceId, overrides) {
466
- const ethCallContext = {
467
- chainId: this.context.chainId,
468
- blockTag: "0x" + this.context.blockNumber.toString(16),
469
- address: this.context.address,
470
- };
471
- return await this.view.supportsInterface(interfaceId, {
472
- blockTag: this.context.blockNumber,
473
- ...overrides,
474
- }, this.context.preparedData, ethCallContext);
475
- }
476
- async symbol(overrides) {
477
- const ethCallContext = {
478
- chainId: this.context.chainId,
479
- blockTag: "0x" + this.context.blockNumber.toString(16),
480
- address: this.context.address,
481
- };
482
- return await this.view.symbol({
483
- blockTag: this.context.blockNumber,
484
- ...overrides,
485
- }, this.context.preparedData, ethCallContext);
486
- }
487
- async tokenURI(tokenId, overrides) {
488
- const ethCallContext = {
489
- chainId: this.context.chainId,
490
- blockTag: "0x" + this.context.blockNumber.toString(16),
491
- address: this.context.address,
492
- };
493
- return await this.view.tokenURI(tokenId, {
494
- blockTag: this.context.blockNumber,
495
- ...overrides,
496
- }, this.context.preparedData, ethCallContext);
497
- }
498
- callStatic = {
499
- view: this.view,
500
- context: this.context,
501
- async approve(to, tokenId, overrides) {
502
- const ethCallContext = {
503
- chainId: this.context.chainId,
504
- blockTag: "0x" + this.context.blockNumber.toString(16),
505
- address: this.context.address,
506
- };
507
- return await this.view.callStatic.approve(to, tokenId, {
508
- blockTag: this.context.blockNumber,
509
- ...overrides,
510
- }, this.context.preparedData, ethCallContext);
511
- },
512
- async safeTransferFrom_address_address_uint256(from, to, tokenId, overrides) {
513
- const ethCallContext = {
514
- chainId: this.context.chainId,
515
- blockTag: "0x" + this.context.blockNumber.toString(16),
516
- address: this.context.address,
517
- };
518
- return await this.view.callStatic.safeTransferFrom_address_address_uint256(from, to, tokenId, {
519
- blockTag: this.context.blockNumber,
520
- ...overrides,
521
- }, this.context.preparedData, ethCallContext);
522
- },
523
- async safeTransferFrom_address_address_uint256_bytes(from, to, tokenId, data, overrides) {
524
- const ethCallContext = {
525
- chainId: this.context.chainId,
526
- blockTag: "0x" + this.context.blockNumber.toString(16),
527
- address: this.context.address,
528
- };
529
- return await this.view.callStatic.safeTransferFrom_address_address_uint256_bytes(from, to, tokenId, data, {
530
- blockTag: this.context.blockNumber,
531
- ...overrides,
532
- }, this.context.preparedData, ethCallContext);
533
- },
534
- async setApprovalForAll(operator, _approved, overrides) {
535
- const ethCallContext = {
536
- chainId: this.context.chainId,
537
- blockTag: "0x" + this.context.blockNumber.toString(16),
538
- address: this.context.address,
539
- };
540
- return await this.view.callStatic.setApprovalForAll(operator, _approved, {
541
- blockTag: this.context.blockNumber,
542
- ...overrides,
543
- }, this.context.preparedData, ethCallContext);
544
- },
545
- async transferFrom(from, to, tokenId, overrides) {
546
- const ethCallContext = {
547
- chainId: this.context.chainId,
548
- blockTag: "0x" + this.context.blockNumber.toString(16),
549
- address: this.context.address,
550
- };
551
- return await this.view.callStatic.transferFrom(from, to, tokenId, {
552
- blockTag: this.context.blockNumber,
553
- ...overrides,
554
- }, this.context.preparedData, ethCallContext);
555
- },
556
- };
557
- encodeCall = {
558
- view: this.view,
559
- context: this.context,
560
- approve(to, tokenId, overrides) {
561
- let blockTagWithOverride = "0x" + this.context.blockNumber.toString(16);
562
- if (overrides?.blockTag) {
563
- blockTagWithOverride =
564
- typeof overrides.blockTag == "string"
565
- ? overrides.blockTag
566
- : "0x" + overrides.blockTag.toString(16);
567
- }
568
- return this.view.encodeCall.approve(to, tokenId, {
569
- chainId: this.context.chainId.toString(),
570
- address: this.context.address,
571
- blockTag: blockTagWithOverride,
572
- });
573
- },
574
- totalSupply(overrides) {
575
- let blockTagWithOverride = "0x" + this.context.blockNumber.toString(16);
576
- if (overrides?.blockTag) {
577
- blockTagWithOverride =
578
- typeof overrides.blockTag == "string"
579
- ? overrides.blockTag
580
- : "0x" + overrides.blockTag.toString(16);
581
- }
582
- return this.view.encodeCall.totalSupply({
583
- chainId: this.context.chainId.toString(),
584
- address: this.context.address,
585
- blockTag: blockTagWithOverride,
586
- });
587
- },
588
- balanceOf(owner, overrides) {
589
- let blockTagWithOverride = "0x" + this.context.blockNumber.toString(16);
590
- if (overrides?.blockTag) {
591
- blockTagWithOverride =
592
- typeof overrides.blockTag == "string"
593
- ? overrides.blockTag
594
- : "0x" + overrides.blockTag.toString(16);
595
- }
596
- return this.view.encodeCall.balanceOf(owner, {
597
- chainId: this.context.chainId.toString(),
598
- address: this.context.address,
599
- blockTag: blockTagWithOverride,
600
- });
601
- },
602
- getApproved(tokenId, overrides) {
603
- let blockTagWithOverride = "0x" + this.context.blockNumber.toString(16);
604
- if (overrides?.blockTag) {
605
- blockTagWithOverride =
606
- typeof overrides.blockTag == "string"
607
- ? overrides.blockTag
608
- : "0x" + overrides.blockTag.toString(16);
609
- }
610
- return this.view.encodeCall.getApproved(tokenId, {
611
- chainId: this.context.chainId.toString(),
612
- address: this.context.address,
613
- blockTag: blockTagWithOverride,
614
- });
615
- },
616
- isApprovedForAll(owner, operator, overrides) {
617
- let blockTagWithOverride = "0x" + this.context.blockNumber.toString(16);
618
- if (overrides?.blockTag) {
619
- blockTagWithOverride =
620
- typeof overrides.blockTag == "string"
621
- ? overrides.blockTag
622
- : "0x" + overrides.blockTag.toString(16);
623
- }
624
- return this.view.encodeCall.isApprovedForAll(owner, operator, {
625
- chainId: this.context.chainId.toString(),
626
- address: this.context.address,
627
- blockTag: blockTagWithOverride,
628
- });
629
- },
630
- name(overrides) {
631
- let blockTagWithOverride = "0x" + this.context.blockNumber.toString(16);
632
- if (overrides?.blockTag) {
633
- blockTagWithOverride =
634
- typeof overrides.blockTag == "string"
635
- ? overrides.blockTag
636
- : "0x" + overrides.blockTag.toString(16);
637
- }
638
- return this.view.encodeCall.name({
639
- chainId: this.context.chainId.toString(),
640
- address: this.context.address,
641
- blockTag: blockTagWithOverride,
642
- });
643
- },
644
- ownerOf(tokenId, overrides) {
645
- let blockTagWithOverride = "0x" + this.context.blockNumber.toString(16);
646
- if (overrides?.blockTag) {
647
- blockTagWithOverride =
648
- typeof overrides.blockTag == "string"
649
- ? overrides.blockTag
650
- : "0x" + overrides.blockTag.toString(16);
651
- }
652
- return this.view.encodeCall.ownerOf(tokenId, {
653
- chainId: this.context.chainId.toString(),
654
- address: this.context.address,
655
- blockTag: blockTagWithOverride,
656
- });
657
- },
658
- safeTransferFrom_address_address_uint256(from, to, tokenId, overrides) {
659
- let blockTagWithOverride = "0x" + this.context.blockNumber.toString(16);
660
- if (overrides?.blockTag) {
661
- blockTagWithOverride =
662
- typeof overrides.blockTag == "string"
663
- ? overrides.blockTag
664
- : "0x" + overrides.blockTag.toString(16);
665
- }
666
- return this.view.encodeCall.safeTransferFrom_address_address_uint256(from, to, tokenId, {
667
- chainId: this.context.chainId.toString(),
668
- address: this.context.address,
669
- blockTag: blockTagWithOverride,
670
- });
671
- },
672
- safeTransferFrom_address_address_uint256_bytes(from, to, tokenId, data, overrides) {
673
- let blockTagWithOverride = "0x" + this.context.blockNumber.toString(16);
674
- if (overrides?.blockTag) {
675
- blockTagWithOverride =
676
- typeof overrides.blockTag == "string"
677
- ? overrides.blockTag
678
- : "0x" + overrides.blockTag.toString(16);
679
- }
680
- return this.view.encodeCall.safeTransferFrom_address_address_uint256_bytes(from, to, tokenId, data, {
681
- chainId: this.context.chainId.toString(),
682
- address: this.context.address,
683
- blockTag: blockTagWithOverride,
684
- });
685
- },
686
- setApprovalForAll(operator, _approved, overrides) {
687
- let blockTagWithOverride = "0x" + this.context.blockNumber.toString(16);
688
- if (overrides?.blockTag) {
689
- blockTagWithOverride =
690
- typeof overrides.blockTag == "string"
691
- ? overrides.blockTag
692
- : "0x" + overrides.blockTag.toString(16);
693
- }
694
- return this.view.encodeCall.setApprovalForAll(operator, _approved, {
695
- chainId: this.context.chainId.toString(),
696
- address: this.context.address,
697
- blockTag: blockTagWithOverride,
698
- });
699
- },
700
- supportsInterface(interfaceId, overrides) {
701
- let blockTagWithOverride = "0x" + this.context.blockNumber.toString(16);
702
- if (overrides?.blockTag) {
703
- blockTagWithOverride =
704
- typeof overrides.blockTag == "string"
705
- ? overrides.blockTag
706
- : "0x" + overrides.blockTag.toString(16);
707
- }
708
- return this.view.encodeCall.supportsInterface(interfaceId, {
709
- chainId: this.context.chainId.toString(),
710
- address: this.context.address,
711
- blockTag: blockTagWithOverride,
712
- });
713
- },
714
- symbol(overrides) {
715
- let blockTagWithOverride = "0x" + this.context.blockNumber.toString(16);
716
- if (overrides?.blockTag) {
717
- blockTagWithOverride =
718
- typeof overrides.blockTag == "string"
719
- ? overrides.blockTag
720
- : "0x" + overrides.blockTag.toString(16);
721
- }
722
- return this.view.encodeCall.symbol({
723
- chainId: this.context.chainId.toString(),
724
- address: this.context.address,
725
- blockTag: blockTagWithOverride,
726
- });
727
- },
728
- tokenURI(tokenId, overrides) {
729
- let blockTagWithOverride = "0x" + this.context.blockNumber.toString(16);
730
- if (overrides?.blockTag) {
731
- blockTagWithOverride =
732
- typeof overrides.blockTag == "string"
733
- ? overrides.blockTag
734
- : "0x" + overrides.blockTag.toString(16);
735
- }
736
- return this.view.encodeCall.tokenURI(tokenId, {
737
- chainId: this.context.chainId.toString(),
738
- address: this.context.address,
739
- blockTag: blockTagWithOverride,
740
- });
741
- },
742
- transferFrom(from, to, tokenId, overrides) {
743
- let blockTagWithOverride = "0x" + this.context.blockNumber.toString(16);
744
- if (overrides?.blockTag) {
745
- blockTagWithOverride =
746
- typeof overrides.blockTag == "string"
747
- ? overrides.blockTag
748
- : "0x" + overrides.blockTag.toString(16);
749
- }
750
- return this.view.encodeCall.transferFrom(from, to, tokenId, {
751
- chainId: this.context.chainId.toString(),
752
- address: this.context.address,
753
- blockTag: blockTagWithOverride,
754
- });
755
- },
756
- };
757
- }
758
- export class ERC721Processor extends BaseProcessor {
759
- onEventApproval(handler, filter, fetchConfig, preprocessHandler) {
760
- if (!filter) {
761
- filter = templateContract.filters["Approval(address,address,uint256)"](null, null, null);
762
- }
763
- return super.onEthEvent(handler, filter, fetchConfig, preprocessHandler);
764
- }
765
- onEventApprovalForAll(handler, filter, fetchConfig, preprocessHandler) {
766
- if (!filter) {
767
- filter = templateContract.filters["ApprovalForAll(address,address,bool)"](null, null, null);
768
- }
769
- return super.onEthEvent(handler, filter, fetchConfig, preprocessHandler);
770
- }
771
- onEventTransfer(handler, filter, fetchConfig, preprocessHandler) {
772
- if (!filter) {
773
- filter = templateContract.filters["Transfer(address,address,uint256)"](null, null, null);
774
- }
775
- return super.onEthEvent(handler, filter, fetchConfig, preprocessHandler);
776
- }
777
- onCallApprove(handler, fetchConfig, preprocessHandler) {
778
- return super.onEthTrace("0x095ea7b3", handler, fetchConfig, preprocessHandler);
779
- }
780
- onCallTotalSupply(handler, fetchConfig, preprocessHandler) {
781
- return super.onEthTrace("0x18160ddd", handler, fetchConfig, preprocessHandler);
782
- }
783
- onCallBalanceOf(handler, fetchConfig, preprocessHandler) {
784
- return super.onEthTrace("0x70a08231", handler, fetchConfig, preprocessHandler);
785
- }
786
- onCallGetApproved(handler, fetchConfig, preprocessHandler) {
787
- return super.onEthTrace("0x081812fc", handler, fetchConfig, preprocessHandler);
788
- }
789
- onCallIsApprovedForAll(handler, fetchConfig, preprocessHandler) {
790
- return super.onEthTrace("0xe985e9c5", handler, fetchConfig, preprocessHandler);
791
- }
792
- onCallName(handler, fetchConfig, preprocessHandler) {
793
- return super.onEthTrace("0x06fdde03", handler, fetchConfig, preprocessHandler);
794
- }
795
- onCallOwnerOf(handler, fetchConfig, preprocessHandler) {
796
- return super.onEthTrace("0x6352211e", handler, fetchConfig, preprocessHandler);
797
- }
798
- onCallSafeTransferFrom_address_address_uint256(handler, fetchConfig, preprocessHandler) {
799
- return super.onEthTrace("0x42842e0e", handler, fetchConfig, preprocessHandler);
800
- }
801
- onCallSafeTransferFrom_address_address_uint256_bytes(handler, fetchConfig, preprocessHandler) {
802
- return super.onEthTrace("0xb88d4fde", handler, fetchConfig, preprocessHandler);
803
- }
804
- onCallSetApprovalForAll(handler, fetchConfig, preprocessHandler) {
805
- return super.onEthTrace("0xa22cb465", handler, fetchConfig, preprocessHandler);
806
- }
807
- onCallSupportsInterface(handler, fetchConfig, preprocessHandler) {
808
- return super.onEthTrace("0x01ffc9a7", handler, fetchConfig, preprocessHandler);
809
- }
810
- onCallSymbol(handler, fetchConfig, preprocessHandler) {
811
- return super.onEthTrace("0x95d89b41", handler, fetchConfig, preprocessHandler);
812
- }
813
- onCallTokenURI(handler, fetchConfig, preprocessHandler) {
814
- return super.onEthTrace("0xc87b56dd", handler, fetchConfig, preprocessHandler);
815
- }
816
- onCallTransferFrom(handler, fetchConfig, preprocessHandler) {
817
- return super.onEthTrace("0x23b872dd", handler, fetchConfig, preprocessHandler);
818
- }
819
- static filters = {
820
- Approval(owner, approved, tokenId) {
821
- return templateContract.filters["Approval(address,address,uint256)"](owner, approved, tokenId);
822
- },
823
- ApprovalForAll(owner, operator, approved) {
824
- return templateContract.filters["ApprovalForAll(address,address,bool)"](owner, operator, approved);
825
- },
826
- Transfer(from, to, tokenId) {
827
- return templateContract.filters["Transfer(address,address,uint256)"](from, to, tokenId);
828
- },
829
- };
830
- CreateBoundContractView() {
831
- const view = getERC721Contract(this.config.network, this.config.address);
832
- return new ERC721BoundContractView(this.config.address, view);
833
- }
834
- static bind(options) {
835
- if (!options.name) {
836
- options.name = "ERC721";
837
- }
838
- let processor = getProcessor(options);
839
- if (!processor) {
840
- processor = new ERC721Processor(options);
841
- addProcessor(options, processor);
842
- }
843
- return processor;
844
- }
845
- }
846
- export class ERC721ProcessorTemplate extends BaseProcessorTemplate {
847
- bindInternal(options) {
848
- if (!options.name) {
849
- options.name = "ERC721";
850
- }
851
- let processor = getProcessor(options);
852
- if (!processor) {
853
- processor = new ERC721Processor(options);
854
- addProcessor(options, processor);
855
- }
856
- return processor;
857
- }
858
- onEventApproval(handler, filter, fetchConfig, preprocessHandler) {
859
- if (!filter) {
860
- filter = templateContract.filters["Approval(address,address,uint256)"](null, null, null);
861
- }
862
- return super.onEthEvent(handler, filter, fetchConfig, preprocessHandler);
863
- }
864
- onEventApprovalForAll(handler, filter, fetchConfig, preprocessHandler) {
865
- if (!filter) {
866
- filter = templateContract.filters["ApprovalForAll(address,address,bool)"](null, null, null);
867
- }
868
- return super.onEthEvent(handler, filter, fetchConfig, preprocessHandler);
869
- }
870
- onEventTransfer(handler, filter, fetchConfig, preprocessHandler) {
871
- if (!filter) {
872
- filter = templateContract.filters["Transfer(address,address,uint256)"](null, null, null);
873
- }
874
- return super.onEthEvent(handler, filter, fetchConfig, preprocessHandler);
875
- }
876
- }
877
- export function getERC721Contract(chainId, address) {
878
- let contract = getContractByABI("ERC721", address, chainId);
879
- if (!contract) {
880
- const rawContract = ERC721__factory.connect(address, getProvider(chainId));
881
- contract = new ERC721ContractView(rawContract);
882
- addContractByABI("ERC721", address, chainId, contract);
883
- }
884
- return contract;
885
- }
886
- export function getERC721ContractOnContext(context, address) {
887
- const view = getERC721Contract(context.getChainId(), address);
888
- const boundView = new ERC721BoundContractView(address, view);
889
- boundView.context = context;
890
- if (boundView.callStatic) {
891
- boundView.callStatic.context = context;
892
- }
893
- return boundView;
894
- }
895
- //# sourceMappingURL=erc721-processor.js.map