@boostxyz/sdk 0.0.0-alpha.2

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 (117) hide show
  1. package/LICENSE +674 -0
  2. package/README.md +7 -0
  3. package/dist/Actions/Action.cjs +1 -0
  4. package/dist/Actions/Action.d.ts +31 -0
  5. package/dist/Actions/Action.d.ts.map +1 -0
  6. package/dist/Actions/Action.js +27 -0
  7. package/dist/Actions/ContractAction.d.ts +327 -0
  8. package/dist/Actions/ContractAction.d.ts.map +1 -0
  9. package/dist/Actions/ERC721MintAction.d.ts +486 -0
  10. package/dist/Actions/ERC721MintAction.d.ts.map +1 -0
  11. package/dist/Actions/EventAction.cjs +1 -0
  12. package/dist/Actions/EventAction.d.ts +433 -0
  13. package/dist/Actions/EventAction.d.ts.map +1 -0
  14. package/dist/Actions/EventAction.js +211 -0
  15. package/dist/AllowLists/AllowList.cjs +1 -0
  16. package/dist/AllowLists/AllowList.d.ts +33 -0
  17. package/dist/AllowLists/AllowList.d.ts.map +1 -0
  18. package/dist/AllowLists/AllowList.js +28 -0
  19. package/dist/AllowLists/SimpleAllowList.cjs +1 -0
  20. package/dist/AllowLists/SimpleAllowList.d.ts +452 -0
  21. package/dist/AllowLists/SimpleAllowList.d.ts.map +1 -0
  22. package/dist/AllowLists/SimpleAllowList.js +138 -0
  23. package/dist/AllowLists/SimpleDenyList.cjs +1 -0
  24. package/dist/AllowLists/SimpleDenyList.d.ts +306 -0
  25. package/dist/AllowLists/SimpleDenyList.d.ts.map +1 -0
  26. package/dist/AllowLists/SimpleDenyList.js +202 -0
  27. package/dist/Auth/Auth.cjs +1 -0
  28. package/dist/Auth/Auth.d.ts +10 -0
  29. package/dist/Auth/Auth.d.ts.map +1 -0
  30. package/dist/Auth/Auth.js +4 -0
  31. package/dist/Auth/PassthroughAuth.cjs +1 -0
  32. package/dist/Auth/PassthroughAuth.d.ts +51 -0
  33. package/dist/Auth/PassthroughAuth.d.ts.map +1 -0
  34. package/dist/Auth/PassthroughAuth.js +38 -0
  35. package/dist/Boost.cjs +1 -0
  36. package/dist/Boost.d.ts +142 -0
  37. package/dist/Boost.d.ts.map +1 -0
  38. package/dist/Boost.js +15 -0
  39. package/dist/BoostCore.cjs +2 -0
  40. package/dist/BoostCore.d.ts +460 -0
  41. package/dist/BoostCore.d.ts.map +1 -0
  42. package/dist/BoostCore.js +1105 -0
  43. package/dist/BoostRegistry.cjs +1 -0
  44. package/dist/BoostRegistry.d.ts +229 -0
  45. package/dist/BoostRegistry.d.ts.map +1 -0
  46. package/dist/BoostRegistry.js +250 -0
  47. package/dist/Budgets/Budget.cjs +1 -0
  48. package/dist/Budgets/Budget.d.ts +31 -0
  49. package/dist/Budgets/Budget.d.ts.map +1 -0
  50. package/dist/Budgets/Budget.js +27 -0
  51. package/dist/Budgets/ManagedBudget.cjs +1 -0
  52. package/dist/Budgets/ManagedBudget.d.ts +1065 -0
  53. package/dist/Budgets/ManagedBudget.d.ts.map +1 -0
  54. package/dist/Budgets/ManagedBudget.js +498 -0
  55. package/dist/Budgets/SimpleBudget.d.ts +793 -0
  56. package/dist/Budgets/SimpleBudget.d.ts.map +1 -0
  57. package/dist/Budgets/VestingBudget.d.ts +726 -0
  58. package/dist/Budgets/VestingBudget.d.ts.map +1 -0
  59. package/dist/Deployable/Contract.cjs +1 -0
  60. package/dist/Deployable/Contract.d.ts +125 -0
  61. package/dist/Deployable/Contract.d.ts.map +1 -0
  62. package/dist/Deployable/Contract.js +149 -0
  63. package/dist/Deployable/Deployable.cjs +1 -0
  64. package/dist/Deployable/Deployable.d.ts +155 -0
  65. package/dist/Deployable/Deployable.d.ts.map +1 -0
  66. package/dist/Deployable/Deployable.js +124 -0
  67. package/dist/Deployable/DeployableTarget.cjs +1 -0
  68. package/dist/Deployable/DeployableTarget.d.ts +115 -0
  69. package/dist/Deployable/DeployableTarget.d.ts.map +1 -0
  70. package/dist/Deployable/DeployableTarget.js +128 -0
  71. package/dist/Incentives/AllowListIncentive.cjs +1 -0
  72. package/dist/Incentives/AllowListIncentive.d.ts +483 -0
  73. package/dist/Incentives/AllowListIncentive.d.ts.map +1 -0
  74. package/dist/Incentives/AllowListIncentive.js +188 -0
  75. package/dist/Incentives/CGDAIncentive.cjs +1 -0
  76. package/dist/Incentives/CGDAIncentive.d.ts +560 -0
  77. package/dist/Incentives/CGDAIncentive.d.ts.map +1 -0
  78. package/dist/Incentives/CGDAIncentive.js +249 -0
  79. package/dist/Incentives/ERC1155Incentive.d.ts +652 -0
  80. package/dist/Incentives/ERC1155Incentive.d.ts.map +1 -0
  81. package/dist/Incentives/ERC20Incentive.cjs +1 -0
  82. package/dist/Incentives/ERC20Incentive.d.ts +622 -0
  83. package/dist/Incentives/ERC20Incentive.d.ts.map +1 -0
  84. package/dist/Incentives/ERC20Incentive.js +292 -0
  85. package/dist/Incentives/ERC20VariableIncentive.d.ts +545 -0
  86. package/dist/Incentives/ERC20VariableIncentive.d.ts.map +1 -0
  87. package/dist/Incentives/Incentive.cjs +1 -0
  88. package/dist/Incentives/Incentive.d.ts +39 -0
  89. package/dist/Incentives/Incentive.d.ts.map +1 -0
  90. package/dist/Incentives/Incentive.js +280 -0
  91. package/dist/Incentives/PointsIncentive.cjs +1 -0
  92. package/dist/Incentives/PointsIncentive.d.ts +615 -0
  93. package/dist/Incentives/PointsIncentive.d.ts.map +1 -0
  94. package/dist/Incentives/PointsIncentive.js +197 -0
  95. package/dist/Validators/SignerValidator.cjs +1 -0
  96. package/dist/Validators/SignerValidator.d.ts +452 -0
  97. package/dist/Validators/SignerValidator.d.ts.map +1 -0
  98. package/dist/Validators/SignerValidator.js +167 -0
  99. package/dist/Validators/Validator.cjs +1 -0
  100. package/dist/Validators/Validator.d.ts +31 -0
  101. package/dist/Validators/Validator.d.ts.map +1 -0
  102. package/dist/Validators/Validator.js +25 -0
  103. package/dist/errors.cjs +1 -0
  104. package/dist/errors.d.ts +257 -0
  105. package/dist/errors.d.ts.map +1 -0
  106. package/dist/errors.js +161 -0
  107. package/dist/generated-BaaleHW-.cjs +2 -0
  108. package/dist/generated-x_abr3Yv.js +6228 -0
  109. package/dist/index.cjs +1 -0
  110. package/dist/index.d.ts +29 -0
  111. package/dist/index.d.ts.map +1 -0
  112. package/dist/index.js +1355 -0
  113. package/dist/utils.cjs +1 -0
  114. package/dist/utils.d.ts +1454 -0
  115. package/dist/utils.d.ts.map +1 -0
  116. package/dist/utils.js +643 -0
  117. package/package.json +197 -0
