@sentio/sdk 2.3.6-rc.1 → 2.4.0

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 (279) hide show
  1. package/lib/aptos/tests/aptos.test.js.map +1 -1
  2. package/lib/eth/account-processor.d.ts +2 -2
  3. package/lib/eth/account-processor.js +2 -2
  4. package/lib/eth/account-processor.js.map +1 -1
  5. package/lib/eth/builtin/eacaggregatorproxy.d.ts +2 -2
  6. package/lib/eth/builtin/eacaggregatorproxy.js +2 -2
  7. package/lib/eth/builtin/eacaggregatorproxy.js.map +1 -1
  8. package/lib/eth/builtin/erc1155.d.ts +2 -2
  9. package/lib/eth/builtin/erc1155.js +2 -2
  10. package/lib/eth/builtin/erc1155.js.map +1 -1
  11. package/lib/eth/builtin/erc20.d.ts +2 -2
  12. package/lib/eth/builtin/erc20.js +2 -2
  13. package/lib/eth/builtin/erc20.js.map +1 -1
  14. package/lib/eth/builtin/erc20bytes.d.ts +2 -2
  15. package/lib/eth/builtin/erc20bytes.js +2 -2
  16. package/lib/eth/builtin/erc20bytes.js.map +1 -1
  17. package/lib/eth/builtin/erc721.d.ts +2 -2
  18. package/lib/eth/builtin/erc721.js +2 -2
  19. package/lib/eth/builtin/erc721.js.map +1 -1
  20. package/lib/eth/builtin/internal/{eacaggregatorproxy_processor.d.ts → eacaggregatorproxy-processor.d.ts} +0 -0
  21. package/lib/eth/builtin/internal/{eacaggregatorproxy_processor.js → eacaggregatorproxy-processor.js} +1 -1
  22. package/lib/eth/builtin/internal/{eacaggregatorproxy_processor.js.map → eacaggregatorproxy-processor.js.map} +1 -1
  23. package/lib/eth/builtin/internal/{eacaggregatorproxy_test-utils.d.ts → eacaggregatorproxy-test-utils.d.ts} +0 -0
  24. package/lib/eth/builtin/internal/{eacaggregatorproxy_test-utils.js → eacaggregatorproxy-test-utils.js} +2 -2
  25. package/lib/eth/builtin/internal/{eacaggregatorproxy_test-utils.js.map → eacaggregatorproxy-test-utils.js.map} +1 -1
  26. package/lib/eth/builtin/internal/{erc1155_processor.d.ts → erc1155-processor.d.ts} +0 -0
  27. package/lib/eth/builtin/internal/{erc1155_processor.js → erc1155-processor.js} +1 -1
  28. package/lib/eth/builtin/internal/{erc1155_processor.js.map → erc1155-processor.js.map} +1 -1
  29. package/lib/eth/builtin/internal/{erc1155_test-utils.d.ts → erc1155-test-utils.d.ts} +0 -0
  30. package/lib/eth/builtin/internal/{erc1155_test-utils.js → erc1155-test-utils.js} +2 -2
  31. package/lib/eth/builtin/internal/{erc1155_test-utils.js.map → erc1155-test-utils.js.map} +1 -1
  32. package/lib/eth/builtin/internal/{erc20_processor.d.ts → erc20-processor.d.ts} +0 -0
  33. package/lib/eth/builtin/internal/{erc20_processor.js → erc20-processor.js} +1 -1
  34. package/lib/eth/builtin/internal/{erc20_processor.js.map → erc20-processor.js.map} +1 -1
  35. package/lib/eth/builtin/internal/{erc20_test-utils.d.ts → erc20-test-utils.d.ts} +0 -0
  36. package/lib/eth/builtin/internal/{erc20_test-utils.js → erc20-test-utils.js} +2 -2
  37. package/lib/eth/builtin/internal/{erc20_test-utils.js.map → erc20-test-utils.js.map} +1 -1
  38. package/lib/eth/builtin/internal/{erc20bytes_processor.d.ts → erc20bytes-processor.d.ts} +0 -0
  39. package/lib/eth/builtin/internal/{erc20bytes_processor.js → erc20bytes-processor.js} +1 -1
  40. package/lib/eth/builtin/internal/{erc20bytes_processor.js.map → erc20bytes-processor.js.map} +1 -1
  41. package/lib/eth/builtin/internal/{erc20bytes_test-utils.d.ts → erc20bytes-test-utils.d.ts} +0 -0
  42. package/lib/eth/builtin/internal/{erc20bytes_test-utils.js → erc20bytes-test-utils.js} +2 -2
  43. package/lib/eth/builtin/internal/{erc20bytes_test-utils.js.map → erc20bytes-test-utils.js.map} +1 -1
  44. package/lib/eth/builtin/internal/{erc721_processor.d.ts → erc721-processor.d.ts} +0 -0
  45. package/lib/eth/builtin/internal/{erc721_processor.js → erc721-processor.js} +1 -1
  46. package/lib/eth/builtin/internal/{erc721_processor.js.map → erc721-processor.js.map} +1 -1
  47. package/lib/eth/builtin/internal/{erc721_test-utils.d.ts → erc721-test-utils.d.ts} +0 -0
  48. package/lib/eth/builtin/internal/{erc721_test-utils.js → erc721-test-utils.js} +2 -2
  49. package/lib/eth/builtin/internal/{erc721_test-utils.js.map → erc721-test-utils.js.map} +1 -1
  50. package/lib/eth/builtin/internal/{weth9_processor.d.ts → weth9-processor.d.ts} +0 -0
  51. package/lib/eth/builtin/internal/{weth9_processor.js → weth9-processor.js} +1 -1
  52. package/lib/eth/builtin/internal/{weth9_processor.js.map → weth9-processor.js.map} +1 -1
  53. package/lib/eth/builtin/internal/{weth9_test-utils.d.ts → weth9-test-utils.d.ts} +0 -0
  54. package/lib/eth/builtin/internal/{weth9_test-utils.js → weth9-test-utils.js} +2 -2
  55. package/lib/eth/builtin/internal/{weth9_test-utils.js.map → weth9-test-utils.js.map} +1 -1
  56. package/lib/eth/builtin/weth9.d.ts +2 -2
  57. package/lib/eth/builtin/weth9.js +2 -2
  58. package/lib/eth/builtin/weth9.js.map +1 -1
  59. package/lib/eth/codegen/ethers-sentio.js +2 -2
  60. package/lib/eth/codegen/ethers-sentio.js.map +1 -1
  61. package/lib/eth/codegen/file.js +3 -3
  62. package/lib/eth/codegen/file.js.map +1 -1
  63. package/lib/eth/generic-processor.test.js.map +1 -1
  64. package/lib/eth/tests/account.test.d.ts +1 -0
  65. package/lib/eth/tests/account.test.js.map +1 -0
  66. package/lib/eth/tests/codegen.test.d.ts +1 -0
  67. package/lib/eth/tests/codegen.test.js.map +1 -0
  68. package/lib/eth/tests/erc20-template.test.d.ts +1 -0
  69. package/lib/eth/tests/erc20-template.test.js.map +1 -0
  70. package/lib/eth/tests/erc20.d.ts +1 -0
  71. package/lib/eth/tests/erc20.js +52 -0
  72. package/lib/eth/tests/erc20.js.map +1 -0
  73. package/lib/eth/tests/erc20.test.d.ts +1 -0
  74. package/lib/eth/tests/erc20.test.js.map +1 -0
  75. package/lib/eth/tests/error-capture.test.d.ts +1 -0
  76. package/lib/eth/tests/error-capture.test.js.map +1 -0
  77. package/lib/eth/tests/logger.test.d.ts +1 -0
  78. package/lib/eth/tests/logger.test.js.map +1 -0
  79. package/lib/eth/tests/types/anyswaprouter.d.ts +3 -0
  80. package/lib/eth/tests/types/anyswaprouter.js +7 -0
  81. package/lib/eth/tests/types/anyswaprouter.js.map +1 -0
  82. package/lib/eth/tests/types/commitmentpool.d.ts +3 -0
  83. package/lib/eth/tests/types/commitmentpool.js +7 -0
  84. package/lib/eth/tests/types/commitmentpool.js.map +1 -0
  85. package/lib/eth/tests/types/index.d.ts +12 -0
  86. package/lib/eth/tests/types/index.js +16 -0
  87. package/lib/eth/tests/types/index.js.map +1 -0
  88. package/lib/eth/tests/types/internal/AnyswapRouter.d.ts +122 -0
  89. package/lib/eth/tests/types/internal/AnyswapRouter.js +2 -0
  90. package/lib/eth/tests/types/internal/AnyswapRouter.js.map +1 -0
  91. package/lib/eth/tests/types/internal/CommitmentPool.d.ts +176 -0
  92. package/lib/eth/tests/types/internal/CommitmentPool.js +2 -0
  93. package/lib/eth/tests/types/internal/CommitmentPool.js.map +1 -0
  94. package/lib/eth/tests/types/internal/MembershipStakerV3.d.ts +81 -0
  95. package/lib/eth/tests/types/internal/MembershipStakerV3.js +2 -0
  96. package/lib/eth/tests/types/internal/MembershipStakerV3.js.map +1 -0
  97. package/lib/eth/tests/types/internal/Pyth.d.ts +204 -0
  98. package/lib/eth/tests/types/internal/Pyth.js +2 -0
  99. package/lib/eth/tests/types/internal/Pyth.js.map +1 -0
  100. package/lib/eth/tests/types/internal/Seaport.d.ts +350 -0
  101. package/lib/eth/tests/types/internal/Seaport.js +2 -0
  102. package/lib/eth/tests/types/internal/Seaport.js.map +1 -0
  103. package/lib/eth/tests/types/internal/TokenExchange.d.ts +128 -0
  104. package/lib/eth/tests/types/internal/TokenExchange.js +2 -0
  105. package/lib/eth/tests/types/internal/TokenExchange.js.map +1 -0
  106. package/lib/eth/tests/types/internal/anyswaprouter-processor.d.ts +463 -0
  107. package/lib/eth/tests/types/internal/anyswaprouter-processor.js +425 -0
  108. package/lib/eth/tests/types/internal/anyswaprouter-processor.js.map +1 -0
  109. package/lib/eth/tests/types/internal/anyswaprouter-test-utils.d.ts +9 -0
  110. package/lib/eth/tests/types/internal/anyswaprouter-test-utils.js +124 -0
  111. package/lib/eth/tests/types/internal/anyswaprouter-test-utils.js.map +1 -0
  112. package/lib/eth/tests/types/internal/commitmentpool-processor.d.ts +348 -0
  113. package/lib/eth/tests/types/internal/commitmentpool-processor.js +607 -0
  114. package/lib/eth/tests/types/internal/commitmentpool-processor.js.map +1 -0
  115. package/lib/eth/tests/types/internal/commitmentpool-test-utils.d.ts +9 -0
  116. package/lib/eth/tests/types/internal/commitmentpool-test-utils.js +87 -0
  117. package/lib/eth/tests/types/internal/commitmentpool-test-utils.js.map +1 -0
  118. package/lib/eth/tests/types/internal/common.d.ts +10 -0
  119. package/lib/eth/tests/types/internal/common.js +8 -0
  120. package/lib/eth/tests/types/internal/common.js.map +1 -0
  121. package/lib/eth/tests/types/internal/factories/AnyswapRouter__factory.d.ts +988 -0
  122. package/lib/eth/tests/types/internal/factories/AnyswapRouter__factory.js +1269 -0
  123. package/lib/eth/tests/types/internal/factories/AnyswapRouter__factory.js.map +1 -0
  124. package/lib/eth/tests/types/internal/factories/CommitmentPool__factory.d.ts +792 -0
  125. package/lib/eth/tests/types/internal/factories/CommitmentPool__factory.js +1040 -0
  126. package/lib/eth/tests/types/internal/factories/CommitmentPool__factory.js.map +1 -0
  127. package/lib/eth/tests/types/internal/factories/MembershipStakerV3__factory.d.ts +549 -0
  128. package/lib/eth/tests/types/internal/factories/MembershipStakerV3__factory.js +721 -0
  129. package/lib/eth/tests/types/internal/factories/MembershipStakerV3__factory.js.map +1 -0
  130. package/lib/eth/tests/types/internal/factories/Pyth__factory.d.ts +1130 -0
  131. package/lib/eth/tests/types/internal/factories/Pyth__factory.js +1486 -0
  132. package/lib/eth/tests/types/internal/factories/Pyth__factory.js.map +1 -0
  133. package/lib/eth/tests/types/internal/factories/Seaport__factory.d.ts +2018 -0
  134. package/lib/eth/tests/types/internal/factories/Seaport__factory.js +2610 -0
  135. package/lib/eth/tests/types/internal/factories/Seaport__factory.js.map +1 -0
  136. package/lib/eth/tests/types/internal/factories/TokenExchange__factory.d.ts +651 -0
  137. package/lib/eth/tests/types/internal/factories/TokenExchange__factory.js +853 -0
  138. package/lib/eth/tests/types/internal/factories/TokenExchange__factory.js.map +1 -0
  139. package/lib/eth/tests/types/internal/factories/index.d.ts +6 -0
  140. package/lib/eth/tests/types/internal/factories/index.js +10 -0
  141. package/lib/eth/tests/types/internal/factories/index.js.map +1 -0
  142. package/lib/eth/tests/types/internal/index.d.ts +13 -0
  143. package/lib/eth/tests/types/internal/index.js +8 -0
  144. package/lib/eth/tests/types/internal/index.js.map +1 -0
  145. package/lib/eth/tests/types/internal/membershipstakerv3-processor.d.ts +287 -0
  146. package/lib/eth/tests/types/internal/membershipstakerv3-processor.js +596 -0
  147. package/lib/eth/tests/types/internal/membershipstakerv3-processor.js.map +1 -0
  148. package/lib/eth/tests/types/internal/membershipstakerv3-test-utils.d.ts +11 -0
  149. package/lib/eth/tests/types/internal/membershipstakerv3-test-utils.js +109 -0
  150. package/lib/eth/tests/types/internal/membershipstakerv3-test-utils.js.map +1 -0
  151. package/lib/eth/tests/types/internal/pyth-processor.d.ts +422 -0
  152. package/lib/eth/tests/types/internal/pyth-processor.js +890 -0
  153. package/lib/eth/tests/types/internal/pyth-processor.js.map +1 -0
  154. package/lib/eth/tests/types/internal/pyth-test-utils.d.ts +13 -0
  155. package/lib/eth/tests/types/internal/pyth-test-utils.js +131 -0
  156. package/lib/eth/tests/types/internal/pyth-test-utils.js.map +1 -0
  157. package/lib/eth/tests/types/internal/seaport-processor.d.ts +211 -0
  158. package/lib/eth/tests/types/internal/seaport-processor.js +237 -0
  159. package/lib/eth/tests/types/internal/seaport-processor.js.map +1 -0
  160. package/lib/eth/tests/types/internal/seaport-test-utils.d.ts +6 -0
  161. package/lib/eth/tests/types/internal/seaport-test-utils.js +61 -0
  162. package/lib/eth/tests/types/internal/seaport-test-utils.js.map +1 -0
  163. package/lib/eth/tests/types/internal/tokenexchange-processor.d.ts +334 -0
  164. package/lib/eth/tests/types/internal/tokenexchange-processor.js +667 -0
  165. package/lib/eth/tests/types/internal/tokenexchange-processor.js.map +1 -0
  166. package/lib/eth/tests/types/internal/tokenexchange-test-utils.d.ts +13 -0
  167. package/lib/eth/tests/types/internal/tokenexchange-test-utils.js +149 -0
  168. package/lib/eth/tests/types/internal/tokenexchange-test-utils.js.map +1 -0
  169. package/lib/eth/tests/types/membershipstakerv3.d.ts +3 -0
  170. package/lib/eth/tests/types/membershipstakerv3.js +7 -0
  171. package/lib/eth/tests/types/membershipstakerv3.js.map +1 -0
  172. package/lib/eth/tests/types/pyth.d.ts +3 -0
  173. package/lib/eth/tests/types/pyth.js +7 -0
  174. package/lib/eth/tests/types/pyth.js.map +1 -0
  175. package/lib/eth/tests/types/seaport.d.ts +3 -0
  176. package/lib/eth/tests/types/seaport.js +7 -0
  177. package/lib/eth/tests/types/seaport.js.map +1 -0
  178. package/lib/eth/tests/types/tokenexchange.d.ts +3 -0
  179. package/lib/eth/tests/types/tokenexchange.js +7 -0
  180. package/lib/eth/tests/types/tokenexchange.js.map +1 -0
  181. package/lib/solana/builtin/types.d.ts +8 -8
  182. package/lib/solana/tests/solana.test.js.map +1 -1
  183. package/lib/sui/sui-processor.js +2 -8
  184. package/lib/sui/sui-processor.js.map +1 -1
  185. package/lib/sui/tests/sui.test.js.map +1 -1
  186. package/lib/sui/utils.d.ts +2 -0
  187. package/lib/sui/utils.js +11 -0
  188. package/lib/sui/utils.js.map +1 -0
  189. package/lib/testing/aptos-facet.d.ts +12 -0
  190. package/lib/testing/aptos-facet.js +91 -0
  191. package/lib/testing/aptos-facet.js.map +1 -0
  192. package/lib/testing/eth-facet.d.ts +27 -0
  193. package/lib/testing/eth-facet.js +211 -0
  194. package/lib/testing/eth-facet.js.map +1 -0
  195. package/lib/testing/solana-facet.d.ts +7 -0
  196. package/lib/testing/solana-facet.js +22 -0
  197. package/lib/testing/solana-facet.js.map +1 -0
  198. package/lib/testing/sui-facet.d.ts +12 -0
  199. package/lib/testing/sui-facet.js +103 -0
  200. package/lib/testing/sui-facet.js.map +1 -0
  201. package/lib/testing/test-processor-server.d.ts +9 -23
  202. package/lib/testing/test-processor-server.js +13 -227
  203. package/lib/testing/test-processor-server.js.map +1 -1
  204. package/lib/utils/dex-price.js +1 -1
  205. package/lib/utils/dex-price.js.map +1 -1
  206. package/lib/utils/token.js +1 -1
  207. package/lib/utils/token.js.map +1 -1
  208. package/package.json +5 -5
  209. package/src/eth/account-processor.ts +2 -5
  210. package/src/eth/builtin/eacaggregatorproxy.ts +2 -2
  211. package/src/eth/builtin/erc1155.ts +2 -2
  212. package/src/eth/builtin/erc20.ts +2 -2
  213. package/src/eth/builtin/erc20bytes.ts +2 -2
  214. package/src/eth/builtin/erc721.ts +2 -2
  215. package/src/eth/builtin/internal/{eacaggregatorproxy_processor.ts → eacaggregatorproxy-processor.ts} +0 -0
  216. package/src/eth/builtin/internal/{eacaggregatorproxy_test-utils.ts → eacaggregatorproxy-test-utils.ts} +1 -1
  217. package/src/eth/builtin/internal/{erc1155_processor.ts → erc1155-processor.ts} +0 -0
  218. package/src/eth/builtin/internal/{erc1155_test-utils.ts → erc1155-test-utils.ts} +1 -1
  219. package/src/eth/builtin/internal/{erc20_processor.ts → erc20-processor.ts} +0 -0
  220. package/src/eth/builtin/internal/{erc20_test-utils.ts → erc20-test-utils.ts} +1 -1
  221. package/src/eth/builtin/internal/{erc20bytes_processor.ts → erc20bytes-processor.ts} +0 -0
  222. package/src/eth/builtin/internal/{erc20bytes_test-utils.ts → erc20bytes-test-utils.ts} +1 -1
  223. package/src/eth/builtin/internal/{erc721_processor.ts → erc721-processor.ts} +0 -0
  224. package/src/eth/builtin/internal/{erc721_test-utils.ts → erc721-test-utils.ts} +1 -1
  225. package/src/eth/builtin/internal/{weth9_processor.ts → weth9-processor.ts} +0 -0
  226. package/src/eth/builtin/internal/{weth9_test-utils.ts → weth9-test-utils.ts} +1 -1
  227. package/src/eth/builtin/weth9.ts +2 -2
  228. package/src/eth/codegen/ethers-sentio.ts +2 -2
  229. package/src/eth/codegen/file.ts +3 -3
  230. package/src/eth/tests/abis/eth/CommitmentPool.json +1034 -0
  231. package/src/eth/tests/abis/eth/MembershipStakerV3.json +706 -0
  232. package/src/eth/tests/abis/eth/Pyth.json +1471 -0
  233. package/src/eth/tests/abis/eth/Seaport.json +2595 -0
  234. package/src/eth/tests/abis/eth/TokenExchange.json +838 -0
  235. package/src/eth/tests/abis/eth/anyswapRouter.json +490 -0
  236. package/src/eth/tests/erc20.ts +63 -0
  237. package/src/eth/tests/types/anyswaprouter.ts +7 -0
  238. package/src/eth/tests/types/commitmentpool.ts +7 -0
  239. package/src/eth/tests/types/index.ts +33 -0
  240. package/src/eth/tests/types/internal/AnyswapRouter.ts +122 -0
  241. package/src/eth/tests/types/internal/CommitmentPool.ts +208 -0
  242. package/src/eth/tests/types/internal/MembershipStakerV3.ts +108 -0
  243. package/src/eth/tests/types/internal/Pyth.ts +246 -0
  244. package/src/eth/tests/types/internal/Seaport.ts +389 -0
  245. package/src/eth/tests/types/internal/TokenExchange.ts +142 -0
  246. package/src/eth/tests/types/internal/anyswaprouter-processor.ts +1396 -0
  247. package/src/eth/tests/types/internal/anyswaprouter-test-utils.ts +187 -0
  248. package/src/eth/tests/types/internal/commitmentpool-processor.ts +1575 -0
  249. package/src/eth/tests/types/internal/commitmentpool-test-utils.ts +150 -0
  250. package/src/eth/tests/types/internal/common.ts +23 -0
  251. package/src/eth/tests/types/internal/factories/AnyswapRouter__factory.ts +1278 -0
  252. package/src/eth/tests/types/internal/factories/CommitmentPool__factory.ts +1049 -0
  253. package/src/eth/tests/types/internal/factories/MembershipStakerV3__factory.ts +730 -0
  254. package/src/eth/tests/types/internal/factories/Pyth__factory.ts +1492 -0
  255. package/src/eth/tests/types/internal/factories/Seaport__factory.ts +2616 -0
  256. package/src/eth/tests/types/internal/factories/TokenExchange__factory.ts +862 -0
  257. package/src/eth/tests/types/internal/factories/index.ts +9 -0
  258. package/src/eth/tests/types/internal/index.ts +16 -0
  259. package/src/eth/tests/types/internal/membershipstakerv3-processor.ts +1399 -0
  260. package/src/eth/tests/types/internal/membershipstakerv3-test-utils.ts +188 -0
  261. package/src/eth/tests/types/internal/pyth-processor.ts +2043 -0
  262. package/src/eth/tests/types/internal/pyth-test-utils.ts +226 -0
  263. package/src/eth/tests/types/internal/seaport-processor.ts +678 -0
  264. package/src/eth/tests/types/internal/seaport-test-utils.ts +100 -0
  265. package/src/eth/tests/types/internal/tokenexchange-processor.ts +1570 -0
  266. package/src/eth/tests/types/internal/tokenexchange-test-utils.ts +244 -0
  267. package/src/eth/tests/types/membershipstakerv3.ts +7 -0
  268. package/src/eth/tests/types/pyth.ts +7 -0
  269. package/src/eth/tests/types/seaport.ts +7 -0
  270. package/src/eth/tests/types/tokenexchange.ts +7 -0
  271. package/src/sui/sui-processor.ts +2 -7
  272. package/src/sui/utils.ts +11 -0
  273. package/src/testing/aptos-facet.ts +111 -0
  274. package/src/testing/eth-facet.ts +233 -0
  275. package/src/testing/solana-facet.ts +25 -0
  276. package/src/testing/sui-facet.ts +119 -0
  277. package/src/testing/test-processor-server.ts +15 -252
  278. package/src/utils/dex-price.ts +1 -1
  279. package/src/utils/token.ts +1 -3
