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

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (257) hide show
  1. package/dist/Actions/Action.cjs +1 -1
  2. package/dist/Actions/Action.cjs.map +1 -1
  3. package/dist/Actions/Action.js +7 -7
  4. package/dist/Actions/ContractAction.d.ts +11 -11
  5. package/dist/Actions/ContractAction.d.ts.map +1 -1
  6. package/dist/Actions/ERC721MintAction.d.ts +14 -14
  7. package/dist/Actions/ERC721MintAction.d.ts.map +1 -1
  8. package/dist/Actions/EventAction.cjs +1 -1
  9. package/dist/Actions/EventAction.cjs.map +1 -1
  10. package/dist/Actions/EventAction.d.ts +171 -41
  11. package/dist/Actions/EventAction.d.ts.map +1 -1
  12. package/dist/Actions/EventAction.js +15 -392
  13. package/dist/Actions/EventAction.js.map +1 -1
  14. package/dist/AllowLists/AllowList.cjs +1 -1
  15. package/dist/AllowLists/AllowList.cjs.map +1 -1
  16. package/dist/AllowLists/AllowList.d.ts +6 -4
  17. package/dist/AllowLists/AllowList.d.ts.map +1 -1
  18. package/dist/AllowLists/AllowList.js +45 -23
  19. package/dist/AllowLists/AllowList.js.map +1 -1
  20. package/dist/AllowLists/OpenAllowList.d.ts +423 -0
  21. package/dist/AllowLists/OpenAllowList.d.ts.map +1 -0
  22. package/dist/AllowLists/SimpleAllowList.cjs +1 -1
  23. package/dist/AllowLists/SimpleAllowList.cjs.map +1 -1
  24. package/dist/AllowLists/SimpleAllowList.d.ts +92 -37
  25. package/dist/AllowLists/SimpleAllowList.d.ts.map +1 -1
  26. package/dist/AllowLists/SimpleAllowList.js +55 -71
  27. package/dist/AllowLists/SimpleAllowList.js.map +1 -1
  28. package/dist/AllowLists/SimpleDenyList.cjs +1 -1
  29. package/dist/AllowLists/SimpleDenyList.cjs.map +1 -1
  30. package/dist/AllowLists/SimpleDenyList.d.ts +203 -11
  31. package/dist/AllowLists/SimpleDenyList.d.ts.map +1 -1
  32. package/dist/AllowLists/SimpleDenyList.js +11 -112
  33. package/dist/AllowLists/SimpleDenyList.js.map +1 -1
  34. package/dist/Auth/PassthroughAuth.cjs +1 -1
  35. package/dist/Auth/PassthroughAuth.js +1 -1
  36. package/dist/Boost.cjs +1 -1
  37. package/dist/Boost.cjs.map +1 -1
  38. package/dist/Boost.d.ts +20 -21
  39. package/dist/Boost.d.ts.map +1 -1
  40. package/dist/Boost.js +43 -57
  41. package/dist/Boost.js.map +1 -1
  42. package/dist/BoostCore-BVZExPPu.js +1462 -0
  43. package/dist/BoostCore-BVZExPPu.js.map +1 -0
  44. package/dist/BoostCore-D-E-cnGI.cjs +3 -0
  45. package/dist/BoostCore-D-E-cnGI.cjs.map +1 -0
  46. package/dist/BoostCore.cjs +1 -2
  47. package/dist/BoostCore.cjs.map +1 -1
  48. package/dist/BoostCore.d.ts +748 -77
  49. package/dist/BoostCore.d.ts.map +1 -1
  50. package/dist/BoostCore.js +29 -1150
  51. package/dist/BoostCore.js.map +1 -1
  52. package/dist/BoostRegistry.cjs +1 -1
  53. package/dist/BoostRegistry.cjs.map +1 -1
  54. package/dist/BoostRegistry.d.ts +80 -25
  55. package/dist/BoostRegistry.d.ts.map +1 -1
  56. package/dist/BoostRegistry.js +165 -83
  57. package/dist/BoostRegistry.js.map +1 -1
  58. package/dist/Budgets/Budget.cjs +1 -1
  59. package/dist/Budgets/Budget.cjs.map +1 -1
  60. package/dist/Budgets/Budget.d.ts.map +1 -1
  61. package/dist/Budgets/Budget.js +2 -2
  62. package/dist/Budgets/Budget.js.map +1 -1
  63. package/dist/Budgets/ManagedBudget.cjs +1 -1
  64. package/dist/Budgets/ManagedBudget.cjs.map +1 -1
  65. package/dist/Budgets/ManagedBudget.d.ts +75 -193
  66. package/dist/Budgets/ManagedBudget.d.ts.map +1 -1
  67. package/dist/Budgets/ManagedBudget.js +80 -298
  68. package/dist/Budgets/ManagedBudget.js.map +1 -1
  69. package/dist/Budgets/VestingBudget.d.ts +223 -89
  70. package/dist/Budgets/VestingBudget.d.ts.map +1 -1
  71. package/dist/Deployable/Contract.cjs +1 -1
  72. package/dist/Deployable/Contract.cjs.map +1 -1
  73. package/dist/Deployable/Contract.d.ts +4 -5
  74. package/dist/Deployable/Contract.d.ts.map +1 -1
  75. package/dist/Deployable/Contract.js +5 -7
  76. package/dist/Deployable/Contract.js.map +1 -1
  77. package/dist/Deployable/Deployable.cjs.map +1 -1
  78. package/dist/Deployable/Deployable.d.ts +1 -1
  79. package/dist/Deployable/Deployable.d.ts.map +1 -1
  80. package/dist/Deployable/Deployable.js +3 -5
  81. package/dist/Deployable/Deployable.js.map +1 -1
  82. package/dist/Deployable/DeployableTarget.cjs +1 -1
  83. package/dist/Deployable/DeployableTarget.cjs.map +1 -1
  84. package/dist/Deployable/DeployableTarget.d.ts +13 -13
  85. package/dist/Deployable/DeployableTarget.d.ts.map +1 -1
  86. package/dist/Deployable/DeployableTarget.js +28 -25
  87. package/dist/Deployable/DeployableTarget.js.map +1 -1
  88. package/dist/Deployable/DeployableTargetWithRBAC.cjs +2 -0
  89. package/dist/Deployable/DeployableTargetWithRBAC.cjs.map +1 -0
  90. package/dist/Deployable/DeployableTargetWithRBAC.d.ts +179 -0
  91. package/dist/Deployable/DeployableTargetWithRBAC.d.ts.map +1 -0
  92. package/dist/Deployable/DeployableTargetWithRBAC.js +222 -0
  93. package/dist/Deployable/DeployableTargetWithRBAC.js.map +1 -0
  94. package/dist/EventAction-BZt5cjbe.cjs +2 -0
  95. package/dist/EventAction-BZt5cjbe.cjs.map +1 -0
  96. package/dist/EventAction-C_-hJXWm.js +1541 -0
  97. package/dist/EventAction-C_-hJXWm.js.map +1 -0
  98. package/dist/Incentive-BhHaK3PZ.cjs +2 -0
  99. package/dist/Incentive-BhHaK3PZ.cjs.map +1 -0
  100. package/dist/Incentive-Cqg1w6wD.js +312 -0
  101. package/dist/Incentive-Cqg1w6wD.js.map +1 -0
  102. package/dist/Incentives/AllowListIncentive.cjs +1 -1
  103. package/dist/Incentives/AllowListIncentive.cjs.map +1 -1
  104. package/dist/Incentives/AllowListIncentive.d.ts +38 -16
  105. package/dist/Incentives/AllowListIncentive.d.ts.map +1 -1
  106. package/dist/Incentives/AllowListIncentive.js +42 -29
  107. package/dist/Incentives/AllowListIncentive.js.map +1 -1
  108. package/dist/Incentives/CGDAIncentive.cjs +1 -1
  109. package/dist/Incentives/CGDAIncentive.cjs.map +1 -1
  110. package/dist/Incentives/CGDAIncentive.d.ts +234 -21
  111. package/dist/Incentives/CGDAIncentive.d.ts.map +1 -1
  112. package/dist/Incentives/CGDAIncentive.js +45 -32
  113. package/dist/Incentives/CGDAIncentive.js.map +1 -1
  114. package/dist/Incentives/ERC1155Incentive.d.ts +224 -37
  115. package/dist/Incentives/ERC1155Incentive.d.ts.map +1 -1
  116. package/dist/Incentives/ERC20Incentive.cjs +1 -1
  117. package/dist/Incentives/ERC20Incentive.cjs.map +1 -1
  118. package/dist/Incentives/ERC20Incentive.d.ts +230 -29
  119. package/dist/Incentives/ERC20Incentive.d.ts.map +1 -1
  120. package/dist/Incentives/ERC20Incentive.js +56 -43
  121. package/dist/Incentives/ERC20Incentive.js.map +1 -1
  122. package/dist/{Budgets/SimpleBudget.d.ts → Incentives/ERC20VariableCriteriaIncentive.d.ts} +335 -440
  123. package/dist/Incentives/ERC20VariableCriteriaIncentive.d.ts.map +1 -0
  124. package/dist/Incentives/ERC20VariableIncentive.d.ts +231 -29
  125. package/dist/Incentives/ERC20VariableIncentive.d.ts.map +1 -1
  126. package/dist/Incentives/Incentive.cjs +1 -1
  127. package/dist/Incentives/Incentive.cjs.map +1 -1
  128. package/dist/Incentives/Incentive.d.ts +4 -4
  129. package/dist/Incentives/Incentive.d.ts.map +1 -1
  130. package/dist/Incentives/Incentive.js +16 -296
  131. package/dist/Incentives/Incentive.js.map +1 -1
  132. package/dist/Incentives/PointsIncentive.cjs +1 -1
  133. package/dist/Incentives/PointsIncentive.cjs.map +1 -1
  134. package/dist/Incentives/PointsIncentive.d.ts +40 -18
  135. package/dist/Incentives/PointsIncentive.d.ts.map +1 -1
  136. package/dist/Incentives/PointsIncentive.js +37 -24
  137. package/dist/Incentives/PointsIncentive.js.map +1 -1
  138. package/dist/SimpleDenyList-BUR17Tt1.cjs +2 -0
  139. package/dist/SimpleDenyList-BUR17Tt1.cjs.map +1 -0
  140. package/dist/SimpleDenyList-CGaWjuld.js +132 -0
  141. package/dist/SimpleDenyList-CGaWjuld.js.map +1 -0
  142. package/dist/Validators/SignerValidator.cjs +1 -1
  143. package/dist/Validators/SignerValidator.cjs.map +1 -1
  144. package/dist/Validators/SignerValidator.d.ts +16 -16
  145. package/dist/Validators/SignerValidator.d.ts.map +1 -1
  146. package/dist/Validators/SignerValidator.js +30 -27
  147. package/dist/Validators/SignerValidator.js.map +1 -1
  148. package/dist/Validators/Validator.cjs +1 -1
  149. package/dist/Validators/Validator.cjs.map +1 -1
  150. package/dist/Validators/Validator.d.ts +1 -1
  151. package/dist/Validators/Validator.js +2 -2
  152. package/dist/Validators/Validator.js.map +1 -1
  153. package/dist/claiming.cjs.map +1 -1
  154. package/dist/claiming.d.ts +1 -1
  155. package/dist/claiming.js.map +1 -1
  156. package/dist/componentInterfaces-BBCFkrZv.js +14 -0
  157. package/dist/componentInterfaces-BBCFkrZv.js.map +1 -0
  158. package/dist/componentInterfaces-DRI_dQ-P.cjs +2 -0
  159. package/dist/componentInterfaces-DRI_dQ-P.cjs.map +1 -0
  160. package/dist/deployments-DVXioW2i.cjs +2 -0
  161. package/dist/deployments-DVXioW2i.cjs.map +1 -0
  162. package/dist/deployments-oykLv3_Z.js +43 -0
  163. package/dist/deployments-oykLv3_Z.js.map +1 -0
  164. package/dist/deployments.json +44 -0
  165. package/dist/errors.cjs +1 -1
  166. package/dist/errors.cjs.map +1 -1
  167. package/dist/errors.d.ts +256 -20
  168. package/dist/errors.d.ts.map +1 -1
  169. package/dist/errors.js +183 -26
  170. package/dist/errors.js.map +1 -1
  171. package/dist/{generated-57_Kffpz.js → generated-CKt2yCQd.js} +3613 -1869
  172. package/dist/generated-CKt2yCQd.js.map +1 -0
  173. package/dist/generated-CyTNlOwM.cjs +3 -0
  174. package/dist/generated-CyTNlOwM.cjs.map +1 -0
  175. package/dist/index.cjs +1 -1
  176. package/dist/index.d.ts +5 -0
  177. package/dist/index.d.ts.map +1 -1
  178. package/dist/index.js +142 -108
  179. package/dist/index.js.map +1 -1
  180. package/dist/transfers.cjs.map +1 -1
  181. package/dist/transfers.d.ts +1 -1
  182. package/dist/transfers.js.map +1 -1
  183. package/dist/utils.cjs +1 -1
  184. package/dist/utils.cjs.map +1 -1
  185. package/dist/utils.d.ts +26 -12
  186. package/dist/utils.d.ts.map +1 -1
  187. package/dist/utils.js +38 -23
  188. package/dist/utils.js.map +1 -1
  189. package/package.json +20 -10
  190. package/src/Actions/Action.test.ts +14 -13
  191. package/src/Actions/ContractAction.test.ts +10 -10
  192. package/src/Actions/ContractAction.ts +11 -12
  193. package/src/Actions/ERC721MintAction.test.ts +6 -6
  194. package/src/Actions/ERC721MintAction.ts +14 -15
  195. package/src/Actions/EventAction.test.ts +729 -109
  196. package/src/Actions/EventAction.ts +542 -84
  197. package/src/AllowLists/AllowList.test.ts +7 -7
  198. package/src/AllowLists/AllowList.ts +5 -3
  199. package/src/AllowLists/OpenAllowList.test.ts +40 -0
  200. package/src/AllowLists/OpenAllowList.ts +45 -0
  201. package/src/AllowLists/SimpleAllowList.test.ts +4 -4
  202. package/src/AllowLists/SimpleAllowList.ts +39 -61
  203. package/src/AllowLists/SimpleDenyList.test.ts +4 -4
  204. package/src/AllowLists/SimpleDenyList.ts +40 -17
  205. package/src/Auth/PassthroughAuth.test.ts +1 -1
  206. package/src/Boost.ts +21 -24
  207. package/src/BoostCore.test.ts +323 -268
  208. package/src/BoostCore.ts +396 -219
  209. package/src/BoostRegistry.test.ts +53 -0
  210. package/src/BoostRegistry.ts +161 -40
  211. package/src/Budgets/Budget.test.ts +2 -2
  212. package/src/Budgets/Budget.ts +1 -2
  213. package/src/Budgets/ManagedBudget.test.ts +82 -19
  214. package/src/Budgets/ManagedBudget.ts +48 -310
  215. package/src/Budgets/VestingBudget.test.ts +7 -7
  216. package/src/Budgets/VestingBudget.ts +34 -106
  217. package/src/Deployable/Contract.ts +4 -5
  218. package/src/Deployable/Deployable.ts +1 -1
  219. package/src/Deployable/DeployableTarget.ts +30 -19
  220. package/src/Deployable/DeployableTargetWithRBAC.ts +323 -0
  221. package/src/Incentives/AllowListIncentive.test.ts +5 -5
  222. package/src/Incentives/AllowListIncentive.ts +29 -15
  223. package/src/Incentives/CGDAIncentive.test.ts +9 -6
  224. package/src/Incentives/CGDAIncentive.ts +38 -18
  225. package/src/Incentives/ERC1155Incentive.test.ts +3 -3
  226. package/src/Incentives/ERC1155Incentive.ts +28 -29
  227. package/src/Incentives/ERC20Incentive.test.ts +9 -6
  228. package/src/Incentives/ERC20Incentive.ts +46 -26
  229. package/src/Incentives/ERC20VariableCriteriaIncentive.test.ts +184 -0
  230. package/src/Incentives/ERC20VariableCriteriaIncentive.ts +324 -0
  231. package/src/Incentives/ERC20VariableIncentive.test.ts +8 -11
  232. package/src/Incentives/ERC20VariableIncentive.ts +49 -26
  233. package/src/Incentives/Incentive.test.ts +4 -1
  234. package/src/Incentives/Incentive.ts +7 -6
  235. package/src/Incentives/PointsIncentive.test.ts +24 -25
  236. package/src/Incentives/PointsIncentive.ts +31 -17
  237. package/src/Validators/SignerValidator.test.ts +6 -6
  238. package/src/Validators/SignerValidator.ts +19 -17
  239. package/src/Validators/Validator.test.ts +2 -2
  240. package/src/Validators/Validator.ts +1 -1
  241. package/src/claiming.ts +1 -1
  242. package/src/errors.ts +345 -21
  243. package/src/index.test.ts +118 -36
  244. package/src/index.ts +5 -0
  245. package/src/transfers.ts +1 -1
  246. package/src/utils.test.ts +2 -2
  247. package/src/utils.ts +61 -12
  248. package/dist/Budgets/SimpleBudget.d.ts.map +0 -1
  249. package/dist/componentInterfaces-CKCBwG16.cjs +0 -2
  250. package/dist/componentInterfaces-CKCBwG16.cjs.map +0 -1
  251. package/dist/componentInterfaces-DYkaxBda.js +0 -13
  252. package/dist/componentInterfaces-DYkaxBda.js.map +0 -1
  253. package/dist/generated-57_Kffpz.js.map +0 -1
  254. package/dist/generated-wKBNvm48.cjs +0 -3
  255. package/dist/generated-wKBNvm48.cjs.map +0 -1
  256. package/src/Budgets/SimpleBudget.test.ts +0 -152
  257. package/src/Budgets/SimpleBudget.ts +0 -564