@@ -0,0 +1 @@
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const s=require("../generated-BaaleHW-.cjs"),c=require("@wagmi/core"),a=require("../errors.cjs"),i=require("./SimpleAllowList.cjs"),l=require("./SimpleDenyList.cjs"),e={"0x8ba1fc24":i.SimpleAllowList,"0x3d30a22c":l.SimpleDenyList};async function m(t,n){const o=await c.readContract(t.config,{abi:s.oe,functionName:"getComponentInterface",address:n}),r=e[o];if(!r)throw new a.InvalidComponentInterfaceError(Object.keys(e),o);return new r(t,n)}exports.SimpleAllowList=i.SimpleAllowList;exports.SimpleDenyList=l.SimpleDenyList;exports.AllowListByComponentInterface=e;exports.allowListFromAddress=m;
@@ -0,0 +1,33 @@
1
+ import type { Address } from 'viem';
2
+ import type { DeployableOptions } from '../Deployable/Deployable';
3
+ import { SimpleAllowList } from './SimpleAllowList';
4
+ import { SimpleDenyList } from './SimpleDenyList';
5
+ export { SimpleAllowList, SimpleDenyList };
6
+ /**
7
+ * A union type representing all valid protocol AllowList implementations
8
+ *
9
+ * @export
10
+ * @typedef {AllowList}
11
+ */
12
+ export type AllowList = SimpleAllowList | SimpleDenyList;
13
+ /**
14
+ * A map of AllowList component interfaces to their constructors.
15
+ *
16
+ * @type {{ "0x2bc9016b": SimpleAllowList; "0x9d585f63": SimpleDenyList; }}
17
+ */
18
+ export declare const AllowListByComponentInterface: {
19
+ "0x8ba1fc24": typeof SimpleAllowList;
20
+ "0x3d30a22c": typeof SimpleDenyList;
21
+ };
22
+ /**
23
+ * A function that will read a contract's component interface using `getComponentInterface` and return the correct instantiated instance.
24
+ *
25
+ * @export
26
+ * @async
27
+ * @param {DeployableOptions} options
28
+ * @param {Address} address
29
+ * @returns {Promise<SimpleAllowList | SimpleDenyList>}
30
+ * @throws {@link InvalidComponentInterfaceError}
31
+ */
32
+ export declare function allowListFromAddress(options: DeployableOptions, address: Address): Promise<SimpleDenyList | SimpleAllowList>;
33
+ //# sourceMappingURL=AllowList.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"AllowList.d.ts","sourceRoot":"","sources":["../../src/AllowLists/AllowList.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,OAAO,EAAO,MAAM,MAAM,CAAC;AACzC,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,0BAA0B,CAAC;AAElE,OAAO,EAAE,eAAe,EAAE,MAAM,mBAAmB,CAAC;AACpD,OAAO,EAAE,cAAc,EAAE,MAAM,kBAAkB,CAAC;AAElD,OAAO,EAAE,eAAe,EAAE,cAAc,EAAE,CAAC;AAE3C;;;;;GAKG;AACH,MAAM,MAAM,SAAS,GAAG,eAAe,GAAG,cAAc,CAAC;AAEzD;;;;GAIG;AACH,eAAO,MAAM,6BAA6B;;;CAGzC,CAAC;AAEF;;;;;;;;;GASG;AACH,wBAAsB,oBAAoB,CACxC,OAAO,EAAE,iBAAiB,EAC1B,OAAO,EAAE,OAAO,6CAejB"}
@@ -0,0 +1,28 @@
1
+ import { o as i } from "../generated-x_abr3Yv.js";
2
+ import { readContract as m } from "@wagmi/core";
3
+ import { InvalidComponentInterfaceError as a } from "../errors.js";
4
+ import { SimpleAllowList as c } from "./SimpleAllowList.js";
5
+ import { SimpleDenyList as f } from "./SimpleDenyList.js";
6
+ const n = {
7
+ "0x8ba1fc24": c,
8
+ "0x3d30a22c": f
9
+ };
10
+ async function I(o, t) {
11
+ const r = await m(o.config, {
12
+ abi: i,
13
+ functionName: "getComponentInterface",
14
+ address: t
15
+ }), e = n[r];
16
+ if (!e)
17
+ throw new a(
18
+ Object.keys(n),
19
+ r
20
+ );
21
+ return new e(o, t);
22
+ }
23
+ export {
24
+ n as AllowListByComponentInterface,
25
+ c as SimpleAllowList,
26
+ f as SimpleDenyList,
27
+ I as allowListFromAddress
28
+ };
@@ -0,0 +1 @@
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const c=require("../generated-BaaleHW-.cjs"),n=require("@wagmi/core"),o=require("viem"),l=require("../Deployable/DeployableTarget.cjs"),h=require("../errors.cjs"),i=require("../utils.cjs"),u="0x6080604052348015600e575f80fd5b50601b601f60201b60201c565b60b0565b5f602c608760201b60201c565b90508054600181161560455763f92ee8a95f526004601cfd5b8160c01c808260011c146082578060011b8355806020527fc7f505b2f371ae2175ee4913f4499e1f2633a7b5936321eed1cdaeb6115181d2602080a15b505050565b5f7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffbf6011325f1b905090565b61140e806100bd5f395ff3fe608060405260043610610113575f3560e01c80634a4ee7b11161009f57806398332bbc1161006357806398332bbc1461031d578063e3f756de14610347578063f04e283e14610383578063f2fde38b1461039f578063fee81cf4146103bb57610113565b80634a4ee7b114610287578063514e62fc146102a357806354d1f13d146102df578063715018a6146102e95780638da5cb5b146102f357610113565b806325692962116100e657806325692962146101c757806328d6183b146101d15780632de94807146101fb5780633abb060414610237578063439fab911461025f57610113565b806301ffc9a714610117578063183a4f6e146101535780631c10893f1461016f5780631cd64df41461018b575b5f80fd5b348015610122575f80fd5b5061013d60048036038101906101389190610d51565b6103f7565b60405161014a9190610d96565b60405180910390f35b61016d60048036038101906101689190610de2565b610470565b005b61018960048036038101906101849190610e67565b61047d565b005b348015610196575f80fd5b506101b160048036038101906101ac9190610e67565b610493565b6040516101be9190610d96565b60405180910390f35b6101cf6104a9565b005b3480156101dc575f80fd5b506101e56104fa565b6040516101f29190610eb4565b60405180910390f35b348015610206575f80fd5b50610221600480360381019061021c9190610ecd565b610521565b60405161022e9190610f07565b60405180910390f35b348015610242575f80fd5b5061025d60048036038101906102589190610fd6565b61053a565b005b34801561026a575f80fd5b50610285600480360381019061028091906110a9565b610647565b005b6102a1600480360381019061029c9190610e67565b61076f565b005b3480156102ae575f80fd5b506102c960048036038101906102c49190610e67565b610785565b6040516102d69190610d96565b60405180910390f35b6102e761079c565b005b6102f16107d5565b005b3480156102fe575f80fd5b506103076107e8565b6040516103149190611103565b60405180910390f35b348015610328575f80fd5b50610331610810565b60405161033e9190610f07565b60405180910390f35b348015610352575f80fd5b5061036d6004803603810190610368919061111c565b610815565b60405161037a9190610d96565b60405180910390f35b61039d60048036038101906103989190610ecd565b610868565b005b6103b960048036038101906103b49190610ecd565b6108a6565b005b3480156103c6575f80fd5b506103e160048036038101906103dc9190610ecd565b6108cf565b6040516103ee9190610f07565b60405180910390f35b5f7f8ba1fc24000000000000000000000000000000000000000000000000000000007bffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916827bffffffffffffffffffffffffffffffffffffffffffffffffffffffff191614806104695750610468826108e8565b5b9050919050565b61047a3382610961565b50565b610485610970565b61048f82826109a7565b5050565b5f818261049f85610521565b1614905092915050565b5f6104b26109b7565b67ffffffffffffffff164201905063389a75e1600c52335f52806020600c2055337fdbf36a107da19e49527a7176a1babf963b4b0ff8cde35ee35d6cd8f1f9ac7e1d5f80a250565b5f7f8ba1fc2400000000000000000000000000000000000000000000000000000000905090565b5f638b78c6d8600c52815f526020600c20549050919050565b6002610545816109c1565b828290508585905014610584576040517fff633a3800000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b5f5b8585905081101561063f578383828181106105a4576105a3611179565b5b90506020020160208101906105b991906111d0565b5f808888858181106105ce576105cd611179565b5b90506020020160208101906105e39190610ecd565b73ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020015f205f6101000a81548160ff0219169083151502179055508080600101915050610586565b505050505050565b5f6106506109e8565b905080546003825580156106825760018160011c14303b106106795763f92ee8a95f526004601cfd5b818160ff1b1b91505b505f808484810190610694919061137e565b915091506106a182610a11565b6106ac8260026109a7565b5f5b81518110156107325760015f808484815181106106ce576106cd611179565b5b602002602001015173ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020015f205f6101000a81548160ff02191690831515021790555080806001019150506106ae565b505050801561076a576002815560016020527fc7f505b2f371ae2175ee4913f4499e1f2633a7b5936321eed1cdaeb6115181d2602080a15b505050565b610777610970565b6107818282610961565b5050565b5f808261079185610521565b161415905092915050565b63389a75e1600c52335f525f6020600c2055337ffa7b8eab7da67f412cc9575ed43464468f9bfbae89d1675917346ca6d8fe3c925f80a2565b6107dd610970565b6107e65f610ae7565b565b5f7fffffffffffffffffffffffffffffffffffffffffffffffffffffffff7487392754905090565b600281565b5f805f8573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020015f205f9054906101000a900460ff1690509392505050565b610870610970565b63389a75e1600c52805f526020600c20805442111561089657636f5e88185f526004601cfd5b5f8155506108a381610ae7565b50565b6108ae610970565b8060601b6108c357637448fbae5f526004601cfd5b6108cc81610ae7565b50565b5f63389a75e1600c52815f526020600c20549050919050565b5f7fe2089f79000000000000000000000000000000000000000000000000000000007bffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916827bffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916148061095a575061095982610bad565b5b9050919050565b61096c82825f610c26565b5050565b7fffffffffffffffffffffffffffffffffffffffffffffffffffffffff748739275433146109a5576382b429005f526004601cfd5b565b6109b382826001610c26565b5050565b5f6202a300905090565b638b78c6d8600c52335f52806020600c2054166109e5576382b429005f526004601cfd5b50565b5f7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffbf6011325f1b905090565b610a19610c7e565b15610a91577fffffffffffffffffffffffffffffffffffffffffffffffffffffffff74873927805415610a5357630dc149f05f526004601cfd5b8160601b60601c9150811560ff1b82178155815f7f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e05f80a350610ae4565b8060601b60601c9050807fffffffffffffffffffffffffffffffffffffffffffffffffffffffff7487392755805f7f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e05f80a35b50565b610aef610c7e565b15610b54577fffffffffffffffffffffffffffffffffffffffffffffffffffffffff748739278160601b60601c91508181547f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e05f80a3811560ff1b8217815550610baa565b7fffffffffffffffffffffffffffffffffffffffffffffffffffffffff748739278160601b60601c91508181547f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e05f80a3818155505b50565b5f7f6ab67a0d000000000000000000000000000000000000000000000000000000007bffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916827bffffffffffffffffffffffffffffffffffffffffffffffffffffffff19161480610c1f5750610c1e82610c82565b5b9050919050565b638b78c6d8600c52825f526020600c20805483811783610c4857848216821890505b80835580600c5160601c7f715ad5ce61fc9595c7b415289d59cf203f23a94fa06f04af7e489a0a76e1fe265f80a3505050505050565b5f90565b5f7f01ffc9a7000000000000000000000000000000000000000000000000000000007bffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916827bffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916149050919050565b5f604051905090565b5f80fd5b5f80fd5b5f7fffffffff0000000000000000000000000000000000000000000000000000000082169050919050565b610d3081610cfc565b8114610d3a575f80fd5b50565b5f81359050610d4b81610d27565b92915050565b5f60208284031215610d6657610d65610cf4565b5b5f610d7384828501610d3d565b91505092915050565b5f8115159050919050565b610d9081610d7c565b82525050565b5f602082019050610da95f830184610d87565b92915050565b5f819050919050565b610dc181610daf565b8114610dcb575f80fd5b50565b5f81359050610ddc81610db8565b92915050565b5f60208284031215610df757610df6610cf4565b5b5f610e0484828501610dce565b91505092915050565b5f73ffffffffffffffffffffffffffffffffffffffff82169050919050565b5f610e3682610e0d565b9050919050565b610e4681610e2c565b8114610e50575f80fd5b50565b5f81359050610e6181610e3d565b92915050565b5f8060408385031215610e7d57610e7c610cf4565b5b5f610e8a85828601610e53565b9250506020610e9b85828601610dce565b9150509250929050565b610eae81610cfc565b82525050565b5f602082019050610ec75f830184610ea5565b92915050565b5f60208284031215610ee257610ee1610cf4565b5b5f610eef84828501610e53565b91505092915050565b610f0181610daf565b82525050565b5f602082019050610f1a5f830184610ef8565b92915050565b5f80fd5b5f80fd5b5f80fd5b5f8083601f840112610f4157610f40610f20565b5b8235905067ffffffffffffffff811115610f5e57610f5d610f24565b5b602083019150836020820283011115610f7a57610f79610f28565b5b9250929050565b5f8083601f840112610f9657610f95610f20565b5b8235905067ffffffffffffffff811115610fb357610fb2610f24565b5b602083019150836020820283011115610fcf57610fce610f28565b5b9250929050565b5f805f8060408587031215610fee57610fed610cf4565b5b5f85013567ffffffffffffffff81111561100b5761100a610cf8565b5b61101787828801610f2c565b9450945050602085013567ffffffffffffffff81111561103a57611039610cf8565b5b61104687828801610f81565b925092505092959194509250565b5f8083601f84011261106957611068610f20565b5b8235905067ffffffffffffffff81111561108657611085610f24565b5b6020830191508360018202830111156110a2576110a1610f28565b5b9250929050565b5f80602083850312156110bf576110be610cf4565b5b5f83013567ffffffffffffffff8111156110dc576110db610cf8565b5b6110e885828601611054565b92509250509250929050565b6110fd81610e2c565b82525050565b5f6020820190506111165f8301846110f4565b92915050565b5f805f6040848603121561113357611132610cf4565b5b5f61114086828701610e53565b935050602084013567ffffffffffffffff81111561116157611160610cf8565b5b61116d86828701611054565b92509250509250925092565b7f4e487b71000000000000000000000000000000000000000000000000000000005f52603260045260245ffd5b6111af81610d7c565b81146111b9575f80fd5b50565b5f813590506111ca816111a6565b92915050565b5f602082840312156111e5576111e4610cf4565b5b5f6111f2848285016111bc565b91505092915050565b5f61120582610e0d565b9050919050565b611215816111fb565b811461121f575f80fd5b50565b5f813590506112308161120c565b92915050565b5f601f19601f8301169050919050565b7f4e487b71000000000000000000000000000000000000000000000000000000005f52604160045260245ffd5b61127c82611236565b810181811067ffffffffffffffff8211171561129b5761129a611246565b5b80604052505050565b5f6112ad610ceb565b90506112b98282611273565b919050565b5f67ffffffffffffffff8211156112d8576112d7611246565b5b602082029050602081019050919050565b5f6112fb6112f6846112be565b6112a4565b9050808382526020820190506020840283018581111561131e5761131d610f28565b5b835b8181101561134757806113338882610e53565b845260208401935050602081019050611320565b5050509392505050565b5f82601f83011261136557611364610f20565b5b81356113758482602086016112e9565b91505092915050565b5f806040838503121561139457611393610cf4565b5b5f6113a185828601611222565b925050602083013567ffffffffffffffff8111156113c2576113c1610cf8565b5b6113ce85828601611351565b915050925092905056fea264697066735822122094368c65f566939d0b9827de55e44a26c567f89bc0bf24103275890d9278dc0164736f6c634300081a0033",A=2n,s=class s extends l.DeployableTarget{constructor(){super(...arguments),this.abi=c.T}async isAllowed(b,e){return await c.JN(this._config,{address:this.assertValidAddress(),args:[b,o.zeroHash],...this.optionallyAttachAccount(),...e})}async setAllowed(b,e,f){return this.awaitResult(this.setAllowedRaw(b,e,f))}async setAllowedRaw(b,e,f){const{request:a,result:d}=await c.Ah(this._config,{address:this.assertValidAddress(),args:[b,e],...this.optionallyAttachAccount(),...f});return{hash:await c.lh(this._config,a),result:d}}async grantRoles(b,e,f){return this.awaitResult(this.grantRolesRaw(b,e,f))}async grantRolesRaw(b,e,f){const{request:a,result:d}=await c.bh(this._config,{address:this.assertValidAddress(),args:[b,e],...this.optionallyAttachAccount(),...f});return{hash:await c.ih(this._config,a),result:d}}buildParameters(b,e){var d;const[f,a]=this.validateDeploymentConfig(b,e);if(!f.owner||f.owner===o.zeroAddress){const t=a.account?a.account.address:a.config?n.getAccount(a.config).address:(d=this._account)==null?void 0:d.address;if(t)f.owner=t;else throw new h.DeployableUnknownOwnerProvidedError}return{abi:c.T,bytecode:u,args:[i.prepareSimpleAllowListPayload(f)],...this.optionallyAttachAccount(a.account)}}};s.base="0x11556926AaA421e96e06a7A679C680813122db7D",s.registryType=i.RegistryType.ALLOW_LIST;let r=s;exports.simpleAllowListAbi=c.T;exports.LIST_MANAGER_ROLE=A;exports.SimpleAllowList=r;
@@ -0,0 +1,452 @@
1
+ import { simpleAllowListAbi } from '@boostxyz/evm';
2
+ import { type Address, type ContractEventName } from 'viem';
3
+ import type { DeployableOptions, GenericDeployableParams } from '../Deployable/Deployable';
4
+ import { DeployableTarget } from '../Deployable/DeployableTarget';
5
+ import { type GenericLog, type ReadParams, RegistryType, type SimpleAllowListPayload } from '../utils';
6
+ export { simpleAllowListAbi };
7
+ export type { SimpleAllowListPayload };
8
+ /**
9
+ * A generic `viem.Log` event with support for `SimpleAllowList` event types.
10
+ *
11
+ * @export
12
+ * @typedef {SimpleAllowListLog}
13
+ * @template {ContractEventName<
14
+ * typeof simpleAllowListAbi
15
+ * >} [event=ContractEventName<typeof simpleAllowListAbi>]
16
+ */
17
+ export type SimpleAllowListLog<event extends ContractEventName<typeof simpleAllowListAbi> = ContractEventName<typeof simpleAllowListAbi>> = GenericLog<typeof simpleAllowListAbi, event>;
18
+ /**
19
+ * A constant representing the list manager's role
20
+ *
21
+ * @type {2n}
22
+ */
23
+ export declare const LIST_MANAGER_ROLE = 2n;
24
+ /**
25
+ * A simple implementation of an AllowList that checks if a user is authorized based on a list of allowed addresses
26
+ *
27
+ * @export
28
+ * @class SimpleAllowList
29
+ * @typedef {SimpleAllowList}
30
+ * @extends {DeployableTarget<SimpleAllowListPayload>}
31
+ */
32
+ export declare class SimpleAllowList extends DeployableTarget<SimpleAllowListPayload, typeof simpleAllowListAbi> {
33
+ readonly abi: readonly [{
34
+ readonly type: "constructor";
35
+ readonly inputs: readonly [];
36
+ readonly stateMutability: "nonpayable";
37
+ }, {
38
+ readonly type: "error";
39
+ readonly inputs: readonly [];
40
+ readonly name: "AlreadyInitialized";
41
+ }, {
42
+ readonly type: "error";
43
+ readonly inputs: readonly [];
44
+ readonly name: "CloneAlreadyInitialized";
45
+ }, {
46
+ readonly type: "error";
47
+ readonly inputs: readonly [];
48
+ readonly name: "InitializerNotImplemented";
49
+ }, {
50
+ readonly type: "error";
51
+ readonly inputs: readonly [];
52
+ readonly name: "InvalidInitialization";
53
+ }, {
54
+ readonly type: "error";
55
+ readonly inputs: readonly [];
56
+ readonly name: "InvalidInitializationData";
57
+ }, {
58
+ readonly type: "error";
59
+ readonly inputs: readonly [];
60
+ readonly name: "LengthMismatch";
61
+ }, {
62
+ readonly type: "error";
63
+ readonly inputs: readonly [];
64
+ readonly name: "NewOwnerIsZeroAddress";
65
+ }, {
66
+ readonly type: "error";
67
+ readonly inputs: readonly [];
68
+ readonly name: "NoHandoverRequest";
69
+ }, {
70
+ readonly type: "error";
71
+ readonly inputs: readonly [];
72
+ readonly name: "NotInitializing";
73
+ }, {
74
+ readonly type: "error";
75
+ readonly inputs: readonly [];
76
+ readonly name: "Unauthorized";
77
+ }, {
78
+ readonly type: "event";
79
+ readonly anonymous: false;
80
+ readonly inputs: readonly [{
81
+ readonly name: "version";
82
+ readonly internalType: "uint64";
83
+ readonly type: "uint64";
84
+ readonly indexed: false;
85
+ }];
86
+ readonly name: "Initialized";
87
+ }, {
88
+ readonly type: "event";
89
+ readonly anonymous: false;
90
+ readonly inputs: readonly [{
91
+ readonly name: "pendingOwner";
92
+ readonly internalType: "address";
93
+ readonly type: "address";
94
+ readonly indexed: true;
95
+ }];
96
+ readonly name: "OwnershipHandoverCanceled";
97
+ }, {
98
+ readonly type: "event";
99
+ readonly anonymous: false;
100
+ readonly inputs: readonly [{
101
+ readonly name: "pendingOwner";
102
+ readonly internalType: "address";
103
+ readonly type: "address";
104
+ readonly indexed: true;
105
+ }];
106
+ readonly name: "OwnershipHandoverRequested";
107
+ }, {
108
+ readonly type: "event";
109
+ readonly anonymous: false;
110
+ readonly inputs: readonly [{
111
+ readonly name: "oldOwner";
112
+ readonly internalType: "address";
113
+ readonly type: "address";
114
+ readonly indexed: true;
115
+ }, {
116
+ readonly name: "newOwner";
117
+ readonly internalType: "address";
118
+ readonly type: "address";
119
+ readonly indexed: true;
120
+ }];
121
+ readonly name: "OwnershipTransferred";
122
+ }, {
123
+ readonly type: "event";
124
+ readonly anonymous: false;
125
+ readonly inputs: readonly [{
126
+ readonly name: "user";
127
+ readonly internalType: "address";
128
+ readonly type: "address";
129
+ readonly indexed: true;
130
+ }, {
131
+ readonly name: "roles";
132
+ readonly internalType: "uint256";
133
+ readonly type: "uint256";
134
+ readonly indexed: true;
135
+ }];
136
+ readonly name: "RolesUpdated";
137
+ }, {
138
+ readonly type: "function";
139
+ readonly inputs: readonly [];
140
+ readonly name: "LIST_MANAGER_ROLE";
141
+ readonly outputs: readonly [{
142
+ readonly name: "";
143
+ readonly internalType: "uint256";
144
+ readonly type: "uint256";
145
+ }];
146
+ readonly stateMutability: "view";
147
+ }, {
148
+ readonly type: "function";
149
+ readonly inputs: readonly [];
150
+ readonly name: "cancelOwnershipHandover";
151
+ readonly outputs: readonly [];
152
+ readonly stateMutability: "payable";
153
+ }, {
154
+ readonly type: "function";
155
+ readonly inputs: readonly [{
156
+ readonly name: "pendingOwner";
157
+ readonly internalType: "address";
158
+ readonly type: "address";
159
+ }];
160
+ readonly name: "completeOwnershipHandover";
161
+ readonly outputs: readonly [];
162
+ readonly stateMutability: "payable";
163
+ }, {
164
+ readonly type: "function";
165
+ readonly inputs: readonly [];
166
+ readonly name: "getComponentInterface";
167
+ readonly outputs: readonly [{
168
+ readonly name: "";
169
+ readonly internalType: "bytes4";
170
+ readonly type: "bytes4";
171
+ }];
172
+ readonly stateMutability: "pure";
173
+ }, {
174
+ readonly type: "function";
175
+ readonly inputs: readonly [{
176
+ readonly name: "user";
177
+ readonly internalType: "address";
178
+ readonly type: "address";
179
+ }, {
180
+ readonly name: "roles";
181
+ readonly internalType: "uint256";
182
+ readonly type: "uint256";
183
+ }];
184
+ readonly name: "grantRoles";
185
+ readonly outputs: readonly [];
186
+ readonly stateMutability: "payable";
187
+ }, {
188
+ readonly type: "function";
189
+ readonly inputs: readonly [{
190
+ readonly name: "user";
191
+ readonly internalType: "address";
192
+ readonly type: "address";
193
+ }, {
194
+ readonly name: "roles";
195
+ readonly internalType: "uint256";
196
+ readonly type: "uint256";
197
+ }];
198
+ readonly name: "hasAllRoles";
199
+ readonly outputs: readonly [{
200
+ readonly name: "";
201
+ readonly internalType: "bool";
202
+ readonly type: "bool";
203
+ }];
204
+ readonly stateMutability: "view";
205
+ }, {
206
+ readonly type: "function";
207
+ readonly inputs: readonly [{
208
+ readonly name: "user";
209
+ readonly internalType: "address";
210
+ readonly type: "address";
211
+ }, {
212
+ readonly name: "roles";
213
+ readonly internalType: "uint256";
214
+ readonly type: "uint256";
215
+ }];
216
+ readonly name: "hasAnyRole";
217
+ readonly outputs: readonly [{
218
+ readonly name: "";
219
+ readonly internalType: "bool";
220
+ readonly type: "bool";
221
+ }];
222
+ readonly stateMutability: "view";
223
+ }, {
224
+ readonly type: "function";
225
+ readonly inputs: readonly [{
226
+ readonly name: "data_";
227
+ readonly internalType: "bytes";
228
+ readonly type: "bytes";
229
+ }];
230
+ readonly name: "initialize";
231
+ readonly outputs: readonly [];
232
+ readonly stateMutability: "nonpayable";
233
+ }, {
234
+ readonly type: "function";
235
+ readonly inputs: readonly [{
236
+ readonly name: "user_";
237
+ readonly internalType: "address";
238
+ readonly type: "address";
239
+ }, {
240
+ readonly name: "";
241
+ readonly internalType: "bytes";
242
+ readonly type: "bytes";
243
+ }];
244
+ readonly name: "isAllowed";
245
+ readonly outputs: readonly [{
246
+ readonly name: "";
247
+ readonly internalType: "bool";
248
+ readonly type: "bool";
249
+ }];
250
+ readonly stateMutability: "view";
251
+ }, {
252
+ readonly type: "function";
253
+ readonly inputs: readonly [];
254
+ readonly name: "owner";
255
+ readonly outputs: readonly [{
256
+ readonly name: "result";
257
+ readonly internalType: "address";
258
+ readonly type: "address";
259
+ }];
260
+ readonly stateMutability: "view";
261
+ }, {
262
+ readonly type: "function";
263
+ readonly inputs: readonly [{
264
+ readonly name: "pendingOwner";
265
+ readonly internalType: "address";
266
+ readonly type: "address";
267
+ }];
268
+ readonly name: "ownershipHandoverExpiresAt";
269
+ readonly outputs: readonly [{
270
+ readonly name: "result";
271
+ readonly internalType: "uint256";
272
+ readonly type: "uint256";
273
+ }];
274
+ readonly stateMutability: "view";
275
+ }, {
276
+ readonly type: "function";
277
+ readonly inputs: readonly [];
278
+ readonly name: "renounceOwnership";
279
+ readonly outputs: readonly [];
280
+ readonly stateMutability: "payable";
281
+ }, {
282
+ readonly type: "function";
283
+ readonly inputs: readonly [{
284
+ readonly name: "roles";
285
+ readonly internalType: "uint256";
286
+ readonly type: "uint256";
287
+ }];
288
+ readonly name: "renounceRoles";
289
+ readonly outputs: readonly [];
290
+ readonly stateMutability: "payable";
291
+ }, {
292
+ readonly type: "function";
293
+ readonly inputs: readonly [];
294
+ readonly name: "requestOwnershipHandover";
295
+ readonly outputs: readonly [];
296
+ readonly stateMutability: "payable";
297
+ }, {
298
+ readonly type: "function";
299
+ readonly inputs: readonly [{
300
+ readonly name: "user";
301
+ readonly internalType: "address";
302
+ readonly type: "address";
303
+ }, {
304
+ readonly name: "roles";
305
+ readonly internalType: "uint256";
306
+ readonly type: "uint256";
307
+ }];
308
+ readonly name: "revokeRoles";
309
+ readonly outputs: readonly [];
310
+ readonly stateMutability: "payable";
311
+ }, {
312
+ readonly type: "function";
313
+ readonly inputs: readonly [{
314
+ readonly name: "user";
315
+ readonly internalType: "address";
316
+ readonly type: "address";
317
+ }];
318
+ readonly name: "rolesOf";
319
+ readonly outputs: readonly [{
320
+ readonly name: "roles";
321
+ readonly internalType: "uint256";
322
+ readonly type: "uint256";
323
+ }];
324
+ readonly stateMutability: "view";
325
+ }, {
326
+ readonly type: "function";
327
+ readonly inputs: readonly [{
328
+ readonly name: "users_";
329
+ readonly internalType: "address[]";
330
+ readonly type: "address[]";
331
+ }, {
332
+ readonly name: "allowed_";
333
+ readonly internalType: "bool[]";
334
+ readonly type: "bool[]";
335
+ }];
336
+ readonly name: "setAllowed";
337
+ readonly outputs: readonly [];
338
+ readonly stateMutability: "nonpayable";
339
+ }, {
340
+ readonly type: "function";
341
+ readonly inputs: readonly [{
342
+ readonly name: "interfaceId";
343
+ readonly internalType: "bytes4";
344
+ readonly type: "bytes4";
345
+ }];
346
+ readonly name: "supportsInterface";
347
+ readonly outputs: readonly [{
348
+ readonly name: "";
349
+ readonly internalType: "bool";
350
+ readonly type: "bool";
351
+ }];
352
+ readonly stateMutability: "view";
353
+ }, {
354
+ readonly type: "function";
355
+ readonly inputs: readonly [{
356
+ readonly name: "newOwner";
357
+ readonly internalType: "address";
358
+ readonly type: "address";
359
+ }];
360
+ readonly name: "transferOwnership";
361
+ readonly outputs: readonly [];
362
+ readonly stateMutability: "payable";
363
+ }];
364
+ /**
365
+ * @inheritdoc
366
+ *
367
+ * @public
368
+ * @static
369
+ * @type {Address}
370
+ */
371
+ static base: Address;
372
+ /**
373
+ * @inheritdoc
374
+ *
375
+ * @public
376
+ * @static
377
+ * @type {RegistryType}
378
+ */
379
+ static registryType: RegistryType;
380
+ /**
381
+ * Check if a user is authorized.
382
+ *
383
+ * @public
384
+ * @async
385
+ * @param {Address} address - The address of the user
386
+ * @param {?ReadParams<typeof simpleAllowListAbi, 'setAllowed'>} [params]
387
+ * @returns {Promise<boolean>} - True if the user is authorized
388
+ */
389
+ isAllowed(address: Address, params?: ReadParams<typeof simpleAllowListAbi, 'setAllowed'>): Promise<boolean>;
390
+ /**
391
+ * Set the allowed status of a user. The length of the `users_` and `allowed_` arrays must be the same.
392
+ * This function can only be called by the owner
393
+ *
394
+ * @public
395
+ * @async
396
+ * @param {Address[]} addresses - The list of users to update
397
+ * @param {boolean[]} allowed - The allowed status of each user
398
+ * @param {?ReadParams<typeof simpleAllowListAbi, 'setAllowed'>} [params]
399
+ * @returns {Promise<void>}
400
+ */
401
+ setAllowed(addresses: Address[], allowed: boolean[], params?: ReadParams<typeof simpleAllowListAbi, 'setAllowed'>): Promise<void>;
402
+ /**
403
+ * Set the allowed status of a user. The length of the `users_` and `allowed_` arrays must be the same.
404
+ * This function can only be called by the owner
405
+ *
406
+ * @public
407
+ * @async
408
+ * @param {Address[]} addresses - The list of users to update
409
+ * @param {boolean[]} allowed - The allowed status of each user
410
+ * @param {?ReadParams<typeof simpleAllowListAbi, 'setAllowed'>} [params]
411
+ * @returns {Promise<void>}
412
+ */
413
+ setAllowedRaw(addresses: Address[], allowed: boolean[], params?: ReadParams<typeof simpleAllowListAbi, 'setAllowed'>): Promise<{
414
+ hash: `0x${string}`;
415
+ result: void;
416
+ }>;
417
+ /**
418
+ * Allows the owner to grant `user` `roles`.
419
+ *
420
+ * @public
421
+ * @async
422
+ * @param {Address} address
423
+ * @param {bigint} role
424
+ * @param {?ReadParams<typeof simpleAllowListAbi, 'grantRoles'>} [params]
425
+ * @returns {Promise<void>}
426
+ */
427
+ grantRoles(address: Address, role: bigint, params?: ReadParams<typeof simpleAllowListAbi, 'grantRoles'>): Promise<void>;
428
+ /**
429
+ * Allows the owner to grant `user` `roles`.
430
+ *
431
+ * @public
432
+ * @async
433
+ * @param {Address} address
434
+ * @param {bigint} role
435
+ * @param {?ReadParams<typeof simpleAllowListAbi, 'grantRoles'>} [params]
436
+ * @returns {Promise<void>}
437
+ */
438
+ grantRolesRaw(address: Address, role: bigint, params?: ReadParams<typeof simpleAllowListAbi, 'grantRoles'>): Promise<{
439
+ hash: `0x${string}`;
440
+ result: void;
441
+ }>;
442
+ /**
443
+ * @inheritdoc
444
+ *
445
+ * @public
446
+ * @param {?SimpleAllowListPayload} [_payload]
447
+ * @param {?DeployableOptions} [_options]
448
+ * @returns {GenericDeployableParams}
449
+ */
450
+ buildParameters(_payload?: SimpleAllowListPayload, _options?: DeployableOptions): GenericDeployableParams;
451
+ }
452
+ //# sourceMappingURL=SimpleAllowList.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"SimpleAllowList.d.ts","sourceRoot":"","sources":["../../src/AllowLists/SimpleAllowList.ts"],"names":[],"mappings":"AAAA,OAAO,EAEL,kBAAkB,EAKnB,MAAM,eAAe,CAAC;AAGvB,OAAO,EACL,KAAK,OAAO,EACZ,KAAK,iBAAiB,EAIvB,MAAM,MAAM,CAAC;AACd,OAAO,KAAK,EACV,iBAAiB,EACjB,uBAAuB,EACxB,MAAM,0BAA0B,CAAC;AAClC,OAAO,EAAE,gBAAgB,EAAE,MAAM,gCAAgC,CAAC;AAElE,OAAO,EACL,KAAK,UAAU,EACf,KAAK,UAAU,EACf,YAAY,EACZ,KAAK,sBAAsB,EAE5B,MAAM,UAAU,CAAC;AAElB,OAAO,EAAE,kBAAkB,EAAE,CAAC;AAC9B,YAAY,EAAE,sBAAsB,EAAE,CAAC;AAEvC;;;;;;;;GAQG;AACH,MAAM,MAAM,kBAAkB,CAC5B,KAAK,SAAS,iBAAiB,CAC7B,OAAO,kBAAkB,CAC1B,GAAG,iBAAiB,CAAC,OAAO,kBAAkB,CAAC,IAC9C,UAAU,CAAC,OAAO,kBAAkB,EAAE,KAAK,CAAC,CAAC;AAEjD;;;;GAIG;AACH,eAAO,MAAM,iBAAiB,KAAK,CAAC;AACpC;;;;;;;GAOG;AACH,qBAAa,eAAgB,SAAQ,gBAAgB,CACnD,sBAAsB,EACtB,OAAO,kBAAkB,CAC1B;IACC,SAAyB,GAAG;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;OAAsB;IAClD;;;;;;OAMG;IACH,OAAuB,IAAI,EAAE,OAAO,CACN;IAC9B;;;;;;OAMG;IACH,OAAuB,YAAY,EAAE,YAAY,CAA2B;IAE5E;;;;;;;;OAQG;IACU,SAAS,CACpB,OAAO,EAAE,OAAO,EAChB,MAAM,CAAC,EAAE,UAAU,CAAC,OAAO,kBAAkB,EAAE,YAAY,CAAC,GAC3D,OAAO,CAAC,OAAO,CAAC;IAUnB;;;;;;;;;;OAUG;IACU,UAAU,CACrB,SAAS,EAAE,OAAO,EAAE,EACpB,OAAO,EAAE,OAAO,EAAE,EAClB,MAAM,CAAC,EAAE,UAAU,CAAC,OAAO,kBAAkB,EAAE,YAAY,CAAC;IAK9D;;;;;;;;;;OAUG;IACU,aAAa,CACxB,SAAS,EAAE,OAAO,EAAE,EACpB,OAAO,EAAE,OAAO,EAAE,EAClB,MAAM,CAAC,EAAE,UAAU,CAAC,OAAO,kBAAkB,EAAE,YAAY,CAAC;;;;IAgB9D;;;;;;;;;OASG;IACU,UAAU,CACrB,OAAO,EAAE,OAAO,EAChB,IAAI,EAAE,MAAM,EACZ,MAAM,CAAC,EAAE,UAAU,CAAC,OAAO,kBAAkB,EAAE,YAAY,CAAC;IAK9D;;;;;;;;;OASG;IACU,aAAa,CACxB,OAAO,EAAE,OAAO,EAChB,IAAI,EAAE,MAAM,EACZ,MAAM,CAAC,EAAE,UAAU,CAAC,OAAO,kBAAkB,EAAE,YAAY,CAAC;;;;IAgB9D;;;;;;;OAOG;IACa,eAAe,CAC7B,QAAQ,CAAC,EAAE,sBAAsB,EACjC,QAAQ,CAAC,EAAE,iBAAiB,GAC3B,uBAAuB;CAwB3B"}