@boostxyz/sdk 0.0.0-alpha.9 → 1.1.0-alpha.22

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 (257) 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 +11 -11
  5. package/dist/Actions/ContractAction.d.ts.map +1 -1
  6. package/dist/Actions/ERC721MintAction.d.ts +14 -14
  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 +171 -41
  11. package/dist/Actions/EventAction.d.ts.map +1 -1
  12. package/dist/Actions/EventAction.js +15 -392
  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.d.ts +6 -4
  17. package/dist/AllowLists/AllowList.d.ts.map +1 -1
  18. package/dist/AllowLists/AllowList.js +45 -23
  19. package/dist/AllowLists/AllowList.js.map +1 -1
  20. package/dist/AllowLists/OpenAllowList.d.ts +423 -0
  21. package/dist/AllowLists/OpenAllowList.d.ts.map +1 -0
  22. package/dist/AllowLists/SimpleAllowList.cjs +1 -1
  23. package/dist/AllowLists/SimpleAllowList.cjs.map +1 -1
  24. package/dist/AllowLists/SimpleAllowList.d.ts +92 -37
  25. package/dist/AllowLists/SimpleAllowList.d.ts.map +1 -1
  26. package/dist/AllowLists/SimpleAllowList.js +55 -71
  27. package/dist/AllowLists/SimpleAllowList.js.map +1 -1
  28. package/dist/AllowLists/SimpleDenyList.cjs +1 -1
  29. package/dist/AllowLists/SimpleDenyList.cjs.map +1 -1
  30. package/dist/AllowLists/SimpleDenyList.d.ts +203 -11
  31. package/dist/AllowLists/SimpleDenyList.d.ts.map +1 -1
  32. package/dist/AllowLists/SimpleDenyList.js +11 -112
  33. package/dist/AllowLists/SimpleDenyList.js.map +1 -1
  34. package/dist/Auth/PassthroughAuth.cjs +1 -1
  35. package/dist/Auth/PassthroughAuth.js +1 -1
  36. package/dist/Boost.cjs +1 -1
  37. package/dist/Boost.cjs.map +1 -1
  38. package/dist/Boost.d.ts +20 -21
  39. package/dist/Boost.d.ts.map +1 -1
  40. package/dist/Boost.js +43 -57
  41. package/dist/Boost.js.map +1 -1
  42. package/dist/BoostCore-BVZExPPu.js +1462 -0
  43. package/dist/BoostCore-BVZExPPu.js.map +1 -0
  44. package/dist/BoostCore-D-E-cnGI.cjs +3 -0
  45. package/dist/BoostCore-D-E-cnGI.cjs.map +1 -0
  46. package/dist/BoostCore.cjs +1 -2
  47. package/dist/BoostCore.cjs.map +1 -1
  48. package/dist/BoostCore.d.ts +748 -77
  49. package/dist/BoostCore.d.ts.map +1 -1
  50. package/dist/BoostCore.js +29 -1150
  51. package/dist/BoostCore.js.map +1 -1
  52. package/dist/BoostRegistry.cjs +1 -1
  53. package/dist/BoostRegistry.cjs.map +1 -1
  54. package/dist/BoostRegistry.d.ts +80 -25
  55. package/dist/BoostRegistry.d.ts.map +1 -1
  56. package/dist/BoostRegistry.js +165 -83
  57. package/dist/BoostRegistry.js.map +1 -1
  58. package/dist/Budgets/Budget.cjs +1 -1
  59. package/dist/Budgets/Budget.cjs.map +1 -1
  60. package/dist/Budgets/Budget.d.ts.map +1 -1
  61. package/dist/Budgets/Budget.js +2 -2
  62. package/dist/Budgets/Budget.js.map +1 -1
  63. package/dist/Budgets/ManagedBudget.cjs +1 -1
  64. package/dist/Budgets/ManagedBudget.cjs.map +1 -1
  65. package/dist/Budgets/ManagedBudget.d.ts +75 -193
  66. package/dist/Budgets/ManagedBudget.d.ts.map +1 -1
  67. package/dist/Budgets/ManagedBudget.js +80 -298
  68. package/dist/Budgets/ManagedBudget.js.map +1 -1
  69. package/dist/Budgets/VestingBudget.d.ts +223 -89
  70. package/dist/Budgets/VestingBudget.d.ts.map +1 -1
  71. package/dist/Deployable/Contract.cjs +1 -1
  72. package/dist/Deployable/Contract.cjs.map +1 -1
  73. package/dist/Deployable/Contract.d.ts +4 -5
  74. package/dist/Deployable/Contract.d.ts.map +1 -1
  75. package/dist/Deployable/Contract.js +5 -7
  76. package/dist/Deployable/Contract.js.map +1 -1
  77. package/dist/Deployable/Deployable.cjs.map +1 -1
  78. package/dist/Deployable/Deployable.d.ts +1 -1
  79. package/dist/Deployable/Deployable.d.ts.map +1 -1
  80. package/dist/Deployable/Deployable.js +3 -5
  81. package/dist/Deployable/Deployable.js.map +1 -1
  82. package/dist/Deployable/DeployableTarget.cjs +1 -1
  83. package/dist/Deployable/DeployableTarget.cjs.map +1 -1
  84. package/dist/Deployable/DeployableTarget.d.ts +13 -13
  85. package/dist/Deployable/DeployableTarget.d.ts.map +1 -1
  86. package/dist/Deployable/DeployableTarget.js +28 -25
  87. package/dist/Deployable/DeployableTarget.js.map +1 -1
  88. package/dist/Deployable/DeployableTargetWithRBAC.cjs +2 -0
  89. package/dist/Deployable/DeployableTargetWithRBAC.cjs.map +1 -0
  90. package/dist/Deployable/DeployableTargetWithRBAC.d.ts +179 -0
  91. package/dist/Deployable/DeployableTargetWithRBAC.d.ts.map +1 -0
  92. package/dist/Deployable/DeployableTargetWithRBAC.js +222 -0
  93. package/dist/Deployable/DeployableTargetWithRBAC.js.map +1 -0
  94. package/dist/EventAction-BZt5cjbe.cjs +2 -0
  95. package/dist/EventAction-BZt5cjbe.cjs.map +1 -0
  96. package/dist/EventAction-C_-hJXWm.js +1541 -0
  97. package/dist/EventAction-C_-hJXWm.js.map +1 -0
  98. package/dist/Incentive-BhHaK3PZ.cjs +2 -0
  99. package/dist/Incentive-BhHaK3PZ.cjs.map +1 -0
  100. package/dist/Incentive-Cqg1w6wD.js +312 -0
  101. package/dist/Incentive-Cqg1w6wD.js.map +1 -0
  102. package/dist/Incentives/AllowListIncentive.cjs +1 -1
  103. package/dist/Incentives/AllowListIncentive.cjs.map +1 -1
  104. package/dist/Incentives/AllowListIncentive.d.ts +38 -16
  105. package/dist/Incentives/AllowListIncentive.d.ts.map +1 -1
  106. package/dist/Incentives/AllowListIncentive.js +42 -29
  107. package/dist/Incentives/AllowListIncentive.js.map +1 -1
  108. package/dist/Incentives/CGDAIncentive.cjs +1 -1
  109. package/dist/Incentives/CGDAIncentive.cjs.map +1 -1
  110. package/dist/Incentives/CGDAIncentive.d.ts +234 -21
  111. package/dist/Incentives/CGDAIncentive.d.ts.map +1 -1
  112. package/dist/Incentives/CGDAIncentive.js +45 -32
  113. package/dist/Incentives/CGDAIncentive.js.map +1 -1
  114. package/dist/Incentives/ERC1155Incentive.d.ts +224 -37
  115. package/dist/Incentives/ERC1155Incentive.d.ts.map +1 -1
  116. package/dist/Incentives/ERC20Incentive.cjs +1 -1
  117. package/dist/Incentives/ERC20Incentive.cjs.map +1 -1
  118. package/dist/Incentives/ERC20Incentive.d.ts +230 -29
  119. package/dist/Incentives/ERC20Incentive.d.ts.map +1 -1
  120. package/dist/Incentives/ERC20Incentive.js +56 -43
  121. package/dist/Incentives/ERC20Incentive.js.map +1 -1
  122. package/dist/{Budgets/SimpleBudget.d.ts → Incentives/ERC20VariableCriteriaIncentive.d.ts} +335 -440
  123. package/dist/Incentives/ERC20VariableCriteriaIncentive.d.ts.map +1 -0
  124. package/dist/Incentives/ERC20VariableIncentive.d.ts +231 -29
  125. package/dist/Incentives/ERC20VariableIncentive.d.ts.map +1 -1
  126. package/dist/Incentives/Incentive.cjs +1 -1
  127. package/dist/Incentives/Incentive.cjs.map +1 -1
  128. package/dist/Incentives/Incentive.d.ts +4 -4
  129. package/dist/Incentives/Incentive.d.ts.map +1 -1
  130. package/dist/Incentives/Incentive.js +16 -296
  131. package/dist/Incentives/Incentive.js.map +1 -1
  132. package/dist/Incentives/PointsIncentive.cjs +1 -1
  133. package/dist/Incentives/PointsIncentive.cjs.map +1 -1
  134. package/dist/Incentives/PointsIncentive.d.ts +40 -18
  135. package/dist/Incentives/PointsIncentive.d.ts.map +1 -1
  136. package/dist/Incentives/PointsIncentive.js +37 -24
  137. package/dist/Incentives/PointsIncentive.js.map +1 -1
  138. package/dist/SimpleDenyList-BUR17Tt1.cjs +2 -0
  139. package/dist/SimpleDenyList-BUR17Tt1.cjs.map +1 -0
  140. package/dist/SimpleDenyList-CGaWjuld.js +132 -0
  141. package/dist/SimpleDenyList-CGaWjuld.js.map +1 -0
  142. package/dist/Validators/SignerValidator.cjs +1 -1
  143. package/dist/Validators/SignerValidator.cjs.map +1 -1
  144. package/dist/Validators/SignerValidator.d.ts +16 -16
  145. package/dist/Validators/SignerValidator.d.ts.map +1 -1
  146. package/dist/Validators/SignerValidator.js +30 -27
  147. package/dist/Validators/SignerValidator.js.map +1 -1
  148. package/dist/Validators/Validator.cjs +1 -1
  149. package/dist/Validators/Validator.cjs.map +1 -1
  150. package/dist/Validators/Validator.d.ts +1 -1
  151. package/dist/Validators/Validator.js +2 -2
  152. package/dist/Validators/Validator.js.map +1 -1
  153. package/dist/claiming.cjs.map +1 -1
  154. package/dist/claiming.d.ts +1 -1
  155. package/dist/claiming.js.map +1 -1
  156. package/dist/componentInterfaces-BBCFkrZv.js +14 -0
  157. package/dist/componentInterfaces-BBCFkrZv.js.map +1 -0
  158. package/dist/componentInterfaces-DRI_dQ-P.cjs +2 -0
  159. package/dist/componentInterfaces-DRI_dQ-P.cjs.map +1 -0
  160. package/dist/deployments-DVXioW2i.cjs +2 -0
  161. package/dist/deployments-DVXioW2i.cjs.map +1 -0
  162. package/dist/deployments-oykLv3_Z.js +43 -0
  163. package/dist/deployments-oykLv3_Z.js.map +1 -0
  164. package/dist/deployments.json +44 -0
  165. package/dist/errors.cjs +1 -1
  166. package/dist/errors.cjs.map +1 -1
  167. package/dist/errors.d.ts +256 -20
  168. package/dist/errors.d.ts.map +1 -1
  169. package/dist/errors.js +183 -26
  170. package/dist/errors.js.map +1 -1
  171. package/dist/{generated-57_Kffpz.js → generated-CKt2yCQd.js} +3613 -1869
  172. package/dist/generated-CKt2yCQd.js.map +1 -0
  173. package/dist/generated-CyTNlOwM.cjs +3 -0
  174. package/dist/generated-CyTNlOwM.cjs.map +1 -0
  175. package/dist/index.cjs +1 -1
  176. package/dist/index.d.ts +5 -0
  177. package/dist/index.d.ts.map +1 -1
  178. package/dist/index.js +142 -108
  179. package/dist/index.js.map +1 -1
  180. package/dist/transfers.cjs.map +1 -1
  181. package/dist/transfers.d.ts +1 -1
  182. package/dist/transfers.js.map +1 -1
  183. package/dist/utils.cjs +1 -1
  184. package/dist/utils.cjs.map +1 -1
  185. package/dist/utils.d.ts +26 -12
  186. package/dist/utils.d.ts.map +1 -1
  187. package/dist/utils.js +38 -23
  188. package/dist/utils.js.map +1 -1
  189. package/package.json +20 -10
  190. package/src/Actions/Action.test.ts +14 -13
  191. package/src/Actions/ContractAction.test.ts +10 -10
  192. package/src/Actions/ContractAction.ts +11 -12
  193. package/src/Actions/ERC721MintAction.test.ts +6 -6
  194. package/src/Actions/ERC721MintAction.ts +14 -15
  195. package/src/Actions/EventAction.test.ts +729 -109
  196. package/src/Actions/EventAction.ts +542 -84
  197. package/src/AllowLists/AllowList.test.ts +7 -7
  198. package/src/AllowLists/AllowList.ts +5 -3
  199. package/src/AllowLists/OpenAllowList.test.ts +40 -0
  200. package/src/AllowLists/OpenAllowList.ts +45 -0
  201. package/src/AllowLists/SimpleAllowList.test.ts +4 -4
  202. package/src/AllowLists/SimpleAllowList.ts +39 -61
  203. package/src/AllowLists/SimpleDenyList.test.ts +4 -4
  204. package/src/AllowLists/SimpleDenyList.ts +40 -17
  205. package/src/Auth/PassthroughAuth.test.ts +1 -1
  206. package/src/Boost.ts +21 -24
  207. package/src/BoostCore.test.ts +323 -268
  208. package/src/BoostCore.ts +396 -219
  209. package/src/BoostRegistry.test.ts +53 -0
  210. package/src/BoostRegistry.ts +161 -40
  211. package/src/Budgets/Budget.test.ts +2 -2
  212. package/src/Budgets/Budget.ts +1 -2
  213. package/src/Budgets/ManagedBudget.test.ts +82 -19
  214. package/src/Budgets/ManagedBudget.ts +48 -310
  215. package/src/Budgets/VestingBudget.test.ts +7 -7
  216. package/src/Budgets/VestingBudget.ts +34 -106
  217. package/src/Deployable/Contract.ts +4 -5
  218. package/src/Deployable/Deployable.ts +1 -1
  219. package/src/Deployable/DeployableTarget.ts +30 -19
  220. package/src/Deployable/DeployableTargetWithRBAC.ts +323 -0
  221. package/src/Incentives/AllowListIncentive.test.ts +5 -5
  222. package/src/Incentives/AllowListIncentive.ts +29 -15
  223. package/src/Incentives/CGDAIncentive.test.ts +9 -6
  224. package/src/Incentives/CGDAIncentive.ts +38 -18
  225. package/src/Incentives/ERC1155Incentive.test.ts +3 -3
  226. package/src/Incentives/ERC1155Incentive.ts +28 -29
  227. package/src/Incentives/ERC20Incentive.test.ts +9 -6
  228. package/src/Incentives/ERC20Incentive.ts +46 -26
  229. package/src/Incentives/ERC20VariableCriteriaIncentive.test.ts +184 -0
  230. package/src/Incentives/ERC20VariableCriteriaIncentive.ts +324 -0
  231. package/src/Incentives/ERC20VariableIncentive.test.ts +8 -11
  232. package/src/Incentives/ERC20VariableIncentive.ts +49 -26
  233. package/src/Incentives/Incentive.test.ts +4 -1
  234. package/src/Incentives/Incentive.ts +7 -6
  235. package/src/Incentives/PointsIncentive.test.ts +24 -25
  236. package/src/Incentives/PointsIncentive.ts +31 -17
  237. package/src/Validators/SignerValidator.test.ts +6 -6
  238. package/src/Validators/SignerValidator.ts +19 -17
  239. package/src/Validators/Validator.test.ts +2 -2
  240. package/src/Validators/Validator.ts +1 -1
  241. package/src/claiming.ts +1 -1
  242. package/src/errors.ts +345 -21
  243. package/src/index.test.ts +118 -36
  244. package/src/index.ts +5 -0
  245. package/src/transfers.ts +1 -1
  246. package/src/utils.test.ts +2 -2
  247. package/src/utils.ts +61 -12
  248. package/dist/Budgets/SimpleBudget.d.ts.map +0 -1
  249. package/dist/componentInterfaces-CKCBwG16.cjs +0 -2
  250. package/dist/componentInterfaces-CKCBwG16.cjs.map +0 -1
  251. package/dist/componentInterfaces-DYkaxBda.js +0 -13
  252. package/dist/componentInterfaces-DYkaxBda.js.map +0 -1
  253. package/dist/generated-57_Kffpz.js.map +0 -1
  254. package/dist/generated-wKBNvm48.cjs +0 -3
  255. package/dist/generated-wKBNvm48.cjs.map +0 -1
  256. package/src/Budgets/SimpleBudget.test.ts +0 -152
  257. package/src/Budgets/SimpleBudget.ts +0 -564