@@ -1,30 +1,52 @@
1
- import { o as i } from "../generated-57_Kffpz.js";
2
- import { a as m, b as a } from "../componentInterfaces-DYkaxBda.js";
3
- import { readContract as f } from "@wagmi/core";
4
- import { InvalidComponentInterfaceError as c } from "../errors.js";
5
- import { SimpleAllowList as l } from "./SimpleAllowList.js";
6
- import { SimpleDenyList as p } from "./SimpleDenyList.js";
7
- const n = {
8
- [m]: l,
9
- [a]: p
1
+ import { g as s, M as l } from "../generated-CKt2yCQd.js";
2
+ import { c as m, d as p } from "../componentInterfaces-BBCFkrZv.js";
3
+ import { readContract as c } from "@wagmi/core";
4
+ import { InvalidComponentInterfaceError as f } from "../errors.js";
5
+ import { S as i, b as d, p as A } from "../SimpleDenyList-CGaWjuld.js";
6
+ import { zeroAddress as w } from "viem";
7
+ import { SimpleAllowList as y } from "./SimpleAllowList.js";
8
+ const L = s;
9
+ class D extends i {
10
+ /**
11
+ * @inheritdoc
12
+ *
13
+ * @public
14
+ * @param {?SimpleDenyListPayload} [_payload]
15
+ * @param {?DeployableOptions} [_options]
16
+ * @returns {GenericDeployableParams}
17
+ */
18
+ buildParameters(e, o) {
19
+ const [n, a] = this.validateDeploymentConfig({}, o);
20
+ return {
21
+ abi: L,
22
+ bytecode: d,
23
+ args: [A({ owner: w, denied: [] })],
24
+ ...this.optionallyAttachAccount(a.account)
25
+ };
26
+ }
27
+ }
28
+ const r = {
29
+ [m]: y,
30
+ [p]: i
10
31
  };
11
- async function I(o, t) {
12
- const e = await f(o.config, {
13
- abi: i,
32
+ async function v(t, e) {
33
+ const o = await c(t.config, {
34
+ abi: l,
14
35
  functionName: "getComponentInterface",
15
- address: t
16
- }), r = n[e];
17
- if (!r)
18
- throw new c(
19
- Object.keys(n),
20
- e
36
+ address: e
37
+ }), n = r[o];
38
+ if (!n)
39
+ throw new f(
40
+ Object.keys(r),
41
+ o
21
42
  );
22
- return new r(o, t);
43
+ return new n(t, e);
23
44
  }
24
45
  export {
25
- n as AllowListByComponentInterface,
26
- l as SimpleAllowList,
27
- p as SimpleDenyList,
28
- I as allowListFromAddress
46
+ r as AllowListByComponentInterface,
47
+ D as OpenAllowList,
48
+ y as SimpleAllowList,
49
+ i as SimpleDenyList,
50
+ v as allowListFromAddress
29
51
  };
30
52
  //# sourceMappingURL=AllowList.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"AllowList.js","sources":["../../src/AllowLists/AllowList.ts"],"sourcesContent":["import { aAllowListAbi } from '@boostxyz/evm';\nimport {\n ASimpleAllowList,\n ASimpleDenyList,\n} 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 { SimpleAllowList } from './SimpleAllowList';\nimport { SimpleDenyList } from './SimpleDenyList';\n\nexport { SimpleAllowList, SimpleDenyList };\n\n/**\n * A union type representing all valid protocol AllowList implementations\n *\n * @export\n * @typedef {AllowList}\n */\nexport type AllowList = SimpleAllowList | SimpleDenyList;\n\n/**\n * A map of AllowList component interfaces to their constructors.\n *\n * @type {{ \"0x2bc9016b\": SimpleAllowList; \"0x9d585f63\": SimpleDenyList; }}\n */\nexport const AllowListByComponentInterface = {\n [ASimpleAllowList as Hex]: SimpleAllowList,\n [ASimpleDenyList as Hex]: SimpleDenyList,\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<SimpleAllowList | SimpleDenyList>}\n * @throws {@link InvalidComponentInterfaceError}\n */\nexport async function allowListFromAddress(\n options: DeployableOptions,\n address: Address,\n) {\n const interfaceId = (await readContract(options.config, {\n abi: aAllowListAbi,\n functionName: 'getComponentInterface',\n address,\n })) as keyof typeof AllowListByComponentInterface;\n const Ctor = AllowListByComponentInterface[interfaceId];\n if (!Ctor) {\n throw new InvalidComponentInterfaceError(\n Object.keys(AllowListByComponentInterface) as Hex[],\n interfaceId as Hex,\n );\n }\n return new Ctor(options, address);\n}\n"],"names":["AllowListByComponentInterface","ASimpleAllowList","SimpleAllowList","ASimpleDenyList","SimpleDenyList","allowListFromAddress","options","address","interfaceId","readContract","aAllowListAbi","Ctor","InvalidComponentInterfaceError"],"mappings":";;;;;;AA2BO,MAAMA,IAAgC;AAAA,EAC3C,CAACC,CAAuB,GAAGC;AAAA,EAC3B,CAACC,CAAsB,GAAGC;AAC5B;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,IAAOX,EAA8BQ,CAAW;AACtD,MAAI,CAACG;AACH,UAAM,IAAIC;AAAA,MACR,OAAO,KAAKZ,CAA6B;AAAA,MACzCQ;AAAA,IAAA;AAGG,SAAA,IAAIG,EAAKL,GAASC,CAAO;AAClC;"}
1
+ {"version":3,"file":"AllowList.js","sources":["../../src/AllowLists/OpenAllowList.ts","../../src/AllowLists/AllowList.ts"],"sourcesContent":["import { simpleDenyListAbi } from '@boostxyz/evm';\nimport { bytecode } from '@boostxyz/evm/artifacts/contracts/allowlists/SimpleDenyList.sol/SimpleDenyList.json';\nimport { type Hex, zeroAddress } from 'viem';\nimport type {\n DeployableOptions,\n GenericDeployableParams,\n} from '../Deployable/Deployable';\nimport {\n SimpleDenyList,\n type SimpleDenyListPayload,\n prepareSimpleDenyListPayload,\n} from './SimpleDenyList';\n\nexport const openAllowListAbi = simpleDenyListAbi;\n\n/**\n * A simple AllowList, extending {@link DenyList}, that is ownerless and allows anyone to claim.\n *\n * @export\n * @class OpenAllowList\n * @typedef {OpenAllowList}\n * @extends {DeployableTarget<OpenAllowListPayload>}\n */\nexport class OpenAllowList extends SimpleDenyList<undefined> {\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 [_, options] = this.validateDeploymentConfig({}, _options);\n return {\n abi: openAllowListAbi,\n bytecode: bytecode as Hex,\n args: [prepareSimpleDenyListPayload({ owner: zeroAddress, denied: [] })],\n ...this.optionallyAttachAccount(options.account),\n };\n }\n}\n","import { aAllowListAbi } from '@boostxyz/evm';\nimport {\n ASimpleAllowList,\n ASimpleDenyList,\n} 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 { OpenAllowList } from './OpenAllowList';\nimport { SimpleAllowList } from './SimpleAllowList';\nimport { SimpleDenyList } from './SimpleDenyList';\n\nexport { OpenAllowList, SimpleAllowList, SimpleDenyList };\n\n/**\n * A union type representing all valid protocol AllowList implementations\n *\n * @export\n * @typedef {AllowList}\n */\nexport type AllowList = OpenAllowList | SimpleAllowList | SimpleDenyList;\n\n/**\n * A map of AllowList component interfaces to their constructors.\n *\n * @type {{ \"0x2bc9016b\": SimpleAllowList; \"0x9d585f63\": SimpleDenyList; }}\n */\nexport const AllowListByComponentInterface = {\n [ASimpleAllowList as Hex]: SimpleAllowList,\n [ASimpleDenyList as Hex]: SimpleDenyList,\n};\n\n/**\n * A function that will read a contract's component interface using `getComponentInterface` and return the correct instantiated instance.\n * This function will never return an instance of {@link OpenAllowList} because it has the same component interface as {@link SimpleDenyList}\n *\n * @export\n * @async\n * @param {DeployableOptions} options\n * @param {Address} address\n * @returns {Promise<SimpleAllowList | SimpleDenyList>}\n * @throws {@link InvalidComponentInterfaceError}\n */\nexport async function allowListFromAddress(\n options: DeployableOptions,\n address: Address,\n) {\n const interfaceId = (await readContract(options.config, {\n abi: aAllowListAbi,\n functionName: 'getComponentInterface',\n address,\n })) as keyof typeof AllowListByComponentInterface;\n const Ctor = AllowListByComponentInterface[interfaceId];\n if (!Ctor) {\n throw new InvalidComponentInterfaceError(\n Object.keys(AllowListByComponentInterface) as Hex[],\n interfaceId as Hex,\n );\n }\n return new Ctor(options, address) as SimpleDenyList | SimpleAllowList;\n}\n"],"names":["openAllowListAbi","simpleDenyListAbi","OpenAllowList","SimpleDenyList","_payload","_options","_","options","bytecode","prepareSimpleDenyListPayload","zeroAddress","AllowListByComponentInterface","ASimpleAllowList","SimpleAllowList","ASimpleDenyList","allowListFromAddress","address","interfaceId","readContract","aAllowListAbi","Ctor","InvalidComponentInterfaceError"],"mappings":";;;;;;;AAaO,MAAMA,IAAmBC;AAUzB,MAAMC,UAAsBC,EAA0B;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,EAS3C,gBACdC,GACAC,GACyB;AACnB,UAAA,CAACC,GAAGC,CAAO,IAAI,KAAK,yBAAyB,CAAA,GAAIF,CAAQ;AACxD,WAAA;AAAA,MACL,KAAKL;AAAA,MACL,UAAAQ;AAAA,MACA,MAAM,CAACC,EAA6B,EAAE,OAAOC,GAAa,QAAQ,CAAG,EAAA,CAAC,CAAC;AAAA,MACvE,GAAG,KAAK,wBAAwBH,EAAQ,OAAO;AAAA,IAAA;AAAA,EAEnD;AACF;AChBO,MAAMI,IAAgC;AAAA,EAC3C,CAACC,CAAuB,GAAGC;AAAA,EAC3B,CAACC,CAAsB,GAAGX;AAC5B;AAasB,eAAAY,EACpBR,GACAS,GACA;AACA,QAAMC,IAAe,MAAMC,EAAaX,EAAQ,QAAQ;AAAA,IACtD,KAAKY;AAAAA,IACL,cAAc;AAAA,IACd,SAAAH;AAAA,EAAA,CACD,GACKI,IAAOT,EAA8BM,CAAW;AACtD,MAAI,CAACG;AACH,UAAM,IAAIC;AAAA,MACR,OAAO,KAAKV,CAA6B;AAAA,MACzCM;AAAA,IAAA;AAGG,SAAA,IAAIG,EAAKb,GAASS,CAAO;AAClC;"}
@@ -0,0 +1,423 @@
1
+ import type { DeployableOptions, GenericDeployableParams } from '../Deployable/Deployable';
2
+ import { SimpleDenyList, type SimpleDenyListPayload } from './SimpleDenyList';
3
+ export declare const openAllowListAbi: readonly [{
4
+ readonly type: "constructor";
5
+ readonly inputs: readonly [];
6
+ readonly stateMutability: "nonpayable";
7
+ }, {
8
+ readonly type: "error";
9
+ readonly inputs: readonly [];
10
+ readonly name: "AlreadyInitialized";
11
+ }, {
12
+ readonly type: "error";
13
+ readonly inputs: readonly [];
14
+ readonly name: "CloneAlreadyInitialized";
15
+ }, {
16
+ readonly type: "error";
17
+ readonly inputs: readonly [];
18
+ readonly name: "InitializerNotImplemented";
19
+ }, {
20
+ readonly type: "error";
21
+ readonly inputs: readonly [];
22
+ readonly name: "InvalidInitialization";
23
+ }, {
24
+ readonly type: "error";
25
+ readonly inputs: readonly [];
26
+ readonly name: "InvalidInitializationData";
27
+ }, {
28
+ readonly type: "error";
29
+ readonly inputs: readonly [];
30
+ readonly name: "LengthMismatch";
31
+ }, {
32
+ readonly type: "error";
33
+ readonly inputs: readonly [];
34
+ readonly name: "NewOwnerIsZeroAddress";
35
+ }, {
36
+ readonly type: "error";
37
+ readonly inputs: readonly [];
38
+ readonly name: "NoHandoverRequest";
39
+ }, {
40
+ readonly type: "error";
41
+ readonly inputs: readonly [];
42
+ readonly name: "NotInitializing";
43
+ }, {
44
+ readonly type: "error";
45
+ readonly inputs: readonly [];
46
+ readonly name: "Unauthorized";
47
+ }, {
48
+ readonly type: "error";
49
+ readonly inputs: readonly [];
50
+ readonly name: "Unauthorized";
51
+ }, {
52
+ readonly type: "event";
53
+ readonly anonymous: false;
54
+ readonly inputs: readonly [{
55
+ readonly name: "version";
56
+ readonly internalType: "uint64";
57
+ readonly type: "uint64";
58
+ readonly indexed: false;
59
+ }];
60
+ readonly name: "Initialized";
61
+ }, {
62
+ readonly type: "event";
63
+ readonly anonymous: false;
64
+ readonly inputs: readonly [{
65
+ readonly name: "pendingOwner";
66
+ readonly internalType: "address";
67
+ readonly type: "address";
68
+ readonly indexed: true;
69
+ }];
70
+ readonly name: "OwnershipHandoverCanceled";
71
+ }, {
72
+ readonly type: "event";
73
+ readonly anonymous: false;
74
+ readonly inputs: readonly [{
75
+ readonly name: "pendingOwner";
76
+ readonly internalType: "address";
77
+ readonly type: "address";
78
+ readonly indexed: true;
79
+ }];
80
+ readonly name: "OwnershipHandoverRequested";
81
+ }, {
82
+ readonly type: "event";
83
+ readonly anonymous: false;
84
+ readonly inputs: readonly [{
85
+ readonly name: "oldOwner";
86
+ readonly internalType: "address";
87
+ readonly type: "address";
88
+ readonly indexed: true;
89
+ }, {
90
+ readonly name: "newOwner";
91
+ readonly internalType: "address";
92
+ readonly type: "address";
93
+ readonly indexed: true;
94
+ }];
95
+ readonly name: "OwnershipTransferred";
96
+ }, {
97
+ readonly type: "event";
98
+ readonly anonymous: false;
99
+ readonly inputs: readonly [{
100
+ readonly name: "user";
101
+ readonly internalType: "address";
102
+ readonly type: "address";
103
+ readonly indexed: true;
104
+ }, {
105
+ readonly name: "roles";
106
+ readonly internalType: "uint256";
107
+ readonly type: "uint256";
108
+ readonly indexed: true;
109
+ }];
110
+ readonly name: "RolesUpdated";
111
+ }, {
112
+ readonly type: "function";
113
+ readonly inputs: readonly [];
114
+ readonly name: "ADMIN_ROLE";
115
+ readonly outputs: readonly [{
116
+ readonly name: "";
117
+ readonly internalType: "uint256";
118
+ readonly type: "uint256";
119
+ }];
120
+ readonly stateMutability: "view";
121
+ }, {
122
+ readonly type: "function";
123
+ readonly inputs: readonly [];
124
+ readonly name: "MANAGER_ROLE";
125
+ readonly outputs: readonly [{
126
+ readonly name: "";
127
+ readonly internalType: "uint256";
128
+ readonly type: "uint256";
129
+ }];
130
+ readonly stateMutability: "view";
131
+ }, {
132
+ readonly type: "function";
133
+ readonly inputs: readonly [];
134
+ readonly name: "cancelOwnershipHandover";
135
+ readonly outputs: readonly [];
136
+ readonly stateMutability: "payable";
137
+ }, {
138
+ readonly type: "function";
139
+ readonly inputs: readonly [{
140
+ readonly name: "pendingOwner";
141
+ readonly internalType: "address";
142
+ readonly type: "address";
143
+ }];
144
+ readonly name: "completeOwnershipHandover";
145
+ readonly outputs: readonly [];
146
+ readonly stateMutability: "payable";
147
+ }, {
148
+ readonly type: "function";
149
+ readonly inputs: readonly [];
150
+ readonly name: "getComponentInterface";
151
+ readonly outputs: readonly [{
152
+ readonly name: "";
153
+ readonly internalType: "bytes4";
154
+ readonly type: "bytes4";
155
+ }];
156
+ readonly stateMutability: "pure";
157
+ }, {
158
+ readonly type: "function";
159
+ readonly inputs: readonly [{
160
+ readonly name: "user";
161
+ readonly internalType: "address";
162
+ readonly type: "address";
163
+ }, {
164
+ readonly name: "roles";
165
+ readonly internalType: "uint256";
166
+ readonly type: "uint256";
167
+ }];
168
+ readonly name: "grantRoles";
169
+ readonly outputs: readonly [];
170
+ readonly stateMutability: "payable";
171
+ }, {
172
+ readonly type: "function";
173
+ readonly inputs: readonly [{
174
+ readonly name: "accounts_";
175
+ readonly internalType: "address[]";
176
+ readonly type: "address[]";
177
+ }, {
178
+ readonly name: "roles_";
179
+ readonly internalType: "uint256[]";
180
+ readonly type: "uint256[]";
181
+ }];
182
+ readonly name: "grantRoles";
183
+ readonly outputs: readonly [];
184
+ readonly stateMutability: "nonpayable";
185
+ }, {
186
+ readonly type: "function";
187
+ readonly inputs: readonly [{
188
+ readonly name: "user";
189
+ readonly internalType: "address";
190
+ readonly type: "address";
191
+ }, {
192
+ readonly name: "roles";
193
+ readonly internalType: "uint256";
194
+ readonly type: "uint256";
195
+ }];
196
+ readonly name: "hasAllRoles";
197
+ readonly outputs: readonly [{
198
+ readonly name: "";
199
+ readonly internalType: "bool";
200
+ readonly type: "bool";
201
+ }];
202
+ readonly stateMutability: "view";
203
+ }, {
204
+ readonly type: "function";
205
+ readonly inputs: readonly [{
206
+ readonly name: "user";
207
+ readonly internalType: "address";
208
+ readonly type: "address";
209
+ }, {
210
+ readonly name: "roles";
211
+ readonly internalType: "uint256";
212
+ readonly type: "uint256";
213
+ }];
214
+ readonly name: "hasAnyRole";
215
+ readonly outputs: readonly [{
216
+ readonly name: "";
217
+ readonly internalType: "bool";
218
+ readonly type: "bool";
219
+ }];
220
+ readonly stateMutability: "view";
221
+ }, {
222
+ readonly type: "function";
223
+ readonly inputs: readonly [{
224
+ readonly name: "data_";
225
+ readonly internalType: "bytes";
226
+ readonly type: "bytes";
227
+ }];
228
+ readonly name: "initialize";
229
+ readonly outputs: readonly [];
230
+ readonly stateMutability: "nonpayable";
231
+ }, {
232
+ readonly type: "function";
233
+ readonly inputs: readonly [{
234
+ readonly name: "user_";
235
+ readonly internalType: "address";
236
+ readonly type: "address";
237
+ }, {
238
+ readonly name: "";
239
+ readonly internalType: "bytes";
240
+ readonly type: "bytes";
241
+ }];
242
+ readonly name: "isAllowed";
243
+ readonly outputs: readonly [{
244
+ readonly name: "";
245
+ readonly internalType: "bool";
246
+ readonly type: "bool";
247
+ }];
248
+ readonly stateMutability: "view";
249
+ }, {
250
+ readonly type: "function";
251
+ readonly inputs: readonly [{
252
+ readonly name: "account_";
253
+ readonly internalType: "address";
254
+ readonly type: "address";
255
+ }];
256
+ readonly name: "isAuthorized";
257
+ readonly outputs: readonly [{
258
+ readonly name: "";
259
+ readonly internalType: "bool";
260
+ readonly type: "bool";
261
+ }];
262
+ readonly stateMutability: "view";
263
+ }, {
264
+ readonly type: "function";
265
+ readonly inputs: readonly [];
266
+ readonly name: "owner";
267
+ readonly outputs: readonly [{
268
+ readonly name: "result";
269
+ readonly internalType: "address";
270
+ readonly type: "address";
271
+ }];
272
+ readonly stateMutability: "view";
273
+ }, {
274
+ readonly type: "function";
275
+ readonly inputs: readonly [{
276
+ readonly name: "pendingOwner";
277
+ readonly internalType: "address";
278
+ readonly type: "address";
279
+ }];
280
+ readonly name: "ownershipHandoverExpiresAt";
281
+ readonly outputs: readonly [{
282
+ readonly name: "result";
283
+ readonly internalType: "uint256";
284
+ readonly type: "uint256";
285
+ }];
286
+ readonly stateMutability: "view";
287
+ }, {
288
+ readonly type: "function";
289
+ readonly inputs: readonly [];
290
+ readonly name: "renounceOwnership";
291
+ readonly outputs: readonly [];
292
+ readonly stateMutability: "payable";
293
+ }, {
294
+ readonly type: "function";
295
+ readonly inputs: readonly [{
296
+ readonly name: "roles";
297
+ readonly internalType: "uint256";
298
+ readonly type: "uint256";
299
+ }];
300
+ readonly name: "renounceRoles";
301
+ readonly outputs: readonly [];
302
+ readonly stateMutability: "payable";
303
+ }, {
304
+ readonly type: "function";
305
+ readonly inputs: readonly [];
306
+ readonly name: "requestOwnershipHandover";
307
+ readonly outputs: readonly [];
308
+ readonly stateMutability: "payable";
309
+ }, {
310
+ readonly type: "function";
311
+ readonly inputs: readonly [{
312
+ readonly name: "user";
313
+ readonly internalType: "address";
314
+ readonly type: "address";
315
+ }, {
316
+ readonly name: "roles";
317
+ readonly internalType: "uint256";
318
+ readonly type: "uint256";
319
+ }];
320
+ readonly name: "revokeRoles";
321
+ readonly outputs: readonly [];
322
+ readonly stateMutability: "payable";
323
+ }, {
324
+ readonly type: "function";
325
+ readonly inputs: readonly [{
326
+ readonly name: "accounts_";
327
+ readonly internalType: "address[]";
328
+ readonly type: "address[]";
329
+ }, {
330
+ readonly name: "roles_";
331
+ readonly internalType: "uint256[]";
332
+ readonly type: "uint256[]";
333
+ }];
334
+ readonly name: "revokeRoles";
335
+ readonly outputs: readonly [];
336
+ readonly stateMutability: "nonpayable";
337
+ }, {
338
+ readonly type: "function";
339
+ readonly inputs: readonly [{
340
+ readonly name: "user";
341
+ readonly internalType: "address";
342
+ readonly type: "address";
343
+ }];
344
+ readonly name: "rolesOf";
345
+ readonly outputs: readonly [{
346
+ readonly name: "roles";
347
+ readonly internalType: "uint256";
348
+ readonly type: "uint256";
349
+ }];
350
+ readonly stateMutability: "view";
351
+ }, {
352
+ readonly type: "function";
353
+ readonly inputs: readonly [{
354
+ readonly name: "accounts_";
355
+ readonly internalType: "address[]";
356
+ readonly type: "address[]";
357
+ }, {
358
+ readonly name: "authorized_";
359
+ readonly internalType: "bool[]";
360
+ readonly type: "bool[]";
361
+ }];
362
+ readonly name: "setAuthorized";
363
+ readonly outputs: readonly [];
364
+ readonly stateMutability: "nonpayable";
365
+ }, {
366
+ readonly type: "function";
367
+ readonly inputs: readonly [{
368
+ readonly name: "users_";
369
+ readonly internalType: "address[]";
370
+ readonly type: "address[]";
371
+ }, {
372
+ readonly name: "denied_";
373
+ readonly internalType: "bool[]";
374
+ readonly type: "bool[]";
375
+ }];
376
+ readonly name: "setDenied";
377
+ readonly outputs: readonly [];
378
+ readonly stateMutability: "nonpayable";
379
+ }, {
380
+ readonly type: "function";
381
+ readonly inputs: readonly [{
382
+ readonly name: "interfaceId";
383
+ readonly internalType: "bytes4";
384
+ readonly type: "bytes4";
385
+ }];
386
+ readonly name: "supportsInterface";
387
+ readonly outputs: readonly [{
388
+ readonly name: "";
389
+ readonly internalType: "bool";
390
+ readonly type: "bool";
391
+ }];
392
+ readonly stateMutability: "view";
393
+ }, {
394
+ readonly type: "function";
395
+ readonly inputs: readonly [{
396
+ readonly name: "newOwner";
397
+ readonly internalType: "address";
398
+ readonly type: "address";
399
+ }];
400
+ readonly name: "transferOwnership";
401
+ readonly outputs: readonly [];
402
+ readonly stateMutability: "payable";
403
+ }];
404
+ /**
405
+ * A simple AllowList, extending {@link DenyList}, that is ownerless and allows anyone to claim.
406
+ *
407
+ * @export
408
+ * @class OpenAllowList
409
+ * @typedef {OpenAllowList}
410
+ * @extends {DeployableTarget<OpenAllowListPayload>}
411
+ */
412
+ export declare class OpenAllowList extends SimpleDenyList<undefined> {
413
+ /**
414
+ * @inheritdoc
415
+ *
416
+ * @public
417
+ * @param {?SimpleDenyListPayload} [_payload]
418
+ * @param {?DeployableOptions} [_options]
419
+ * @returns {GenericDeployableParams}
420
+ */
421
+ buildParameters(_payload?: SimpleDenyListPayload, _options?: DeployableOptions): GenericDeployableParams;
422
+ }
423
+ //# sourceMappingURL=OpenAllowList.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"OpenAllowList.d.ts","sourceRoot":"","sources":["../../src/AllowLists/OpenAllowList.ts"],"names":[],"mappings":"AAGA,OAAO,KAAK,EACV,iBAAiB,EACjB,uBAAuB,EACxB,MAAM,0BAA0B,CAAC;AAClC,OAAO,EACL,cAAc,EACd,KAAK,qBAAqB,EAE3B,MAAM,kBAAkB,CAAC;AAE1B,eAAO,MAAM,gBAAgB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EAAoB,CAAC;AAElD;;;;;;;GAOG;AACH,qBAAa,aAAc,SAAQ,cAAc,CAAC,SAAS,CAAC;IAC1D;;;;;;;OAOG;IACa,eAAe,CAC7B,QAAQ,CAAC,EAAE,qBAAqB,EAChC,QAAQ,CAAC,EAAE,iBAAiB,GAC3B,uBAAuB;CAS3B"}
@@ -1,2 +1,2 @@
1
- "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const c=require("../generated-wKBNvm48.cjs"),l=require("@wagmi/core"),r=require("viem"),h=require("../Deployable/DeployableTarget.cjs"),u=require("../errors.cjs"),w=require("../utils.cjs"),A="0x6080604052348015600e575f80fd5b50601b601f60201b60201c565b60b0565b5f602c608760201b60201c565b90508054600181161560455763f92ee8a95f526004601cfd5b8160c01c808260011c146082578060011b8355806020527fc7f505b2f371ae2175ee4913f4499e1f2633a7b5936321eed1cdaeb6115181d2602080a15b505050565b5f7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffbf6011325f1b905090565b61140e806100bd5f395ff3fe608060405260043610610113575f3560e01c80634a4ee7b11161009f57806398332bbc1161006357806398332bbc1461031d578063e3f756de14610347578063f04e283e14610383578063f2fde38b1461039f578063fee81cf4146103bb57610113565b80634a4ee7b114610287578063514e62fc146102a357806354d1f13d146102df578063715018a6146102e95780638da5cb5b146102f357610113565b806325692962116100e657806325692962146101c757806328d6183b146101d15780632de94807146101fb5780633abb060414610237578063439fab911461025f57610113565b806301ffc9a714610117578063183a4f6e146101535780631c10893f1461016f5780631cd64df41461018b575b5f80fd5b348015610122575f80fd5b5061013d60048036038101906101389190610d51565b6103f7565b60405161014a9190610d96565b60405180910390f35b61016d60048036038101906101689190610de2565b610470565b005b61018960048036038101906101849190610e67565b61047d565b005b348015610196575f80fd5b506101b160048036038101906101ac9190610e67565b610493565b6040516101be9190610d96565b60405180910390f35b6101cf6104a9565b005b3480156101dc575f80fd5b506101e56104fa565b6040516101f29190610eb4565b60405180910390f35b348015610206575f80fd5b50610221600480360381019061021c9190610ecd565b610521565b60405161022e9190610f07565b60405180910390f35b348015610242575f80fd5b5061025d60048036038101906102589190610fd6565b61053a565b005b34801561026a575f80fd5b50610285600480360381019061028091906110a9565b610647565b005b6102a1600480360381019061029c9190610e67565b61076f565b005b3480156102ae575f80fd5b506102c960048036038101906102c49190610e67565b610785565b6040516102d69190610d96565b60405180910390f35b6102e761079c565b005b6102f16107d5565b005b3480156102fe575f80fd5b506103076107e8565b6040516103149190611103565b60405180910390f35b348015610328575f80fd5b50610331610810565b60405161033e9190610f07565b60405180910390f35b348015610352575f80fd5b5061036d6004803603810190610368919061111c565b610815565b60405161037a9190610d96565b60405180910390f35b61039d60048036038101906103989190610ecd565b610868565b005b6103b960048036038101906103b49190610ecd565b6108a6565b005b3480156103c6575f80fd5b506103e160048036038101906103dc9190610ecd565b6108cf565b6040516103ee9190610f07565b60405180910390f35b5f7f8ba1fc24000000000000000000000000000000000000000000000000000000007bffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916827bffffffffffffffffffffffffffffffffffffffffffffffffffffffff191614806104695750610468826108e8565b5b9050919050565b61047a3382610961565b50565b610485610970565b61048f82826109a7565b5050565b5f818261049f85610521565b1614905092915050565b5f6104b26109b7565b67ffffffffffffffff164201905063389a75e1600c52335f52806020600c2055337fdbf36a107da19e49527a7176a1babf963b4b0ff8cde35ee35d6cd8f1f9ac7e1d5f80a250565b5f7f8ba1fc2400000000000000000000000000000000000000000000000000000000905090565b5f638b78c6d8600c52815f526020600c20549050919050565b6002610545816109c1565b828290508585905014610584576040517fff633a3800000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b5f5b8585905081101561063f578383828181106105a4576105a3611179565b5b90506020020160208101906105b991906111d0565b5f808888858181106105ce576105cd611179565b5b90506020020160208101906105e39190610ecd565b73ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020015f205f6101000a81548160ff0219169083151502179055508080600101915050610586565b505050505050565b5f6106506109e8565b905080546003825580156106825760018160011c14303b106106795763f92ee8a95f526004601cfd5b818160ff1b1b91505b505f808484810190610694919061137e565b915091506106a182610a11565b6106ac8260026109a7565b5f5b81518110156107325760015f808484815181106106ce576106cd611179565b5b602002602001015173ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020015f205f6101000a81548160ff02191690831515021790555080806001019150506106ae565b505050801561076a576002815560016020527fc7f505b2f371ae2175ee4913f4499e1f2633a7b5936321eed1cdaeb6115181d2602080a15b505050565b610777610970565b6107818282610961565b5050565b5f808261079185610521565b161415905092915050565b63389a75e1600c52335f525f6020600c2055337ffa7b8eab7da67f412cc9575ed43464468f9bfbae89d1675917346ca6d8fe3c925f80a2565b6107dd610970565b6107e65f610ae7565b565b5f7fffffffffffffffffffffffffffffffffffffffffffffffffffffffff7487392754905090565b600281565b5f805f8573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020015f205f9054906101000a900460ff1690509392505050565b610870610970565b63389a75e1600c52805f526020600c20805442111561089657636f5e88185f526004601cfd5b5f8155506108a381610ae7565b50565b6108ae610970565b8060601b6108c357637448fbae5f526004601cfd5b6108cc81610ae7565b50565b5f63389a75e1600c52815f526020600c20549050919050565b5f7fe2089f79000000000000000000000000000000000000000000000000000000007bffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916827bffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916148061095a575061095982610bad565b5b9050919050565b61096c82825f610c26565b5050565b7fffffffffffffffffffffffffffffffffffffffffffffffffffffffff748739275433146109a5576382b429005f526004601cfd5b565b6109b382826001610c26565b5050565b5f6202a300905090565b638b78c6d8600c52335f52806020600c2054166109e5576382b429005f526004601cfd5b50565b5f7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffbf6011325f1b905090565b610a19610c7e565b15610a91577fffffffffffffffffffffffffffffffffffffffffffffffffffffffff74873927805415610a5357630dc149f05f526004601cfd5b8160601b60601c9150811560ff1b82178155815f7f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e05f80a350610ae4565b8060601b60601c9050807fffffffffffffffffffffffffffffffffffffffffffffffffffffffff7487392755805f7f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e05f80a35b50565b610aef610c7e565b15610b54577fffffffffffffffffffffffffffffffffffffffffffffffffffffffff748739278160601b60601c91508181547f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e05f80a3811560ff1b8217815550610baa565b7fffffffffffffffffffffffffffffffffffffffffffffffffffffffff748739278160601b60601c91508181547f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e05f80a3818155505b50565b5f7f6ab67a0d000000000000000000000000000000000000000000000000000000007bffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916827bffffffffffffffffffffffffffffffffffffffffffffffffffffffff19161480610c1f5750610c1e82610c82565b5b9050919050565b638b78c6d8600c52825f526020600c20805483811783610c4857848216821890505b80835580600c5160601c7f715ad5ce61fc9595c7b415289d59cf203f23a94fa06f04af7e489a0a76e1fe265f80a3505050505050565b5f90565b5f7f01ffc9a7000000000000000000000000000000000000000000000000000000007bffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916827bffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916149050919050565b5f604051905090565b5f80fd5b5f80fd5b5f7fffffffff0000000000000000000000000000000000000000000000000000000082169050919050565b610d3081610cfc565b8114610d3a575f80fd5b50565b5f81359050610d4b81610d27565b92915050565b5f60208284031215610d6657610d65610cf4565b5b5f610d7384828501610d3d565b91505092915050565b5f8115159050919050565b610d9081610d7c565b82525050565b5f602082019050610da95f830184610d87565b92915050565b5f819050919050565b610dc181610daf565b8114610dcb575f80fd5b50565b5f81359050610ddc81610db8565b92915050565b5f60208284031215610df757610df6610cf4565b5b5f610e0484828501610dce565b91505092915050565b5f73ffffffffffffffffffffffffffffffffffffffff82169050919050565b5f610e3682610e0d565b9050919050565b610e4681610e2c565b8114610e50575f80fd5b50565b5f81359050610e6181610e3d565b92915050565b5f8060408385031215610e7d57610e7c610cf4565b5b5f610e8a85828601610e53565b9250506020610e9b85828601610dce565b9150509250929050565b610eae81610cfc565b82525050565b5f602082019050610ec75f830184610ea5565b92915050565b5f60208284031215610ee257610ee1610cf4565b5b5f610eef84828501610e53565b91505092915050565b610f0181610daf565b82525050565b5f602082019050610f1a5f830184610ef8565b92915050565b5f80fd5b5f80fd5b5f80fd5b5f8083601f840112610f4157610f40610f20565b5b8235905067ffffffffffffffff811115610f5e57610f5d610f24565b5b602083019150836020820283011115610f7a57610f79610f28565b5b9250929050565b5f8083601f840112610f9657610f95610f20565b5b8235905067ffffffffffffffff811115610fb357610fb2610f24565b5b602083019150836020820283011115610fcf57610fce610f28565b5b9250929050565b5f805f8060408587031215610fee57610fed610cf4565b5b5f85013567ffffffffffffffff81111561100b5761100a610cf8565b5b61101787828801610f2c565b9450945050602085013567ffffffffffffffff81111561103a57611039610cf8565b5b61104687828801610f81565b925092505092959194509250565b5f8083601f84011261106957611068610f20565b5b8235905067ffffffffffffffff81111561108657611085610f24565b5b6020830191508360018202830111156110a2576110a1610f28565b5b9250929050565b5f80602083850312156110bf576110be610cf4565b5b5f83013567ffffffffffffffff8111156110dc576110db610cf8565b5b6110e885828601611054565b92509250509250929050565b6110fd81610e2c565b82525050565b5f6020820190506111165f8301846110f4565b92915050565b5f805f6040848603121561113357611132610cf4565b5b5f61114086828701610e53565b935050602084013567ffffffffffffffff81111561116157611160610cf8565b5b61116d86828701611054565b92509250509250925092565b7f4e487b71000000000000000000000000000000000000000000000000000000005f52603260045260245ffd5b6111af81610d7c565b81146111b9575f80fd5b50565b5f813590506111ca816111a6565b92915050565b5f602082840312156111e5576111e4610cf4565b5b5f6111f2848285016111bc565b91505092915050565b5f61120582610e0d565b9050919050565b611215816111fb565b811461121f575f80fd5b50565b5f813590506112308161120c565b92915050565b5f601f19601f8301169050919050565b7f4e487b71000000000000000000000000000000000000000000000000000000005f52604160045260245ffd5b61127c82611236565b810181811067ffffffffffffffff8211171561129b5761129a611246565b5b80604052505050565b5f6112ad610ceb565b90506112b98282611273565b919050565b5f67ffffffffffffffff8211156112d8576112d7611246565b5b602082029050602081019050919050565b5f6112fb6112f6846112be565b6112a4565b9050808382526020820190506020840283018581111561131e5761131d610f28565b5b835b8181101561134757806113338882610e53565b845260208401935050602081019050611320565b5050509392505050565b5f82601f83011261136557611364610f20565b5b81356113758482602086016112e9565b91505092915050565b5f806040838503121561139457611393610cf4565b5b5f6113a185828601611222565b925050602083013567ffffffffffffffff8111156113c2576113c1610cf8565b5b6113ce85828601611351565b915050925092905056fea264697066735822122094368c65f566939d0b9827de55e44a26c567f89bc0bf24103275890d9278dc0164736f6c634300081a0033",y=2n,s=class s extends h.DeployableTarget{constructor(){super(...arguments),this.abi=c.T}async isAllowed(f,e){return await c.JN(this._config,{address:this.assertValidAddress(),args:[f,r.zeroHash],...this.optionallyAttachAccount(),...e})}async setAllowed(f,e,b){return await this.awaitResult(this.setAllowedRaw(f,e,b))}async setAllowedRaw(f,e,b){const{request:a,result:d}=await c.Ah(this._config,{address:this.assertValidAddress(),args:[f,e],...this.optionallyAttachAccount(),...b});return{hash:await c.lh(this._config,a),result:d}}async grantRoles(f,e,b){return await this.awaitResult(this.grantRolesRaw(f,e,b))}async grantRolesRaw(f,e,b){const{request:a,result:d}=await c.bh(this._config,{address:this.assertValidAddress(),args:[f,e],...this.optionallyAttachAccount(),...b});return{hash:await c.ih(this._config,a),result:d}}buildParameters(f,e){var d;const[b,a]=this.validateDeploymentConfig(f,e);if(!b.owner||b.owner===r.zeroAddress){const t=a.account?a.account.address:a.config?l.getAccount(a.config).address:(d=this._account)==null?void 0:d.address;if(t)b.owner=t;else throw new u.DeployableUnknownOwnerProvidedError}return{abi:c.T,bytecode:A,args:[i(b)],...this.optionallyAttachAccount(a.account)}}};s.base="0x9A3848B6B35d406d758892C6b4b00042cCbc96AD",s.registryType=w.RegistryType.ALLOW_LIST;let o=s;function i({owner:n,allowed:f}){return r.encodeAbiParameters([{type:"address",name:"owner"},{type:"address[]",name:"allowed"}],[n,f])}exports.simpleAllowListAbi=c.T;exports.LIST_MANAGER_ROLE=y;exports.SimpleAllowList=o;exports.prepareSimpleAllowListPayload=i;
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const d=require("../generated-CyTNlOwM.cjs"),u=require("@wagmi/core"),r=require("viem"),h=require("../deployments-DVXioW2i.cjs"),i=require("../Deployable/DeployableTargetWithRBAC.cjs"),A=require("../errors.cjs"),w=require("../utils.cjs"),y="0x6080604052348015600e575f80fd5b50601b601f60201b60201c565b60b0565b5f602c608760201b60201c565b90508054600181161560455763f92ee8a95f526004601cfd5b8160c01c808260011c146082578060011b8355806020527fc7f505b2f371ae2175ee4913f4499e1f2633a7b5936321eed1cdaeb6115181d2602080a15b505050565b5f7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffbf6011325f1b905090565b6118fe806100bd5f395ff3fe60806040526004361061014a575f3560e01c806354d1f13d116100b5578063e66708291161006e578063e66708291461040a578063ec87621c14610432578063f04e283e1461045c578063f2fde38b14610478578063fe9fbb8014610494578063fee81cf4146104d05761014a565b806354d1f13d1461033e578063715018a61461034857806375b238fc1461035257806380fd60051461037c5780638da5cb5b146103a4578063e3f756de146103ce5761014a565b80632de94807116101075780632de94807146102325780633abb06041461026e5780634359d28a14610296578063439fab91146102be5780634a4ee7b1146102e6578063514e62fc146103025761014a565b806301ffc9a71461014e578063183a4f6e1461018a5780631c10893f146101a65780631cd64df4146101c257806325692962146101fe57806328d6183b14610208575b5f80fd5b348015610159575f80fd5b50610174600480360381019061016f919061116e565b61050c565b60405161018191906111b3565b60405180910390f35b6101a4600480360381019061019f91906111ff565b610585565b005b6101c060048036038101906101bb9190611284565b610592565b005b3480156101cd575f80fd5b506101e860048036038101906101e39190611284565b6105a8565b6040516101f591906111b3565b60405180910390f35b6102066105be565b005b348015610213575f80fd5b5061021c61060f565b60405161022991906112d1565b60405180910390f35b34801561023d575f80fd5b50610258600480360381019061025391906112ea565b610636565b6040516102659190611324565b60405180910390f35b348015610279575f80fd5b50610294600480360381019061028f91906113f3565b61064f565b005b3480156102a1575f80fd5b506102bc60048036038101906102b791906113f3565b61078f565b005b3480156102c9575f80fd5b506102e460048036038101906102df91906114c6565b61089d565b005b61030060048036038101906102fb9190611284565b6109ba565b005b34801561030d575f80fd5b5061032860048036038101906103239190611284565b6109d0565b60405161033591906111b3565b60405180910390f35b6103466109e7565b005b610350610a20565b005b34801561035d575f80fd5b50610366610a33565b6040516103739190611324565b60405180910390f35b348015610387575f80fd5b506103a2600480360381019061039d9190611566565b610a38565b005b3480156103af575f80fd5b506103b8610aee565b6040516103c591906115f3565b60405180910390f35b3480156103d9575f80fd5b506103f460048036038101906103ef919061160c565b610b16565b60405161040191906111b3565b60405180910390f35b348015610415575f80fd5b50610430600480360381019061042b9190611566565b610b69565b005b34801561043d575f80fd5b50610446610c1f565b6040516104539190611324565b60405180910390f35b610476600480360381019061047191906112ea565b610c24565b005b610492600480360381019061048d91906112ea565b610c62565b005b34801561049f575f80fd5b506104ba60048036038101906104b591906112ea565b610c8b565b6040516104c791906111b3565b60405180910390f35b3480156104db575f80fd5b506104f660048036038101906104f191906112ea565b610cde565b6040516105039190611324565b60405180910390f35b5f7f1392d798000000000000000000000000000000000000000000000000000000007bffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916827bffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916148061057e575061057d82610cf7565b5b9050919050565b61058f3382610d70565b50565b61059a610d7f565b6105a48282610db6565b5050565b5f81826105b485610636565b1614905092915050565b5f6105c7610dc6565b67ffffffffffffffff164201905063389a75e1600c52335f52806020600c2055337fdbf36a107da19e49527a7176a1babf963b4b0ff8cde35ee35d6cd8f1f9ac7e1d5f80a250565b5f7f1392d79800000000000000000000000000000000000000000000000000000000905090565b5f638b78c6d8600c52815f526020600c20549050919050565b61065833610c8b565b61068e576040517f82b4290000000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b8181905084849050146106cd576040517fff633a3800000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b5f5b84849050811015610788578282828181106106ed576106ec611669565b5b905060200201602081019061070291906116c0565b5f8087878581811061071757610716611669565b5b905060200201602081019061072c91906112ea565b73ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020015f205f6101000a81548160ff02191690831515021790555080806001019150506106cf565b5050505050565b600261079a81610dd0565b8282905085859050146107d9576040517fff633a3800000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b5f5b85859050811015610895575f8484838181106107fa576107f9611669565b5b905060200201602081019061080f91906116c0565b905060011515811515036108545761084f87878481811061083357610832611669565b5b905060200201602081019061084891906112ea565b6001610db6565b610887565b61088687878481811061086a57610869611669565b5b905060200201602081019061087f91906112ea565b6001610d70565b5b5080806001019150506107db565b505050505050565b5f6108a6610e05565b905080546003825580156108d85760018160011c14303b106108cf5763f92ee8a95f526004601cfd5b818160ff1b1b91505b505f8084848101906108ea919061186e565b915091506108f782610e2e565b5f5b815181101561097d5760015f8084848151811061091957610918611669565b5b602002602001015173ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020015f205f6101000a81548160ff02191690831515021790555080806001019150506108f9565b50505080156109b5576002815560016020527fc7f505b2f371ae2175ee4913f4499e1f2633a7b5936321eed1cdaeb6115181d2602080a15b505050565b6109c2610d7f565b6109cc8282610d70565b5050565b5f80826109dc85610636565b161415905092915050565b63389a75e1600c52335f525f6020600c2055337ffa7b8eab7da67f412cc9575ed43464468f9bfbae89d1675917346ca6d8fe3c925f80a2565b610a28610d7f565b610a315f610f04565b565b600281565b6002610a4381610dd0565b828290508585905014610a82576040517fff633a3800000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b5f5b85859050811015610ae657610ad9868683818110610aa557610aa4611669565b5b9050602002016020810190610aba91906112ea565b858584818110610acd57610acc611669565b5b90506020020135610d70565b8080600101915050610a84565b505050505050565b5f7fffffffffffffffffffffffffffffffffffffffffffffffffffffffff7487392754905090565b5f805f8573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020015f205f9054906101000a900460ff1690509392505050565b6002610b7481610dd0565b828290508585905014610bb3576040517fff633a3800000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b5f5b85859050811015610c1757610c0a868683818110610bd657610bd5611669565b5b9050602002016020810190610beb91906112ea565b858584818110610bfe57610bfd611669565b5b90506020020135610db6565b8080600101915050610bb5565b505050505050565b600181565b610c2c610d7f565b63389a75e1600c52805f526020600c208054421115610c5257636f5e88185f526004601cfd5b5f815550610c5f81610f04565b50565b610c6a610d7f565b8060601b610c7f57637448fbae5f526004601cfd5b610c8881610f04565b50565b5f8173ffffffffffffffffffffffffffffffffffffffff16610cab610aee565b73ffffffffffffffffffffffffffffffffffffffff161480610cd75750610cd68260026001176109d0565b5b9050919050565b5f63389a75e1600c52815f526020600c20549050919050565b5f7fe2089f79000000000000000000000000000000000000000000000000000000007bffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916827bffffffffffffffffffffffffffffffffffffffffffffffffffffffff19161480610d695750610d6882610fca565b5b9050919050565b610d7b82825f611043565b5050565b7fffffffffffffffffffffffffffffffffffffffffffffffffffffffff74873927543314610db4576382b429005f526004601cfd5b565b610dc282826001611043565b5050565b5f6202a300905090565b638b78c6d819543314610e0257638b78c6d8600c52335f52806020600c205416610e01576382b429005f526004601cfd5b5b50565b5f7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffbf6011325f1b905090565b610e3661109b565b15610eae577fffffffffffffffffffffffffffffffffffffffffffffffffffffffff74873927805415610e7057630dc149f05f526004601cfd5b8160601b60601c9150811560ff1b82178155815f7f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e05f80a350610f01565b8060601b60601c9050807fffffffffffffffffffffffffffffffffffffffffffffffffffffffff7487392755805f7f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e05f80a35b50565b610f0c61109b565b15610f71577fffffffffffffffffffffffffffffffffffffffffffffffffffffffff748739278160601b60601c91508181547f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e05f80a3811560ff1b8217815550610fc7565b7fffffffffffffffffffffffffffffffffffffffffffffffffffffffff748739278160601b60601c91508181547f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e05f80a3818155505b50565b5f7f6ab67a0d000000000000000000000000000000000000000000000000000000007bffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916827bffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916148061103c575061103b8261109f565b5b9050919050565b638b78c6d8600c52825f526020600c2080548381178361106557848216821890505b80835580600c5160601c7f715ad5ce61fc9595c7b415289d59cf203f23a94fa06f04af7e489a0a76e1fe265f80a3505050505050565b5f90565b5f7f01ffc9a7000000000000000000000000000000000000000000000000000000007bffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916827bffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916149050919050565b5f604051905090565b5f80fd5b5f80fd5b5f7fffffffff0000000000000000000000000000000000000000000000000000000082169050919050565b61114d81611119565b8114611157575f80fd5b50565b5f8135905061116881611144565b92915050565b5f6020828403121561118357611182611111565b5b5f6111908482850161115a565b91505092915050565b5f8115159050919050565b6111ad81611199565b82525050565b5f6020820190506111c65f8301846111a4565b92915050565b5f819050919050565b6111de816111cc565b81146111e8575f80fd5b50565b5f813590506111f9816111d5565b92915050565b5f6020828403121561121457611213611111565b5b5f611221848285016111eb565b91505092915050565b5f73ffffffffffffffffffffffffffffffffffffffff82169050919050565b5f6112538261122a565b9050919050565b61126381611249565b811461126d575f80fd5b50565b5f8135905061127e8161125a565b92915050565b5f806040838503121561129a57611299611111565b5b5f6112a785828601611270565b92505060206112b8858286016111eb565b9150509250929050565b6112cb81611119565b82525050565b5f6020820190506112e45f8301846112c2565b92915050565b5f602082840312156112ff576112fe611111565b5b5f61130c84828501611270565b91505092915050565b61131e816111cc565b82525050565b5f6020820190506113375f830184611315565b92915050565b5f80fd5b5f80fd5b5f80fd5b5f8083601f84011261135e5761135d61133d565b5b8235905067ffffffffffffffff81111561137b5761137a611341565b5b60208301915083602082028301111561139757611396611345565b5b9250929050565b5f8083601f8401126113b3576113b261133d565b5b8235905067ffffffffffffffff8111156113d0576113cf611341565b5b6020830191508360208202830111156113ec576113eb611345565b5b9250929050565b5f805f806040858703121561140b5761140a611111565b5b5f85013567ffffffffffffffff81111561142857611427611115565b5b61143487828801611349565b9450945050602085013567ffffffffffffffff81111561145757611456611115565b5b6114638782880161139e565b925092505092959194509250565b5f8083601f8401126114865761148561133d565b5b8235905067ffffffffffffffff8111156114a3576114a2611341565b5b6020830191508360018202830111156114bf576114be611345565b5b9250929050565b5f80602083850312156114dc576114db611111565b5b5f83013567ffffffffffffffff8111156114f9576114f8611115565b5b61150585828601611471565b92509250509250929050565b5f8083601f8401126115265761152561133d565b5b8235905067ffffffffffffffff81111561154357611542611341565b5b60208301915083602082028301111561155f5761155e611345565b5b9250929050565b5f805f806040858703121561157e5761157d611111565b5b5f85013567ffffffffffffffff81111561159b5761159a611115565b5b6115a787828801611349565b9450945050602085013567ffffffffffffffff8111156115ca576115c9611115565b5b6115d687828801611511565b925092505092959194509250565b6115ed81611249565b82525050565b5f6020820190506116065f8301846115e4565b92915050565b5f805f6040848603121561162357611622611111565b5b5f61163086828701611270565b935050602084013567ffffffffffffffff81111561165157611650611115565b5b61165d86828701611471565b92509250509250925092565b7f4e487b71000000000000000000000000000000000000000000000000000000005f52603260045260245ffd5b61169f81611199565b81146116a9575f80fd5b50565b5f813590506116ba81611696565b92915050565b5f602082840312156116d5576116d4611111565b5b5f6116e2848285016116ac565b91505092915050565b5f6116f58261122a565b9050919050565b611705816116eb565b811461170f575f80fd5b50565b5f81359050611720816116fc565b92915050565b5f601f19601f8301169050919050565b7f4e487b71000000000000000000000000000000000000000000000000000000005f52604160045260245ffd5b61176c82611726565b810181811067ffffffffffffffff8211171561178b5761178a611736565b5b80604052505050565b5f61179d611108565b90506117a98282611763565b919050565b5f67ffffffffffffffff8211156117c8576117c7611736565b5b602082029050602081019050919050565b5f6117eb6117e6846117ae565b611794565b9050808382526020820190506020840283018581111561180e5761180d611345565b5b835b8181101561183757806118238882611270565b845260208401935050602081019050611810565b5050509392505050565b5f82601f8301126118555761185461133d565b5b81356118658482602086016117d9565b91505092915050565b5f806040838503121561188457611883611111565b5b5f61189185828601611712565b925050602083013567ffffffffffffffff8111156118b2576118b1611115565b5b6118be85828601611841565b915050925092905056fea2646970667358221220d5b6ea3e1c92033149fca471a0235b4450ed1b532444168de2e063c44c8ab99e64736f6c634300081a0033",p=i.Roles.MANAGER,t=class t extends i.DeployableTargetWithRBAC{constructor(){super(...arguments),this.abi=d.N}async owner(f){return await d.NR(this._config,{...this.optionallyAttachAccount(),...f,address:this.assertValidAddress(),args:[]})}async isAllowed(f,e){return await d.IR(this._config,{address:this.assertValidAddress(),args:[f,r.zeroHash],...this.optionallyAttachAccount(),...e})}async setAllowed(f,e,b){return await this.awaitResult(this.setAllowedRaw(f,e,b))}async setAllowedRaw(f,e,b){const{request:a,result:c}=await d.WR(this._config,{address:this.assertValidAddress(),args:[f,e],...this.optionallyAttachAccount(),...b});return{hash:await d.VR(this._config,a),result:c}}buildParameters(f,e){var c;const[b,a]=this.validateDeploymentConfig(f,e);if(!b.owner||b.owner===r.zeroAddress){const s=a.account?a.account.address:a.config?u.getAccount(a.config).address:(c=this._account)==null?void 0:c.address;if(s)b.owner=s;else throw new A.DeployableUnknownOwnerProvidedError}return{abi:d.N,bytecode:y,args:[n(b)],...this.optionallyAttachAccount(a.account)}}};t.bases={...h.SimpleAllowList},t.registryType=w.RegistryType.ALLOW_LIST;let o=t;function n({owner:l,allowed:f}){return r.encodeAbiParameters([{type:"address",name:"owner"},{type:"address[]",name:"allowed"}],[l,f])}exports.simpleAllowListAbi=d.N;exports.LIST_MANAGER_ROLE=p;exports.SimpleAllowList=o;exports.prepareSimpleAllowListPayload=n;
2
2
  //# sourceMappingURL=SimpleAllowList.cjs.map
@@ -1 +1 @@
1
- {"version":3,"file":"SimpleAllowList.cjs","sources":["../../src/AllowLists/SimpleAllowList.ts"],"sourcesContent":["import {\n readSimpleAllowListIsAllowed,\n simpleAllowListAbi,\n simulateSimpleAllowListGrantRoles,\n simulateSimpleAllowListSetAllowed,\n writeSimpleAllowListGrantRoles,\n writeSimpleAllowListSetAllowed,\n} from '@boostxyz/evm';\nimport { bytecode } from '@boostxyz/evm/artifacts/contracts/allowlists/SimpleAllowList.sol/SimpleAllowList.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 { simpleAllowListAbi };\n\n/**\n * Object representation of a {@link SimpleAllowList} initialization payload.\n *\n * @export\n * @interface SimpleAllowListPayload\n * @typedef {SimpleAllowListPayload}\n */\nexport interface SimpleAllowListPayload {\n /**\n * The allow list's owner, given the {@link LIST_MANAGER_ROLE} role.\n *\n * @type {Address}\n */\n owner: Address;\n /**\n * List of allowed addresses.\n *\n * @type {Address[]}\n */\n allowed: Address[];\n}\n\n/**\n * A generic `viem.Log` event with support for `SimpleAllowList` event types.\n *\n * @export\n * @typedef {SimpleAllowListLog}\n * @template {ContractEventName<\n * typeof simpleAllowListAbi\n * >} [event=ContractEventName<typeof simpleAllowListAbi>]\n */\nexport type SimpleAllowListLog<\n event extends ContractEventName<\n typeof simpleAllowListAbi\n > = ContractEventName<typeof simpleAllowListAbi>,\n> = GenericLog<typeof simpleAllowListAbi, event>;\n\n/**\n * A constant representing the list manager's role\n *\n * @type {2n}\n */\nexport const LIST_MANAGER_ROLE = 2n;\n/**\n * A simple implementation of an AllowList that checks if a user is authorized based on a list of allowed addresses\n *\n * @export\n * @class SimpleAllowList\n * @typedef {SimpleAllowList}\n * @extends {DeployableTarget<SimpleAllowListPayload>}\n */\nexport class SimpleAllowList extends DeployableTarget<\n SimpleAllowListPayload,\n typeof simpleAllowListAbi\n> {\n public override readonly abi = simpleAllowListAbi;\n /**\n * @inheritdoc\n *\n * @public\n * @static\n * @type {Address}\n */\n public static override base: Address = import.meta.env\n .VITE_SIMPLE_ALLOWLIST_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.\n *\n * @public\n * @async\n * @param {Address} address - The address of the user\n * @param {?ReadParams<typeof simpleAllowListAbi, 'setAllowed'>} [params]\n * @returns {Promise<boolean>} - True if the user is authorized\n */\n public async isAllowed(\n address: Address,\n params?: ReadParams<typeof simpleAllowListAbi, 'setAllowed'>,\n ): Promise<boolean> {\n return await readSimpleAllowListIsAllowed(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 allowed status of a user. The length of the `users_` and `allowed_` arrays must be the same.\n * 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 allowed status of each user\n * @param {?ReadParams<typeof simpleAllowListAbi, 'setAllowed'>} [params]\n * @returns {Promise<void>}\n */\n public async setAllowed(\n addresses: Address[],\n allowed: boolean[],\n params?: WriteParams<typeof simpleAllowListAbi, 'setAllowed'>,\n ) {\n return await this.awaitResult(\n this.setAllowedRaw(addresses, allowed, params),\n );\n }\n\n /**\n * Set the allowed status of a user. The length of the `users_` and `allowed_` arrays must be the same.\n * 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 allowed status of each user\n * @param {?ReadParams<typeof simpleAllowListAbi, 'setAllowed'>} [params]\n * @returns {Promise<void>}\n */\n public async setAllowedRaw(\n addresses: Address[],\n allowed: boolean[],\n params?: ReadParams<typeof simpleAllowListAbi, 'setAllowed'>,\n ) {\n const { request, result } = await simulateSimpleAllowListSetAllowed(\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 writeSimpleAllowListSetAllowed(this._config, request);\n return { hash, result };\n }\n\n /**\n * Allows the owner to grant `user` `roles`.\n *\n * @public\n * @async\n * @param {Address} address\n * @param {bigint} role\n * @param {?ReadParams<typeof simpleAllowListAbi, 'grantRoles'>} [params]\n * @returns {Promise<void>}\n */\n public async grantRoles(\n address: Address,\n role: bigint,\n params?: WriteParams<typeof simpleAllowListAbi, 'grantRoles'>,\n ) {\n return await this.awaitResult(this.grantRolesRaw(address, role, params));\n }\n\n /**\n * Allows the owner to grant `user` `roles`.\n *\n * @public\n * @async\n * @param {Address} address\n * @param {bigint} role\n * @param {?ReadParams<typeof simpleAllowListAbi, 'grantRoles'>} [params]\n * @returns {Promise<void>}\n */\n public async grantRolesRaw(\n address: Address,\n role: bigint,\n params?: ReadParams<typeof simpleAllowListAbi, 'grantRoles'>,\n ) {\n const { request, result } = await simulateSimpleAllowListGrantRoles(\n this._config,\n {\n address: this.assertValidAddress(),\n args: [address, role],\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 writeSimpleAllowListGrantRoles(this._config, request);\n return { hash, result };\n }\n\n /**\n * @inheritdoc\n *\n * @public\n * @param {?SimpleAllowListPayload} [_payload]\n * @param {?DeployableOptions} [_options]\n * @returns {GenericDeployableParams}\n */\n public override buildParameters(\n _payload?: SimpleAllowListPayload,\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: simpleAllowListAbi,\n bytecode: bytecode as Hex,\n args: [prepareSimpleAllowListPayload(payload)],\n ...this.optionallyAttachAccount(options.account),\n };\n }\n}\n\n/**\n * Given a {@link SimpleAllowListPayload}, properly encode the initialization payload.\n *\n * @param {SimpleAllowListPayload} param0\n * @param {Address} param0.owner - The allow list's owner, given the {@link LIST_MANAGER_ROLE} role.\n * @param {Address[]} param0.allowed - List of allowed addresses.\n * @returns {Hex}\n */\nexport function prepareSimpleAllowListPayload({\n owner,\n allowed,\n}: SimpleAllowListPayload) {\n return encodeAbiParameters(\n [\n { type: 'address', name: 'owner' },\n { type: 'address[]', name: 'allowed' },\n ],\n [owner, allowed],\n );\n}\n"],"names":["LIST_MANAGER_ROLE","_SimpleAllowList","DeployableTarget","simpleAllowListAbi","address","params","readSimpleAllowListIsAllowed","zeroHash","addresses","allowed","request","result","simulateSimpleAllowListSetAllowed","writeSimpleAllowListSetAllowed","role","simulateSimpleAllowListGrantRoles","writeSimpleAllowListGrantRoles","_payload","_options","payload","options","zeroAddress","owner","getAccount","_a","DeployableUnknownOwnerProvidedError","bytecode","prepareSimpleAllowListPayload","RegistryType","SimpleAllowList","encodeAbiParameters"],"mappings":"0qVA2EaA,EAAoB,GASpBC,EAAN,MAAMA,UAAwBC,EAAAA,gBAGnC,CAHK,aAAA,CAAA,MAAA,GAAA,SAAA,EAIL,KAAyB,IAAMC,GAAA,CA4B/B,MAAa,UACXC,EACAC,EACkB,CACX,OAAA,MAAMC,EAAAA,GAA6B,KAAK,QAAS,CACtD,QAAS,KAAK,mBAAmB,EACjC,KAAM,CAACF,EAASG,UAAQ,EACxB,GAAG,KAAK,wBAAwB,EAEhC,GAAIF,CAAA,CACL,CACH,CAaA,MAAa,WACXG,EACAC,EACAJ,EACA,CACA,OAAO,MAAM,KAAK,YAChB,KAAK,cAAcG,EAAWC,EAASJ,CAAM,CAAA,CAEjD,CAaA,MAAa,cACXG,EACAC,EACAJ,EACA,CACA,KAAM,CAAE,QAAAK,EAAS,OAAAC,CAAO,EAAI,MAAMC,EAAA,GAChC,KAAK,QACL,CACE,QAAS,KAAK,mBAAmB,EACjC,KAAM,CAACJ,EAAWC,CAAO,EACzB,GAAG,KAAK,wBAAwB,EAEhC,GAAIJ,CACN,CAAA,EAGK,MAAA,CAAE,KADI,MAAMQ,EAA+B,GAAA,KAAK,QAASH,CAAO,EACxD,OAAAC,EACjB,CAYA,MAAa,WACXP,EACAU,EACAT,EACA,CACO,OAAA,MAAM,KAAK,YAAY,KAAK,cAAcD,EAASU,EAAMT,CAAM,CAAC,CACzE,CAYA,MAAa,cACXD,EACAU,EACAT,EACA,CACA,KAAM,CAAE,QAAAK,EAAS,OAAAC,CAAO,EAAI,MAAMI,EAAA,GAChC,KAAK,QACL,CACE,QAAS,KAAK,mBAAmB,EACjC,KAAM,CAACX,EAASU,CAAI,EACpB,GAAG,KAAK,wBAAwB,EAEhC,GAAIT,CACN,CAAA,EAGK,MAAA,CAAE,KADI,MAAMW,EAA+B,GAAA,KAAK,QAASN,CAAO,EACxD,OAAAC,EACjB,CAUgB,gBACdM,EACAC,EACyB,OACzB,KAAM,CAACC,EAASC,CAAO,EAAI,KAAK,yBAC9BH,EACAC,CAAA,EAEF,GAAI,CAACC,EAAQ,OAASA,EAAQ,QAAUE,EAAAA,YAAa,CACnD,MAAMC,EAAQF,EAAQ,QAClBA,EAAQ,QAAQ,QAChBA,EAAQ,OACNG,EAAA,WAAWH,EAAQ,MAAM,EAAE,SAC3BI,EAAA,KAAK,WAAL,YAAAA,EAAe,QACrB,GAAIF,EACFH,EAAQ,MAAQG,MAEhB,OAAM,IAAIG,EAAoC,mCAElD,CACO,MAAA,CACL,IAAKtB,EAAA,EACL,SAAAuB,EACA,KAAM,CAACC,EAA8BR,CAAO,CAAC,EAC7C,GAAG,KAAK,wBAAwBC,EAAQ,OAAO,CAAA,CAEnD,CACF,EAtKyBnB,EAAA,KAAgB,6CASvCA,EAAuB,aAA6B2B,EAAa,aAAA,WArB5D,IAAMC,EAAN5B,EA4LA,SAAS0B,EAA8B,CAC5C,MAAAL,EACA,QAAAb,CACF,EAA2B,CAClB,OAAAqB,EAAA,oBACL,CACE,CAAE,KAAM,UAAW,KAAM,OAAQ,EACjC,CAAE,KAAM,YAAa,KAAM,SAAU,CACvC,EACA,CAACR,EAAOb,CAAO,CAAA,CAEnB"}
1
+ {"version":3,"file":"SimpleAllowList.cjs","sources":["../../src/AllowLists/SimpleAllowList.ts"],"sourcesContent":["import {\n readSimpleAllowListIsAllowed,\n readSimpleAllowListOwner,\n simpleAllowListAbi,\n simulateSimpleAllowListSetAllowed,\n writeSimpleAllowListSetAllowed,\n} from '@boostxyz/evm';\nimport { bytecode } from '@boostxyz/evm/artifacts/contracts/allowlists/SimpleAllowList.sol/SimpleAllowList.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 { SimpleAllowList as SimpleAllowListBases } from '../../dist/deployments.json';\nimport type {\n DeployableOptions,\n GenericDeployableParams,\n} from '../Deployable/Deployable';\nimport {\n DeployableTargetWithRBAC,\n Roles,\n} from '../Deployable/DeployableTargetWithRBAC';\nimport { DeployableUnknownOwnerProvidedError } from '../errors';\nimport {\n type GenericLog,\n type ReadParams,\n RegistryType,\n type WriteParams,\n} from '../utils';\n\nexport { simpleAllowListAbi };\n\n/**\n * Object representation of a {@link SimpleAllowList} initialization payload.\n *\n * @export\n * @interface SimpleAllowListPayload\n * @typedef {SimpleAllowListPayload}\n */\nexport interface SimpleAllowListPayload {\n /**\n * The allow list's owner, given the {@link LIST_MANAGER_ROLE} role.\n *\n * @type {Address}\n */\n owner: Address;\n /**\n * List of allowed addresses.\n *\n * @type {Address[]}\n */\n allowed: Address[];\n}\n\n/**\n * A generic `viem.Log` event with support for `SimpleAllowList` event types.\n *\n * @export\n * @typedef {SimpleAllowListLog}\n * @template {ContractEventName<\n * typeof simpleAllowListAbi\n * >} [event=ContractEventName<typeof simpleAllowListAbi>]\n */\nexport type SimpleAllowListLog<\n event extends ContractEventName<\n typeof simpleAllowListAbi\n > = ContractEventName<typeof simpleAllowListAbi>,\n> = GenericLog<typeof simpleAllowListAbi, event>;\n\n/**\n * A constant representing the list manager's role\n *\n * @deprecated use {@link Roles} instead\n * @type {1n}\n */\nexport const LIST_MANAGER_ROLE = Roles.MANAGER;\n/**\n * A simple implementation of an AllowList that checks if a user is authorized based on a list of allowed addresses\n *\n * @export\n * @class SimpleAllowList\n * @typedef {SimpleAllowList}\n * @extends {DeployableTargetWithRBAC<SimpleAllowListPayload>}\n */\nexport class SimpleAllowList extends DeployableTargetWithRBAC<\n SimpleAllowListPayload,\n typeof simpleAllowListAbi\n> {\n public override readonly abi = simpleAllowListAbi;\n /**\n * @inheritdoc\n *\n * @public\n * @static\n * @type {Record<number, Address>}\n */\n public static override bases: Record<number, Address> = {\n ...(SimpleAllowListBases as Record<number, Address>),\n };\n /**\n * @inheritdoc\n *\n * @public\n * @static\n * @type {RegistryType}\n */\n public static override registryType: RegistryType = RegistryType.ALLOW_LIST;\n\n /**\n * Retrieves the owner\n *\n * @public\n * @async\n * @param {?ReadParams} [params]\n * @returns {Promise<Address>} - The address of the owner\n */\n public async owner(\n params?: ReadParams<typeof simpleAllowListAbi, 'owner'>,\n ): Promise<Address> {\n return await readSimpleAllowListOwner(this._config, {\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 address: this.assertValidAddress(),\n args: [],\n });\n }\n\n /**\n * Check if a user is authorized.\n *\n * @public\n * @async\n * @param {Address} address - The address of the user\n * @param {?ReadParams} [params]\n * @returns {Promise<boolean>} - True if the user is authorized\n */\n public async isAllowed(\n address: Address,\n params?: ReadParams<typeof simpleAllowListAbi, 'setAllowed'>,\n ): Promise<boolean> {\n return await readSimpleAllowListIsAllowed(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 allowed status of a user. The length of the `users_` and `allowed_` arrays must be the same.\n * 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 allowed status of each user\n * @param {?ReadParams} [params]\n * @returns {Promise<void>}\n */\n public async setAllowed(\n addresses: Address[],\n allowed: boolean[],\n params?: WriteParams<typeof simpleAllowListAbi, 'setAllowed'>,\n ) {\n return await this.awaitResult(\n this.setAllowedRaw(addresses, allowed, params),\n );\n }\n\n /**\n * Set the allowed status of a user. The length of the `users_` and `allowed_` arrays must be the same.\n * 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 allowed status of each user\n * @param {?ReadParams} [params]\n * @returns {Promise<{ hash: `0x${string}`; result: void; }>}\n */\n public async setAllowedRaw(\n addresses: Address[],\n allowed: boolean[],\n params?: ReadParams<typeof simpleAllowListAbi, 'setAllowed'>,\n ) {\n const { request, result } = await simulateSimpleAllowListSetAllowed(\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 writeSimpleAllowListSetAllowed(this._config, request);\n return { hash, result };\n }\n\n /**\n * @inheritdoc\n *\n * @public\n * @param {?SimpleAllowListPayload} [_payload]\n * @param {?DeployableOptions} [_options]\n * @returns {GenericDeployableParams}\n */\n public override buildParameters(\n _payload?: SimpleAllowListPayload,\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: simpleAllowListAbi,\n bytecode: bytecode as Hex,\n args: [prepareSimpleAllowListPayload(payload)],\n ...this.optionallyAttachAccount(options.account),\n };\n }\n}\n\n/**\n * Given a {@link SimpleAllowListPayload}, properly encode the initialization payload.\n *\n * @param {SimpleAllowListPayload} param0\n * @param {Address} param0.owner - The allow list's owner, given the {@link LIST_MANAGER_ROLE} role.\n * @param {Address[]} param0.allowed - List of allowed addresses.\n * @returns {Hex}\n */\nexport function prepareSimpleAllowListPayload({\n owner,\n allowed,\n}: SimpleAllowListPayload) {\n return encodeAbiParameters(\n [\n { type: 'address', name: 'owner' },\n { type: 'address[]', name: 'allowed' },\n ],\n [owner, allowed],\n );\n}\n"],"names":["LIST_MANAGER_ROLE","Roles","_SimpleAllowList","DeployableTargetWithRBAC","simpleAllowListAbi","params","readSimpleAllowListOwner","address","readSimpleAllowListIsAllowed","zeroHash","addresses","allowed","request","result","simulateSimpleAllowListSetAllowed","writeSimpleAllowListSetAllowed","_payload","_options","payload","options","zeroAddress","owner","getAccount","_a","DeployableUnknownOwnerProvidedError","bytecode","prepareSimpleAllowListPayload","SimpleAllowListBases","RegistryType","SimpleAllowList","encodeAbiParameters"],"mappings":"2raA+EaA,EAAoBC,EAAM,MAAA,QAS1BC,EAAN,MAAMA,UAAwBC,EAAAA,wBAGnC,CAHK,aAAA,CAAA,MAAA,GAAA,SAAA,EAIL,KAAyB,IAAMC,GAAA,CA4B/B,MAAa,MACXC,EACkB,CACX,OAAA,MAAMC,EAAAA,GAAyB,KAAK,QAAS,CAClD,GAAG,KAAK,wBAAwB,EAEhC,GAAID,EACJ,QAAS,KAAK,mBAAmB,EACjC,KAAM,CAAC,CAAA,CACR,CACH,CAWA,MAAa,UACXE,EACAF,EACkB,CACX,OAAA,MAAMG,EAAAA,GAA6B,KAAK,QAAS,CACtD,QAAS,KAAK,mBAAmB,EACjC,KAAM,CAACD,EAASE,UAAQ,EACxB,GAAG,KAAK,wBAAwB,EAEhC,GAAIJ,CAAA,CACL,CACH,CAaA,MAAa,WACXK,EACAC,EACAN,EACA,CACA,OAAO,MAAM,KAAK,YAChB,KAAK,cAAcK,EAAWC,EAASN,CAAM,CAAA,CAEjD,CAaA,MAAa,cACXK,EACAC,EACAN,EACA,CACA,KAAM,CAAE,QAAAO,EAAS,OAAAC,CAAO,EAAI,MAAMC,EAAA,GAChC,KAAK,QACL,CACE,QAAS,KAAK,mBAAmB,EACjC,KAAM,CAACJ,EAAWC,CAAO,EACzB,GAAG,KAAK,wBAAwB,EAEhC,GAAIN,CACN,CAAA,EAGK,MAAA,CAAE,KADI,MAAMU,EAA+B,GAAA,KAAK,QAASH,CAAO,EACxD,OAAAC,EACjB,CAUgB,gBACdG,EACAC,EACyB,OACzB,KAAM,CAACC,EAASC,CAAO,EAAI,KAAK,yBAC9BH,EACAC,CAAA,EAEF,GAAI,CAACC,EAAQ,OAASA,EAAQ,QAAUE,EAAAA,YAAa,CACnD,MAAMC,EAAQF,EAAQ,QAClBA,EAAQ,QAAQ,QAChBA,EAAQ,OACNG,EAAA,WAAWH,EAAQ,MAAM,EAAE,SAC3BI,EAAA,KAAK,WAAL,YAAAA,EAAe,QACrB,GAAIF,EACFH,EAAQ,MAAQG,MAEhB,OAAM,IAAIG,EAAoC,mCAElD,CACO,MAAA,CACL,IAAKpB,EAAA,EACL,SAAAqB,EACA,KAAM,CAACC,EAA8BR,CAAO,CAAC,EAC7C,GAAG,KAAK,wBAAwBC,EAAQ,OAAO,CAAA,CAEnD,CACF,EA5IEjB,EAAuB,MAAiC,CACtD,GAAIyB,EAAA,eAAA,EASNzB,EAAuB,aAA6B0B,EAAa,aAAA,WAtB5D,IAAMC,EAAN3B,EAkKA,SAASwB,EAA8B,CAC5C,MAAAL,EACA,QAAAV,CACF,EAA2B,CAClB,OAAAmB,EAAA,oBACL,CACE,CAAE,KAAM,UAAW,KAAM,OAAQ,EACjC,CAAE,KAAM,YAAa,KAAM,SAAU,CACvC,EACA,CAACT,EAAOV,CAAO,CAAA,CAEnB"}