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

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (271) hide show
  1. package/dist/Actions/Action.cjs +2 -1
  2. package/dist/Actions/Action.cjs.map +1 -0
  3. package/dist/Actions/Action.d.ts +1 -1
  4. package/dist/Actions/Action.d.ts.map +1 -1
  5. package/dist/Actions/Action.js +14 -12
  6. package/dist/Actions/Action.js.map +1 -0
  7. package/dist/Actions/ContractAction.d.ts +57 -14
  8. package/dist/Actions/ContractAction.d.ts.map +1 -1
  9. package/dist/Actions/ERC721MintAction.d.ts +50 -23
  10. package/dist/Actions/ERC721MintAction.d.ts.map +1 -1
  11. package/dist/Actions/EventAction.cjs +2 -1
  12. package/dist/Actions/EventAction.cjs.map +1 -0
  13. package/dist/Actions/EventAction.d.ts +405 -36
  14. package/dist/Actions/EventAction.d.ts.map +1 -1
  15. package/dist/Actions/EventAction.js +15 -209
  16. package/dist/Actions/EventAction.js.map +1 -0
  17. package/dist/AllowLists/AllowList.cjs +2 -1
  18. package/dist/AllowLists/AllowList.cjs.map +1 -0
  19. package/dist/AllowLists/AllowList.d.ts +6 -5
  20. package/dist/AllowLists/AllowList.d.ts.map +1 -1
  21. package/dist/AllowLists/AllowList.js +46 -22
  22. package/dist/AllowLists/AllowList.js.map +1 -0
  23. package/dist/AllowLists/OpenAllowList.d.ts +423 -0
  24. package/dist/AllowLists/OpenAllowList.d.ts.map +1 -0
  25. package/dist/AllowLists/SimpleAllowList.cjs +2 -1
  26. package/dist/AllowLists/SimpleAllowList.cjs.map +1 -0
  27. package/dist/AllowLists/SimpleAllowList.d.ts +124 -40
  28. package/dist/AllowLists/SimpleAllowList.d.ts.map +1 -1
  29. package/dist/AllowLists/SimpleAllowList.js +77 -77
  30. package/dist/AllowLists/SimpleAllowList.js.map +1 -0
  31. package/dist/AllowLists/SimpleDenyList.cjs +2 -1
  32. package/dist/AllowLists/SimpleDenyList.cjs.map +1 -0
  33. package/dist/AllowLists/SimpleDenyList.d.ts +234 -13
  34. package/dist/AllowLists/SimpleDenyList.d.ts.map +1 -1
  35. package/dist/AllowLists/SimpleDenyList.js +12 -200
  36. package/dist/AllowLists/SimpleDenyList.js.map +1 -0
  37. package/dist/Auth/Auth.cjs +1 -0
  38. package/dist/Auth/Auth.cjs.map +1 -0
  39. package/dist/Auth/Auth.js +1 -0
  40. package/dist/Auth/Auth.js.map +1 -0
  41. package/dist/Auth/PassthroughAuth.cjs +2 -1
  42. package/dist/Auth/PassthroughAuth.cjs.map +1 -0
  43. package/dist/Auth/PassthroughAuth.js +5 -4
  44. package/dist/Auth/PassthroughAuth.js.map +1 -0
  45. package/dist/Boost.cjs +2 -1
  46. package/dist/Boost.cjs.map +1 -0
  47. package/dist/Boost.d.ts +111 -1
  48. package/dist/Boost.d.ts.map +1 -1
  49. package/dist/Boost.js +140 -5
  50. package/dist/Boost.js.map +1 -0
  51. package/dist/BoostCore-3-U1xTQN.cjs +3 -0
  52. package/dist/BoostCore-3-U1xTQN.cjs.map +1 -0
  53. package/dist/BoostCore-DVGBUr2y.js +1477 -0
  54. package/dist/BoostCore-DVGBUr2y.js.map +1 -0
  55. package/dist/BoostCore.cjs +2 -2
  56. package/dist/BoostCore.cjs.map +1 -0
  57. package/dist/BoostCore.d.ts +166 -43
  58. package/dist/BoostCore.d.ts.map +1 -1
  59. package/dist/BoostCore.js +30 -1103
  60. package/dist/BoostCore.js.map +1 -0
  61. package/dist/BoostRegistry.cjs +2 -1
  62. package/dist/BoostRegistry.cjs.map +1 -0
  63. package/dist/BoostRegistry.d.ts +64 -23
  64. package/dist/BoostRegistry.d.ts.map +1 -1
  65. package/dist/BoostRegistry.js +162 -88
  66. package/dist/BoostRegistry.js.map +1 -0
  67. package/dist/Budgets/Budget.cjs +2 -1
  68. package/dist/Budgets/Budget.cjs.map +1 -0
  69. package/dist/Budgets/Budget.d.ts +1 -1
  70. package/dist/Budgets/Budget.d.ts.map +1 -1
  71. package/dist/Budgets/Budget.js +15 -13
  72. package/dist/Budgets/Budget.js.map +1 -0
  73. package/dist/Budgets/ManagedBudget.cjs +2 -1
  74. package/dist/Budgets/ManagedBudget.cjs.map +1 -0
  75. package/dist/Budgets/ManagedBudget.d.ts +78 -188
  76. package/dist/Budgets/ManagedBudget.d.ts.map +1 -1
  77. package/dist/Budgets/ManagedBudget.js +86 -286
  78. package/dist/Budgets/ManagedBudget.js.map +1 -0
  79. package/dist/Budgets/VestingBudget.d.ts +243 -87
  80. package/dist/Budgets/VestingBudget.d.ts.map +1 -1
  81. package/dist/Deployable/Contract.cjs +2 -1
  82. package/dist/Deployable/Contract.cjs.map +1 -0
  83. package/dist/Deployable/Contract.d.ts +4 -5
  84. package/dist/Deployable/Contract.d.ts.map +1 -1
  85. package/dist/Deployable/Contract.js +7 -8
  86. package/dist/Deployable/Contract.js.map +1 -0
  87. package/dist/Deployable/Deployable.cjs +1 -0
  88. package/dist/Deployable/Deployable.cjs.map +1 -0
  89. package/dist/Deployable/Deployable.d.ts +9 -3
  90. package/dist/Deployable/Deployable.d.ts.map +1 -1
  91. package/dist/Deployable/Deployable.js +10 -5
  92. package/dist/Deployable/Deployable.js.map +1 -0
  93. package/dist/Deployable/DeployableTarget.cjs +2 -1
  94. package/dist/Deployable/DeployableTarget.cjs.map +1 -0
  95. package/dist/Deployable/DeployableTarget.d.ts +16 -15
  96. package/dist/Deployable/DeployableTarget.d.ts.map +1 -1
  97. package/dist/Deployable/DeployableTarget.js +49 -42
  98. package/dist/Deployable/DeployableTarget.js.map +1 -0
  99. package/dist/Deployable/DeployableTargetWithRBAC.cjs +2 -0
  100. package/dist/Deployable/DeployableTargetWithRBAC.cjs.map +1 -0
  101. package/dist/Deployable/DeployableTargetWithRBAC.d.ts +179 -0
  102. package/dist/Deployable/DeployableTargetWithRBAC.d.ts.map +1 -0
  103. package/dist/Deployable/DeployableTargetWithRBAC.js +222 -0
  104. package/dist/Deployable/DeployableTargetWithRBAC.js.map +1 -0
  105. package/dist/EventAction-CIPqmAoP.js +1450 -0
  106. package/dist/EventAction-CIPqmAoP.js.map +1 -0
  107. package/dist/EventAction-d-oeqZQs.cjs +2 -0
  108. package/dist/EventAction-d-oeqZQs.cjs.map +1 -0
  109. package/dist/Incentive-Bp8Sez7M.js +298 -0
  110. package/dist/Incentive-Bp8Sez7M.js.map +1 -0
  111. package/dist/Incentive-Djnzseoj.cjs +2 -0
  112. package/dist/Incentive-Djnzseoj.cjs.map +1 -0
  113. package/dist/Incentives/AllowListIncentive.cjs +2 -1
  114. package/dist/Incentives/AllowListIncentive.cjs.map +1 -0
  115. package/dist/Incentives/AllowListIncentive.d.ts +49 -19
  116. package/dist/Incentives/AllowListIncentive.d.ts.map +1 -1
  117. package/dist/Incentives/AllowListIncentive.js +50 -34
  118. package/dist/Incentives/AllowListIncentive.js.map +1 -0
  119. package/dist/Incentives/CGDAIncentive.cjs +2 -1
  120. package/dist/Incentives/CGDAIncentive.cjs.map +1 -0
  121. package/dist/Incentives/CGDAIncentive.d.ts +118 -22
  122. package/dist/Incentives/CGDAIncentive.d.ts.map +1 -1
  123. package/dist/Incentives/CGDAIncentive.js +67 -42
  124. package/dist/Incentives/CGDAIncentive.js.map +1 -0
  125. package/dist/Incentives/ERC1155Incentive.d.ts +99 -38
  126. package/dist/Incentives/ERC1155Incentive.d.ts.map +1 -1
  127. package/dist/Incentives/ERC20Incentive.cjs +2 -1
  128. package/dist/Incentives/ERC20Incentive.cjs.map +1 -0
  129. package/dist/Incentives/ERC20Incentive.d.ts +73 -29
  130. package/dist/Incentives/ERC20Incentive.d.ts.map +1 -1
  131. package/dist/Incentives/ERC20Incentive.js +71 -48
  132. package/dist/Incentives/ERC20Incentive.js.map +1 -0
  133. package/dist/Incentives/ERC20VariableCriteriaIncentive.d.ts +523 -0
  134. package/dist/Incentives/ERC20VariableCriteriaIncentive.d.ts.map +1 -0
  135. package/dist/Incentives/ERC20VariableIncentive.d.ts +65 -28
  136. package/dist/Incentives/ERC20VariableIncentive.d.ts.map +1 -1
  137. package/dist/Incentives/Incentive.cjs +2 -1
  138. package/dist/Incentives/Incentive.cjs.map +1 -0
  139. package/dist/Incentives/Incentive.d.ts +4 -7
  140. package/dist/Incentives/Incentive.d.ts.map +1 -1
  141. package/dist/Incentives/Incentive.js +17 -278
  142. package/dist/Incentives/Incentive.js.map +1 -0
  143. package/dist/Incentives/PointsIncentive.cjs +2 -1
  144. package/dist/Incentives/PointsIncentive.cjs.map +1 -0
  145. package/dist/Incentives/PointsIncentive.d.ts +65 -21
  146. package/dist/Incentives/PointsIncentive.d.ts.map +1 -1
  147. package/dist/Incentives/PointsIncentive.js +57 -36
  148. package/dist/Incentives/PointsIncentive.js.map +1 -0
  149. package/dist/SimpleDenyList-BwfNjRsg.cjs +2 -0
  150. package/dist/SimpleDenyList-BwfNjRsg.cjs.map +1 -0
  151. package/dist/SimpleDenyList-Cn5WpNn0.js +132 -0
  152. package/dist/SimpleDenyList-Cn5WpNn0.js.map +1 -0
  153. package/dist/Validators/SignerValidator.cjs +2 -1
  154. package/dist/Validators/SignerValidator.cjs.map +1 -0
  155. package/dist/Validators/SignerValidator.d.ts +310 -17
  156. package/dist/Validators/SignerValidator.d.ts.map +1 -1
  157. package/dist/Validators/SignerValidator.js +165 -36
  158. package/dist/Validators/SignerValidator.js.map +1 -0
  159. package/dist/Validators/Validator.cjs +2 -1
  160. package/dist/Validators/Validator.cjs.map +1 -0
  161. package/dist/Validators/Validator.d.ts +2 -2
  162. package/dist/Validators/Validator.d.ts.map +1 -1
  163. package/dist/Validators/Validator.js +12 -10
  164. package/dist/Validators/Validator.js.map +1 -0
  165. package/dist/claiming.cjs +2 -0
  166. package/dist/claiming.cjs.map +1 -0
  167. package/dist/claiming.d.ts +43 -0
  168. package/dist/claiming.d.ts.map +1 -0
  169. package/dist/claiming.js +17 -0
  170. package/dist/claiming.js.map +1 -0
  171. package/dist/componentInterfaces-D09mhzxO.cjs +2 -0
  172. package/dist/componentInterfaces-D09mhzxO.cjs.map +1 -0
  173. package/dist/componentInterfaces-RXBMI5yH.js +14 -0
  174. package/dist/componentInterfaces-RXBMI5yH.js.map +1 -0
  175. package/dist/deployments-BM42vImE.js +43 -0
  176. package/dist/deployments-BM42vImE.js.map +1 -0
  177. package/dist/deployments-CMdF5uEC.cjs +2 -0
  178. package/dist/deployments-CMdF5uEC.cjs.map +1 -0
  179. package/dist/deployments.json +41 -0
  180. package/dist/errors.cjs +2 -1
  181. package/dist/errors.cjs.map +1 -0
  182. package/dist/errors.d.ts +403 -1
  183. package/dist/errors.d.ts.map +1 -1
  184. package/dist/errors.js +285 -39
  185. package/dist/errors.js.map +1 -0
  186. package/dist/generated-B0tk-c9b.cjs +3 -0
  187. package/dist/generated-B0tk-c9b.cjs.map +1 -0
  188. package/dist/{generated-x_abr3Yv.js → generated-B7VaSah4.js} +2058 -2541
  189. package/dist/generated-B7VaSah4.js.map +1 -0
  190. package/dist/index.cjs +2 -1
  191. package/dist/index.cjs.map +1 -0
  192. package/dist/index.d.ts +10 -9
  193. package/dist/index.d.ts.map +1 -1
  194. package/dist/index.js +143 -1353
  195. package/dist/index.js.map +1 -0
  196. package/dist/transfers.cjs +2 -0
  197. package/dist/transfers.cjs.map +1 -0
  198. package/dist/transfers.d.ts +198 -0
  199. package/dist/transfers.d.ts.map +1 -0
  200. package/dist/transfers.js +84 -0
  201. package/dist/transfers.js.map +1 -0
  202. package/dist/utils.cjs +2 -1
  203. package/dist/utils.cjs.map +1 -0
  204. package/dist/utils.d.ts +26 -1350
  205. package/dist/utils.d.ts.map +1 -1
  206. package/dist/utils.js +38 -636
  207. package/dist/utils.js.map +1 -0
  208. package/package.json +37 -11
  209. package/src/Actions/Action.test.ts +79 -0
  210. package/src/Actions/Action.ts +61 -0
  211. package/src/Actions/ContractAction.test.ts +197 -0
  212. package/src/Actions/ContractAction.ts +300 -0
  213. package/src/Actions/ERC721MintAction.test.ts +112 -0
  214. package/src/Actions/ERC721MintAction.ts +291 -0
  215. package/src/Actions/EventAction.test.ts +787 -0
  216. package/src/Actions/EventAction.ts +1214 -0
  217. package/src/AllowLists/AllowList.test.ts +64 -0
  218. package/src/AllowLists/AllowList.ts +62 -0
  219. package/src/AllowLists/OpenAllowList.test.ts +40 -0
  220. package/src/AllowLists/OpenAllowList.ts +45 -0
  221. package/src/AllowLists/SimpleAllowList.test.ts +52 -0
  222. package/src/AllowLists/SimpleAllowList.ts +262 -0
  223. package/src/AllowLists/SimpleDenyList.test.ts +52 -0
  224. package/src/AllowLists/SimpleDenyList.ts +250 -0
  225. package/src/Auth/Auth.ts +11 -0
  226. package/src/Auth/PassthroughAuth.test.ts +12 -0
  227. package/src/Auth/PassthroughAuth.ts +80 -0
  228. package/src/Boost.ts +309 -0
  229. package/src/BoostCore.test.ts +827 -0
  230. package/src/BoostCore.ts +1447 -0
  231. package/src/BoostRegistry.ts +543 -0
  232. package/src/Budgets/Budget.test.ts +27 -0
  233. package/src/Budgets/Budget.ts +60 -0
  234. package/src/Budgets/ManagedBudget.test.ts +217 -0
  235. package/src/Budgets/ManagedBudget.ts +534 -0
  236. package/src/Budgets/VestingBudget.test.ts +123 -0
  237. package/src/Budgets/VestingBudget.ts +530 -0
  238. package/src/Deployable/Contract.ts +228 -0
  239. package/src/Deployable/Deployable.ts +250 -0
  240. package/src/Deployable/DeployableTarget.ts +234 -0
  241. package/src/Deployable/DeployableTargetWithRBAC.ts +323 -0
  242. package/src/Incentives/AllowListIncentive.test.ts +143 -0
  243. package/src/Incentives/AllowListIncentive.ts +336 -0
  244. package/src/Incentives/CGDAIncentive.test.ts +132 -0
  245. package/src/Incentives/CGDAIncentive.ts +470 -0
  246. package/src/Incentives/ERC1155Incentive.test.ts +87 -0
  247. package/src/Incentives/ERC1155Incentive.ts +465 -0
  248. package/src/Incentives/ERC20Incentive.test.ts +130 -0
  249. package/src/Incentives/ERC20Incentive.ts +484 -0
  250. package/src/Incentives/ERC20VariableCriteriaIncentive.test.ts +184 -0
  251. package/src/Incentives/ERC20VariableCriteriaIncentive.ts +309 -0
  252. package/src/Incentives/ERC20VariableIncentive.test.ts +136 -0
  253. package/src/Incentives/ERC20VariableIncentive.ts +422 -0
  254. package/src/Incentives/Incentive.test.ts +92 -0
  255. package/src/Incentives/Incentive.ts +86 -0
  256. package/src/Incentives/PointsIncentive.test.ts +139 -0
  257. package/src/Incentives/PointsIncentive.ts +367 -0
  258. package/src/Validators/SignerValidator.test.ts +159 -0
  259. package/src/Validators/SignerValidator.ts +683 -0
  260. package/src/Validators/Validator.test.ts +21 -0
  261. package/src/Validators/Validator.ts +55 -0
  262. package/src/claiming.ts +56 -0
  263. package/src/errors.ts +844 -0
  264. package/src/index.test.ts +122 -0
  265. package/src/index.ts +58 -0
  266. package/src/transfers.ts +284 -0
  267. package/src/utils.test.ts +44 -0
  268. package/src/utils.ts +247 -0
  269. package/dist/Budgets/SimpleBudget.d.ts +0 -793
  270. package/dist/Budgets/SimpleBudget.d.ts.map +0 -1
  271. package/dist/generated-BaaleHW-.cjs +0 -2
