@boostxyz/sdk 0.0.0-alpha.10

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 (242) hide show
  1. package/LICENSE +674 -0
  2. package/README.md +7 -0
  3. package/dist/Actions/Action.cjs +2 -0
  4. package/dist/Actions/Action.cjs.map +1 -0
  5. package/dist/Actions/Action.d.ts +31 -0
  6. package/dist/Actions/Action.d.ts.map +1 -0
  7. package/dist/Actions/Action.js +29 -0
  8. package/dist/Actions/Action.js.map +1 -0
  9. package/dist/Actions/ContractAction.d.ts +370 -0
  10. package/dist/Actions/ContractAction.d.ts.map +1 -0
  11. package/dist/Actions/ERC721MintAction.d.ts +513 -0
  12. package/dist/Actions/ERC721MintAction.d.ts.map +1 -0
  13. package/dist/Actions/EventAction.cjs +2 -0
  14. package/dist/Actions/EventAction.cjs.map +1 -0
  15. package/dist/Actions/EventAction.d.ts +694 -0
  16. package/dist/Actions/EventAction.d.ts.map +1 -0
  17. package/dist/Actions/EventAction.js +491 -0
  18. package/dist/Actions/EventAction.js.map +1 -0
  19. package/dist/AllowLists/AllowList.cjs +2 -0
  20. package/dist/AllowLists/AllowList.cjs.map +1 -0
  21. package/dist/AllowLists/AllowList.d.ts +32 -0
  22. package/dist/AllowLists/AllowList.d.ts.map +1 -0
  23. package/dist/AllowLists/AllowList.js +30 -0
  24. package/dist/AllowLists/AllowList.js.map +1 -0
  25. package/dist/AllowLists/SimpleAllowList.cjs +2 -0
  26. package/dist/AllowLists/SimpleAllowList.cjs.map +1 -0
  27. package/dist/AllowLists/SimpleAllowList.d.ts +481 -0
  28. package/dist/AllowLists/SimpleAllowList.d.ts.map +1 -0
  29. package/dist/AllowLists/SimpleAllowList.js +154 -0
  30. package/dist/AllowLists/SimpleAllowList.js.map +1 -0
  31. package/dist/AllowLists/SimpleDenyList.cjs +2 -0
  32. package/dist/AllowLists/SimpleDenyList.cjs.map +1 -0
  33. package/dist/AllowLists/SimpleDenyList.d.ts +335 -0
  34. package/dist/AllowLists/SimpleDenyList.d.ts.map +1 -0
  35. package/dist/AllowLists/SimpleDenyList.js +115 -0
  36. package/dist/AllowLists/SimpleDenyList.js.map +1 -0
  37. package/dist/Auth/Auth.cjs +2 -0
  38. package/dist/Auth/Auth.cjs.map +1 -0
  39. package/dist/Auth/Auth.d.ts +10 -0
  40. package/dist/Auth/Auth.d.ts.map +1 -0
  41. package/dist/Auth/Auth.js +5 -0
  42. package/dist/Auth/Auth.js.map +1 -0
  43. package/dist/Auth/PassthroughAuth.cjs +2 -0
  44. package/dist/Auth/PassthroughAuth.cjs.map +1 -0
  45. package/dist/Auth/PassthroughAuth.d.ts +51 -0
  46. package/dist/Auth/PassthroughAuth.d.ts.map +1 -0
  47. package/dist/Auth/PassthroughAuth.js +39 -0
  48. package/dist/Auth/PassthroughAuth.js.map +1 -0
  49. package/dist/Boost.cjs +2 -0
  50. package/dist/Boost.cjs.map +1 -0
  51. package/dist/Boost.d.ts +234 -0
  52. package/dist/Boost.d.ts.map +1 -0
  53. package/dist/Boost.js +162 -0
  54. package/dist/Boost.js.map +1 -0
  55. package/dist/BoostCore.cjs +3 -0
  56. package/dist/BoostCore.cjs.map +1 -0
  57. package/dist/BoostCore.d.ts +498 -0
  58. package/dist/BoostCore.d.ts.map +1 -0
  59. package/dist/BoostCore.js +1153 -0
  60. package/dist/BoostCore.js.map +1 -0
  61. package/dist/BoostRegistry.cjs +2 -0
  62. package/dist/BoostRegistry.cjs.map +1 -0
  63. package/dist/BoostRegistry.d.ts +243 -0
  64. package/dist/BoostRegistry.d.ts.map +1 -0
  65. package/dist/BoostRegistry.js +262 -0
  66. package/dist/BoostRegistry.js.map +1 -0
  67. package/dist/Budgets/Budget.cjs +2 -0
  68. package/dist/Budgets/Budget.cjs.map +1 -0
  69. package/dist/Budgets/Budget.d.ts +31 -0
  70. package/dist/Budgets/Budget.d.ts.map +1 -0
  71. package/dist/Budgets/Budget.js +29 -0
  72. package/dist/Budgets/Budget.js.map +1 -0
  73. package/dist/Budgets/ManagedBudget.cjs +2 -0
  74. package/dist/Budgets/ManagedBudget.cjs.map +1 -0
  75. package/dist/Budgets/ManagedBudget.d.ts +1103 -0
  76. package/dist/Budgets/ManagedBudget.d.ts.map +1 -0
  77. package/dist/Budgets/ManagedBudget.js +516 -0
  78. package/dist/Budgets/ManagedBudget.js.map +1 -0
  79. package/dist/Budgets/SimpleBudget.d.ts +824 -0
  80. package/dist/Budgets/SimpleBudget.d.ts.map +1 -0
  81. package/dist/Budgets/VestingBudget.d.ts +778 -0
  82. package/dist/Budgets/VestingBudget.d.ts.map +1 -0
  83. package/dist/Deployable/Contract.cjs +2 -0
  84. package/dist/Deployable/Contract.cjs.map +1 -0
  85. package/dist/Deployable/Contract.d.ts +125 -0
  86. package/dist/Deployable/Contract.d.ts.map +1 -0
  87. package/dist/Deployable/Contract.js +150 -0
  88. package/dist/Deployable/Contract.js.map +1 -0
  89. package/dist/Deployable/Deployable.cjs +2 -0
  90. package/dist/Deployable/Deployable.cjs.map +1 -0
  91. package/dist/Deployable/Deployable.d.ts +161 -0
  92. package/dist/Deployable/Deployable.d.ts.map +1 -0
  93. package/dist/Deployable/Deployable.js +131 -0
  94. package/dist/Deployable/Deployable.js.map +1 -0
  95. package/dist/Deployable/DeployableTarget.cjs +2 -0
  96. package/dist/Deployable/DeployableTarget.cjs.map +1 -0
  97. package/dist/Deployable/DeployableTarget.d.ts +116 -0
  98. package/dist/Deployable/DeployableTarget.d.ts.map +1 -0
  99. package/dist/Deployable/DeployableTarget.js +132 -0
  100. package/dist/Deployable/DeployableTarget.js.map +1 -0
  101. package/dist/Incentives/AllowListIncentive.cjs +2 -0
  102. package/dist/Incentives/AllowListIncentive.cjs.map +1 -0
  103. package/dist/Incentives/AllowListIncentive.d.ts +513 -0
  104. package/dist/Incentives/AllowListIncentive.d.ts.map +1 -0
  105. package/dist/Incentives/AllowListIncentive.js +201 -0
  106. package/dist/Incentives/AllowListIncentive.js.map +1 -0
  107. package/dist/Incentives/CGDAIncentive.cjs +2 -0
  108. package/dist/Incentives/CGDAIncentive.cjs.map +1 -0
  109. package/dist/Incentives/CGDAIncentive.d.ts +644 -0
  110. package/dist/Incentives/CGDAIncentive.d.ts.map +1 -0
  111. package/dist/Incentives/CGDAIncentive.js +271 -0
  112. package/dist/Incentives/CGDAIncentive.js.map +1 -0
  113. package/dist/Incentives/ERC1155Incentive.d.ts +713 -0
  114. package/dist/Incentives/ERC1155Incentive.d.ts.map +1 -0
  115. package/dist/Incentives/ERC20Incentive.cjs +2 -0
  116. package/dist/Incentives/ERC20Incentive.cjs.map +1 -0
  117. package/dist/Incentives/ERC20Incentive.d.ts +666 -0
  118. package/dist/Incentives/ERC20Incentive.d.ts.map +1 -0
  119. package/dist/Incentives/ERC20Incentive.js +312 -0
  120. package/dist/Incentives/ERC20Incentive.js.map +1 -0
  121. package/dist/Incentives/ERC20VariableIncentive.d.ts +582 -0
  122. package/dist/Incentives/ERC20VariableIncentive.d.ts.map +1 -0
  123. package/dist/Incentives/Incentive.cjs +2 -0
  124. package/dist/Incentives/Incentive.cjs.map +1 -0
  125. package/dist/Incentives/Incentive.d.ts +36 -0
  126. package/dist/Incentives/Incentive.d.ts.map +1 -0
  127. package/dist/Incentives/Incentive.js +299 -0
  128. package/dist/Incentives/Incentive.js.map +1 -0
  129. package/dist/Incentives/PointsIncentive.cjs +2 -0
  130. package/dist/Incentives/PointsIncentive.cjs.map +1 -0
  131. package/dist/Incentives/PointsIncentive.d.ts +659 -0
  132. package/dist/Incentives/PointsIncentive.d.ts.map +1 -0
  133. package/dist/Incentives/PointsIncentive.js +215 -0
  134. package/dist/Incentives/PointsIncentive.js.map +1 -0
  135. package/dist/Validators/SignerValidator.cjs +2 -0
  136. package/dist/Validators/SignerValidator.cjs.map +1 -0
  137. package/dist/Validators/SignerValidator.d.ts +745 -0
  138. package/dist/Validators/SignerValidator.d.ts.map +1 -0
  139. package/dist/Validators/SignerValidator.js +293 -0
  140. package/dist/Validators/SignerValidator.js.map +1 -0
  141. package/dist/Validators/Validator.cjs +2 -0
  142. package/dist/Validators/Validator.cjs.map +1 -0
  143. package/dist/Validators/Validator.d.ts +31 -0
  144. package/dist/Validators/Validator.d.ts.map +1 -0
  145. package/dist/Validators/Validator.js +27 -0
  146. package/dist/Validators/Validator.js.map +1 -0
  147. package/dist/claiming.cjs +2 -0
  148. package/dist/claiming.cjs.map +1 -0
  149. package/dist/claiming.d.ts +43 -0
  150. package/dist/claiming.d.ts.map +1 -0
  151. package/dist/claiming.js +17 -0
  152. package/dist/claiming.js.map +1 -0
  153. package/dist/componentInterfaces-CKCBwG16.cjs +2 -0
  154. package/dist/componentInterfaces-CKCBwG16.cjs.map +1 -0
  155. package/dist/componentInterfaces-DYkaxBda.js +13 -0
  156. package/dist/componentInterfaces-DYkaxBda.js.map +1 -0
  157. package/dist/errors.cjs +2 -0
  158. package/dist/errors.cjs.map +1 -0
  159. package/dist/errors.d.ts +441 -0
  160. package/dist/errors.d.ts.map +1 -0
  161. package/dist/errors.js +262 -0
  162. package/dist/errors.js.map +1 -0
  163. package/dist/generated-BDeDiaCK.js +4625 -0
  164. package/dist/generated-BDeDiaCK.js.map +1 -0
  165. package/dist/generated-wKBNvm48.cjs +3 -0
  166. package/dist/generated-wKBNvm48.cjs.map +1 -0
  167. package/dist/index.cjs +2 -0
  168. package/dist/index.cjs.map +1 -0
  169. package/dist/index.d.ts +25 -0
  170. package/dist/index.d.ts.map +1 -0
  171. package/dist/index.js +113 -0
  172. package/dist/index.js.map +1 -0
  173. package/dist/transfers.cjs +2 -0
  174. package/dist/transfers.cjs.map +1 -0
  175. package/dist/transfers.d.ts +198 -0
  176. package/dist/transfers.d.ts.map +1 -0
  177. package/dist/transfers.js +84 -0
  178. package/dist/transfers.js.map +1 -0
  179. package/dist/utils.cjs +2 -0
  180. package/dist/utils.cjs.map +1 -0
  181. package/dist/utils.d.ts +116 -0
  182. package/dist/utils.d.ts.map +1 -0
  183. package/dist/utils.js +30 -0
  184. package/dist/utils.js.map +1 -0
  185. package/package.json +211 -0
  186. package/src/Actions/Action.test.ts +75 -0
  187. package/src/Actions/Action.ts +61 -0
  188. package/src/Actions/ContractAction.test.ts +197 -0
  189. package/src/Actions/ContractAction.ts +301 -0
  190. package/src/Actions/ERC721MintAction.test.ts +112 -0
  191. package/src/Actions/ERC721MintAction.ts +292 -0
  192. package/src/Actions/EventAction.test.ts +205 -0
  193. package/src/Actions/EventAction.ts +811 -0
  194. package/src/AllowLists/AllowList.test.ts +64 -0
  195. package/src/AllowLists/AllowList.ts +60 -0
  196. package/src/AllowLists/SimpleAllowList.test.ts +52 -0
  197. package/src/AllowLists/SimpleAllowList.ts +284 -0
  198. package/src/AllowLists/SimpleDenyList.test.ts +52 -0
  199. package/src/AllowLists/SimpleDenyList.ts +227 -0
  200. package/src/Auth/Auth.ts +11 -0
  201. package/src/Auth/PassthroughAuth.test.ts +12 -0
  202. package/src/Auth/PassthroughAuth.ts +80 -0
  203. package/src/Boost.ts +290 -0
  204. package/src/BoostCore.test.ts +773 -0
  205. package/src/BoostCore.ts +1261 -0
  206. package/src/BoostRegistry.ts +467 -0
  207. package/src/Budgets/Budget.test.ts +27 -0
  208. package/src/Budgets/Budget.ts +61 -0
  209. package/src/Budgets/ManagedBudget.test.ts +154 -0
  210. package/src/Budgets/ManagedBudget.ts +796 -0
  211. package/src/Budgets/SimpleBudget.test.ts +152 -0
  212. package/src/Budgets/SimpleBudget.ts +564 -0
  213. package/src/Budgets/VestingBudget.test.ts +123 -0
  214. package/src/Budgets/VestingBudget.ts +602 -0
  215. package/src/Deployable/Contract.ts +229 -0
  216. package/src/Deployable/Deployable.ts +250 -0
  217. package/src/Deployable/DeployableTarget.ts +223 -0
  218. package/src/Incentives/AllowListIncentive.test.ts +143 -0
  219. package/src/Incentives/AllowListIncentive.ts +334 -0
  220. package/src/Incentives/CGDAIncentive.test.ts +132 -0
  221. package/src/Incentives/CGDAIncentive.ts +468 -0
  222. package/src/Incentives/ERC1155Incentive.test.ts +87 -0
  223. package/src/Incentives/ERC1155Incentive.ts +466 -0
  224. package/src/Incentives/ERC20Incentive.test.ts +130 -0
  225. package/src/Incentives/ERC20Incentive.ts +482 -0
  226. package/src/Incentives/ERC20VariableIncentive.test.ts +136 -0
  227. package/src/Incentives/ERC20VariableIncentive.ts +420 -0
  228. package/src/Incentives/Incentive.test.ts +92 -0
  229. package/src/Incentives/Incentive.ts +85 -0
  230. package/src/Incentives/PointsIncentive.test.ts +139 -0
  231. package/src/Incentives/PointsIncentive.ts +365 -0
  232. package/src/Validators/SignerValidator.test.ts +159 -0
  233. package/src/Validators/SignerValidator.ts +681 -0
  234. package/src/Validators/Validator.test.ts +21 -0
  235. package/src/Validators/Validator.ts +55 -0
  236. package/src/claiming.ts +56 -0
  237. package/src/errors.ts +542 -0
  238. package/src/index.test.ts +40 -0
  239. package/src/index.ts +53 -0
  240. package/src/transfers.ts +284 -0
  241. package/src/utils.test.ts +44 -0
  242. package/src/utils.ts +198 -0