@@ -0,0 +1,1575 @@
1
+ /* Autogenerated file. Do not edit manually. */
2
+ /* tslint:disable */
3
+ /* eslint-disable */
4
+ import { BigNumberish, Overrides, BytesLike } from "ethers";
5
+ import { Networkish } from "ethers/providers";
6
+ import {
7
+ addContractByABI,
8
+ getContractByABI,
9
+ addProcessor,
10
+ getProcessor,
11
+ getProvider,
12
+ transformEtherError,
13
+ Trace,
14
+ BindOptions,
15
+ BaseProcessor,
16
+ BaseProcessorTemplate,
17
+ BoundContractView,
18
+ ContractContext,
19
+ ContractView,
20
+ DummyProvider,
21
+ TypedCallTrace,
22
+ toBlockTag,
23
+ } from "@sentio/sdk/eth";
24
+ import { EthFetchConfig } from "@sentio/protos";
25
+
26
+ import { CommitmentPool, CommitmentPool__factory } from "./index.js";
27
+ import {
28
+ CommitmentIncludedEvent,
29
+ CommitmentIncludedEventFilter,
30
+ CommitmentQueuedEvent,
31
+ CommitmentQueuedEventFilter,
32
+ CommitmentSpentEvent,
33
+ CommitmentSpentEventFilter,
34
+ RollupWhitelistDisabledEvent,
35
+ RollupWhitelistDisabledEventFilter,
36
+ SanctionsCheckDisabledEvent,
37
+ SanctionsCheckDisabledEventFilter,
38
+ SanctionsListEvent,
39
+ SanctionsListEventFilter,
40
+ VerifierUpdateDisabledEvent,
41
+ VerifierUpdateDisabledEventFilter,
42
+ ICommitmentPool,
43
+ } from "./CommitmentPool.js";
44
+
45
+ export interface _pathIndicesCallObject {
46
+ _fullPath: bigint;
47
+ _rollupSize: bigint;
48
+ }
49
+
50
+ export type _pathIndicesCallTrace = TypedCallTrace<
51
+ [bigint, bigint],
52
+ _pathIndicesCallObject
53
+ > &
54
+ Trace;
55
+
56
+ export interface AddEnqueueWhitelistCallObject {
57
+ _actor: string;
58
+ }
59
+
60
+ export type AddEnqueueWhitelistCallTrace = TypedCallTrace<
61
+ [string],
62
+ AddEnqueueWhitelistCallObject
63
+ > &
64
+ Trace;
65
+
66
+ export interface AddRollupWhitelistCallObject {
67
+ _roller: string;
68
+ }
69
+
70
+ export type AddRollupWhitelistCallTrace = TypedCallTrace<
71
+ [string],
72
+ AddRollupWhitelistCallObject
73
+ > &
74
+ Trace;
75
+
76
+ export interface AssetTypeCallObject {}
77
+
78
+ export type AssetTypeCallTrace = TypedCallTrace<[], AssetTypeCallObject> &
79
+ Trace;
80
+
81
+ export interface C_42ae54c0CallObject {
82
+ c__42ae54c0: string;
83
+ }
84
+
85
+ export type C_42ae54c0CallTrace = TypedCallTrace<
86
+ [string],
87
+ C_42ae54c0CallObject
88
+ > &
89
+ Trace;
90
+
91
+ export interface C_9f3d2211CallObject {
92
+ c__9f3d2211: string;
93
+ }
94
+
95
+ export type C_9f3d2211CallTrace = TypedCallTrace<
96
+ [string],
97
+ C_9f3d2211CallObject
98
+ > &
99
+ Trace;
100
+
101
+ export interface C_bfaab06fCallObject {
102
+ c__bfaab06f: string;
103
+ }
104
+
105
+ export type C_bfaab06fCallTrace = TypedCallTrace<
106
+ [string],
107
+ C_bfaab06fCallObject
108
+ > &
109
+ Trace;
110
+
111
+ export interface C_false42ae54c0CallObject {
112
+ c__42ae54c0: string;
113
+ }
114
+
115
+ export type C_false42ae54c0CallTrace = TypedCallTrace<
116
+ [string],
117
+ C_false42ae54c0CallObject
118
+ > &
119
+ Trace;
120
+
121
+ export interface C_false9f3d2211CallObject {
122
+ c__9f3d2211: string;
123
+ }
124
+
125
+ export type C_false9f3d2211CallTrace = TypedCallTrace<
126
+ [string],
127
+ C_false9f3d2211CallObject
128
+ > &
129
+ Trace;
130
+
131
+ export interface C_falsebfaab06fCallObject {
132
+ c__bfaab06f: string;
133
+ }
134
+
135
+ export type C_falsebfaab06fCallTrace = TypedCallTrace<
136
+ [string],
137
+ C_falsebfaab06fCallObject
138
+ > &
139
+ Trace;
140
+
141
+ export interface C_true42ae54c0CallObject {
142
+ c__42ae54c0: string;
143
+ }
144
+
145
+ export type C_true42ae54c0CallTrace = TypedCallTrace<
146
+ [string],
147
+ C_true42ae54c0CallObject
148
+ > &
149
+ Trace;
150
+
151
+ export interface C_true9f3d2211CallObject {
152
+ c__9f3d2211: string;
153
+ }
154
+
155
+ export type C_true9f3d2211CallTrace = TypedCallTrace<
156
+ [string],
157
+ C_true9f3d2211CallObject
158
+ > &
159
+ Trace;
160
+
161
+ export interface C_truebfaab06fCallObject {
162
+ c__bfaab06f: string;
163
+ }
164
+
165
+ export type C_truebfaab06fCallTrace = TypedCallTrace<
166
+ [string],
167
+ C_truebfaab06fCallObject
168
+ > &
169
+ Trace;
170
+
171
+ export interface ChangeOperatorCallObject {
172
+ _newOperator: string;
173
+ }
174
+
175
+ export type ChangeOperatorCallTrace = TypedCallTrace<
176
+ [string],
177
+ ChangeOperatorCallObject
178
+ > &
179
+ Trace;
180
+
181
+ export interface DisableRollupVerifierCallObject {
182
+ _rollupSize: bigint;
183
+ }
184
+
185
+ export type DisableRollupVerifierCallTrace = TypedCallTrace<
186
+ [bigint],
187
+ DisableRollupVerifierCallObject
188
+ > &
189
+ Trace;
190
+
191
+ export interface DisableTransactVerifierCallObject {
192
+ _numInputs: bigint;
193
+ _numOutputs: bigint;
194
+ }
195
+
196
+ export type DisableTransactVerifierCallTrace = TypedCallTrace<
197
+ [bigint, bigint],
198
+ DisableTransactVerifierCallObject
199
+ > &
200
+ Trace;
201
+
202
+ export interface EnableRollupVerifierCallObject {
203
+ _rollupSize: bigint;
204
+ _rollupVerifier: string;
205
+ }
206
+
207
+ export type EnableRollupVerifierCallTrace = TypedCallTrace<
208
+ [bigint, string],
209
+ EnableRollupVerifierCallObject
210
+ > &
211
+ Trace;
212
+
213
+ export interface EnableTransactVerifierCallObject {
214
+ _numInputs: bigint;
215
+ _numOutputs: bigint;
216
+ _transactVerifier: string;
217
+ }
218
+
219
+ export type EnableTransactVerifierCallTrace = TypedCallTrace<
220
+ [bigint, bigint, string],
221
+ EnableTransactVerifierCallObject
222
+ > &
223
+ Trace;
224
+
225
+ export interface EnqueueCallObject {
226
+ _request: ICommitmentPool.CommitmentRequestStructOutput;
227
+ _executor: string;
228
+ }
229
+
230
+ export type EnqueueCallTrace = TypedCallTrace<
231
+ [ICommitmentPool.CommitmentRequestStructOutput, string],
232
+ EnqueueCallObject
233
+ > &
234
+ Trace;
235
+
236
+ export interface GetCommitmentIncludedCountCallObject {}
237
+
238
+ export type GetCommitmentIncludedCountCallTrace = TypedCallTrace<
239
+ [],
240
+ GetCommitmentIncludedCountCallObject
241
+ > &
242
+ Trace;
243
+
244
+ export interface GetMinRollupFeeCallObject {}
245
+
246
+ export type GetMinRollupFeeCallTrace = TypedCallTrace<
247
+ [],
248
+ GetMinRollupFeeCallObject
249
+ > &
250
+ Trace;
251
+
252
+ export interface GetTreeCapacityCallObject {}
253
+
254
+ export type GetTreeCapacityCallTrace = TypedCallTrace<
255
+ [],
256
+ GetTreeCapacityCallObject
257
+ > &
258
+ Trace;
259
+
260
+ export interface IsHistoricCommitmentCallObject {
261
+ _commitment: bigint;
262
+ }
263
+
264
+ export type IsHistoricCommitmentCallTrace = TypedCallTrace<
265
+ [bigint],
266
+ IsHistoricCommitmentCallObject
267
+ > &
268
+ Trace;
269
+
270
+ export interface IsKnownRootCallObject {
271
+ root: bigint;
272
+ }
273
+
274
+ export type IsKnownRootCallTrace = TypedCallTrace<
275
+ [bigint],
276
+ IsKnownRootCallObject
277
+ > &
278
+ Trace;
279
+
280
+ export interface IsRollupWhitelistDisabledCallObject {}
281
+
282
+ export type IsRollupWhitelistDisabledCallTrace = TypedCallTrace<
283
+ [],
284
+ IsRollupWhitelistDisabledCallObject
285
+ > &
286
+ Trace;
287
+
288
+ export interface IsSpentSerialNumberCallObject {
289
+ _serialNumber: bigint;
290
+ }
291
+
292
+ export type IsSpentSerialNumberCallTrace = TypedCallTrace<
293
+ [bigint],
294
+ IsSpentSerialNumberCallObject
295
+ > &
296
+ Trace;
297
+
298
+ export interface IsVerifierUpdateDisabledCallObject {}
299
+
300
+ export type IsVerifierUpdateDisabledCallTrace = TypedCallTrace<
301
+ [],
302
+ IsVerifierUpdateDisabledCallObject
303
+ > &
304
+ Trace;
305
+
306
+ export interface RemoveEnqueueWhitelistCallObject {
307
+ _actor: string;
308
+ }
309
+
310
+ export type RemoveEnqueueWhitelistCallTrace = TypedCallTrace<
311
+ [string],
312
+ RemoveEnqueueWhitelistCallObject
313
+ > &
314
+ Trace;
315
+
316
+ export interface RemoveRollupWhitelistCallObject {
317
+ _roller: string;
318
+ }
319
+
320
+ export type RemoveRollupWhitelistCallTrace = TypedCallTrace<
321
+ [string],
322
+ RemoveRollupWhitelistCallObject
323
+ > &
324
+ Trace;
325
+
326
+ export interface RollupCallObject {
327
+ _request: ICommitmentPool.RollupRequestStructOutput;
328
+ }
329
+
330
+ export type RollupCallTrace = TypedCallTrace<
331
+ [ICommitmentPool.RollupRequestStructOutput],
332
+ RollupCallObject
333
+ > &
334
+ Trace;
335
+
336
+ export interface SanctionsCheckDisabledCallObject {}
337
+
338
+ export type SanctionsCheckDisabledCallTrace = TypedCallTrace<
339
+ [],
340
+ SanctionsCheckDisabledCallObject
341
+ > &
342
+ Trace;
343
+
344
+ export interface SanctionsListCallObject {}
345
+
346
+ export type SanctionsListCallTrace = TypedCallTrace<
347
+ [],
348
+ SanctionsListCallObject
349
+ > &
350
+ Trace;
351
+
352
+ export interface SetMinRollupFeeCallObject {
353
+ _minRollupFee: bigint;
354
+ }
355
+
356
+ export type SetMinRollupFeeCallTrace = TypedCallTrace<
357
+ [bigint],
358
+ SetMinRollupFeeCallObject
359
+ > &
360
+ Trace;
361
+
362
+ export interface SetRollupWhitelistDisabledCallObject {
363
+ _state: boolean;
364
+ }
365
+
366
+ export type SetRollupWhitelistDisabledCallTrace = TypedCallTrace<
367
+ [boolean],
368
+ SetRollupWhitelistDisabledCallObject
369
+ > &
370
+ Trace;
371
+
372
+ export interface SetSanctionCheckDisabledCallObject {
373
+ _state: boolean;
374
+ }
375
+
376
+ export type SetSanctionCheckDisabledCallTrace = TypedCallTrace<
377
+ [boolean],
378
+ SetSanctionCheckDisabledCallObject
379
+ > &
380
+ Trace;
381
+
382
+ export interface SetVerifierUpdateDisabledCallObject {
383
+ _state: boolean;
384
+ }
385
+
386
+ export type SetVerifierUpdateDisabledCallTrace = TypedCallTrace<
387
+ [boolean],
388
+ SetVerifierUpdateDisabledCallObject
389
+ > &
390
+ Trace;
391
+
392
+ export interface TransactCallObject {
393
+ _request: ICommitmentPool.TransactRequestStructOutput;
394
+ _signature: string;
395
+ }
396
+
397
+ export type TransactCallTrace = TypedCallTrace<
398
+ [ICommitmentPool.TransactRequestStructOutput, string],
399
+ TransactCallObject
400
+ > &
401
+ Trace;
402
+
403
+ export interface UpdateSanctionsListAddressCallObject {
404
+ _sanction: string;
405
+ }
406
+
407
+ export type UpdateSanctionsListAddressCallTrace = TypedCallTrace<
408
+ [string],
409
+ UpdateSanctionsListAddressCallObject
410
+ > &
411
+ Trace;
412
+
413
+ const templateContract = CommitmentPool__factory.connect("0x0", DummyProvider);
414
+
415
+ export class CommitmentPoolContractView extends ContractView<CommitmentPool> {
416
+ constructor(contract: CommitmentPool) {
417
+ super(contract);
418
+ }
419
+
420
+ async _pathIndices(
421
+ _fullPath: BigNumberish,
422
+ _rollupSize: BigNumberish,
423
+ overrides?: Overrides
424
+ ): Promise<bigint> {
425
+ try {
426
+ return await this.contract.getFunction("_pathIndices(uint256,uint32)")(
427
+ _fullPath,
428
+ _rollupSize,
429
+ overrides || {}
430
+ );
431
+ } catch (e) {
432
+ throw transformEtherError(e, undefined);
433
+ }
434
+ }
435
+
436
+ async assetType(overrides?: Overrides): Promise<bigint> {
437
+ try {
438
+ return await this.contract.getFunction("assetType()")(overrides || {});
439
+ } catch (e) {
440
+ throw transformEtherError(e, undefined);
441
+ }
442
+ }
443
+
444
+ async c_42ae54c0(
445
+ c__42ae54c0: BytesLike,
446
+ overrides?: Overrides
447
+ ): Promise<void> {
448
+ try {
449
+ return await this.contract.getFunction("c_42ae54c0(bytes8)")(
450
+ c__42ae54c0,
451
+ overrides || {}
452
+ );
453
+ } catch (e) {
454
+ throw transformEtherError(e, undefined);
455
+ }
456
+ }
457
+
458
+ async c_9f3d2211(
459
+ c__9f3d2211: BytesLike,
460
+ overrides?: Overrides
461
+ ): Promise<void> {
462
+ try {
463
+ return await this.contract.getFunction("c_9f3d2211(bytes8)")(
464
+ c__9f3d2211,
465
+ overrides || {}
466
+ );
467
+ } catch (e) {
468
+ throw transformEtherError(e, undefined);
469
+ }
470
+ }
471
+
472
+ async c_bfaab06f(
473
+ c__bfaab06f: BytesLike,
474
+ overrides?: Overrides
475
+ ): Promise<void> {
476
+ try {
477
+ return await this.contract.getFunction("c_bfaab06f(bytes8)")(
478
+ c__bfaab06f,
479
+ overrides || {}
480
+ );
481
+ } catch (e) {
482
+ throw transformEtherError(e, undefined);
483
+ }
484
+ }
485
+
486
+ async c_false42ae54c0(
487
+ c__42ae54c0: BytesLike,
488
+ overrides?: Overrides
489
+ ): Promise<boolean> {
490
+ try {
491
+ return await this.contract.getFunction("c_false42ae54c0(bytes8)")(
492
+ c__42ae54c0,
493
+ overrides || {}
494
+ );
495
+ } catch (e) {
496
+ throw transformEtherError(e, undefined);
497
+ }
498
+ }
499
+
500
+ async c_false9f3d2211(
501
+ c__9f3d2211: BytesLike,
502
+ overrides?: Overrides
503
+ ): Promise<boolean> {
504
+ try {
505
+ return await this.contract.getFunction("c_false9f3d2211(bytes8)")(
506
+ c__9f3d2211,
507
+ overrides || {}
508
+ );
509
+ } catch (e) {
510
+ throw transformEtherError(e, undefined);
511
+ }
512
+ }
513
+
514
+ async c_falsebfaab06f(
515
+ c__bfaab06f: BytesLike,
516
+ overrides?: Overrides
517
+ ): Promise<boolean> {
518
+ try {
519
+ return await this.contract.getFunction("c_falsebfaab06f(bytes8)")(
520
+ c__bfaab06f,
521
+ overrides || {}
522
+ );
523
+ } catch (e) {
524
+ throw transformEtherError(e, undefined);
525
+ }
526
+ }
527
+
528
+ async c_true42ae54c0(
529
+ c__42ae54c0: BytesLike,
530
+ overrides?: Overrides
531
+ ): Promise<boolean> {
532
+ try {
533
+ return await this.contract.getFunction("c_true42ae54c0(bytes8)")(
534
+ c__42ae54c0,
535
+ overrides || {}
536
+ );
537
+ } catch (e) {
538
+ throw transformEtherError(e, undefined);
539
+ }
540
+ }
541
+
542
+ async c_true9f3d2211(
543
+ c__9f3d2211: BytesLike,
544
+ overrides?: Overrides
545
+ ): Promise<boolean> {
546
+ try {
547
+ return await this.contract.getFunction("c_true9f3d2211(bytes8)")(
548
+ c__9f3d2211,
549
+ overrides || {}
550
+ );
551
+ } catch (e) {
552
+ throw transformEtherError(e, undefined);
553
+ }
554
+ }
555
+
556
+ async c_truebfaab06f(
557
+ c__bfaab06f: BytesLike,
558
+ overrides?: Overrides
559
+ ): Promise<boolean> {
560
+ try {
561
+ return await this.contract.getFunction("c_truebfaab06f(bytes8)")(
562
+ c__bfaab06f,
563
+ overrides || {}
564
+ );
565
+ } catch (e) {
566
+ throw transformEtherError(e, undefined);
567
+ }
568
+ }
569
+
570
+ async getCommitmentIncludedCount(overrides?: Overrides): Promise<bigint> {
571
+ try {
572
+ return await this.contract.getFunction("getCommitmentIncludedCount()")(
573
+ overrides || {}
574
+ );
575
+ } catch (e) {
576
+ throw transformEtherError(e, undefined);
577
+ }
578
+ }
579
+
580
+ async getMinRollupFee(overrides?: Overrides): Promise<bigint> {
581
+ try {
582
+ return await this.contract.getFunction("getMinRollupFee()")(
583
+ overrides || {}
584
+ );
585
+ } catch (e) {
586
+ throw transformEtherError(e, undefined);
587
+ }
588
+ }
589
+
590
+ async getTreeCapacity(overrides?: Overrides): Promise<bigint> {
591
+ try {
592
+ return await this.contract.getFunction("getTreeCapacity()")(
593
+ overrides || {}
594
+ );
595
+ } catch (e) {
596
+ throw transformEtherError(e, undefined);
597
+ }
598
+ }
599
+
600
+ async isHistoricCommitment(
601
+ _commitment: BigNumberish,
602
+ overrides?: Overrides
603
+ ): Promise<boolean> {
604
+ try {
605
+ return await this.contract.getFunction("isHistoricCommitment(uint256)")(
606
+ _commitment,
607
+ overrides || {}
608
+ );
609
+ } catch (e) {
610
+ throw transformEtherError(e, undefined);
611
+ }
612
+ }
613
+
614
+ async isKnownRoot(
615
+ root: BigNumberish,
616
+ overrides?: Overrides
617
+ ): Promise<boolean> {
618
+ try {
619
+ return await this.contract.getFunction("isKnownRoot(uint256)")(
620
+ root,
621
+ overrides || {}
622
+ );
623
+ } catch (e) {
624
+ throw transformEtherError(e, undefined);
625
+ }
626
+ }
627
+
628
+ async isRollupWhitelistDisabled(overrides?: Overrides): Promise<boolean> {
629
+ try {
630
+ return await this.contract.getFunction("isRollupWhitelistDisabled()")(
631
+ overrides || {}
632
+ );
633
+ } catch (e) {
634
+ throw transformEtherError(e, undefined);
635
+ }
636
+ }
637
+
638
+ async isSpentSerialNumber(
639
+ _serialNumber: BigNumberish,
640
+ overrides?: Overrides
641
+ ): Promise<boolean> {
642
+ try {
643
+ return await this.contract.getFunction("isSpentSerialNumber(uint256)")(
644
+ _serialNumber,
645
+ overrides || {}
646
+ );
647
+ } catch (e) {
648
+ throw transformEtherError(e, undefined);
649
+ }
650
+ }
651
+
652
+ async isVerifierUpdateDisabled(overrides?: Overrides): Promise<boolean> {
653
+ try {
654
+ return await this.contract.getFunction("isVerifierUpdateDisabled()")(
655
+ overrides || {}
656
+ );
657
+ } catch (e) {
658
+ throw transformEtherError(e, undefined);
659
+ }
660
+ }
661
+
662
+ async sanctionsCheckDisabled(overrides?: Overrides): Promise<boolean> {
663
+ try {
664
+ return await this.contract.getFunction("sanctionsCheckDisabled()")(
665
+ overrides || {}
666
+ );
667
+ } catch (e) {
668
+ throw transformEtherError(e, undefined);
669
+ }
670
+ }
671
+
672
+ async sanctionsList(overrides?: Overrides): Promise<string> {
673
+ try {
674
+ return await this.contract.getFunction("sanctionsList()")(
675
+ overrides || {}
676
+ );
677
+ } catch (e) {
678
+ throw transformEtherError(e, undefined);
679
+ }
680
+ }
681
+ }
682
+
683
+ export class CommitmentPoolBoundContractView extends BoundContractView<
684
+ CommitmentPool,
685
+ CommitmentPoolContractView
686
+ > {
687
+ async _pathIndices(
688
+ _fullPath: BigNumberish,
689
+ _rollupSize: BigNumberish,
690
+ overrides?: Overrides
691
+ ): Promise<bigint> {
692
+ if (!overrides && this.context) {
693
+ overrides = {
694
+ blockTag: toBlockTag(this.context.blockNumber),
695
+ };
696
+ }
697
+ return await this.view._pathIndices(
698
+ _fullPath,
699
+ _rollupSize,
700
+ overrides || {}
701
+ );
702
+ }
703
+
704
+ async assetType(overrides?: Overrides): Promise<bigint> {
705
+ if (!overrides && this.context) {
706
+ overrides = {
707
+ blockTag: toBlockTag(this.context.blockNumber),
708
+ };
709
+ }
710
+ return await this.view.assetType(overrides || {});
711
+ }
712
+
713
+ async c_42ae54c0(
714
+ c__42ae54c0: BytesLike,
715
+ overrides?: Overrides
716
+ ): Promise<void> {
717
+ if (!overrides && this.context) {
718
+ overrides = {
719
+ blockTag: toBlockTag(this.context.blockNumber),
720
+ };
721
+ }
722
+ return await this.view.c_42ae54c0(c__42ae54c0, overrides || {});
723
+ }
724
+
725
+ async c_9f3d2211(
726
+ c__9f3d2211: BytesLike,
727
+ overrides?: Overrides
728
+ ): Promise<void> {
729
+ if (!overrides && this.context) {
730
+ overrides = {
731
+ blockTag: toBlockTag(this.context.blockNumber),
732
+ };
733
+ }
734
+ return await this.view.c_9f3d2211(c__9f3d2211, overrides || {});
735
+ }
736
+
737
+ async c_bfaab06f(
738
+ c__bfaab06f: BytesLike,
739
+ overrides?: Overrides
740
+ ): Promise<void> {
741
+ if (!overrides && this.context) {
742
+ overrides = {
743
+ blockTag: toBlockTag(this.context.blockNumber),
744
+ };
745
+ }
746
+ return await this.view.c_bfaab06f(c__bfaab06f, overrides || {});
747
+ }
748
+
749
+ async c_false42ae54c0(
750
+ c__42ae54c0: BytesLike,
751
+ overrides?: Overrides
752
+ ): Promise<boolean> {
753
+ if (!overrides && this.context) {
754
+ overrides = {
755
+ blockTag: toBlockTag(this.context.blockNumber),
756
+ };
757
+ }
758
+ return await this.view.c_false42ae54c0(c__42ae54c0, overrides || {});
759
+ }
760
+
761
+ async c_false9f3d2211(
762
+ c__9f3d2211: BytesLike,
763
+ overrides?: Overrides
764
+ ): Promise<boolean> {
765
+ if (!overrides && this.context) {
766
+ overrides = {
767
+ blockTag: toBlockTag(this.context.blockNumber),
768
+ };
769
+ }
770
+ return await this.view.c_false9f3d2211(c__9f3d2211, overrides || {});
771
+ }
772
+
773
+ async c_falsebfaab06f(
774
+ c__bfaab06f: BytesLike,
775
+ overrides?: Overrides
776
+ ): Promise<boolean> {
777
+ if (!overrides && this.context) {
778
+ overrides = {
779
+ blockTag: toBlockTag(this.context.blockNumber),
780
+ };
781
+ }
782
+ return await this.view.c_falsebfaab06f(c__bfaab06f, overrides || {});
783
+ }
784
+
785
+ async c_true42ae54c0(
786
+ c__42ae54c0: BytesLike,
787
+ overrides?: Overrides
788
+ ): Promise<boolean> {
789
+ if (!overrides && this.context) {
790
+ overrides = {
791
+ blockTag: toBlockTag(this.context.blockNumber),
792
+ };
793
+ }
794
+ return await this.view.c_true42ae54c0(c__42ae54c0, overrides || {});
795
+ }
796
+
797
+ async c_true9f3d2211(
798
+ c__9f3d2211: BytesLike,
799
+ overrides?: Overrides
800
+ ): Promise<boolean> {
801
+ if (!overrides && this.context) {
802
+ overrides = {
803
+ blockTag: toBlockTag(this.context.blockNumber),
804
+ };
805
+ }
806
+ return await this.view.c_true9f3d2211(c__9f3d2211, overrides || {});
807
+ }
808
+
809
+ async c_truebfaab06f(
810
+ c__bfaab06f: BytesLike,
811
+ overrides?: Overrides
812
+ ): Promise<boolean> {
813
+ if (!overrides && this.context) {
814
+ overrides = {
815
+ blockTag: toBlockTag(this.context.blockNumber),
816
+ };
817
+ }
818
+ return await this.view.c_truebfaab06f(c__bfaab06f, overrides || {});
819
+ }
820
+
821
+ async getCommitmentIncludedCount(overrides?: Overrides): Promise<bigint> {
822
+ if (!overrides && this.context) {
823
+ overrides = {
824
+ blockTag: toBlockTag(this.context.blockNumber),
825
+ };
826
+ }
827
+ return await this.view.getCommitmentIncludedCount(overrides || {});
828
+ }
829
+
830
+ async getMinRollupFee(overrides?: Overrides): Promise<bigint> {
831
+ if (!overrides && this.context) {
832
+ overrides = {
833
+ blockTag: toBlockTag(this.context.blockNumber),
834
+ };
835
+ }
836
+ return await this.view.getMinRollupFee(overrides || {});
837
+ }
838
+
839
+ async getTreeCapacity(overrides?: Overrides): Promise<bigint> {
840
+ if (!overrides && this.context) {
841
+ overrides = {
842
+ blockTag: toBlockTag(this.context.blockNumber),
843
+ };
844
+ }
845
+ return await this.view.getTreeCapacity(overrides || {});
846
+ }
847
+
848
+ async isHistoricCommitment(
849
+ _commitment: BigNumberish,
850
+ overrides?: Overrides
851
+ ): Promise<boolean> {
852
+ if (!overrides && this.context) {
853
+ overrides = {
854
+ blockTag: toBlockTag(this.context.blockNumber),
855
+ };
856
+ }
857
+ return await this.view.isHistoricCommitment(_commitment, overrides || {});
858
+ }
859
+
860
+ async isKnownRoot(
861
+ root: BigNumberish,
862
+ overrides?: Overrides
863
+ ): Promise<boolean> {
864
+ if (!overrides && this.context) {
865
+ overrides = {
866
+ blockTag: toBlockTag(this.context.blockNumber),
867
+ };
868
+ }
869
+ return await this.view.isKnownRoot(root, overrides || {});
870
+ }
871
+
872
+ async isRollupWhitelistDisabled(overrides?: Overrides): Promise<boolean> {
873
+ if (!overrides && this.context) {
874
+ overrides = {
875
+ blockTag: toBlockTag(this.context.blockNumber),
876
+ };
877
+ }
878
+ return await this.view.isRollupWhitelistDisabled(overrides || {});
879
+ }
880
+
881
+ async isSpentSerialNumber(
882
+ _serialNumber: BigNumberish,
883
+ overrides?: Overrides
884
+ ): Promise<boolean> {
885
+ if (!overrides && this.context) {
886
+ overrides = {
887
+ blockTag: toBlockTag(this.context.blockNumber),
888
+ };
889
+ }
890
+ return await this.view.isSpentSerialNumber(_serialNumber, overrides || {});
891
+ }
892
+
893
+ async isVerifierUpdateDisabled(overrides?: Overrides): Promise<boolean> {
894
+ if (!overrides && this.context) {
895
+ overrides = {
896
+ blockTag: toBlockTag(this.context.blockNumber),
897
+ };
898
+ }
899
+ return await this.view.isVerifierUpdateDisabled(overrides || {});
900
+ }
901
+
902
+ async sanctionsCheckDisabled(overrides?: Overrides): Promise<boolean> {
903
+ if (!overrides && this.context) {
904
+ overrides = {
905
+ blockTag: toBlockTag(this.context.blockNumber),
906
+ };
907
+ }
908
+ return await this.view.sanctionsCheckDisabled(overrides || {});
909
+ }
910
+
911
+ async sanctionsList(overrides?: Overrides): Promise<string> {
912
+ if (!overrides && this.context) {
913
+ overrides = {
914
+ blockTag: toBlockTag(this.context.blockNumber),
915
+ };
916
+ }
917
+ return await this.view.sanctionsList(overrides || {});
918
+ }
919
+ }
920
+
921
+ export type CommitmentPoolContext = ContractContext<
922
+ CommitmentPool,
923
+ CommitmentPoolBoundContractView
924
+ >;
925
+
926
+ export class CommitmentPoolProcessor extends BaseProcessor<
927
+ CommitmentPool,
928
+ CommitmentPoolBoundContractView
929
+ > {
930
+ onEventCommitmentIncluded(
931
+ handler: (
932
+ event: CommitmentIncludedEvent,
933
+ ctx: CommitmentPoolContext
934
+ ) => void,
935
+ filter?: CommitmentIncludedEventFilter | CommitmentIncludedEventFilter[],
936
+ fetchConfig?: EthFetchConfig
937
+ ) {
938
+ if (!filter) {
939
+ filter = templateContract.filters["CommitmentIncluded(uint256)"](null);
940
+ }
941
+ return super.onEvent(handler, filter!, fetchConfig);
942
+ }
943
+
944
+ onEventCommitmentQueued(
945
+ handler: (event: CommitmentQueuedEvent, ctx: CommitmentPoolContext) => void,
946
+ filter?: CommitmentQueuedEventFilter | CommitmentQueuedEventFilter[],
947
+ fetchConfig?: EthFetchConfig
948
+ ) {
949
+ if (!filter) {
950
+ filter = templateContract.filters[
951
+ "CommitmentQueued(uint256,uint256,uint256,bytes)"
952
+ ](null, null, null, null);
953
+ }
954
+ return super.onEvent(handler, filter!, fetchConfig);
955
+ }
956
+
957
+ onEventCommitmentSpent(
958
+ handler: (event: CommitmentSpentEvent, ctx: CommitmentPoolContext) => void,
959
+ filter?: CommitmentSpentEventFilter | CommitmentSpentEventFilter[],
960
+ fetchConfig?: EthFetchConfig
961
+ ) {
962
+ if (!filter) {
963
+ filter = templateContract.filters["CommitmentSpent(uint256,uint256)"](
964
+ null,
965
+ null
966
+ );
967
+ }
968
+ return super.onEvent(handler, filter!, fetchConfig);
969
+ }
970
+
971
+ onEventRollupWhitelistDisabled(
972
+ handler: (
973
+ event: RollupWhitelistDisabledEvent,
974
+ ctx: CommitmentPoolContext
975
+ ) => void,
976
+ filter?:
977
+ | RollupWhitelistDisabledEventFilter
978
+ | RollupWhitelistDisabledEventFilter[],
979
+ fetchConfig?: EthFetchConfig
980
+ ) {
981
+ if (!filter) {
982
+ filter = templateContract.filters["RollupWhitelistDisabled(bool)"](null);
983
+ }
984
+ return super.onEvent(handler, filter!, fetchConfig);
985
+ }
986
+
987
+ onEventSanctionsCheckDisabled(
988
+ handler: (
989
+ event: SanctionsCheckDisabledEvent,
990
+ ctx: CommitmentPoolContext
991
+ ) => void,
992
+ filter?:
993
+ | SanctionsCheckDisabledEventFilter
994
+ | SanctionsCheckDisabledEventFilter[],
995
+ fetchConfig?: EthFetchConfig
996
+ ) {
997
+ if (!filter) {
998
+ filter = templateContract.filters["SanctionsCheckDisabled(bool)"](null);
999
+ }
1000
+ return super.onEvent(handler, filter!, fetchConfig);
1001
+ }
1002
+
1003
+ onEventSanctionsList(
1004
+ handler: (event: SanctionsListEvent, ctx: CommitmentPoolContext) => void,
1005
+ filter?: SanctionsListEventFilter | SanctionsListEventFilter[],
1006
+ fetchConfig?: EthFetchConfig
1007
+ ) {
1008
+ if (!filter) {
1009
+ filter = templateContract.filters["SanctionsList(address)"](null);
1010
+ }
1011
+ return super.onEvent(handler, filter!, fetchConfig);
1012
+ }
1013
+
1014
+ onEventVerifierUpdateDisabled(
1015
+ handler: (
1016
+ event: VerifierUpdateDisabledEvent,
1017
+ ctx: CommitmentPoolContext
1018
+ ) => void,
1019
+ filter?:
1020
+ | VerifierUpdateDisabledEventFilter
1021
+ | VerifierUpdateDisabledEventFilter[],
1022
+ fetchConfig?: EthFetchConfig
1023
+ ) {
1024
+ if (!filter) {
1025
+ filter = templateContract.filters["VerifierUpdateDisabled(bool)"](null);
1026
+ }
1027
+ return super.onEvent(handler, filter!, fetchConfig);
1028
+ }
1029
+
1030
+ onCall_pathIndices(
1031
+ handler: (call: _pathIndicesCallTrace, ctx: CommitmentPoolContext) => void,
1032
+ fetchConfig?: EthFetchConfig
1033
+ ) {
1034
+ return super.onTrace("0xf2da1d41", handler, fetchConfig);
1035
+ }
1036
+
1037
+ onCallAddEnqueueWhitelist(
1038
+ handler: (
1039
+ call: AddEnqueueWhitelistCallTrace,
1040
+ ctx: CommitmentPoolContext
1041
+ ) => void,
1042
+ fetchConfig?: EthFetchConfig
1043
+ ) {
1044
+ return super.onTrace("0xa9b1d296", handler, fetchConfig);
1045
+ }
1046
+
1047
+ onCallAddRollupWhitelist(
1048
+ handler: (
1049
+ call: AddRollupWhitelistCallTrace,
1050
+ ctx: CommitmentPoolContext
1051
+ ) => void,
1052
+ fetchConfig?: EthFetchConfig
1053
+ ) {
1054
+ return super.onTrace("0x02d498f1", handler, fetchConfig);
1055
+ }
1056
+
1057
+ onCallAssetType(
1058
+ handler: (call: AssetTypeCallTrace, ctx: CommitmentPoolContext) => void,
1059
+ fetchConfig?: EthFetchConfig
1060
+ ) {
1061
+ return super.onTrace("0x3fe3347a", handler, fetchConfig);
1062
+ }
1063
+
1064
+ onCallC_42ae54c0(
1065
+ handler: (call: C_42ae54c0CallTrace, ctx: CommitmentPoolContext) => void,
1066
+ fetchConfig?: EthFetchConfig
1067
+ ) {
1068
+ return super.onTrace("0x3ffe6145", handler, fetchConfig);
1069
+ }
1070
+
1071
+ onCallC_9f3d2211(
1072
+ handler: (call: C_9f3d2211CallTrace, ctx: CommitmentPoolContext) => void,
1073
+ fetchConfig?: EthFetchConfig
1074
+ ) {
1075
+ return super.onTrace("0xca32fa71", handler, fetchConfig);
1076
+ }
1077
+
1078
+ onCallC_bfaab06f(
1079
+ handler: (call: C_bfaab06fCallTrace, ctx: CommitmentPoolContext) => void,
1080
+ fetchConfig?: EthFetchConfig
1081
+ ) {
1082
+ return super.onTrace("0x5276cbc6", handler, fetchConfig);
1083
+ }
1084
+
1085
+ onCallC_false42ae54c0(
1086
+ handler: (
1087
+ call: C_false42ae54c0CallTrace,
1088
+ ctx: CommitmentPoolContext
1089
+ ) => void,
1090
+ fetchConfig?: EthFetchConfig
1091
+ ) {
1092
+ return super.onTrace("0x0c73af41", handler, fetchConfig);
1093
+ }
1094
+
1095
+ onCallC_false9f3d2211(
1096
+ handler: (
1097
+ call: C_false9f3d2211CallTrace,
1098
+ ctx: CommitmentPoolContext
1099
+ ) => void,
1100
+ fetchConfig?: EthFetchConfig
1101
+ ) {
1102
+ return super.onTrace("0x53cab856", handler, fetchConfig);
1103
+ }
1104
+
1105
+ onCallC_falsebfaab06f(
1106
+ handler: (
1107
+ call: C_falsebfaab06fCallTrace,
1108
+ ctx: CommitmentPoolContext
1109
+ ) => void,
1110
+ fetchConfig?: EthFetchConfig
1111
+ ) {
1112
+ return super.onTrace("0xddfa5bb7", handler, fetchConfig);
1113
+ }
1114
+
1115
+ onCallC_true42ae54c0(
1116
+ handler: (
1117
+ call: C_true42ae54c0CallTrace,
1118
+ ctx: CommitmentPoolContext
1119
+ ) => void,
1120
+ fetchConfig?: EthFetchConfig
1121
+ ) {
1122
+ return super.onTrace("0xa31f44af", handler, fetchConfig);
1123
+ }
1124
+
1125
+ onCallC_true9f3d2211(
1126
+ handler: (
1127
+ call: C_true9f3d2211CallTrace,
1128
+ ctx: CommitmentPoolContext
1129
+ ) => void,
1130
+ fetchConfig?: EthFetchConfig
1131
+ ) {
1132
+ return super.onTrace("0x1e8c4757", handler, fetchConfig);
1133
+ }
1134
+
1135
+ onCallC_truebfaab06f(
1136
+ handler: (
1137
+ call: C_truebfaab06fCallTrace,
1138
+ ctx: CommitmentPoolContext
1139
+ ) => void,
1140
+ fetchConfig?: EthFetchConfig
1141
+ ) {
1142
+ return super.onTrace("0xf9c3ad08", handler, fetchConfig);
1143
+ }
1144
+
1145
+ onCallChangeOperator(
1146
+ handler: (
1147
+ call: ChangeOperatorCallTrace,
1148
+ ctx: CommitmentPoolContext
1149
+ ) => void,
1150
+ fetchConfig?: EthFetchConfig
1151
+ ) {
1152
+ return super.onTrace("0x06394c9b", handler, fetchConfig);
1153
+ }
1154
+
1155
+ onCallDisableRollupVerifier(
1156
+ handler: (
1157
+ call: DisableRollupVerifierCallTrace,
1158
+ ctx: CommitmentPoolContext
1159
+ ) => void,
1160
+ fetchConfig?: EthFetchConfig
1161
+ ) {
1162
+ return super.onTrace("0x9b0a6fea", handler, fetchConfig);
1163
+ }
1164
+
1165
+ onCallDisableTransactVerifier(
1166
+ handler: (
1167
+ call: DisableTransactVerifierCallTrace,
1168
+ ctx: CommitmentPoolContext
1169
+ ) => void,
1170
+ fetchConfig?: EthFetchConfig
1171
+ ) {
1172
+ return super.onTrace("0xc259e2e6", handler, fetchConfig);
1173
+ }
1174
+
1175
+ onCallEnableRollupVerifier(
1176
+ handler: (
1177
+ call: EnableRollupVerifierCallTrace,
1178
+ ctx: CommitmentPoolContext
1179
+ ) => void,
1180
+ fetchConfig?: EthFetchConfig
1181
+ ) {
1182
+ return super.onTrace("0xdeeff7cd", handler, fetchConfig);
1183
+ }
1184
+
1185
+ onCallEnableTransactVerifier(
1186
+ handler: (
1187
+ call: EnableTransactVerifierCallTrace,
1188
+ ctx: CommitmentPoolContext
1189
+ ) => void,
1190
+ fetchConfig?: EthFetchConfig
1191
+ ) {
1192
+ return super.onTrace("0x7fa4b09c", handler, fetchConfig);
1193
+ }
1194
+
1195
+ onCallEnqueue(
1196
+ handler: (call: EnqueueCallTrace, ctx: CommitmentPoolContext) => void,
1197
+ fetchConfig?: EthFetchConfig
1198
+ ) {
1199
+ return super.onTrace("0x78d60cd7", handler, fetchConfig);
1200
+ }
1201
+
1202
+ onCallGetCommitmentIncludedCount(
1203
+ handler: (
1204
+ call: GetCommitmentIncludedCountCallTrace,
1205
+ ctx: CommitmentPoolContext
1206
+ ) => void,
1207
+ fetchConfig?: EthFetchConfig
1208
+ ) {
1209
+ return super.onTrace("0xe500f504", handler, fetchConfig);
1210
+ }
1211
+
1212
+ onCallGetMinRollupFee(
1213
+ handler: (
1214
+ call: GetMinRollupFeeCallTrace,
1215
+ ctx: CommitmentPoolContext
1216
+ ) => void,
1217
+ fetchConfig?: EthFetchConfig
1218
+ ) {
1219
+ return super.onTrace("0xb08892d0", handler, fetchConfig);
1220
+ }
1221
+
1222
+ onCallGetTreeCapacity(
1223
+ handler: (
1224
+ call: GetTreeCapacityCallTrace,
1225
+ ctx: CommitmentPoolContext
1226
+ ) => void,
1227
+ fetchConfig?: EthFetchConfig
1228
+ ) {
1229
+ return super.onTrace("0x484eb652", handler, fetchConfig);
1230
+ }
1231
+
1232
+ onCallIsHistoricCommitment(
1233
+ handler: (
1234
+ call: IsHistoricCommitmentCallTrace,
1235
+ ctx: CommitmentPoolContext
1236
+ ) => void,
1237
+ fetchConfig?: EthFetchConfig
1238
+ ) {
1239
+ return super.onTrace("0x57060016", handler, fetchConfig);
1240
+ }
1241
+
1242
+ onCallIsKnownRoot(
1243
+ handler: (call: IsKnownRootCallTrace, ctx: CommitmentPoolContext) => void,
1244
+ fetchConfig?: EthFetchConfig
1245
+ ) {
1246
+ return super.onTrace("0xa6232a93", handler, fetchConfig);
1247
+ }
1248
+
1249
+ onCallIsRollupWhitelistDisabled(
1250
+ handler: (
1251
+ call: IsRollupWhitelistDisabledCallTrace,
1252
+ ctx: CommitmentPoolContext
1253
+ ) => void,
1254
+ fetchConfig?: EthFetchConfig
1255
+ ) {
1256
+ return super.onTrace("0xffa89b88", handler, fetchConfig);
1257
+ }
1258
+
1259
+ onCallIsSpentSerialNumber(
1260
+ handler: (
1261
+ call: IsSpentSerialNumberCallTrace,
1262
+ ctx: CommitmentPoolContext
1263
+ ) => void,
1264
+ fetchConfig?: EthFetchConfig
1265
+ ) {
1266
+ return super.onTrace("0x3bb8d1b4", handler, fetchConfig);
1267
+ }
1268
+
1269
+ onCallIsVerifierUpdateDisabled(
1270
+ handler: (
1271
+ call: IsVerifierUpdateDisabledCallTrace,
1272
+ ctx: CommitmentPoolContext
1273
+ ) => void,
1274
+ fetchConfig?: EthFetchConfig
1275
+ ) {
1276
+ return super.onTrace("0x4eb069f7", handler, fetchConfig);
1277
+ }
1278
+
1279
+ onCallRemoveEnqueueWhitelist(
1280
+ handler: (
1281
+ call: RemoveEnqueueWhitelistCallTrace,
1282
+ ctx: CommitmentPoolContext
1283
+ ) => void,
1284
+ fetchConfig?: EthFetchConfig
1285
+ ) {
1286
+ return super.onTrace("0x03db9874", handler, fetchConfig);
1287
+ }
1288
+
1289
+ onCallRemoveRollupWhitelist(
1290
+ handler: (
1291
+ call: RemoveRollupWhitelistCallTrace,
1292
+ ctx: CommitmentPoolContext
1293
+ ) => void,
1294
+ fetchConfig?: EthFetchConfig
1295
+ ) {
1296
+ return super.onTrace("0x9cc6b354", handler, fetchConfig);
1297
+ }
1298
+
1299
+ onCallRollup(
1300
+ handler: (call: RollupCallTrace, ctx: CommitmentPoolContext) => void,
1301
+ fetchConfig?: EthFetchConfig
1302
+ ) {
1303
+ return super.onTrace("0x14a7737d", handler, fetchConfig);
1304
+ }
1305
+
1306
+ onCallSanctionsCheckDisabled(
1307
+ handler: (
1308
+ call: SanctionsCheckDisabledCallTrace,
1309
+ ctx: CommitmentPoolContext
1310
+ ) => void,
1311
+ fetchConfig?: EthFetchConfig
1312
+ ) {
1313
+ return super.onTrace("0x830d9ebe", handler, fetchConfig);
1314
+ }
1315
+
1316
+ onCallSanctionsList(
1317
+ handler: (call: SanctionsListCallTrace, ctx: CommitmentPoolContext) => void,
1318
+ fetchConfig?: EthFetchConfig
1319
+ ) {
1320
+ return super.onTrace("0xec571c6a", handler, fetchConfig);
1321
+ }
1322
+
1323
+ onCallSetMinRollupFee(
1324
+ handler: (
1325
+ call: SetMinRollupFeeCallTrace,
1326
+ ctx: CommitmentPoolContext
1327
+ ) => void,
1328
+ fetchConfig?: EthFetchConfig
1329
+ ) {
1330
+ return super.onTrace("0x7cbf0ff6", handler, fetchConfig);
1331
+ }
1332
+
1333
+ onCallSetRollupWhitelistDisabled(
1334
+ handler: (
1335
+ call: SetRollupWhitelistDisabledCallTrace,
1336
+ ctx: CommitmentPoolContext
1337
+ ) => void,
1338
+ fetchConfig?: EthFetchConfig
1339
+ ) {
1340
+ return super.onTrace("0xf8f05388", handler, fetchConfig);
1341
+ }
1342
+
1343
+ onCallSetSanctionCheckDisabled(
1344
+ handler: (
1345
+ call: SetSanctionCheckDisabledCallTrace,
1346
+ ctx: CommitmentPoolContext
1347
+ ) => void,
1348
+ fetchConfig?: EthFetchConfig
1349
+ ) {
1350
+ return super.onTrace("0x06b2ad59", handler, fetchConfig);
1351
+ }
1352
+
1353
+ onCallSetVerifierUpdateDisabled(
1354
+ handler: (
1355
+ call: SetVerifierUpdateDisabledCallTrace,
1356
+ ctx: CommitmentPoolContext
1357
+ ) => void,
1358
+ fetchConfig?: EthFetchConfig
1359
+ ) {
1360
+ return super.onTrace("0xb3b75631", handler, fetchConfig);
1361
+ }
1362
+
1363
+ onCallTransact(
1364
+ handler: (call: TransactCallTrace, ctx: CommitmentPoolContext) => void,
1365
+ fetchConfig?: EthFetchConfig
1366
+ ) {
1367
+ return super.onTrace("0x3fae882e", handler, fetchConfig);
1368
+ }
1369
+
1370
+ onCallUpdateSanctionsListAddress(
1371
+ handler: (
1372
+ call: UpdateSanctionsListAddressCallTrace,
1373
+ ctx: CommitmentPoolContext
1374
+ ) => void,
1375
+ fetchConfig?: EthFetchConfig
1376
+ ) {
1377
+ return super.onTrace("0x30f49cac", handler, fetchConfig);
1378
+ }
1379
+
1380
+ public static filters = {
1381
+ CommitmentIncluded(commitment?: BigNumberish | null) {
1382
+ return templateContract.filters["CommitmentIncluded(uint256)"](
1383
+ commitment
1384
+ );
1385
+ },
1386
+ CommitmentQueued(
1387
+ commitment?: BigNumberish | null,
1388
+ rollupFee?: null,
1389
+ leafIndex?: null,
1390
+ encryptedNote?: null
1391
+ ) {
1392
+ return templateContract.filters[
1393
+ "CommitmentQueued(uint256,uint256,uint256,bytes)"
1394
+ ](commitment, rollupFee, leafIndex, encryptedNote);
1395
+ },
1396
+ CommitmentSpent(
1397
+ rootHash?: BigNumberish | null,
1398
+ serialNumber?: BigNumberish | null
1399
+ ) {
1400
+ return templateContract.filters["CommitmentSpent(uint256,uint256)"](
1401
+ rootHash,
1402
+ serialNumber
1403
+ );
1404
+ },
1405
+ RollupWhitelistDisabled(state?: null) {
1406
+ return templateContract.filters["RollupWhitelistDisabled(bool)"](state);
1407
+ },
1408
+ SanctionsCheckDisabled(state?: null) {
1409
+ return templateContract.filters["SanctionsCheckDisabled(bool)"](state);
1410
+ },
1411
+ SanctionsList(sanctions?: null) {
1412
+ return templateContract.filters["SanctionsList(address)"](sanctions);
1413
+ },
1414
+ VerifierUpdateDisabled(state?: null) {
1415
+ return templateContract.filters["VerifierUpdateDisabled(bool)"](state);
1416
+ },
1417
+ };
1418
+
1419
+ protected CreateBoundContractView(): CommitmentPoolBoundContractView {
1420
+ const view = getCommitmentPoolContract(
1421
+ this.config.address,
1422
+ this.config.network
1423
+ );
1424
+ return new CommitmentPoolBoundContractView(this.config.address, view);
1425
+ }
1426
+
1427
+ public static bind(options: BindOptions): CommitmentPoolProcessor {
1428
+ if (!options.name) {
1429
+ options.name = "CommitmentPool";
1430
+ }
1431
+ let processor = getProcessor(options) as CommitmentPoolProcessor;
1432
+ if (!processor) {
1433
+ processor = new CommitmentPoolProcessor(options);
1434
+ addProcessor(options, processor);
1435
+ }
1436
+ return processor;
1437
+ }
1438
+ }
1439
+
1440
+ export class CommitmentPoolProcessorTemplate extends BaseProcessorTemplate<
1441
+ CommitmentPool,
1442
+ CommitmentPoolBoundContractView
1443
+ > {
1444
+ bindInternal(options: BindOptions) {
1445
+ if (!options.name) {
1446
+ options.name = "CommitmentPool";
1447
+ }
1448
+ let processor = getProcessor(options) as CommitmentPoolProcessor;
1449
+ if (!processor) {
1450
+ processor = new CommitmentPoolProcessor(options);
1451
+ addProcessor(options, processor);
1452
+ }
1453
+ return processor;
1454
+ }
1455
+
1456
+ onEventCommitmentIncluded(
1457
+ handler: (
1458
+ event: CommitmentIncludedEvent,
1459
+ ctx: CommitmentPoolContext
1460
+ ) => void,
1461
+ filter?: CommitmentIncludedEventFilter | CommitmentIncludedEventFilter[],
1462
+ fetchConfig?: EthFetchConfig
1463
+ ) {
1464
+ if (!filter) {
1465
+ filter = templateContract.filters["CommitmentIncluded(uint256)"](null);
1466
+ }
1467
+ return super.onEvent(handler, filter!, fetchConfig);
1468
+ }
1469
+
1470
+ onEventCommitmentQueued(
1471
+ handler: (event: CommitmentQueuedEvent, ctx: CommitmentPoolContext) => void,
1472
+ filter?: CommitmentQueuedEventFilter | CommitmentQueuedEventFilter[],
1473
+ fetchConfig?: EthFetchConfig
1474
+ ) {
1475
+ if (!filter) {
1476
+ filter = templateContract.filters[
1477
+ "CommitmentQueued(uint256,uint256,uint256,bytes)"
1478
+ ](null, null, null, null);
1479
+ }
1480
+ return super.onEvent(handler, filter!, fetchConfig);
1481
+ }
1482
+
1483
+ onEventCommitmentSpent(
1484
+ handler: (event: CommitmentSpentEvent, ctx: CommitmentPoolContext) => void,
1485
+ filter?: CommitmentSpentEventFilter | CommitmentSpentEventFilter[],
1486
+ fetchConfig?: EthFetchConfig
1487
+ ) {
1488
+ if (!filter) {
1489
+ filter = templateContract.filters["CommitmentSpent(uint256,uint256)"](
1490
+ null,
1491
+ null
1492
+ );
1493
+ }
1494
+ return super.onEvent(handler, filter!, fetchConfig);
1495
+ }
1496
+
1497
+ onEventRollupWhitelistDisabled(
1498
+ handler: (
1499
+ event: RollupWhitelistDisabledEvent,
1500
+ ctx: CommitmentPoolContext
1501
+ ) => void,
1502
+ filter?:
1503
+ | RollupWhitelistDisabledEventFilter
1504
+ | RollupWhitelistDisabledEventFilter[],
1505
+ fetchConfig?: EthFetchConfig
1506
+ ) {
1507
+ if (!filter) {
1508
+ filter = templateContract.filters["RollupWhitelistDisabled(bool)"](null);
1509
+ }
1510
+ return super.onEvent(handler, filter!, fetchConfig);
1511
+ }
1512
+
1513
+ onEventSanctionsCheckDisabled(
1514
+ handler: (
1515
+ event: SanctionsCheckDisabledEvent,
1516
+ ctx: CommitmentPoolContext
1517
+ ) => void,
1518
+ filter?:
1519
+ | SanctionsCheckDisabledEventFilter
1520
+ | SanctionsCheckDisabledEventFilter[],
1521
+ fetchConfig?: EthFetchConfig
1522
+ ) {
1523
+ if (!filter) {
1524
+ filter = templateContract.filters["SanctionsCheckDisabled(bool)"](null);
1525
+ }
1526
+ return super.onEvent(handler, filter!, fetchConfig);
1527
+ }
1528
+
1529
+ onEventSanctionsList(
1530
+ handler: (event: SanctionsListEvent, ctx: CommitmentPoolContext) => void,
1531
+ filter?: SanctionsListEventFilter | SanctionsListEventFilter[],
1532
+ fetchConfig?: EthFetchConfig
1533
+ ) {
1534
+ if (!filter) {
1535
+ filter = templateContract.filters["SanctionsList(address)"](null);
1536
+ }
1537
+ return super.onEvent(handler, filter!, fetchConfig);
1538
+ }
1539
+
1540
+ onEventVerifierUpdateDisabled(
1541
+ handler: (
1542
+ event: VerifierUpdateDisabledEvent,
1543
+ ctx: CommitmentPoolContext
1544
+ ) => void,
1545
+ filter?:
1546
+ | VerifierUpdateDisabledEventFilter
1547
+ | VerifierUpdateDisabledEventFilter[],
1548
+ fetchConfig?: EthFetchConfig
1549
+ ) {
1550
+ if (!filter) {
1551
+ filter = templateContract.filters["VerifierUpdateDisabled(bool)"](null);
1552
+ }
1553
+ return super.onEvent(handler, filter!, fetchConfig);
1554
+ }
1555
+ }
1556
+
1557
+ export function getCommitmentPoolContract(
1558
+ address: string,
1559
+ network: Networkish = 1
1560
+ ): CommitmentPoolContractView {
1561
+ let contract = getContractByABI(
1562
+ "CommitmentPool",
1563
+ address,
1564
+ network
1565
+ ) as CommitmentPoolContractView;
1566
+ if (!contract) {
1567
+ const rawContract = CommitmentPool__factory.connect(
1568
+ address,
1569
+ getProvider(network)
1570
+ );
1571
+ contract = new CommitmentPoolContractView(rawContract);
1572
+ addContractByABI("CommitmentPool", address, network, contract);
1573
+ }
1574
+ return contract;
1575
+ }