@boostxyz/sdk 0.0.0-alpha.2 → 0.0.0-alpha.20

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 (271) hide show
  1. package/dist/Actions/Action.cjs +2 -1
  2. package/dist/Actions/Action.cjs.map +1 -0
  3. package/dist/Actions/Action.d.ts +1 -1
  4. package/dist/Actions/Action.d.ts.map +1 -1
  5. package/dist/Actions/Action.js +14 -12
  6. package/dist/Actions/Action.js.map +1 -0
  7. package/dist/Actions/ContractAction.d.ts +57 -14
  8. package/dist/Actions/ContractAction.d.ts.map +1 -1
  9. package/dist/Actions/ERC721MintAction.d.ts +50 -23
  10. package/dist/Actions/ERC721MintAction.d.ts.map +1 -1
  11. package/dist/Actions/EventAction.cjs +2 -1
  12. package/dist/Actions/EventAction.cjs.map +1 -0
  13. package/dist/Actions/EventAction.d.ts +405 -36
  14. package/dist/Actions/EventAction.d.ts.map +1 -1
  15. package/dist/Actions/EventAction.js +15 -209
  16. package/dist/Actions/EventAction.js.map +1 -0
  17. package/dist/AllowLists/AllowList.cjs +2 -1
  18. package/dist/AllowLists/AllowList.cjs.map +1 -0
  19. package/dist/AllowLists/AllowList.d.ts +6 -5
  20. package/dist/AllowLists/AllowList.d.ts.map +1 -1
  21. package/dist/AllowLists/AllowList.js +46 -22
  22. package/dist/AllowLists/AllowList.js.map +1 -0
  23. package/dist/AllowLists/OpenAllowList.d.ts +423 -0
  24. package/dist/AllowLists/OpenAllowList.d.ts.map +1 -0
  25. package/dist/AllowLists/SimpleAllowList.cjs +2 -1
  26. package/dist/AllowLists/SimpleAllowList.cjs.map +1 -0
  27. package/dist/AllowLists/SimpleAllowList.d.ts +124 -40
  28. package/dist/AllowLists/SimpleAllowList.d.ts.map +1 -1
  29. package/dist/AllowLists/SimpleAllowList.js +77 -77
  30. package/dist/AllowLists/SimpleAllowList.js.map +1 -0
  31. package/dist/AllowLists/SimpleDenyList.cjs +2 -1
  32. package/dist/AllowLists/SimpleDenyList.cjs.map +1 -0
  33. package/dist/AllowLists/SimpleDenyList.d.ts +234 -13
  34. package/dist/AllowLists/SimpleDenyList.d.ts.map +1 -1
  35. package/dist/AllowLists/SimpleDenyList.js +12 -200
  36. package/dist/AllowLists/SimpleDenyList.js.map +1 -0
  37. package/dist/Auth/Auth.cjs +1 -0
  38. package/dist/Auth/Auth.cjs.map +1 -0
  39. package/dist/Auth/Auth.js +1 -0
  40. package/dist/Auth/Auth.js.map +1 -0
  41. package/dist/Auth/PassthroughAuth.cjs +2 -1
  42. package/dist/Auth/PassthroughAuth.cjs.map +1 -0
  43. package/dist/Auth/PassthroughAuth.js +5 -4
  44. package/dist/Auth/PassthroughAuth.js.map +1 -0
  45. package/dist/Boost.cjs +2 -1
  46. package/dist/Boost.cjs.map +1 -0
  47. package/dist/Boost.d.ts +111 -1
  48. package/dist/Boost.d.ts.map +1 -1
  49. package/dist/Boost.js +140 -5
  50. package/dist/Boost.js.map +1 -0
  51. package/dist/BoostCore-3-U1xTQN.cjs +3 -0
  52. package/dist/BoostCore-3-U1xTQN.cjs.map +1 -0
  53. package/dist/BoostCore-DVGBUr2y.js +1477 -0
  54. package/dist/BoostCore-DVGBUr2y.js.map +1 -0
  55. package/dist/BoostCore.cjs +2 -2
  56. package/dist/BoostCore.cjs.map +1 -0
  57. package/dist/BoostCore.d.ts +166 -43
  58. package/dist/BoostCore.d.ts.map +1 -1
  59. package/dist/BoostCore.js +30 -1103
  60. package/dist/BoostCore.js.map +1 -0
  61. package/dist/BoostRegistry.cjs +2 -1
  62. package/dist/BoostRegistry.cjs.map +1 -0
  63. package/dist/BoostRegistry.d.ts +64 -23
  64. package/dist/BoostRegistry.d.ts.map +1 -1
  65. package/dist/BoostRegistry.js +162 -88
  66. package/dist/BoostRegistry.js.map +1 -0
  67. package/dist/Budgets/Budget.cjs +2 -1
  68. package/dist/Budgets/Budget.cjs.map +1 -0
  69. package/dist/Budgets/Budget.d.ts +1 -1
  70. package/dist/Budgets/Budget.d.ts.map +1 -1
  71. package/dist/Budgets/Budget.js +15 -13
  72. package/dist/Budgets/Budget.js.map +1 -0
  73. package/dist/Budgets/ManagedBudget.cjs +2 -1
  74. package/dist/Budgets/ManagedBudget.cjs.map +1 -0
  75. package/dist/Budgets/ManagedBudget.d.ts +78 -188
  76. package/dist/Budgets/ManagedBudget.d.ts.map +1 -1
  77. package/dist/Budgets/ManagedBudget.js +86 -286
  78. package/dist/Budgets/ManagedBudget.js.map +1 -0
  79. package/dist/Budgets/VestingBudget.d.ts +243 -87
  80. package/dist/Budgets/VestingBudget.d.ts.map +1 -1
  81. package/dist/Deployable/Contract.cjs +2 -1
  82. package/dist/Deployable/Contract.cjs.map +1 -0
  83. package/dist/Deployable/Contract.d.ts +4 -5
  84. package/dist/Deployable/Contract.d.ts.map +1 -1
  85. package/dist/Deployable/Contract.js +7 -8
  86. package/dist/Deployable/Contract.js.map +1 -0
  87. package/dist/Deployable/Deployable.cjs +1 -0
  88. package/dist/Deployable/Deployable.cjs.map +1 -0
  89. package/dist/Deployable/Deployable.d.ts +9 -3
  90. package/dist/Deployable/Deployable.d.ts.map +1 -1
  91. package/dist/Deployable/Deployable.js +10 -5
  92. package/dist/Deployable/Deployable.js.map +1 -0
  93. package/dist/Deployable/DeployableTarget.cjs +2 -1
  94. package/dist/Deployable/DeployableTarget.cjs.map +1 -0
  95. package/dist/Deployable/DeployableTarget.d.ts +16 -15
  96. package/dist/Deployable/DeployableTarget.d.ts.map +1 -1
  97. package/dist/Deployable/DeployableTarget.js +49 -42
  98. package/dist/Deployable/DeployableTarget.js.map +1 -0
  99. package/dist/Deployable/DeployableTargetWithRBAC.cjs +2 -0
  100. package/dist/Deployable/DeployableTargetWithRBAC.cjs.map +1 -0
  101. package/dist/Deployable/DeployableTargetWithRBAC.d.ts +179 -0
  102. package/dist/Deployable/DeployableTargetWithRBAC.d.ts.map +1 -0
  103. package/dist/Deployable/DeployableTargetWithRBAC.js +222 -0
  104. package/dist/Deployable/DeployableTargetWithRBAC.js.map +1 -0
  105. package/dist/EventAction-CIPqmAoP.js +1450 -0
  106. package/dist/EventAction-CIPqmAoP.js.map +1 -0
  107. package/dist/EventAction-d-oeqZQs.cjs +2 -0
  108. package/dist/EventAction-d-oeqZQs.cjs.map +1 -0
  109. package/dist/Incentive-Bp8Sez7M.js +298 -0
  110. package/dist/Incentive-Bp8Sez7M.js.map +1 -0
  111. package/dist/Incentive-Djnzseoj.cjs +2 -0
  112. package/dist/Incentive-Djnzseoj.cjs.map +1 -0
  113. package/dist/Incentives/AllowListIncentive.cjs +2 -1
  114. package/dist/Incentives/AllowListIncentive.cjs.map +1 -0
  115. package/dist/Incentives/AllowListIncentive.d.ts +49 -19
  116. package/dist/Incentives/AllowListIncentive.d.ts.map +1 -1
  117. package/dist/Incentives/AllowListIncentive.js +50 -34
  118. package/dist/Incentives/AllowListIncentive.js.map +1 -0
  119. package/dist/Incentives/CGDAIncentive.cjs +2 -1
  120. package/dist/Incentives/CGDAIncentive.cjs.map +1 -0
  121. package/dist/Incentives/CGDAIncentive.d.ts +118 -22
  122. package/dist/Incentives/CGDAIncentive.d.ts.map +1 -1
  123. package/dist/Incentives/CGDAIncentive.js +67 -42
  124. package/dist/Incentives/CGDAIncentive.js.map +1 -0
  125. package/dist/Incentives/ERC1155Incentive.d.ts +99 -38
  126. package/dist/Incentives/ERC1155Incentive.d.ts.map +1 -1
  127. package/dist/Incentives/ERC20Incentive.cjs +2 -1
  128. package/dist/Incentives/ERC20Incentive.cjs.map +1 -0
  129. package/dist/Incentives/ERC20Incentive.d.ts +73 -29
  130. package/dist/Incentives/ERC20Incentive.d.ts.map +1 -1
  131. package/dist/Incentives/ERC20Incentive.js +71 -48
  132. package/dist/Incentives/ERC20Incentive.js.map +1 -0
  133. package/dist/Incentives/ERC20VariableCriteriaIncentive.d.ts +523 -0
  134. package/dist/Incentives/ERC20VariableCriteriaIncentive.d.ts.map +1 -0
  135. package/dist/Incentives/ERC20VariableIncentive.d.ts +65 -28
  136. package/dist/Incentives/ERC20VariableIncentive.d.ts.map +1 -1
  137. package/dist/Incentives/Incentive.cjs +2 -1
  138. package/dist/Incentives/Incentive.cjs.map +1 -0
  139. package/dist/Incentives/Incentive.d.ts +4 -7
  140. package/dist/Incentives/Incentive.d.ts.map +1 -1
  141. package/dist/Incentives/Incentive.js +17 -278
  142. package/dist/Incentives/Incentive.js.map +1 -0
  143. package/dist/Incentives/PointsIncentive.cjs +2 -1
  144. package/dist/Incentives/PointsIncentive.cjs.map +1 -0
  145. package/dist/Incentives/PointsIncentive.d.ts +65 -21
  146. package/dist/Incentives/PointsIncentive.d.ts.map +1 -1
  147. package/dist/Incentives/PointsIncentive.js +57 -36
  148. package/dist/Incentives/PointsIncentive.js.map +1 -0
  149. package/dist/SimpleDenyList-BwfNjRsg.cjs +2 -0
  150. package/dist/SimpleDenyList-BwfNjRsg.cjs.map +1 -0
  151. package/dist/SimpleDenyList-Cn5WpNn0.js +132 -0
  152. package/dist/SimpleDenyList-Cn5WpNn0.js.map +1 -0
  153. package/dist/Validators/SignerValidator.cjs +2 -1
  154. package/dist/Validators/SignerValidator.cjs.map +1 -0
  155. package/dist/Validators/SignerValidator.d.ts +310 -17
  156. package/dist/Validators/SignerValidator.d.ts.map +1 -1
  157. package/dist/Validators/SignerValidator.js +165 -36
  158. package/dist/Validators/SignerValidator.js.map +1 -0
  159. package/dist/Validators/Validator.cjs +2 -1
  160. package/dist/Validators/Validator.cjs.map +1 -0
  161. package/dist/Validators/Validator.d.ts +2 -2
  162. package/dist/Validators/Validator.d.ts.map +1 -1
  163. package/dist/Validators/Validator.js +12 -10
  164. package/dist/Validators/Validator.js.map +1 -0
  165. package/dist/claiming.cjs +2 -0
  166. package/dist/claiming.cjs.map +1 -0
  167. package/dist/claiming.d.ts +43 -0
  168. package/dist/claiming.d.ts.map +1 -0
  169. package/dist/claiming.js +17 -0
  170. package/dist/claiming.js.map +1 -0
  171. package/dist/componentInterfaces-D09mhzxO.cjs +2 -0
  172. package/dist/componentInterfaces-D09mhzxO.cjs.map +1 -0
  173. package/dist/componentInterfaces-RXBMI5yH.js +14 -0
  174. package/dist/componentInterfaces-RXBMI5yH.js.map +1 -0
  175. package/dist/deployments-BM42vImE.js +43 -0
  176. package/dist/deployments-BM42vImE.js.map +1 -0
  177. package/dist/deployments-CMdF5uEC.cjs +2 -0
  178. package/dist/deployments-CMdF5uEC.cjs.map +1 -0
  179. package/dist/deployments.json +41 -0
  180. package/dist/errors.cjs +2 -1
  181. package/dist/errors.cjs.map +1 -0
  182. package/dist/errors.d.ts +403 -1
  183. package/dist/errors.d.ts.map +1 -1
  184. package/dist/errors.js +285 -39
  185. package/dist/errors.js.map +1 -0
  186. package/dist/generated-B0tk-c9b.cjs +3 -0
  187. package/dist/generated-B0tk-c9b.cjs.map +1 -0
  188. package/dist/{generated-x_abr3Yv.js → generated-B7VaSah4.js} +2058 -2541
  189. package/dist/generated-B7VaSah4.js.map +1 -0
  190. package/dist/index.cjs +2 -1
  191. package/dist/index.cjs.map +1 -0
  192. package/dist/index.d.ts +10 -9
  193. package/dist/index.d.ts.map +1 -1
  194. package/dist/index.js +143 -1353
  195. package/dist/index.js.map +1 -0
  196. package/dist/transfers.cjs +2 -0
  197. package/dist/transfers.cjs.map +1 -0
  198. package/dist/transfers.d.ts +198 -0
  199. package/dist/transfers.d.ts.map +1 -0
  200. package/dist/transfers.js +84 -0
  201. package/dist/transfers.js.map +1 -0
  202. package/dist/utils.cjs +2 -1
  203. package/dist/utils.cjs.map +1 -0
  204. package/dist/utils.d.ts +26 -1350
  205. package/dist/utils.d.ts.map +1 -1
  206. package/dist/utils.js +38 -636
  207. package/dist/utils.js.map +1 -0
  208. package/package.json +37 -11
  209. package/src/Actions/Action.test.ts +79 -0
  210. package/src/Actions/Action.ts +61 -0
  211. package/src/Actions/ContractAction.test.ts +197 -0
  212. package/src/Actions/ContractAction.ts +300 -0
  213. package/src/Actions/ERC721MintAction.test.ts +112 -0
  214. package/src/Actions/ERC721MintAction.ts +291 -0
  215. package/src/Actions/EventAction.test.ts +787 -0
  216. package/src/Actions/EventAction.ts +1214 -0
  217. package/src/AllowLists/AllowList.test.ts +64 -0
  218. package/src/AllowLists/AllowList.ts +62 -0
  219. package/src/AllowLists/OpenAllowList.test.ts +40 -0
  220. package/src/AllowLists/OpenAllowList.ts +45 -0
  221. package/src/AllowLists/SimpleAllowList.test.ts +52 -0
  222. package/src/AllowLists/SimpleAllowList.ts +262 -0
  223. package/src/AllowLists/SimpleDenyList.test.ts +52 -0
  224. package/src/AllowLists/SimpleDenyList.ts +250 -0
  225. package/src/Auth/Auth.ts +11 -0
  226. package/src/Auth/PassthroughAuth.test.ts +12 -0
  227. package/src/Auth/PassthroughAuth.ts +80 -0
  228. package/src/Boost.ts +309 -0
  229. package/src/BoostCore.test.ts +827 -0
  230. package/src/BoostCore.ts +1447 -0
  231. package/src/BoostRegistry.ts +543 -0
  232. package/src/Budgets/Budget.test.ts +27 -0
  233. package/src/Budgets/Budget.ts +60 -0
  234. package/src/Budgets/ManagedBudget.test.ts +217 -0
  235. package/src/Budgets/ManagedBudget.ts +534 -0
  236. package/src/Budgets/VestingBudget.test.ts +123 -0
  237. package/src/Budgets/VestingBudget.ts +530 -0
  238. package/src/Deployable/Contract.ts +228 -0
  239. package/src/Deployable/Deployable.ts +250 -0
  240. package/src/Deployable/DeployableTarget.ts +234 -0
  241. package/src/Deployable/DeployableTargetWithRBAC.ts +323 -0
  242. package/src/Incentives/AllowListIncentive.test.ts +143 -0
  243. package/src/Incentives/AllowListIncentive.ts +336 -0
  244. package/src/Incentives/CGDAIncentive.test.ts +132 -0
  245. package/src/Incentives/CGDAIncentive.ts +470 -0
  246. package/src/Incentives/ERC1155Incentive.test.ts +87 -0
  247. package/src/Incentives/ERC1155Incentive.ts +465 -0
  248. package/src/Incentives/ERC20Incentive.test.ts +130 -0
  249. package/src/Incentives/ERC20Incentive.ts +484 -0
  250. package/src/Incentives/ERC20VariableCriteriaIncentive.test.ts +184 -0
  251. package/src/Incentives/ERC20VariableCriteriaIncentive.ts +309 -0
  252. package/src/Incentives/ERC20VariableIncentive.test.ts +136 -0
  253. package/src/Incentives/ERC20VariableIncentive.ts +422 -0
  254. package/src/Incentives/Incentive.test.ts +92 -0
  255. package/src/Incentives/Incentive.ts +86 -0
  256. package/src/Incentives/PointsIncentive.test.ts +139 -0
  257. package/src/Incentives/PointsIncentive.ts +367 -0
  258. package/src/Validators/SignerValidator.test.ts +159 -0
  259. package/src/Validators/SignerValidator.ts +683 -0
  260. package/src/Validators/Validator.test.ts +21 -0
  261. package/src/Validators/Validator.ts +55 -0
  262. package/src/claiming.ts +56 -0
  263. package/src/errors.ts +844 -0
  264. package/src/index.test.ts +122 -0
  265. package/src/index.ts +58 -0
  266. package/src/transfers.ts +284 -0
  267. package/src/utils.test.ts +44 -0
  268. package/src/utils.ts +247 -0
  269. package/dist/Budgets/SimpleBudget.d.ts +0 -793
  270. package/dist/Budgets/SimpleBudget.d.ts.map +0 -1
  271. package/dist/generated-BaaleHW-.cjs +0 -2