@@ -0,0 +1,115 @@
1
+ import { S as s, a7 as i, a8 as n, a9 as h } from "../generated-BDeDiaCK.js";
2
+ import { getAccount as l } from "@wagmi/core";
3
+ import { zeroHash as p, zeroAddress as u, encodeAbiParameters as m } from "viem";
4
+ import { DeployableTarget as w } from "../Deployable/DeployableTarget.js";
5
+ import { DeployableUnknownOwnerProvidedError as y } from "../errors.js";
6
+ import { RegistryType as A } from "../utils.js";
7
+ const g = "0x6080604052348015600e575f80fd5b50601b601f60201b60201c565b60b0565b5f602c608760201b60201c565b90508054600181161560455763f92ee8a95f526004601cfd5b8160c01c808260011c146082578060011b8355806020527fc7f505b2f371ae2175ee4913f4499e1f2633a7b5936321eed1cdaeb6115181d2602080a15b505050565b5f7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffbf6011325f1b905090565b6110ac806100bd5f395ff3fe6080604052600436106100a6575f3560e01c8063715018a611610063578063715018a6146101745780638da5cb5b1461017e578063e3f756de146101a8578063f04e283e146101e4578063f2fde38b14610200578063fee81cf41461021c576100a6565b806301ffc9a7146100aa578063141973b0146100e6578063256929621461010e57806328d6183b14610118578063439fab911461014257806354d1f13d1461016a575b5f80fd5b3480156100b5575f80fd5b506100d060048036038101906100cb9190610a82565b610258565b6040516100dd9190610ac7565b60405180910390f35b3480156100f1575f80fd5b5061010c60048036038101906101079190610b96565b6102d1565b005b6101166103da565b005b348015610123575f80fd5b5061012c61042b565b6040516101399190610c23565b60405180910390f35b34801561014d575f80fd5b5061016860048036038101906101639190610c91565b610452565b005b61017261056f565b005b61017c6105a8565b005b348015610189575f80fd5b506101926105bb565b60405161019f9190610d1b565b60405180910390f35b3480156101b3575f80fd5b506101ce60048036038101906101c99190610d5e565b6105e3565b6040516101db9190610ac7565b60405180910390f35b6101fe60048036038101906101f99190610dbb565b610637565b005b61021a60048036038101906102159190610dbb565b610675565b005b348015610227575f80fd5b50610242600480360381019061023d9190610dbb565b61069e565b60405161024f9190610dfe565b60405180910390f35b5f7f3d30a22c000000000000000000000000000000000000000000000000000000007bffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916827bffffffffffffffffffffffffffffffffffffffffffffffffffffffff191614806102ca57506102c9826106b7565b5b9050919050565b6102d9610730565b818190508484905014610318576040517fff633a3800000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b5f5b848490508110156103d35782828281811061033857610337610e17565b5b905060200201602081019061034d9190610e6e565b5f8087878581811061036257610361610e17565b5b90506020020160208101906103779190610dbb565b73ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020015f205f6101000a81548160ff021916908315150217905550808060010191505061031a565b5050505050565b5f6103e3610767565b67ffffffffffffffff164201905063389a75e1600c52335f52806020600c2055337fdbf36a107da19e49527a7176a1babf963b4b0ff8cde35ee35d6cd8f1f9ac7e1d5f80a250565b5f7f3d30a22c00000000000000000000000000000000000000000000000000000000905090565b5f61045b610771565b9050805460038255801561048d5760018160011c14303b106104845763f92ee8a95f526004601cfd5b818160ff1b1b91505b505f80848481019061049f919061101c565b915091506104ac8261079a565b5f5b81518110156105325760015f808484815181106104ce576104cd610e17565b5b602002602001015173ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020015f205f6101000a81548160ff02191690831515021790555080806001019150506104ae565b505050801561056a576002815560016020527fc7f505b2f371ae2175ee4913f4499e1f2633a7b5936321eed1cdaeb6115181d2602080a15b505050565b63389a75e1600c52335f525f6020600c2055337ffa7b8eab7da67f412cc9575ed43464468f9bfbae89d1675917346ca6d8fe3c925f80a2565b6105b0610730565b6105b95f610870565b565b5f7fffffffffffffffffffffffffffffffffffffffffffffffffffffffff7487392754905090565b5f805f8573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020015f205f9054906101000a900460ff161590509392505050565b61063f610730565b63389a75e1600c52805f526020600c20805442111561066557636f5e88185f526004601cfd5b5f81555061067281610870565b50565b61067d610730565b8060601b61069257637448fbae5f526004601cfd5b61069b81610870565b50565b5f63389a75e1600c52815f526020600c20549050919050565b5f7fe2089f79000000000000000000000000000000000000000000000000000000007bffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916827bffffffffffffffffffffffffffffffffffffffffffffffffffffffff19161480610729575061072882610936565b5b9050919050565b7fffffffffffffffffffffffffffffffffffffffffffffffffffffffff74873927543314610765576382b429005f526004601cfd5b565b5f6202a300905090565b5f7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffbf6011325f1b905090565b6107a26109af565b1561081a577fffffffffffffffffffffffffffffffffffffffffffffffffffffffff748739278054156107dc57630dc149f05f526004601cfd5b8160601b60601c9150811560ff1b82178155815f7f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e05f80a35061086d565b8060601b60601c9050807fffffffffffffffffffffffffffffffffffffffffffffffffffffffff7487392755805f7f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e05f80a35b50565b6108786109af565b156108dd577fffffffffffffffffffffffffffffffffffffffffffffffffffffffff748739278160601b60601c91508181547f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e05f80a3811560ff1b8217815550610933565b7fffffffffffffffffffffffffffffffffffffffffffffffffffffffff748739278160601b60601c91508181547f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e05f80a3818155505b50565b5f7f6ab67a0d000000000000000000000000000000000000000000000000000000007bffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916827bffffffffffffffffffffffffffffffffffffffffffffffffffffffff191614806109a857506109a7826109b3565b5b9050919050565b5f90565b5f7f01ffc9a7000000000000000000000000000000000000000000000000000000007bffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916827bffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916149050919050565b5f604051905090565b5f80fd5b5f80fd5b5f7fffffffff0000000000000000000000000000000000000000000000000000000082169050919050565b610a6181610a2d565b8114610a6b575f80fd5b50565b5f81359050610a7c81610a58565b92915050565b5f60208284031215610a9757610a96610a25565b5b5f610aa484828501610a6e565b91505092915050565b5f8115159050919050565b610ac181610aad565b82525050565b5f602082019050610ada5f830184610ab8565b92915050565b5f80fd5b5f80fd5b5f80fd5b5f8083601f840112610b0157610b00610ae0565b5b8235905067ffffffffffffffff811115610b1e57610b1d610ae4565b5b602083019150836020820283011115610b3a57610b39610ae8565b5b9250929050565b5f8083601f840112610b5657610b55610ae0565b5b8235905067ffffffffffffffff811115610b7357610b72610ae4565b5b602083019150836020820283011115610b8f57610b8e610ae8565b5b9250929050565b5f805f8060408587031215610bae57610bad610a25565b5b5f85013567ffffffffffffffff811115610bcb57610bca610a29565b5b610bd787828801610aec565b9450945050602085013567ffffffffffffffff811115610bfa57610bf9610a29565b5b610c0687828801610b41565b925092505092959194509250565b610c1d81610a2d565b82525050565b5f602082019050610c365f830184610c14565b92915050565b5f8083601f840112610c5157610c50610ae0565b5b8235905067ffffffffffffffff811115610c6e57610c6d610ae4565b5b602083019150836001820283011115610c8a57610c89610ae8565b5b9250929050565b5f8060208385031215610ca757610ca6610a25565b5b5f83013567ffffffffffffffff811115610cc457610cc3610a29565b5b610cd085828601610c3c565b92509250509250929050565b5f73ffffffffffffffffffffffffffffffffffffffff82169050919050565b5f610d0582610cdc565b9050919050565b610d1581610cfb565b82525050565b5f602082019050610d2e5f830184610d0c565b92915050565b610d3d81610cfb565b8114610d47575f80fd5b50565b5f81359050610d5881610d34565b92915050565b5f805f60408486031215610d7557610d74610a25565b5b5f610d8286828701610d4a565b935050602084013567ffffffffffffffff811115610da357610da2610a29565b5b610daf86828701610c3c565b92509250509250925092565b5f60208284031215610dd057610dcf610a25565b5b5f610ddd84828501610d4a565b91505092915050565b5f819050919050565b610df881610de6565b82525050565b5f602082019050610e115f830184610def565b92915050565b7f4e487b71000000000000000000000000000000000000000000000000000000005f52603260045260245ffd5b610e4d81610aad565b8114610e57575f80fd5b50565b5f81359050610e6881610e44565b92915050565b5f60208284031215610e8357610e82610a25565b5b5f610e9084828501610e5a565b91505092915050565b5f610ea382610cdc565b9050919050565b610eb381610e99565b8114610ebd575f80fd5b50565b5f81359050610ece81610eaa565b92915050565b5f601f19601f8301169050919050565b7f4e487b71000000000000000000000000000000000000000000000000000000005f52604160045260245ffd5b610f1a82610ed4565b810181811067ffffffffffffffff82111715610f3957610f38610ee4565b5b80604052505050565b5f610f4b610a1c565b9050610f578282610f11565b919050565b5f67ffffffffffffffff821115610f7657610f75610ee4565b5b602082029050602081019050919050565b5f610f99610f9484610f5c565b610f42565b90508083825260208201905060208402830185811115610fbc57610fbb610ae8565b5b835b81811015610fe55780610fd18882610d4a565b845260208401935050602081019050610fbe565b5050509392505050565b5f82601f83011261100357611002610ae0565b5b8135611013848260208601610f87565b91505092915050565b5f806040838503121561103257611031610a25565b5b5f61103f85828601610ec0565b925050602083013567ffffffffffffffff8111156110605761105f610a29565b5b61106c85828601610fef565b915050925092905056fea2646970667358221220f8901ba0ad91db050edba1d0412882eecda8dba26237dd3383d77357c2f7173964736f6c634300081a0033", c = class c extends w {
8
+ constructor() {
9
+ super(...arguments), this.abi = s;
10
+ }
11
+ /**
12
+ * Check if a user is authorized (i.e. not denied)
13
+ *
14
+ * @public
15
+ * @async
16
+ * @param {Address} address - The address of the user
17
+ * @param {?ReadParams<typeof simpleDenyListAbi, 'isAllowed'>} [params]
18
+ * @returns {Promise<boolean>} - True if the user is authorized
19
+ */
20
+ async isAllowed(f, a) {
21
+ return await i(this._config, {
22
+ address: this.assertValidAddress(),
23
+ args: [f, p],
24
+ ...this.optionallyAttachAccount(),
25
+ // biome-ignore lint/suspicious/noExplicitAny: Accept any shape of valid wagmi/viem parameters, wagmi does the same thing internally
26
+ ...a
27
+ });
28
+ }
29
+ /**
30
+ * Set the denied status of a user. The length of the `users_` and `denied_` arrays must be the same. This function can only be called by the owner
31
+ *
32
+ * @public
33
+ * @async
34
+ * @param {Address[]} addresses - The list of users to update
35
+ * @param {boolean[]} allowed - The denied status of each user
36
+ * @param {?WriteParams<typeof simpleDenyListAbi, 'setDenied'>} [params]
37
+ * @returns {unknown}
38
+ */
39
+ async setDenied(f, a, b) {
40
+ return await this.awaitResult(
41
+ this.setDeniedRaw(f, a, b)
42
+ );
43
+ }
44
+ /**
45
+ * Set the denied status of a user. The length of the `users_` and `denied_` arrays must be the same. This function can only be called by the owner
46
+ *
47
+ * @public
48
+ * @async
49
+ * @param {Address[]} addresses - The list of users to update
50
+ * @param {boolean[]} allowed - The denied status of each user
51
+ * @param {?WriteParams<typeof simpleDenyListAbi, 'setDenied'>} [params]
52
+ * @returns {unknown}
53
+ */
54
+ async setDeniedRaw(f, a, b) {
55
+ const { request: e, result: d } = await n(
56
+ this._config,
57
+ {
58
+ address: this.assertValidAddress(),
59
+ args: [f, a],
60
+ ...this.optionallyAttachAccount(),
61
+ // biome-ignore lint/suspicious/noExplicitAny: Accept any shape of valid wagmi/viem parameters, wagmi does the same thing internally
62
+ ...b
63
+ }
64
+ );
65
+ return { hash: await h(this._config, e), result: d };
66
+ }
67
+ /**
68
+ * @inheritdoc
69
+ *
70
+ * @public
71
+ * @param {?SimpleDenyListPayload} [_payload]
72
+ * @param {?DeployableOptions} [_options]
73
+ * @returns {GenericDeployableParams}
74
+ */
75
+ buildParameters(f, a) {
76
+ var d;
77
+ const [b, e] = this.validateDeploymentConfig(
78
+ f,
79
+ a
80
+ );
81
+ if (!b.owner || b.owner === u) {
82
+ const t = e.account ? e.account.address : e.config ? l(e.config).address : (d = this._account) == null ? void 0 : d.address;
83
+ if (t)
84
+ b.owner = t;
85
+ else
86
+ throw new y();
87
+ }
88
+ return {
89
+ abi: s,
90
+ bytecode: g,
91
+ args: [D(b)],
92
+ ...this.optionallyAttachAccount(e.account)
93
+ };
94
+ }
95
+ };
96
+ c.base = "0x7eb4E958D42b64fd1c4Ce947d05a755fCC7C30B7", c.registryType = A.ALLOW_LIST;
97
+ let r = c;
98
+ function D({
99
+ owner: o,
100
+ denied: f
101
+ }) {
102
+ return m(
103
+ [
104
+ { type: "address", name: "owner" },
105
+ { type: "address[]", name: "denied" }
106
+ ],
107
+ [o, f]
108
+ );
109
+ }
110
+ export {
111
+ r as SimpleDenyList,
112
+ D as prepareSimpleDenyListPayload,
113
+ s as simpleDenyListAbi
114
+ };
115
+ //# sourceMappingURL=SimpleDenyList.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"SimpleDenyList.js","sources":["../../src/AllowLists/SimpleDenyList.ts"],"sourcesContent":["import {\n readSimpleDenyListIsAllowed,\n simpleDenyListAbi,\n simulateSimpleDenyListSetDenied,\n writeSimpleDenyListSetDenied,\n} from '@boostxyz/evm';\nimport { bytecode } from '@boostxyz/evm/artifacts/contracts/allowlists/SimpleDenyList.sol/SimpleDenyList.json';\nimport { getAccount } from '@wagmi/core';\nimport {\n type Address,\n type ContractEventName,\n type Hex,\n encodeAbiParameters,\n zeroAddress,\n zeroHash,\n} from 'viem';\nimport type {\n DeployableOptions,\n GenericDeployableParams,\n} from '../Deployable/Deployable';\nimport { DeployableTarget } from '../Deployable/DeployableTarget';\nimport { DeployableUnknownOwnerProvidedError } from '../errors';\nimport {\n type GenericLog,\n type ReadParams,\n RegistryType,\n type WriteParams,\n} from '../utils';\n\nexport { simpleDenyListAbi };\n\n/**\n * Object representation of a {@link SimpleDenyList} initialization payload.\n *\n * @export\n * @interface SimpleDenyListPayload\n * @typedef {SimpleDenyListPayload}\n */\nexport interface SimpleDenyListPayload {\n /**\n * The allow list's owner\n *\n * @type {Address}\n */\n owner: Address;\n /**\n * List of denied addresses.\n *\n * @type {Address[]}\n */\n denied: Address[];\n}\n\n/**\n * A generic `viem.Log` event with support for `SimpleDenyList` event types.\n *\n * @export\n * @typedef {SimpleDenyListLog}\n * @template {ContractEventName<typeof simpleDenyListAbi>} [event=ContractEventName<\n * typeof simpleDenyListAbi\n * >]\n */\nexport type SimpleDenyListLog<\n event extends ContractEventName<typeof simpleDenyListAbi> = ContractEventName<\n typeof simpleDenyListAbi\n >,\n> = GenericLog<typeof simpleDenyListAbi, event>;\n\n/**\n * A simple implementation of an AllowList that implicitly allows all addresses except those explicitly added to the deny list\n *\n * @export\n * @class SimpleDenyList\n * @typedef {SimpleDenyList}\n * @extends {DeployableTarget<SimpleDenyListPayload>}\n */\nexport class SimpleDenyList extends DeployableTarget<\n SimpleDenyListPayload,\n typeof simpleDenyListAbi\n> {\n public override readonly abi = simpleDenyListAbi;\n /**\n * @inheritdoc\n *\n * @public\n * @static\n * @type {Address}\n */\n public static override base: Address = import.meta.env\n .VITE_SIMPLE_DENYLIST_BASE;\n /**\n * @inheritdoc\n *\n * @public\n * @static\n * @type {RegistryType}\n */\n public static override registryType: RegistryType = RegistryType.ALLOW_LIST;\n\n /**\n * Check if a user is authorized (i.e. not denied)\n *\n * @public\n * @async\n * @param {Address} address - The address of the user\n * @param {?ReadParams<typeof simpleDenyListAbi, 'isAllowed'>} [params]\n * @returns {Promise<boolean>} - True if the user is authorized\n */\n public async isAllowed(\n address: Address,\n params?: ReadParams<typeof simpleDenyListAbi, 'isAllowed'>,\n ): Promise<boolean> {\n return await readSimpleDenyListIsAllowed(this._config, {\n address: this.assertValidAddress(),\n args: [address, zeroHash],\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\n /**\n * Set the denied status of a user. The length of the `users_` and `denied_` arrays must be the same. This function can only be called by the owner\n *\n * @public\n * @async\n * @param {Address[]} addresses - The list of users to update\n * @param {boolean[]} allowed - The denied status of each user\n * @param {?WriteParams<typeof simpleDenyListAbi, 'setDenied'>} [params]\n * @returns {unknown}\n */\n public async setDenied(\n addresses: Address[],\n allowed: boolean[],\n params?: WriteParams<typeof simpleDenyListAbi, 'setDenied'>,\n ) {\n return await this.awaitResult(\n this.setDeniedRaw(addresses, allowed, params),\n );\n }\n\n /**\n * Set the denied status of a user. The length of the `users_` and `denied_` arrays must be the same. This function can only be called by the owner\n *\n * @public\n * @async\n * @param {Address[]} addresses - The list of users to update\n * @param {boolean[]} allowed - The denied status of each user\n * @param {?WriteParams<typeof simpleDenyListAbi, 'setDenied'>} [params]\n * @returns {unknown}\n */\n public async setDeniedRaw(\n addresses: Address[],\n allowed: boolean[],\n params?: WriteParams<typeof simpleDenyListAbi, 'setDenied'>,\n ) {\n const { request, result } = await simulateSimpleDenyListSetDenied(\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 writeSimpleDenyListSetDenied(this._config, request);\n return { hash, result };\n }\n\n /**\n * @inheritdoc\n *\n * @public\n * @param {?SimpleDenyListPayload} [_payload]\n * @param {?DeployableOptions} [_options]\n * @returns {GenericDeployableParams}\n */\n public override buildParameters(\n _payload?: SimpleDenyListPayload,\n _options?: DeployableOptions,\n ): GenericDeployableParams {\n const [payload, options] = this.validateDeploymentConfig(\n _payload,\n _options,\n );\n if (!payload.owner || payload.owner === zeroAddress) {\n const owner = options.account\n ? options.account.address\n : options.config\n ? getAccount(options.config).address\n : this._account?.address;\n if (owner) {\n payload.owner = owner;\n } else {\n throw new DeployableUnknownOwnerProvidedError();\n }\n }\n return {\n abi: simpleDenyListAbi,\n bytecode: bytecode as Hex,\n args: [prepareSimpleDenyListPayload(payload)],\n ...this.optionallyAttachAccount(options.account),\n };\n }\n}\n\n/**\n * Given a {@link SimpleDenyListPayload}, properly encode the initialization payload.\n *\n * @param {SimpleDenyListPayload} param0\n * @param {Address} param0.owner - The allow list's owner\n * @param {Address[]} param0.denied - List of denied addresses.\n * @returns {Hex}\n */\nexport function prepareSimpleDenyListPayload({\n owner,\n denied,\n}: SimpleDenyListPayload) {\n return encodeAbiParameters(\n [\n { type: 'address', name: 'owner' },\n { type: 'address[]', name: 'denied' },\n ],\n [owner, denied],\n );\n}\n"],"names":["_SimpleDenyList","DeployableTarget","simpleDenyListAbi","address","params","readSimpleDenyListIsAllowed","zeroHash","addresses","allowed","request","result","simulateSimpleDenyListSetDenied","writeSimpleDenyListSetDenied","_payload","_options","payload","options","zeroAddress","owner","getAccount","_a","DeployableUnknownOwnerProvidedError","bytecode","prepareSimpleDenyListPayload","RegistryType","SimpleDenyList","denied","encodeAbiParameters"],"mappings":";;;;;;kuRA4EaA,IAAN,MAAMA,UAAuBC,EAGlC;AAAA,EAHK,cAAA;AAAA,UAAA,GAAA,SAAA,GAIL,KAAyB,MAAMC;AAAAA,EAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,EA4B/B,MAAa,UACXC,GACAC,GACkB;AACX,WAAA,MAAMC,EAA4B,KAAK,SAAS;AAAA,MACrD,SAAS,KAAK,mBAAmB;AAAA,MACjC,MAAM,CAACF,GAASG,CAAQ;AAAA,MACxB,GAAG,KAAK,wBAAwB;AAAA;AAAA,MAEhC,GAAIF;AAAA,IAAA,CACL;AAAA,EACH;AAAA;AAAA;AAAA;AAAA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AAuB,eAA6BwB,EAAa;AArB5D,IAAMC,IAANzB;AA2IA,SAASuB,EAA6B;AAAA,EAC3C,OAAAL;AAAA,EACA,QAAAQ;AACF,GAA0B;AACjB,SAAAC;AAAA,IACL;AAAA,MACE,EAAE,MAAM,WAAW,MAAM,QAAQ;AAAA,MACjC,EAAE,MAAM,aAAa,MAAM,SAAS;AAAA,IACtC;AAAA,IACA,CAACT,GAAOQ,CAAM;AAAA,EAAA;AAElB;"}
@@ -0,0 +1,2 @@
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const t=require("./PassthroughAuth.cjs");exports.PassthroughAuth=t.PassthroughAuth;
2
+ //# sourceMappingURL=Auth.cjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"Auth.cjs","sources":[],"sourcesContent":[],"names":[],"mappings":""}
@@ -0,0 +1,10 @@
1
+ import { PassthroughAuth } from './PassthroughAuth';
2
+ export { PassthroughAuth };
3
+ /**
4
+ * A union type representing all valid protocol Auth implementations
5
+ *
6
+ * @export
7
+ * @typedef {Auth}
8
+ */
9
+ export type Auth = PassthroughAuth;
10
+ //# sourceMappingURL=Auth.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"Auth.d.ts","sourceRoot":"","sources":["../../src/Auth/Auth.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,eAAe,EAAE,MAAM,mBAAmB,CAAC;AAEpD,OAAO,EAAE,eAAe,EAAE,CAAC;AAE3B;;;;;GAKG;AACH,MAAM,MAAM,IAAI,GAAG,eAAe,CAAC"}
@@ -0,0 +1,5 @@
1
+ import { PassthroughAuth as r } from "./PassthroughAuth.js";
2
+ export {
3
+ r as PassthroughAuth
4
+ };
5
+ //# sourceMappingURL=Auth.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"Auth.js","sources":[],"sourcesContent":[],"names":[],"mappings":";"}
@@ -0,0 +1,2 @@
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const f=require("../generated-wKBNvm48.cjs"),a=require("../Deployable/Deployable.cjs"),s="0x6080604052348015600e575f80fd5b506101598061001c5f395ff3fe608060405234801561000f575f80fd5b5060043610610029575f3560e01c8063fe9fbb801461002d575b5f80fd5b610047600480360381019061004291906100c5565b61005d565b604051610054919061010a565b60405180910390f35b5f60019050919050565b5f80fd5b5f73ffffffffffffffffffffffffffffffffffffffff82169050919050565b5f6100948261006b565b9050919050565b6100a48161008a565b81146100ae575f80fd5b50565b5f813590506100bf8161009b565b92915050565b5f602082840312156100da576100d9610067565b5b5f6100e7848285016100b1565b91505092915050565b5f8115159050919050565b610104816100f0565b82525050565b5f60208201905061011d5f8301846100fb565b9291505056fea2646970667358221220d69fb5c3af806c7aa7833655670f5929f23f7d101298880775d4b9c7c8d0e62f64736f6c634300081a0033";class d extends a.Deployable{constructor(){super(...arguments),this.abi=f.ze}async isAuthorized(b,e){return await f.TA(this._config,{address:this.assertValidAddress(),args:[b],...e})}buildParameters(b,e){const[o,t]=this.validateDeploymentConfig({},e);return{abi:f.ze,bytecode:s,args:[],...this.optionallyAttachAccount(t.account)}}}exports.passthroughAuthAbi=f.ze;exports.PassthroughAuth=d;
2
+ //# sourceMappingURL=PassthroughAuth.cjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"PassthroughAuth.cjs","sources":["../../src/Auth/PassthroughAuth.ts"],"sourcesContent":["import {\n passthroughAuthAbi,\n readPassthroughAuthIsAuthorized,\n} from '@boostxyz/evm';\nimport { bytecode } from '@boostxyz/evm/artifacts/contracts/auth/PassthroughAuth.sol/PassthroughAuth.json';\nimport type { Address, ContractEventName, Hex } from 'viem';\nimport {\n Deployable,\n type DeployableOptions,\n type GenericDeployableParams,\n} from '../Deployable/Deployable';\nimport { DeployableTarget } from '../Deployable/DeployableTarget';\nimport type { GenericLog, ReadParams } from '../utils';\n\nexport { passthroughAuthAbi };\n\n/**\n * A generic `viem.Log` event with support for `PassthroughAuth` event types.\n *\n * @export\n * @typedef {PassthroughAuthLog}\n * @template {ContractEventName<\n * typeof passthroughAuthAbi\n * >} [event=ContractEventName<typeof passthroughAuthAbi>]\n */\nexport type PassthroughAuthLog<\n event extends ContractEventName<\n typeof passthroughAuthAbi\n > = ContractEventName<typeof passthroughAuthAbi>,\n> = GenericLog<typeof passthroughAuthAbi, 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 PassthroughAuth\n * @typedef {PassthroughAuth}\n * @extends {DeployableTarget<PassthroughAuthPayload>}\n */\nexport class PassthroughAuth extends Deployable<\n // biome-ignore lint/suspicious/noExplicitAny: takes no parameters\n any,\n typeof passthroughAuthAbi\n> {\n public override readonly abi = passthroughAuthAbi;\n\n public async isAuthorized(\n address: Address,\n params?: ReadParams<typeof passthroughAuthAbi, 'isAuthorized'>,\n ) {\n return await readPassthroughAuthIsAuthorized(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 * @inheritdoc\n *\n * @public\n * @param {?PassthroughAuthPayload} [_payload]\n * @param {?DeployableOptions} [_options]\n * @returns {GenericDeployableParams}\n */\n public override buildParameters(\n _payload?: never,\n _options?: DeployableOptions,\n ): GenericDeployableParams {\n const [_, options] = this.validateDeploymentConfig({}, _options);\n return {\n abi: passthroughAuthAbi,\n bytecode: bytecode as Hex,\n // biome-ignore lint/suspicious/noExplicitAny: <takes no payload>\n args: [] as any,\n ...this.optionallyAttachAccount(options.account),\n };\n }\n}\n"],"names":["PassthroughAuth","Deployable","passthroughAuthAbi","address","params","readPassthroughAuthIsAuthorized","_payload","_options","_","options","bytecode"],"mappings":"w5BAuCO,MAAMA,UAAwBC,EAAAA,UAInC,CAJK,aAAA,CAAA,MAAA,GAAA,SAAA,EAKL,KAAyB,IAAMC,IAAA,CAE/B,MAAa,aACXC,EACAC,EACA,CACO,OAAA,MAAMC,EAAAA,GAAgC,KAAK,QAAS,CACzD,QAAS,KAAK,mBAAmB,EACjC,KAAM,CAACF,CAAO,EAEd,GAAIC,CAAA,CACL,CACH,CAUgB,gBACdE,EACAC,EACyB,CACnB,KAAA,CAACC,EAAGC,CAAO,EAAI,KAAK,yBAAyB,CAAA,EAAIF,CAAQ,EACxD,MAAA,CACL,IAAKL,EAAA,GACL,SAAAQ,EAEA,KAAM,CAAC,EACP,GAAG,KAAK,wBAAwBD,EAAQ,OAAO,CAAA,CAEnD,CACF"}
@@ -0,0 +1,51 @@
1
+ import { passthroughAuthAbi } from '@boostxyz/evm';
2
+ import type { Address, ContractEventName } from 'viem';
3
+ import { Deployable, type DeployableOptions, type GenericDeployableParams } from '../Deployable/Deployable';
4
+ import type { GenericLog, ReadParams } from '../utils';
5
+ export { passthroughAuthAbi };
6
+ /**
7
+ * A generic `viem.Log` event with support for `PassthroughAuth` event types.
8
+ *
9
+ * @export
10
+ * @typedef {PassthroughAuthLog}
11
+ * @template {ContractEventName<
12
+ * typeof passthroughAuthAbi
13
+ * >} [event=ContractEventName<typeof passthroughAuthAbi>]
14
+ */
15
+ export type PassthroughAuthLog<event extends ContractEventName<typeof passthroughAuthAbi> = ContractEventName<typeof passthroughAuthAbi>> = GenericLog<typeof passthroughAuthAbi, event>;
16
+ /**
17
+ * A simple implementation of a Validator that verifies a given signature and checks the recovered address against a set of authorized signers
18
+ *
19
+ * @export
20
+ * @class PassthroughAuth
21
+ * @typedef {PassthroughAuth}
22
+ * @extends {DeployableTarget<PassthroughAuthPayload>}
23
+ */
24
+ export declare class PassthroughAuth extends Deployable<any, typeof passthroughAuthAbi> {
25
+ readonly abi: readonly [{
26
+ readonly type: "function";
27
+ readonly inputs: readonly [{
28
+ readonly name: "user";
29
+ readonly internalType: "address";
30
+ readonly type: "address";
31
+ }];
32
+ readonly name: "isAuthorized";
33
+ readonly outputs: readonly [{
34
+ readonly name: "";
35
+ readonly internalType: "bool";
36
+ readonly type: "bool";
37
+ }];
38
+ readonly stateMutability: "view";
39
+ }];
40
+ isAuthorized(address: Address, params?: ReadParams<typeof passthroughAuthAbi, 'isAuthorized'>): Promise<boolean>;
41
+ /**
42
+ * @inheritdoc
43
+ *
44
+ * @public
45
+ * @param {?PassthroughAuthPayload} [_payload]
46
+ * @param {?DeployableOptions} [_options]
47
+ * @returns {GenericDeployableParams}
48
+ */
49
+ buildParameters(_payload?: never, _options?: DeployableOptions): GenericDeployableParams;
50
+ }
51
+ //# sourceMappingURL=PassthroughAuth.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"PassthroughAuth.d.ts","sourceRoot":"","sources":["../../src/Auth/PassthroughAuth.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,kBAAkB,EAEnB,MAAM,eAAe,CAAC;AAEvB,OAAO,KAAK,EAAE,OAAO,EAAE,iBAAiB,EAAO,MAAM,MAAM,CAAC;AAC5D,OAAO,EACL,UAAU,EACV,KAAK,iBAAiB,EACtB,KAAK,uBAAuB,EAC7B,MAAM,0BAA0B,CAAC;AAElC,OAAO,KAAK,EAAE,UAAU,EAAE,UAAU,EAAE,MAAM,UAAU,CAAC;AAEvD,OAAO,EAAE,kBAAkB,EAAE,CAAC;AAE9B;;;;;;;;GAQG;AACH,MAAM,MAAM,kBAAkB,CAC5B,KAAK,SAAS,iBAAiB,CAC7B,OAAO,kBAAkB,CAC1B,GAAG,iBAAiB,CAAC,OAAO,kBAAkB,CAAC,IAC9C,UAAU,CAAC,OAAO,kBAAkB,EAAE,KAAK,CAAC,CAAC;AAEjD;;;;;;;GAOG;AACH,qBAAa,eAAgB,SAAQ,UAAU,CAE7C,GAAG,EACH,OAAO,kBAAkB,CAC1B;IACC,SAAyB,GAAG;;;;;;;;;;;;;;OAAsB;IAErC,YAAY,CACvB,OAAO,EAAE,OAAO,EAChB,MAAM,CAAC,EAAE,UAAU,CAAC,OAAO,kBAAkB,EAAE,cAAc,CAAC;IAUhE;;;;;;;OAOG;IACa,eAAe,CAC7B,QAAQ,CAAC,EAAE,KAAK,EAChB,QAAQ,CAAC,EAAE,iBAAiB,GAC3B,uBAAuB;CAU3B"}
@@ -0,0 +1,39 @@
1
+ import { z as a, j as s } from "../generated-BDeDiaCK.js";
2
+ import { Deployable as e } from "../Deployable/Deployable.js";
3
+ const d = "0x6080604052348015600e575f80fd5b506101598061001c5f395ff3fe608060405234801561000f575f80fd5b5060043610610029575f3560e01c8063fe9fbb801461002d575b5f80fd5b610047600480360381019061004291906100c5565b61005d565b604051610054919061010a565b60405180910390f35b5f60019050919050565b5f80fd5b5f73ffffffffffffffffffffffffffffffffffffffff82169050919050565b5f6100948261006b565b9050919050565b6100a48161008a565b81146100ae575f80fd5b50565b5f813590506100bf8161009b565b92915050565b5f602082840312156100da576100d9610067565b5b5f6100e7848285016100b1565b91505092915050565b5f8115159050919050565b610104816100f0565b82525050565b5f60208201905061011d5f8301846100fb565b9291505056fea2646970667358221220d69fb5c3af806c7aa7833655670f5929f23f7d101298880775d4b9c7c8d0e62f64736f6c634300081a0033";
4
+ class n extends e {
5
+ constructor() {
6
+ super(...arguments), this.abi = a;
7
+ }
8
+ async isAuthorized(b, f) {
9
+ return await s(this._config, {
10
+ address: this.assertValidAddress(),
11
+ args: [b],
12
+ // biome-ignore lint/suspicious/noExplicitAny: Accept any shape of valid wagmi/viem parameters, wagmi does the same thing internally
13
+ ...f
14
+ });
15
+ }
16
+ /**
17
+ * @inheritdoc
18
+ *
19
+ * @public
20
+ * @param {?PassthroughAuthPayload} [_payload]
21
+ * @param {?DeployableOptions} [_options]
22
+ * @returns {GenericDeployableParams}
23
+ */
24
+ buildParameters(b, f) {
25
+ const [r, t] = this.validateDeploymentConfig({}, f);
26
+ return {
27
+ abi: a,
28
+ bytecode: d,
29
+ // biome-ignore lint/suspicious/noExplicitAny: <takes no payload>
30
+ args: [],
31
+ ...this.optionallyAttachAccount(t.account)
32
+ };
33
+ }
34
+ }
35
+ export {
36
+ n as PassthroughAuth,
37
+ a as passthroughAuthAbi
38
+ };
39
+ //# sourceMappingURL=PassthroughAuth.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"PassthroughAuth.js","sources":["../../src/Auth/PassthroughAuth.ts"],"sourcesContent":["import {\n passthroughAuthAbi,\n readPassthroughAuthIsAuthorized,\n} from '@boostxyz/evm';\nimport { bytecode } from '@boostxyz/evm/artifacts/contracts/auth/PassthroughAuth.sol/PassthroughAuth.json';\nimport type { Address, ContractEventName, Hex } from 'viem';\nimport {\n Deployable,\n type DeployableOptions,\n type GenericDeployableParams,\n} from '../Deployable/Deployable';\nimport { DeployableTarget } from '../Deployable/DeployableTarget';\nimport type { GenericLog, ReadParams } from '../utils';\n\nexport { passthroughAuthAbi };\n\n/**\n * A generic `viem.Log` event with support for `PassthroughAuth` event types.\n *\n * @export\n * @typedef {PassthroughAuthLog}\n * @template {ContractEventName<\n * typeof passthroughAuthAbi\n * >} [event=ContractEventName<typeof passthroughAuthAbi>]\n */\nexport type PassthroughAuthLog<\n event extends ContractEventName<\n typeof passthroughAuthAbi\n > = ContractEventName<typeof passthroughAuthAbi>,\n> = GenericLog<typeof passthroughAuthAbi, 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 PassthroughAuth\n * @typedef {PassthroughAuth}\n * @extends {DeployableTarget<PassthroughAuthPayload>}\n */\nexport class PassthroughAuth extends Deployable<\n // biome-ignore lint/suspicious/noExplicitAny: takes no parameters\n any,\n typeof passthroughAuthAbi\n> {\n public override readonly abi = passthroughAuthAbi;\n\n public async isAuthorized(\n address: Address,\n params?: ReadParams<typeof passthroughAuthAbi, 'isAuthorized'>,\n ) {\n return await readPassthroughAuthIsAuthorized(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 * @inheritdoc\n *\n * @public\n * @param {?PassthroughAuthPayload} [_payload]\n * @param {?DeployableOptions} [_options]\n * @returns {GenericDeployableParams}\n */\n public override buildParameters(\n _payload?: never,\n _options?: DeployableOptions,\n ): GenericDeployableParams {\n const [_, options] = this.validateDeploymentConfig({}, _options);\n return {\n abi: passthroughAuthAbi,\n bytecode: bytecode as Hex,\n // biome-ignore lint/suspicious/noExplicitAny: <takes no payload>\n args: [] as any,\n ...this.optionallyAttachAccount(options.account),\n };\n }\n}\n"],"names":["PassthroughAuth","Deployable","passthroughAuthAbi","address","params","readPassthroughAuthIsAuthorized","_payload","_options","_","options","bytecode"],"mappings":";;;AAuCO,MAAMA,UAAwBC,EAInC;AAAA,EAJK,cAAA;AAAA,UAAA,GAAA,SAAA,GAKL,KAAyB,MAAMC;AAAAA,EAAA;AAAA,EAE/B,MAAa,aACXC,GACAC,GACA;AACO,WAAA,MAAMC,EAAgC,KAAK,SAAS;AAAA,MACzD,SAAS,KAAK,mBAAmB;AAAA,MACjC,MAAM,CAACF,CAAO;AAAA;AAAA,MAEd,GAAIC;AAAA,IAAA,CACL;AAAA,EACH;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,EAUgB,gBACdE,GACAC,GACyB;AACnB,UAAA,CAACC,GAAGC,CAAO,IAAI,KAAK,yBAAyB,CAAA,GAAIF,CAAQ;AACxD,WAAA;AAAA,MACL,KAAKL;AAAAA,MACL,UAAAQ;AAAA;AAAA,MAEA,MAAM,CAAC;AAAA,MACP,GAAG,KAAK,wBAAwBD,EAAQ,OAAO;AAAA,IAAA;AAAA,EAEnD;AACF;"}
package/dist/Boost.cjs ADDED
@@ -0,0 +1,2 @@
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const P=require("viem");var O=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{},E={exports:{}};(function(h,l){(function(m,w){h.exports=w(m,1),l.LibZip=h.exports.LibZip,l.ERC1967Factory=h.exports.ERC1967Factory})(typeof window<"u"?window:O,function(m,w){var y={},c={};y.LibZip=c;function b(t){if((typeof t=="string"||t instanceof String)&&(t=t.match(/^[\s\uFEFF\xA0]*(0[Xx])?([0-9A-Fa-f]*)[\s\uFEFF\xA0]*$/))){if(t[2].length%2)throw new Error("Hex string length must be a multiple of 2.");return t[2]}throw new Error("Data must be a hex string.")}function x(t){return(t|256).toString(16).slice(1)}function g(t,r){return parseInt(t.substr(r,2),16)}function S(t){for(var r=[],e=0;e<t.length;e+=2)r.push(g(t,e));return r}function L(t){for(var r="0x",e=0;e<t.length;r+=x(t[e++]));return r}c.flzCompress=function(t){var r=S(b(t)),e=r.length-4,n=[],i=[],a=0,o=2,s=0,f,v,z,p,Z,u,F,j,T,B;function A(d){return r[d]|r[++d]<<8|r[++d]<<16}function D(d){return 2654435769*d>>19&8191}function R(d,H){for(;d>=32;)for(i[s++]=31,f=32;f--;d--)i[s++]=r[H++];if(d)for(i[s++]=d-1;d--;)i[s++]=r[H++]}for(;o<e-9;){do F=n[z=D(v=A(o))]||0,Z=(p=(n[z]=o)-F)<8192?A(F):16777216;while(o<e-9&&o++&&v!=Z);if(o>=e-9)break;for(--o>a&&R(o-a,a),u=0,j=F+3,T=o+3,B=e-T;u<B;u++)B*=r[j+u]===r[T+u];for(o+=u,--p;u>262;u-=262)i[s++]=224+(p>>8),i[s++]=253,i[s++]=p&255;u<7?(i[s++]=(u<<5)+(p>>8),i[s++]=p&255):(i[s++]=224+(p>>8),i[s++]=u-7,i[s++]=p&255),n[D(A(o))]=o++,n[D(A(o))]=o++,a=o}return R(e+4-a,a),L(i)},c.flzDecompress=function(t){for(var r=S(b(t)),e=0,n=0,i,a,o,s,f=[];e<r.length;)if(o=r[e]>>5)for(a=256*(r[e]&31)+r[e+2-(o=o<7)],i=o?2+(r[e]>>5):9+r[e+1],e=e+3-o,s=n-a-1;i--;)f[n++]=f[s++];else for(i=1+r[e++];i--;)f[n++]=r[e++];return L(f)},c.cdCompress=function(t){t=b(t);var r="0x",e=0,n=0,i=0,a;function o(f){r+=x((r.length<4*2+2)*255^f)}function s(f,v){o(0),o(v-1+f*128)}for(;i<t.length;i+=2){if(a=g(t,i),!a){n&&(s(1,n),n=0),++e===128&&(s(0,128),e=0);continue}if(a===255){e&&(s(0,e),e=0),++n===32&&(s(1,32),n=0);continue}n&&(s(1,n),n=0),e&&(s(0,e),e=0),o(a)}return n&&(s(1,n),n=0),e&&(s(0,e),e=0),r},c.cdDecompress=function(t){t=b(t);for(var r="0x",e=0,n,i,a;e<t.length;){if(i=(e<4*2)*255^g(t,e),e+=2,!i){for(i=(e<4*2)*255^g(t,e),a=(i&127)+1,e+=2,n=0;n<a;++n)r+=x((i>>7&&n<32)*255);continue}r+=x(i)}return r};var C={};return y.ERC1967Factory=C,C.address="0x0000000000006396FF2a80c067f99B3d2Ab4Df24",C.abi=JSON.parse('[{0:[],1:"DeploymentFailed"96"SaltDoesNotStartWithCaller"96"Unauthorized"96"UpgradeFailed",2:3959790,9791],1:"AdminChanged",2:10959790,9792,9791],1:"Deployed",2:10959790,9792],1:"Upgraded",2:10},{0:[{90],1:"adminOf",12:[{9199{0:[{90,{91],1:"changeAdmin",12:[],13:"nonpayable",2:15},{0:[{92,{91],1:"deploy",12:[{9098,{0:[{92,{91,{94],1:"deployAndCall",12:[{9098,{0:[{92,{91,{93],1:"deployDeterministic",12:[{9098,{0:[{92,{91,{93,{94],1:"deployDeterministicAndCall",12:[{9098,{0:[],1:"initCodeHash",12:[{6:19,1:"result",2:19}99{0:[{93],1:"predictDeterministicAddress",12:[{6:7,1:"predicted",2:7}99{0:[{90,{92],1:"upgrade",12:[98,{0:[{90,{92,{94],1:"upgradeAndCall",12:[98]'.replace(/9\d/g,function(t){return["6:7,1:8,2:7}","6:7,1:9,2:7}","6:7,1:11,2:7}","6:19,1:20,2:19}","6:17,1:18,2:17}","},{4:false,0:[",",2:3},{0:[],1:","{5:true,","],13:16,2:15}","],13:14,2:15},"][t-90]}).replace(/\d+/g,function(t){return'"'+"inputs,name,type,error,anonymous,indexed,internalType,address,proxy,admin,event,implementation,outputs,stateMutability,view,function,payable,bytes,data,bytes32,salt".split(",")[t]+'"'})),w||(m.solady=y),y})})(E,E.exports);var U=E.exports;class q{constructor(l){this.id=l.id,this.budget=l.budget,this.action=l.action,this.validator=l.validator,this.allowList=l.allowList,this.incentives=l.incentives,this.protocolFee=l.protocolFee||0n,this.referralFee=l.referralFee||0n,this.maxParticipants=l.maxParticipants||0n,this.owner=l.owner||P.zeroAddress}}function M({budget:h,action:l,validator:m,allowList:w,incentives:y,protocolFee:c=0n,referralFee:b=0n,maxParticipants:x=0n,owner:g}){return U.LibZip.cdCompress(P.encodeAbiParameters(P.parseAbiParameters(["BoostPayload payload","struct BoostPayload { address budget; Target action; Target validator; Target allowList; Target[] incentives; uint64 protocolFee; uint64 referralFee; uint256 maxParticipants; address owner; }","struct Target { bool isBase; address instance; bytes parameters; }"]),[{budget:h,action:l,validator:m,allowList:w,incentives:y,protocolFee:c,referralFee:b,maxParticipants:x,owner:g}]))}exports.Boost=q;exports.prepareBoostPayload=M;
2
+ //# sourceMappingURL=Boost.cjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"Boost.cjs","sources":["../../../node_modules/.pnpm/solady@0.0.208/node_modules/solady/js/solady.js","../src/Boost.ts"],"sourcesContent":["/**\n * Accompanying JavaScript library for Solady.\n *\n * To install:\n * \n * ```\n * npm install solady\n * ```\n *\n * Module exports:\n * \n * - `LibZip`\n * - `flzCompress(data)`: Compresses hex encoded data with FastLZ.\n * - `flzDecompress(data)`: Decompresses hex encoded data with FastLZ.\n * - `cdCompress(data)`: Compresses hex encoded calldata.\n * - `cdDecompress(data)`: Decompresses hex encoded calldata.\n * \n * - `ERC1967Factory`\n * - `address`: Canonical address of Solady's ERC1967Factory.\n * - `abi`: ABI of Solady's ERC1967Factory.\n *\n * @module solady\n */\n(function(global, factory) {\n\n \"use strict\";\n\n if (typeof module === \"object\" && typeof module.exports === \"object\") {\n module.exports = factory(global, 1);\n if (typeof exports === \"object\") {\n exports.LibZip = module.exports.LibZip;\n exports.ERC1967Factory = module.exports.ERC1967Factory;\n }\n } else {\n factory(global);\n }\n\n})(typeof window !== \"undefined\" ? window : this, function(window, noGlobal) {\n\n \"use strict\";\n\n var solady = {};\n\n /*============================================================*/\n /* LibZip Operations */\n /*============================================================*/\n\n // See: https://github.com/vectorized/solady/blob/main/src/utils/LibZip.sol\n\n /**\n * FastLZ and calldata compression / decompression functions.\n * @namespace\n * @alias module:solady.LibZip\n */\n var LibZip = {};\n\n solady.LibZip = LibZip;\n\n function hexString(data) {\n if (typeof data === \"string\" || data instanceof String) {\n if (data = data.match(/^[\\s\\uFEFF\\xA0]*(0[Xx])?([0-9A-Fa-f]*)[\\s\\uFEFF\\xA0]*$/)) {\n if (data[2].length % 2) {\n throw new Error(\"Hex string length must be a multiple of 2.\");\n }\n return data[2];\n }\n }\n throw new Error(\"Data must be a hex string.\");\n }\n\n function byteToString(b) {\n return (b | 0x100).toString(16).slice(1);\n }\n\n function parseByte(data, i) {\n return parseInt(data.substr(i, 2), 16);\n }\n\n function hexToBytes(data) {\n var a = [], i = 0;\n for (; i < data.length; i += 2) a.push(parseByte(data, i));\n return a;\n }\n\n function bytesToHex(a) {\n var o = \"0x\", i = 0;\n for (; i < a.length; o += byteToString(a[i++])) ;\n return o;\n }\n\n /**\n * Compresses hex encoded data with the FastLZ LZ77 algorithm.\n * @param {string} data A hex encoded string representing the original data.\n * @returns {string} The compressed result as a hex encoded string.\n */\n LibZip.flzCompress = function(data) {\n var ib = hexToBytes(hexString(data)), b = ib.length - 4;\n var ht = [], ob = [], a = 0, i = 2, o = 0, j, s, h, d, c, l, r, p, q, e;\n\n function u24(i) {\n return ib[i] | (ib[++i] << 8) | (ib[++i] << 16);\n }\n\n function hash(x) {\n return ((2654435769 * x) >> 19) & 8191;\n }\n\n function literals(r, s) {\n while (r >= 32) for (ob[o++] = 31, j = 32; j--; r--) ob[o++] = ib[s++];\n if (r) for (ob[o++] = r - 1; r--; ) ob[o++] = ib[s++];\n }\n\n while (i < b - 9) {\n do {\n r = ht[h = hash(s = u24(i))] || 0;\n c = (d = (ht[h] = i) - r) < 8192 ? u24(r) : 0x1000000;\n } while (i < b - 9 && i++ && s != c);\n if (i >= b - 9) break;\n if (--i > a) literals(i - a, a);\n for (l = 0, p = r + 3, q = i + 3, e = b - q; l < e; l++) e *= ib[p + l] === ib[q + l];\n i += l;\n for (--d; l > 262; l -= 262) ob[o++] = 224 + (d >> 8), ob[o++] = 253, ob[o++] = d & 255;\n if (l < 7) ob[o++] = (l << 5) + (d >> 8), ob[o++] = d & 255;\n else ob[o++] = 224 + (d >> 8), ob[o++] = l - 7, ob[o++] = d & 255;\n ht[hash(u24(i))] = i++, ht[hash(u24(i))] = i++, a = i;\n }\n literals(b + 4 - a, a);\n return bytesToHex(ob);\n }\n\n /**\n * Decompresses hex encoded data with the FastLZ LZ77 algorithm.\n * @param {string} data A hex encoded string representing the compressed data.\n * @returns {string} The decompressed result as a hex encoded string.\n */\n LibZip.flzDecompress = function(data) {\n var ib = hexToBytes(hexString(data)), i = 0, o = 0, l, f, t, r, h, ob = [];\n while (i < ib.length) {\n if (!(t = ib[i] >> 5)) {\n for (l = 1 + ib[i++]; l--;) ob[o++] = ib[i++];\n } else {\n f = 256 * (ib[i] & 31) + ib[i + 2 - (t = t < 7)];\n l = t ? 2 + (ib[i] >> 5) : 9 + ib[i + 1];\n i = i + 3 - t;\n r = o - f - 1;\n while (l--) ob[o++] = ob[r++];\n }\n }\n return bytesToHex(ob);\n }\n\n /**\n * Compresses hex encoded calldata.\n * @param {string} data A hex encoded string representing the original data.\n * @returns {string} The compressed result as a hex encoded string.\n */\n LibZip.cdCompress = function(data) {\n data = hexString(data);\n var o = \"0x\", z = 0, y = 0, i = 0, c;\n\n function pushByte(b) {\n o += byteToString(((o.length < 4 * 2 + 2) * 0xff) ^ b);\n }\n\n function rle(v, d) {\n pushByte(0x00);\n pushByte(d - 1 + v * 0x80);\n }\n\n for (; i < data.length; i += 2) {\n c = parseByte(data, i);\n if (!c) {\n if (y) rle(1, y), y = 0;\n if (++z === 0x80) rle(0, 0x80), z = 0;\n continue;\n }\n if (c === 0xff) {\n if (z) rle(0, z), z = 0;\n if (++y === 0x20) rle(1, 0x20), y = 0;\n continue;\n }\n if (y) rle(1, y), y = 0;\n if (z) rle(0, z), z = 0;\n pushByte(c);\n }\n if (y) rle(1, y), y = 0;\n if (z) rle(0, z), z = 0;\n return o;\n }\n\n /**\n * Decompresses hex encoded calldata.\n * @param {string} data A hex encoded string representing the compressed data.\n * @returns {string} The decompressed result as a hex encoded string.\n */\n LibZip.cdDecompress = function(data) {\n data = hexString(data);\n var o = \"0x\", i = 0, j, c, s;\n\n while (i < data.length) {\n c = ((i < 4 * 2) * 0xff) ^ parseByte(data, i);\n i += 2;\n if (!c) {\n c = ((i < 4 * 2) * 0xff) ^ parseByte(data, i);\n s = (c & 0x7f) + 1;\n i += 2;\n for (j = 0; j < s; ++j) o += byteToString((c >> 7 && j < 32) * 0xff);\n continue;\n }\n o += byteToString(c);\n }\n return o;\n }\n\n /*============================================================*/\n /* ERC1967Factory */\n /*============================================================*/\n\n // See: https://github.com/vectorized/solady/blob/main/src/utils/ERC1967Factory.sol\n\n /**\n * ERC1967Factory canonical address and ABI.\n * @namespace\n * @alias module:solady.ERC1967Factory\n */\n var ERC1967Factory = {};\n\n solady.ERC1967Factory = ERC1967Factory;\n\n /**\n * Canonical address of Solady's ERC1967Factory.\n * @type {string}\n */\n ERC1967Factory.address = \"0x0000000000006396FF2a80c067f99B3d2Ab4Df24\";\n\n /**\n * ABI of Solady's ERC1967Factory.\n * @type {Object}\n */\n ERC1967Factory.abi = JSON.parse('[{0:[],1:\"DeploymentFailed\"96\"SaltDoesNotStartWithCaller\"96\"Unauthorized\"96\"UpgradeFailed\",2:3959790,9791],1:\"AdminChanged\",2:10959790,9792,9791],1:\"Deployed\",2:10959790,9792],1:\"Upgraded\",2:10},{0:[{90],1:\"adminOf\",12:[{9199{0:[{90,{91],1:\"changeAdmin\",12:[],13:\"nonpayable\",2:15},{0:[{92,{91],1:\"deploy\",12:[{9098,{0:[{92,{91,{94],1:\"deployAndCall\",12:[{9098,{0:[{92,{91,{93],1:\"deployDeterministic\",12:[{9098,{0:[{92,{91,{93,{94],1:\"deployDeterministicAndCall\",12:[{9098,{0:[],1:\"initCodeHash\",12:[{6:19,1:\"result\",2:19}99{0:[{93],1:\"predictDeterministicAddress\",12:[{6:7,1:\"predicted\",2:7}99{0:[{90,{92],1:\"upgrade\",12:[98,{0:[{90,{92,{94],1:\"upgradeAndCall\",12:[98]'.replace(/9\\d/g, function (m) { return [\"6:7,1:8,2:7}\",\"6:7,1:9,2:7}\",\"6:7,1:11,2:7}\",\"6:19,1:20,2:19}\",\"6:17,1:18,2:17}\",\"},{4:false,0:[\",\",2:3},{0:[],1:\",\"{5:true,\",\"],13:16,2:15}\",\"],13:14,2:15},\"][m-90] }).replace(/\\d+/g, function (m) { return '\"' + (\"inputs,name,type,error,anonymous,indexed,internalType,address,proxy,admin,event,implementation,outputs,stateMutability,view,function,payable,bytes,data,bytes32,salt\".split(\",\")[m]) + '\"' }));\n\n /*--------------------------- END ----------------------------*/\n\n if (typeof define === \"function\" && define.amd) {\n define(\"solady\", [], function() {\n return solady\n });\n }\n\n if (!noGlobal) {\n window.solady = solady;\n }\n\n return solady;\n});\n","import { LibZip } from 'solady';\nimport {\n type Address,\n type Hex,\n encodeAbiParameters,\n parseAbiParameters,\n zeroAddress,\n} from 'viem';\nimport type { Action } from './Actions/Action';\nimport type { AllowList } from './AllowLists/AllowList';\nimport type { Budget } from './Budgets/Budget';\nimport type { Incentive } from './Incentives/Incentive';\nimport type { Validator } from './Validators/Validator';\n\n/**\n * Configuration used to instantiate a `Boost` instance.\n *\n * @export\n * @interface BoostPayload\n * @typedef {BoostPayload}\n */\nexport interface BoostConfig {\n /**\n *\n * @type {bigint}\n */\n id: bigint;\n /**\n *\n * @type {Budget}\n */\n budget: Budget;\n /**\n *\n * @type {Action}\n */\n action: Action;\n /**\n *\n * @type {Validator}\n */\n validator: Validator;\n /**\n *\n * @type {AllowList}\n */\n allowList: AllowList;\n /**\n *\n * @type {Array<Incentive>}\n */\n incentives: Array<Incentive>;\n /**\n *\n * @type {?bigint}\n */\n protocolFee?: bigint;\n /**\n *\n * @type {?bigint}\n */\n referralFee?: bigint;\n /**\n *\n * @type {?bigint}\n */\n maxParticipants?: bigint;\n /**\n *\n * @type {?Address}\n */\n owner?: Address;\n}\n\n/**\n * A struct representing a single Boost. Typically you would not construct this directly, rather get an instance from `BoostCore.createBoost` or `BoostCore.getBoost`\n *\n * @export\n * @class Boost\n * @typedef {Boost}\n */\nexport class Boost {\n /**\n *\n * @readonly\n * @type {bigint}\n */\n readonly id: bigint;\n /**\n *\n * @readonly\n * @type {Budget}\n */\n readonly budget: Budget;\n /**\n *\n * @readonly\n * @type {Action}\n */\n readonly action: Action;\n /**\n *\n * @readonly\n * @type {Validator}\n */\n readonly validator: Validator;\n /**\n *\n * @readonly\n * @type {AllowList}\n */\n readonly allowList: AllowList;\n /**\n *\n * @readonly\n * @type {Array<Incentive>}\n */\n readonly incentives: Array<Incentive>;\n /**\n *\n * @readonly\n * @type {bigint}\n */\n readonly protocolFee: bigint;\n /**\n *\n * @readonly\n * @type {bigint}\n */\n readonly referralFee: bigint;\n /**\n *\n * @readonly\n * @type {bigint}\n */\n readonly maxParticipants: bigint;\n /**\n *\n * @readonly\n * @type {Address}\n */\n readonly owner: Address;\n\n /**\n * Creates an instance of Boost.\n *\n * @constructor\n * @param {BoostConfig} config\n */\n constructor(config: BoostConfig) {\n this.id = config.id;\n this.budget = config.budget;\n this.action = config.action;\n this.validator = config.validator;\n this.allowList = config.allowList;\n this.incentives = config.incentives;\n this.protocolFee = config.protocolFee || 0n;\n this.referralFee = config.referralFee || 0n;\n this.maxParticipants = config.maxParticipants || 0n;\n this.owner = config.owner || zeroAddress;\n }\n}\n\n/**\n * Object representation of `BoostLib.Target` struct. Used for low level Boost creation operations.\n * This is used to pass the base contract and its initialization parameters in an efficient manner\n *\n * @export\n * @typedef {Target}\n */\nexport type Target = {\n isBase: boolean;\n instance: Address;\n parameters: Hex;\n};\n\n/**\n * Object representation of `BoostCore.InitPayload` struct.\n *\n * @export\n * @interface BoostPayload\n * @typedef {BoostPayload}\n */\nexport interface BoostPayload {\n /**\n * Address to valid budget.\n *\n * @type {Address}\n */\n budget: Address;\n /**\n * Target for existing action, or base with initialization payload.\n *\n * @type {Target}\n */\n action: Target;\n /**\n * Target for existing validator, or base with initialization payload.\n *\n * @type {Target}\n */\n validator: Target;\n /**\n * Target for existing allowList, or base with initialization payload.\n *\n * @type {Target}\n */\n allowList: Target;\n /**\n * Targets for new incentives, with initialization payloads.\n *\n * @type {Target[]}\n */\n incentives: Target[];\n /**\n * The base protocol fee (in bps)\n *\n * @type {?bigint}\n */\n protocolFee?: bigint;\n /**\n * The base referral fee (in bps)\n *\n * @type {?bigint}\n */\n referralFee?: bigint;\n /**\n * Optional maximum amount of participants in the Boost.\n *\n * @type {?bigint}\n */\n maxParticipants?: bigint;\n /**\n * The owner of the Boost.\n *\n * @type {Address}\n */\n owner: Address;\n}\n\n/**\n * Given a valid {@link BoostPayload}, properly encode and compress the payload for use with `createBoost`\n *\n * @export\n * @param {BoostPayload} param0\n * @param {Address} param0.budget - Address to valid budget.\n * @param {Target} param0.action - Target for existing action, or base with initialization payload.\n * @param {Target} param0.validator - Target for existing validator, or base with initialization payload.\n * @param {Target} param0.allowList - Target for existing allowList, or base with initialization payload.\n * @param {Target[]} param0.incentives - Targets for new incentives, with initialization payloads.\n * @param {bigint} [param0.protocolFee=0n] - The base protocol fee (in bps)\n * @param {bigint} [param0.referralFee=0n] - The base referral fee (in bps)\n * @param {bigint} [param0.maxParticipants=0n] - Optional maximum amount of participants in the Boost.\n * @param {Address} param0.owner - The owner of the Boost.\n * @returns {Hex}\n */\nexport function prepareBoostPayload({\n budget,\n action,\n validator,\n allowList,\n incentives,\n protocolFee = 0n,\n referralFee = 0n,\n maxParticipants = 0n,\n owner,\n}: BoostPayload): Hex {\n return LibZip.cdCompress(\n encodeAbiParameters(\n parseAbiParameters([\n 'BoostPayload payload',\n 'struct BoostPayload { address budget; Target action; Target validator; Target allowList; Target[] incentives; uint64 protocolFee; uint64 referralFee; uint256 maxParticipants; address owner; }',\n 'struct Target { bool isBase; address instance; bytes parameters; }',\n ]),\n [\n {\n budget,\n action,\n validator,\n allowList,\n incentives,\n protocolFee,\n referralFee,\n maxParticipants,\n owner,\n },\n ],\n ),\n ) as Hex;\n}\n"],"names":["global","factory","module","exports","this","window","noGlobal","solady","LibZip","hexString","data","byteToString","b","parseByte","i","hexToBytes","a","bytesToHex","o","ib","ht","ob","j","s","h","d","c","l","r","p","q","e","u24","hash","x","literals","f","t","z","y","pushByte","rle","v","ERC1967Factory","m","Boost","config","zeroAddress","prepareBoostPayload","budget","action","validator","allowList","incentives","protocolFee","referralFee","maxParticipants","owner","encodeAbiParameters","parseAbiParameters"],"mappings":"wPAuBC,SAASA,EAAQC,EAAS,CAKnBC,UAAiBD,EAAQD,EAAQ,CAAC,EAE9BG,SAAiBD,EAAO,QAAQ,OAChCC,iBAAyBD,EAAO,QAAQ,cAMpD,GAAG,OAAO,OAAW,IAAc,OAASE,EAAM,SAASC,EAAQC,EAAU,CAIzE,IAAIC,EAAS,CAAA,EAaTC,EAAS,CAAA,EAEbD,EAAO,OAASC,EAEhB,SAASC,EAAUC,EAAM,CACrB,IAAI,OAAOA,GAAS,UAAYA,aAAgB,UACxCA,EAAOA,EAAK,MAAM,wDAAwD,GAAG,CAC7E,GAAIA,EAAK,CAAC,EAAE,OAAS,EACjB,MAAM,IAAI,MAAM,4CAA4C,EAEhE,OAAOA,EAAK,CAAC,CAChB,CAEL,MAAM,IAAI,MAAM,4BAA4B,CAC/C,CAED,SAASC,EAAaC,EAAG,CACrB,OAAQA,EAAI,KAAO,SAAS,EAAE,EAAE,MAAM,CAAC,CAC1C,CAED,SAASC,EAAUH,EAAMI,EAAG,CACxB,OAAO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,SAASC,EAAoB,CAClC,OAAAC,EACA,OAAAC,EACA,UAAAC,EACA,UAAAC,EACA,WAAAC,EACA,YAAAC,EAAc,GACd,YAAAC,EAAc,GACd,gBAAAC,EAAkB,GAClB,MAAAC,CACF,EAAsB,CACpB,OAAOjD,EAAO,OAAA,WACZkD,EAAA,oBACEC,qBAAmB,CACjB,uBACA,kMACA,oEAAA,CACD,EACD,CACE,CACE,OAAAV,EACA,OAAAC,EACA,UAAAC,EACA,UAAAC,EACA,WAAAC,EACA,YAAAC,EACA,YAAAC,EACA,gBAAAC,EACA,MAAAC,CACF,CACF,CACF,CAAA,CAEJ","x_google_ignoreList":[0]}
@@ -0,0 +1,234 @@
1
+ import { type Address, type Hex } from 'viem';
2
+ import type { Action } from './Actions/Action';
3
+ import type { AllowList } from './AllowLists/AllowList';
4
+ import type { Budget } from './Budgets/Budget';
5
+ import type { Incentive } from './Incentives/Incentive';
6
+ import type { Validator } from './Validators/Validator';
7
+ /**
8
+ * Configuration used to instantiate a `Boost` instance.
9
+ *
10
+ * @export
11
+ * @interface BoostPayload
12
+ * @typedef {BoostPayload}
13
+ */
14
+ export interface BoostConfig {
15
+ /**
16
+ *
17
+ * @type {bigint}
18
+ */
19
+ id: bigint;
20
+ /**
21
+ *
22
+ * @type {Budget}
23
+ */
24
+ budget: Budget;
25
+ /**
26
+ *
27
+ * @type {Action}
28
+ */
29
+ action: Action;
30
+ /**
31
+ *
32
+ * @type {Validator}
33
+ */
34
+ validator: Validator;
35
+ /**
36
+ *
37
+ * @type {AllowList}
38
+ */
39
+ allowList: AllowList;
40
+ /**
41
+ *
42
+ * @type {Array<Incentive>}
43
+ */
44
+ incentives: Array<Incentive>;
45
+ /**
46
+ *
47
+ * @type {?bigint}
48
+ */
49
+ protocolFee?: bigint;
50
+ /**
51
+ *
52
+ * @type {?bigint}
53
+ */
54
+ referralFee?: bigint;
55
+ /**
56
+ *
57
+ * @type {?bigint}
58
+ */
59
+ maxParticipants?: bigint;
60
+ /**
61
+ *
62
+ * @type {?Address}
63
+ */
64
+ owner?: Address;
65
+ }
66
+ /**
67
+ * A struct representing a single Boost. Typically you would not construct this directly, rather get an instance from `BoostCore.createBoost` or `BoostCore.getBoost`
68
+ *
69
+ * @export
70
+ * @class Boost
71
+ * @typedef {Boost}
72
+ */
73
+ export declare class Boost {
74
+ /**
75
+ *
76
+ * @readonly
77
+ * @type {bigint}
78
+ */
79
+ readonly id: bigint;
80
+ /**
81
+ *
82
+ * @readonly
83
+ * @type {Budget}
84
+ */
85
+ readonly budget: Budget;
86
+ /**
87
+ *
88
+ * @readonly
89
+ * @type {Action}
90
+ */
91
+ readonly action: Action;
92
+ /**
93
+ *
94
+ * @readonly
95
+ * @type {Validator}
96
+ */
97
+ readonly validator: Validator;
98
+ /**
99
+ *
100
+ * @readonly
101
+ * @type {AllowList}
102
+ */
103
+ readonly allowList: AllowList;
104
+ /**
105
+ *
106
+ * @readonly
107
+ * @type {Array<Incentive>}
108
+ */
109
+ readonly incentives: Array<Incentive>;
110
+ /**
111
+ *
112
+ * @readonly
113
+ * @type {bigint}
114
+ */
115
+ readonly protocolFee: bigint;
116
+ /**
117
+ *
118
+ * @readonly
119
+ * @type {bigint}
120
+ */
121
+ readonly referralFee: bigint;
122
+ /**
123
+ *
124
+ * @readonly
125
+ * @type {bigint}
126
+ */
127
+ readonly maxParticipants: bigint;
128
+ /**
129
+ *
130
+ * @readonly
131
+ * @type {Address}
132
+ */
133
+ readonly owner: Address;
134
+ /**
135
+ * Creates an instance of Boost.
136
+ *
137
+ * @constructor
138
+ * @param {BoostConfig} config
139
+ */
140
+ constructor(config: BoostConfig);
141
+ }
142
+ /**
143
+ * Object representation of `BoostLib.Target` struct. Used for low level Boost creation operations.
144
+ * This is used to pass the base contract and its initialization parameters in an efficient manner
145
+ *
146
+ * @export
147
+ * @typedef {Target}
148
+ */
149
+ export type Target = {
150
+ isBase: boolean;
151
+ instance: Address;
152
+ parameters: Hex;
153
+ };
154
+ /**
155
+ * Object representation of `BoostCore.InitPayload` struct.
156
+ *
157
+ * @export
158
+ * @interface BoostPayload
159
+ * @typedef {BoostPayload}
160
+ */
161
+ export interface BoostPayload {
162
+ /**
163
+ * Address to valid budget.
164
+ *
165
+ * @type {Address}
166
+ */
167
+ budget: Address;
168
+ /**
169
+ * Target for existing action, or base with initialization payload.
170
+ *
171
+ * @type {Target}
172
+ */
173
+ action: Target;
174
+ /**
175
+ * Target for existing validator, or base with initialization payload.
176
+ *
177
+ * @type {Target}
178
+ */
179
+ validator: Target;
180
+ /**
181
+ * Target for existing allowList, or base with initialization payload.
182
+ *
183
+ * @type {Target}
184
+ */
185
+ allowList: Target;
186
+ /**
187
+ * Targets for new incentives, with initialization payloads.
188
+ *
189
+ * @type {Target[]}
190
+ */
191
+ incentives: Target[];
192
+ /**
193
+ * The base protocol fee (in bps)
194
+ *
195
+ * @type {?bigint}
196
+ */
197
+ protocolFee?: bigint;
198
+ /**
199
+ * The base referral fee (in bps)
200
+ *
201
+ * @type {?bigint}
202
+ */
203
+ referralFee?: bigint;
204
+ /**
205
+ * Optional maximum amount of participants in the Boost.
206
+ *
207
+ * @type {?bigint}
208
+ */
209
+ maxParticipants?: bigint;
210
+ /**
211
+ * The owner of the Boost.
212
+ *
213
+ * @type {Address}
214
+ */
215
+ owner: Address;
216
+ }
217
+ /**
218
+ * Given a valid {@link BoostPayload}, properly encode and compress the payload for use with `createBoost`
219
+ *
220
+ * @export
221
+ * @param {BoostPayload} param0
222
+ * @param {Address} param0.budget - Address to valid budget.
223
+ * @param {Target} param0.action - Target for existing action, or base with initialization payload.
224
+ * @param {Target} param0.validator - Target for existing validator, or base with initialization payload.
225
+ * @param {Target} param0.allowList - Target for existing allowList, or base with initialization payload.
226
+ * @param {Target[]} param0.incentives - Targets for new incentives, with initialization payloads.
227
+ * @param {bigint} [param0.protocolFee=0n] - The base protocol fee (in bps)
228
+ * @param {bigint} [param0.referralFee=0n] - The base referral fee (in bps)
229
+ * @param {bigint} [param0.maxParticipants=0n] - Optional maximum amount of participants in the Boost.
230
+ * @param {Address} param0.owner - The owner of the Boost.
231
+ * @returns {Hex}
232
+ */
233
+ export declare function prepareBoostPayload({ budget, action, validator, allowList, incentives, protocolFee, referralFee, maxParticipants, owner, }: BoostPayload): Hex;
234
+ //# sourceMappingURL=Boost.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"Boost.d.ts","sourceRoot":"","sources":["../src/Boost.ts"],"names":[],"mappings":"AACA,OAAO,EACL,KAAK,OAAO,EACZ,KAAK,GAAG,EAIT,MAAM,MAAM,CAAC;AACd,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,kBAAkB,CAAC;AAC/C,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,wBAAwB,CAAC;AACxD,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,kBAAkB,CAAC;AAC/C,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,wBAAwB,CAAC;AACxD,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,wBAAwB,CAAC;AAExD;;;;;;GAMG;AACH,MAAM,WAAW,WAAW;IAC1B;;;OAGG;IACH,EAAE,EAAE,MAAM,CAAC;IACX;;;OAGG;IACH,MAAM,EAAE,MAAM,CAAC;IACf;;;OAGG;IACH,MAAM,EAAE,MAAM,CAAC;IACf;;;OAGG;IACH,SAAS,EAAE,SAAS,CAAC;IACrB;;;OAGG;IACH,SAAS,EAAE,SAAS,CAAC;IACrB;;;OAGG;IACH,UAAU,EAAE,KAAK,CAAC,SAAS,CAAC,CAAC;IAC7B;;;OAGG;IACH,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB;;;OAGG;IACH,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB;;;OAGG;IACH,eAAe,CAAC,EAAE,MAAM,CAAC;IACzB;;;OAGG;IACH,KAAK,CAAC,EAAE,OAAO,CAAC;CACjB;AAED;;;;;;GAMG;AACH,qBAAa,KAAK;IAChB;;;;OAIG;IACH,QAAQ,CAAC,EAAE,EAAE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