@boostxyz/sdk 0.0.0-alpha.16 → 0.0.0-alpha.18

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 (223) hide show
  1. package/dist/Actions/Action.cjs +1 -1
  2. package/dist/Actions/Action.cjs.map +1 -1
  3. package/dist/Actions/Action.js +7 -7
  4. package/dist/Actions/ContractAction.d.ts +9 -9
  5. package/dist/Actions/ContractAction.d.ts.map +1 -1
  6. package/dist/Actions/ERC721MintAction.d.ts +12 -12
  7. package/dist/Actions/ERC721MintAction.d.ts.map +1 -1
  8. package/dist/Actions/EventAction.cjs +1 -1
  9. package/dist/Actions/EventAction.cjs.map +1 -1
  10. package/dist/Actions/EventAction.d.ts +32 -49
  11. package/dist/Actions/EventAction.d.ts.map +1 -1
  12. package/dist/Actions/EventAction.js +13 -779
  13. package/dist/Actions/EventAction.js.map +1 -1
  14. package/dist/AllowLists/AllowList.cjs +1 -1
  15. package/dist/AllowLists/AllowList.cjs.map +1 -1
  16. package/dist/AllowLists/AllowList.js +3 -3
  17. package/dist/AllowLists/OpenAllowList.d.ts +183 -0
  18. package/dist/AllowLists/OpenAllowList.d.ts.map +1 -1
  19. package/dist/AllowLists/SimpleAllowList.cjs +1 -1
  20. package/dist/AllowLists/SimpleAllowList.cjs.map +1 -1
  21. package/dist/AllowLists/SimpleAllowList.d.ts +82 -36
  22. package/dist/AllowLists/SimpleAllowList.d.ts.map +1 -1
  23. package/dist/AllowLists/SimpleAllowList.js +44 -80
  24. package/dist/AllowLists/SimpleAllowList.js.map +1 -1
  25. package/dist/AllowLists/SimpleDenyList.cjs +1 -1
  26. package/dist/AllowLists/SimpleDenyList.d.ts +192 -9
  27. package/dist/AllowLists/SimpleDenyList.d.ts.map +1 -1
  28. package/dist/AllowLists/SimpleDenyList.js +5 -5
  29. package/dist/Auth/PassthroughAuth.cjs +1 -1
  30. package/dist/Auth/PassthroughAuth.js +1 -1
  31. package/dist/Boost.cjs.map +1 -1
  32. package/dist/Boost.d.ts +18 -0
  33. package/dist/Boost.d.ts.map +1 -1
  34. package/dist/Boost.js.map +1 -1
  35. package/dist/BoostCore-BiPwp6SR.cjs +3 -0
  36. package/dist/BoostCore-BiPwp6SR.cjs.map +1 -0
  37. package/dist/BoostCore-C00iqvks.js +1477 -0
  38. package/dist/BoostCore-C00iqvks.js.map +1 -0
  39. package/dist/BoostCore.cjs +1 -2
  40. package/dist/BoostCore.cjs.map +1 -1
  41. package/dist/BoostCore.d.ts +80 -35
  42. package/dist/BoostCore.d.ts.map +1 -1
  43. package/dist/BoostCore.js +29 -1273
  44. package/dist/BoostCore.js.map +1 -1
  45. package/dist/BoostRegistry.cjs +1 -1
  46. package/dist/BoostRegistry.cjs.map +1 -1
  47. package/dist/BoostRegistry.d.ts +18 -18
  48. package/dist/BoostRegistry.js +36 -36
  49. package/dist/BoostRegistry.js.map +1 -1
  50. package/dist/Budgets/Budget.cjs +1 -1
  51. package/dist/Budgets/Budget.cjs.map +1 -1
  52. package/dist/Budgets/Budget.d.ts.map +1 -1
  53. package/dist/Budgets/Budget.js +2 -2
  54. package/dist/Budgets/Budget.js.map +1 -1
  55. package/dist/Budgets/ManagedBudget.cjs +1 -1
  56. package/dist/Budgets/ManagedBudget.cjs.map +1 -1
  57. package/dist/Budgets/ManagedBudget.d.ts +24 -174
  58. package/dist/Budgets/ManagedBudget.d.ts.map +1 -1
  59. package/dist/Budgets/ManagedBudget.js +76 -298
  60. package/dist/Budgets/ManagedBudget.js.map +1 -1
  61. package/dist/Budgets/VestingBudget.d.ts +181 -77
  62. package/dist/Budgets/VestingBudget.d.ts.map +1 -1
  63. package/dist/Deployable/Contract.cjs +1 -1
  64. package/dist/Deployable/Contract.cjs.map +1 -1
  65. package/dist/Deployable/Contract.d.ts +4 -5
  66. package/dist/Deployable/Contract.d.ts.map +1 -1
  67. package/dist/Deployable/Contract.js +4 -5
  68. package/dist/Deployable/Contract.js.map +1 -1
  69. package/dist/Deployable/Deployable.cjs.map +1 -1
  70. package/dist/Deployable/Deployable.d.ts +1 -1
  71. package/dist/Deployable/Deployable.js +1 -1
  72. package/dist/Deployable/Deployable.js.map +1 -1
  73. package/dist/Deployable/DeployableTarget.cjs +1 -1
  74. package/dist/Deployable/DeployableTarget.cjs.map +1 -1
  75. package/dist/Deployable/DeployableTarget.d.ts +5 -5
  76. package/dist/Deployable/DeployableTarget.js +10 -10
  77. package/dist/Deployable/DeployableTarget.js.map +1 -1
  78. package/dist/Deployable/DeployableTargetWithRBAC.cjs +2 -0
  79. package/dist/Deployable/DeployableTargetWithRBAC.cjs.map +1 -0
  80. package/dist/Deployable/DeployableTargetWithRBAC.d.ts +179 -0
  81. package/dist/Deployable/DeployableTargetWithRBAC.d.ts.map +1 -0
  82. package/dist/Deployable/DeployableTargetWithRBAC.js +222 -0
  83. package/dist/Deployable/DeployableTargetWithRBAC.js.map +1 -0
  84. package/dist/EventAction-BO5WI_5s.js +1355 -0
  85. package/dist/EventAction-BO5WI_5s.js.map +1 -0
  86. package/dist/EventAction-DBDRaG4A.cjs +2 -0
  87. package/dist/EventAction-DBDRaG4A.cjs.map +1 -0
  88. package/dist/{Incentive-CtuAJAjG.js → Incentive-CF7kaz_9.js} +67 -68
  89. package/dist/Incentive-CF7kaz_9.js.map +1 -0
  90. package/dist/{Incentive-CqX3fYEd.cjs → Incentive-Djnzseoj.cjs} +2 -2
  91. package/dist/Incentive-Djnzseoj.cjs.map +1 -0
  92. package/dist/Incentives/AllowListIncentive.cjs +1 -1
  93. package/dist/Incentives/AllowListIncentive.cjs.map +1 -1
  94. package/dist/Incentives/AllowListIncentive.d.ts +12 -12
  95. package/dist/Incentives/AllowListIncentive.js +26 -26
  96. package/dist/Incentives/AllowListIncentive.js.map +1 -1
  97. package/dist/Incentives/CGDAIncentive.cjs +1 -1
  98. package/dist/Incentives/CGDAIncentive.cjs.map +1 -1
  99. package/dist/Incentives/CGDAIncentive.d.ts +15 -15
  100. package/dist/Incentives/CGDAIncentive.js +25 -25
  101. package/dist/Incentives/CGDAIncentive.js.map +1 -1
  102. package/dist/Incentives/ERC1155Incentive.d.ts +30 -30
  103. package/dist/Incentives/ERC20Incentive.cjs +1 -1
  104. package/dist/Incentives/ERC20Incentive.cjs.map +1 -1
  105. package/dist/Incentives/ERC20Incentive.d.ts +23 -23
  106. package/dist/Incentives/ERC20Incentive.js +45 -45
  107. package/dist/Incentives/ERC20Incentive.js.map +1 -1
  108. package/dist/Incentives/ERC20VariableCriteriaIncentive.d.ts +523 -0
  109. package/dist/Incentives/ERC20VariableCriteriaIncentive.d.ts.map +1 -0
  110. package/dist/Incentives/ERC20VariableIncentive.d.ts +19 -19
  111. package/dist/Incentives/Incentive.cjs +1 -1
  112. package/dist/Incentives/Incentive.d.ts +3 -3
  113. package/dist/Incentives/Incentive.d.ts.map +1 -1
  114. package/dist/Incentives/Incentive.js +3 -3
  115. package/dist/Incentives/PointsIncentive.cjs +1 -1
  116. package/dist/Incentives/PointsIncentive.cjs.map +1 -1
  117. package/dist/Incentives/PointsIncentive.d.ts +14 -14
  118. package/dist/Incentives/PointsIncentive.js +20 -20
  119. package/dist/Incentives/PointsIncentive.js.map +1 -1
  120. package/dist/SimpleDenyList-BwfNjRsg.cjs +2 -0
  121. package/dist/SimpleDenyList-BwfNjRsg.cjs.map +1 -0
  122. package/dist/SimpleDenyList-D9i4rw_F.js +132 -0
  123. package/dist/SimpleDenyList-D9i4rw_F.js.map +1 -0
  124. package/dist/Validators/SignerValidator.cjs +1 -1
  125. package/dist/Validators/SignerValidator.cjs.map +1 -1
  126. package/dist/Validators/SignerValidator.d.ts +14 -14
  127. package/dist/Validators/SignerValidator.js +25 -25
  128. package/dist/Validators/SignerValidator.js.map +1 -1
  129. package/dist/Validators/Validator.cjs +1 -1
  130. package/dist/Validators/Validator.cjs.map +1 -1
  131. package/dist/Validators/Validator.d.ts +1 -1
  132. package/dist/Validators/Validator.js +6 -6
  133. package/dist/Validators/Validator.js.map +1 -1
  134. package/dist/claiming.cjs.map +1 -1
  135. package/dist/claiming.d.ts +1 -1
  136. package/dist/claiming.js.map +1 -1
  137. package/dist/componentInterfaces-D09mhzxO.cjs +2 -0
  138. package/dist/componentInterfaces-D09mhzxO.cjs.map +1 -0
  139. package/dist/componentInterfaces-RXBMI5yH.js +14 -0
  140. package/dist/componentInterfaces-RXBMI5yH.js.map +1 -0
  141. package/dist/deployments-BM42vImE.js +43 -0
  142. package/dist/deployments-BM42vImE.js.map +1 -0
  143. package/dist/deployments-CMdF5uEC.cjs +2 -0
  144. package/dist/deployments-CMdF5uEC.cjs.map +1 -0
  145. package/dist/deployments.json +15 -12
  146. package/dist/errors.cjs +1 -1
  147. package/dist/errors.cjs.map +1 -1
  148. package/dist/errors.d.ts +132 -0
  149. package/dist/errors.d.ts.map +1 -1
  150. package/dist/errors.js +122 -36
  151. package/dist/errors.js.map +1 -1
  152. package/dist/generated-B0tk-c9b.cjs +3 -0
  153. package/dist/generated-B0tk-c9b.cjs.map +1 -0
  154. package/dist/{generated-DLMdMwD1.js → generated-B8VWObPa.js} +2350 -1290
  155. package/dist/generated-B8VWObPa.js.map +1 -0
  156. package/dist/index.cjs +1 -1
  157. package/dist/index.d.ts +2 -0
  158. package/dist/index.d.ts.map +1 -1
  159. package/dist/index.js +134 -122
  160. package/dist/index.js.map +1 -1
  161. package/dist/transfers.cjs.map +1 -1
  162. package/dist/transfers.d.ts +1 -1
  163. package/dist/transfers.js.map +1 -1
  164. package/dist/utils.cjs.map +1 -1
  165. package/dist/utils.d.ts +1 -1
  166. package/dist/utils.js.map +1 -1
  167. package/package.json +12 -5
  168. package/src/Actions/ContractAction.ts +9 -10
  169. package/src/Actions/ERC721MintAction.ts +12 -13
  170. package/src/Actions/EventAction.test.ts +182 -53
  171. package/src/Actions/EventAction.ts +128 -107
  172. package/src/AllowLists/SimpleAllowList.ts +14 -59
  173. package/src/AllowLists/SimpleDenyList.ts +12 -9
  174. package/src/Boost.ts +19 -0
  175. package/src/BoostCore.test.ts +117 -1
  176. package/src/BoostCore.ts +113 -54
  177. package/src/BoostRegistry.ts +18 -18
  178. package/src/Budgets/Budget.ts +1 -2
  179. package/src/Budgets/ManagedBudget.ts +21 -295
  180. package/src/Budgets/VestingBudget.ts +26 -97
  181. package/src/Deployable/Contract.ts +4 -5
  182. package/src/Deployable/Deployable.ts +1 -1
  183. package/src/Deployable/DeployableTarget.ts +5 -5
  184. package/src/Deployable/DeployableTargetWithRBAC.ts +323 -0
  185. package/src/Incentives/AllowListIncentive.ts +12 -12
  186. package/src/Incentives/CGDAIncentive.ts +15 -15
  187. package/src/Incentives/ERC1155Incentive.ts +26 -26
  188. package/src/Incentives/ERC20Incentive.ts +23 -23
  189. package/src/Incentives/ERC20VariableCriteriaIncentive.test.ts +184 -0
  190. package/src/Incentives/ERC20VariableCriteriaIncentive.ts +309 -0
  191. package/src/Incentives/ERC20VariableIncentive.ts +19 -19
  192. package/src/Incentives/Incentive.ts +6 -5
  193. package/src/Incentives/PointsIncentive.test.ts +21 -21
  194. package/src/Incentives/PointsIncentive.ts +14 -14
  195. package/src/Validators/SignerValidator.ts +14 -14
  196. package/src/Validators/Validator.ts +1 -1
  197. package/src/claiming.ts +1 -1
  198. package/src/errors.ts +165 -0
  199. package/src/index.test.ts +3 -4
  200. package/src/index.ts +2 -0
  201. package/src/transfers.ts +1 -1
  202. package/src/utils.ts +1 -1
  203. package/dist/Budgets/SimpleBudget.d.ts +0 -824
  204. package/dist/Budgets/SimpleBudget.d.ts.map +0 -1
  205. package/dist/Incentive-CqX3fYEd.cjs.map +0 -1
  206. package/dist/Incentive-CtuAJAjG.js.map +0 -1
  207. package/dist/SimpleDenyList-9UIxZZKP.cjs +0 -2
  208. package/dist/SimpleDenyList-9UIxZZKP.cjs.map +0 -1
  209. package/dist/SimpleDenyList-DGPNc7ov.js +0 -132
  210. package/dist/SimpleDenyList-DGPNc7ov.js.map +0 -1
  211. package/dist/componentInterfaces-CKCBwG16.cjs +0 -2
  212. package/dist/componentInterfaces-CKCBwG16.cjs.map +0 -1
  213. package/dist/componentInterfaces-Cmg8tUxq.js +0 -13
  214. package/dist/componentInterfaces-Cmg8tUxq.js.map +0 -1
  215. package/dist/deployments-BvFcK_eR.js +0 -40
  216. package/dist/deployments-BvFcK_eR.js.map +0 -1
  217. package/dist/deployments-Ho4PnGCS.cjs +0 -2
  218. package/dist/deployments-Ho4PnGCS.cjs.map +0 -1
  219. package/dist/generated-BLg7yPgI.cjs +0 -3
  220. package/dist/generated-BLg7yPgI.cjs.map +0 -1
  221. package/dist/generated-DLMdMwD1.js.map +0 -1
  222. package/src/Budgets/SimpleBudget.test.ts +0 -152
  223. package/src/Budgets/SimpleBudget.ts +0 -563