@@ -0,0 +1,1450 @@
1
+ import { b8 as _, b9 as q, ba as z, bb as J, bc as Y } from "./generated-B7VaSah4.js";
2
+ import { getTransactionReceipt as Z, getTransaction as f0 } from "@wagmi/core";
3
+ import { isAddressEqual as I, decodeEventLog as V, decodeFunctionData as L, isAddress as e0, fromHex as E, encodeAbiParameters as t0 } from "viem";
4
+ import { d as n0 } from "./deployments-BM42vImE.js";
5
+ import { DeployableTarget as a0 } from "./Deployable/DeployableTarget.js";
6
+ import { ValidationAbiMissingError as N, FunctionDataDecodeError as U, UnparseableAbiParamError as b0, UnrecognizedFilterTypeError as d0, FieldValueNotComparableError as F, InvalidNumericalCriteriaError as G, DecodedArgsMalformedError as i0, FieldValueUndefinedError as j, NoEventActionStepsProvidedError as s0, TooManyEventActionStepsProvidedError as r0 } from "./errors.js";
7
+ import { RegistryType as c0 } from "./utils.js";
8
+ const o0 = "0x60a0604052348015600e575f80fd5b50601b601f60201b60201c565b60b0565b5f602c608760201b60201c565b90508054600181161560455763f92ee8a95f526004601cfd5b8160c01c808260011c146082578060011b8355806020527fc7f505b2f371ae2175ee4913f4499e1f2633a7b5936321eed1cdaeb6115181d2602080a15b505050565b5f7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffbf6011325f1b905090565b60805161231a6100c85f395f61034a015261231a5ff3fe608060405260043610610090575f3560e01c80639bc1cf81116100585780639bc1cf811461017d578063c26624e8146101a7578063d7768c47146101e3578063dbdf21101461021f578063ddd6ab081461024957610090565b806301ffc9a71461009457806309c5eabe146100d057806328d6183b14610101578063393df8cb1461012b578063439fab9114610155575b5f80fd5b34801561009f575f80fd5b506100ba60048036038101906100b59190611333565b610273565b6040516100c79190611378565b60405180910390f35b6100ea60048036038101906100e591906113f2565b6102ec565b6040516100f89291906114ad565b60405180910390f35b34801561010c575f80fd5b50610115610321565b60405161012291906114ea565b60405180910390f35b348015610136575f80fd5b5061013f610348565b60405161014c919061157d565b60405180910390f35b348015610160575f80fd5b5061017b600480360381019061017691906113f2565b61036c565b005b348015610188575f80fd5b506101916103f9565b60405161019e91906118e9565b60405180910390f35b3480156101b2575f80fd5b506101cd60048036038101906101c89190611933565b610648565b6040516101da91906119e4565b60405180910390f35b3480156101ee575f80fd5b50610209600480360381019061020491906113f2565b610875565b6040516102169190611a04565b60405180910390f35b34801561022a575f80fd5b506102336108a9565b6040516102409190611a8a565b60405180910390f35b348015610254575f80fd5b5061025d610981565b60405161026a9190611ab2565b60405180910390f35b5f7f7687b0ed000000000000000000000000000000000000000000000000000000007bffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916827bffffffffffffffffffffffffffffffffffffffffffffffffffffffff191614806102e557506102e48261098d565b5b9050919050565b5f60606040517fd623472500000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b5f7f7687b0ed00000000000000000000000000000000000000000000000000000000905090565b7f000000000000000000000000000000000000000000000000000000000000000081565b5f610375610a06565b905080546003825580156103a75760018160011c14303b1061039e5763f92ee8a95f526004601cfd5b818160ff1b1b91505b506103bf83838101906103ba9190611fb0565b610a2f565b80156103f4576002815560016020527fc7f505b2f371ae2175ee4913f4499e1f2633a7b5936321eed1cdaeb6115181d2602080a15b505050565b60606004805480602002602001604051908101604052809291908181526020015f905b8282101561063f578382905f5260205f2090600502016040518060c00160405290815f8201548152602001600182015f9054906101000a900460ff16600181111561046a576104696115d7565b5b600181111561047c5761047b6115d7565b5b81526020016001820160019054906101000a900460ff1660ff1660ff1681526020016001820160029054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200160028201548152602001600382016040518060800160405290815f82015f9054906101000a900460ff1660058111156105305761052f6115d7565b5b6005811115610542576105416115d7565b5b81526020015f820160019054906101000a900460ff16600381111561056a576105696115d7565b5b600381111561057c5761057b6115d7565b5b81526020015f820160029054906101000a900460ff1660ff1660ff1681526020016001820180546105ac90612024565b80601f01602080910402602001604051908101604052809291908181526020018280546105d890612024565b80156106235780601f106105fa57610100808354040283529160200191610623565b820191905f5260205f20905b81548152906001019060200180831161060657829003601f168201915b505050505081525050815250508152602001906001019061041c565b50505050905090565b6106506111c4565b6004828154811061066457610663612054565b5b905f5260205f2090600502016040518060c00160405290815f8201548152602001600182015f9054906101000a900460ff1660018111156106a8576106a76115d7565b5b60018111156106ba576106b96115d7565b5b81526020016001820160019054906101000a900460ff1660ff1660ff1681526020016001820160029054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200160028201548152602001600382016040518060800160405290815f82015f9054906101000a900460ff16600581111561076e5761076d6115d7565b5b60058111156107805761077f6115d7565b5b81526020015f820160019054906101000a900460ff1660038111156107a8576107a76115d7565b5b60038111156107ba576107b96115d7565b5b81526020015f820160029054906101000a900460ff1660ff1660ff1681526020016001820180546107ea90612024565b80601f016020809104026020016040519081016040528092919081815260200182805461081690612024565b80156108615780601f1061083857610100808354040283529160200191610861565b820191905f5260205f20905b81548152906001019060200180831161084457829003601f168201915b505050505081525050815250509050919050565b60606040517fd623472500000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b6108b1611229565b5f6040518060a00160405290815f82015f9054906101000a900460ff1660018111156108e0576108df6115d7565b5b60018111156108f2576108f16115d7565b5b815260200160018201548152602001600282015f9054906101000a900460ff1660ff1660ff1681526020016002820160019054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001600382015481525050905090565b5f600480549050905090565b5f7fe6715795000000000000000000000000000000000000000000000000000000007bffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916827bffffffffffffffffffffffffffffffffffffffffffffffffffffffff191614806109ff57506109fe826110be565b5b9050919050565b5f7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffbf6011325f1b905090565b610a37611137565b805f01515f80820151815f015f6101000a81548160ff02191690836001811115610a6457610a636115d7565b5b0217905550602082015181600101556040820151816002015f6101000a81548160ff021916908360ff16021790555060608201518160020160016101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff1602179055506080820151816003015590505060048160200151908060018154018082558091505060019003905f5260205f2090600502015f909190919091505f820151815f01556020820151816001015f6101000a81548160ff02191690836001811115610b4657610b456115d7565b5b021790555060408201518160010160016101000a81548160ff021916908360ff16021790555060608201518160010160026101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff1602179055506080820151816002015560a0820151816003015f820151815f015f6101000a81548160ff02191690836005811115610bee57610bed6115d7565b5b02179055506020820151815f0160016101000a81548160ff02191690836003811115610c1d57610c1c6115d7565b5b02179055506040820151815f0160026101000a81548160ff021916908360ff1602179055506060820151816001019081610c579190612215565b505050505060048160400151908060018154018082558091505060019003905f5260205f2090600502015f909190919091505f820151815f01556020820151816001015f6101000a81548160ff02191690836001811115610cbb57610cba6115d7565b5b021790555060408201518160010160016101000a81548160ff021916908360ff16021790555060608201518160010160026101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff1602179055506080820151816002015560a0820151816003015f820151815f015f6101000a81548160ff02191690836005811115610d6357610d626115d7565b5b02179055506020820151815f0160016101000a81548160ff02191690836003811115610d9257610d916115d7565b5b02179055506040820151815f0160026101000a81548160ff021916908360ff1602179055506060820151816001019081610dcc9190612215565b505050505060048160600151908060018154018082558091505060019003905f5260205f2090600502015f909190919091505f820151815f01556020820151816001015f6101000a81548160ff02191690836001811115610e3057610e2f6115d7565b5b021790555060408201518160010160016101000a81548160ff021916908360ff16021790555060608201518160010160026101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff1602179055506080820151816002015560a0820151816003015f820151815f015f6101000a81548160ff02191690836005811115610ed857610ed76115d7565b5b02179055506020820151815f0160016101000a81548160ff02191690836003811115610f0757610f066115d7565b5b02179055506040820151815f0160026101000a81548160ff021916908360ff1602179055506060820151816001019081610f419190612215565b505050505060048160800151908060018154018082558091505060019003905f5260205f2090600502015f909190919091505f820151815f01556020820151816001015f6101000a81548160ff02191690836001811115610fa557610fa46115d7565b5b021790555060408201518160010160016101000a81548160ff021916908360ff16021790555060608201518160010160026101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff1602179055506080820151816002015560a0820151816003015f820151815f015f6101000a81548160ff0219169083600581111561104d5761104c6115d7565b5b02179055506020820151815f0160016101000a81548160ff0219169083600381111561107c5761107b6115d7565b5b02179055506040820151815f0160026101000a81548160ff021916908360ff16021790555060608201518160010190816110b69190612215565b505050505050565b5f7f6ab67a0d000000000000000000000000000000000000000000000000000000007bffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916827bffffffffffffffffffffffffffffffffffffffffffffffffffffffff19161480611130575061112f8261115b565b5b9050919050565b5f611140610a06565b905080546001166111585763d7e6bcf85f526004601cfd5b50565b5f7f01ffc9a7000000000000000000000000000000000000000000000000000000007bffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916827bffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916149050919050565b6040518060c001604052805f80191681526020015f60018111156111eb576111ea6115d7565b5b81526020015f60ff1681526020015f73ffffffffffffffffffffffffffffffffffffffff1681526020015f8152602001611223611281565b81525090565b6040518060a001604052805f6001811115611247576112466115d7565b5b81526020015f80191681526020015f60ff1681526020015f73ffffffffffffffffffffffffffffffffffffffff1681526020015f81525090565b60405180608001604052805f600581111561129f5761129e6115d7565b5b81526020015f60038111156112b7576112b66115d7565b5b81526020015f60ff168152602001606081525090565b5f604051905090565b5f80fd5b5f80fd5b5f7fffffffff0000000000000000000000000000000000000000000000000000000082169050919050565b611312816112de565b811461131c575f80fd5b50565b5f8135905061132d81611309565b92915050565b5f60208284031215611348576113476112d6565b5b5f6113558482850161131f565b91505092915050565b5f8115159050919050565b6113728161135e565b82525050565b5f60208201905061138b5f830184611369565b92915050565b5f80fd5b5f80fd5b5f80fd5b5f8083601f8401126113b2576113b1611391565b5b8235905067ffffffffffffffff8111156113cf576113ce611395565b5b6020830191508360018202830111156113eb576113ea611399565b5b9250929050565b5f8060208385031215611408576114076112d6565b5b5f83013567ffffffffffffffff811115611425576114246112da565b5b6114318582860161139d565b92509250509250929050565b5f81519050919050565b5f82825260208201905092915050565b8281835e5f83830152505050565b5f601f19601f8301169050919050565b5f61147f8261143d565b6114898185611447565b9350611499818560208601611457565b6114a281611465565b840191505092915050565b5f6040820190506114c05f830185611369565b81810360208301526114d28184611475565b90509392505050565b6114e4816112de565b82525050565b5f6020820190506114fd5f8301846114db565b92915050565b5f73ffffffffffffffffffffffffffffffffffffffff82169050919050565b5f819050919050565b5f61154561154061153b84611503565b611522565b611503565b9050919050565b5f6115568261152b565b9050919050565b5f6115678261154c565b9050919050565b6115778161155d565b82525050565b5f6020820190506115905f83018461156e565b92915050565b5f81519050919050565b5f82825260208201905092915050565b5f819050602082019050919050565b5f819050919050565b6115d1816115bf565b82525050565b7f4e487b71000000000000000000000000000000000000000000000000000000005f52602160045260245ffd5b60028110611615576116146115d7565b5b50565b5f81905061162582611604565b919050565b5f61163482611618565b9050919050565b6116448161162a565b82525050565b5f60ff82169050919050565b61165f8161164a565b82525050565b5f61166f82611503565b9050919050565b61167f81611665565b82525050565b5f819050919050565b61169781611685565b82525050565b600681106116ae576116ad6115d7565b5b50565b5f8190506116be8261169d565b919050565b5f6116cd826116b1565b9050919050565b6116dd816116c3565b82525050565b600481106116f4576116f36115d7565b5b50565b5f819050611704826116e3565b919050565b5f611713826116f7565b9050919050565b61172381611709565b82525050565b5f82825260208201905092915050565b5f6117438261143d565b61174d8185611729565b935061175d818560208601611457565b61176681611465565b840191505092915050565b5f608083015f8301516117865f8601826116d4565b506020830151611799602086018261171a565b5060408301516117ac6040860182611656565b50606083015184820360608601526117c48282611739565b9150508091505092915050565b5f60c083015f8301516117e65f8601826115c8565b5060208301516117f9602086018261163b565b50604083015161180c6040860182611656565b50606083015161181f6060860182611676565b506080830151611832608086018261168e565b5060a083015184820360a086015261184a8282611771565b9150508091505092915050565b5f61186283836117d1565b905092915050565b5f602082019050919050565b5f61188082611596565b61188a81856115a0565b93508360208202850161189c856115b0565b805f5b858110156118d757848403895281516118b88582611857565b94506118c38361186a565b925060208a0199505060018101905061189f565b50829750879550505050505092915050565b5f6020820190508181035f8301526119018184611876565b905092915050565b61191281611685565b811461191c575f80fd5b50565b5f8135905061192d81611909565b92915050565b5f60208284031215611948576119476112d6565b5b5f6119558482850161191f565b91505092915050565b5f60c083015f8301516119735f8601826115c8565b506020830151611986602086018261163b565b5060408301516119996040860182611656565b5060608301516119ac6060860182611676565b5060808301516119bf608086018261168e565b5060a083015184820360a08601526119d78282611771565b9150508091505092915050565b5f6020820190508181035f8301526119fc818461195e565b905092915050565b5f6020820190508181035f830152611a1c8184611475565b905092915050565b60a082015f820151611a385f85018261163b565b506020820151611a4b60208501826115c8565b506040820151611a5e6040850182611656565b506060820151611a716060850182611676565b506080820151611a84608085018261168e565b50505050565b5f60a082019050611a9d5f830184611a24565b92915050565b611aac81611685565b82525050565b5f602082019050611ac55f830184611aa3565b92915050565b5f80fd5b7f4e487b71000000000000000000000000000000000000000000000000000000005f52604160045260245ffd5b611b0582611465565b810181811067ffffffffffffffff82111715611b2457611b23611acf565b5b80604052505050565b5f611b366112cd565b9050611b428282611afc565b919050565b5f80fd5b60028110611b57575f80fd5b50565b5f81359050611b6881611b4b565b92915050565b611b77816115bf565b8114611b81575f80fd5b50565b5f81359050611b9281611b6e565b92915050565b611ba18161164a565b8114611bab575f80fd5b50565b5f81359050611bbc81611b98565b92915050565b611bcb81611665565b8114611bd5575f80fd5b50565b5f81359050611be681611bc2565b92915050565b5f60a08284031215611c0157611c00611acb565b5b611c0b60a0611b2d565b90505f611c1a84828501611b5a565b5f830152506020611c2d84828501611b84565b6020830152506040611c4184828501611bae565b6040830152506060611c5584828501611bd8565b6060830152506080611c698482850161191f565b60808301525092915050565b60068110611c81575f80fd5b50565b5f81359050611c9281611c75565b92915050565b60048110611ca4575f80fd5b50565b5f81359050611cb581611c98565b92915050565b5f80fd5b5f67ffffffffffffffff821115611cd957611cd8611acf565b5b611ce282611465565b9050602081019050919050565b828183375f83830152505050565b5f611d0f611d0a84611cbf565b611b2d565b905082815260208101848484011115611d2b57611d2a611cbb565b5b611d36848285611cef565b509392505050565b5f82601f830112611d5257611d51611391565b5b8135611d62848260208601611cfd565b91505092915050565b5f60808284031215611d8057611d7f611acb565b5b611d8a6080611b2d565b90505f611d9984828501611c84565b5f830152506020611dac84828501611ca7565b6020830152506040611dc084828501611bae565b604083015250606082013567ffffffffffffffff811115611de457611de3611b47565b5b611df084828501611d3e565b60608301525092915050565b5f60c08284031215611e1157611e10611acb565b5b611e1b60c0611b2d565b90505f611e2a84828501611b84565b5f830152506020611e3d84828501611b5a565b6020830152506040611e5184828501611bae565b6040830152506060611e6584828501611bd8565b6060830152506080611e798482850161191f565b60808301525060a082013567ffffffffffffffff811115611e9d57611e9c611b47565b5b611ea984828501611d6b565b60a08301525092915050565b5f6101208284031215611ecb57611eca611acb565b5b611ed560a0611b2d565b90505f611ee484828501611bec565b5f8301525060a082013567ffffffffffffffff811115611f0757611f06611b47565b5b611f1384828501611dfc565b60208301525060c082013567ffffffffffffffff811115611f3757611f36611b47565b5b611f4384828501611dfc565b60408301525060e082013567ffffffffffffffff811115611f6757611f66611b47565b5b611f7384828501611dfc565b60608301525061010082013567ffffffffffffffff811115611f9857611f97611b47565b5b611fa484828501611dfc565b60808301525092915050565b5f60208284031215611fc557611fc46112d6565b5b5f82013567ffffffffffffffff811115611fe257611fe16112da565b5b611fee84828501611eb5565b91505092915050565b7f4e487b71000000000000000000000000000000000000000000000000000000005f52602260045260245ffd5b5f600282049050600182168061203b57607f821691505b60208210810361204e5761204d611ff7565b5b50919050565b7f4e487b71000000000000000000000000000000000000000000000000000000005f52603260045260245ffd5b5f819050815f5260205f209050919050565b5f6020601f8301049050919050565b5f82821b905092915050565b5f600883026120dd7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff826120a2565b6120e786836120a2565b95508019841693508086168417925050509392505050565b5f61211961211461210f84611685565b611522565b611685565b9050919050565b5f819050919050565b612132836120ff565b61214661213e82612120565b8484546120ae565b825550505050565b5f90565b61215a61214e565b612165818484612129565b505050565b5b818110156121885761217d5f82612152565b60018101905061216b565b5050565b601f8211156121cd5761219e81612081565b6121a784612093565b810160208510156121b6578190505b6121ca6121c285612093565b83018261216a565b50505b505050565b5f82821c905092915050565b5f6121ed5f19846008026121d2565b1980831691505092915050565b5f61220583836121de565b9150826002028217905092915050565b61221e8261143d565b67ffffffffffffffff81111561223757612236611acf565b5b6122418254612024565b61224c82828561218c565b5f60209050601f83116001811461227d575f841561226b578287015190505b61227585826121fa565b8655506122dc565b601f19841661228b86612081565b5f5b828110156122b25784890151825560018201915060208501945060208101905061228d565b868310156122cf57848901516122cb601f8916826121de565b8355505b6001600288020188555050505b50505050505056fea2646970667358221220c0fb13f888b0a69e33db3d7586e65062d85bac26cd33b0773ccbf5249746b2b264736f6c634300081a0033", u0 = {
9
+ "0xddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef": {
10
+ name: "Transfer",
11
+ type: "event",
12
+ inputs: [
13
+ {
14
+ type: "address",
15
+ indexed: !0
16
+ },
17
+ {
18
+ type: "address",
19
+ indexed: !0
20
+ },
21
+ {
22
+ type: "uint256",
23
+ indexed: !0
24
+ }
25
+ ]
26
+ },
27
+ "Transfer(address indexed,address indexed,uint256 indexed)": {
28
+ name: "Transfer",
29
+ type: "event",
30
+ inputs: [
31
+ {
32
+ type: "address",
33
+ indexed: !0
34
+ },
35
+ {
36
+ type: "address",
37
+ indexed: !0
38
+ },
39
+ {
40
+ type: "uint256",
41
+ indexed: !0
42
+ }
43
+ ]
44
+ },
45
+ "0xb362243af1e2070d7d5bf8d713f2e0fab64203f1b71462afbe20572909788c5e": {
46
+ name: "Purchased",
47
+ type: "event",
48
+ inputs: [
49
+ {
50
+ type: "address",
51
+ indexed: !0
52
+ },
53
+ {
54
+ type: "address",
55
+ indexed: !0
56
+ },
57
+ {
58
+ type: "uint256",
59
+ indexed: !0
60
+ },
61
+ {
62
+ type: "uint256"
63
+ },
64
+ {
65
+ type: "uint256"
66
+ }
67
+ ]
68
+ },
69
+ "Purchased(address indexed,address indexed,uint256 indexed,uint256,uint256)": {
70
+ name: "Purchased",
71
+ type: "event",
72
+ inputs: [
73
+ {
74
+ type: "address",
75
+ indexed: !0
76
+ },
77
+ {
78
+ type: "address",
79
+ indexed: !0
80
+ },
81
+ {
82
+ type: "uint256",
83
+ indexed: !0
84
+ },
85
+ {
86
+ type: "uint256"
87
+ },
88
+ {
89
+ type: "uint256"
90
+ }
91
+ ]
92
+ },
93
+ "0x69e37f151eb98a09618ddaa80c8cfaf1ce5996867c489f45b555b412271ebf27": {
94
+ name: "NameRegistered",
95
+ type: "event",
96
+ inputs: [
97
+ {
98
+ type: "string"
99
+ },
100
+ {
101
+ type: "bytes32"
102
+ },
103
+ {
104
+ type: "address"
105
+ },
106
+ {
107
+ type: "uint256"
108
+ },
109
+ {
110
+ type: "uint256"
111
+ },
112
+ {
113
+ type: "uint256"
114
+ }
115
+ ]
116
+ },
117
+ "NameRegistered(string,bytes32,address,uint256,uint256,uint256)": {
118
+ name: "NameRegistered",
119
+ type: "event",
120
+ inputs: [
121
+ {
122
+ type: "string"
123
+ },
124
+ {
125
+ type: "bytes32"
126
+ },
127
+ {
128
+ type: "address"
129
+ },
130
+ {
131
+ type: "uint256"
132
+ },
133
+ {
134
+ type: "uint256"
135
+ },
136
+ {
137
+ type: "uint256"
138
+ }
139
+ ]
140
+ },
141
+ "0x3134e8a2e6d97e929a7e54011ea5485d7d196dd5f0ba4d4ef95803e8e3fc257f": {
142
+ name: "DelegateChanged",
143
+ type: "event",
144
+ inputs: [
145
+ {
146
+ type: "address",
147
+ indexed: !0
148
+ },
149
+ {
150
+ type: "address",
151
+ indexed: !0
152
+ },
153
+ {
154
+ type: "address",
155
+ indexed: !0
156
+ }
157
+ ]
158
+ },
159
+ "DelegateChanged(address indexed,address indexed,address indexed)": {
160
+ name: "DelegateChanged",
161
+ type: "event",
162
+ inputs: [
163
+ {
164
+ type: "address",
165
+ indexed: !0
166
+ },
167
+ {
168
+ type: "address",
169
+ indexed: !0
170
+ },
171
+ {
172
+ type: "address",
173
+ indexed: !0
174
+ }
175
+ ]
176
+ },
177
+ "0xe00361d207b252a464323eb23d45d42583e391f2031acdd2e9fa36efddd43cb0": {
178
+ name: "SwappedV3",
179
+ type: "event",
180
+ inputs: [
181
+ {
182
+ type: "bytes16"
183
+ },
184
+ {
185
+ type: "address"
186
+ },
187
+ {
188
+ type: "uint256"
189
+ },
190
+ {
191
+ type: "address"
192
+ },
193
+ {
194
+ type: "address",
195
+ indexed: !0
196
+ },
197
+ {
198
+ type: "address",
199
+ indexed: !0
200
+ },
201
+ {
202
+ type: "address",
203
+ indexed: !0
204
+ },
205
+ {
206
+ type: "uint256"
207
+ },
208
+ {
209
+ type: "uint256"
210
+ },
211
+ {
212
+ type: "uint256"
213
+ }
214
+ ]
215
+ },
216
+ "SwappedV3(bytes16,address,uint256,address,address indexed,address indexed,address indexed,uint256,uint256,uint256)": {
217
+ name: "SwappedV3",
218
+ type: "event",
219
+ inputs: [
220
+ {
221
+ type: "bytes16"
222
+ },
223
+ {
224
+ type: "address"
225
+ },
226
+ {
227
+ type: "uint256"
228
+ },
229
+ {
230
+ type: "address"
231
+ },
232
+ {
233
+ type: "address",
234
+ indexed: !0
235
+ },
236
+ {
237
+ type: "address",
238
+ indexed: !0
239
+ },
240
+ {
241
+ type: "address",
242
+ indexed: !0
243
+ },
244
+ {
245
+ type: "uint256"
246
+ },
247
+ {
248
+ type: "uint256"
249
+ },
250
+ {
251
+ type: "uint256"
252
+ }
253
+ ]
254
+ },
255
+ "0xb8e138887d0aa13bab447e82de9d5c1777041ecd21ca36ba824ff1e6c07ddda4": {
256
+ name: "VoteCast",
257
+ type: "event",
258
+ inputs: [
259
+ {
260
+ type: "address",
261
+ indexed: !0
262
+ },
263
+ {
264
+ type: "uint256"
265
+ },
266
+ {
267
+ type: "uint8"
268
+ },
269
+ {
270
+ type: "uint256"
271
+ },
272
+ {
273
+ type: "string"
274
+ }
275
+ ]
276
+ },
277
+ "VoteCast(address indexed,uint256,uint8,uint256,string)": {
278
+ name: "VoteCast",
279
+ type: "event",
280
+ inputs: [
281
+ {
282
+ type: "address",
283
+ indexed: !0
284
+ },
285
+ {
286
+ type: "uint256"
287
+ },
288
+ {
289
+ type: "uint8"
290
+ },
291
+ {
292
+ type: "uint256"
293
+ },
294
+ {
295
+ type: "string"
296
+ }
297
+ ]
298
+ },
299
+ "0x883a883a9ea847654d33471b1e5fb2dea76a2cfc86a6cc7da6c14102800e4d0b": {
300
+ name: "InfoIndexed",
301
+ type: "event",
302
+ inputs: [
303
+ {
304
+ type: "address",
305
+ indexed: !0
306
+ },
307
+ {
308
+ type: "string",
309
+ indexed: !0
310
+ }
311
+ ]
312
+ },
313
+ "InfoIndexed(address indexed,string indexed)": {
314
+ name: "InfoIndexed",
315
+ type: "event",
316
+ inputs: [
317
+ {
318
+ type: "address",
319
+ indexed: !0
320
+ },
321
+ {
322
+ type: "string",
323
+ indexed: !0
324
+ }
325
+ ]
326
+ },
327
+ "0xe46343e36b0721f173bdc76b8f25c08b04f417df09c27e1e83ba1980007fef8c": {
328
+ name: "Info",
329
+ type: "event",
330
+ inputs: [
331
+ {
332
+ type: "address"
333
+ },
334
+ {
335
+ type: "string"
336
+ }
337
+ ]
338
+ },
339
+ "Info(address,string)": {
340
+ name: "Info",
341
+ type: "event",
342
+ inputs: [
343
+ {
344
+ type: "address"
345
+ },
346
+ {
347
+ type: "string"
348
+ }
349
+ ]
350
+ }
351
+ }, p0 = {
352
+ "Transfer(address indexed,address indexed,uint256 indexed)": "0xddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef",
353
+ "Purchased(address indexed,address indexed,uint256 indexed,uint256,uint256)": "0xb362243af1e2070d7d5bf8d713f2e0fab64203f1b71462afbe20572909788c5e",
354
+ "NameRegistered(string,bytes32,address,uint256,uint256,uint256)": "0x69e37f151eb98a09618ddaa80c8cfaf1ce5996867c489f45b555b412271ebf27",
355
+ "DelegateChanged(address indexed,address indexed,address indexed)": "0x3134e8a2e6d97e929a7e54011ea5485d7d196dd5f0ba4d4ef95803e8e3fc257f",
356
+ "SwappedV3(bytes16,address,uint256,address,address indexed,address indexed,address indexed,uint256,uint256,uint256)": "0xe00361d207b252a464323eb23d45d42583e391f2031acdd2e9fa36efddd43cb0",
357
+ "VoteCast(address indexed,uint256,uint8,uint256,string)": "0xb8e138887d0aa13bab447e82de9d5c1777041ecd21ca36ba824ff1e6c07ddda4",
358
+ "InfoIndexed(address indexed,string indexed)": "0x883a883a9ea847654d33471b1e5fb2dea76a2cfc86a6cc7da6c14102800e4d0b",
359
+ "Info(address,string)": "0xe46343e36b0721f173bdc76b8f25c08b04f417df09c27e1e83ba1980007fef8c"
360
+ }, K = {
361
+ abi: u0,
362
+ selectors: p0
363
+ }, y0 = {
364
+ "0x0000000000000000000000000000000000000000000000000000000040c10f19": {
365
+ name: "mint",
366
+ type: "function",
367
+ stateMutability: "nonpayable",
368
+ inputs: [
369
+ {
370
+ type: "address",
371
+ name: "to"
372
+ },
373
+ {
374
+ type: "uint256",
375
+ name: "amount"
376
+ }
377
+ ],
378
+ outputs: []
379
+ },
380
+ "mint(address to, uint256 amount)": {
381
+ name: "mint",
382
+ type: "function",
383
+ stateMutability: "nonpayable",
384
+ inputs: [
385
+ {
386
+ type: "address",
387
+ name: "to"
388
+ },
389
+ {
390
+ type: "uint256",
391
+ name: "amount"
392
+ }
393
+ ],
394
+ outputs: []
395
+ },
396
+ "0x0000000000000000000000000000000000000000000000000000000017d304b0": {
397
+ name: "mintPayable",
398
+ type: "function",
399
+ stateMutability: "nonpayable",
400
+ inputs: [
401
+ {
402
+ type: "address",
403
+ name: "to"
404
+ },
405
+ {
406
+ type: "uint256",
407
+ name: "amount"
408
+ }
409
+ ],
410
+ outputs: []
411
+ },
412
+ "mintPayable(address to, uint256 amount)": {
413
+ name: "mintPayable",
414
+ type: "function",
415
+ stateMutability: "nonpayable",
416
+ inputs: [
417
+ {
418
+ type: "address",
419
+ name: "to"
420
+ },
421
+ {
422
+ type: "uint256",
423
+ name: "amount"
424
+ }
425
+ ],
426
+ outputs: []
427
+ },
428
+ "0x0000000000000000000000000000000000000000000000000000000024856bc3": {
429
+ name: "execute",
430
+ type: "function",
431
+ stateMutability: "nonpayable",
432
+ inputs: [
433
+ {
434
+ type: "bytes",
435
+ name: "commands"
436
+ },
437
+ {
438
+ type: "bytes[]",
439
+ name: "inputs"
440
+ }
441
+ ],
442
+ outputs: []
443
+ },
444
+ "execute(bytes commands,bytes[] inputs)": {
445
+ name: "execute",
446
+ type: "function",
447
+ stateMutability: "nonpayable",
448
+ inputs: [
449
+ {
450
+ type: "bytes",
451
+ name: "commands"
452
+ },
453
+ {
454
+ type: "bytes[]",
455
+ name: "inputs"
456
+ }
457
+ ],
458
+ outputs: []
459
+ },
460
+ "0x0000000000000000000000000000000000000000000000000000000074694a2b": {
461
+ name: "register",
462
+ type: "function",
463
+ stateMutability: "nonpayable",
464
+ inputs: [
465
+ {
466
+ type: "string",
467
+ name: "name"
468
+ },
469
+ {
470
+ type: "address",
471
+ name: "owner"
472
+ },
473
+ {
474
+ type: "uint256",
475
+ name: "duration"
476
+ },
477
+ {
478
+ type: "bytes32",
479
+ name: "secret"
480
+ },
481
+ {
482
+ type: "address",
483
+ name: "resolver"
484
+ },
485
+ {
486
+ type: "bytes[]",
487
+ name: "data"
488
+ },
489
+ {
490
+ type: "bool",
491
+ name: "reverseRecord"
492
+ },
493
+ {
494
+ type: "uint16",
495
+ name: "ownerControlledFuses"
496
+ }
497
+ ],
498
+ outputs: []
499
+ },
500
+ "register(string name,address owner,uint256 duration,bytes32 secret,address resolver,bytes[] data,bool reverseRecord,uint16 ownerControlledFuses)": {
501
+ name: "register",
502
+ type: "function",
503
+ stateMutability: "nonpayable",
504
+ inputs: [
505
+ {
506
+ type: "string",
507
+ name: "name"
508
+ },
509
+ {
510
+ type: "address",
511
+ name: "owner"
512
+ },
513
+ {
514
+ type: "uint256",
515
+ name: "duration"
516
+ },
517
+ {
518
+ type: "bytes32",
519
+ name: "secret"
520
+ },
521
+ {
522
+ type: "address",
523
+ name: "resolver"
524
+ },
525
+ {
526
+ type: "bytes[]",
527
+ name: "data"
528
+ },
529
+ {
530
+ type: "bool",
531
+ name: "reverseRecord"
532
+ },
533
+ {
534
+ type: "uint16",
535
+ name: "ownerControlledFuses"
536
+ }
537
+ ],
538
+ outputs: []
539
+ },
540
+ "0x00000000000000000000000000000000000000000000000000000000eb9019d4": {
541
+ name: "getVotes",
542
+ type: "function",
543
+ stateMutability: "view",
544
+ inputs: [
545
+ {
546
+ type: "address",
547
+ name: "account"
548
+ },
549
+ {
550
+ type: "uint256",
551
+ name: "blockNumber"
552
+ }
553
+ ],
554
+ outputs: [
555
+ {
556
+ type: "uint256"
557
+ }
558
+ ]
559
+ },
560
+ "getVotes(address account, uint256 blockNumber) view returns (uint256)": {
561
+ name: "getVotes",
562
+ type: "function",
563
+ stateMutability: "view",
564
+ inputs: [
565
+ {
566
+ type: "address",
567
+ name: "account"
568
+ },
569
+ {
570
+ type: "uint256",
571
+ name: "blockNumber"
572
+ }
573
+ ],
574
+ outputs: [
575
+ {
576
+ type: "uint256"
577
+ }
578
+ ]
579
+ },
580
+ "0x0000000000000000000000000000000000000000000000000000000023b872dd": {
581
+ name: "transferFrom",
582
+ type: "function",
583
+ stateMutability: "nonpayable",
584
+ inputs: [
585
+ {
586
+ type: "address"
587
+ },
588
+ {
589
+ type: "address"
590
+ },
591
+ {
592
+ type: "uint256"
593
+ }
594
+ ],
595
+ outputs: []
596
+ },
597
+ "transferFrom(address,address,uint256)": {
598
+ name: "transferFrom",
599
+ type: "function",
600
+ stateMutability: "nonpayable",
601
+ inputs: [
602
+ {
603
+ type: "address"
604
+ },
605
+ {
606
+ type: "address"
607
+ },
608
+ {
609
+ type: "uint256"
610
+ }
611
+ ],
612
+ outputs: []
613
+ },
614
+ "0x000000000000000000000000000000000000000000000000000000006a627842": {
615
+ name: "mint",
616
+ type: "function",
617
+ stateMutability: "nonpayable",
618
+ inputs: [
619
+ {
620
+ type: "address"
621
+ }
622
+ ],
623
+ outputs: []
624
+ },
625
+ "mint(address)": {
626
+ name: "mint",
627
+ type: "function",
628
+ stateMutability: "nonpayable",
629
+ inputs: [
630
+ {
631
+ type: "address"
632
+ }
633
+ ],
634
+ outputs: []
635
+ }
636
+ }, l0 = {
637
+ "mint(address to, uint256 amount)": "0x0000000000000000000000000000000000000000000000000000000040c10f19",
638
+ "mintPayable(address to, uint256 amount)": "0x0000000000000000000000000000000000000000000000000000000017d304b0",
639
+ "execute(bytes commands,bytes[] inputs)": "0x0000000000000000000000000000000000000000000000000000000024856bc3",
640
+ "register(string name,address owner,uint256 duration,bytes32 secret,address resolver,bytes[] data,bool reverseRecord,uint16 ownerControlledFuses)": "0x0000000000000000000000000000000000000000000000000000000074694a2b",
641
+ "getVotes(address account, uint256 blockNumber) view returns (uint256)": "0x00000000000000000000000000000000000000000000000000000000eb9019d4",
642
+ "transferFrom(address,address,uint256)": "0x0000000000000000000000000000000000000000000000000000000023b872dd",
643
+ "mint(address)": "0x000000000000000000000000000000000000000000000000000000006a627842"
644
+ }, H = {
645
+ abi: y0,
646
+ selectors: l0
647
+ }, g = Symbol.for("@ts-pattern/matcher"), h0 = Symbol.for("@ts-pattern/isVariadic"), P = "@ts-pattern/anonymous-select-key", k = (t) => !!(t && typeof t == "object"), R = (t) => t && !!t[g], h = (t, f, e) => {
648
+ if (R(t)) {
649
+ const n = t[g](), { matched: a, selections: b } = n.match(f);
650
+ return a && b && Object.keys(b).forEach((d) => e(d, b[d])), a;
651
+ }
652
+ if (k(t)) {
653
+ if (!k(f)) return !1;
654
+ if (Array.isArray(t)) {
655
+ if (!Array.isArray(f)) return !1;
656
+ let n = [], a = [], b = [];
657
+ for (const d of t.keys()) {
658
+ const i = t[d];
659
+ R(i) && i[h0] ? b.push(i) : b.length ? a.push(i) : n.push(i);
660
+ }
661
+ if (b.length) {
662
+ if (b.length > 1) throw new Error("Pattern error: Using `...P.array(...)` several times in a single pattern is not allowed.");
663
+ if (f.length < n.length + a.length) return !1;
664
+ const d = f.slice(0, n.length), i = a.length === 0 ? [] : f.slice(-a.length), u = f.slice(n.length, a.length === 0 ? 1 / 0 : -a.length);
665
+ return n.every((c, o) => h(c, d[o], e)) && a.every((c, o) => h(c, i[o], e)) && (b.length === 0 || h(b[0], u, e));
666
+ }
667
+ return t.length === f.length && t.every((d, i) => h(d, f[i], e));
668
+ }
669
+ return Reflect.ownKeys(t).every((n) => {
670
+ const a = t[n];
671
+ return (n in f || R(b = a) && b[g]().matcherType === "optional") && h(a, f[n], e);
672
+ var b;
673
+ });
674
+ }
675
+ return Object.is(f, t);
676
+ }, T = (t) => {
677
+ var f, e, n;
678
+ return k(t) ? R(t) ? (f = (e = (n = t[g]()).getSelectionKeys) == null ? void 0 : e.call(n)) != null ? f : [] : Array.isArray(t) ? C(t, T) : C(Object.values(t), T) : [];
679
+ }, C = (t, f) => t.reduce((e, n) => e.concat(f(n)), []);
680
+ function p(t) {
681
+ return Object.assign(t, { optional: () => m0(t), and: (f) => r(t, f), or: (f) => g0(t, f), select: (f) => f === void 0 ? O(t) : O(f, t) });
682
+ }
683
+ function m0(t) {
684
+ return p({ [g]: () => ({ match: (f) => {
685
+ let e = {};
686
+ const n = (a, b) => {
687
+ e[a] = b;
688
+ };
689
+ return f === void 0 ? (T(t).forEach((a) => n(a, void 0)), { matched: !0, selections: e }) : { matched: h(t, f, n), selections: e };
690
+ }, getSelectionKeys: () => T(t), matcherType: "optional" }) });
691
+ }
692
+ function r(...t) {
693
+ return p({ [g]: () => ({ match: (f) => {
694
+ let e = {};
695
+ const n = (a, b) => {
696
+ e[a] = b;
697
+ };
698
+ return { matched: t.every((a) => h(a, f, n)), selections: e };
699
+ }, getSelectionKeys: () => C(t, T), matcherType: "and" }) });
700
+ }
701
+ function g0(...t) {
702
+ return p({ [g]: () => ({ match: (f) => {
703
+ let e = {};
704
+ const n = (a, b) => {
705
+ e[a] = b;
706
+ };
707
+ return C(t, T).forEach((a) => n(a, void 0)), { matched: t.some((a) => h(a, f, n)), selections: e };
708
+ }, getSelectionKeys: () => C(t, T), matcherType: "or" }) });
709
+ }
710
+ function s(t) {
711
+ return { [g]: () => ({ match: (f) => ({ matched: !!t(f) }) }) };
712
+ }
713
+ function O(...t) {
714
+ const f = typeof t[0] == "string" ? t[0] : void 0, e = t.length === 2 ? t[1] : typeof t[0] == "string" ? void 0 : t[0];
715
+ return p({ [g]: () => ({ match: (n) => {
716
+ let a = { [f ?? P]: n };
717
+ return { matched: e === void 0 || h(e, n, (b, d) => {
718
+ a[b] = d;
719
+ }), selections: a };
720
+ }, getSelectionKeys: () => [f ?? P].concat(e === void 0 ? [] : T(e)) }) });
721
+ }
722
+ function y(t) {
723
+ return typeof t == "number";
724
+ }
725
+ function x(t) {
726
+ return typeof t == "string";
727
+ }
728
+ function w(t) {
729
+ return typeof t == "bigint";
730
+ }
731
+ p(s(function(t) {
732
+ return !0;
733
+ }));
734
+ const v = (t) => Object.assign(p(t), { startsWith: (f) => {
735
+ return v(r(t, (e = f, s((n) => x(n) && n.startsWith(e)))));
736
+ var e;
737
+ }, endsWith: (f) => {
738
+ return v(r(t, (e = f, s((n) => x(n) && n.endsWith(e)))));
739
+ var e;
740
+ }, minLength: (f) => v(r(t, ((e) => s((n) => x(n) && n.length >= e))(f))), length: (f) => v(r(t, ((e) => s((n) => x(n) && n.length === e))(f))), maxLength: (f) => v(r(t, ((e) => s((n) => x(n) && n.length <= e))(f))), includes: (f) => {
741
+ return v(r(t, (e = f, s((n) => x(n) && n.includes(e)))));
742
+ var e;
743
+ }, regex: (f) => {
744
+ return v(r(t, (e = f, s((n) => x(n) && !!n.match(e)))));
745
+ var e;
746
+ } });
747
+ v(s(x));
748
+ const l = (t) => Object.assign(p(t), { between: (f, e) => l(r(t, ((n, a) => s((b) => y(b) && n <= b && a >= b))(f, e))), lt: (f) => l(r(t, ((e) => s((n) => y(n) && n < e))(f))), gt: (f) => l(r(t, ((e) => s((n) => y(n) && n > e))(f))), lte: (f) => l(r(t, ((e) => s((n) => y(n) && n <= e))(f))), gte: (f) => l(r(t, ((e) => s((n) => y(n) && n >= e))(f))), int: () => l(r(t, s((f) => y(f) && Number.isInteger(f)))), finite: () => l(r(t, s((f) => y(f) && Number.isFinite(f)))), positive: () => l(r(t, s((f) => y(f) && f > 0))), negative: () => l(r(t, s((f) => y(f) && f < 0))) });
749
+ l(s(y));
750
+ const A = (t) => Object.assign(p(t), { between: (f, e) => A(r(t, ((n, a) => s((b) => w(b) && n <= b && a >= b))(f, e))), lt: (f) => A(r(t, ((e) => s((n) => w(n) && n < e))(f))), gt: (f) => A(r(t, ((e) => s((n) => w(n) && n > e))(f))), lte: (f) => A(r(t, ((e) => s((n) => w(n) && n <= e))(f))), gte: (f) => A(r(t, ((e) => s((n) => w(n) && n >= e))(f))), positive: () => A(r(t, s((f) => w(f) && f > 0))), negative: () => A(r(t, s((f) => w(f) && f < 0))) });
751
+ A(s(w));
752
+ p(s(function(t) {
753
+ return typeof t == "boolean";
754
+ }));
755
+ p(s(function(t) {
756
+ return typeof t == "symbol";
757
+ }));
758
+ p(s(function(t) {
759
+ return t == null;
760
+ }));
761
+ p(s(function(t) {
762
+ return t != null;
763
+ }));
764
+ class x0 extends Error {
765
+ constructor(f) {
766
+ let e;
767
+ try {
768
+ e = JSON.stringify(f);
769
+ } catch {
770
+ e = f;
771
+ }
772
+ super(`Pattern matching error: no pattern matches value ${e}`), this.input = void 0, this.input = f;
773
+ }
774
+ }
775
+ const B = { matched: !1, value: void 0 };
776
+ function W(t) {
777
+ return new D(t, B);
778
+ }
779
+ class D {
780
+ constructor(f, e) {
781
+ this.input = void 0, this.state = void 0, this.input = f, this.state = e;
782
+ }
783
+ with(...f) {
784
+ if (this.state.matched) return this;
785
+ const e = f[f.length - 1], n = [f[0]];
786
+ let a;
787
+ f.length === 3 && typeof f[1] == "function" ? a = f[1] : f.length > 2 && n.push(...f.slice(1, f.length - 1));
788
+ let b = !1, d = {};
789
+ const i = (c, o) => {
790
+ b = !0, d[c] = o;
791
+ }, u = !n.some((c) => h(c, this.input, i)) || a && !a(this.input) ? B : { matched: !0, value: e(b ? P in d ? d[P] : d : this.input, this.input) };
792
+ return new D(this.input, u);
793
+ }
794
+ when(f, e) {
795
+ if (this.state.matched) return this;
796
+ const n = !!f(this.input);
797
+ return new D(this.input, n ? { matched: !0, value: e(this.input, this.input) } : B);
798
+ }
799
+ otherwise(f) {
800
+ return this.state.matched ? this.state.value : f(this.input);
801
+ }
802
+ exhaustive() {
803
+ if (this.state.matched) return this.state.value;
804
+ throw new x0(this.input);
805
+ }
806
+ run() {
807
+ return this.exhaustive();
808
+ }
809
+ returnType() {
810
+ return this;
811
+ }
812
+ }
813
+ var w0 = /* @__PURE__ */ ((t) => (t[t.EQUAL = 0] = "EQUAL", t[t.NOT_EQUAL = 1] = "NOT_EQUAL", t[t.GREATER_THAN = 2] = "GREATER_THAN", t[t.LESS_THAN = 3] = "LESS_THAN", t[t.CONTAINS = 4] = "CONTAINS", t[t.REGEX = 5] = "REGEX", t))(w0 || {}), v0 = /* @__PURE__ */ ((t) => (t[t.UINT = 0] = "UINT", t[t.ADDRESS = 1] = "ADDRESS", t[t.BYTES = 2] = "BYTES", t[t.STRING = 3] = "STRING", t))(v0 || {}), A0 = /* @__PURE__ */ ((t) => (t[t.EVENT = 0] = "EVENT", t[t.FUNC = 1] = "FUNC", t))(A0 || {});
814
+ function T0(t) {
815
+ return Array.isArray(t.actionSteps);
816
+ }
817
+ const M = class M extends a0 {
818
+ constructor() {
819
+ super(...arguments), this.abi = _;
820
+ }
821
+ /**
822
+ * Gets a specific action event by index
823
+ *
824
+ * @public
825
+ * @async
826
+ * @param {number} index The index of the action event to retrieve
827
+ * @param {?ReadEventActionParams<'getActionStep'>} [params]
828
+ * @returns {Promise<ActionStep>}
829
+ */
830
+ async getActionStep(f, e) {
831
+ return (await this.getActionSteps(e)).at(f);
832
+ }
833
+ /**
834
+ * Gets all action events
835
+ *
836
+ * @public
837
+ * @async
838
+ * @param {?ReadEventActionParams<'getActionSteps'>} [params]
839
+ * @returns {Promise<ActionStep[]>}
840
+ */
841
+ async getActionSteps(f) {
842
+ const e = await q(this._config, {
843
+ address: this.assertValidAddress(),
844
+ ...this.optionallyAttachAccount(),
845
+ // biome-ignore lint/suspicious/noExplicitAny: Accept any shape of valid wagmi/viem parameters, wagmi does the same thing internally
846
+ ...f
847
+ });
848
+ return I0(e.map(Q));
849
+ }
850
+ /**
851
+ * Gets the count of action events
852
+ *
853
+ * @public
854
+ * @async
855
+ * @param {?ReadEventActionParams<'getActionStepsCount'>} [params]
856
+ * @returns {Promise<bigint>}
857
+ */
858
+ async getActionStepsCount(f) {
859
+ return (await this.getActionSteps(f)).length;
860
+ }
861
+ /**
862
+ * Retrieves the payload describing how claimants can be identified from logs or function calls.
863
+ *
864
+ * @public
865
+ * @async
866
+ * @param {?ReadEventActionParams<'getActionClaimant'>} [params]
867
+ * @returns {Promise<ActionClaimant>}
868
+ */
869
+ async getActionClaimant(f) {
870
+ const e = await z(this._config, {
871
+ address: this.assertValidAddress(),
872
+ ...this.optionallyAttachAccount(),
873
+ ...f
874
+ });
875
+ return Q(e);
876
+ }
877
+ /**
878
+ * Executes a prepared event action
879
+ *
880
+ * @public
881
+ * @async
882
+ * @param {Hex} data
883
+ * @param {?WriteParams} [params]
884
+ * @returns {Promise<readonly [boolean, `0x${string}`]>}
885
+ */
886
+ async execute(f, e) {
887
+ return await this.awaitResult(this.executeRaw(f, e));
888
+ }
889
+ /**
890
+ * Executes a prepared event action
891
+ *
892
+ * @public
893
+ * @async
894
+ * @param {Hex} data
895
+ * @param {?WriteParams} [params]
896
+ * @returns {Promise<{ hash: `0x${string}`; result: readonly [boolean, `0x${string}`]; }>}
897
+ */
898
+ async executeRaw(f, e) {
899
+ const { request: n, result: a } = await J(this._config, {
900
+ address: this.assertValidAddress(),
901
+ ...this.optionallyAttachAccount(),
902
+ // biome-ignore lint/suspicious/noExplicitAny: Accept any shape of valid wagmi/viem parameters, wagmi does the same thing internally
903
+ ...e,
904
+ args: [f]
905
+ });
906
+ return { hash: await Y(this._config, n), result: a };
907
+ }
908
+ /**
909
+ * Derives the action claimant address from a transaction based on the provided ActionClaimant configuration.
910
+ * This method supports both event-based and function-based claimant derivation.
911
+ *
912
+ ** @example
913
+ * // Example usage
914
+ * const eventAction = boost.action as EventAction
915
+ * const claimant = await eventAction.getActionClaimant() // {
916
+ * signatureType: SignatureType.EVENT,
917
+ * signature: '0x1234...',
918
+ * fieldIndex: 2,
919
+ * targetContract: '0xabcd...',
920
+ * chainid: 1
921
+ * };
922
+ * const params: ValidateActionStepParams = {
923
+ * hash: '0x5678...',
924
+ * chainId: 1,
925
+ * knownSignatures?: {
926
+ * '0x1234...': {}
927
+ * }
928
+ * };
929
+ * const claimantAddress = await eventAction.deriveActionClaimantFromTransaction(claimant, params);
930
+ *
931
+ * @param {ActionClaimant} claimant - The configuration specifying how to derive the claimant.
932
+ * @param {ValidateActionStepParams} params - Parameters for validation, including transaction hash, known signatures, logs, and chain ID.
933
+ * @returns {Promise<Address | undefined>} The derived claimant address if found, undefined otherwise.
934
+ * @throws {ValidationAbiMissingError} If the ABI for the specified signature is not found.
935
+ * @throws {FunctionDataDecodeError} If there's an error decoding function data (for function-based derivation).
936
+ */
937
+ async deriveActionClaimantFromTransaction(f, e) {
938
+ var a, b;
939
+ const n = f.signature;
940
+ if (f.signatureType === 0) {
941
+ let d;
942
+ if (e.abiItem && (d = e.abiItem), e.knownSignatures ? d = (a = e.knownSignatures) == null ? void 0 : a[n] : d = K.abi[n], !d)
943
+ throw new N(n);
944
+ let i;
945
+ if ("logs" in e) {
946
+ for (let o of e.logs) {
947
+ if (!I(o.address, f.targetContract)) continue;
948
+ let m = this.validateClaimantAgainstArgs(
949
+ f,
950
+ o
951
+ );
952
+ m && (i = m);
953
+ }
954
+ return i;
955
+ }
956
+ const c = (await Z(this._config, e)).logs.map((o) => {
957
+ const { eventName: m, args: X } = V({
958
+ abi: [d],
959
+ data: o.data,
960
+ topics: o.topics
961
+ });
962
+ return { ...o, eventName: m, args: X };
963
+ });
964
+ for (let o of c) {
965
+ if (!I(o.address, f.targetContract)) continue;
966
+ let m = this.validateClaimantAgainstArgs(f, o);
967
+ m && (i = m);
968
+ }
969
+ return i;
970
+ }
971
+ if (f.signatureType === 1 && "hash" in e && "chainId" in e) {
972
+ const d = await f0(this._config, {
973
+ hash: e.hash
974
+ });
975
+ if (!I(d.to, f.targetContract)) return;
976
+ let i;
977
+ if (e.abiItem && (i = e.abiItem), e.knownSignatures ? i = (b = e.knownSignatures) == null ? void 0 : b[n] : i = H.abi[n], !i)
978
+ throw new N(f.signature);
979
+ let u;
980
+ try {
981
+ u = L({
982
+ abi: [i],
983
+ data: d.input
984
+ });
985
+ } catch (c) {
986
+ throw new U([i], c);
987
+ }
988
+ return this.validateClaimantAgainstArgs(f, u);
989
+ }
990
+ }
991
+ /**
992
+ * Validates the action claimant against the arguments of a log or function data.
993
+ *
994
+ * @param {ActionClaimant} claimant - The action claimant to validate.
995
+ * @param {Object} [logOrFnData] - Optional object containing the arguments to validate against.
996
+ * @param {Array<any> | readonly unknown[] | Record<string, unknown>} [logOrFnData.args] - The arguments from the log or function data.
997
+ * @returns {Address | undefined} The validated address if found and valid, otherwise undefined.
998
+ */
999
+ validateClaimantAgainstArgs(f, e) {
1000
+ if (!e || !Array.isArray(e == null ? void 0 : e.args) || (e == null ? void 0 : e.args.length) <= f.fieldIndex)
1001
+ return;
1002
+ const n = e.args.at(f.fieldIndex);
1003
+ if (e0(n)) return n;
1004
+ }
1005
+ /**
1006
+ * Retrieves action steps, and uses them to validate against, and optionally fetch logs that match the step's signature.
1007
+ * If logs are provided in the optional `params` argument, then those logs will be used instead of fetched with the configured client.
1008
+ *
1009
+ * @public
1010
+ * @async
1011
+ * @param ValidateActionStepParams params
1012
+ * @returns {Promise<boolean>}
1013
+ */
1014
+ async validateActionSteps(f) {
1015
+ const e = await this.getActionSteps();
1016
+ for (const n of e)
1017
+ if (!await this.isActionStepValid(n, f))
1018
+ return !1;
1019
+ return !0;
1020
+ }
1021
+ /**
1022
+ * Validates a single action step with a given criteria against logs or function calls.
1023
+ * If logs are provided in the optional `params` argument, then those logs will be used instead of being fetched with the configured client.
1024
+ * For functions a hash is required.
1025
+ *
1026
+ * @public
1027
+ * @async
1028
+ * @param {ActionStep} actionStep - The action step to validate. Can be a function of event step.
1029
+ * @param {ValidateActionStepParams} params - Additional parameters for validation, including hash, known events, logs, and chain ID.
1030
+ * @returns {Promise<boolean>}
1031
+ */
1032
+ async isActionStepValid(f, e) {
1033
+ var n;
1034
+ if (f.signatureType === 0) {
1035
+ const a = f.signature;
1036
+ let b;
1037
+ if (e.abiItem && (b = e.abiItem), e.knownSignatures ? b = (n = e.knownSignatures) == null ? void 0 : n[a] : b = K.abi[a], !b)
1038
+ throw new N(a);
1039
+ if (this.isArraylikeIndexed(f, b))
1040
+ throw new b0(
1041
+ f.actionParameter.fieldIndex,
1042
+ b
1043
+ );
1044
+ if ("logs" in e)
1045
+ return this.isActionEventValid(f, e.logs);
1046
+ const u = (await this._config.getClient({
1047
+ chainId: e.chainId
1048
+ }).getTransactionReceipt({
1049
+ hash: e.hash
1050
+ })).logs.map((c) => {
1051
+ const { eventName: o, args: m } = V({
1052
+ abi: [b],
1053
+ data: c.data,
1054
+ topics: c.topics
1055
+ });
1056
+ return { ...c, eventName: o, args: m };
1057
+ });
1058
+ return this.isActionEventValid(f, u);
1059
+ }
1060
+ if (f.signatureType === 1 && "hash" in e && "chainId" in e) {
1061
+ const b = await this._config.getClient({
1062
+ chainId: e.chainId
1063
+ }).getTransaction({
1064
+ hash: e.hash
1065
+ });
1066
+ return this.isActionFunctionValid(f, b, e);
1067
+ }
1068
+ return !1;
1069
+ }
1070
+ /**
1071
+ * Validates a single action event with a given criteria against logs.
1072
+ * If logs are provided in the optional `params` argument, then those logs will be used instead of being fetched with the configured client.
1073
+ *
1074
+ * @public
1075
+ * @async
1076
+ * @param {ActionStep} actionStep - The action step containing the event to validate.
1077
+ * @param {EventLogs} logs - Event logs to validate the given step against
1078
+ * @returns {Promise<boolean>} Resolves to true if the action event is valid, throws if input is invalid, otherwise false.
1079
+ */
1080
+ isActionEventValid(f, e) {
1081
+ const n = f.actionParameter;
1082
+ if (!e.length) return !1;
1083
+ for (let a of e)
1084
+ if (this.validateLogAgainstCriteria(n, a))
1085
+ return !0;
1086
+ return !1;
1087
+ }
1088
+ /**
1089
+ * Validates a single action function with a given criteria against the transaction input.
1090
+ *
1091
+ * @public
1092
+ * @param {ActionStep} actionStep - The action step containing the function to validate.
1093
+ * @param {Transaction} transaction - The transaction that will be validated against.
1094
+ * @param {Object} [params] - Optional parameters for validation.
1095
+ * @param {AbiItem} [params.abiItem] - The ABI item for the function, if known.
1096
+ * @param {Record<Hex, AbiEvent | AbiFunction>} [params.knownSignatures] - A record of known signatures.
1097
+ * @returns {boolean} Returns true if the action function is valid, false otherwise.
1098
+ * @throws {ValidationAbiMissingError} Throws if the ABI for the function signature is not found.
1099
+ * @throws {FunctionDataDecodeError} Throws if there's an error decoding the function data.
1100
+ */
1101
+ isActionFunctionValid(f, e, n) {
1102
+ var c;
1103
+ const a = f.actionParameter;
1104
+ let b = f.signature, d;
1105
+ if (n != null && n.abiItem && (d = n == null ? void 0 : n.abiItem), n != null && n.knownSignatures ? d = (c = n == null ? void 0 : n.knownSignatures) == null ? void 0 : c[b] : d = H.abi[b], !d)
1106
+ throw new N(b);
1107
+ let i;
1108
+ try {
1109
+ i = L({
1110
+ abi: [d],
1111
+ data: e.input
1112
+ });
1113
+ } catch (o) {
1114
+ throw new U([d], o);
1115
+ }
1116
+ const u = i.args;
1117
+ return !(!u || !i || !this.validateFunctionAgainstCriteria(
1118
+ a,
1119
+ u
1120
+ ));
1121
+ }
1122
+ /**
1123
+ * Validates a field against a given criteria.
1124
+ *
1125
+ * @param {Criteria} criteria - The criteria to validate against.
1126
+ * @param {string | bigint | Hex} fieldValue - The field value to validate.
1127
+ * @param {Object} input - Additional context for validation.
1128
+ * @param {EventLogs[0]} [input.log] - The event log, if validating an event.
1129
+ * @param {readonly (string | bigint)[]} [input.decodedArgs] - The decoded function arguments, if validating a function call.
1130
+ * @returns {Promise<boolean>} - Returns true if the field passes the criteria, false otherwise.
1131
+ */
1132
+ validateFieldAgainstCriteria(f, e, n) {
1133
+ switch (f.filterType) {
1134
+ case 0:
1135
+ return W(f.fieldType).with(
1136
+ 1,
1137
+ () => I(f.filterData, e)
1138
+ ).with(
1139
+ 0,
1140
+ () => BigInt(e) === BigInt(f.filterData)
1141
+ ).with(
1142
+ 3,
1143
+ () => e === E(f.filterData, "string")
1144
+ ).otherwise(() => e === f.filterData);
1145
+ case 1:
1146
+ return W(f.fieldType).with(
1147
+ 1,
1148
+ () => !I(f.filterData, e)
1149
+ ).with(
1150
+ 0,
1151
+ () => BigInt(e) !== BigInt(f.filterData)
1152
+ ).with(
1153
+ 3,
1154
+ () => e !== E(f.filterData, "string")
1155
+ ).otherwise(() => e !== f.filterData);
1156
+ case 2:
1157
+ if (f.fieldType === 0)
1158
+ return BigInt(e) > BigInt(f.filterData);
1159
+ throw new G({
1160
+ ...n,
1161
+ criteria: f,
1162
+ fieldValue: e
1163
+ });
1164
+ case 3:
1165
+ if (f.fieldType === 0)
1166
+ return BigInt(e) < BigInt(f.filterData);
1167
+ throw new G({
1168
+ ...n,
1169
+ criteria: f,
1170
+ fieldValue: e
1171
+ });
1172
+ case 4:
1173
+ if (f.fieldType === 2 || f.fieldType === 3) {
1174
+ let a;
1175
+ return f.fieldType === 3 ? a = E(f.filterData, "string") : a = f.filterData.slice(2), e.includes(a);
1176
+ }
1177
+ throw new F({
1178
+ ...n,
1179
+ criteria: f,
1180
+ fieldValue: e
1181
+ });
1182
+ case 5:
1183
+ if (typeof e != "string")
1184
+ throw new F({
1185
+ ...n,
1186
+ criteria: f,
1187
+ fieldValue: e
1188
+ });
1189
+ if (f.fieldType === 3) {
1190
+ const a = E(f.filterData, "string");
1191
+ return new RegExp(a).test(e);
1192
+ }
1193
+ default:
1194
+ throw new d0({
1195
+ ...n,
1196
+ criteria: f,
1197
+ fieldValue: e
1198
+ });
1199
+ }
1200
+ }
1201
+ /**
1202
+ * Validates a {@link Log} against a given criteria.
1203
+ *
1204
+ * @param {Criteria} criteria - The criteria to validate against.
1205
+ * @param {Log} log - The Viem event log.
1206
+ * @returns {boolean} - Returns true if the log passes the criteria, false otherwise.
1207
+ */
1208
+ validateLogAgainstCriteria(f, e) {
1209
+ if (!Array.isArray(e.args) || e.args.length <= f.fieldIndex)
1210
+ throw new i0({
1211
+ log: e,
1212
+ criteria: f,
1213
+ fieldValue: void 0
1214
+ });
1215
+ const n = e.args.at(f.fieldIndex);
1216
+ if (n === void 0)
1217
+ throw new j({ log: e, criteria: f, fieldValue: n });
1218
+ return this.validateFieldAgainstCriteria(f, n, { log: e });
1219
+ }
1220
+ /**
1221
+ * Validates a function's decoded arguments against a given criteria.
1222
+ *
1223
+ * @param {Criteria} criteria - The criteria to validate against.
1224
+ * @param {unknown[]} decodedArgs - The decoded arguments of the function call.
1225
+ * @returns {Promise<boolean>} - Returns true if the decoded argument passes the criteria, false otherwise.
1226
+ */
1227
+ validateFunctionAgainstCriteria(f, e) {
1228
+ const n = e[f.fieldIndex];
1229
+ if (n === void 0)
1230
+ throw new j({
1231
+ criteria: f,
1232
+ fieldValue: n
1233
+ });
1234
+ return this.validateFieldAgainstCriteria(f, n, {
1235
+ decodedArgs: e
1236
+ });
1237
+ }
1238
+ /**
1239
+ * @inheritdoc
1240
+ *
1241
+ * @public
1242
+ * @param {?EventActionPayload} [_payload]
1243
+ * @param {?DeployableOptions} [_options]
1244
+ * @returns {GenericDeployableParams}
1245
+ */
1246
+ buildParameters(f, e) {
1247
+ const [n, a] = this.validateDeploymentConfig(
1248
+ f,
1249
+ e
1250
+ );
1251
+ let b;
1252
+ if (T0(n)) {
1253
+ let d = n.actionSteps.filter((u) => !!u);
1254
+ if (d.length === 0)
1255
+ throw new s0();
1256
+ if (d.length > 4)
1257
+ throw new r0();
1258
+ let i = Array.from({ length: 4 }, (u, c) => d.at(c) || d.at(-1));
1259
+ b = {
1260
+ actionClaimant: n.actionClaimant,
1261
+ actionStepOne: i[0],
1262
+ actionStepTwo: i[1],
1263
+ actionStepThree: i[2],
1264
+ actionStepFour: i[3]
1265
+ };
1266
+ } else
1267
+ b = n;
1268
+ return {
1269
+ abi: _,
1270
+ bytecode: o0,
1271
+ args: [S0(b)],
1272
+ ...this.optionallyAttachAccount(a.account)
1273
+ };
1274
+ }
1275
+ isArraylikeIndexed(f, e) {
1276
+ var n;
1277
+ return !!((f.actionParameter.fieldType === 3 || f.actionParameter.fieldType === 2) && ((n = e.inputs[f.actionParameter.fieldIndex]) != null && n.indexed));
1278
+ }
1279
+ };
1280
+ M.bases = {
1281
+ ...n0
1282
+ }, M.registryType = c0.ACTION;
1283
+ let $ = M;
1284
+ function I0(t) {
1285
+ const f = [], e = {};
1286
+ for (let n of t) {
1287
+ const a = JSON.stringify(n);
1288
+ e[a] || (f.push(n), e[a] = !0);
1289
+ }
1290
+ return f;
1291
+ }
1292
+ function S(t) {
1293
+ return {
1294
+ ...t,
1295
+ chainid: BigInt(t.chainid)
1296
+ };
1297
+ }
1298
+ function Q(t) {
1299
+ if (t.chainid > BigInt(Number.MAX_SAFE_INTEGER))
1300
+ throw new Error("Chain ID exceeds max safe integer");
1301
+ return {
1302
+ ...t,
1303
+ chainid: Number(t.chainid)
1304
+ };
1305
+ }
1306
+ function S0({
1307
+ actionClaimant: t,
1308
+ actionStepOne: f,
1309
+ actionStepTwo: e,
1310
+ actionStepThree: n,
1311
+ actionStepFour: a
1312
+ }) {
1313
+ return t0(
1314
+ [
1315
+ {
1316
+ type: "tuple",
1317
+ name: "initPayload",
1318
+ components: [
1319
+ {
1320
+ type: "tuple",
1321
+ name: "actionClaimant",
1322
+ components: [
1323
+ { type: "uint8", name: "signatureType" },
1324
+ { type: "bytes32", name: "signature" },
1325
+ { type: "uint8", name: "fieldIndex" },
1326
+ { type: "address", name: "targetContract" },
1327
+ { type: "uint256", name: "chainid" }
1328
+ ]
1329
+ },
1330
+ {
1331
+ type: "tuple",
1332
+ name: "actionStepOne",
1333
+ components: [
1334
+ { type: "bytes32", name: "signature" },
1335
+ { type: "uint8", name: "signatureType" },
1336
+ { type: "uint8", name: "actionType" },
1337
+ { type: "address", name: "targetContract" },
1338
+ { type: "uint256", name: "chainid" },
1339
+ {
1340
+ type: "tuple",
1341
+ name: "actionParameter",
1342
+ components: [
1343
+ { type: "uint8", name: "filterType" },
1344
+ { type: "uint8", name: "fieldType" },
1345
+ { type: "uint8", name: "fieldIndex" },
1346
+ { type: "bytes", name: "filterData" }
1347
+ ]
1348
+ }
1349
+ ]
1350
+ },
1351
+ {
1352
+ type: "tuple",
1353
+ name: "actionStepTwo",
1354
+ components: [
1355
+ { type: "bytes32", name: "signature" },
1356
+ { type: "uint8", name: "signatureType" },
1357
+ { type: "uint8", name: "actionType" },
1358
+ { type: "address", name: "targetContract" },
1359
+ { type: "uint256", name: "chainid" },
1360
+ {
1361
+ type: "tuple",
1362
+ name: "actionParameter",
1363
+ components: [
1364
+ { type: "uint8", name: "filterType" },
1365
+ { type: "uint8", name: "fieldType" },
1366
+ { type: "uint8", name: "fieldIndex" },
1367
+ { type: "bytes", name: "filterData" }
1368
+ ]
1369
+ }
1370
+ ]
1371
+ },
1372
+ {
1373
+ type: "tuple",
1374
+ name: "actionStepThree",
1375
+ components: [
1376
+ { type: "bytes32", name: "signature" },
1377
+ { type: "uint8", name: "signatureType" },
1378
+ { type: "uint8", name: "actionType" },
1379
+ { type: "address", name: "targetContract" },
1380
+ { type: "uint256", name: "chainid" },
1381
+ {
1382
+ type: "tuple",
1383
+ name: "actionParameter",
1384
+ components: [
1385
+ { type: "uint8", name: "filterType" },
1386
+ { type: "uint8", name: "fieldType" },
1387
+ { type: "uint8", name: "fieldIndex" },
1388
+ { type: "bytes", name: "filterData" }
1389
+ ]
1390
+ }
1391
+ ]
1392
+ },
1393
+ {
1394
+ type: "tuple",
1395
+ name: "actionStepFour",
1396
+ components: [
1397
+ { type: "bytes32", name: "signature" },
1398
+ { type: "uint8", name: "signatureType" },
1399
+ { type: "uint8", name: "actionType" },
1400
+ { type: "address", name: "targetContract" },
1401
+ { type: "uint256", name: "chainid" },
1402
+ {
1403
+ type: "tuple",
1404
+ name: "actionParameter",
1405
+ components: [
1406
+ { type: "uint8", name: "filterType" },
1407
+ { type: "uint8", name: "fieldType" },
1408
+ { type: "uint8", name: "fieldIndex" },
1409
+ { type: "bytes", name: "filterData" }
1410
+ ]
1411
+ }
1412
+ ]
1413
+ }
1414
+ ]
1415
+ }
1416
+ ],
1417
+ [
1418
+ {
1419
+ actionClaimant: S(t),
1420
+ actionStepOne: {
1421
+ ...S(f),
1422
+ actionType: f.actionType || 0
1423
+ },
1424
+ actionStepTwo: {
1425
+ ...S(e),
1426
+ actionType: e.actionType || 0
1427
+ },
1428
+ actionStepThree: {
1429
+ ...S(n),
1430
+ actionType: n.actionType || 0
1431
+ },
1432
+ actionStepFour: {
1433
+ ...S(a),
1434
+ actionType: a.actionType || 0
1435
+ }
1436
+ }
1437
+ ]
1438
+ );
1439
+ }
1440
+ export {
1441
+ $ as E,
1442
+ w0 as F,
1443
+ v0 as P,
1444
+ A0 as S,
1445
+ K as e,
1446
+ H as f,
1447
+ T0 as i,
1448
+ S0 as p
1449
+ };
1450
+ //# sourceMappingURL=EventAction-CIPqmAoP.js.map