@@ -1,9 +1,10 @@
1
- import { M as r, aS as u, aT as h, aU as y, aV as m, aW as p, aX as g, aY as w, aZ as A } from "../generated-57_Kffpz.js";
1
+ import { x as r, aP as u, aQ as h, aR as y, aS as m, aT as p, aU as g, aV as w, aW as A } from "../generated-CKt2yCQd.js";
2
2
  import { encodeAbiParameters as s } from "viem";
3
3
  import { signTypedData as D } from "viem/accounts";
4
+ import { b as V } from "../deployments-oykLv3_Z.js";
4
5
  import { DeployableTarget as v } from "../Deployable/DeployableTarget.js";
5
- import { RegistryType as V } from "../utils.js";
6
- const C = "0x610120604052348015610010575f80fd5b503073ffffffffffffffffffffffffffffffffffffffff16608081815250504660a0818152505060608061004861013960201b60201c565b6100635761005a61014160201b60201c565b80925081935050505b5f61007261013960201b60201c565b610083578280519060200120610087565b5f801b5b90505f61009861013960201b60201c565b6100a95782805190602001206100ad565b5f801b5b90508160c081815250508060e081815250505f6100ce61013960201b60201c565b610118576040517f8b73c3c69bb8fe3d512ecc4cf759cc79239f7b179b0ffacaa9a75d522b39400f815283602082015282604082015246606082015230608082015260a081209150505b80610100818152505050505050506101346101b860201b60201c565b61024d565b5f6001905090565b6060806040518060400160405280600f81526020017f5369676e657256616c696461746f72000000000000000000000000000000000081525091506040518060400160405280600181526020017f310000000000000000000000000000000000000000000000000000000000000081525090509091565b5f6101c761022460201b60201c565b9050805460018116156101e15763f92ee8a95f526004601cfd5b8160c01c808260011c1461021f578060011b8355806020527fc7f505b2f371ae2175ee4913f4499e1f2633a7b5936321eed1cdaeb6115181d2602080a15b505050565b5f7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffbf6011325f1b905090565b60805160a05160c05160e05161010051611ecc61028a5f395f610f6101525f6110a001525f61107d01525f61110f01525f6111330152611ecc5ff3fe6080604052600436106100f2575f3560e01c8063736c0d5b11610089578063d3de6e7511610058578063d3de6e75146102c4578063f04e283e14610300578063f2fde38b1461031c578063fee81cf414610338576100f2565b8063736c0d5b1461020657806384b0196e146102425780638da5cb5b14610272578063a1d2756f1461029c576100f2565b8063439fab91116100c5578063439fab911461018e57806354d1f13d146101b6578063703b6900146101c0578063715018a6146101fc576100f2565b806301ffc9a7146100f6578063256929621461013257806328d6183b1461013c5780634359d28a14610166575b5f80fd5b348015610101575f80fd5b5061011c60048036038101906101179190611232565b610374565b6040516101299190611277565b60405180910390f35b61013a6103ed565b005b348015610147575f80fd5b5061015061043e565b60405161015d919061129f565b60405180910390f35b348015610171575f80fd5b5061018c6004803603810190610187919061136e565b610465565b005b348015610199575f80fd5b506101b460048036038101906101af9190611441565b61056e565b005b6101be6106e5565b005b3480156101cb575f80fd5b506101e660048036038101906101e19190611519565b61071e565b6040516101f39190611277565b60405180910390f35b610204610911565b005b348015610211575f80fd5b5061022c6004803603810190610227919061159d565b610924565b6040516102399190611277565b60405180910390f35b34801561024d575f80fd5b50610256610940565b604051610269979695949392919061175f565b60405180910390f35b34801561027d575f80fd5b5061028661098b565b60405161029391906117e1565b60405180910390f35b3480156102a7575f80fd5b506102c260048036038101906102bd919061159d565b6109b3565b005b3480156102cf575f80fd5b506102ea60048036038101906102e59190611958565b6109fe565b6040516102f791906119d8565b60405180910390f35b61031a6004803603810190610315919061159d565b610a67565b005b6103366004803603810190610331919061159d565b610aa5565b005b348015610343575f80fd5b5061035e6004803603810190610359919061159d565b610ace565b60405161036b91906119f1565b60405180910390f35b5f7fb8ce7b22000000000000000000000000000000000000000000000000000000007bffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916827bffffffffffffffffffffffffffffffffffffffffffffffffffffffff191614806103e657506103e582610ae7565b5b9050919050565b5f6103f6610b60565b67ffffffffffffffff164201905063389a75e1600c52335f52806020600c2055337fdbf36a107da19e49527a7176a1babf963b4b0ff8cde35ee35d6cd8f1f9ac7e1d5f80a250565b5f7fb8ce7b2200000000000000000000000000000000000000000000000000000000905090565b61046d610b6a565b8181905084849050146104ac576040517fff633a3800000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b5f5b84849050811015610567578282828181106104cc576104cb611a0a565b5b90506020020160208101906104e19190611a61565b5f808787858181106104f6576104f5611a0a565b5b905060200201602081019061050b919061159d565b73ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020015f205f6101000a81548160ff02191690831515021790555080806001019150506104ae565b5050505050565b5f610577610ba1565b905080546003825580156105a95760018160011c14303b106105a05763f92ee8a95f526004601cfd5b818160ff1b1b91505b505f8084848101906105bb9190611b87565b915091506105e2825f815181106105d5576105d4611a0a565b5b6020026020010151610bca565b8060025f6101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff1602179055505f5b82518110156106a85760015f8085848151811061064457610643611a0a565b5b602002602001015173ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020015f205f6101000a81548160ff0219169083151502179055508080600101915050610624565b50505080156106e0576002815560016020527fc7f505b2f371ae2175ee4913f4499e1f2633a7b5936321eed1cdaeb6115181d2602080a15b505050565b63389a75e1600c52335f525f6020600c2055337ffa7b8eab7da67f412cc9575ed43464468f9bfbae89d1675917346ca6d8fe3c925f80a2565b5f60025f9054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff16146107a5576040517f82b4290000000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b5f83838101906107b59190611c6e565b90505f815f01518060200190518101906107cf9190611dc8565b90505f6107e68983604001518986602001516109fe565b905087826040015160ff1611610839578160400151886040517f17c66bc7000000000000000000000000000000000000000000000000000000008152600401610830929190611e1e565b60405180910390fd5b5f80835f015173ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020015f205f9054906101000a900460ff166108bb576040517f82b4290000000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b6108d181896001610ca09092919063ffffffff16565b610903818360200151845f015173ffffffffffffffffffffffffffffffffffffffff16610d029092919063ffffffff16565b935050505095945050505050565b610919610b6a565b6109225f610e05565b565b5f602052805f5260405f205f915054906101000a900460ff1681565b5f6060805f805f60607f0f000000000000000000000000000000000000000000000000000000000000009650610974610ecb565b809650819750505046935030925090919293949596565b5f7fffffffffffffffffffffffffffffffffffffffffffffffffffffffff7487392754905090565b6109bb610b6a565b8060025f6101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff16021790555050565b5f610a5d7ffea51d5bd45bcd3c2ecc3679b43a3b80b0bd0923f8c16f822455b8cdecd9852f8686868680519060200120604051602001610a42959493929190611e45565b60405160208183030381529060405280519060200120610f42565b9050949350505050565b610a6f610b6a565b63389a75e1600c52805f526020600c208054421115610a9557636f5e88185f526004601cfd5b5f815550610aa281610e05565b50565b610aad610b6a565b8060601b610ac257637448fbae5f526004601cfd5b610acb81610e05565b50565b5f63389a75e1600c52815f526020600c20549050919050565b5f7f5912b89c000000000000000000000000000000000000000000000000000000007bffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916827bffffffffffffffffffffffffffffffffffffffffffffffffffffffff19161480610b595750610b5882610fbe565b5b9050919050565b5f6202a300905090565b7fffffffffffffffffffffffffffffffffffffffffffffffffffffffff74873927543314610b9f576382b429005f526004601cfd5b565b5f7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffbf6011325f1b905090565b610bd2611037565b15610c4a577fffffffffffffffffffffffffffffffffffffffffffffffffffffffff74873927805415610c0c57630dc149f05f526004601cfd5b8160601b60601c9150811560ff1b82178155815f7f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e05f80a350610c9d565b8060601b60601c9050807fffffffffffffffffffffffffffffffffffffffffffffffffffffffff7487392755805f7f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e05f80a35b50565b5f633f57fc5c60e01b90505f634de1225a60e01b90506007831115610ccb57815f528260045260245ffd5b84602052835f5260405f206001841b81541880851c6001188015610cf557835f528560045260245ffd5b8183555050505050505050565b5f8360601b60601c93508315610dfe57604051835f5260208301516040526040835103610d6f576040830151601b8160ff1c016020528060011b60011c6060526020600160805f60015afa805187183d1517610d6c57600193505f60605282604052505050610dfe565b50505b6041835103610db55760608301515f1a60205260408301516060526020600160805f60015afa805186183d1517610db357600192505f606052816040525050610dfe565b505b5f60605280604052631626ba7e60e01b808252846004830152602482016040815284516020018060448501828860045afa5060208260443d01868b5afa83835114169450505050505b9392505050565b610e0d611037565b15610e72577fffffffffffffffffffffffffffffffffffffffffffffffffffffffff748739278160601b60601c91508181547f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e05f80a3811560ff1b8217815550610ec8565b7fffffffffffffffffffffffffffffffffffffffffffffffffffffffff748739278160601b60601c91508181547f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e05f80a3818155505b50565b6060806040518060400160405280600f81526020017f5369676e657256616c696461746f72000000000000000000000000000000000081525091506040518060400160405280600181526020017f310000000000000000000000000000000000000000000000000000000000000081525090509091565b5f610f4b61103b565b15610f5f57610f58611043565b9050610f9b565b7f00000000000000000000000000000000000000000000000000000000000000009050610f8a61110b565b15610f9a57610f97611043565b90505b5b6719010000000000005f5280601a5281603a52604260182090505f603a52919050565b5f7f6ab67a0d000000000000000000000000000000000000000000000000000000007bffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916827bffffffffffffffffffffffffffffffffffffffffffffffffffffffff19161480611030575061102f82611163565b5b9050919050565b5f90565b5f6001905090565b5f8061104d61103b565b1561107b575f8061105c610ecb565b91509150818051906020012093508080519060200120925050506110c2565b7f000000000000000000000000000000000000000000000000000000000000000091507f000000000000000000000000000000000000000000000000000000000000000090505b6040517f8b73c3c69bb8fe3d512ecc4cf759cc79239f7b179b0ffacaa9a75d522b39400f815282602082015281604082015246606082015230608082015260a081209250505090565b5f807f000000000000000000000000000000000000000000000000000000000000000090505f7f0000000000000000000000000000000000000000000000000000000000000000905080301482461416159250505090565b5f7f01ffc9a7000000000000000000000000000000000000000000000000000000007bffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916827bffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916149050919050565b5f604051905090565b5f80fd5b5f80fd5b5f7fffffffff0000000000000000000000000000000000000000000000000000000082169050919050565b611211816111dd565b811461121b575f80fd5b50565b5f8135905061122c81611208565b92915050565b5f60208284031215611247576112466111d5565b5b5f6112548482850161121e565b91505092915050565b5f8115159050919050565b6112718161125d565b82525050565b5f60208201905061128a5f830184611268565b92915050565b611299816111dd565b82525050565b5f6020820190506112b25f830184611290565b92915050565b5f80fd5b5f80fd5b5f80fd5b5f8083601f8401126112d9576112d86112b8565b5b8235905067ffffffffffffffff8111156112f6576112f56112bc565b5b602083019150836020820283011115611312576113116112c0565b5b9250929050565b5f8083601f84011261132e5761132d6112b8565b5b8235905067ffffffffffffffff81111561134b5761134a6112bc565b5b602083019150836020820283011115611367576113666112c0565b5b9250929050565b5f805f8060408587031215611386576113856111d5565b5b5f85013567ffffffffffffffff8111156113a3576113a26111d9565b5b6113af878288016112c4565b9450945050602085013567ffffffffffffffff8111156113d2576113d16111d9565b5b6113de87828801611319565b925092505092959194509250565b5f8083601f840112611401576114006112b8565b5b8235905067ffffffffffffffff81111561141e5761141d6112bc565b5b60208301915083600182028301111561143a576114396112c0565b5b9250929050565b5f8060208385031215611457576114566111d5565b5b5f83013567ffffffffffffffff811115611474576114736111d9565b5b611480858286016113ec565b92509250509250929050565b5f819050919050565b61149e8161148c565b81146114a8575f80fd5b50565b5f813590506114b981611495565b92915050565b5f73ffffffffffffffffffffffffffffffffffffffff82169050919050565b5f6114e8826114bf565b9050919050565b6114f8816114de565b8114611502575f80fd5b50565b5f81359050611513816114ef565b92915050565b5f805f805f60808688031215611532576115316111d5565b5b5f61153f888289016114ab565b9550506020611550888289016114ab565b945050604061156188828901611505565b935050606086013567ffffffffffffffff811115611582576115816111d9565b5b61158e888289016113ec565b92509250509295509295909350565b5f602082840312156115b2576115b16111d5565b5b5f6115bf84828501611505565b91505092915050565b5f7fff0000000000000000000000000000000000000000000000000000000000000082169050919050565b6115fc816115c8565b82525050565b5f81519050919050565b5f82825260208201905092915050565b8281835e5f83830152505050565b5f601f19601f8301169050919050565b5f61164482611602565b61164e818561160c565b935061165e81856020860161161c565b6116678161162a565b840191505092915050565b61167b8161148c565b82525050565b61168a816114de565b82525050565b5f819050919050565b6116a281611690565b82525050565b5f81519050919050565b5f82825260208201905092915050565b5f819050602082019050919050565b6116da8161148c565b82525050565b5f6116eb83836116d1565b60208301905092915050565b5f602082019050919050565b5f61170d826116a8565b61171781856116b2565b9350611722836116c2565b805f5b8381101561175257815161173988826116e0565b9750611744836116f7565b925050600181019050611725565b5085935050505092915050565b5f60e0820190506117725f83018a6115f3565b8181036020830152611784818961163a565b90508181036040830152611798818861163a565b90506117a76060830187611672565b6117b46080830186611681565b6117c160a0830185611699565b81810360c08301526117d38184611703565b905098975050505050505050565b5f6020820190506117f45f830184611681565b92915050565b5f60ff82169050919050565b61180f816117fa565b8114611819575f80fd5b50565b5f8135905061182a81611806565b92915050565b5f80fd5b7f4e487b71000000000000000000000000000000000000000000000000000000005f52604160045260245ffd5b61186a8261162a565b810181811067ffffffffffffffff8211171561188957611888611834565b5b80604052505050565b5f61189b6111cc565b90506118a78282611861565b919050565b5f67ffffffffffffffff8211156118c6576118c5611834565b5b6118cf8261162a565b9050602081019050919050565b828183375f83830152505050565b5f6118fc6118f7846118ac565b611892565b90508281526020810184848401111561191857611917611830565b5b6119238482856118dc565b509392505050565b5f82601f83011261193f5761193e6112b8565b5b813561194f8482602086016118ea565b91505092915050565b5f805f80608085870312156119705761196f6111d5565b5b5f61197d878288016114ab565b945050602061198e8782880161181c565b935050604061199f87828801611505565b925050606085013567ffffffffffffffff8111156119c0576119bf6111d9565b5b6119cc8782880161192b565b91505092959194509250565b5f6020820190506119eb5f830184611699565b92915050565b5f602082019050611a045f830184611672565b92915050565b7f4e487b71000000000000000000000000000000000000000000000000000000005f52603260045260245ffd5b611a408161125d565b8114611a4a575f80fd5b50565b5f81359050611a5b81611a37565b92915050565b5f60208284031215611a7657611a756111d5565b5b5f611a8384828501611a4d565b91505092915050565b5f67ffffffffffffffff821115611aa657611aa5611834565b5b602082029050602081019050919050565b5f611ac9611ac484611a8c565b611892565b90508083825260208201905060208402830185811115611aec57611aeb6112c0565b5b835b81811015611b155780611b018882611505565b845260208401935050602081019050611aee565b5050509392505050565b5f82601f830112611b3357611b326112b8565b5b8135611b43848260208601611ab7565b91505092915050565b5f611b56826114bf565b9050919050565b611b6681611b4c565b8114611b70575f80fd5b50565b5f81359050611b8181611b5d565b92915050565b5f8060408385031215611b9d57611b9c6111d5565b5b5f83013567ffffffffffffffff811115611bba57611bb96111d9565b5b611bc685828601611b1f565b9250506020611bd785828601611b73565b9150509250929050565b5f80fd5b5f80fd5b5f60408284031215611bfe57611bfd611be1565b5b611c086040611892565b90505f82013567ffffffffffffffff811115611c2757611c26611be5565b5b611c338482850161192b565b5f83015250602082013567ffffffffffffffff811115611c5657611c55611be5565b5b611c628482850161192b565b60208301525092915050565b5f60208284031215611c8357611c826111d5565b5b5f82013567ffffffffffffffff811115611ca057611c9f6111d9565b5b611cac84828501611be9565b91505092915050565b5f81519050611cc3816114ef565b92915050565b5f611cdb611cd6846118ac565b611892565b905082815260208101848484011115611cf757611cf6611830565b5b611d0284828561161c565b509392505050565b5f82601f830112611d1e57611d1d6112b8565b5b8151611d2e848260208601611cc9565b91505092915050565b5f81519050611d4581611806565b92915050565b5f60608284031215611d6057611d5f611be1565b5b611d6a6060611892565b90505f611d7984828501611cb5565b5f83015250602082015167ffffffffffffffff811115611d9c57611d9b611be5565b5b611da884828501611d0a565b6020830152506040611dbc84828501611d37565b60408301525092915050565b5f60208284031215611ddd57611ddc6111d5565b5b5f82015167ffffffffffffffff811115611dfa57611df96111d9565b5b611e0684828501611d4b565b91505092915050565b611e18816117fa565b82525050565b5f604082019050611e315f830185611e0f565b611e3e6020830184611672565b9392505050565b5f60a082019050611e585f830188611699565b611e656020830187611672565b611e726040830186611e0f565b611e7f6060830185611681565b611e8c6080830184611699565b969550505050505056fea26469706673582212205fce26f05c322d5e151f6b16e70e28b485c147f70dd352b6a7a116eaca9f369f64736f6c634300081a0033", t = class t extends v {
6
+ import { RegistryType as R } from "../utils.js";
7
+ const C = "0x610120604052348015610010575f80fd5b503073ffffffffffffffffffffffffffffffffffffffff16608081815250504660a0818152505060608061004861013960201b60201c565b6100635761005a61014160201b60201c565b80925081935050505b5f61007261013960201b60201c565b610083578280519060200120610087565b5f801b5b90505f61009861013960201b60201c565b6100a95782805190602001206100ad565b5f801b5b90508160c081815250508060e081815250505f6100ce61013960201b60201c565b610118576040517f8b73c3c69bb8fe3d512ecc4cf759cc79239f7b179b0ffacaa9a75d522b39400f815283602082015282604082015246606082015230608082015260a081209150505b80610100818152505050505050506101346101b860201b60201c565b61024d565b5f6001905090565b6060806040518060400160405280600f81526020017f5369676e657256616c696461746f72000000000000000000000000000000000081525091506040518060400160405280600181526020017f310000000000000000000000000000000000000000000000000000000000000081525090509091565b5f6101c761022460201b60201c565b9050805460018116156101e15763f92ee8a95f526004601cfd5b8160c01c808260011c1461021f578060011b8355806020527fc7f505b2f371ae2175ee4913f4499e1f2633a7b5936321eed1cdaeb6115181d2602080a15b505050565b5f7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffbf6011325f1b905090565b60805160a05160c05160e05161010051611ecf61028a5f395f610f6401525f6110a301525f61108001525f61111201525f6111360152611ecf5ff3fe6080604052600436106100f2575f3560e01c8063736c0d5b11610089578063d3de6e7511610058578063d3de6e75146102c4578063f04e283e14610300578063f2fde38b1461031c578063fee81cf414610338576100f2565b8063736c0d5b1461020657806384b0196e146102425780638da5cb5b14610272578063a1d2756f1461029c576100f2565b8063439fab91116100c5578063439fab911461018e57806354d1f13d146101b6578063703b6900146101c0578063715018a6146101fc576100f2565b806301ffc9a7146100f6578063256929621461013257806328d6183b1461013c5780634359d28a14610166575b5f80fd5b348015610101575f80fd5b5061011c60048036038101906101179190611235565b610374565b604051610129919061127a565b60405180910390f35b61013a6103ed565b005b348015610147575f80fd5b5061015061043e565b60405161015d91906112a2565b60405180910390f35b348015610171575f80fd5b5061018c60048036038101906101879190611371565b610465565b005b348015610199575f80fd5b506101b460048036038101906101af9190611444565b61056e565b005b6101be6106e5565b005b3480156101cb575f80fd5b506101e660048036038101906101e1919061151c565b61071e565b6040516101f3919061127a565b60405180910390f35b610204610911565b005b348015610211575f80fd5b5061022c600480360381019061022791906115a0565b610924565b604051610239919061127a565b60405180910390f35b34801561024d575f80fd5b50610256610940565b6040516102699796959493929190611762565b60405180910390f35b34801561027d575f80fd5b5061028661098b565b60405161029391906117e4565b60405180910390f35b3480156102a7575f80fd5b506102c260048036038101906102bd91906115a0565b6109b3565b005b3480156102cf575f80fd5b506102ea60048036038101906102e5919061195b565b6109fe565b6040516102f791906119db565b60405180910390f35b61031a600480360381019061031591906115a0565b610a67565b005b610336600480360381019061033191906115a0565b610aa5565b005b348015610343575f80fd5b5061035e600480360381019061035991906115a0565b610ace565b60405161036b91906119f4565b60405180910390f35b5f7fb8ce7b22000000000000000000000000000000000000000000000000000000007bffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916827bffffffffffffffffffffffffffffffffffffffffffffffffffffffff191614806103e657506103e582610ae7565b5b9050919050565b5f6103f6610b60565b67ffffffffffffffff164201905063389a75e1600c52335f52806020600c2055337fdbf36a107da19e49527a7176a1babf963b4b0ff8cde35ee35d6cd8f1f9ac7e1d5f80a250565b5f7fb8ce7b2200000000000000000000000000000000000000000000000000000000905090565b61046d610b6a565b8181905084849050146104ac576040517fff633a3800000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b5f5b84849050811015610567578282828181106104cc576104cb611a0d565b5b90506020020160208101906104e19190611a64565b5f808787858181106104f6576104f5611a0d565b5b905060200201602081019061050b91906115a0565b73ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020015f205f6101000a81548160ff02191690831515021790555080806001019150506104ae565b5050505050565b5f610577610ba1565b905080546003825580156105a95760018160011c14303b106105a05763f92ee8a95f526004601cfd5b818160ff1b1b91505b505f8084848101906105bb9190611b8a565b915091506105e2825f815181106105d5576105d4611a0d565b5b6020026020010151610bca565b8060025f6101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff1602179055505f5b82518110156106a85760015f8085848151811061064457610643611a0d565b5b602002602001015173ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020015f205f6101000a81548160ff0219169083151502179055508080600101915050610624565b50505080156106e0576002815560016020527fc7f505b2f371ae2175ee4913f4499e1f2633a7b5936321eed1cdaeb6115181d2602080a15b505050565b63389a75e1600c52335f525f6020600c2055337ffa7b8eab7da67f412cc9575ed43464468f9bfbae89d1675917346ca6d8fe3c925f80a2565b5f60025f9054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff16146107a5576040517f82b4290000000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b5f83838101906107b59190611c71565b90505f815f01518060200190518101906107cf9190611dcb565b90505f6107e68983604001518986602001516109fe565b905087826040015160ff1611610839578160400151886040517f17c66bc7000000000000000000000000000000000000000000000000000000008152600401610830929190611e21565b60405180910390fd5b5f80835f015173ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020015f205f9054906101000a900460ff166108bb576040517f82b4290000000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b6108d181896001610ca09092919063ffffffff16565b610903818360200151845f015173ffffffffffffffffffffffffffffffffffffffff16610d059092919063ffffffff16565b935050505095945050505050565b610919610b6a565b6109225f610e08565b565b5f602052805f5260405f205f915054906101000a900460ff1681565b5f6060805f805f60607f0f000000000000000000000000000000000000000000000000000000000000009650610974610ece565b809650819750505046935030925090919293949596565b5f7fffffffffffffffffffffffffffffffffffffffffffffffffffffffff7487392754905090565b6109bb610b6a565b8060025f6101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff16021790555050565b5f610a5d7ffea51d5bd45bcd3c2ecc3679b43a3b80b0bd0923f8c16f822455b8cdecd9852f8686868680519060200120604051602001610a42959493929190611e48565b60405160208183030381529060405280519060200120610f45565b9050949350505050565b610a6f610b6a565b63389a75e1600c52805f526020600c208054421115610a9557636f5e88185f526004601cfd5b5f815550610aa281610e08565b50565b610aad610b6a565b8060601b610ac257637448fbae5f526004601cfd5b610acb81610e08565b50565b5f63389a75e1600c52815f526020600c20549050919050565b5f7f5912b89c000000000000000000000000000000000000000000000000000000007bffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916827bffffffffffffffffffffffffffffffffffffffffffffffffffffffff19161480610b595750610b5882610fc1565b5b9050919050565b5f6202a300905090565b7fffffffffffffffffffffffffffffffffffffffffffffffffffffffff74873927543314610b9f576382b429005f526004601cfd5b565b5f7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffbf6011325f1b905090565b610bd261103a565b15610c4a577fffffffffffffffffffffffffffffffffffffffffffffffffffffffff74873927805415610c0c57630dc149f05f526004601cfd5b8160601b60601c9150811560ff1b82178155815f7f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e05f80a350610c9d565b8060601b60601c9050807fffffffffffffffffffffffffffffffffffffffffffffffffffffffff7487392755805f7f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e05f80a35b50565b5f633f57fc5c60e01b90505f634de1225a60e01b90506007831115610ccb57815f528260045260245ffd5b84602052835f5260405f206001841b81541880851c6001166001188015610cf857835f528560045260245ffd5b8183555050505050505050565b5f8360601b60601c93508315610e0157604051835f5260208301516040526040835103610d72576040830151601b8160ff1c016020528060011b60011c6060526020600160805f60015afa805187183d1517610d6f57600193505f60605282604052505050610e01565b50505b6041835103610db85760608301515f1a60205260408301516060526020600160805f60015afa805186183d1517610db657600192505f606052816040525050610e01565b505b5f60605280604052631626ba7e60e01b808252846004830152602482016040815284516020018060448501828860045afa5060208260443d01868b5afa83835114169450505050505b9392505050565b610e1061103a565b15610e75577fffffffffffffffffffffffffffffffffffffffffffffffffffffffff748739278160601b60601c91508181547f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e05f80a3811560ff1b8217815550610ecb565b7fffffffffffffffffffffffffffffffffffffffffffffffffffffffff748739278160601b60601c91508181547f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e05f80a3818155505b50565b6060806040518060400160405280600f81526020017f5369676e657256616c696461746f72000000000000000000000000000000000081525091506040518060400160405280600181526020017f310000000000000000000000000000000000000000000000000000000000000081525090509091565b5f610f4e61103e565b15610f6257610f5b611046565b9050610f9e565b7f00000000000000000000000000000000000000000000000000000000000000009050610f8d61110e565b15610f9d57610f9a611046565b90505b5b6719010000000000005f5280601a5281603a52604260182090505f603a52919050565b5f7f6ab67a0d000000000000000000000000000000000000000000000000000000007bffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916827bffffffffffffffffffffffffffffffffffffffffffffffffffffffff19161480611033575061103282611166565b5b9050919050565b5f90565b5f6001905090565b5f8061105061103e565b1561107e575f8061105f610ece565b91509150818051906020012093508080519060200120925050506110c5565b7f000000000000000000000000000000000000000000000000000000000000000091507f000000000000000000000000000000000000000000000000000000000000000090505b6040517f8b73c3c69bb8fe3d512ecc4cf759cc79239f7b179b0ffacaa9a75d522b39400f815282602082015281604082015246606082015230608082015260a081209250505090565b5f807f000000000000000000000000000000000000000000000000000000000000000090505f7f0000000000000000000000000000000000000000000000000000000000000000905080301482461416159250505090565b5f7f01ffc9a7000000000000000000000000000000000000000000000000000000007bffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916827bffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916149050919050565b5f604051905090565b5f80fd5b5f80fd5b5f7fffffffff0000000000000000000000000000000000000000000000000000000082169050919050565b611214816111e0565b811461121e575f80fd5b50565b5f8135905061122f8161120b565b92915050565b5f6020828403121561124a576112496111d8565b5b5f61125784828501611221565b91505092915050565b5f8115159050919050565b61127481611260565b82525050565b5f60208201905061128d5f83018461126b565b92915050565b61129c816111e0565b82525050565b5f6020820190506112b55f830184611293565b92915050565b5f80fd5b5f80fd5b5f80fd5b5f8083601f8401126112dc576112db6112bb565b5b8235905067ffffffffffffffff8111156112f9576112f86112bf565b5b602083019150836020820283011115611315576113146112c3565b5b9250929050565b5f8083601f840112611331576113306112bb565b5b8235905067ffffffffffffffff81111561134e5761134d6112bf565b5b60208301915083602082028301111561136a576113696112c3565b5b9250929050565b5f805f8060408587031215611389576113886111d8565b5b5f85013567ffffffffffffffff8111156113a6576113a56111dc565b5b6113b2878288016112c7565b9450945050602085013567ffffffffffffffff8111156113d5576113d46111dc565b5b6113e18782880161131c565b925092505092959194509250565b5f8083601f840112611404576114036112bb565b5b8235905067ffffffffffffffff811115611421576114206112bf565b5b60208301915083600182028301111561143d5761143c6112c3565b5b9250929050565b5f806020838503121561145a576114596111d8565b5b5f83013567ffffffffffffffff811115611477576114766111dc565b5b611483858286016113ef565b92509250509250929050565b5f819050919050565b6114a18161148f565b81146114ab575f80fd5b50565b5f813590506114bc81611498565b92915050565b5f73ffffffffffffffffffffffffffffffffffffffff82169050919050565b5f6114eb826114c2565b9050919050565b6114fb816114e1565b8114611505575f80fd5b50565b5f81359050611516816114f2565b92915050565b5f805f805f60808688031215611535576115346111d8565b5b5f611542888289016114ae565b9550506020611553888289016114ae565b945050604061156488828901611508565b935050606086013567ffffffffffffffff811115611585576115846111dc565b5b611591888289016113ef565b92509250509295509295909350565b5f602082840312156115b5576115b46111d8565b5b5f6115c284828501611508565b91505092915050565b5f7fff0000000000000000000000000000000000000000000000000000000000000082169050919050565b6115ff816115cb565b82525050565b5f81519050919050565b5f82825260208201905092915050565b8281835e5f83830152505050565b5f601f19601f8301169050919050565b5f61164782611605565b611651818561160f565b935061166181856020860161161f565b61166a8161162d565b840191505092915050565b61167e8161148f565b82525050565b61168d816114e1565b82525050565b5f819050919050565b6116a581611693565b82525050565b5f81519050919050565b5f82825260208201905092915050565b5f819050602082019050919050565b6116dd8161148f565b82525050565b5f6116ee83836116d4565b60208301905092915050565b5f602082019050919050565b5f611710826116ab565b61171a81856116b5565b9350611725836116c5565b805f5b8381101561175557815161173c88826116e3565b9750611747836116fa565b925050600181019050611728565b5085935050505092915050565b5f60e0820190506117755f83018a6115f6565b8181036020830152611787818961163d565b9050818103604083015261179b818861163d565b90506117aa6060830187611675565b6117b76080830186611684565b6117c460a083018561169c565b81810360c08301526117d68184611706565b905098975050505050505050565b5f6020820190506117f75f830184611684565b92915050565b5f60ff82169050919050565b611812816117fd565b811461181c575f80fd5b50565b5f8135905061182d81611809565b92915050565b5f80fd5b7f4e487b71000000000000000000000000000000000000000000000000000000005f52604160045260245ffd5b61186d8261162d565b810181811067ffffffffffffffff8211171561188c5761188b611837565b5b80604052505050565b5f61189e6111cf565b90506118aa8282611864565b919050565b5f67ffffffffffffffff8211156118c9576118c8611837565b5b6118d28261162d565b9050602081019050919050565b828183375f83830152505050565b5f6118ff6118fa846118af565b611895565b90508281526020810184848401111561191b5761191a611833565b5b6119268482856118df565b509392505050565b5f82601f830112611942576119416112bb565b5b81356119528482602086016118ed565b91505092915050565b5f805f8060808587031215611973576119726111d8565b5b5f611980878288016114ae565b94505060206119918782880161181f565b93505060406119a287828801611508565b925050606085013567ffffffffffffffff8111156119c3576119c26111dc565b5b6119cf8782880161192e565b91505092959194509250565b5f6020820190506119ee5f83018461169c565b92915050565b5f602082019050611a075f830184611675565b92915050565b7f4e487b71000000000000000000000000000000000000000000000000000000005f52603260045260245ffd5b611a4381611260565b8114611a4d575f80fd5b50565b5f81359050611a5e81611a3a565b92915050565b5f60208284031215611a7957611a786111d8565b5b5f611a8684828501611a50565b91505092915050565b5f67ffffffffffffffff821115611aa957611aa8611837565b5b602082029050602081019050919050565b5f611acc611ac784611a8f565b611895565b90508083825260208201905060208402830185811115611aef57611aee6112c3565b5b835b81811015611b185780611b048882611508565b845260208401935050602081019050611af1565b5050509392505050565b5f82601f830112611b3657611b356112bb565b5b8135611b46848260208601611aba565b91505092915050565b5f611b59826114c2565b9050919050565b611b6981611b4f565b8114611b73575f80fd5b50565b5f81359050611b8481611b60565b92915050565b5f8060408385031215611ba057611b9f6111d8565b5b5f83013567ffffffffffffffff811115611bbd57611bbc6111dc565b5b611bc985828601611b22565b9250506020611bda85828601611b76565b9150509250929050565b5f80fd5b5f80fd5b5f60408284031215611c0157611c00611be4565b5b611c0b6040611895565b90505f82013567ffffffffffffffff811115611c2a57611c29611be8565b5b611c368482850161192e565b5f83015250602082013567ffffffffffffffff811115611c5957611c58611be8565b5b611c658482850161192e565b60208301525092915050565b5f60208284031215611c8657611c856111d8565b5b5f82013567ffffffffffffffff811115611ca357611ca26111dc565b5b611caf84828501611bec565b91505092915050565b5f81519050611cc6816114f2565b92915050565b5f611cde611cd9846118af565b611895565b905082815260208101848484011115611cfa57611cf9611833565b5b611d0584828561161f565b509392505050565b5f82601f830112611d2157611d206112bb565b5b8151611d31848260208601611ccc565b91505092915050565b5f81519050611d4881611809565b92915050565b5f60608284031215611d6357611d62611be4565b5b611d6d6060611895565b90505f611d7c84828501611cb8565b5f83015250602082015167ffffffffffffffff811115611d9f57611d9e611be8565b5b611dab84828501611d0d565b6020830152506040611dbf84828501611d3a565b60408301525092915050565b5f60208284031215611de057611ddf6111d8565b5b5f82015167ffffffffffffffff811115611dfd57611dfc6111dc565b5b611e0984828501611d4e565b91505092915050565b611e1b816117fd565b82525050565b5f604082019050611e345f830185611e12565b611e416020830184611675565b9392505050565b5f60a082019050611e5b5f83018861169c565b611e686020830187611675565b611e756040830186611e12565b611e826060830185611684565b611e8f608083018461169c565b969550505050505056fea264697066735822122075d57995749ea22f49395716e1f527a6d931d396973e02e34e34dc9fa85d31c164736f6c634300081a0033", t = class t extends v {
7
8
  constructor() {
8
9
  super(...arguments), this.abi = r;
9
10
  }
@@ -13,8 +14,8 @@ const C = "0x610120604052348015610010575f80fd5b503073fffffffffffffffffffffffffff
13
14
  * @public
14
15
  * @async
15
16
  * @param {Address} address
16
- * @param {?ReadParams<typeof signerValidatorAbi, 'signers'>} [params]
17
- * @returns {unknown}
17
+ * @param {?ReadParams} [params]
18
+ * @returns {Promise<boolean>}
18
19
  */
19
20
  async signers(f, b) {
20
21
  return await u(this._config, {
@@ -30,8 +31,8 @@ const C = "0x610120604052348015610010575f80fd5b503073fffffffffffffffffffffffffff
30
31
  * @public
31
32
  * @async
32
33
  * @param {SignerValidatorSignaturePayload} payload
33
- * @param {?ReadParams<typeof signerValidatorAbi, 'hashSignerData'>} [params]
34
- * @returns {unknown}
34
+ * @param {?ReadParams} [params]
35
+ * @returns {Promise<Hex>}
35
36
  */
36
37
  async hashSignerData(f, b) {
37
38
  return await h(this._config, {
@@ -52,7 +53,7 @@ const C = "0x610120604052348015610010575f80fd5b503073fffffffffffffffffffffffffff
52
53
  * @public
53
54
  * @async
54
55
  * @param {SignerValidatorValidatePayload} payload
55
- * @param {?WriteParams<typeof signerValidatorAbi, 'validate'>} [params]
56
+ * @param {?WriteParams} [params]
56
57
  * @returns {Promise<boolean>} - True if the action has been validated based on the data payload
57
58
  */
58
59
  async validate(f, b) {
@@ -64,7 +65,7 @@ const C = "0x610120604052348015610010575f80fd5b503073fffffffffffffffffffffffffff
64
65
  * @public
65
66
  * @async
66
67
  * @param {SignerValidatorValidatePayload} payload
67
- * @param {?WriteParams<typeof signerValidatorAbi, 'validate'>} [params]
68
+ * @param {?WriteParams} [params]
68
69
  * @returns {Promise<boolean>} - True if the action has been validated based on the data payload
69
70
  */
70
71
  async validateRaw(f, b) {
@@ -92,8 +93,8 @@ const C = "0x610120604052348015610010575f80fd5b503073fffffffffffffffffffffffffff
92
93
  * @async
93
94
  * @param {Address[]} addresses - The list of signers to update
94
95
  * @param {boolean[]} allowed - The authorized status of each signer
95
- * @param {?WriteParams<typeof signerValidatorAbi, 'setAuthorized'>} [params]
96
- * @returns {unknown}
96
+ * @param {?WriteParams} [params]
97
+ * @returns {Promise<void>}
97
98
  */
98
99
  async setAuthorized(f, b, a) {
99
100
  return await this.awaitResult(
@@ -107,8 +108,8 @@ const C = "0x610120604052348015610010575f80fd5b503073fffffffffffffffffffffffffff
107
108
  * @async
108
109
  * @param {Address[]} addresses - The list of signers to update
109
110
  * @param {boolean[]} allowed - The authorized status of each signer
110
- * @param {?WriteParams<typeof signerValidatorAbi, 'setAuthorized'>} [params]
111
- * @returns {unknown}
111
+ * @param {?WriteParams} [params]
112
+ * @returns {Promise<{ hash: `0x${string}`; result: void; }>}
112
113
  */
113
114
  async setAuthorizedRaw(f, b, a) {
114
115
  const { request: e, result: d } = await p(
@@ -129,8 +130,8 @@ const C = "0x610120604052348015610010575f80fd5b503073fffffffffffffffffffffffffff
129
130
  * @public
130
131
  * @async
131
132
  * @param {Address} address
132
- * @param {?WriteParams<typeof signerValidatorAbi, 'setValidatorCaller'>} [params]
133
- * @returns {unknown}
133
+ * @param {?WriteParams} [params]
134
+ * @returns {Promise<{ hash: `0x${string}`; result: void; }>}
134
135
  */
135
136
  async setValidatorCallerRaw(f, b) {
136
137
  const { request: a, result: e } = await w(
@@ -154,8 +155,8 @@ const C = "0x610120604052348015610010575f80fd5b503073fffffffffffffffffffffffffff
154
155
  * @public
155
156
  * @async
156
157
  * @param {Address} address
157
- * @param {?WriteParams<typeof signerValidatorAbi, 'setValidatorCaller'>} [params]
158
- * @returns {unknown}
158
+ * @param {?WriteParams} [params]
159
+ * @returns {Promise<void>}
159
160
  */
160
161
  async setValidatorCaller(f, b) {
161
162
  return await this.awaitResult(this.setValidatorCallerRaw(f, b));
@@ -169,7 +170,7 @@ const C = "0x610120604052348015610010575f80fd5b503073fffffffffffffffffffffffffff
169
170
  * @returns {Promise<Hex>}
170
171
  */
171
172
  async encodeClaimData(f) {
172
- return await R({
173
+ return await P({
173
174
  ...f,
174
175
  validator: this.assertValidAddress()
175
176
  });
@@ -190,14 +191,16 @@ const C = "0x610120604052348015610010575f80fd5b503073fffffffffffffffffffffffffff
190
191
  return {
191
192
  abi: r,
192
193
  bytecode: C,
193
- args: [P(a)],
194
+ args: [I(a)],
194
195
  ...this.optionallyAttachAccount(e.account)
195
196
  };
196
197
  }
197
198
  };
198
- t.base = "0x9d08826e771BD939088d5eAc28E0c8864dcb98cf", t.registryType = V.VALIDATOR;
199
+ t.bases = {
200
+ ...V
201
+ }, t.registryType = R.VALIDATOR;
199
202
  let n = t;
200
- async function R({
203
+ async function P({
201
204
  signer: c,
202
205
  incentiveData: f,
203
206
  chainId: b,
@@ -231,7 +234,7 @@ async function R({
231
234
  }
232
235
  },
233
236
  privateKey: c.key
234
- }), l = N({
237
+ }), l = S({
235
238
  signer: c.account,
236
239
  signature: o,
237
240
  incentiveQuantity: e
@@ -251,7 +254,7 @@ async function R({
251
254
  [{ validatorData: l, incentiveData: f }]
252
255
  );
253
256
  }
254
- function N({
257
+ function S({
255
258
  signer: c,
256
259
  signature: f,
257
260
  incentiveQuantity: b
@@ -271,7 +274,7 @@ function N({
271
274
  [{ signer: c, signature: f, incentiveQuantity: b }]
272
275
  );
273
276
  }
274
- function P({
277
+ function I({
275
278
  signers: c,
276
279
  validatorCaller: f
277
280
  }) {
@@ -285,9 +288,9 @@ function P({
285
288
  }
286
289
  export {
287
290
  n as SignerValidator,
288
- R as prepareSignerValidatorClaimDataPayload,
289
- N as prepareSignerValidatorInputParams,
290
- P as prepareSignerValidatorPayload,
291
+ P as prepareSignerValidatorClaimDataPayload,
292
+ S as prepareSignerValidatorInputParams,
293
+ I as prepareSignerValidatorPayload,
291
294
  r as signerValidatorAbi
292
295
  };
293
296
  //# sourceMappingURL=SignerValidator.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"SignerValidator.js","sources":["../../src/Validators/SignerValidator.ts"],"sourcesContent":["import {\n readSignerValidatorHashSignerData,\n readSignerValidatorSigners,\n signerValidatorAbi,\n simulateSignerValidatorSetAuthorized,\n simulateSignerValidatorSetValidatorCaller,\n simulateSignerValidatorValidate,\n writeSignerValidatorSetAuthorized,\n writeSignerValidatorSetValidatorCaller,\n writeSignerValidatorValidate,\n} from '@boostxyz/evm';\nimport { bytecode } from '@boostxyz/evm/artifacts/contracts/validators/SignerValidator.sol/SignerValidator.json';\nimport {\n type Address,\n type ContractEventName,\n type Hex,\n type PrivateKeyAccount,\n encodeAbiParameters,\n} from 'viem';\nimport { signTypedData } from 'viem/accounts';\nimport type {\n DeployableOptions,\n GenericDeployableParams,\n} from '../Deployable/Deployable';\nimport { DeployableTarget } from '../Deployable/DeployableTarget';\nimport {\n type GenericLog,\n type ReadParams,\n RegistryType,\n type WriteParams,\n} from '../utils';\n\nexport { signerValidatorAbi };\n\n/**\n * Object reprentation of a {@link SignerValidator} initialization payload\n *\n * @export\n * @interface SignerValidatorPayload\n * @typedef {SignerValidatorPayload}\n */\nexport interface SignerValidatorPayload {\n /**\n * The list of authorized signers. The first address in the list will be the initial owner of the contract.\n *\n * @type {Address[]}\n */\n signers: Address[];\n /**\n * The authorized caller of the {@link prepareSignerValidator} function\n * @type {Address}\n */\n validatorCaller: Address;\n}\n\n/**\n * Description placeholder\n *\n * @export\n * @interface SignerValidatorValidatePayload\n * @typedef {SignerValidatorValidatePayload}\n */\nexport interface SignerValidatorValidatePayload {\n /**\n * The ID of the boost.\n *\n * @type {bigint}\n */\n boostId: bigint;\n /**\n * The ID of the incentive.\n *\n * @type {bigint}\n */\n incentiveId: bigint;\n /**\n * The address of the claimant.\n *\n * @type {Address}\n */\n claimant: Address;\n /**\n * The claim data.\n *\n * @type {Hex}\n */\n claimData: Hex;\n}\n\n/**\n * Object reprentation of a {@link SignerValidator} initialization payload\n *\n * @export\n * @interface SignerValidatorPayload\n * @typedef {SignerValidatorPayload}\n */\nexport interface SignerValidatorPayload {\n /**\n * The list of authorized signers. The first address in the list will be the initial owner of the contract.\n *\n * @type {Address[]}\n */\n signers: Address[];\n /**\n * The authorized caller of the {@link prepareSignerValidator} function\n * @type {Address}\n */\n validatorCaller: Address;\n}\n\n/**\n * Description placeholder\n *\n * @export\n * @interface SignerValidatorValidatePayload\n * @typedef {SignerValidatorValidatePayload}\n */\nexport interface SignerValidatorValidatePayload {\n /**\n * The ID of the boost.\n *\n * @type {bigint}\n */\n boostId: bigint;\n /**\n * The ID of the incentive.\n *\n * @type {bigint}\n */\n incentiveId: bigint;\n /**\n * The address of the claimant.\n *\n * @type {Address}\n */\n claimant: Address;\n /**\n * The claim data.\n *\n * @type {Hex}\n */\n claimData: Hex;\n}\n\n/**\n * Signer Validator Claim Data Payload\n *\n * @export\n * @interface SignerValidatorClaimDataParams\n * @typedef {SignerValidatorClaimDataParams}\n */\nexport interface SignerValidatorClaimDataParams {\n /**\n * The signer with which to sign the input\n *\n * @type {{\n * account: Address;\n * key: Hex;\n * privateKey: PrivateKeyAccount;\n * }}\n */\n signer: {\n account: Address;\n key: Hex;\n privateKey: PrivateKeyAccount;\n };\n /**\n * The encoded data to provide the underlying incentive. You can use {@link prepareAllowListIncentivePayload}, {@link prepareCGDAIncentivePayload}, {@link prepareERC20IncentivePayload}, {@link prepareERC1155IncentivePayload}, or {@link preparePointsIncentivePayload}\n *\n * @type {Hex}\n */\n incentiveData: Hex;\n /**\n * The chain id to target\n *\n * @type {number}\n */\n chainId: number;\n /**\n * The address of the validator\n *\n * @type {Address}\n */\n validator: Address;\n /**\n * The incentive quantity.\n *\n * @type {number}\n */\n incentiveQuantity: number;\n /**\n * The address of the claimant\n *\n * @type {Address}\n */\n claimant: Address;\n /**\n * The ID of the boost\n *\n * @type {bigint}\n */\n boostId: bigint;\n}\n\n/**\n * Object representation of a {@link SignerValidatorInputParams} initialization payload\n *\n * @export\n * @interface SignerValidatorInputParams\n * @typedef {SignerValidatorInputParams}\n */\nexport interface SignerValidatorInputParams {\n /**\n * The signer address.\n *\n * @type {Address}\n */\n signer: Address;\n\n /**\n * The signature data.\n *\n * @type {string}\n */\n signature: Hex;\n\n /**\n * The incentive quantity.\n *\n * @type {number}\n */\n incentiveQuantity: number;\n}\n\n/**\n * Object representing the payload for signing before validaton.\n *\n * @export\n * @interface SignerValidatorSignaturePayload\n * @typedef {SignerValidatorSignaturePayload}\n */\nexport interface SignerValidatorSignaturePayload {\n /**\n * The ID of the boost.\n *\n * @type {bigint}\n */\n boostId: bigint;\n /**\n * The ID of the incentive.\n *\n * @type {number}\n */\n incentiveQuantity: number;\n /**\n * The address of the claimant.\n *\n * @type {Address}\n */\n claimant: Address;\n /**\n * The claim data.\n *\n * @type {Hex}\n */\n incentiveData: Hex;\n}\n\n/**\n * A generic `viem.Log` event with support for `BoostCore` event types.\n *\n * @export\n * @typedef {SignerValidatorLog}\n * @template {ContractEventName<\n * typeof signerValidatorAbi\n * >} [event=ContractEventName<typeof signerValidatorAbi>]\n */\nexport type SignerValidatorLog<\n event extends ContractEventName<\n typeof signerValidatorAbi\n > = ContractEventName<typeof signerValidatorAbi>,\n> = GenericLog<typeof signerValidatorAbi, event>;\n\n/**\n * A simple implementation of a Validator that verifies a given signature and checks the recovered address against a set of authorized signers\n *\n * @export\n * @class SignerValidator\n * @typedef {SignerValidator}\n * @extends {DeployableTarget<SignerValidatorPayload>}\n */\nexport class SignerValidator extends DeployableTarget<\n SignerValidatorPayload,\n typeof signerValidatorAbi\n> {\n /**\n * @inheritdoc\n *\n * @public\n * @readonly\n * @type {*}\n */\n public override readonly abi = signerValidatorAbi;\n /**\n * @inheritdoc\n *\n * @public\n * @static\n * @type {Address}\n */\n public static override base: Address = import.meta.env\n .VITE_SIGNER_VALIDATOR_BASE;\n /**\n * @inheritdoc\n *\n * @public\n * @static\n * @type {RegistryType}\n */\n public static override registryType: RegistryType = RegistryType.VALIDATOR;\n\n /**\n * The set of authorized signers\n *\n * @public\n * @async\n * @param {Address} address\n * @param {?ReadParams<typeof signerValidatorAbi, 'signers'>} [params]\n * @returns {unknown}\n */\n public async signers(\n address: Address,\n params?: ReadParams<typeof signerValidatorAbi, 'signers'>,\n ) {\n return await readSignerValidatorSigners(this._config, {\n address: this.assertValidAddress(),\n args: [address],\n // biome-ignore lint/suspicious/noExplicitAny: Accept any shape of valid wagmi/viem parameters, wagmi does the same thing internally\n ...(params as any),\n });\n }\n\n /**\n * Retrieve the hash and signer data for a given hash\n *\n * @public\n * @async\n * @param {SignerValidatorSignaturePayload} payload\n * @param {?ReadParams<typeof signerValidatorAbi, 'hashSignerData'>} [params]\n * @returns {unknown}\n */\n public async hashSignerData(\n payload: SignerValidatorSignaturePayload,\n params?: ReadParams<typeof signerValidatorAbi, 'hashSignerData'>,\n ) {\n return await readSignerValidatorHashSignerData(this._config, {\n address: this.assertValidAddress(),\n args: [\n payload.boostId,\n payload.incentiveQuantity,\n payload.claimant,\n payload.incentiveData,\n ],\n // biome-ignore lint/suspicious/noExplicitAny: Accept any shape of valid wagmi/viem parameters, wagmi does the same thing internally\n ...(params as any),\n });\n }\n\n /**\n * Validate that the action has been completed successfully. The data payload is expected to be a tuple of (address signer, bytes32 hash, bytes signature). The signature is expected to be a valid ECDSA or EIP-1271 signature of a unique hash by an authorized signer.\n *\n * @public\n * @async\n * @param {SignerValidatorValidatePayload} payload\n * @param {?WriteParams<typeof signerValidatorAbi, 'validate'>} [params]\n * @returns {Promise<boolean>} - True if the action has been validated based on the data payload\n */\n protected async validate(\n payload: SignerValidatorValidatePayload,\n params?: WriteParams<typeof signerValidatorAbi, 'validate'>,\n ) {\n return await this.awaitResult(this.validateRaw(payload, params));\n }\n\n /**\n * Validate that the action has been completed successfully. The data payload is expected to be a tuple of (address signer, bytes32 hash, bytes signature). The signature is expected to be a valid ECDSA or EIP-1271 signature of a unique hash by an authorized signer.\n *\n * @public\n * @async\n * @param {SignerValidatorValidatePayload} payload\n * @param {?WriteParams<typeof signerValidatorAbi, 'validate'>} [params]\n * @returns {Promise<boolean>} - True if the action has been validated based on the data payload\n */\n protected async validateRaw(\n payload: SignerValidatorValidatePayload,\n params?: ReadParams<typeof signerValidatorAbi, 'validate'>,\n ) {\n const { request, result } = await simulateSignerValidatorValidate(\n this._config,\n {\n address: this.assertValidAddress(),\n args: [\n payload.boostId,\n payload.incentiveId,\n payload.claimant,\n payload.claimData,\n ],\n ...this.optionallyAttachAccount(),\n // biome-ignore lint/suspicious/noExplicitAny: Accept any shape of valid wagmi/viem parameters, wagmi does the same thing internally\n ...(params as any),\n },\n );\n const hash = await writeSignerValidatorValidate(this._config, request);\n return { hash, result };\n }\n\n /**\n * Set the authorized status of a signer\n *\n * @public\n * @async\n * @param {Address[]} addresses - The list of signers to update\n * @param {boolean[]} allowed - The authorized status of each signer\n * @param {?WriteParams<typeof signerValidatorAbi, 'setAuthorized'>} [params]\n * @returns {unknown}\n */\n public async setAuthorized(\n addresses: Address[],\n allowed: boolean[],\n params?: WriteParams<typeof signerValidatorAbi, 'setAuthorized'>,\n ) {\n return await this.awaitResult(\n this.setAuthorizedRaw(addresses, allowed, params),\n );\n }\n\n /**\n * Set the authorized status of a signer\n *\n * @public\n * @async\n * @param {Address[]} addresses - The list of signers to update\n * @param {boolean[]} allowed - The authorized status of each signer\n * @param {?WriteParams<typeof signerValidatorAbi, 'setAuthorized'>} [params]\n * @returns {unknown}\n */\n public async setAuthorizedRaw(\n addresses: Address[],\n allowed: boolean[],\n params?: WriteParams<typeof signerValidatorAbi, 'setAuthorized'>,\n ) {\n const { request, result } = await simulateSignerValidatorSetAuthorized(\n this._config,\n {\n address: this.assertValidAddress(),\n args: [addresses, allowed],\n ...this.optionallyAttachAccount(),\n // biome-ignore lint/suspicious/noExplicitAny: Accept any shape of valid wagmi/viem parameters, wagmi does the same thing internally\n ...(params as any),\n },\n );\n const hash = await writeSignerValidatorSetAuthorized(this._config, request);\n return { hash, result };\n }\n\n /**\n * Update the authorized caller of the validator function\n *\n * @public\n * @async\n * @param {Address} address\n * @param {?WriteParams<typeof signerValidatorAbi, 'setValidatorCaller'>} [params]\n * @returns {unknown}\n */\n public async setValidatorCallerRaw(\n address: Address,\n params?: WriteParams<typeof signerValidatorAbi, 'setValidatorCaller'>,\n ) {\n const { request, result } = await simulateSignerValidatorSetValidatorCaller(\n this._config,\n {\n address: this.assertValidAddress(),\n args: [address],\n ...this.optionallyAttachAccount(),\n // biome-ignore lint/suspicious/noExplicitAny: Accept any shape of valid wagmi/viem parameters, wagmi does the same thing internally\n ...(params as any),\n },\n );\n const hash = await writeSignerValidatorSetValidatorCaller(\n this._config,\n request,\n );\n return { hash, result };\n }\n\n /**\n * Update the authorized caller of the validator function\n *\n * @public\n * @async\n * @param {Address} address\n * @param {?WriteParams<typeof signerValidatorAbi, 'setValidatorCaller'>} [params]\n * @returns {unknown}\n */\n public async setValidatorCaller(\n address: Address,\n params?: WriteParams<typeof signerValidatorAbi, 'setValidatorCaller'>,\n ) {\n return await this.awaitResult(this.setValidatorCallerRaw(address, params));\n }\n\n /**\n * Properly encodes the data needed to claim\n *\n * @public\n * @async\n * @param {SignerValidatorClaimDataParams} params\n * @returns {Promise<Hex>}\n */\n public async encodeClaimData(\n params: Omit<SignerValidatorClaimDataParams, 'validator'>,\n ): Promise<Hex> {\n return await prepareSignerValidatorClaimDataPayload({\n ...params,\n validator: this.assertValidAddress(),\n });\n }\n\n /**\n * @inheritdoc\n *\n * @public\n * @param {?SignerValidatorPayload} [_payload]\n * @param {?DeployableOptions} [_options]\n * @returns {GenericDeployableParams}\n */\n public override buildParameters(\n _payload?: SignerValidatorPayload,\n _options?: DeployableOptions,\n ): GenericDeployableParams {\n const [payload, options] = this.validateDeploymentConfig(\n _payload,\n _options,\n );\n return {\n abi: signerValidatorAbi,\n bytecode: bytecode as Hex,\n args: [prepareSignerValidatorPayload(payload)],\n ...this.optionallyAttachAccount(options.account),\n };\n }\n}\n\n/**\n * Signer Validator Claim Data Payload Preparation\n *\n * @export\n * @async\n * @param {SignerValidatorClaimDataParams} param0\n * @param {{ account: Address; key: Hex; privateKey: PrivateKeyAccount; }} param0.signer\n * @param {Hex} param0.incentiveData\n * @param {number} param0.chainId\n * @param {Address} param0.validator\n * @param {number} param0.incentiveQuantity\n * @param {Address} param0.claimant\n * @param {bigint} param0.boostId\n * @returns {Promise<Hex>}\n */\nexport async function prepareSignerValidatorClaimDataPayload({\n signer,\n incentiveData,\n chainId,\n validator,\n incentiveQuantity,\n claimant,\n boostId,\n}: SignerValidatorClaimDataParams): Promise<Hex> {\n const domain = {\n name: 'SignerValidator',\n version: '1',\n chainId: chainId,\n verifyingContract: validator,\n };\n const typedData = {\n domain,\n types: {\n SignerValidatorData: [\n { name: 'boostId', type: 'uint256' },\n { name: 'incentiveQuantity', type: 'uint8' },\n { name: 'claimant', type: 'address' },\n { name: 'incentiveData', type: 'bytes' },\n ],\n },\n primaryType: 'SignerValidatorData' as const,\n message: {\n boostId,\n incentiveQuantity,\n claimant,\n incentiveData: incentiveData,\n },\n };\n\n const trustedSignature = await signTypedData({\n ...typedData,\n privateKey: signer.key,\n });\n\n // Prepare the claim data payload using the new helper\n const validatorData = prepareSignerValidatorInputParams({\n signer: signer.account,\n signature: trustedSignature,\n incentiveQuantity, // Adjust incentive quantity as necessary\n });\n\n const boostClaimDataPayload = encodeAbiParameters(\n [\n {\n type: 'tuple',\n name: 'BoostClaimData',\n components: [\n { type: 'bytes', name: 'validatorData' },\n { type: 'bytes', name: 'incentiveData' },\n ],\n },\n ],\n [{ validatorData, incentiveData }],\n );\n\n return boostClaimDataPayload;\n}\n\n/**\n * Given a {@link SignerValidatorInputParams}, properly encode the initialization payload.\n *\n * @param {SignerValidatorInputParams} param0\n * @param {Address} param0.signer\n * @param {Hex} param0.signature\n * @param {number} param0.incentiveQuantity\n * @returns {Hex}\n */\nexport function prepareSignerValidatorInputParams({\n signer,\n signature,\n incentiveQuantity,\n}: SignerValidatorInputParams) {\n return encodeAbiParameters(\n [\n {\n type: 'tuple',\n name: 'SignerValidatorInputParams',\n components: [\n { type: 'address', name: 'signer' },\n { type: 'bytes', name: 'signature' },\n { type: 'uint8', name: 'incentiveQuantity' },\n ],\n },\n ],\n [{ signer, signature, incentiveQuantity }],\n );\n}\n\n/**\n * Given a {@link SignerValidatorPayload}, properly encode the initialization payload.\n *\n * @param {SignerValidatorPayload} param0\n * @param {Address[]} param0.signers\n * @param {Address} param0.validatorCaller\n * @returns {Hex}\n */\nexport function prepareSignerValidatorPayload({\n signers,\n validatorCaller,\n}: SignerValidatorPayload) {\n return encodeAbiParameters(\n [\n { type: 'address[]', name: 'signers' },\n { type: 'address', name: 'validatorCaller' },\n ],\n [signers, validatorCaller],\n );\n}\n"],"names":["_SignerValidator","DeployableTarget","signerValidatorAbi","address","params","readSignerValidatorSigners","payload","readSignerValidatorHashSignerData","request","result","simulateSignerValidatorValidate","writeSignerValidatorValidate","addresses","allowed","simulateSignerValidatorSetAuthorized","writeSignerValidatorSetAuthorized","simulateSignerValidatorSetValidatorCaller","writeSignerValidatorSetValidatorCaller","prepareSignerValidatorClaimDataPayload","_payload","_options","options","bytecode","prepareSignerValidatorPayload","RegistryType","SignerValidator","signer","incentiveData","chainId","validator","incentiveQuantity","claimant","boostId","trustedSignature","signTypedData","validatorData","prepareSignerValidatorInputParams","encodeAbiParameters","signature","signers","validatorCaller"],"mappings":"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"}
1
+ {"version":3,"file":"SignerValidator.js","sources":["../../src/Validators/SignerValidator.ts"],"sourcesContent":["import {\n readSignerValidatorHashSignerData,\n readSignerValidatorSigners,\n signerValidatorAbi,\n simulateSignerValidatorSetAuthorized,\n simulateSignerValidatorSetValidatorCaller,\n simulateSignerValidatorValidate,\n writeSignerValidatorSetAuthorized,\n writeSignerValidatorSetValidatorCaller,\n writeSignerValidatorValidate,\n} from '@boostxyz/evm';\nimport { bytecode } from '@boostxyz/evm/artifacts/contracts/validators/SignerValidator.sol/SignerValidator.json';\nimport {\n type Address,\n type ContractEventName,\n type Hex,\n type PrivateKeyAccount,\n encodeAbiParameters,\n} from 'viem';\nimport { signTypedData } from 'viem/accounts';\nimport { SignerValidator as SignerValidatorBases } from '../../dist/deployments.json';\nimport type {\n DeployableOptions,\n GenericDeployableParams,\n} from '../Deployable/Deployable';\nimport { DeployableTarget } from '../Deployable/DeployableTarget';\nimport {\n type GenericLog,\n type ReadParams,\n RegistryType,\n type WriteParams,\n} from '../utils';\n\nexport { signerValidatorAbi };\n\n/**\n * Object reprentation of a {@link SignerValidator} initialization payload\n *\n * @export\n * @interface SignerValidatorPayload\n * @typedef {SignerValidatorPayload}\n */\nexport interface SignerValidatorPayload {\n /**\n * The list of authorized signers. The first address in the list will be the initial owner of the contract.\n *\n * @type {Address[]}\n */\n signers: Address[];\n /**\n * The authorized caller of the {@link prepareSignerValidator} function\n * @type {Address}\n */\n validatorCaller: Address;\n}\n\n/**\n * Description placeholder\n *\n * @export\n * @interface SignerValidatorValidatePayload\n * @typedef {SignerValidatorValidatePayload}\n */\nexport interface SignerValidatorValidatePayload {\n /**\n * The ID of the boost.\n *\n * @type {bigint}\n */\n boostId: bigint;\n /**\n * The ID of the incentive.\n *\n * @type {bigint}\n */\n incentiveId: bigint;\n /**\n * The address of the claimant.\n *\n * @type {Address}\n */\n claimant: Address;\n /**\n * The claim data.\n *\n * @type {Hex}\n */\n claimData: Hex;\n}\n\n/**\n * Object reprentation of a {@link SignerValidator} initialization payload\n *\n * @export\n * @interface SignerValidatorPayload\n * @typedef {SignerValidatorPayload}\n */\nexport interface SignerValidatorPayload {\n /**\n * The list of authorized signers. The first address in the list will be the initial owner of the contract.\n *\n * @type {Address[]}\n */\n signers: Address[];\n /**\n * The authorized caller of the {@link prepareSignerValidator} function\n * @type {Address}\n */\n validatorCaller: Address;\n}\n\n/**\n * Description placeholder\n *\n * @export\n * @interface SignerValidatorValidatePayload\n * @typedef {SignerValidatorValidatePayload}\n */\nexport interface SignerValidatorValidatePayload {\n /**\n * The ID of the boost.\n *\n * @type {bigint}\n */\n boostId: bigint;\n /**\n * The ID of the incentive.\n *\n * @type {bigint}\n */\n incentiveId: bigint;\n /**\n * The address of the claimant.\n *\n * @type {Address}\n */\n claimant: Address;\n /**\n * The claim data.\n *\n * @type {Hex}\n */\n claimData: Hex;\n}\n\n/**\n * Signer Validator Claim Data Payload\n *\n * @export\n * @interface SignerValidatorClaimDataParams\n * @typedef {SignerValidatorClaimDataParams}\n */\nexport interface SignerValidatorClaimDataParams {\n /**\n * The signer with which to sign the input\n *\n * @type {{\n * account: Address;\n * key: Hex;\n * privateKey: PrivateKeyAccount;\n * }}\n */\n signer: {\n account: Address;\n key: Hex;\n privateKey: PrivateKeyAccount;\n };\n /**\n * The encoded data to provide the underlying incentive. You can use {@link prepareAllowListIncentivePayload}, {@link prepareCGDAIncentivePayload}, {@link prepareERC20IncentivePayload}, {@link prepareERC1155IncentivePayload}, or {@link preparePointsIncentivePayload}\n *\n * @type {Hex}\n */\n incentiveData: Hex;\n /**\n * The chain id to target\n *\n * @type {number}\n */\n chainId: number;\n /**\n * The address of the validator\n *\n * @type {Address}\n */\n validator: Address;\n /**\n * The incentive quantity.\n *\n * @type {number}\n */\n incentiveQuantity: number;\n /**\n * The address of the claimant\n *\n * @type {Address}\n */\n claimant: Address;\n /**\n * The ID of the boost\n *\n * @type {bigint}\n */\n boostId: bigint;\n}\n\n/**\n * Object representation of a {@link SignerValidatorInputParams} initialization payload\n *\n * @export\n * @interface SignerValidatorInputParams\n * @typedef {SignerValidatorInputParams}\n */\nexport interface SignerValidatorInputParams {\n /**\n * The signer address.\n *\n * @type {Address}\n */\n signer: Address;\n\n /**\n * The signature data.\n *\n * @type {string}\n */\n signature: Hex;\n\n /**\n * The incentive quantity.\n *\n * @type {number}\n */\n incentiveQuantity: number;\n}\n\n/**\n * Object representing the payload for signing before validaton.\n *\n * @export\n * @interface SignerValidatorSignaturePayload\n * @typedef {SignerValidatorSignaturePayload}\n */\nexport interface SignerValidatorSignaturePayload {\n /**\n * The ID of the boost.\n *\n * @type {bigint}\n */\n boostId: bigint;\n /**\n * The ID of the incentive.\n *\n * @type {number}\n */\n incentiveQuantity: number;\n /**\n * The address of the claimant.\n *\n * @type {Address}\n */\n claimant: Address;\n /**\n * The claim data.\n *\n * @type {Hex}\n */\n incentiveData: Hex;\n}\n\n/**\n * A generic `viem.Log` event with support for `BoostCore` event types.\n *\n * @export\n * @typedef {SignerValidatorLog}\n * @template {ContractEventName<\n * typeof signerValidatorAbi\n * >} [event=ContractEventName<typeof signerValidatorAbi>]\n */\nexport type SignerValidatorLog<\n event extends ContractEventName<\n typeof signerValidatorAbi\n > = ContractEventName<typeof signerValidatorAbi>,\n> = GenericLog<typeof signerValidatorAbi, event>;\n\n/**\n * A simple implementation of a Validator that verifies a given signature and checks the recovered address against a set of authorized signers\n *\n * @export\n * @class SignerValidator\n * @typedef {SignerValidator}\n * @extends {DeployableTarget<SignerValidatorPayload>}\n */\nexport class SignerValidator extends DeployableTarget<\n SignerValidatorPayload,\n typeof signerValidatorAbi\n> {\n /**\n * @inheritdoc\n *\n * @public\n * @readonly\n * @type {*}\n */\n public override readonly abi = signerValidatorAbi;\n /**\n * @inheritdoc\n *\n * @public\n * @static\n * @type {Record<number, Address>}\n */\n public static override bases: Record<number, Address> = {\n ...(SignerValidatorBases as Record<number, Address>),\n };\n /**\n * @inheritdoc\n *\n * @public\n * @static\n * @type {RegistryType}\n */\n public static override registryType: RegistryType = RegistryType.VALIDATOR;\n\n /**\n * The set of authorized signers\n *\n * @public\n * @async\n * @param {Address} address\n * @param {?ReadParams} [params]\n * @returns {Promise<boolean>}\n */\n public async signers(\n address: Address,\n params?: ReadParams<typeof signerValidatorAbi, 'signers'>,\n ) {\n return await readSignerValidatorSigners(this._config, {\n address: this.assertValidAddress(),\n args: [address],\n // biome-ignore lint/suspicious/noExplicitAny: Accept any shape of valid wagmi/viem parameters, wagmi does the same thing internally\n ...(params as any),\n });\n }\n\n /**\n * Retrieve the hash and signer data for a given hash\n *\n * @public\n * @async\n * @param {SignerValidatorSignaturePayload} payload\n * @param {?ReadParams} [params]\n * @returns {Promise<Hex>}\n */\n public async hashSignerData(\n payload: SignerValidatorSignaturePayload,\n params?: ReadParams<typeof signerValidatorAbi, 'hashSignerData'>,\n ) {\n return await readSignerValidatorHashSignerData(this._config, {\n address: this.assertValidAddress(),\n args: [\n payload.boostId,\n payload.incentiveQuantity,\n payload.claimant,\n payload.incentiveData,\n ],\n // biome-ignore lint/suspicious/noExplicitAny: Accept any shape of valid wagmi/viem parameters, wagmi does the same thing internally\n ...(params as any),\n });\n }\n\n /**\n * Validate that the action has been completed successfully. The data payload is expected to be a tuple of (address signer, bytes32 hash, bytes signature). The signature is expected to be a valid ECDSA or EIP-1271 signature of a unique hash by an authorized signer.\n *\n * @public\n * @async\n * @param {SignerValidatorValidatePayload} payload\n * @param {?WriteParams} [params]\n * @returns {Promise<boolean>} - True if the action has been validated based on the data payload\n */\n protected async validate(\n payload: SignerValidatorValidatePayload,\n params?: WriteParams<typeof signerValidatorAbi, 'validate'>,\n ) {\n return await this.awaitResult(this.validateRaw(payload, params));\n }\n\n /**\n * Validate that the action has been completed successfully. The data payload is expected to be a tuple of (address signer, bytes32 hash, bytes signature). The signature is expected to be a valid ECDSA or EIP-1271 signature of a unique hash by an authorized signer.\n *\n * @public\n * @async\n * @param {SignerValidatorValidatePayload} payload\n * @param {?WriteParams} [params]\n * @returns {Promise<boolean>} - True if the action has been validated based on the data payload\n */\n protected async validateRaw(\n payload: SignerValidatorValidatePayload,\n params?: ReadParams<typeof signerValidatorAbi, 'validate'>,\n ) {\n const { request, result } = await simulateSignerValidatorValidate(\n this._config,\n {\n address: this.assertValidAddress(),\n args: [\n payload.boostId,\n payload.incentiveId,\n payload.claimant,\n payload.claimData,\n ],\n ...this.optionallyAttachAccount(),\n // biome-ignore lint/suspicious/noExplicitAny: Accept any shape of valid wagmi/viem parameters, wagmi does the same thing internally\n ...(params as any),\n },\n );\n const hash = await writeSignerValidatorValidate(this._config, request);\n return { hash, result };\n }\n\n /**\n * Set the authorized status of a signer\n *\n * @public\n * @async\n * @param {Address[]} addresses - The list of signers to update\n * @param {boolean[]} allowed - The authorized status of each signer\n * @param {?WriteParams} [params]\n * @returns {Promise<void>}\n */\n public async setAuthorized(\n addresses: Address[],\n allowed: boolean[],\n params?: WriteParams<typeof signerValidatorAbi, 'setAuthorized'>,\n ) {\n return await this.awaitResult(\n this.setAuthorizedRaw(addresses, allowed, params),\n );\n }\n\n /**\n * Set the authorized status of a signer\n *\n * @public\n * @async\n * @param {Address[]} addresses - The list of signers to update\n * @param {boolean[]} allowed - The authorized status of each signer\n * @param {?WriteParams} [params]\n * @returns {Promise<{ hash: `0x${string}`; result: void; }>}\n */\n public async setAuthorizedRaw(\n addresses: Address[],\n allowed: boolean[],\n params?: WriteParams<typeof signerValidatorAbi, 'setAuthorized'>,\n ) {\n const { request, result } = await simulateSignerValidatorSetAuthorized(\n this._config,\n {\n address: this.assertValidAddress(),\n args: [addresses, allowed],\n ...this.optionallyAttachAccount(),\n // biome-ignore lint/suspicious/noExplicitAny: Accept any shape of valid wagmi/viem parameters, wagmi does the same thing internally\n ...(params as any),\n },\n );\n const hash = await writeSignerValidatorSetAuthorized(this._config, request);\n return { hash, result };\n }\n\n /**\n * Update the authorized caller of the validator function\n *\n * @public\n * @async\n * @param {Address} address\n * @param {?WriteParams} [params]\n * @returns {Promise<{ hash: `0x${string}`; result: void; }>}\n */\n public async setValidatorCallerRaw(\n address: Address,\n params?: WriteParams<typeof signerValidatorAbi, 'setValidatorCaller'>,\n ) {\n const { request, result } = await simulateSignerValidatorSetValidatorCaller(\n this._config,\n {\n address: this.assertValidAddress(),\n args: [address],\n ...this.optionallyAttachAccount(),\n // biome-ignore lint/suspicious/noExplicitAny: Accept any shape of valid wagmi/viem parameters, wagmi does the same thing internally\n ...(params as any),\n },\n );\n const hash = await writeSignerValidatorSetValidatorCaller(\n this._config,\n request,\n );\n return { hash, result };\n }\n\n /**\n * Update the authorized caller of the validator function\n *\n * @public\n * @async\n * @param {Address} address\n * @param {?WriteParams} [params]\n * @returns {Promise<void>}\n */\n public async setValidatorCaller(\n address: Address,\n params?: WriteParams<typeof signerValidatorAbi, 'setValidatorCaller'>,\n ) {\n return await this.awaitResult(this.setValidatorCallerRaw(address, params));\n }\n\n /**\n * Properly encodes the data needed to claim\n *\n * @public\n * @async\n * @param {SignerValidatorClaimDataParams} params\n * @returns {Promise<Hex>}\n */\n public async encodeClaimData(\n params: Omit<SignerValidatorClaimDataParams, 'validator'>,\n ): Promise<Hex> {\n return await prepareSignerValidatorClaimDataPayload({\n ...params,\n validator: this.assertValidAddress(),\n });\n }\n\n /**\n * @inheritdoc\n *\n * @public\n * @param {?SignerValidatorPayload} [_payload]\n * @param {?DeployableOptions} [_options]\n * @returns {GenericDeployableParams}\n */\n public override buildParameters(\n _payload?: SignerValidatorPayload,\n _options?: DeployableOptions,\n ): GenericDeployableParams {\n const [payload, options] = this.validateDeploymentConfig(\n _payload,\n _options,\n );\n return {\n abi: signerValidatorAbi,\n bytecode: bytecode as Hex,\n args: [prepareSignerValidatorPayload(payload)],\n ...this.optionallyAttachAccount(options.account),\n };\n }\n}\n\n/**\n * Signer Validator Claim Data Payload Preparation\n *\n * @export\n * @async\n * @param {SignerValidatorClaimDataParams} param0\n * @param {{ account: Address; key: Hex; privateKey: PrivateKeyAccount; }} param0.signer\n * @param {Hex} param0.incentiveData\n * @param {number} param0.chainId\n * @param {Address} param0.validator\n * @param {number} param0.incentiveQuantity\n * @param {Address} param0.claimant\n * @param {bigint} param0.boostId\n * @returns {Promise<Hex>}\n */\nexport async function prepareSignerValidatorClaimDataPayload({\n signer,\n incentiveData,\n chainId,\n validator,\n incentiveQuantity,\n claimant,\n boostId,\n}: SignerValidatorClaimDataParams): Promise<Hex> {\n const domain = {\n name: 'SignerValidator',\n version: '1',\n chainId: chainId,\n verifyingContract: validator,\n };\n const typedData = {\n domain,\n types: {\n SignerValidatorData: [\n { name: 'boostId', type: 'uint256' },\n { name: 'incentiveQuantity', type: 'uint8' },\n { name: 'claimant', type: 'address' },\n { name: 'incentiveData', type: 'bytes' },\n ],\n },\n primaryType: 'SignerValidatorData' as const,\n message: {\n boostId,\n incentiveQuantity,\n claimant,\n incentiveData: incentiveData,\n },\n };\n\n const trustedSignature = await signTypedData({\n ...typedData,\n privateKey: signer.key,\n });\n\n // Prepare the claim data payload using the new helper\n const validatorData = prepareSignerValidatorInputParams({\n signer: signer.account,\n signature: trustedSignature,\n incentiveQuantity, // Adjust incentive quantity as necessary\n });\n\n const boostClaimDataPayload = encodeAbiParameters(\n [\n {\n type: 'tuple',\n name: 'BoostClaimData',\n components: [\n { type: 'bytes', name: 'validatorData' },\n { type: 'bytes', name: 'incentiveData' },\n ],\n },\n ],\n [{ validatorData, incentiveData }],\n );\n\n return boostClaimDataPayload;\n}\n\n/**\n * Given a {@link SignerValidatorInputParams}, properly encode the initialization payload.\n *\n * @param {SignerValidatorInputParams} param0\n * @param {Address} param0.signer\n * @param {Hex} param0.signature\n * @param {number} param0.incentiveQuantity\n * @returns {Hex}\n */\nexport function prepareSignerValidatorInputParams({\n signer,\n signature,\n incentiveQuantity,\n}: SignerValidatorInputParams) {\n return encodeAbiParameters(\n [\n {\n type: 'tuple',\n name: 'SignerValidatorInputParams',\n components: [\n { type: 'address', name: 'signer' },\n { type: 'bytes', name: 'signature' },\n { type: 'uint8', name: 'incentiveQuantity' },\n ],\n },\n ],\n [{ signer, signature, incentiveQuantity }],\n );\n}\n\n/**\n * Given a {@link SignerValidatorPayload}, properly encode the initialization payload.\n *\n * @param {SignerValidatorPayload} param0\n * @param {Address[]} param0.signers\n * @param {Address} param0.validatorCaller\n * @returns {Hex}\n */\nexport function prepareSignerValidatorPayload({\n signers,\n validatorCaller,\n}: SignerValidatorPayload) {\n return encodeAbiParameters(\n [\n { type: 'address[]', name: 'signers' },\n { type: 'address', name: 'validatorCaller' },\n ],\n [signers, validatorCaller],\n );\n}\n"],"names":["_SignerValidator","DeployableTarget","signerValidatorAbi","address","params","readSignerValidatorSigners","payload","readSignerValidatorHashSignerData","request","result","simulateSignerValidatorValidate","writeSignerValidatorValidate","addresses","allowed","simulateSignerValidatorSetAuthorized","writeSignerValidatorSetAuthorized","simulateSignerValidatorSetValidatorCaller","writeSignerValidatorSetValidatorCaller","prepareSignerValidatorClaimDataPayload","_payload","_options","options","bytecode","prepareSignerValidatorPayload","SignerValidatorBases","RegistryType","SignerValidator","signer","incentiveData","chainId","validator","incentiveQuantity","claimant","boostId","trustedSignature","signTypedData","validatorData","prepareSignerValidatorInputParams","encodeAbiParameters","signature","signers","validatorCaller"],"mappings":"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"}
@@ -1,2 +1,2 @@
1
- "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const i=require("../generated-wKBNvm48.cjs"),c=require("../componentInterfaces-CKCBwG16.cjs"),d=require("@wagmi/core"),s=require("../errors.cjs"),a=require("./SignerValidator.cjs"),e={[c.ASignerValidator]:a.SignerValidator};async function l(r,t){const n=await d.readContract(r.config,{abi:i.re,functionName:"getComponentInterface",address:t}),o=e[n];if(!o)throw new s.InvalidComponentInterfaceError(Object.keys(e),n);return new o(r,t)}exports.SignerValidator=a.SignerValidator;exports.ValidatorByComponentInterface=e;exports.validatorFromAddress=l;
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const i=require("../generated-CyTNlOwM.cjs"),c=require("../componentInterfaces-DRI_dQ-P.cjs"),d=require("@wagmi/core"),s=require("../errors.cjs"),a=require("./SignerValidator.cjs"),e={[c.ASignerValidator]:a.SignerValidator};async function l(r,t){const n=await d.readContract(r.config,{abi:i.pe,functionName:"getComponentInterface",address:t}),o=e[n];if(!o)throw new s.InvalidComponentInterfaceError(Object.keys(e),n);return new o(r,t)}exports.SignerValidator=a.SignerValidator;exports.ValidatorByComponentInterface=e;exports.validatorFromAddress=l;
2
2
  //# sourceMappingURL=Validator.cjs.map
@@ -1 +1 @@
1
- {"version":3,"file":"Validator.cjs","sources":["../../src/Validators/Validator.ts"],"sourcesContent":["import { aValidatorAbi } from '@boostxyz/evm';\nimport { ASignerValidator } from '@boostxyz/evm/deploys/componentInterfaces.json';\nimport { readContract } from '@wagmi/core';\nimport type { Address, Hex } from 'viem';\nimport type { DeployableOptions } from '../Deployable/Deployable';\nimport { InvalidComponentInterfaceError } from '../errors';\nimport { SignerValidator } from './SignerValidator';\n\nexport { SignerValidator };\n\n/**\n * A union type representing all valid protocol Validator implementations\n *\n * @export\n * @typedef {Validator}\n */\nexport type Validator = SignerValidator;\n\n/**\n * A map of Validator component interfaces to their constructors.\n *\n * @type {{ \"0xd8725ea2\": typeof SignerValidator; }}\n */\nexport const ValidatorByComponentInterface = {\n [ASignerValidator as Hex]: SignerValidator,\n};\n\n/**\n * A function that will read a contract's component interface using `getComponentInterface` and return the correct instantiated instance.\n *\n * @export\n * @async\n * @param {DeployableOptions} options\n * @param {Address} address\n * @returns {unknown}\n * @throws {@link InvalidComponentInterfaceError}\n */\nexport async function validatorFromAddress(\n options: DeployableOptions,\n address: Address,\n) {\n const interfaceId = (await readContract(options.config, {\n abi: aValidatorAbi,\n functionName: 'getComponentInterface',\n address,\n })) as keyof typeof ValidatorByComponentInterface;\n const Ctor = ValidatorByComponentInterface[interfaceId];\n if (!Ctor) {\n throw new InvalidComponentInterfaceError(\n Object.keys(ValidatorByComponentInterface) as Hex[],\n interfaceId as Hex,\n );\n }\n return new Ctor(options, address);\n}\n"],"names":["ValidatorByComponentInterface","ASignerValidator","SignerValidator","validatorFromAddress","options","address","interfaceId","readContract","aValidatorAbi","Ctor","InvalidComponentInterfaceError"],"mappings":"qQAuBaA,EAAgC,CAC3C,CAACC,EAAuB,gBAAA,EAAGC,EAAA,eAC7B,EAYsB,eAAAC,EACpBC,EACAC,EACA,CACA,MAAMC,EAAe,MAAMC,eAAaH,EAAQ,OAAQ,CACtD,IAAKI,EAAA,GACL,aAAc,wBACd,QAAAH,CAAA,CACD,EACKI,EAAOT,EAA8BM,CAAW,EACtD,GAAI,CAACG,EACH,MAAM,IAAIC,EAAA,+BACR,OAAO,KAAKV,CAA6B,EACzCM,CAAA,EAGG,OAAA,IAAIG,EAAKL,EAASC,CAAO,CAClC"}
1
+ {"version":3,"file":"Validator.cjs","sources":["../../src/Validators/Validator.ts"],"sourcesContent":["import { aValidatorAbi } from '@boostxyz/evm';\nimport { ASignerValidator } from '@boostxyz/evm/deploys/componentInterfaces.json';\nimport { readContract } from '@wagmi/core';\nimport type { Address, Hex } from 'viem';\nimport type { DeployableOptions } from '../Deployable/Deployable';\nimport { InvalidComponentInterfaceError } from '../errors';\nimport { SignerValidator } from './SignerValidator';\n\nexport { SignerValidator };\n\n/**\n * A union type representing all valid protocol Validator implementations\n *\n * @export\n * @typedef {Validator}\n */\nexport type Validator = SignerValidator;\n\n/**\n * A map of Validator component interfaces to their constructors.\n *\n * @type {{ \"0xd8725ea2\": typeof SignerValidator; }}\n */\nexport const ValidatorByComponentInterface = {\n [ASignerValidator as Hex]: SignerValidator,\n};\n\n/**\n * A function that will read a contract's component interface using `getComponentInterface` and return the correct instantiated instance.\n *\n * @export\n * @async\n * @param {DeployableOptions} options\n * @param {Address} address\n * @returns {Promise<Validator>}\n * @throws {@link InvalidComponentInterfaceError}\n */\nexport async function validatorFromAddress(\n options: DeployableOptions,\n address: Address,\n) {\n const interfaceId = (await readContract(options.config, {\n abi: aValidatorAbi,\n functionName: 'getComponentInterface',\n address,\n })) as keyof typeof ValidatorByComponentInterface;\n const Ctor = ValidatorByComponentInterface[interfaceId];\n if (!Ctor) {\n throw new InvalidComponentInterfaceError(\n Object.keys(ValidatorByComponentInterface) as Hex[],\n interfaceId as Hex,\n );\n }\n return new Ctor(options, address);\n}\n"],"names":["ValidatorByComponentInterface","ASignerValidator","SignerValidator","validatorFromAddress","options","address","interfaceId","readContract","aValidatorAbi","Ctor","InvalidComponentInterfaceError"],"mappings":"qQAuBaA,EAAgC,CAC3C,CAACC,EAAuB,gBAAA,EAAGC,EAAA,eAC7B,EAYsB,eAAAC,EACpBC,EACAC,EACA,CACA,MAAMC,EAAe,MAAMC,eAAaH,EAAQ,OAAQ,CACtD,IAAKI,EAAA,GACL,aAAc,wBACd,QAAAH,CAAA,CACD,EACKI,EAAOT,EAA8BM,CAAW,EACtD,GAAI,CAACG,EACH,MAAM,IAAIC,EAAA,+BACR,OAAO,KAAKV,CAA6B,EACzCM,CAAA,EAGG,OAAA,IAAIG,EAAKL,EAASC,CAAO,CAClC"}
@@ -24,7 +24,7 @@ export declare const ValidatorByComponentInterface: {
24
24
  * @async
25
25
  * @param {DeployableOptions} options
26
26
  * @param {Address} address
27
- * @returns {unknown}
27
+ * @returns {Promise<Validator>}
28
28
  * @throws {@link InvalidComponentInterfaceError}
29
29
  */
30
30
  export declare function validatorFromAddress(options: DeployableOptions, address: Address): Promise<SignerValidator>;
@@ -1,5 +1,5 @@
1
- import { r as a } from "../generated-57_Kffpz.js";
2
- import { d as i } from "../componentInterfaces-DYkaxBda.js";
1
+ import { p as a } from "../generated-CKt2yCQd.js";
2
+ import { b as i } from "../componentInterfaces-BBCFkrZv.js";
3
3
  import { readContract as m } from "@wagmi/core";
4
4
  import { InvalidComponentInterfaceError as c } from "../errors.js";
5
5
  import { SignerValidator as f } from "./SignerValidator.js";
@@ -1 +1 @@
1
- {"version":3,"file":"Validator.js","sources":["../../src/Validators/Validator.ts"],"sourcesContent":["import { aValidatorAbi } from '@boostxyz/evm';\nimport { ASignerValidator } from '@boostxyz/evm/deploys/componentInterfaces.json';\nimport { readContract } from '@wagmi/core';\nimport type { Address, Hex } from 'viem';\nimport type { DeployableOptions } from '../Deployable/Deployable';\nimport { InvalidComponentInterfaceError } from '../errors';\nimport { SignerValidator } from './SignerValidator';\n\nexport { SignerValidator };\n\n/**\n * A union type representing all valid protocol Validator implementations\n *\n * @export\n * @typedef {Validator}\n */\nexport type Validator = SignerValidator;\n\n/**\n * A map of Validator component interfaces to their constructors.\n *\n * @type {{ \"0xd8725ea2\": typeof SignerValidator; }}\n */\nexport const ValidatorByComponentInterface = {\n [ASignerValidator as Hex]: SignerValidator,\n};\n\n/**\n * A function that will read a contract's component interface using `getComponentInterface` and return the correct instantiated instance.\n *\n * @export\n * @async\n * @param {DeployableOptions} options\n * @param {Address} address\n * @returns {unknown}\n * @throws {@link InvalidComponentInterfaceError}\n */\nexport async function validatorFromAddress(\n options: DeployableOptions,\n address: Address,\n) {\n const interfaceId = (await readContract(options.config, {\n abi: aValidatorAbi,\n functionName: 'getComponentInterface',\n address,\n })) as keyof typeof ValidatorByComponentInterface;\n const Ctor = ValidatorByComponentInterface[interfaceId];\n if (!Ctor) {\n throw new InvalidComponentInterfaceError(\n Object.keys(ValidatorByComponentInterface) as Hex[],\n interfaceId as Hex,\n );\n }\n return new Ctor(options, address);\n}\n"],"names":["ValidatorByComponentInterface","ASignerValidator","SignerValidator","validatorFromAddress","options","address","interfaceId","readContract","aValidatorAbi","Ctor","InvalidComponentInterfaceError"],"mappings":";;;;;AAuBO,MAAMA,IAAgC;AAAA,EAC3C,CAACC,CAAuB,GAAGC;AAC7B;AAYsB,eAAAC,EACpBC,GACAC,GACA;AACA,QAAMC,IAAe,MAAMC,EAAaH,EAAQ,QAAQ;AAAA,IACtD,KAAKI;AAAAA,IACL,cAAc;AAAA,IACd,SAAAH;AAAA,EAAA,CACD,GACKI,IAAOT,EAA8BM,CAAW;AACtD,MAAI,CAACG;AACH,UAAM,IAAIC;AAAA,MACR,OAAO,KAAKV,CAA6B;AAAA,MACzCM;AAAA,IAAA;AAGG,SAAA,IAAIG,EAAKL,GAASC,CAAO;AAClC;"}
1
+ {"version":3,"file":"Validator.js","sources":["../../src/Validators/Validator.ts"],"sourcesContent":["import { aValidatorAbi } from '@boostxyz/evm';\nimport { ASignerValidator } from '@boostxyz/evm/deploys/componentInterfaces.json';\nimport { readContract } from '@wagmi/core';\nimport type { Address, Hex } from 'viem';\nimport type { DeployableOptions } from '../Deployable/Deployable';\nimport { InvalidComponentInterfaceError } from '../errors';\nimport { SignerValidator } from './SignerValidator';\n\nexport { SignerValidator };\n\n/**\n * A union type representing all valid protocol Validator implementations\n *\n * @export\n * @typedef {Validator}\n */\nexport type Validator = SignerValidator;\n\n/**\n * A map of Validator component interfaces to their constructors.\n *\n * @type {{ \"0xd8725ea2\": typeof SignerValidator; }}\n */\nexport const ValidatorByComponentInterface = {\n [ASignerValidator as Hex]: SignerValidator,\n};\n\n/**\n * A function that will read a contract's component interface using `getComponentInterface` and return the correct instantiated instance.\n *\n * @export\n * @async\n * @param {DeployableOptions} options\n * @param {Address} address\n * @returns {Promise<Validator>}\n * @throws {@link InvalidComponentInterfaceError}\n */\nexport async function validatorFromAddress(\n options: DeployableOptions,\n address: Address,\n) {\n const interfaceId = (await readContract(options.config, {\n abi: aValidatorAbi,\n functionName: 'getComponentInterface',\n address,\n })) as keyof typeof ValidatorByComponentInterface;\n const Ctor = ValidatorByComponentInterface[interfaceId];\n if (!Ctor) {\n throw new InvalidComponentInterfaceError(\n Object.keys(ValidatorByComponentInterface) as Hex[],\n interfaceId as Hex,\n );\n }\n return new Ctor(options, address);\n}\n"],"names":["ValidatorByComponentInterface","ASignerValidator","SignerValidator","validatorFromAddress","options","address","interfaceId","readContract","aValidatorAbi","Ctor","InvalidComponentInterfaceError"],"mappings":";;;;;AAuBO,MAAMA,IAAgC;AAAA,EAC3C,CAACC,CAAuB,GAAGC;AAC7B;AAYsB,eAAAC,EACpBC,GACAC,GACA;AACA,QAAMC,IAAe,MAAMC,EAAaH,EAAQ,QAAQ;AAAA,IACtD,KAAKI;AAAAA,IACL,cAAc;AAAA,IACd,SAAAH;AAAA,EAAA,CACD,GACKI,IAAOT,EAA8BM,CAAW;AACtD,MAAI,CAACG;AACH,UAAM,IAAIC;AAAA,MACR,OAAO,KAAKV,CAA6B;AAAA,MACzCM;AAAA,IAAA;AAGG,SAAA,IAAIG,EAAKL,GAASC,CAAO;AAClC;"}
@@ -1 +1 @@
1
- {"version":3,"file":"claiming.cjs","sources":["../src/claiming.ts"],"sourcesContent":["import { type Address, type Hex, encodeAbiParameters, zeroHash } from 'viem';\n\n/**\n * Enum representing incentive disbursement strategies.\n *\n * @export\n * @enum {number}\n */\nexport enum StrategyType {\n POOL = 0,\n MINT = 1,\n RAFFLE = 2,\n}\n\n/**\n * The object representation of an `Incentive.ClaimPayload`\n *\n * @export\n * @interface ClaimPayload\n * @typedef {ClaimPayload}\n */\nexport interface ClaimPayload {\n /**\n * The address of the recipient\n *\n * @type {Address}\n */\n target: Address;\n /**\n * The implementation-specific data for the claim, if needed\n *\n * @type {?Hex}\n */\n data?: Hex;\n}\n\n/**\n * Given a valid {@link ClaimPayload}, encode the payload for use with Incentive operations.\n *\n * @param {ClaimPayload} param0\n * @param {Address} param0.target - The address of the recipient\n * @param {Hex} [param0.data=zeroHash] - The implementation-specific data for the claim, if needed\n * @returns {*}\n */\nexport const prepareClaimPayload = ({\n target,\n data = zeroHash,\n}: ClaimPayload) => {\n return encodeAbiParameters(\n [\n { type: 'address', name: 'target' },\n { type: 'bytes', name: 'data' },\n ],\n [target, data],\n );\n};\n"],"names":["StrategyType","prepareClaimPayload","target","data","zeroHash","encodeAbiParameters"],"mappings":"wGAQY,IAAAA,GAAAA,IACVA,EAAAA,EAAA,KAAO,CAAP,EAAA,OACAA,EAAAA,EAAA,KAAO,CAAP,EAAA,OACAA,EAAAA,EAAA,OAAS,CAAT,EAAA,SAHUA,IAAAA,GAAA,CAAA,CAAA,EAoCL,MAAMC,EAAsB,CAAC,CAClC,OAAAC,EACA,KAAAC,EAAOC,EAAA,QACT,IACSC,EAAA,oBACL,CACE,CAAE,KAAM,UAAW,KAAM,QAAS,EAClC,CAAE,KAAM,QAAS,KAAM,MAAO,CAChC,EACA,CAACH,EAAQC,CAAI,CAAA"}
1
+ {"version":3,"file":"claiming.cjs","sources":["../src/claiming.ts"],"sourcesContent":["import { type Address, type Hex, encodeAbiParameters, zeroHash } from 'viem';\n\n/**\n * Enum representing incentive disbursement strategies.\n *\n * @export\n * @enum {number}\n */\nexport enum StrategyType {\n POOL = 0,\n MINT = 1,\n RAFFLE = 2,\n}\n\n/**\n * The object representation of an `Incentive.ClaimPayload`\n *\n * @export\n * @interface ClaimPayload\n * @typedef {ClaimPayload}\n */\nexport interface ClaimPayload {\n /**\n * The address of the recipient\n *\n * @type {Address}\n */\n target: Address;\n /**\n * The implementation-specific data for the claim, if needed\n *\n * @type {?Hex}\n */\n data?: Hex;\n}\n\n/**\n * Given a valid {@link ClaimPayload}, encode the payload for use with Incentive operations.\n *\n * @param {ClaimPayload} param0\n * @param {Address} param0.target - The address of the recipient\n * @param {Hex} [param0.data=zeroHash] - The implementation-specific data for the claim, if needed\n * @returns {Hex}\n */\nexport const prepareClaimPayload = ({\n target,\n data = zeroHash,\n}: ClaimPayload) => {\n return encodeAbiParameters(\n [\n { type: 'address', name: 'target' },\n { type: 'bytes', name: 'data' },\n ],\n [target, data],\n );\n};\n"],"names":["StrategyType","prepareClaimPayload","target","data","zeroHash","encodeAbiParameters"],"mappings":"wGAQY,IAAAA,GAAAA,IACVA,EAAAA,EAAA,KAAO,CAAP,EAAA,OACAA,EAAAA,EAAA,KAAO,CAAP,EAAA,OACAA,EAAAA,EAAA,OAAS,CAAT,EAAA,SAHUA,IAAAA,GAAA,CAAA,CAAA,EAoCL,MAAMC,EAAsB,CAAC,CAClC,OAAAC,EACA,KAAAC,EAAOC,EAAA,QACT,IACSC,EAAA,oBACL,CACE,CAAE,KAAM,UAAW,KAAM,QAAS,EAClC,CAAE,KAAM,QAAS,KAAM,MAAO,CAChC,EACA,CAACH,EAAQC,CAAI,CAAA"}
@@ -37,7 +37,7 @@ export interface ClaimPayload {
37
37
  * @param {ClaimPayload} param0
38
38
  * @param {Address} param0.target - The address of the recipient
39
39
  * @param {Hex} [param0.data=zeroHash] - The implementation-specific data for the claim, if needed
40
- * @returns {*}
40
+ * @returns {Hex}
41
41
  */
42
42
  export declare const prepareClaimPayload: ({ target, data, }: ClaimPayload) => `0x${string}`;
43
43
  //# sourceMappingURL=claiming.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"claiming.js","sources":["../src/claiming.ts"],"sourcesContent":["import { type Address, type Hex, encodeAbiParameters, zeroHash } from 'viem';\n\n/**\n * Enum representing incentive disbursement strategies.\n *\n * @export\n * @enum {number}\n */\nexport enum StrategyType {\n POOL = 0,\n MINT = 1,\n RAFFLE = 2,\n}\n\n/**\n * The object representation of an `Incentive.ClaimPayload`\n *\n * @export\n * @interface ClaimPayload\n * @typedef {ClaimPayload}\n */\nexport interface ClaimPayload {\n /**\n * The address of the recipient\n *\n * @type {Address}\n */\n target: Address;\n /**\n * The implementation-specific data for the claim, if needed\n *\n * @type {?Hex}\n */\n data?: Hex;\n}\n\n/**\n * Given a valid {@link ClaimPayload}, encode the payload for use with Incentive operations.\n *\n * @param {ClaimPayload} param0\n * @param {Address} param0.target - The address of the recipient\n * @param {Hex} [param0.data=zeroHash] - The implementation-specific data for the claim, if needed\n * @returns {*}\n */\nexport const prepareClaimPayload = ({\n target,\n data = zeroHash,\n}: ClaimPayload) => {\n return encodeAbiParameters(\n [\n { type: 'address', name: 'target' },\n { type: 'bytes', name: 'data' },\n ],\n [target, data],\n );\n};\n"],"names":["StrategyType","prepareClaimPayload","target","data","zeroHash","encodeAbiParameters"],"mappings":";AAQY,IAAAA,sBAAAA,OACVA,EAAAA,EAAA,OAAO,CAAP,IAAA,QACAA,EAAAA,EAAA,OAAO,CAAP,IAAA,QACAA,EAAAA,EAAA,SAAS,CAAT,IAAA,UAHUA,IAAAA,KAAA,CAAA,CAAA;AAoCL,MAAMC,IAAsB,CAAC;AAAA,EAClC,QAAAC;AAAA,EACA,MAAAC,IAAOC;AACT,MACSC;AAAA,EACL;AAAA,IACE,EAAE,MAAM,WAAW,MAAM,SAAS;AAAA,IAClC,EAAE,MAAM,SAAS,MAAM,OAAO;AAAA,EAChC;AAAA,EACA,CAACH,GAAQC,CAAI;AAAA;"}
1
+ {"version":3,"file":"claiming.js","sources":["../src/claiming.ts"],"sourcesContent":["import { type Address, type Hex, encodeAbiParameters, zeroHash } from 'viem';\n\n/**\n * Enum representing incentive disbursement strategies.\n *\n * @export\n * @enum {number}\n */\nexport enum StrategyType {\n POOL = 0,\n MINT = 1,\n RAFFLE = 2,\n}\n\n/**\n * The object representation of an `Incentive.ClaimPayload`\n *\n * @export\n * @interface ClaimPayload\n * @typedef {ClaimPayload}\n */\nexport interface ClaimPayload {\n /**\n * The address of the recipient\n *\n * @type {Address}\n */\n target: Address;\n /**\n * The implementation-specific data for the claim, if needed\n *\n * @type {?Hex}\n */\n data?: Hex;\n}\n\n/**\n * Given a valid {@link ClaimPayload}, encode the payload for use with Incentive operations.\n *\n * @param {ClaimPayload} param0\n * @param {Address} param0.target - The address of the recipient\n * @param {Hex} [param0.data=zeroHash] - The implementation-specific data for the claim, if needed\n * @returns {Hex}\n */\nexport const prepareClaimPayload = ({\n target,\n data = zeroHash,\n}: ClaimPayload) => {\n return encodeAbiParameters(\n [\n { type: 'address', name: 'target' },\n { type: 'bytes', name: 'data' },\n ],\n [target, data],\n );\n};\n"],"names":["StrategyType","prepareClaimPayload","target","data","zeroHash","encodeAbiParameters"],"mappings":";AAQY,IAAAA,sBAAAA,OACVA,EAAAA,EAAA,OAAO,CAAP,IAAA,QACAA,EAAAA,EAAA,OAAO,CAAP,IAAA,QACAA,EAAAA,EAAA,SAAS,CAAT,IAAA,UAHUA,IAAAA,KAAA,CAAA,CAAA;AAoCL,MAAMC,IAAsB,CAAC;AAAA,EAClC,QAAAC;AAAA,EACA,MAAAC,IAAOC;AACT,MACSC;AAAA,EACL;AAAA,IACE,EAAE,MAAM,WAAW,MAAM,SAAS;AAAA,IAClC,EAAE,MAAM,SAAS,MAAM,OAAO;AAAA,EAChC;AAAA,EACA,CAACH,GAAQC,CAAI;AAAA;"}
@@ -0,0 +1,14 @@
1
+ const n = "0xc2c281ec", c = "0x53cf8555", e = "0x7cc1d5bb", s = "0x90318111", t = "0x7687b0ed", a = "0x5fbfaa4e", i = "0x0d36a40d", o = "0xb8ce7b22", A = "0x1392d798", x = "0x3d30a22c";
2
+ export {
3
+ t as A,
4
+ a,
5
+ o as b,
6
+ A as c,
7
+ x as d,
8
+ i as e,
9
+ e as f,
10
+ n as g,
11
+ c as h,
12
+ s as i
13
+ };
14
+ //# sourceMappingURL=componentInterfaces-BBCFkrZv.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"componentInterfaces-BBCFkrZv.js","sources":[],"sourcesContent":[],"names":[],"mappings":";"}
@@ -0,0 +1,2 @@
1
+ "use strict";const n="0xc2c281ec",e="0x53cf8555",t="0x7cc1d5bb",c="0x90318111",i="0x7687b0ed",A="0x5fbfaa4e",o="0x0d36a40d",s="0xb8ce7b22",a="0x1392d798",l="0x3d30a22c";exports.AAllowListIncentive=n;exports.ACGDAIncentive=e;exports.AERC20Incentive=t;exports.AERC20VariableIncentive=c;exports.AEventAction=i;exports.AManagedBudget=A;exports.APointsIncentive=o;exports.ASignerValidator=s;exports.ASimpleAllowList=a;exports.ASimpleDenyList=l;
2
+ //# sourceMappingURL=componentInterfaces-DRI_dQ-P.cjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"componentInterfaces-DRI_dQ-P.cjs","sources":[],"sourcesContent":[],"names":[],"mappings":""}
@@ -0,0 +1,2 @@
1
+ "use strict";const e={11155111:"0x504F4710d6C4A4cf610F17782C9205E0e583e85f"},t={11155111:"0x7BB0f4D1EC236B6F7EDb5AB41Cff0956755Fc202"},n={11155111:"0xD32f03C033383E0B62Ff900038C1CA9788f76369"},c={11155111:"0x88DCc7Fc9dDA2081fF2Fa15E240D3B81dfCbbaF0"},i={11155111:"0xFc81D4702F836C68E47184f31878af192949658A"},o={11155111:"0x588C5f424A1a1BE2dC0991906DDe323754B918Ad"},C={11155111:"0xDb79d3803fC80E62c7E5A64f00DAD14721f2801c"},a={11155111:"0x59A4B235950e7BdfD185F447271CE045691d5156"},s={11155111:"0x22e48036b74d125da60246b8Fb677D6194a95291"},f={11155111:"0xc37d353c13F75F48bEDB1CaDAACa77F3594FB2B9"},E={11155111:"0x9e1ff146C96195c74a746756AEd748c92Ff81d6A"},A={11155111:"0x7b27cc50e96Fc2f714b9a11825702d33f44cCB49"},d={11155111:"0x5Be370C82769dfa3738041D672047E2048EE5e73"};exports.AllowListIncentive=e;exports.BoostCore=t;exports.BoostRegistry=n;exports.CGDAIncentive=c;exports.ERC20Incentive=i;exports.ERC20VariableCriteriaIncentive=o;exports.ERC20VariableIncentive=C;exports.EventAction=a;exports.ManagedBudget=s;exports.PointsIncentive=f;exports.SignerValidator=E;exports.SimpleAllowList=A;exports.SimpleDenyList=d;
2
+ //# sourceMappingURL=deployments-DVXioW2i.cjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"deployments-DVXioW2i.cjs","sources":[],"sourcesContent":[],"names":[],"mappings":""}
@@ -0,0 +1,43 @@
1
+ const c = {
2
+ 11155111: "0x504F4710d6C4A4cf610F17782C9205E0e583e85f"
3
+ }, e = {
4
+ 11155111: "0x7BB0f4D1EC236B6F7EDb5AB41Cff0956755Fc202"
5
+ }, a = {
6
+ 11155111: "0xD32f03C033383E0B62Ff900038C1CA9788f76369"
7
+ }, s = {
8
+ 11155111: "0x88DCc7Fc9dDA2081fF2Fa15E240D3B81dfCbbaF0"
9
+ }, t = {
10
+ 11155111: "0xFc81D4702F836C68E47184f31878af192949658A"
11
+ }, n = {
12
+ 11155111: "0x588C5f424A1a1BE2dC0991906DDe323754B918Ad"
13
+ }, C = {
14
+ 11155111: "0xDb79d3803fC80E62c7E5A64f00DAD14721f2801c"
15
+ }, f = {
16
+ 11155111: "0x59A4B235950e7BdfD185F447271CE045691d5156"
17
+ }, o = {
18
+ 11155111: "0x22e48036b74d125da60246b8Fb677D6194a95291"
19
+ }, i = {
20
+ 11155111: "0xc37d353c13F75F48bEDB1CaDAACa77F3594FB2B9"
21
+ }, E = {
22
+ 11155111: "0x9e1ff146C96195c74a746756AEd748c92Ff81d6A"
23
+ }, d = {
24
+ 11155111: "0x7b27cc50e96Fc2f714b9a11825702d33f44cCB49"
25
+ }, A = {
26
+ 11155111: "0x5Be370C82769dfa3738041D672047E2048EE5e73"
27
+ };
28
+ export {
29
+ c as A,
30
+ a as B,
31
+ s as C,
32
+ t as E,
33
+ o as M,
34
+ i as P,
35
+ d as S,
36
+ A as a,
37
+ E as b,
38
+ C as c,
39
+ f as d,
40
+ n as e,
41
+ e as f
42
+ };
43
+ //# sourceMappingURL=deployments-oykLv3_Z.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"deployments-oykLv3_Z.js","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;"}
@@ -0,0 +1,44 @@
1
+ {
2
+ "AllowListIncentive": {
3
+ "11155111": "0x504F4710d6C4A4cf610F17782C9205E0e583e85f"
4
+ },
5
+ "BoostCore": {
6
+ "11155111": "0x7BB0f4D1EC236B6F7EDb5AB41Cff0956755Fc202"
7
+ },
8
+ "BoostRegistry": {
9
+ "11155111": "0xD32f03C033383E0B62Ff900038C1CA9788f76369"
10
+ },
11
+ "CGDAIncentive": {
12
+ "11155111": "0x88DCc7Fc9dDA2081fF2Fa15E240D3B81dfCbbaF0"
13
+ },
14
+ "ERC20Incentive": {
15
+ "11155111": "0xFc81D4702F836C68E47184f31878af192949658A"
16
+ },
17
+ "ERC20VariableCriteriaIncentive": {
18
+ "11155111": "0x588C5f424A1a1BE2dC0991906DDe323754B918Ad"
19
+ },
20
+ "ERC20VariableIncentive": {
21
+ "11155111": "0xDb79d3803fC80E62c7E5A64f00DAD14721f2801c"
22
+ },
23
+ "EventAction": {
24
+ "11155111": "0x59A4B235950e7BdfD185F447271CE045691d5156"
25
+ },
26
+ "ManagedBudget": {
27
+ "11155111": "0x22e48036b74d125da60246b8Fb677D6194a95291"
28
+ },
29
+ "OpenAllowList": {
30
+ "11155111": "0x192F4a185c76306C6F4fF22a8c412De414452330"
31
+ },
32
+ "PointsIncentive": {
33
+ "11155111": "0xc37d353c13F75F48bEDB1CaDAACa77F3594FB2B9"
34
+ },
35
+ "SignerValidator": {
36
+ "11155111": "0x9e1ff146C96195c74a746756AEd748c92Ff81d6A"
37
+ },
38
+ "SimpleAllowList": {
39
+ "11155111": "0x7b27cc50e96Fc2f714b9a11825702d33f44cCB49"
40
+ },
41
+ "SimpleDenyList": {
42
+ "11155111": "0x5Be370C82769dfa3738041D672047E2048EE5e73"
43
+ }
44
+ }
package/dist/errors.cjs CHANGED
@@ -1,2 +1,2 @@
1
- "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const a=require("viem");class i extends Error{constructor(){super('No "BoostCreated" log was emitted from which to extract boostId')}}class d extends Error{constructor(){super("Attempted to call contract method without providing an address")}}class c extends Error{constructor(r){super("Attempted to deploy a contract that already has an address configured"),this.address=r}}class l extends Error{constructor(){super("Implementing class did not properly override the `buildParameters` method")}}class u extends Error{constructor(){super("Expected an an owner to be provided in configuration or an account to exist on Wagmi config.")}}class p extends Error{constructor(){super("Expected a valid Wagmi configuration to be available either on Deployable, or as argument to deploy.")}}class E extends Error{constructor(){super("Expected a valid payload to be available either on Deployable or as argument to deploy.")}}class y extends Error{constructor(r){super("Expected a contract address to exist on receipt.",{cause:r}),this.receipt=r}}class v extends Error{constructor(r,t){super("Address provided does not match any expected protocol interface",{cause:{expected:r,received:t}}),this.expected=[],this.received=a.zeroHash,this.expected=r,this.received=t}}class m extends Error{constructor(r){super("Did not provide a valid FungibleTransferPayload or ERC1155 transfer payload.",{cause:r}),this.received=r}}class b extends Error{constructor(r){super(`Budget needs to explicitly authorize ${r}. You can retrieve this value from BoostCore.address`)}}class g extends Error{constructor(){super("Budgets must be preinitialized before being used with a new Boost")}}class h extends Error{constructor(r){super(`Incentive not cloneable: ${r.constructor.name}`)}}class x extends Error{constructor(){super("Must supply at least one action step")}}class f extends Error{constructor(){super("Cannot supply more than 4 action steps with current protocol version")}}class o extends Error{constructor(r,{fieldValue:t,criteria:s,log:n}){super(r),this.fieldValue=t,this.criteria=s,this.log=n}}class C extends o{constructor(r){super("Field value is undefined",r)}}class A extends o{constructor(r){super("Numerical comparisons cannot be used with non-numerical criteria",r)}}class I extends o{constructor(r){super("Filter can only be used with bytes or string field type",r)}}class w extends o{constructor(r){super("Invalid FilterType provided",r)}}exports.BoostCoreNoIdentifierEmitted=i;exports.BudgetMustAuthorizeBoostCore=b;exports.ContractAddressRequiredError=d;exports.DeployableAlreadyDeployedError=c;exports.DeployableBuildParametersUnspecifiedError=l;exports.DeployableMissingPayloadError=E;exports.DeployableUnknownOwnerProvidedError=u;exports.DeployableWagmiConfigurationRequiredError=p;exports.EventActionValidationError=o;exports.FieldValueNotComparableError=I;exports.FieldValueUndefinedError=C;exports.IncentiveNotCloneableError=h;exports.InvalidComponentInterfaceError=v;exports.InvalidNumericalCriteriaError=A;exports.MustInitializeBudgetError=g;exports.NoContractAddressUponReceiptError=y;exports.NoEventActionStepsProvidedError=x;exports.TooManyEventActionStepsProvidedError=f;exports.UnknownTransferPayloadSupplied=m;exports.UnrecognizedFilterTypeError=w;
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const a=require("viem");class i extends Error{constructor(){super('No "BoostCreated" log was emitted from which to extract boostId')}}class d extends Error{constructor(){super("Attempted to call contract method without providing an address")}}class c extends Error{constructor(r){super("Attempted to deploy a contract that already has an address configured"),this.address=r}}class l extends Error{constructor(){super("Implementing class did not properly override the `buildParameters` method")}}class u extends Error{constructor(){super("Expected an an owner to be provided in configuration or an account to exist on Wagmi config.")}}class p extends Error{constructor(){super("Expected a valid Wagmi configuration to be available either on Deployable, or as argument to deploy.")}}class E extends Error{constructor(){super("Expected a valid payload to be available either on Deployable or as argument to deploy.")}}class h extends Error{constructor(r){super("Expected a contract address to exist on receipt.",{cause:r}),this.receipt=r}}class g extends Error{constructor(r,o){super("Address provided does not match any expected protocol interface",{cause:{expected:r,received:o}}),this.expected=[],this.received=a.zeroHash,this.expected=r,this.received=o}}class m extends Error{constructor(r,o){super(`Parameter is not transparently stored onchain. Parameter ${r} in event ${o.name} cannot be used in an action`,{cause:o}),this.event=o,this.input_param_idx=r}}class v extends Error{constructor(r){super("Did not provide a valid FungibleTransferPayload or ERC1155 transfer payload.",{cause:r}),this.received=r}}class y extends Error{constructor(r){super(`Budget needs to explicitly authorize ${r}. You can retrieve this value from BoostCore.address`)}}class b extends Error{constructor(){super("Budgets must be preinitialized before being used with a new Boost")}}class x extends Error{constructor(r){super(`Incentive not cloneable: ${r.constructor.name}`)}}class f extends Error{constructor(){super("Must supply at least one action step")}}class C extends Error{constructor(){super("Cannot supply more than 4 action steps with current protocol version")}}class I extends Error{constructor(r){super(`No known ABI for given signature: ${r}`)}}class t extends Error{constructor(r,{fieldValue:o,criteria:n,...s}){switch(super(r),this.fieldValue=o,this.criteria=n,!0){case"log"in s:this.log=s.log;break;case"decodedArgs"in s:this.decodedArgs=s.decodedArgs}}}class A extends t{constructor(r){super("Decoded Args are malformed; Check which params are indexed",r)}}class D extends t{constructor(r){super("Field value is undefined",r)}}class N extends t{constructor(r){super("Numerical comparisons cannot be used with non-numerical criteria",r)}}class w extends Error{constructor(r,o){super(`Failed to decode function data: ${o.message}`),this.name="FunctionDataDecodeError",this.abi=r,this.originalError=o}}class P extends t{constructor(r){super("Filter can only be used with bytes or string field type",r)}}class F extends t{constructor(r){super("Invalid FilterType provided",r)}}class B extends Error{constructor(){super("Provided Wagmi configuration does not define `chainId` property with which to target protocol contracts"),this.name="NoConnectedChainIdError"}}class M extends Error{constructor(r,o){super(`Provided Wagmi configuration supplied a "chainId" where protocol is not deployed, provided: ${r}, but valid chains are: ${o}`),this.name="InvalidProtocolChainIdError"}}class U extends Error{constructor(r,o="Unable to fetch Incentive Criteria from contract"){super(o+(r?`: ${r.message}`:"")),this.name="IncentiveCriteriaNotFoundError"}}class T extends Error{constructor(r,o=`No logs found for event signature ${r}`){super(o),this.name="NoMatchingLogsError"}}class $ extends Error{constructor(r="unknown",o=`Invalid criteria type ${r}`){super(o),this.name="InvalidCriteriaTypeError"}}class z extends Error{constructor(r="Issue decoding args"){super(r),this.name="DecodedArgsError"}}class V extends Error{constructor(r){super(`Boost with not found with id: ${r}`),this.id=r}}exports.BoostCoreNoIdentifierEmitted=i;exports.BoostNotFoundError=V;exports.BudgetMustAuthorizeBoostCore=y;exports.ContractAddressRequiredError=d;exports.DecodedArgsError=z;exports.DecodedArgsMalformedError=A;exports.DeployableAlreadyDeployedError=c;exports.DeployableBuildParametersUnspecifiedError=l;exports.DeployableMissingPayloadError=E;exports.DeployableUnknownOwnerProvidedError=u;exports.DeployableWagmiConfigurationRequiredError=p;exports.FieldActionValidationError=t;exports.FieldValueNotComparableError=P;exports.FieldValueUndefinedError=D;exports.FunctionDataDecodeError=w;exports.IncentiveCriteriaNotFoundError=U;exports.IncentiveNotCloneableError=x;exports.InvalidComponentInterfaceError=g;exports.InvalidCriteriaTypeError=$;exports.InvalidNumericalCriteriaError=N;exports.InvalidProtocolChainIdError=M;exports.MustInitializeBudgetError=b;exports.NoConnectedChainIdError=B;exports.NoContractAddressUponReceiptError=h;exports.NoEventActionStepsProvidedError=f;exports.NoMatchingLogsError=T;exports.TooManyEventActionStepsProvidedError=C;exports.UnknownTransferPayloadSupplied=v;exports.UnparseableAbiParamError=m;exports.UnrecognizedFilterTypeError=F;exports.ValidationAbiMissingError=I;
2
2
  //# sourceMappingURL=errors.cjs.map