@@ -1,782 +1,16 @@
1
- import { b9 as u, ba as A, bb as w, bc as T, bd as E } from "../generated-DLMdMwD1.js";
2
- import { decodeFunctionData as I, fromHex as p, isAddressEqual as v, encodeAbiParameters as S } from "viem";
3
- import { getLogs as C } from "viem/actions";
4
- import { d as N } from "../deployments-BvFcK_eR.js";
5
- import { DeployableTarget as D } from "../Deployable/DeployableTarget.js";
6
- import { UnparseableAbiParamError as R, FunctionDataDecodeError as P, UnrecognizedFilterTypeError as _, FieldValueNotComparableError as y, InvalidNumericalCriteriaError as l, DecodedArgsMalformedError as U, FieldValueUndefinedError as m, NoEventActionStepsProvidedError as B, TooManyEventActionStepsProvidedError as L } from "../errors.js";
7
- import { RegistryType as F } from "../utils.js";
8
- const M = "0x60a0604052348015600e575f80fd5b50601b601f60201b60201c565b60b0565b5f602c608760201b60201c565b90508054600181161560455763f92ee8a95f526004601cfd5b8160c01c808260011c146082578060011b8355806020527fc7f505b2f371ae2175ee4913f4499e1f2633a7b5936321eed1cdaeb6115181d2602080a15b505050565b5f7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffbf6011325f1b905090565b60805161231a6100c85f395f61034a015261231a5ff3fe608060405260043610610090575f3560e01c80639bc1cf81116100585780639bc1cf811461017d578063c26624e8146101a7578063d7768c47146101e3578063dbdf21101461021f578063ddd6ab081461024957610090565b806301ffc9a71461009457806309c5eabe146100d057806328d6183b14610101578063393df8cb1461012b578063439fab9114610155575b5f80fd5b34801561009f575f80fd5b506100ba60048036038101906100b59190611333565b610273565b6040516100c79190611378565b60405180910390f35b6100ea60048036038101906100e591906113f2565b6102ec565b6040516100f89291906114ad565b60405180910390f35b34801561010c575f80fd5b50610115610321565b60405161012291906114ea565b60405180910390f35b348015610136575f80fd5b5061013f610348565b60405161014c919061157d565b60405180910390f35b348015610160575f80fd5b5061017b600480360381019061017691906113f2565b61036c565b005b348015610188575f80fd5b506101916103f9565b60405161019e91906118e9565b60405180910390f35b3480156101b2575f80fd5b506101cd60048036038101906101c89190611933565b610648565b6040516101da91906119e4565b60405180910390f35b3480156101ee575f80fd5b50610209600480360381019061020491906113f2565b610875565b6040516102169190611a04565b60405180910390f35b34801561022a575f80fd5b506102336108a9565b6040516102409190611a8a565b60405180910390f35b348015610254575f80fd5b5061025d610981565b60405161026a9190611ab2565b60405180910390f35b5f7f7687b0ed000000000000000000000000000000000000000000000000000000007bffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916827bffffffffffffffffffffffffffffffffffffffffffffffffffffffff191614806102e557506102e48261098d565b5b9050919050565b5f60606040517fd623472500000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b5f7f7687b0ed00000000000000000000000000000000000000000000000000000000905090565b7f000000000000000000000000000000000000000000000000000000000000000081565b5f610375610a06565b905080546003825580156103a75760018160011c14303b1061039e5763f92ee8a95f526004601cfd5b818160ff1b1b91505b506103bf83838101906103ba9190611fb0565b610a2f565b80156103f4576002815560016020527fc7f505b2f371ae2175ee4913f4499e1f2633a7b5936321eed1cdaeb6115181d2602080a15b505050565b60606004805480602002602001604051908101604052809291908181526020015f905b8282101561063f578382905f5260205f2090600502016040518060c00160405290815f8201548152602001600182015f9054906101000a900460ff16600181111561046a576104696115d7565b5b600181111561047c5761047b6115d7565b5b81526020016001820160019054906101000a900460ff1660ff1660ff1681526020016001820160029054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200160028201548152602001600382016040518060800160405290815f82015f9054906101000a900460ff1660058111156105305761052f6115d7565b5b6005811115610542576105416115d7565b5b81526020015f820160019054906101000a900460ff16600381111561056a576105696115d7565b5b600381111561057c5761057b6115d7565b5b81526020015f820160029054906101000a900460ff1660ff1660ff1681526020016001820180546105ac90612024565b80601f01602080910402602001604051908101604052809291908181526020018280546105d890612024565b80156106235780601f106105fa57610100808354040283529160200191610623565b820191905f5260205f20905b81548152906001019060200180831161060657829003601f168201915b505050505081525050815250508152602001906001019061041c565b50505050905090565b6106506111c4565b6004828154811061066457610663612054565b5b905f5260205f2090600502016040518060c00160405290815f8201548152602001600182015f9054906101000a900460ff1660018111156106a8576106a76115d7565b5b60018111156106ba576106b96115d7565b5b81526020016001820160019054906101000a900460ff1660ff1660ff1681526020016001820160029054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200160028201548152602001600382016040518060800160405290815f82015f9054906101000a900460ff16600581111561076e5761076d6115d7565b5b60058111156107805761077f6115d7565b5b81526020015f820160019054906101000a900460ff1660038111156107a8576107a76115d7565b5b60038111156107ba576107b96115d7565b5b81526020015f820160029054906101000a900460ff1660ff1660ff1681526020016001820180546107ea90612024565b80601f016020809104026020016040519081016040528092919081815260200182805461081690612024565b80156108615780601f1061083857610100808354040283529160200191610861565b820191905f5260205f20905b81548152906001019060200180831161084457829003601f168201915b505050505081525050815250509050919050565b60606040517fd623472500000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b6108b1611229565b5f6040518060a00160405290815f82015f9054906101000a900460ff1660018111156108e0576108df6115d7565b5b60018111156108f2576108f16115d7565b5b815260200160018201548152602001600282015f9054906101000a900460ff1660ff1660ff1681526020016002820160019054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001600382015481525050905090565b5f600480549050905090565b5f7fe6715795000000000000000000000000000000000000000000000000000000007bffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916827bffffffffffffffffffffffffffffffffffffffffffffffffffffffff191614806109ff57506109fe826110be565b5b9050919050565b5f7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffbf6011325f1b905090565b610a37611137565b805f01515f80820151815f015f6101000a81548160ff02191690836001811115610a6457610a636115d7565b5b0217905550602082015181600101556040820151816002015f6101000a81548160ff021916908360ff16021790555060608201518160020160016101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff1602179055506080820151816003015590505060048160200151908060018154018082558091505060019003905f5260205f2090600502015f909190919091505f820151815f01556020820151816001015f6101000a81548160ff02191690836001811115610b4657610b456115d7565b5b021790555060408201518160010160016101000a81548160ff021916908360ff16021790555060608201518160010160026101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff1602179055506080820151816002015560a0820151816003015f820151815f015f6101000a81548160ff02191690836005811115610bee57610bed6115d7565b5b02179055506020820151815f0160016101000a81548160ff02191690836003811115610c1d57610c1c6115d7565b5b02179055506040820151815f0160026101000a81548160ff021916908360ff1602179055506060820151816001019081610c579190612215565b505050505060048160400151908060018154018082558091505060019003905f5260205f2090600502015f909190919091505f820151815f01556020820151816001015f6101000a81548160ff02191690836001811115610cbb57610cba6115d7565b5b021790555060408201518160010160016101000a81548160ff021916908360ff16021790555060608201518160010160026101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff1602179055506080820151816002015560a0820151816003015f820151815f015f6101000a81548160ff02191690836005811115610d6357610d626115d7565b5b02179055506020820151815f0160016101000a81548160ff02191690836003811115610d9257610d916115d7565b5b02179055506040820151815f0160026101000a81548160ff021916908360ff1602179055506060820151816001019081610dcc9190612215565b505050505060048160600151908060018154018082558091505060019003905f5260205f2090600502015f909190919091505f820151815f01556020820151816001015f6101000a81548160ff02191690836001811115610e3057610e2f6115d7565b5b021790555060408201518160010160016101000a81548160ff021916908360ff16021790555060608201518160010160026101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff1602179055506080820151816002015560a0820151816003015f820151815f015f6101000a81548160ff02191690836005811115610ed857610ed76115d7565b5b02179055506020820151815f0160016101000a81548160ff02191690836003811115610f0757610f066115d7565b5b02179055506040820151815f0160026101000a81548160ff021916908360ff1602179055506060820151816001019081610f419190612215565b505050505060048160800151908060018154018082558091505060019003905f5260205f2090600502015f909190919091505f820151815f01556020820151816001015f6101000a81548160ff02191690836001811115610fa557610fa46115d7565b5b021790555060408201518160010160016101000a81548160ff021916908360ff16021790555060608201518160010160026101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff1602179055506080820151816002015560a0820151816003015f820151815f015f6101000a81548160ff0219169083600581111561104d5761104c6115d7565b5b02179055506020820151815f0160016101000a81548160ff0219169083600381111561107c5761107b6115d7565b5b02179055506040820151815f0160026101000a81548160ff021916908360ff16021790555060608201518160010190816110b69190612215565b505050505050565b5f7f6ab67a0d000000000000000000000000000000000000000000000000000000007bffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916827bffffffffffffffffffffffffffffffffffffffffffffffffffffffff19161480611130575061112f8261115b565b5b9050919050565b5f611140610a06565b905080546001166111585763d7e6bcf85f526004601cfd5b50565b5f7f01ffc9a7000000000000000000000000000000000000000000000000000000007bffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916827bffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916149050919050565b6040518060c001604052805f80191681526020015f60018111156111eb576111ea6115d7565b5b81526020015f60ff1681526020015f73ffffffffffffffffffffffffffffffffffffffff1681526020015f8152602001611223611281565b81525090565b6040518060a001604052805f6001811115611247576112466115d7565b5b81526020015f80191681526020015f60ff1681526020015f73ffffffffffffffffffffffffffffffffffffffff1681526020015f81525090565b60405180608001604052805f600581111561129f5761129e6115d7565b5b81526020015f60038111156112b7576112b66115d7565b5b81526020015f60ff168152602001606081525090565b5f604051905090565b5f80fd5b5f80fd5b5f7fffffffff0000000000000000000000000000000000000000000000000000000082169050919050565b611312816112de565b811461131c575f80fd5b50565b5f8135905061132d81611309565b92915050565b5f60208284031215611348576113476112d6565b5b5f6113558482850161131f565b91505092915050565b5f8115159050919050565b6113728161135e565b82525050565b5f60208201905061138b5f830184611369565b92915050565b5f80fd5b5f80fd5b5f80fd5b5f8083601f8401126113b2576113b1611391565b5b8235905067ffffffffffffffff8111156113cf576113ce611395565b5b6020830191508360018202830111156113eb576113ea611399565b5b9250929050565b5f8060208385031215611408576114076112d6565b5b5f83013567ffffffffffffffff811115611425576114246112da565b5b6114318582860161139d565b92509250509250929050565b5f81519050919050565b5f82825260208201905092915050565b8281835e5f83830152505050565b5f601f19601f8301169050919050565b5f61147f8261143d565b6114898185611447565b9350611499818560208601611457565b6114a281611465565b840191505092915050565b5f6040820190506114c05f830185611369565b81810360208301526114d28184611475565b90509392505050565b6114e4816112de565b82525050565b5f6020820190506114fd5f8301846114db565b92915050565b5f73ffffffffffffffffffffffffffffffffffffffff82169050919050565b5f819050919050565b5f61154561154061153b84611503565b611522565b611503565b9050919050565b5f6115568261152b565b9050919050565b5f6115678261154c565b9050919050565b6115778161155d565b82525050565b5f6020820190506115905f83018461156e565b92915050565b5f81519050919050565b5f82825260208201905092915050565b5f819050602082019050919050565b5f819050919050565b6115d1816115bf565b82525050565b7f4e487b71000000000000000000000000000000000000000000000000000000005f52602160045260245ffd5b60028110611615576116146115d7565b5b50565b5f81905061162582611604565b919050565b5f61163482611618565b9050919050565b6116448161162a565b82525050565b5f60ff82169050919050565b61165f8161164a565b82525050565b5f61166f82611503565b9050919050565b61167f81611665565b82525050565b5f819050919050565b61169781611685565b82525050565b600681106116ae576116ad6115d7565b5b50565b5f8190506116be8261169d565b919050565b5f6116cd826116b1565b9050919050565b6116dd816116c3565b82525050565b600481106116f4576116f36115d7565b5b50565b5f819050611704826116e3565b919050565b5f611713826116f7565b9050919050565b61172381611709565b82525050565b5f82825260208201905092915050565b5f6117438261143d565b61174d8185611729565b935061175d818560208601611457565b61176681611465565b840191505092915050565b5f608083015f8301516117865f8601826116d4565b506020830151611799602086018261171a565b5060408301516117ac6040860182611656565b50606083015184820360608601526117c48282611739565b9150508091505092915050565b5f60c083015f8301516117e65f8601826115c8565b5060208301516117f9602086018261163b565b50604083015161180c6040860182611656565b50606083015161181f6060860182611676565b506080830151611832608086018261168e565b5060a083015184820360a086015261184a8282611771565b9150508091505092915050565b5f61186283836117d1565b905092915050565b5f602082019050919050565b5f61188082611596565b61188a81856115a0565b93508360208202850161189c856115b0565b805f5b858110156118d757848403895281516118b88582611857565b94506118c38361186a565b925060208a0199505060018101905061189f565b50829750879550505050505092915050565b5f6020820190508181035f8301526119018184611876565b905092915050565b61191281611685565b811461191c575f80fd5b50565b5f8135905061192d81611909565b92915050565b5f60208284031215611948576119476112d6565b5b5f6119558482850161191f565b91505092915050565b5f60c083015f8301516119735f8601826115c8565b506020830151611986602086018261163b565b5060408301516119996040860182611656565b5060608301516119ac6060860182611676565b5060808301516119bf608086018261168e565b5060a083015184820360a08601526119d78282611771565b9150508091505092915050565b5f6020820190508181035f8301526119fc818461195e565b905092915050565b5f6020820190508181035f830152611a1c8184611475565b905092915050565b60a082015f820151611a385f85018261163b565b506020820151611a4b60208501826115c8565b506040820151611a5e6040850182611656565b506060820151611a716060850182611676565b506080820151611a84608085018261168e565b50505050565b5f60a082019050611a9d5f830184611a24565b92915050565b611aac81611685565b82525050565b5f602082019050611ac55f830184611aa3565b92915050565b5f80fd5b7f4e487b71000000000000000000000000000000000000000000000000000000005f52604160045260245ffd5b611b0582611465565b810181811067ffffffffffffffff82111715611b2457611b23611acf565b5b80604052505050565b5f611b366112cd565b9050611b428282611afc565b919050565b5f80fd5b60028110611b57575f80fd5b50565b5f81359050611b6881611b4b565b92915050565b611b77816115bf565b8114611b81575f80fd5b50565b5f81359050611b9281611b6e565b92915050565b611ba18161164a565b8114611bab575f80fd5b50565b5f81359050611bbc81611b98565b92915050565b611bcb81611665565b8114611bd5575f80fd5b50565b5f81359050611be681611bc2565b92915050565b5f60a08284031215611c0157611c00611acb565b5b611c0b60a0611b2d565b90505f611c1a84828501611b5a565b5f830152506020611c2d84828501611b84565b6020830152506040611c4184828501611bae565b6040830152506060611c5584828501611bd8565b6060830152506080611c698482850161191f565b60808301525092915050565b60068110611c81575f80fd5b50565b5f81359050611c9281611c75565b92915050565b60048110611ca4575f80fd5b50565b5f81359050611cb581611c98565b92915050565b5f80fd5b5f67ffffffffffffffff821115611cd957611cd8611acf565b5b611ce282611465565b9050602081019050919050565b828183375f83830152505050565b5f611d0f611d0a84611cbf565b611b2d565b905082815260208101848484011115611d2b57611d2a611cbb565b5b611d36848285611cef565b509392505050565b5f82601f830112611d5257611d51611391565b5b8135611d62848260208601611cfd565b91505092915050565b5f60808284031215611d8057611d7f611acb565b5b611d8a6080611b2d565b90505f611d9984828501611c84565b5f830152506020611dac84828501611ca7565b6020830152506040611dc084828501611bae565b604083015250606082013567ffffffffffffffff811115611de457611de3611b47565b5b611df084828501611d3e565b60608301525092915050565b5f60c08284031215611e1157611e10611acb565b5b611e1b60c0611b2d565b90505f611e2a84828501611b84565b5f830152506020611e3d84828501611b5a565b6020830152506040611e5184828501611bae565b6040830152506060611e6584828501611bd8565b6060830152506080611e798482850161191f565b60808301525060a082013567ffffffffffffffff811115611e9d57611e9c611b47565b5b611ea984828501611d6b565b60a08301525092915050565b5f6101208284031215611ecb57611eca611acb565b5b611ed560a0611b2d565b90505f611ee484828501611bec565b5f8301525060a082013567ffffffffffffffff811115611f0757611f06611b47565b5b611f1384828501611dfc565b60208301525060c082013567ffffffffffffffff811115611f3757611f36611b47565b5b611f4384828501611dfc565b60408301525060e082013567ffffffffffffffff811115611f6757611f66611b47565b5b611f7384828501611dfc565b60608301525061010082013567ffffffffffffffff811115611f9857611f97611b47565b5b611fa484828501611dfc565b60808301525092915050565b5f60208284031215611fc557611fc46112d6565b5b5f82013567ffffffffffffffff811115611fe257611fe16112da565b5b611fee84828501611eb5565b91505092915050565b7f4e487b71000000000000000000000000000000000000000000000000000000005f52602260045260245ffd5b5f600282049050600182168061203b57607f821691505b60208210810361204e5761204d611ff7565b5b50919050565b7f4e487b71000000000000000000000000000000000000000000000000000000005f52603260045260245ffd5b5f819050815f5260205f209050919050565b5f6020601f8301049050919050565b5f82821b905092915050565b5f600883026120dd7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff826120a2565b6120e786836120a2565b95508019841693508086168417925050509392505050565b5f61211961211461210f84611685565b611522565b611685565b9050919050565b5f819050919050565b612132836120ff565b61214661213e82612120565b8484546120ae565b825550505050565b5f90565b61215a61214e565b612165818484612129565b505050565b5b818110156121885761217d5f82612152565b60018101905061216b565b5050565b601f8211156121cd5761219e81612081565b6121a784612093565b810160208510156121b6578190505b6121ca6121c285612093565b83018261216a565b50505b505050565b5f82821c905092915050565b5f6121ed5f19846008026121d2565b1980831691505092915050565b5f61220583836121de565b9150826002028217905092915050565b61221e8261143d565b67ffffffffffffffff81111561223757612236611acf565b5b6122418254612024565b61224c82828561218c565b5f60209050601f83116001811461227d575f841561226b578287015190505b61227585826121fa565b8655506122dc565b601f19841661228b86612081565b5f5b828110156122b25784890151825560018201915060208501945060208101905061228d565b868310156122cf57848901516122cb601f8916826121de565b8355505b6001600288020188555050505b50505050505056fea2646970667358221220c0fb13f888b0a69e33db3d7586e65062d85bac26cd33b0773ccbf5249746b2b264736f6c634300081a0033", O = {
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
- "0xb362243af1e2070d7d5bf8d713f2e0fab64203f1b71462afbe20572909788c5e": {
28
- name: "Purchased",
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
- type: "uint256"
45
- },
46
- {
47
- type: "uint256"
48
- }
49
- ]
50
- },
51
- "0x69e37f151eb98a09618ddaa80c8cfaf1ce5996867c489f45b555b412271ebf27": {
52
- name: "NameRegistered",
53
- type: "event",
54
- inputs: [
55
- {
56
- type: "string"
57
- },
58
- {
59
- type: "bytes32"
60
- },
61
- {
62
- type: "address"
63
- },
64
- {
65
- type: "uint256"
66
- },
67
- {
68
- type: "uint256"
69
- },
70
- {
71
- type: "uint256"
72
- }
73
- ]
74
- },
75
- "0x3134e8a2e6d97e929a7e54011ea5485d7d196dd5f0ba4d4ef95803e8e3fc257f": {
76
- name: "DelegateChanged",
77
- type: "event",
78
- inputs: [
79
- {
80
- type: "address",
81
- indexed: !0
82
- },
83
- {
84
- type: "address",
85
- indexed: !0
86
- },
87
- {
88
- type: "address",
89
- indexed: !0
90
- }
91
- ]
92
- },
93
- "0xe00361d207b252a464323eb23d45d42583e391f2031acdd2e9fa36efddd43cb0": {
94
- name: "SwappedV3",
95
- type: "event",
96
- inputs: [
97
- {
98
- type: "bytes16"
99
- },
100
- {
101
- type: "address"
102
- },
103
- {
104
- type: "uint256"
105
- },
106
- {
107
- type: "address"
108
- },
109
- {
110
- type: "address",
111
- indexed: !0
112
- },
113
- {
114
- type: "address",
115
- indexed: !0
116
- },
117
- {
118
- type: "address",
119
- indexed: !0
120
- },
121
- {
122
- type: "uint256"
123
- },
124
- {
125
- type: "uint256"
126
- },
127
- {
128
- type: "uint256"
129
- }
130
- ]
131
- },
132
- "0x883a883a9ea847654d33471b1e5fb2dea76a2cfc86a6cc7da6c14102800e4d0b": {
133
- name: "InfoIndexed",
134
- type: "event",
135
- inputs: [
136
- {
137
- type: "address",
138
- indexed: !0
139
- },
140
- {
141
- type: "string",
142
- indexed: !0
143
- }
144
- ]
145
- },
146
- "0xe46343e36b0721f173bdc76b8f25c08b04f417df09c27e1e83ba1980007fef8c": {
147
- name: "Info",
148
- type: "event",
149
- inputs: [
150
- {
151
- type: "address"
152
- },
153
- {
154
- type: "string"
155
- }
156
- ]
157
- }
158
- }, G = {
159
- "Transfer(address indexed,address indexed,uint256 indexed)": "0xddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef",
160
- "Purchased(address indexed,address indexed,uint256 indexed,uint256,uint256)": "0xb362243af1e2070d7d5bf8d713f2e0fab64203f1b71462afbe20572909788c5e",
161
- "NameRegistered(string,bytes32,address,uint256,uint256,uint256)": "0x69e37f151eb98a09618ddaa80c8cfaf1ce5996867c489f45b555b412271ebf27",
162
- "DelegateChanged(address indexed,address indexed,address indexed)": "0x3134e8a2e6d97e929a7e54011ea5485d7d196dd5f0ba4d4ef95803e8e3fc257f",
163
- "SwappedV3(bytes16,address,uint256,address,address indexed,address indexed,address indexed,uint256,uint256,uint256)": "0xe00361d207b252a464323eb23d45d42583e391f2031acdd2e9fa36efddd43cb0",
164
- "InfoIndexed(address indexed,string indexed)": "0x883a883a9ea847654d33471b1e5fb2dea76a2cfc86a6cc7da6c14102800e4d0b",
165
- "Info(address,string)": "0xe46343e36b0721f173bdc76b8f25c08b04f417df09c27e1e83ba1980007fef8c"
166
- }, k = {
167
- abi: O,
168
- selectors: G
169
- }, H = {
170
- "0x0000000000000000000000000000000000000000000000000000000040c10f19": {
171
- name: "mint",
172
- type: "function",
173
- stateMutability: "nonpayable",
174
- inputs: [
175
- {
176
- type: "address",
177
- name: "to"
178
- },
179
- {
180
- type: "uint256",
181
- name: "amount"
182
- }
183
- ],
184
- outputs: []
185
- },
186
- "0x0000000000000000000000000000000000000000000000000000000017d304b0": {
187
- name: "mintPayable",
188
- type: "function",
189
- stateMutability: "nonpayable",
190
- inputs: [
191
- {
192
- type: "address",
193
- name: "to"
194
- },
195
- {
196
- type: "uint256",
197
- name: "amount"
198
- }
199
- ],
200
- outputs: []
201
- },
202
- "0x0000000000000000000000000000000000000000000000000000000024856bc3": {
203
- name: "execute",
204
- type: "function",
205
- stateMutability: "nonpayable",
206
- inputs: [
207
- {
208
- type: "bytes",
209
- name: "commands"
210
- },
211
- {
212
- type: "bytes[]",
213
- name: "inputs"
214
- }
215
- ],
216
- outputs: []
217
- },
218
- "0x0000000000000000000000000000000000000000000000000000000074694a2b": {
219
- name: "register",
220
- type: "function",
221
- stateMutability: "nonpayable",
222
- inputs: [
223
- {
224
- type: "string",
225
- name: "name"
226
- },
227
- {
228
- type: "address",
229
- name: "owner"
230
- },
231
- {
232
- type: "uint256",
233
- name: "duration"
234
- },
235
- {
236
- type: "bytes32",
237
- name: "secret"
238
- },
239
- {
240
- type: "address",
241
- name: "resolver"
242
- },
243
- {
244
- type: "bytes[]",
245
- name: "data"
246
- },
247
- {
248
- type: "bool",
249
- name: "reverseRecord"
250
- },
251
- {
252
- type: "uint16",
253
- name: "ownerControlledFuses"
254
- }
255
- ],
256
- outputs: []
257
- },
258
- "0x000000000000000000000000000000000000000000000000000000006a627842": {
259
- name: "mint",
260
- type: "function",
261
- stateMutability: "nonpayable",
262
- inputs: [
263
- {
264
- type: "address"
265
- }
266
- ],
267
- outputs: []
268
- }
269
- }, V = {
270
- "mint(address to, uint256 amount)": "0x0000000000000000000000000000000000000000000000000000000040c10f19",
271
- "mintPayable(address to, uint256 amount)": "0x0000000000000000000000000000000000000000000000000000000017d304b0",
272
- "execute(bytes commands,bytes[] inputs)": "0x0000000000000000000000000000000000000000000000000000000024856bc3",
273
- "register(string name,address owner,uint256 duration,bytes32 secret,address resolver,bytes[] data,bool reverseRecord,uint16 ownerControlledFuses)": "0x0000000000000000000000000000000000000000000000000000000074694a2b",
274
- "mint(address)": "0x000000000000000000000000000000000000000000000000000000006a627842"
275
- }, Q = {
276
- abi: H,
277
- selectors: V
278
- };
279
- var $ = /* @__PURE__ */ ((b) => (b[b.EQUAL = 0] = "EQUAL", b[b.NOT_EQUAL = 1] = "NOT_EQUAL", b[b.GREATER_THAN = 2] = "GREATER_THAN", b[b.LESS_THAN = 3] = "LESS_THAN", b[b.CONTAINS = 4] = "CONTAINS", b[b.REGEX = 5] = "REGEX", b))($ || {}), q = /* @__PURE__ */ ((b) => (b[b.UINT = 0] = "UINT", b[b.ADDRESS = 1] = "ADDRESS", b[b.BYTES = 2] = "BYTES", b[b.STRING = 3] = "STRING", b))(q || {}), X = /* @__PURE__ */ ((b) => (b[b.EVENT = 0] = "EVENT", b[b.FUNC = 1] = "FUNC", b))(X || {});
280
- function Y(b) {
281
- return Array.isArray(b.actionSteps);
282
- }
283
- const o = class o extends D {
284
- constructor() {
285
- super(...arguments), this.abi = u;
286
- }
287
- /**
288
- * Gets a specific action event by index
289
- *
290
- * @public
291
- * @async
292
- * @param {number} index The index of the action event to retrieve
293
- * @param {?ReadEventActionParams<'getActionStep'>} [params]
294
- * @returns {Promise<ActionStep>}
295
- */
296
- async getActionStep(f, e) {
297
- return (await this.getActionSteps(e)).at(f);
298
- }
299
- /**
300
- * Gets all action events
301
- *
302
- * @public
303
- * @async
304
- * @param {?ReadEventActionParams<'getActionSteps'>} [params]
305
- * @returns {Promise<ActionStep[]>}
306
- */
307
- async getActionSteps(f) {
308
- const e = await A(this._config, {
309
- address: this.assertValidAddress(),
310
- ...this.optionallyAttachAccount(),
311
- // biome-ignore lint/suspicious/noExplicitAny: Accept any shape of valid wagmi/viem parameters, wagmi does the same thing internally
312
- ...f
313
- });
314
- return z(e.map(h));
315
- }
316
- /**
317
- * Gets the count of action events
318
- *
319
- * @public
320
- * @async
321
- * @param {?ReadEventActionParams<'getActionStepsCount'>} [params]
322
- * @returns {Promise<bigint>}
323
- */
324
- async getActionStepsCount(f) {
325
- return (await this.getActionSteps(f)).length;
326
- }
327
- /**
328
- * Retrieves the payload describing how claimants can be identified from logs or function calls.
329
- *
330
- * @public
331
- * @async
332
- * @param {?ReadEventActionParams<'getActionClaimant'>} [params]
333
- * @returns {Promise<ActionClaimant>}
334
- */
335
- async getActionClaimant(f) {
336
- const e = await w(this._config, {
337
- address: this.assertValidAddress(),
338
- ...this.optionallyAttachAccount(),
339
- ...f
340
- });
341
- return h(e);
342
- }
343
- /**
344
- * Executes a prepared event action
345
- *
346
- * @public
347
- * @async
348
- * @param {Hex} data
349
- * @param {?WriteParams<typeof eventActionAbi, 'execute'>} [params]
350
- * @returns {Promise<readonly [boolean, `0x${string}`]>}
351
- */
352
- async execute(f, e) {
353
- return await this.awaitResult(this.executeRaw(f, e));
354
- }
355
- /**
356
- * Executes a prepared event action
357
- *
358
- * @public
359
- * @async
360
- * @param {Hex} data
361
- * @param {?WriteParams<typeof eventActionAbi, 'execute'>} [params]
362
- * @returns {unknown}
363
- */
364
- async executeRaw(f, e) {
365
- const { request: t, result: a } = await T(this._config, {
366
- address: this.assertValidAddress(),
367
- ...this.optionallyAttachAccount(),
368
- // biome-ignore lint/suspicious/noExplicitAny: Accept any shape of valid wagmi/viem parameters, wagmi does the same thing internally
369
- ...e,
370
- args: [f]
371
- });
372
- return { hash: await E(this._config, t), result: a };
373
- }
374
- /**
375
- * Retrieves action steps, and uses them to validate against, and optionally fetch logs that match the step's signature.
376
- * If logs are provided in the optional `params` argument, then those logs will be used instead of fetched with the configured client.
377
- *
378
- * @public
379
- * @async
380
- * @param {?TxParams} [params]
381
- * @returns {Promise<boolean>}
382
- */
383
- async validateActionSteps(f) {
384
- const e = await this.getActionSteps();
385
- for (const t of e)
386
- if (!await this.isActionStepValid(t, f))
387
- return !1;
388
- return !0;
389
- }
390
- /**
391
- * Validates a single action step with a given criteria against logs or function calls.
392
- * If logs are provided in the optional `params` argument, then those logs will be used instead of being fetched with the configured client.
393
- * For functions a hash is required.
394
- *
395
- * @public
396
- * @async
397
- * @param {ActionStep} actionStep - The action step to validate. Can be a function of event step.
398
- * @param {?TxParams & { chainId?: number }} [params] - Additional parameters for validation, including known events, logs, and chain ID.
399
- * @returns {Promise<boolean>}
400
- */
401
- async isActionStepValid(f, e) {
402
- return f.signatureType === 0 ? await this.isActionEventValid(f, e) : f.signatureType === 1 ? await this.isActionFunctionValid(
403
- f,
404
- e
405
- ) : !1;
406
- }
407
- /**
408
- * Validates a single action event with a given criteria against logs.
409
- * If logs are provided in the optional `params` argument, then those logs will be used instead of being fetched with the configured client.
410
- *
411
- * @public
412
- * @async
413
- * @param {ActionStep} actionStep - The action step containing the event to validate.
414
- * @param {?ValidateEventStepParams & { chainId?: number }} [params] - Additional parameters for validation, including known events, logs, and chain ID.
415
- * @returns {Promise<boolean>} Resolves to true if the action event is valid, throws if input is invalid, otherwise false.
416
- */
417
- async isActionEventValid(f, e) {
418
- const t = f.actionParameter, a = f.signature;
419
- let n;
420
- if (e != null && e.knownEvents ? n = e.knownEvents[a] : n = k.abi[a], !n)
421
- throw new Error(`No known ABI for given event signature: ${a}`);
422
- if (this.isArraylikeIndexed(f, n))
423
- throw new R(
424
- f.actionParameter.fieldIndex,
425
- n
426
- );
427
- const i = f.targetContract, d = (e == null ? void 0 : e.logs) || await C(this._config.getClient({ chainId: e == null ? void 0 : e.chainId }), {
428
- // biome-ignore lint/suspicious/noExplicitAny: <explanation>
429
- ...e,
430
- address: i,
431
- event: n
432
- });
433
- if (!d.length) return !1;
434
- for (let s of d)
435
- if (!this.validateLogAgainstCriteria(t, s))
436
- return !1;
437
- return !0;
438
- }
439
- /**
440
- * Validates a single action function with a given criteria against the transaction input.
441
- * If a transaction hash is provided in the optional `params` argument, then the transaction
442
- * will be fetched and decoded using the configured client.
443
- *
444
- * @public
445
- * @async
446
- * @param {ActionStep} actionStep - The action step containing the function to validate.
447
- * @param {?ValidateFunctionStepParams & { chainId?: number }} [params] - Additional parameters for validation, including known events, transaction hash, and chain ID.
448
- * @returns {Promise<boolean>} Resolves to true if the action function is valid, throws if the inputs are invalid, otherwise false.
449
- */
450
- async isActionFunctionValid(f, e) {
451
- const t = f.actionParameter;
452
- let a = f.signature;
453
- if (!e || !(e != null && e.hash))
454
- throw new Error("Hash is required for function validation");
455
- const i = await this._config.getClient({
456
- chainId: e == null ? void 0 : e.chainId
457
- }).getTransaction({ hash: e.hash }), d = Q.abi[a];
458
- if (!d)
459
- throw new Error(
460
- `No known ABI for given function signature: ${a}`
461
- );
462
- let s;
463
- try {
464
- s = I({
465
- abi: [d],
466
- data: i.input
467
- });
468
- } catch (x) {
469
- throw new P([d], x);
470
- }
471
- const r = s.args;
472
- return !(!r || !s || !this.validateFunctionAgainstCriteria(
473
- t,
474
- r
475
- ));
476
- }
477
- /**
478
- * Validates a field against a given criteria.
479
- *
480
- * @param {Criteria} criteria - The criteria to validate against.
481
- * @param {string | bigint} fieldValue - The field value to validate.
482
- * @returns {Promise<boolean>} - Returns true if the field passes the criteria, false otherwise.
483
- */
484
- validateFieldAgainstCriteria(f, e, t) {
485
- switch (f.filterType) {
486
- case 0:
487
- return f.fieldType === 1 ? v(f.filterData, e) : e === f.filterData;
488
- case 1:
489
- return e !== f.filterData;
490
- case 2:
491
- if (f.fieldType === 0)
492
- return BigInt(e) > BigInt(f.filterData);
493
- throw new l({
494
- ...t,
495
- criteria: f,
496
- fieldValue: e
497
- });
498
- case 3:
499
- if (f.fieldType === 0)
500
- return BigInt(e) < BigInt(f.filterData);
501
- throw new l({
502
- ...t,
503
- criteria: f,
504
- fieldValue: e
505
- });
506
- case 4:
507
- if (f.fieldType === 2 || f.fieldType === 3) {
508
- let a;
509
- return f.fieldType === 3 ? a = p(f.filterData, "string") : a = f.filterData.slice(2), e.includes(a);
510
- }
511
- throw new y({
512
- ...t,
513
- criteria: f,
514
- fieldValue: e
515
- });
516
- case 5:
517
- if (typeof e != "string")
518
- throw new y({
519
- ...t,
520
- criteria: f,
521
- fieldValue: e
522
- });
523
- if (f.fieldType === 3) {
524
- const a = p(f.filterData, "string");
525
- return new RegExp(a).test(e);
526
- }
527
- default:
528
- throw new _({
529
- ...t,
530
- criteria: f,
531
- fieldValue: e
532
- });
533
- }
534
- }
535
- /**
536
- * Validates a {@link Log} against a given criteria.
537
- *
538
- * @param {Criteria} criteria - The criteria to validate against.
539
- * @param {Log} log - The Viem event log.
540
- * @returns {Promise<boolean>} - Returns true if the log passes the criteria, false otherwise.
541
- */
542
- validateLogAgainstCriteria(f, e) {
543
- if (!Array.isArray(e.args) || e.args.length <= f.fieldIndex)
544
- throw new U({
545
- log: e,
546
- criteria: f,
547
- fieldValue: void 0
548
- });
549
- const t = e.args.at(f.fieldIndex);
550
- if (t === void 0)
551
- throw new m({ log: e, criteria: f, fieldValue: t });
552
- return this.validateFieldAgainstCriteria(f, t, { log: e });
553
- }
554
- /**
555
- * Validates a function's decoded arguments against a given criteria.
556
- *
557
- * @param {Criteria} criteria - The criteria to validate against.
558
- * @param {unknown[]} decodedArgs - The decoded arguments of the function call.
559
- * @returns {Promise<boolean>} - Returns true if the decoded argument passes the criteria, false otherwise.
560
- */
561
- validateFunctionAgainstCriteria(f, e) {
562
- const t = e[f.fieldIndex];
563
- if (t === void 0)
564
- throw new m({
565
- criteria: f,
566
- fieldValue: t
567
- });
568
- return this.validateFieldAgainstCriteria(f, t, {
569
- decodedArgs: e
570
- });
571
- }
572
- /**
573
- * @inheritdoc
574
- *
575
- * @public
576
- * @param {?EventActionPayload} [_payload]
577
- * @param {?DeployableOptions} [_options]
578
- * @returns {GenericDeployableParams}
579
- */
580
- buildParameters(f, e) {
581
- const [t, a] = this.validateDeploymentConfig(
582
- f,
583
- e
584
- );
585
- let n;
586
- if (Y(t)) {
587
- let i = t.actionSteps.filter((s) => !!s);
588
- if (i.length === 0)
589
- throw new B();
590
- if (i.length > 4)
591
- throw new L();
592
- let d = Array.from({ length: 4 }, (s, r) => i.at(r) || i.at(-1));
593
- n = {
594
- actionClaimant: t.actionClaimant,
595
- actionStepOne: d[0],
596
- actionStepTwo: d[1],
597
- actionStepThree: d[2],
598
- actionStepFour: d[3]
599
- };
600
- } else
601
- n = t;
602
- return {
603
- abi: u,
604
- bytecode: M,
605
- args: [J(n)],
606
- ...this.optionallyAttachAccount(a.account)
607
- };
608
- }
609
- isArraylikeIndexed(f, e) {
610
- var t;
611
- return !!((f.actionParameter.fieldType === 3 || f.actionParameter.fieldType === 2) && ((t = e.inputs[f.actionParameter.fieldIndex]) != null && t.indexed));
612
- }
613
- };
614
- o.bases = {
615
- ...N
616
- }, o.registryType = F.ACTION;
617
- let g = o;
618
- function z(b) {
619
- const f = [], e = {};
620
- for (let t of b) {
621
- const a = JSON.stringify(t);
622
- e[a] || (f.push(t), e[a] = !0);
623
- }
624
- return f;
625
- }
626
- function c(b) {
627
- return {
628
- ...b,
629
- chainid: BigInt(b.chainid)
630
- };
631
- }
632
- function h(b) {
633
- if (b.chainid > BigInt(Number.MAX_SAFE_INTEGER))
634
- throw new Error("Chain ID exceeds max safe integer");
635
- return {
636
- ...b,
637
- chainid: Number(b.chainid)
638
- };
639
- }
640
- function J({
641
- actionClaimant: b,
642
- actionStepOne: f,
643
- actionStepTwo: e,
644
- actionStepThree: t,
645
- actionStepFour: a
646
- }) {
647
- return S(
648
- [
649
- {
650
- type: "tuple",
651
- name: "initPayload",
652
- components: [
653
- {
654
- type: "tuple",
655
- name: "actionClaimant",
656
- components: [
657
- { type: "uint8", name: "signatureType" },
658
- { type: "bytes32", name: "signature" },
659
- { type: "uint8", name: "fieldIndex" },
660
- { type: "address", name: "targetContract" },
661
- { type: "uint256", name: "chainid" }
662
- ]
663
- },
664
- {
665
- type: "tuple",
666
- name: "actionStepOne",
667
- components: [
668
- { type: "bytes32", name: "signature" },
669
- { type: "uint8", name: "signatureType" },
670
- { type: "uint8", name: "actionType" },
671
- { type: "address", name: "targetContract" },
672
- { type: "uint256", name: "chainid" },
673
- {
674
- type: "tuple",
675
- name: "actionParameter",
676
- components: [
677
- { type: "uint8", name: "filterType" },
678
- { type: "uint8", name: "fieldType" },
679
- { type: "uint8", name: "fieldIndex" },
680
- { type: "bytes", name: "filterData" }
681
- ]
682
- }
683
- ]
684
- },
685
- {
686
- type: "tuple",
687
- name: "actionStepTwo",
688
- components: [
689
- { type: "bytes32", name: "signature" },
690
- { type: "uint8", name: "signatureType" },
691
- { type: "uint8", name: "actionType" },
692
- { type: "address", name: "targetContract" },
693
- { type: "uint256", name: "chainid" },
694
- {
695
- type: "tuple",
696
- name: "actionParameter",
697
- components: [
698
- { type: "uint8", name: "filterType" },
699
- { type: "uint8", name: "fieldType" },
700
- { type: "uint8", name: "fieldIndex" },
701
- { type: "bytes", name: "filterData" }
702
- ]
703
- }
704
- ]
705
- },
706
- {
707
- type: "tuple",
708
- name: "actionStepThree",
709
- components: [
710
- { type: "bytes32", name: "signature" },
711
- { type: "uint8", name: "signatureType" },
712
- { type: "uint8", name: "actionType" },
713
- { type: "address", name: "targetContract" },
714
- { type: "uint256", name: "chainid" },
715
- {
716
- type: "tuple",
717
- name: "actionParameter",
718
- components: [
719
- { type: "uint8", name: "filterType" },
720
- { type: "uint8", name: "fieldType" },
721
- { type: "uint8", name: "fieldIndex" },
722
- { type: "bytes", name: "filterData" }
723
- ]
724
- }
725
- ]
726
- },
727
- {
728
- type: "tuple",
729
- name: "actionStepFour",
730
- components: [
731
- { type: "bytes32", name: "signature" },
732
- { type: "uint8", name: "signatureType" },
733
- { type: "uint8", name: "actionType" },
734
- { type: "address", name: "targetContract" },
735
- { type: "uint256", name: "chainid" },
736
- {
737
- type: "tuple",
738
- name: "actionParameter",
739
- components: [
740
- { type: "uint8", name: "filterType" },
741
- { type: "uint8", name: "fieldType" },
742
- { type: "uint8", name: "fieldIndex" },
743
- { type: "bytes", name: "filterData" }
744
- ]
745
- }
746
- ]
747
- }
748
- ]
749
- }
750
- ],
751
- [
752
- {
753
- actionClaimant: c(b),
754
- actionStepOne: {
755
- ...c(f),
756
- actionType: f.actionType || 0
757
- },
758
- actionStepTwo: {
759
- ...c(e),
760
- actionType: e.actionType || 0
761
- },
762
- actionStepThree: {
763
- ...c(t),
764
- actionType: t.actionType || 0
765
- },
766
- actionStepFour: {
767
- ...c(a),
768
- actionType: a.actionType || 0
769
- }
770
- }
771
- ]
772
- );
773
- }
1
+ import "../generated-B8VWObPa.js";
2
+ import { E as n, F as s, P as y, S as l, i as v, p as E } from "../EventAction-BO5WI_5s.js";
3
+ import "viem";
4
+ import "../deployments-BM42vImE.js";
5
+ import "../Deployable/DeployableTarget.js";
6
+ import "../errors.js";
7
+ import "../utils.js";
774
8
  export {
775
- g as EventAction,
776
- $ as FilterType,
777
- q as PrimitiveType,
778
- X as SignatureType,
779
- Y as isEventActionPayloadSimple,
780
- J as prepareEventActionPayload
9
+ n as EventAction,
10
+ s as FilterType,
11
+ y as PrimitiveType,
12
+ l as SignatureType,
13
+ v as isEventActionPayloadSimple,
14
+ E as prepareEventActionPayload
781
15
  };
782
16
  //# sourceMappingURL=EventAction.js.map