@@ -1,15 +1,29 @@
1
- import { h as o, I as n, N as l, T as h, d as t, b as y, m as r, e as u } from "./generated-x_abr3Yv.js";
2
- import { isAddress as g } from "viem";
3
- import { Deployable as A } from "./Deployable/Deployable.js";
4
- import { RegistryType as T } from "./utils.js";
5
- const p = "0x6080604052348015600e575f80fd5b50611b4e8061001c5f395ff3fe608060405234801561000f575f80fd5b5060043610610086575f3560e01c8063acc83fc811610059578063acc83fc81461014a578063d12dd4811461017a578063f166879214610196578063fd97064b146101c657610086565b806301ffc9a71461008a5780633aaf1626146100ba578063792aa01c146100ea57806383f388591461011a575b5f80fd5b6100a4600480360381019061009f9190610e0e565b6101f6565b6040516100b19190610e53565b60405180910390f35b6100d460048036038101906100cf9190610e9f565b61025f565b6040516100e191906110a7565b60405180910390f35b61010460048036038101906100ff91906110f1565b610471565b60405161011191906111d3565b60405180910390f35b610134600480360381019061012f9190610e9f565b610504565b6040516101419190611202565b60405180910390f35b610164600480360381019061015f919061129f565b6105ac565b6040516101719190611332565b60405180910390f35b610194600480360381019061018f919061134b565b6105ee565b005b6101b060048036038101906101ab91906113bc565b610818565b6040516101bd9190611332565b60405180910390f35b6101e060048036038101906101db919061146e565b610854565b6040516101ed9190611202565b60405180910390f35b5f7f01ffc9a7000000000000000000000000000000000000000000000000000000007bffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916827bffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916149050919050565b610267610d4e565b60015f8381526020019081526020015f206040518060800160405290815f82015f9054906101000a900460ff1660048111156102a6576102a5610eca565b5b60048111156102b8576102b7610eca565b5b81526020015f820160019054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001600182015f9054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020016002820180546103769061153e565b80601f01602080910402602001604051908101604052809291908181526020018280546103a29061153e565b80156103ed5780601f106103c4576101008083540402835291602001916103ed565b820191905f5260205f20905b8154815290600101906020018083116103d057829003601f168201915b50505050508152505090505f73ffffffffffffffffffffffffffffffffffffffff16816020015173ffffffffffffffffffffffffffffffffffffffff160361046c57816040517f8cc00d160000000000000000000000000000000000000000000000000000000081526004016104639190611332565b60405180910390fd5b919050565b606060025f8373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020015f208054806020026020016040519081016040528092919081815260200182805480156104f857602002820191905f5260205f20905b8154815260200190600101908083116104e4575b50505050509050919050565b5f805f8381526020019081526020015f205f9054906101000a900473ffffffffffffffffffffffffffffffffffffffff1690505f73ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff16036105a757816040517f8cc00d1600000000000000000000000000000000000000000000000000000000815260040161059e9190611332565b60405180910390fd5b919050565b5f6105e386868686866040516020016105c894939291906115ef565b60405160208183030381529060405280519060200120610c1c565b905095945050505050565b808073ffffffffffffffffffffffffffffffffffffffff166301ffc9a77f6ab67a0d000000000000000000000000000000000000000000000000000000006040518263ffffffff1660e01b81526004016106489190611638565b602060405180830381865afa158015610663573d5f803e3d5ffd5b505050506040513d601f19601f82011682018060405250810190610687919061167b565b6106c857806040517f903b13fd0000000000000000000000000000000000000000000000000000000081526004016106bf91906116b5565b60405180910390fd5b5f6106d4868686610818565b90505f73ffffffffffffffffffffffffffffffffffffffff165f808381526020019081526020015f205f9054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16146107775785816040517f96b5684c00000000000000000000000000000000000000000000000000000000815260040161076e9291906116dd565b60405180910390fd5b825f808381526020019081526020015f205f6101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff160217905550808660048111156107d9576107d8610eca565b5b7f660d31df25c96b8a337fcf12a56b7363e5a997639db853d5dbaec7c01f31bd808560405161080891906116b5565b60405180910390a3505050505050565b5f61084b848484604051602001610830929190611704565b60405160208183030381529060405280519060200120610c1c565b90509392505050565b5f3068929eee149b4bd2126854036108735763ab143c065f526004601cfd5b3068929eee149b4bd212685561091b878787873360405160200161089b959493929190611750565b6040516020818303038152906040528051906020012084848080601f0160208091040260200160405190810160405280939291908181526020018383808284375f81840152601f19601f820116905080830192505050505050508873ffffffffffffffffffffffffffffffffffffffff16610c4e9092919063ffffffff16565b90505f61092b88883389896105ac565b90505f73ffffffffffffffffffffffffffffffffffffffff1660015f8381526020019081526020015f205f0160019054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16146109d25787816040517f96b5684c0000000000000000000000000000000000000000000000000000000081526004016109c99291906116dd565b60405180910390fd5b60025f3373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020015f2081908060018154018082558091505060019003905f5260205f20015f90919091909150556040518060800160405280896004811115610a5157610a50610eca565b5b81526020018373ffffffffffffffffffffffffffffffffffffffff1681526020013373ffffffffffffffffffffffffffffffffffffffff16815260200187878080601f0160208091040260200160405190810160405280939291908181526020018383808284375f81840152601f19601f8201169050808301925050505050505081525060015f8381526020019081526020015f205f820151815f015f6101000a81548160ff02191690836004811115610b0e57610b0d610eca565b5b02179055506020820151815f0160016101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff1602179055506040820151816001015f6101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff1602179055506060820151816002019081610bb49190611965565b5090505080886004811115610bcc57610bcb610eca565b5b7f2348fcdb9847b17a183e53aa32c0c5c76afdef8fcb14bb51f216c6611701ab1a8985604051610bfd929190611a34565b60405180910390a3503868929eee149b4bd21268559695505050505050565b5f8282604051602001610c30929190611a7b565b60405160208183030381529060405280519060200120905092915050565b5f610c78838573ffffffffffffffffffffffffffffffffffffffff16610ce790919063ffffffff16565b90508073ffffffffffffffffffffffffffffffffffffffff1663439fab91836040518263ffffffff1660e01b8152600401610cb39190611af8565b5f604051808303815f87803b158015610cca575f80fd5b505af1158015610cdc573d5f803e3d5ffd5b505050509392505050565b5f610cf35f8484610cfb565b905092915050565b5f6c5af43d3d93803e602a57fd5bf36021528260145273602c3d8160093d39f33d3d3d3d363d3d37363d735f52816035600c86f5905080610d435763301164255f526004601cfd5b5f6021529392505050565b60405180608001604052805f6004811115610d6c57610d6b610eca565b5b81526020015f73ffffffffffffffffffffffffffffffffffffffff1681526020015f73ffffffffffffffffffffffffffffffffffffffff168152602001606081525090565b5f80fd5b5f80fd5b5f7fffffffff0000000000000000000000000000000000000000000000000000000082169050919050565b610ded81610db9565b8114610df7575f80fd5b50565b5f81359050610e0881610de4565b92915050565b5f60208284031215610e2357610e22610db1565b5b5f610e3084828501610dfa565b91505092915050565b5f8115159050919050565b610e4d81610e39565b82525050565b5f602082019050610e665f830184610e44565b92915050565b5f819050919050565b610e7e81610e6c565b8114610e88575f80fd5b50565b5f81359050610e9981610e75565b92915050565b5f60208284031215610eb457610eb3610db1565b5b5f610ec184828501610e8b565b91505092915050565b7f4e487b71000000000000000000000000000000000000000000000000000000005f52602160045260245ffd5b60058110610f0857610f07610eca565b5b50565b5f819050610f1882610ef7565b919050565b5f610f2782610f0b565b9050919050565b610f3781610f1d565b82525050565b5f73ffffffffffffffffffffffffffffffffffffffff82169050919050565b5f819050919050565b5f610f7f610f7a610f7584610f3d565b610f5c565b610f3d565b9050919050565b5f610f9082610f65565b9050919050565b5f610fa182610f86565b9050919050565b610fb181610f97565b82525050565b5f610fc182610f3d565b9050919050565b610fd181610fb7565b82525050565b5f81519050919050565b5f82825260208201905092915050565b8281835e5f83830152505050565b5f601f19601f8301169050919050565b5f61101982610fd7565b6110238185610fe1565b9350611033818560208601610ff1565b61103c81610fff565b840191505092915050565b5f608083015f83015161105c5f860182610f2e565b50602083015161106f6020860182610fa8565b5060408301516110826040860182610fc8565b506060830151848203606086015261109a828261100f565b9150508091505092915050565b5f6020820190508181035f8301526110bf8184611047565b905092915050565b6110d081610fb7565b81146110da575f80fd5b50565b5f813590506110eb816110c7565b92915050565b5f6020828403121561110657611105610db1565b5b5f611113848285016110dd565b91505092915050565b5f81519050919050565b5f82825260208201905092915050565b5f819050602082019050919050565b61114e81610e6c565b82525050565b5f61115f8383611145565b60208301905092915050565b5f602082019050919050565b5f6111818261111c565b61118b8185611126565b935061119683611136565b805f5b838110156111c65781516111ad8882611154565b97506111b88361116b565b925050600181019050611199565b5085935050505092915050565b5f6020820190508181035f8301526111eb8184611177565b905092915050565b6111fc81610f97565b82525050565b5f6020820190506112155f8301846111f3565b92915050565b60058110611227575f80fd5b50565b5f813590506112388161121b565b92915050565b5f80fd5b5f80fd5b5f80fd5b5f8083601f84011261125f5761125e61123e565b5b8235905067ffffffffffffffff81111561127c5761127b611242565b5b60208301915083600182028301111561129857611297611246565b5b9250929050565b5f805f805f608086880312156112b8576112b7610db1565b5b5f6112c58882890161122a565b95505060206112d6888289016110dd565b94505060406112e7888289016110dd565b935050606086013567ffffffffffffffff81111561130857611307610db5565b5b6113148882890161124a565b92509250509295509295909350565b61132c81610e6c565b82525050565b5f6020820190506113455f830184611323565b92915050565b5f805f806060858703121561136357611362610db1565b5b5f6113708782880161122a565b945050602085013567ffffffffffffffff81111561139157611390610db5565b5b61139d8782880161124a565b935093505060406113b0878288016110dd565b91505092959194509250565b5f805f604084860312156113d3576113d2610db1565b5b5f6113e08682870161122a565b935050602084013567ffffffffffffffff81111561140157611400610db5565b5b61140d8682870161124a565b92509250509250925092565b5f8083601f84011261142e5761142d61123e565b5b8235905067ffffffffffffffff81111561144b5761144a611242565b5b60208301915083600182028301111561146757611466611246565b5b9250929050565b5f805f805f806080878903121561148857611487610db1565b5b5f61149589828a0161122a565b96505060206114a689828a016110dd565b955050604087013567ffffffffffffffff8111156114c7576114c6610db5565b5b6114d389828a0161124a565b9450945050606087013567ffffffffffffffff8111156114f6576114f5610db5565b5b61150289828a01611419565b92509250509295509295509295565b7f4e487b71000000000000000000000000000000000000000000000000000000005f52602260045260245ffd5b5f600282049050600182168061155557607f821691505b60208210810361156857611567611511565b5b50919050565b5f8160601b9050919050565b5f6115848261156e565b9050919050565b5f6115958261157a565b9050919050565b6115ad6115a882610fb7565b61158b565b82525050565b5f81905092915050565b828183375f83830152505050565b5f6115d683856115b3565b93506115e38385846115bd565b82840190509392505050565b5f6115fa828761159c565b60148201915061160a828661159c565b60148201915061161b8284866115cb565b915081905095945050505050565b61163281610db9565b82525050565b5f60208201905061164b5f830184611629565b92915050565b61165a81610e39565b8114611664575f80fd5b50565b5f8151905061167581611651565b92915050565b5f602082840312156116905761168f610db1565b5b5f61169d84828501611667565b91505092915050565b6116af81610fb7565b82525050565b5f6020820190506116c85f8301846116a6565b92915050565b6116d781610f1d565b82525050565b5f6040820190506116f05f8301856116ce565b6116fd6020830184611323565b9392505050565b5f6117108284866115cb565b91508190509392505050565b5f8160f81b9050919050565b5f6117328261171c565b9050919050565b61174a61174582610f1d565b611728565b82525050565b5f61175b8288611739565b60018201915061176b828761159c565b60148201915061177c8285876115cb565b9150611788828461159c565b6014820191508190509695505050505050565b7f4e487b71000000000000000000000000000000000000000000000000000000005f52604160045260245ffd5b5f819050815f5260205f209050919050565b5f6020601f8301049050919050565b5f82821b905092915050565b5f600883026118247fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff826117e9565b61182e86836117e9565b95508019841693508086168417925050509392505050565b5f819050919050565b5f61186961186461185f84611846565b610f5c565b611846565b9050919050565b5f819050919050565b6118828361184f565b61189661188e82611870565b8484546117f5565b825550505050565b5f90565b6118aa61189e565b6118b5818484611879565b505050565b5b818110156118d8576118cd5f826118a2565b6001810190506118bb565b5050565b601f82111561191d576118ee816117c8565b6118f7846117da565b81016020851015611906578190505b61191a611912856117da565b8301826118ba565b50505b505050565b5f82821c905092915050565b5f61193d5f1984600802611922565b1980831691505092915050565b5f611955838361192e565b9150826002028217905092915050565b61196e82610fd7565b67ffffffffffffffff8111156119875761198661179b565b5b611991825461153e565b61199c8282856118dc565b5f60209050601f8311600181146119cd575f84156119bb578287015190505b6119c5858261194a565b865550611a2c565b601f1984166119db866117c8565b5f5b82811015611a02578489015182556001820191506020850194506020810190506119dd565b86831015611a1f5784890151611a1b601f89168261192e565b8355505b6001600288020188555050505b505050505050565b5f604082019050611a475f8301856116a6565b611a5460208301846111f3565b9392505050565b5f819050919050565b611a75611a7082610e6c565b611a5b565b82525050565b5f611a868285611739565b600182019150611a968284611a64565b6020820191508190509392505050565b5f81519050919050565b5f82825260208201905092915050565b5f611aca82611aa6565b611ad48185611ab0565b9350611ae4818560208601610ff1565b611aed81610fff565b840191505092915050565b5f6020820190508181035f830152611b108184611ac0565b90509291505056fea264697066735822122031d8b5092c0648488ea4f8c739d0ff5d8c5debf32ebfcd2f52c823a98c8a410064736f6c634300081a0033", m = "0x5cb8D869f2EE4e3D987Ac7bEB37D6812f5346DFC";
6
- function R(d) {
7
- return d.address && g(d.address);
1
+ import { s as A, u as w, v as I, w as R, B as u, C, D as r, a as D } from "./generated-B7VaSah4.js";
2
+ import { isAddress as S } from "viem";
3
+ import { B as _ } from "./deployments-BM42vImE.js";
4
+ import { Deployable as B } from "./Deployable/Deployable.js";
5
+ import { assertValidAddressByChainId as c } from "./utils.js";
6
+ const E = "0x6080604052348015600e575f80fd5b50611b4e8061001c5f395ff3fe608060405234801561000f575f80fd5b5060043610610086575f3560e01c8063acc83fc811610059578063acc83fc81461014a578063d12dd4811461017a578063f166879214610196578063fd97064b146101c657610086565b806301ffc9a71461008a5780633aaf1626146100ba578063792aa01c146100ea57806383f388591461011a575b5f80fd5b6100a4600480360381019061009f9190610e0e565b6101f6565b6040516100b19190610e53565b60405180910390f35b6100d460048036038101906100cf9190610e9f565b61025f565b6040516100e191906110a7565b60405180910390f35b61010460048036038101906100ff91906110f1565b610471565b60405161011191906111d3565b60405180910390f35b610134600480360381019061012f9190610e9f565b610504565b6040516101419190611202565b60405180910390f35b610164600480360381019061015f919061129f565b6105ac565b6040516101719190611332565b60405180910390f35b610194600480360381019061018f919061134b565b6105ee565b005b6101b060048036038101906101ab91906113bc565b610818565b6040516101bd9190611332565b60405180910390f35b6101e060048036038101906101db919061146e565b610854565b6040516101ed9190611202565b60405180910390f35b5f7f01ffc9a7000000000000000000000000000000000000000000000000000000007bffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916827bffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916149050919050565b610267610d4e565b60015f8381526020019081526020015f206040518060800160405290815f82015f9054906101000a900460ff1660048111156102a6576102a5610eca565b5b60048111156102b8576102b7610eca565b5b81526020015f820160019054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001600182015f9054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020016002820180546103769061153e565b80601f01602080910402602001604051908101604052809291908181526020018280546103a29061153e565b80156103ed5780601f106103c4576101008083540402835291602001916103ed565b820191905f5260205f20905b8154815290600101906020018083116103d057829003601f168201915b50505050508152505090505f73ffffffffffffffffffffffffffffffffffffffff16816020015173ffffffffffffffffffffffffffffffffffffffff160361046c57816040517f8cc00d160000000000000000000000000000000000000000000000000000000081526004016104639190611332565b60405180910390fd5b919050565b606060025f8373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020015f208054806020026020016040519081016040528092919081815260200182805480156104f857602002820191905f5260205f20905b8154815260200190600101908083116104e4575b50505050509050919050565b5f805f8381526020019081526020015f205f9054906101000a900473ffffffffffffffffffffffffffffffffffffffff1690505f73ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff16036105a757816040517f8cc00d1600000000000000000000000000000000000000000000000000000000815260040161059e9190611332565b60405180910390fd5b919050565b5f6105e386868686866040516020016105c894939291906115ef565b60405160208183030381529060405280519060200120610c1c565b905095945050505050565b808073ffffffffffffffffffffffffffffffffffffffff166301ffc9a77f6ab67a0d000000000000000000000000000000000000000000000000000000006040518263ffffffff1660e01b81526004016106489190611638565b602060405180830381865afa158015610663573d5f803e3d5ffd5b505050506040513d601f19601f82011682018060405250810190610687919061167b565b6106c857806040517f903b13fd0000000000000000000000000000000000000000000000000000000081526004016106bf91906116b5565b60405180910390fd5b5f6106d4868686610818565b90505f73ffffffffffffffffffffffffffffffffffffffff165f808381526020019081526020015f205f9054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16146107775785816040517f96b5684c00000000000000000000000000000000000000000000000000000000815260040161076e9291906116dd565b60405180910390fd5b825f808381526020019081526020015f205f6101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff160217905550808660048111156107d9576107d8610eca565b5b7f660d31df25c96b8a337fcf12a56b7363e5a997639db853d5dbaec7c01f31bd808560405161080891906116b5565b60405180910390a3505050505050565b5f61084b848484604051602001610830929190611704565b60405160208183030381529060405280519060200120610c1c565b90509392505050565b5f3068929eee149b4bd2126854036108735763ab143c065f526004601cfd5b3068929eee149b4bd212685561091b878787873360405160200161089b959493929190611750565b6040516020818303038152906040528051906020012084848080601f0160208091040260200160405190810160405280939291908181526020018383808284375f81840152601f19601f820116905080830192505050505050508873ffffffffffffffffffffffffffffffffffffffff16610c4e9092919063ffffffff16565b90505f61092b88883389896105ac565b90505f73ffffffffffffffffffffffffffffffffffffffff1660015f8381526020019081526020015f205f0160019054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16146109d25787816040517f96b5684c0000000000000000000000000000000000000000000000000000000081526004016109c99291906116dd565b60405180910390fd5b60025f3373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020015f2081908060018154018082558091505060019003905f5260205f20015f90919091909150556040518060800160405280896004811115610a5157610a50610eca565b5b81526020018373ffffffffffffffffffffffffffffffffffffffff1681526020013373ffffffffffffffffffffffffffffffffffffffff16815260200187878080601f0160208091040260200160405190810160405280939291908181526020018383808284375f81840152601f19601f8201169050808301925050505050505081525060015f8381526020019081526020015f205f820151815f015f6101000a81548160ff02191690836004811115610b0e57610b0d610eca565b5b02179055506020820151815f0160016101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff1602179055506040820151816001015f6101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff1602179055506060820151816002019081610bb49190611965565b5090505080886004811115610bcc57610bcb610eca565b5b7f2348fcdb9847b17a183e53aa32c0c5c76afdef8fcb14bb51f216c6611701ab1a8985604051610bfd929190611a34565b60405180910390a3503868929eee149b4bd21268559695505050505050565b5f8282604051602001610c30929190611a7b565b60405160208183030381529060405280519060200120905092915050565b5f610c78838573ffffffffffffffffffffffffffffffffffffffff16610ce790919063ffffffff16565b90508073ffffffffffffffffffffffffffffffffffffffff1663439fab91836040518263ffffffff1660e01b8152600401610cb39190611af8565b5f604051808303815f87803b158015610cca575f80fd5b505af1158015610cdc573d5f803e3d5ffd5b505050509392505050565b5f610cf35f8484610cfb565b905092915050565b5f6c5af43d3d93803e602a57fd5bf36021528260145273602c3d8160093d39f33d3d3d3d363d3d37363d735f52816035600c86f5905080610d435763301164255f526004601cfd5b5f6021529392505050565b60405180608001604052805f6004811115610d6c57610d6b610eca565b5b81526020015f73ffffffffffffffffffffffffffffffffffffffff1681526020015f73ffffffffffffffffffffffffffffffffffffffff168152602001606081525090565b5f80fd5b5f80fd5b5f7fffffffff0000000000000000000000000000000000000000000000000000000082169050919050565b610ded81610db9565b8114610df7575f80fd5b50565b5f81359050610e0881610de4565b92915050565b5f60208284031215610e2357610e22610db1565b5b5f610e3084828501610dfa565b91505092915050565b5f8115159050919050565b610e4d81610e39565b82525050565b5f602082019050610e665f830184610e44565b92915050565b5f819050919050565b610e7e81610e6c565b8114610e88575f80fd5b50565b5f81359050610e9981610e75565b92915050565b5f60208284031215610eb457610eb3610db1565b5b5f610ec184828501610e8b565b91505092915050565b7f4e487b71000000000000000000000000000000000000000000000000000000005f52602160045260245ffd5b60058110610f0857610f07610eca565b5b50565b5f819050610f1882610ef7565b919050565b5f610f2782610f0b565b9050919050565b610f3781610f1d565b82525050565b5f73ffffffffffffffffffffffffffffffffffffffff82169050919050565b5f819050919050565b5f610f7f610f7a610f7584610f3d565b610f5c565b610f3d565b9050919050565b5f610f9082610f65565b9050919050565b5f610fa182610f86565b9050919050565b610fb181610f97565b82525050565b5f610fc182610f3d565b9050919050565b610fd181610fb7565b82525050565b5f81519050919050565b5f82825260208201905092915050565b8281835e5f83830152505050565b5f601f19601f8301169050919050565b5f61101982610fd7565b6110238185610fe1565b9350611033818560208601610ff1565b61103c81610fff565b840191505092915050565b5f608083015f83015161105c5f860182610f2e565b50602083015161106f6020860182610fa8565b5060408301516110826040860182610fc8565b506060830151848203606086015261109a828261100f565b9150508091505092915050565b5f6020820190508181035f8301526110bf8184611047565b905092915050565b6110d081610fb7565b81146110da575f80fd5b50565b5f813590506110eb816110c7565b92915050565b5f6020828403121561110657611105610db1565b5b5f611113848285016110dd565b91505092915050565b5f81519050919050565b5f82825260208201905092915050565b5f819050602082019050919050565b61114e81610e6c565b82525050565b5f61115f8383611145565b60208301905092915050565b5f602082019050919050565b5f6111818261111c565b61118b8185611126565b935061119683611136565b805f5b838110156111c65781516111ad8882611154565b97506111b88361116b565b925050600181019050611199565b5085935050505092915050565b5f6020820190508181035f8301526111eb8184611177565b905092915050565b6111fc81610f97565b82525050565b5f6020820190506112155f8301846111f3565b92915050565b60058110611227575f80fd5b50565b5f813590506112388161121b565b92915050565b5f80fd5b5f80fd5b5f80fd5b5f8083601f84011261125f5761125e61123e565b5b8235905067ffffffffffffffff81111561127c5761127b611242565b5b60208301915083600182028301111561129857611297611246565b5b9250929050565b5f805f805f608086880312156112b8576112b7610db1565b5b5f6112c58882890161122a565b95505060206112d6888289016110dd565b94505060406112e7888289016110dd565b935050606086013567ffffffffffffffff81111561130857611307610db5565b5b6113148882890161124a565b92509250509295509295909350565b61132c81610e6c565b82525050565b5f6020820190506113455f830184611323565b92915050565b5f805f806060858703121561136357611362610db1565b5b5f6113708782880161122a565b945050602085013567ffffffffffffffff81111561139157611390610db5565b5b61139d8782880161124a565b935093505060406113b0878288016110dd565b91505092959194509250565b5f805f604084860312156113d3576113d2610db1565b5b5f6113e08682870161122a565b935050602084013567ffffffffffffffff81111561140157611400610db5565b5b61140d8682870161124a565b92509250509250925092565b5f8083601f84011261142e5761142d61123e565b5b8235905067ffffffffffffffff81111561144b5761144a611242565b5b60208301915083600182028301111561146757611466611246565b5b9250929050565b5f805f805f806080878903121561148857611487610db1565b5b5f61149589828a0161122a565b96505060206114a689828a016110dd565b955050604087013567ffffffffffffffff8111156114c7576114c6610db5565b5b6114d389828a0161124a565b9450945050606087013567ffffffffffffffff8111156114f6576114f5610db5565b5b61150289828a01611419565b92509250509295509295509295565b7f4e487b71000000000000000000000000000000000000000000000000000000005f52602260045260245ffd5b5f600282049050600182168061155557607f821691505b60208210810361156857611567611511565b5b50919050565b5f8160601b9050919050565b5f6115848261156e565b9050919050565b5f6115958261157a565b9050919050565b6115ad6115a882610fb7565b61158b565b82525050565b5f81905092915050565b828183375f83830152505050565b5f6115d683856115b3565b93506115e38385846115bd565b82840190509392505050565b5f6115fa828761159c565b60148201915061160a828661159c565b60148201915061161b8284866115cb565b915081905095945050505050565b61163281610db9565b82525050565b5f60208201905061164b5f830184611629565b92915050565b61165a81610e39565b8114611664575f80fd5b50565b5f8151905061167581611651565b92915050565b5f602082840312156116905761168f610db1565b5b5f61169d84828501611667565b91505092915050565b6116af81610fb7565b82525050565b5f6020820190506116c85f8301846116a6565b92915050565b6116d781610f1d565b82525050565b5f6040820190506116f05f8301856116ce565b6116fd6020830184611323565b9392505050565b5f6117108284866115cb565b91508190509392505050565b5f8160f81b9050919050565b5f6117328261171c565b9050919050565b61174a61174582610f1d565b611728565b82525050565b5f61175b8288611739565b60018201915061176b828761159c565b60148201915061177c8285876115cb565b9150611788828461159c565b6014820191508190509695505050505050565b7f4e487b71000000000000000000000000000000000000000000000000000000005f52604160045260245ffd5b5f819050815f5260205f209050919050565b5f6020601f8301049050919050565b5f82821b905092915050565b5f600883026118247fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff826117e9565b61182e86836117e9565b95508019841693508086168417925050509392505050565b5f819050919050565b5f61186961186461185f84611846565b610f5c565b611846565b9050919050565b5f819050919050565b6118828361184f565b61189661188e82611870565b8484546117f5565b825550505050565b5f90565b6118aa61189e565b6118b5818484611879565b505050565b5b818110156118d8576118cd5f826118a2565b6001810190506118bb565b5050565b601f82111561191d576118ee816117c8565b6118f7846117da565b81016020851015611906578190505b61191a611912856117da565b8301826118ba565b50505b505050565b5f82821c905092915050565b5f61193d5f1984600802611922565b1980831691505092915050565b5f611955838361192e565b9150826002028217905092915050565b61196e82610fd7565b67ffffffffffffffff8111156119875761198661179b565b5b611991825461153e565b61199c8282856118dc565b5f60209050601f8311600181146119cd575f84156119bb578287015190505b6119c5858261194a565b865550611a2c565b601f1984166119db866117c8565b5f5b82811015611a02578489015182556001820191506020850194506020810190506119dd565b86831015611a1f5784890151611a1b601f89168261192e565b8355505b6001600288020188555050505b505050505050565b5f604082019050611a475f8301856116a6565b611a5460208301846111f3565b9392505050565b5f819050919050565b611a75611a7082610e6c565b611a5b565b82525050565b5f611a868285611739565b600182019150611a968284611a64565b6020820191508190509392505050565b5f81519050919050565b5f82825260208201905092915050565b5f611aca82611aa6565b611ad48185611ab0565b9350611ae4818560208601610ff1565b611aed81610fff565b840191505092915050565b5f6020820190508181035f830152611b108184611ac0565b90509291505056fea264697066735822122072804537eed515463718e40a409974931303991920c5bbf276314028cc3ef6e764736f6c634300081a0033", Y = _[11155111], g = {
7
+ ..._,
8
+ 31337: void 0
9
+ };
10
+ function O(t) {
11
+ return t.address && S(t.address);
8
12
  }
9
- function _(d) {
10
- return d.address === null;
13
+ function T(t) {
14
+ return t.address === null;
11
15
  }
12
- class V extends A {
16
+ const n = class n extends B {
17
+ /**
18
+ * A getter that will return Boost registry's static addresses by numerical chain ID
19
+ *
20
+ * @public
21
+ * @readonly
22
+ * @type {Record<number, Address>}
23
+ */
24
+ get addresses() {
25
+ return this.constructor.addresses;
26
+ }
13
27
  /**
14
28
  * Creates an instance of BoostRegistry.
15
29
  *
@@ -20,8 +34,18 @@ class V extends A {
20
34
  * @param {?Account} [param0.account] - [Viem Local Account](https://viem.sh/docs/accounts/local)
21
35
  * @param {({ address?: Address; } | {})} param0....options
22
36
  */
23
- constructor({ config: b, account: f, ...a }) {
24
- R(a) && a.address ? super({ account: f, config: b }, a.address) : _(a) ? super({ account: f, config: b }, []) : super({ account: f, config: b }, m);
37
+ constructor({ config: e, account: f, ...b }) {
38
+ if (O(b) && b.address)
39
+ super({ account: f, config: e }, b.address);
40
+ else if (T(b))
41
+ super({ account: f, config: e }, []);
42
+ else {
43
+ const { address: d } = c(
44
+ e,
45
+ g
46
+ );
47
+ super({ account: f, config: e }, d);
48
+ }
25
49
  }
26
50
  /**
27
51
  * Register a new base implementation of a given type
@@ -31,16 +55,16 @@ class V extends A {
31
55
  * @param {RegistryType} registryType - The base type for the implementation
32
56
  * @param {string} name - A name for the implementation (must be unique within the given type)
33
57
  * @param {Address} implementation - The address of the implementation contract
34
- * @param {?WriteParams<typeof boostRegistryAbi, 'register'>} [params] - Optional params to provide the underlying Viem contract call
35
- * @returns {unknown}
58
+ * @param {?WriteParams} [params] - Optional params to provide the underlying Viem contract call
59
+ * @returns {Promise<void>}
36
60
  * @example
37
61
  * ```ts
38
62
  * await registry.register(ContractAction.registryType, 'ContractAction', ContractAction.base)
39
63
  * ```
40
64
  */
41
- async register(b, f, a, e) {
42
- return this.awaitResult(
43
- this.registerRaw(b, f, a, e)
65
+ async register(e, f, b, d) {
66
+ return await this.awaitResult(
67
+ this.registerRaw(e, f, b, d)
44
68
  );
45
69
  }
46
70
  /**
@@ -50,21 +74,42 @@ class V extends A {
50
74
  * @param {RegistryType} registryType
51
75
  * @param {string} name
52
76
  * @param {Address} implementation
53
- * @param {?WriteParams<typeof boostRegistryAbi, 'register'>} [params]
54
- * @returns {unknown}
77
+ * @param {?WriteParams} [params]
78
+ * @returns {Promise<{ hash: `0x${string}`; result: void; }>}
55
79
  */
56
- async registerRaw(b, f, a, e) {
57
- const { request: c, result: s } = await o(
80
+ async registerRaw(e, f, b, d) {
81
+ var s;
82
+ const { request: a, result: i } = await A(
58
83
  this._config,
59
84
  {
60
- address: this.assertValidAddress(),
61
- args: [b, f, a],
85
+ ...c(
86
+ this._config,
87
+ this.addresses,
88
+ ((s = d == null ? void 0 : d.chain) == null ? void 0 : s.id) || (d == null ? void 0 : d.chainId)
89
+ ),
90
+ args: [e, f, b],
62
91
  ...this.optionallyAttachAccount(),
63
92
  // biome-ignore lint/suspicious/noExplicitAny: Accept any shape of valid wagmi/viem parameters, wagmi does the same thing internally
64
- ...e
93
+ ...d
65
94
  }
66
95
  );
67
- return { hash: await n(this._config, c), result: s };
96
+ return { hash: await w(this._config, a), result: i };
97
+ }
98
+ /**
99
+ * Initialize a new instance of a registered base implementation, returning the provided target with a new address set on it.
100
+ * This method is the same as `clone`, but serves to make its function more obvious as to why you'd need to use it.
101
+ *
102
+ * @public
103
+ * @async
104
+ * @template {DeployableTarget} Target
105
+ * @param {string} displayName - The display name for the clone
106
+ * @param {Target} target - An instance of a target contract to clone and initialize
107
+ * @param {?WriteParams} [params]
108
+ * @returns {Promise<Target>} - The provided instance, but with a new address attached.
109
+ * biome-ignore lint/suspicious/noExplicitAny: any deployable target will suffice
110
+ */
111
+ initialize(e, f, b) {
112
+ return this.clone(e, f, b);
68
113
  }
69
114
  /**
70
115
  * Deploy a new instance of a registered base implementation, returning the provided target with a new address set on it.
@@ -74,13 +119,13 @@ class V extends A {
74
119
  * @template {DeployableTarget} Target
75
120
  * @param {string} displayName - The display name for the clone
76
121
  * @param {Target} target - An instance of a target contract to clone and initialize
77
- * @param {?WriteParams<typeof boostRegistryAbi, 'deployClone'>} [params]
78
- * @returns {Target} - The provided instance, but with a new address attached.
122
+ * @param {?WriteParams} [params]
123
+ * @returns {Promise<Target>} - The provided instance, but with a new address attached.
79
124
  * biome-ignore lint/suspicious/noExplicitAny: any deployable target will suffice
80
125
  */
81
- async clone(b, f, a) {
82
- const e = await this.deployClone(b, f, a);
83
- return f.at(e);
126
+ async clone(e, f, b) {
127
+ const d = await this.deployClone(e, f, b);
128
+ return f.at(d);
84
129
  }
85
130
  /**
86
131
  *
@@ -90,12 +135,14 @@ class V extends A {
90
135
  * @template {DeployableTarget} Target
91
136
  * @param {string} displayName
92
137
  * @param {Target} target
93
- * @param {?WriteParams<typeof boostRegistryAbi, 'deployClone'>} [params]
94
- * @returns {Target}
138
+ * @param {?WriteParams} [params]
139
+ * @returns {Promise<Address>}
95
140
  * biome-ignore lint/suspicious/noExplicitAny: any deployable target will suffice
96
141
  */
97
- async deployClone(b, f, a) {
98
- return this.awaitResult(this.deployCloneRaw(b, f, a));
142
+ async deployClone(e, f, b) {
143
+ return await this.awaitResult(
144
+ this.deployCloneRaw(e, f, b)
145
+ );
99
146
  }
100
147
  /**
101
148
  * @see {@link clone}
@@ -103,30 +150,34 @@ class V extends A {
103
150
  * @async
104
151
  * @param {string} displayName
105
152
  * @param {DeployableTarget} target
106
- * @param {?WriteParams<typeof boostRegistryAbi, 'deployClone'>} [params]
107
- * @returns {unknown} - The transaction hash
153
+ * @param {?WriteParams} [params]
154
+ * @returns {Promise<{ hash: Hex, result: Address }>} - The transaction hash
108
155
  * biome-ignore lint/suspicious/noExplicitAny: any deployable target will suffice
109
156
  */
110
- async deployCloneRaw(b, f, a) {
111
- const e = f.buildParameters(void 0, {
157
+ async deployCloneRaw(e, f, b) {
158
+ var h, l;
159
+ const d = f.buildParameters(void 0, {
112
160
  config: this._config,
113
161
  account: this._account
114
- }), { request: c, result: s } = await l(
162
+ }), { address: a } = c(
163
+ this._config,
164
+ f.bases,
165
+ ((h = b == null ? void 0 : b.chain) == null ? void 0 : h.id) || (b == null ? void 0 : b.chainId)
166
+ ), { request: i, result: o } = await I(
115
167
  this._config,
116
168
  {
117
- address: this.assertValidAddress(),
118
- args: [
119
- f.registryType,
120
- f.base,
121
- b,
122
- e.args.at(0)
123
- ],
169
+ ...c(
170
+ this._config,
171
+ this.addresses,
172
+ ((l = b == null ? void 0 : b.chain) == null ? void 0 : l.id) || (b == null ? void 0 : b.chainId)
173
+ ),
174
+ args: [f.registryType, a, e, d.args[0]],
124
175
  ...this.optionallyAttachAccount(),
125
176
  // biome-ignore lint/suspicious/noExplicitAny: Accept any shape of valid wagmi/viem parameters, wagmi does the same thing internally
126
- ...a
177
+ ...b
127
178
  }
128
179
  );
129
- return { hash: await h(this._config, c), result: s };
180
+ return { hash: await R(this._config, i), result: o };
130
181
  }
131
182
  /**
132
183
  * Get the address of a registered base implementation.
@@ -135,31 +186,39 @@ class V extends A {
135
186
  * @public
136
187
  * @async
137
188
  * @param {Hex} identifier - The unique identifier for the implementation (see {getIdentifier})
138
- * @param {?ReadParams<typeof boostRegistryAbi, 'getBaseImplementation'>} [params]
139
- * @returns {unknown} - The address of the implementation
189
+ * @param {?ReadParams} [params]
190
+ * @returns {Promise<Address>} - The address of the implementation
140
191
  */
141
- async getBaseImplementation(b, f) {
142
- return t(this._config, {
143
- address: this.assertValidAddress(),
144
- args: [b],
192
+ async getBaseImplementation(e, f) {
193
+ return await u(this._config, {
194
+ ...c(
195
+ this._config,
196
+ this.addresses,
197
+ f == null ? void 0 : f.chainId
198
+ ),
199
+ args: [e],
145
200
  ...this.optionallyAttachAccount(),
146
201
  // biome-ignore lint/suspicious/noExplicitAny: Accept any shape of valid wagmi/viem parameters, wagmi does the same thing internally
147
202
  ...f
148
203
  });
149
204
  }
150
205
  /**
151
- * Get the address of a deployed clone by its identifier (index in incentives array)
206
+ * Get the address of a deployed clone by its identifier
152
207
  *
153
208
  * @public
154
209
  * @async
155
210
  * @param {Hex} identifier - The unique identifier for the deployed clone (see {getCloneIdentifier})
156
- * @param {?ReadParams<typeof boostRegistryAbi, 'getClone'>} [params]
211
+ * @param {?ReadParams} [params]
157
212
  * @returns {Promise<Address>} - The address of the deployed clone
158
213
  */
159
- async getClone(b, f) {
160
- return t(this._config, {
161
- address: this.assertValidAddress(),
162
- args: [b],
214
+ async getClone(e, f) {
215
+ return await u(this._config, {
216
+ ...c(
217
+ this._config,
218
+ this.addresses,
219
+ f == null ? void 0 : f.chainId
220
+ ),
221
+ args: [e],
163
222
  ...this.optionallyAttachAccount(),
164
223
  // biome-ignore lint/suspicious/noExplicitAny: Accept any shape of valid wagmi/viem parameters, wagmi does the same thing internally
165
224
  ...f
@@ -171,13 +230,17 @@ class V extends A {
171
230
  * @public
172
231
  * @async
173
232
  * @param {Address} deployer - The address of the deployer
174
- * @param {?ReadParams<typeof boostRegistryAbi, 'getClones'>} [params]
175
- * @returns {Promise<Address[]>} - The list of deployed clones for the given deployer
233
+ * @param {?ReadParams} [params]
234
+ * @returns {Promise<Hex[]>} - The list of deployed clones for the given deployer
176
235
  */
177
- async getClones(b, f) {
178
- return y(this._config, {
179
- address: this.assertValidAddress(),
180
- args: [b],
236
+ async getClones(e, f) {
237
+ return await C(this._config, {
238
+ ...c(
239
+ this._config,
240
+ this.addresses,
241
+ f == null ? void 0 : f.chainId
242
+ ),
243
+ args: [e],
181
244
  ...this.optionallyAttachAccount(),
182
245
  // biome-ignore lint/suspicious/noExplicitAny: Accept any shape of valid wagmi/viem parameters, wagmi does the same thing internally
183
246
  ...f
@@ -192,16 +255,20 @@ class V extends A {
192
255
  * @param {Address} base - The address of the base implementation
193
256
  * @param {Address} deployer - The address of the deployer
194
257
  * @param {string} displayName - The display name of the clone
195
- * @param {?ReadParams<typeof boostRegistryAbi, 'getCloneIdentifier'>} [params]
258
+ * @param {?ReadParams} [params]
196
259
  * @returns {Promise<Hex>} - The unique identifier for the clone
197
260
  */
198
- async getCloneIdentifier(b, f, a, e, c) {
199
- return r(this._config, {
200
- address: this.assertValidAddress(),
201
- args: [b, f, a, e],
261
+ async getCloneIdentifier(e, f, b, d, a) {
262
+ return await r(this._config, {
263
+ ...c(
264
+ this._config,
265
+ this.addresses,
266
+ a == null ? void 0 : a.chainId
267
+ ),
268
+ args: [e, f, b, d],
202
269
  ...this.optionallyAttachAccount(),
203
270
  // biome-ignore lint/suspicious/noExplicitAny: Accept any shape of valid wagmi/viem parameters, wagmi does the same thing internally
204
- ...c
271
+ ...a
205
272
  });
206
273
  }
207
274
  /**
@@ -211,16 +278,20 @@ class V extends A {
211
278
  * @async
212
279
  * @param {RegistryType} registryType - The base type for the implementation
213
280
  * @param {string} displayName - The name of the implementation
214
- * @param {?ReadParams<typeof boostRegistryAbi, 'getIdentifier'>} [params]
281
+ * @param {?ReadParams} [params]
215
282
  * @returns {Promise<Hex>} - The unique identifier for the implementation
216
283
  */
217
- async getIdentifier(b, f, a) {
218
- return r(this._config, {
219
- address: this.assertValidAddress(),
220
- args: [b, f],
284
+ async getIdentifier(e, f, b) {
285
+ return await r(this._config, {
286
+ ...c(
287
+ this._config,
288
+ this.addresses,
289
+ b == null ? void 0 : b.chainId
290
+ ),
291
+ args: [e, f],
221
292
  ...this.optionallyAttachAccount(),
222
293
  // biome-ignore lint/suspicious/noExplicitAny: Accept any shape of valid wagmi/viem parameters, wagmi does the same thing internally
223
- ...a
294
+ ...b
224
295
  });
225
296
  }
226
297
  /**
@@ -231,20 +302,23 @@ class V extends A {
231
302
  * @param {?DeployableOptions} [_options]
232
303
  * @returns {GenericDeployableParams}
233
304
  */
234
- buildParameters(b, f) {
235
- const [, a] = this.validateDeploymentConfig([], f);
305
+ buildParameters(e, f) {
306
+ const [, b] = this.validateDeploymentConfig([], f);
236
307
  return {
237
- abi: u,
238
- bytecode: p,
308
+ abi: D,
309
+ bytecode: E,
239
310
  // biome-ignore lint/suspicious/noExplicitAny: Registry doesn't construct or initialize
240
311
  args: [],
241
- ...this.optionallyAttachAccount(a.account)
312
+ ...this.optionallyAttachAccount(b.account)
242
313
  };
243
314
  }
244
- }
315
+ };
316
+ n.addresses = g;
317
+ let y = n;
245
318
  export {
246
- m as BOOST_REGISTRY_ADDRESS,
247
- V as BoostRegistry,
248
- T as RegistryType,
249
- u as boostRegistryAbi
319
+ Y as BOOST_REGISTRY_ADDRESS,
320
+ g as BOOST_REGISTRY_ADDRESSES,
321
+ y as BoostRegistry,
322
+ D as boostRegistryAbi
250
323
  };
324
+ //# sourceMappingURL=BoostRegistry.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"BoostRegistry.js","sources":["../src/BoostRegistry.ts"],"sourcesContent":["import {\n boostRegistryAbi,\n readBoostRegistryGetBaseImplementation,\n readBoostRegistryGetCloneIdentifier,\n readBoostRegistryGetClones,\n simulateBoostRegistryDeployClone,\n simulateBoostRegistryRegister,\n writeBoostRegistryDeployClone,\n writeBoostRegistryRegister,\n} from '@boostxyz/evm';\nimport { bytecode } from '@boostxyz/evm/artifacts/contracts/BoostRegistry.sol/BoostRegistry.json';\nimport {\n type Address,\n type ContractEventName,\n type Hex,\n isAddress,\n zeroAddress,\n} from 'viem';\nimport { BoostRegistry as BoostRegistryBases } from '../dist/deployments.json';\nimport {\n Deployable,\n type DeployableOptions,\n type GenericDeployableParams,\n} from './Deployable/Deployable';\nimport type { DeployableTarget } from './Deployable/DeployableTarget';\nimport {\n type GenericLog,\n type HashAndSimulatedResult,\n type ReadParams,\n type RegistryType,\n type WriteParams,\n assertValidAddressByChainId,\n} from './utils';\n\n/**\n * The ABI of the BoostRegistry contract, if needed for low level operations\n *\n * @type {typeof boostRegistryAbi}\n */\nexport { boostRegistryAbi };\n\n/**\n * The address of the deployed `BoostRegistry` instance. In prerelease mode, this will be its sepolia address\n *\n * @type {Address}\n */\nexport const BOOST_REGISTRY_ADDRESS =\n (BoostRegistryBases as Record<string, Address>)[__DEFAULT_CHAIN_ID__] ||\n zeroAddress;\n\n/**\n * The fixed addresses for the deployed Boost Registry.\n * By default, `new BoostRegistry` will use the address deployed to the currently connected chain, or `BOOST_REGISTRY_ADDRESS` if not provided.\n *\n * @type {Record<number, Address>}\n */\nexport const BOOST_REGISTRY_ADDRESSES: Record<number, Address> = {\n ...(BoostRegistryBases as Record<number, Address>),\n 31337: import.meta.env.VITE_BOOST_REGISTRY_ADDRESS,\n};\n\n/**\n * A record of `BoostRegistry` event names to `AbiEvent` objects for use with `getLogs`\n *\n * @export\n * @typedef {BoostRegistryLog}\n * @template {ContractEventName<typeof boostRegistryAbi>} [event=ContractEventName<\n * typeof boostRegistryAbi\n * >]\n */\nexport type BoostRegistryLog<\n event extends ContractEventName<typeof boostRegistryAbi> = ContractEventName<\n typeof boostRegistryAbi\n >,\n> = GenericLog<typeof boostRegistryAbi, event>;\n\n/**\n * Instantiation options for a previously deployed Boost Registry\n *\n * @export\n * @interface BoostRegistryDeployedOptions\n * @typedef {BoostRegistryDeployedOptions}\n * @extends {DeployableOptions}\n */\nexport interface BoostRegistryDeployedOptions extends DeployableOptions {\n /**\n * The address for a Boost Registry, if different than `BOOST_REGISTRY_ADDRESS`\n *\n * @type {?Address}\n */\n address?: Address;\n}\n\n/**\n * A typeguard to determine if instantiation is using a custom address.\n *\n * @param {*} opts\n * @returns {opts is BoostRegistryDeployedOptions}\n */\nfunction isBoostRegistryDeployed(\n // biome-ignore lint/suspicious/noExplicitAny: type guard\n opts: any,\n): opts is BoostRegistryDeployedOptions {\n return opts.address && isAddress(opts.address);\n}\n\n/**\n * The Boost Registry does not take any construction arguments, so if you'd like to deploy a new Boost Registry, pass an explicit null to the `address` field.\n *\n * @export\n * @interface BoostRegistryOptionsWithPayload\n * @typedef {BoostRegistryOptionsWithPayload}\n * @extends {DeployableOptions}\n */\nexport interface BoostRegistryOptionsWithPayload extends DeployableOptions {\n /**\n *\n * @type {null}\n */\n address: null;\n}\n\n/**\n * A typeguard to determine if the user is intending to deploy a new Boost Registry before usage\n *\n * @param {*} opts\n * @returns {opts is BoostRegistryOptionsWithPayload}\n */\nfunction isBoostRegistryDeployable(\n // biome-ignore lint/suspicious/noExplicitAny: type guard\n opts: any,\n): opts is BoostRegistryOptionsWithPayload {\n return opts.address === null;\n}\n\n/**\n * Instantiation options for a Boost Registry.\n *\n * @example\n * To target Boost's Registry, omit the address field.\n * Otherwise, supply a custom address to a previously deployed custom Boost Registry.\n * You can also pass `{ address: null }` if you are intending to deploy a new Boost Registry.\n * ```ts\n * let registry = new BoostRegistry({ config, account })\n * // or\n * registry = new BoostRegistry({ config, account, address: CUSTOM_ADDRESS })\n * // or\n * registry = new BoostRegistry({ config, account, address: null })\n * await registry.deploy()\n * ```\n *\n * @export\n * @typedef {BoostRegistryConfig}\n */\nexport type BoostRegistryConfig =\n | BoostRegistryDeployedOptions\n | BoostRegistryOptionsWithPayload;\n\n/**\n * Constructs a new Boost Registry. A registry for base implementations and cloned instances.\n * This contract is used to register base implementations and deploy new instances of those implementations for use within the Boost protocol.\n *\n * @see {@link BoostRegistryConfig}\n * @export\n * @class BoostRegistry\n * @typedef {BoostRegistry}\n * @extends {Deployable<never[]>}\n */\nexport class BoostRegistry extends Deployable<\n never[],\n typeof boostRegistryAbi\n> {\n /**\n * A static property representing a map of stringified chain ID's to the address of the deployed implementation on chain\n *\n * @static\n * @readonly\n * @type {Record<string, Address>}\n */\n static readonly addresses: Record<number, Address> = BOOST_REGISTRY_ADDRESSES;\n\n /**\n * A getter that will return Boost registry's static addresses by numerical chain ID\n *\n * @public\n * @readonly\n * @type {Record<number, Address>}\n */\n public get addresses(): Record<number, Address> {\n return (this.constructor as typeof BoostRegistry).addresses;\n }\n\n /**\n * Creates an instance of BoostRegistry.\n *\n * @see {@link BoostRegistryConfig}\n * @constructor\n * @param {BoostRegistryConfig} param0\n * @param {Config} param0.config - [Wagmi Configuration](https://wagmi.sh/core/api/createConfig)\n * @param {?Account} [param0.account] - [Viem Local Account](https://viem.sh/docs/accounts/local)\n * @param {({ address?: Address; } | {})} param0....options\n */\n constructor({ config, account, ...options }: BoostRegistryConfig) {\n if (isBoostRegistryDeployed(options) && options.address) {\n super({ account, config }, options.address);\n } else if (isBoostRegistryDeployable(options)) {\n super({ account, config }, []);\n } else {\n const { address } = assertValidAddressByChainId(\n config,\n BOOST_REGISTRY_ADDRESSES,\n );\n super({ account, config }, address);\n }\n }\n\n /**\n * Register a new base implementation of a given type\n *\n * @public\n * @async\n * @param {RegistryType} registryType - The base type for the implementation\n * @param {string} name - A name for the implementation (must be unique within the given type)\n * @param {Address} implementation - The address of the implementation contract\n * @param {?WriteParams} [params] - Optional params to provide the underlying Viem contract call\n * @returns {Promise<void>}\n * @example\n * ```ts\n * await registry.register(ContractAction.registryType, 'ContractAction', ContractAction.base)\n * ```\n */\n public async register(\n registryType: RegistryType,\n name: string,\n implementation: Address,\n params?: WriteParams<typeof boostRegistryAbi, 'register'>,\n ) {\n return await this.awaitResult(\n this.registerRaw(registryType, name, implementation, params),\n );\n }\n\n /**\n * @see {@link register}\n * @public\n * @async\n * @param {RegistryType} registryType\n * @param {string} name\n * @param {Address} implementation\n * @param {?WriteParams} [params]\n * @returns {Promise<{ hash: `0x${string}`; result: void; }>}\n */\n public async registerRaw(\n registryType: RegistryType,\n name: string,\n implementation: Address,\n params?: WriteParams<typeof boostRegistryAbi, 'register'>,\n ) {\n const { request, result } = await simulateBoostRegistryRegister(\n this._config,\n {\n ...assertValidAddressByChainId(\n this._config,\n this.addresses,\n params?.chain?.id || params?.chainId,\n ),\n args: [registryType, name, implementation],\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 writeBoostRegistryRegister(this._config, request);\n return { hash, result };\n }\n\n /**\n * Initialize a new instance of a registered base implementation, returning the provided target with a new address set on it.\n * This method is the same as `clone`, but serves to make its function more obvious as to why you'd need to use it.\n *\n * @public\n * @async\n * @template {DeployableTarget} Target\n * @param {string} displayName - The display name for the clone\n * @param {Target} target - An instance of a target contract to clone and initialize\n * @param {?WriteParams} [params]\n * @returns {Promise<Target>} - The provided instance, but with a new address attached.\n * biome-ignore lint/suspicious/noExplicitAny: any deployable target will suffice\n */\n public initialize<Target extends DeployableTarget<any, any>>(\n displayName: string,\n target: Target,\n params?: WriteParams<typeof boostRegistryAbi, 'deployClone'>,\n ): Promise<Target> {\n return this.clone(displayName, target, params);\n }\n\n /**\n * Deploy a new instance of a registered base implementation, returning the provided target with a new address set on it.\n *\n * @public\n * @async\n * @template {DeployableTarget} Target\n * @param {string} displayName - The display name for the clone\n * @param {Target} target - An instance of a target contract to clone and initialize\n * @param {?WriteParams} [params]\n * @returns {Promise<Target>} - The provided instance, but with a new address attached.\n * biome-ignore lint/suspicious/noExplicitAny: any deployable target will suffice\n */\n public async clone<Target extends DeployableTarget<any, any>>(\n displayName: string,\n target: Target,\n params?: WriteParams<typeof boostRegistryAbi, 'deployClone'>,\n ): Promise<Target> {\n const instance = await this.deployClone(displayName, target, params);\n return target.at(instance);\n }\n\n /**\n *\n * @see {@link clone}\n * @public\n * @async\n * @template {DeployableTarget} Target\n * @param {string} displayName\n * @param {Target} target\n * @param {?WriteParams} [params]\n * @returns {Promise<Address>}\n * biome-ignore lint/suspicious/noExplicitAny: any deployable target will suffice\n */\n public async deployClone<Target extends DeployableTarget<any, any>>(\n displayName: string,\n target: Target,\n params?: WriteParams<typeof boostRegistryAbi, 'deployClone'>,\n ): Promise<Address> {\n return await this.awaitResult(\n this.deployCloneRaw(displayName, target, params),\n );\n }\n\n /**\n * @see {@link clone}\n * @public\n * @async\n * @param {string} displayName\n * @param {DeployableTarget} target\n * @param {?WriteParams} [params]\n * @returns {Promise<{ hash: Hex, result: Address }>} - The transaction hash\n * biome-ignore lint/suspicious/noExplicitAny: any deployable target will suffice\n */\n public async deployCloneRaw<Target extends DeployableTarget<any, any>>(\n displayName: string,\n target: Target,\n params?: WriteParams<typeof boostRegistryAbi, 'deployClone'>,\n ): Promise<HashAndSimulatedResult<Address>> {\n const payload = target.buildParameters(undefined, {\n config: this._config,\n account: this._account,\n });\n const { address: baseAddress } = assertValidAddressByChainId(\n this._config,\n target.bases,\n params?.chain?.id || params?.chainId,\n );\n const { request, result } = await simulateBoostRegistryDeployClone(\n this._config,\n {\n ...assertValidAddressByChainId(\n this._config,\n this.addresses,\n params?.chain?.id || params?.chainId,\n ),\n args: [target.registryType, baseAddress, displayName, payload.args[0]],\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 writeBoostRegistryDeployClone(this._config, request);\n return { hash, result };\n }\n\n /**\n * Get the address of a registered base implementation.\n * This function will revert if the implementation is not registered\n *\n * @public\n * @async\n * @param {Hex} identifier - The unique identifier for the implementation (see {getIdentifier})\n * @param {?ReadParams} [params]\n * @returns {Promise<Address>} - The address of the implementation\n */\n public async getBaseImplementation(\n identifier: Hex,\n params?: ReadParams<typeof boostRegistryAbi, 'getBaseImplementation'>,\n ) {\n return await readBoostRegistryGetBaseImplementation(this._config, {\n ...assertValidAddressByChainId(\n this._config,\n this.addresses,\n params?.chainId,\n ),\n args: [identifier],\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 * Get the address of a deployed clone by its identifier\n *\n * @public\n * @async\n * @param {Hex} identifier - The unique identifier for the deployed clone (see {getCloneIdentifier})\n * @param {?ReadParams} [params]\n * @returns {Promise<Address>} - The address of the deployed clone\n */\n public async getClone(\n identifier: Hex,\n params?: ReadParams<typeof boostRegistryAbi, 'getClone'>,\n ) {\n return await readBoostRegistryGetBaseImplementation(this._config, {\n ...assertValidAddressByChainId(\n this._config,\n this.addresses,\n params?.chainId,\n ),\n args: [identifier],\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 * Get the list of identifiers of deployed clones for a given deployer\n *\n * @public\n * @async\n * @param {Address} deployer - The address of the deployer\n * @param {?ReadParams} [params]\n * @returns {Promise<Hex[]>} - The list of deployed clones for the given deployer\n */\n public async getClones(\n deployer: Address,\n params?: ReadParams<typeof boostRegistryAbi, 'getClones'>,\n ) {\n return await readBoostRegistryGetClones(this._config, {\n ...assertValidAddressByChainId(\n this._config,\n this.addresses,\n params?.chainId,\n ),\n args: [deployer],\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 * Build the identifier for a clone of a base implementation\n *\n * @public\n * @async\n * @param {RegistryType} registryType - The base type for the implementation\n * @param {Address} base - The address of the base implementation\n * @param {Address} deployer - The address of the deployer\n * @param {string} displayName - The display name of the clone\n * @param {?ReadParams} [params]\n * @returns {Promise<Hex>} - The unique identifier for the clone\n */\n public async getCloneIdentifier(\n registryType: RegistryType,\n base: Address,\n deployer: Address,\n displayName: string,\n params?: ReadParams<typeof boostRegistryAbi, 'getCloneIdentifier'>,\n ) {\n return await readBoostRegistryGetCloneIdentifier(this._config, {\n ...assertValidAddressByChainId(\n this._config,\n this.addresses,\n params?.chainId,\n ),\n args: [registryType, base, deployer, displayName],\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 * Build the identifier for a base implementation\n *\n * @public\n * @async\n * @param {RegistryType} registryType - The base type for the implementation\n * @param {string} displayName - The name of the implementation\n * @param {?ReadParams} [params]\n * @returns {Promise<Hex>} - The unique identifier for the implementation\n */\n public async getIdentifier(\n registryType: RegistryType,\n displayName: string,\n params?: ReadParams<typeof boostRegistryAbi, 'getIdentifier'>,\n ) {\n return await readBoostRegistryGetCloneIdentifier(this._config, {\n ...assertValidAddressByChainId(\n this._config,\n this.addresses,\n params?.chainId,\n ),\n args: [registryType, displayName],\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 * @inheritdoc\n *\n * @public\n * @param {?never[]} [_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: boostRegistryAbi,\n bytecode: bytecode as Hex,\n // biome-ignore lint/suspicious/noExplicitAny: Registry doesn't construct or initialize\n args: [] as any,\n ...this.optionallyAttachAccount(options.account),\n };\n }\n}\n"],"names":["BOOST_REGISTRY_ADDRESS","BoostRegistryBases","BOOST_REGISTRY_ADDRESSES","isBoostRegistryDeployed","opts","isAddress","isBoostRegistryDeployable","_BoostRegistry","Deployable","config","account","options","address","assertValidAddressByChainId","registryType","name","implementation","params","request","result","simulateBoostRegistryRegister","_a","writeBoostRegistryRegister","displayName","target","instance","payload","baseAddress","simulateBoostRegistryDeployClone","_b","writeBoostRegistryDeployClone","identifier","readBoostRegistryGetBaseImplementation","deployer","readBoostRegistryGetClones","base","readBoostRegistryGetCloneIdentifier","_payload","_options","boostRegistryAbi","bytecode","BoostRegistry"],"mappings":"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"}
@@ -1 +1,2 @@
1
- "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const c=require("../generated-BaaleHW-.cjs"),d=require("@wagmi/core"),u=require("../errors.cjs"),a=require("./ManagedBudget.cjs"),e={"0xa0109882":a.ManagedBudget};async function g(t,n){const r=await d.readContract(t.config,{abi:c.z,functionName:"getComponentInterface",address:n}),o=e[r];if(!o)throw new u.InvalidComponentInterfaceError(Object.keys(e),r);return new o(t,n)}exports.ManagedBudget=a.ManagedBudget;exports.BudgetByComponentInterface=e;exports.budgetFromAddress=g;
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const c=require("../generated-B0tk-c9b.cjs"),d=require("../componentInterfaces-D09mhzxO.cjs"),u=require("@wagmi/core"),g=require("../errors.cjs"),a=require("./ManagedBudget.cjs"),e={[d.AManagedBudget]:a.ManagedBudget};async function i(t,n){const r=await u.readContract(t.config,{abi:c.y,functionName:"getComponentInterface",address:n}),o=e[r];if(!o)throw new g.InvalidComponentInterfaceError(Object.keys(e),r);return new o(t,n)}exports.ManagedBudget=a.ManagedBudget;exports.BudgetByComponentInterface=e;exports.budgetFromAddress=i;
2
+ //# sourceMappingURL=Budget.cjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"Budget.cjs","sources":["../../src/Budgets/Budget.ts"],"sourcesContent":["import { aBudgetAbi } from '@boostxyz/evm';\nimport { AManagedBudget } 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 { ManagedBudget } from './ManagedBudget';\n\nexport {\n // VestingBudget,\n ManagedBudget,\n};\n\n/**\n * A union type representing all valid protocol Budget implementations\n *\n * @export\n * @typedef {Budget}\n */\nexport type Budget = ManagedBudget; // | VestingBudget\n\n/**\n * A map of Budget component interfaces to their constructors.\n *\n * @type {{ \"0xa0109882\": typeof ManagedBudget; }}\n */\nexport const BudgetByComponentInterface = {\n // ['0x64683da1']: VestingBudget,\n // ['0x2929d19c']: SimpleBudget,\n [AManagedBudget as Hex]: ManagedBudget,\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<ManagedBudget>}\n * @throws {@link InvalidComponentInterfaceError}\n */\nexport async function budgetFromAddress(\n options: DeployableOptions,\n address: Address,\n) {\n const interfaceId = (await readContract(options.config, {\n abi: aBudgetAbi,\n functionName: 'getComponentInterface',\n address,\n })) as keyof typeof BudgetByComponentInterface;\n const Ctor = BudgetByComponentInterface[interfaceId];\n if (!Ctor) {\n throw new InvalidComponentInterfaceError(\n Object.keys(BudgetByComponentInterface) as Hex[],\n interfaceId as Hex,\n );\n }\n return new Ctor(options, address);\n}\n"],"names":["BudgetByComponentInterface","AManagedBudget","ManagedBudget","budgetFromAddress","options","address","interfaceId","readContract","aBudgetAbi","Ctor","InvalidComponentInterfaceError"],"mappings":"mQA0BaA,EAA6B,CAGxC,CAACC,EAAqB,cAAA,EAAGC,EAAA,aAC3B,EAYsB,eAAAC,EACpBC,EACAC,EACA,CACA,MAAMC,EAAe,MAAMC,eAAaH,EAAQ,OAAQ,CACtD,IAAKI,EAAA,EACL,aAAc,wBACd,QAAAH,CAAA,CACD,EACKI,EAAOT,EAA2BM,CAAW,EACnD,GAAI,CAACG,EACH,MAAM,IAAIC,EAAA,+BACR,OAAO,KAAKV,CAA0B,EACtCM,CAAA,EAGG,OAAA,IAAIG,EAAKL,EAASC,CAAO,CAClC"}
@@ -15,7 +15,7 @@ export type Budget = ManagedBudget;
15
15
  * @type {{ "0xa0109882": typeof ManagedBudget; }}
16
16
  */
17
17
  export declare const BudgetByComponentInterface: {
18
- "0xa0109882": typeof ManagedBudget;
18
+ [x: string]: typeof ManagedBudget;
19
19
  };
20
20
  /**
21
21
  * A function that will read a contract's component interface using `getComponentInterface` and return the correct instantiated instance.
@@ -1 +1 @@
1
- {"version":3,"file":"Budget.d.ts","sourceRoot":"","sources":["../../src/Budgets/Budget.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,OAAO,EAAO,MAAM,MAAM,CAAC;AACzC,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,0BAA0B,CAAC;AAElE,OAAO,EAAE,aAAa,EAAE,MAAM,iBAAiB,CAAC;AAEhD,OAAO,EAGL,aAAa,GACd,CAAC;AAEF;;;;;GAKG;AACH,MAAM,MAAM,MAAM,GAAG,aAAa,CAAC;AAEnC;;;;GAIG;AACH,eAAO,MAAM,0BAA0B;;CAItC,CAAC;AAEF;;;;;;;;;GASG;AACH,wBAAsB,iBAAiB,CACrC,OAAO,EAAE,iBAAiB,EAC1B,OAAO,EAAE,OAAO,0BAejB"}
1
+ {"version":3,"file":"Budget.d.ts","sourceRoot":"","sources":["../../src/Budgets/Budget.ts"],"names":[],"mappings":"AAGA,OAAO,KAAK,EAAE,OAAO,EAAO,MAAM,MAAM,CAAC;AACzC,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,0BAA0B,CAAC;AAElE,OAAO,EAAE,aAAa,EAAE,MAAM,iBAAiB,CAAC;AAEhD,OAAO,EAEL,aAAa,GACd,CAAC;AAEF;;;;;GAKG;AACH,MAAM,MAAM,MAAM,GAAG,aAAa,CAAC;AAEnC;;;;GAIG;AACH,eAAO,MAAM,0BAA0B;;CAItC,CAAC;AAEF;;;;;;;;;GASG;AACH,wBAAsB,iBAAiB,CACrC,OAAO,EAAE,iBAAiB,EAC1B,OAAO,EAAE,OAAO,0BAejB"}
@@ -1,27 +1,29 @@
1
- import { z as a } from "../generated-x_abr3Yv.js";
1
+ import { y as a } from "../generated-B7VaSah4.js";
2
+ import { a as m } from "../componentInterfaces-RXBMI5yH.js";
2
3
  import { readContract as c } from "@wagmi/core";
3
- import { InvalidComponentInterfaceError as m } from "../errors.js";
4
- import { ManagedBudget as f } from "./ManagedBudget.js";
4
+ import { InvalidComponentInterfaceError as f } from "../errors.js";
5
+ import { ManagedBudget as i } from "./ManagedBudget.js";
5
6
  const r = {
6
7
  // ['0x64683da1']: VestingBudget,
7
8
  // ['0x2929d19c']: SimpleBudget,
8
- "0xa0109882": f
9
+ [m]: i
9
10
  };
10
- async function u(t, e) {
11
- const n = await c(t.config, {
11
+ async function C(t, e) {
12
+ const o = await c(t.config, {
12
13
  abi: a,
13
14
  functionName: "getComponentInterface",
14
15
  address: e
15
- }), o = r[n];
16
- if (!o)
17
- throw new m(
16
+ }), n = r[o];
17
+ if (!n)
18
+ throw new f(
18
19
  Object.keys(r),
19
- n
20
+ o
20
21
  );
21
- return new o(t, e);
22
+ return new n(t, e);
22
23
  }
23
24
  export {
24
25
  r as BudgetByComponentInterface,
25
- f as ManagedBudget,
26
- u as budgetFromAddress
26
+ i as ManagedBudget,
27
+ C as budgetFromAddress
27
28
  };
29
+ //# sourceMappingURL=Budget.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"Budget.js","sources":["../../src/Budgets/Budget.ts"],"sourcesContent":["import { aBudgetAbi } from '@boostxyz/evm';\nimport { AManagedBudget } 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 { ManagedBudget } from './ManagedBudget';\n\nexport {\n // VestingBudget,\n ManagedBudget,\n};\n\n/**\n * A union type representing all valid protocol Budget implementations\n *\n * @export\n * @typedef {Budget}\n */\nexport type Budget = ManagedBudget; // | VestingBudget\n\n/**\n * A map of Budget component interfaces to their constructors.\n *\n * @type {{ \"0xa0109882\": typeof ManagedBudget; }}\n */\nexport const BudgetByComponentInterface = {\n // ['0x64683da1']: VestingBudget,\n // ['0x2929d19c']: SimpleBudget,\n [AManagedBudget as Hex]: ManagedBudget,\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<ManagedBudget>}\n * @throws {@link InvalidComponentInterfaceError}\n */\nexport async function budgetFromAddress(\n options: DeployableOptions,\n address: Address,\n) {\n const interfaceId = (await readContract(options.config, {\n abi: aBudgetAbi,\n functionName: 'getComponentInterface',\n address,\n })) as keyof typeof BudgetByComponentInterface;\n const Ctor = BudgetByComponentInterface[interfaceId];\n if (!Ctor) {\n throw new InvalidComponentInterfaceError(\n Object.keys(BudgetByComponentInterface) as Hex[],\n interfaceId as Hex,\n );\n }\n return new Ctor(options, address);\n}\n"],"names":["BudgetByComponentInterface","AManagedBudget","ManagedBudget","budgetFromAddress","options","address","interfaceId","readContract","aBudgetAbi","Ctor","InvalidComponentInterfaceError"],"mappings":";;;;;AA0BO,MAAMA,IAA6B;AAAA;AAAA;AAAA,EAGxC,CAACC,CAAqB,GAAGC;AAC3B;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,EAA2BM,CAAW;AACnD,MAAI,CAACG;AACH,UAAM,IAAIC;AAAA,MACR,OAAO,KAAKV,CAA0B;AAAA,MACtCM;AAAA,IAAA;AAGG,SAAA,IAAIG,EAAKL,GAASC,CAAO;AAClC;"}