@boostxyz/sdk 0.0.0-alpha.8 → 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.
- package/dist/Actions/Action.cjs +1 -1
- package/dist/Actions/Action.cjs.map +1 -1
- package/dist/Actions/Action.js +7 -7
- package/dist/Actions/ContractAction.d.ts +57 -14
- package/dist/Actions/ContractAction.d.ts.map +1 -1
- package/dist/Actions/ERC721MintAction.d.ts +50 -23
- package/dist/Actions/ERC721MintAction.d.ts.map +1 -1
- package/dist/Actions/EventAction.cjs +1 -1
- package/dist/Actions/EventAction.cjs.map +1 -1
- package/dist/Actions/EventAction.d.ts +420 -45
- package/dist/Actions/EventAction.d.ts.map +1 -1
- package/dist/Actions/EventAction.js +15 -225
- package/dist/Actions/EventAction.js.map +1 -1
- package/dist/AllowLists/AllowList.cjs +1 -1
- package/dist/AllowLists/AllowList.cjs.map +1 -1
- package/dist/AllowLists/AllowList.d.ts +6 -4
- package/dist/AllowLists/AllowList.d.ts.map +1 -1
- package/dist/AllowLists/AllowList.js +45 -23
- package/dist/AllowLists/AllowList.js.map +1 -1
- package/dist/AllowLists/OpenAllowList.d.ts +423 -0
- package/dist/AllowLists/OpenAllowList.d.ts.map +1 -0
- package/dist/AllowLists/SimpleAllowList.cjs +1 -1
- package/dist/AllowLists/SimpleAllowList.cjs.map +1 -1
- package/dist/AllowLists/SimpleAllowList.d.ts +123 -39
- package/dist/AllowLists/SimpleAllowList.d.ts.map +1 -1
- package/dist/AllowLists/SimpleAllowList.js +75 -76
- package/dist/AllowLists/SimpleAllowList.js.map +1 -1
- package/dist/AllowLists/SimpleDenyList.cjs +1 -1
- package/dist/AllowLists/SimpleDenyList.cjs.map +1 -1
- package/dist/AllowLists/SimpleDenyList.d.ts +234 -13
- package/dist/AllowLists/SimpleDenyList.d.ts.map +1 -1
- package/dist/AllowLists/SimpleDenyList.js +11 -200
- package/dist/AllowLists/SimpleDenyList.js.map +1 -1
- package/dist/Auth/PassthroughAuth.cjs +1 -1
- package/dist/Auth/PassthroughAuth.cjs.map +1 -1
- package/dist/Auth/PassthroughAuth.js +4 -4
- package/dist/Auth/PassthroughAuth.js.map +1 -1
- package/dist/Boost.cjs +1 -1
- package/dist/Boost.cjs.map +1 -1
- package/dist/Boost.d.ts +105 -14
- package/dist/Boost.d.ts.map +1 -1
- package/dist/Boost.js +137 -5
- package/dist/Boost.js.map +1 -1
- package/dist/BoostCore-BVZExPPu.js +1462 -0
- package/dist/BoostCore-BVZExPPu.js.map +1 -0
- package/dist/BoostCore-D-E-cnGI.cjs +3 -0
- package/dist/BoostCore-D-E-cnGI.cjs.map +1 -0
- package/dist/BoostCore.cjs +1 -2
- package/dist/BoostCore.cjs.map +1 -1
- package/dist/BoostCore.d.ts +759 -82
- package/dist/BoostCore.d.ts.map +1 -1
- package/dist/BoostCore.js +29 -1148
- package/dist/BoostCore.js.map +1 -1
- package/dist/BoostRegistry.cjs +1 -1
- package/dist/BoostRegistry.cjs.map +1 -1
- package/dist/BoostRegistry.d.ts +83 -28
- package/dist/BoostRegistry.d.ts.map +1 -1
- package/dist/BoostRegistry.js +170 -93
- package/dist/BoostRegistry.js.map +1 -1
- package/dist/Budgets/Budget.cjs +1 -1
- package/dist/Budgets/Budget.cjs.map +1 -1
- package/dist/Budgets/Budget.d.ts.map +1 -1
- package/dist/Budgets/Budget.js +2 -2
- package/dist/Budgets/Budget.js.map +1 -1
- package/dist/Budgets/ManagedBudget.cjs +1 -1
- package/dist/Budgets/ManagedBudget.cjs.map +1 -1
- package/dist/Budgets/ManagedBudget.d.ts +112 -192
- package/dist/Budgets/ManagedBudget.d.ts.map +1 -1
- package/dist/Budgets/ManagedBudget.js +89 -290
- package/dist/Budgets/ManagedBudget.js.map +1 -1
- package/dist/Budgets/VestingBudget.d.ts +277 -91
- package/dist/Budgets/VestingBudget.d.ts.map +1 -1
- package/dist/Deployable/Contract.cjs +1 -1
- package/dist/Deployable/Contract.cjs.map +1 -1
- package/dist/Deployable/Contract.d.ts +4 -5
- package/dist/Deployable/Contract.d.ts.map +1 -1
- package/dist/Deployable/Contract.js +6 -8
- package/dist/Deployable/Contract.js.map +1 -1
- package/dist/Deployable/Deployable.cjs.map +1 -1
- package/dist/Deployable/Deployable.d.ts +1 -1
- package/dist/Deployable/Deployable.d.ts.map +1 -1
- package/dist/Deployable/Deployable.js +3 -5
- package/dist/Deployable/Deployable.js.map +1 -1
- package/dist/Deployable/DeployableTarget.cjs +1 -1
- package/dist/Deployable/DeployableTarget.cjs.map +1 -1
- package/dist/Deployable/DeployableTarget.d.ts +13 -13
- package/dist/Deployable/DeployableTarget.d.ts.map +1 -1
- package/dist/Deployable/DeployableTarget.js +30 -27
- package/dist/Deployable/DeployableTarget.js.map +1 -1
- package/dist/Deployable/DeployableTargetWithRBAC.cjs +2 -0
- package/dist/Deployable/DeployableTargetWithRBAC.cjs.map +1 -0
- package/dist/Deployable/DeployableTargetWithRBAC.d.ts +179 -0
- package/dist/Deployable/DeployableTargetWithRBAC.d.ts.map +1 -0
- package/dist/Deployable/DeployableTargetWithRBAC.js +222 -0
- package/dist/Deployable/DeployableTargetWithRBAC.js.map +1 -0
- package/dist/EventAction-BZt5cjbe.cjs +2 -0
- package/dist/EventAction-BZt5cjbe.cjs.map +1 -0
- package/dist/EventAction-C_-hJXWm.js +1541 -0
- package/dist/EventAction-C_-hJXWm.js.map +1 -0
- package/dist/Incentive-BhHaK3PZ.cjs +2 -0
- package/dist/Incentive-BhHaK3PZ.cjs.map +1 -0
- package/dist/Incentive-Cqg1w6wD.js +312 -0
- package/dist/Incentive-Cqg1w6wD.js.map +1 -0
- package/dist/Incentives/AllowListIncentive.cjs +1 -1
- package/dist/Incentives/AllowListIncentive.cjs.map +1 -1
- package/dist/Incentives/AllowListIncentive.d.ts +73 -21
- package/dist/Incentives/AllowListIncentive.d.ts.map +1 -1
- package/dist/Incentives/AllowListIncentive.js +61 -36
- package/dist/Incentives/AllowListIncentive.js.map +1 -1
- package/dist/Incentives/CGDAIncentive.cjs +1 -1
- package/dist/Incentives/CGDAIncentive.cjs.map +1 -1
- package/dist/Incentives/CGDAIncentive.d.ts +323 -26
- package/dist/Incentives/CGDAIncentive.d.ts.map +1 -1
- package/dist/Incentives/CGDAIncentive.js +73 -39
- package/dist/Incentives/CGDAIncentive.js.map +1 -1
- package/dist/Incentives/ERC1155Incentive.d.ts +291 -43
- package/dist/Incentives/ERC1155Incentive.d.ts.map +1 -1
- package/dist/Incentives/ERC20Incentive.cjs +1 -1
- package/dist/Incentives/ERC20Incentive.cjs.map +1 -1
- package/dist/Incentives/ERC20Incentive.d.ts +278 -33
- package/dist/Incentives/ERC20Incentive.d.ts.map +1 -1
- package/dist/Incentives/ERC20Incentive.js +79 -47
- package/dist/Incentives/ERC20Incentive.js.map +1 -1
- package/dist/{Budgets/SimpleBudget.d.ts → Incentives/ERC20VariableCriteriaIncentive.d.ts} +346 -420
- package/dist/Incentives/ERC20VariableCriteriaIncentive.d.ts.map +1 -0
- package/dist/Incentives/ERC20VariableIncentive.d.ts +271 -32
- package/dist/Incentives/ERC20VariableIncentive.d.ts.map +1 -1
- package/dist/Incentives/Incentive.cjs +1 -1
- package/dist/Incentives/Incentive.cjs.map +1 -1
- package/dist/Incentives/Incentive.d.ts +4 -4
- package/dist/Incentives/Incentive.d.ts.map +1 -1
- package/dist/Incentives/Incentive.js +16 -280
- package/dist/Incentives/Incentive.js.map +1 -1
- package/dist/Incentives/PointsIncentive.cjs +1 -1
- package/dist/Incentives/PointsIncentive.cjs.map +1 -1
- package/dist/Incentives/PointsIncentive.d.ts +89 -23
- package/dist/Incentives/PointsIncentive.d.ts.map +1 -1
- package/dist/Incentives/PointsIncentive.js +66 -36
- package/dist/Incentives/PointsIncentive.js.map +1 -1
- package/dist/SimpleDenyList-BUR17Tt1.cjs +2 -0
- package/dist/SimpleDenyList-BUR17Tt1.cjs.map +1 -0
- package/dist/SimpleDenyList-CGaWjuld.js +132 -0
- package/dist/SimpleDenyList-CGaWjuld.js.map +1 -0
- package/dist/Validators/SignerValidator.cjs +1 -1
- package/dist/Validators/SignerValidator.cjs.map +1 -1
- package/dist/Validators/SignerValidator.d.ts +310 -17
- package/dist/Validators/SignerValidator.d.ts.map +1 -1
- package/dist/Validators/SignerValidator.js +164 -36
- package/dist/Validators/SignerValidator.js.map +1 -1
- package/dist/Validators/Validator.cjs +1 -1
- package/dist/Validators/Validator.cjs.map +1 -1
- package/dist/Validators/Validator.d.ts +1 -1
- package/dist/Validators/Validator.js +2 -2
- package/dist/Validators/Validator.js.map +1 -1
- package/dist/claiming.cjs +2 -0
- package/dist/claiming.cjs.map +1 -0
- package/dist/claiming.d.ts +43 -0
- package/dist/claiming.d.ts.map +1 -0
- package/dist/claiming.js +17 -0
- package/dist/claiming.js.map +1 -0
- package/dist/componentInterfaces-BBCFkrZv.js +14 -0
- package/dist/componentInterfaces-BBCFkrZv.js.map +1 -0
- package/dist/componentInterfaces-DRI_dQ-P.cjs +2 -0
- package/dist/componentInterfaces-DRI_dQ-P.cjs.map +1 -0
- package/dist/deployments-DVXioW2i.cjs +2 -0
- package/dist/deployments-DVXioW2i.cjs.map +1 -0
- package/dist/deployments-oykLv3_Z.js +43 -0
- package/dist/deployments-oykLv3_Z.js.map +1 -0
- package/dist/deployments.json +44 -0
- package/dist/errors.cjs +1 -1
- package/dist/errors.cjs.map +1 -1
- package/dist/errors.d.ts +257 -21
- package/dist/errors.d.ts.map +1 -1
- package/dist/errors.js +183 -26
- package/dist/errors.js.map +1 -1
- package/dist/{generated-Cbv8zFkf.js → generated-CKt2yCQd.js} +3615 -1868
- package/dist/generated-CKt2yCQd.js.map +1 -0
- package/dist/generated-CyTNlOwM.cjs +3 -0
- package/dist/generated-CyTNlOwM.cjs.map +1 -0
- package/dist/index.cjs +1 -1
- package/dist/index.d.ts +9 -4
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +143 -126
- package/dist/index.js.map +1 -1
- package/dist/transfers.cjs +2 -0
- package/dist/transfers.cjs.map +1 -0
- package/dist/transfers.d.ts +198 -0
- package/dist/transfers.d.ts.map +1 -0
- package/dist/transfers.js +84 -0
- package/dist/transfers.js.map +1 -0
- package/dist/utils.cjs +1 -1
- package/dist/utils.cjs.map +1 -1
- package/dist/utils.d.ts +25 -1380
- package/dist/utils.d.ts.map +1 -1
- package/dist/utils.js +36 -648
- package/dist/utils.js.map +1 -1
- package/package.json +34 -10
- package/src/Actions/Action.test.ts +19 -17
- package/src/Actions/ContractAction.test.ts +14 -16
- package/src/Actions/ContractAction.ts +84 -22
- package/src/Actions/ERC721MintAction.test.ts +8 -8
- package/src/Actions/ERC721MintAction.ts +83 -30
- package/src/Actions/EventAction.test.ts +759 -113
- package/src/Actions/EventAction.ts +991 -116
- package/src/AllowLists/AllowList.test.ts +7 -7
- package/src/AllowLists/AllowList.ts +5 -3
- package/src/AllowLists/OpenAllowList.test.ts +40 -0
- package/src/AllowLists/OpenAllowList.ts +45 -0
- package/src/AllowLists/SimpleAllowList.test.ts +4 -4
- package/src/AllowLists/SimpleAllowList.ts +86 -65
- package/src/AllowLists/SimpleDenyList.test.ts +4 -4
- package/src/AllowLists/SimpleDenyList.ts +87 -126
- package/src/Auth/PassthroughAuth.test.ts +1 -1
- package/src/Auth/PassthroughAuth.ts +1 -1
- package/src/Boost.ts +147 -15
- package/src/BoostCore.test.ts +326 -278
- package/src/BoostCore.ts +425 -242
- package/src/BoostRegistry.test.ts +53 -0
- package/src/BoostRegistry.ts +168 -50
- package/src/Budgets/Budget.test.ts +2 -2
- package/src/Budgets/Budget.ts +1 -2
- package/src/Budgets/ManagedBudget.test.ts +82 -19
- package/src/Budgets/ManagedBudget.ts +106 -315
- package/src/Budgets/VestingBudget.test.ts +7 -7
- package/src/Budgets/VestingBudget.ts +110 -112
- package/src/Deployable/Contract.ts +5 -6
- package/src/Deployable/Deployable.ts +1 -1
- package/src/Deployable/DeployableTarget.ts +32 -21
- package/src/Deployable/DeployableTargetWithRBAC.ts +323 -0
- package/src/Incentives/AllowListIncentive.test.ts +7 -10
- package/src/Incentives/AllowListIncentive.ts +88 -30
- package/src/Incentives/CGDAIncentive.test.ts +11 -12
- package/src/Incentives/CGDAIncentive.ts +161 -37
- package/src/Incentives/ERC1155Incentive.test.ts +5 -16
- package/src/Incentives/ERC1155Incentive.ts +132 -51
- package/src/Incentives/ERC20Incentive.test.ts +15 -23
- package/src/Incentives/ERC20Incentive.ts +131 -46
- package/src/Incentives/ERC20VariableCriteriaIncentive.test.ts +184 -0
- package/src/Incentives/ERC20VariableCriteriaIncentive.ts +324 -0
- package/src/Incentives/ERC20VariableIncentive.test.ts +12 -35
- package/src/Incentives/ERC20VariableIncentive.ts +118 -43
- package/src/Incentives/Incentive.test.ts +5 -2
- package/src/Incentives/Incentive.ts +7 -6
- package/src/Incentives/PointsIncentive.test.ts +26 -30
- package/src/Incentives/PointsIncentive.ts +110 -34
- package/src/Validators/SignerValidator.test.ts +9 -13
- package/src/Validators/SignerValidator.ts +437 -26
- package/src/Validators/Validator.test.ts +2 -2
- package/src/Validators/Validator.ts +1 -1
- package/src/claiming.ts +56 -0
- package/src/errors.ts +346 -22
- package/src/index.test.ts +118 -36
- package/src/index.ts +15 -7
- package/src/transfers.ts +284 -0
- package/src/utils.test.ts +2 -2
- package/src/utils.ts +61 -2061
- package/dist/Budgets/SimpleBudget.d.ts.map +0 -1
- package/dist/componentInterfaces-CKCBwG16.cjs +0 -2
- package/dist/componentInterfaces-CKCBwG16.cjs.map +0 -1
- package/dist/componentInterfaces-DYkaxBda.js +0 -13
- package/dist/componentInterfaces-DYkaxBda.js.map +0 -1
- package/dist/generated-BzszviNp.cjs +0 -3
- package/dist/generated-BzszviNp.cjs.map +0 -1
- package/dist/generated-Cbv8zFkf.js.map +0 -1
- package/src/Budgets/SimpleBudget.test.ts +0 -152
- package/src/Budgets/SimpleBudget.ts +0 -521
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"SimpleDenyList.cjs","sources":["../../src/AllowLists/SimpleDenyList.ts"],"sourcesContent":["import {\n readSimpleDenyListIsAllowed,\n simpleDenyListAbi,\n simulateSimpleDenyListSetDenied,\n writeSimpleDenyListSetDenied,\n} from '@boostxyz/evm';\nimport { bytecode } from '@boostxyz/evm/artifacts/contracts/allowlists/SimpleDenyList.sol/SimpleDenyList.json';\nimport { getAccount } from '@wagmi/core';\nimport {\n type Address,\n type ContractEventName,\n type Hex,\n 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 SimpleDenyListPayload,\n type WriteParams,\n prepareSimpleDenyListPayload,\n} from '../utils';\n\nexport { simpleDenyListAbi };\nexport type { SimpleDenyListPayload };\n\n/**\n * A generic `viem.Log` event with support for `SimpleDenyList` event types.\n *\n * @export\n * @typedef {SimpleDenyListLog}\n * @template {ContractEventName<typeof simpleDenyListAbi>} [event=ContractEventName<\n * typeof simpleDenyListAbi\n * >]\n */\nexport type SimpleDenyListLog<\n event extends ContractEventName<typeof simpleDenyListAbi> = ContractEventName<\n typeof simpleDenyListAbi\n >,\n> = GenericLog<typeof simpleDenyListAbi, event>;\n\n/**\n * A simple implementation of an AllowList that implicitly allows all addresses except those explicitly added to the deny list\n *\n * @export\n * @class SimpleDenyList\n * @typedef {SimpleDenyList}\n * @extends {DeployableTarget<SimpleDenyListPayload>}\n */\nexport class SimpleDenyList extends DeployableTarget<\n SimpleDenyListPayload,\n typeof simpleDenyListAbi\n> {\n public override readonly abi = simpleDenyListAbi;\n /**\n * @inheritdoc\n *\n * @public\n * @static\n * @type {Address}\n */\n public static override base: Address = import.meta.env\n .VITE_SIMPLE_DENYLIST_BASE;\n /**\n * @inheritdoc\n *\n * @public\n * @static\n * @type {RegistryType}\n */\n public static override registryType: RegistryType = RegistryType.ALLOW_LIST;\n\n /**\n * Check if a user is authorized (i.e. not denied)\n *\n * @public\n * @async\n * @param {Address} address - The address of the user\n * @param {?ReadParams<typeof simpleDenyListAbi, 'isAllowed'>} [params]\n * @returns {Promise<boolean>} - True if the user is authorized\n */\n public async isAllowed(\n address: Address,\n params?: ReadParams<typeof simpleDenyListAbi, 'isAllowed'>,\n ): Promise<boolean> {\n return await readSimpleDenyListIsAllowed(this._config, {\n address: this.assertValidAddress(),\n args: [address, zeroHash],\n ...this.optionallyAttachAccount(),\n // biome-ignore lint/suspicious/noExplicitAny: Accept any shape of valid wagmi/viem parameters, wagmi does the same thing internally\n ...(params as any),\n });\n }\n\n /**\n * Set the denied status of a user. The length of the `users_` and `denied_` arrays must be the same. This function can only be called by the owner\n *\n * @public\n * @async\n * @param {Address[]} addresses - The list of users to update\n * @param {boolean[]} allowed - The denied status of each user\n * @param {?WriteParams<typeof simpleDenyListAbi, 'setDenied'>} [params]\n * @returns {unknown}\n */\n public async setDenied(\n addresses: Address[],\n allowed: boolean[],\n params?: WriteParams<typeof simpleDenyListAbi, 'setDenied'>,\n ) {\n return this.awaitResult(this.setDeniedRaw(addresses, allowed, params));\n }\n\n /**\n * Set the denied status of a user. The length of the `users_` and `denied_` arrays must be the same. This function can only be called by the owner\n *\n * @public\n * @async\n * @param {Address[]} addresses - The list of users to update\n * @param {boolean[]} allowed - The denied status of each user\n * @param {?WriteParams<typeof simpleDenyListAbi, 'setDenied'>} [params]\n * @returns {unknown}\n */\n public async setDeniedRaw(\n addresses: Address[],\n allowed: boolean[],\n params?: WriteParams<typeof simpleDenyListAbi, 'setDenied'>,\n ) {\n const { request, result } = await simulateSimpleDenyListSetDenied(\n this._config,\n {\n address: this.assertValidAddress(),\n args: [addresses, allowed],\n ...this.optionallyAttachAccount(),\n // biome-ignore lint/suspicious/noExplicitAny: Accept any shape of valid wagmi/viem parameters, wagmi does the same thing internally\n ...(params as any),\n },\n );\n const hash = await writeSimpleDenyListSetDenied(this._config, request);\n return { hash, result };\n }\n\n // /**\n // * A typed wrapper for (viem.getLogs)[https://viem.sh/docs/actions/public/getLogs#getlogs].\n // * Accepts `eventName` and `eventNames` as optional parameters to narrow the returned log types.\n // * @example\n // * ```ts\n // * const logs = contract.getLogs({ eventName: 'EventName' })\n // * const logs = contract.getLogs({ eventNames: ['EventName'] })\n // * ```\n // * @public\n // * @async\n // * @template {ContractEventName<typeof simpleDenyListAbi>} event\n // * @template {ExtractAbiEvent<\n // * typeof simpleDenyListAbi,\n // * event\n // * >} [abiEvent=ExtractAbiEvent<typeof simpleDenyListAbi, event>]\n // * @param {?Omit<\n // * GetLogsParams<typeof simpleDenyListAbi, event, abiEvent, abiEvent[]>,\n // * 'event' | 'events'\n // * > & {\n // * eventName?: event;\n // * eventNames?: event[];\n // * }} [params]\n // * @returns {Promise<GetLogsReturnType<abiEvent, abiEvent[]>>}\n // */\n // public async getLogs<\n // event extends ContractEventName<typeof simpleDenyListAbi>,\n // const abiEvent extends ExtractAbiEvent<\n // typeof simpleDenyListAbi,\n // event\n // > = ExtractAbiEvent<typeof simpleDenyListAbi, event>,\n // >(\n // params?: Omit<\n // GetLogsParams<typeof simpleDenyListAbi, event, abiEvent, abiEvent[]>,\n // 'event' | 'events'\n // > & {\n // eventName?: event;\n // eventNames?: event[];\n // },\n // ): Promise<GetLogsReturnType<abiEvent, abiEvent[]>> {\n // return getLogs(this._config.getClient({ chainId: params?.chainId }), {\n // // biome-ignore lint/suspicious/noExplicitAny: Accept any shape of valid wag\n // ...(params as any),\n // ...(params?.eventName\n // ? {\n // event: getAbiItem({\n // abi: simpleDenyListAbi,\n // name: params.eventName,\n // // biome-ignore lint/suspicious/noExplicitAny: awkward abi intersection issue\n // } as any),\n // }\n // : {}),\n // ...(params?.eventNames\n // ? {\n // events: params.eventNames.map((name) =>\n // getAbiItem({\n // abi: simpleDenyListAbi,\n // name,\n // // biome-ignore lint/suspicious/noExplicitAny: awkward abi intersection issue\n // } as any),\n // ),\n // }\n // : {}),\n // address: this.assertValidAddress(),\n // });\n // }\n\n // /**\n // * A typed wrapper for `wagmi.watchContractEvent`\n // *\n // * @public\n // * @async\n // * @template {ContractEventName<typeof simpleDenyListAbi>} event\n // * @param {(log: SimpleDenyListLog<event>) => unknown} cb\n // * @param {?WatchParams<typeof simpleDenyListAbi, event> & {\n // * eventName?: event;\n // * }} [params]\n // * @returns {unknown, params?: any) => unknown} Unsubscribe function\n // */\n // public async subscribe<\n // event extends ContractEventName<typeof simpleDenyListAbi>,\n // >(\n // cb: (log: SimpleDenyListLog<event>) => unknown,\n // params?: WatchParams<typeof simpleDenyListAbi, event> & {\n // eventName?: event;\n // },\n // ) {\n // return watchContractEvent<\n // typeof this._config,\n // (typeof this._config)['chains'][number]['id'],\n // typeof simpleDenyListAbi,\n // event\n // >(this._config, {\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 // eventName: params?.eventName,\n // abi: simpleDenyListAbi,\n // address: this.assertValidAddress(),\n // onLogs: (logs) => {\n // for (let l of logs) {\n // cb(l as unknown as SimpleDenyListLog<event>);\n // }\n // },\n // });\n // }\n\n /**\n * @inheritdoc\n *\n * @public\n * @param {?SimpleDenyListPayload} [_payload]\n * @param {?DeployableOptions} [_options]\n * @returns {GenericDeployableParams}\n */\n public override buildParameters(\n _payload?: SimpleDenyListPayload,\n _options?: DeployableOptions,\n ): GenericDeployableParams {\n const [payload, options] = this.validateDeploymentConfig(\n _payload,\n _options,\n );\n if (!payload.owner || payload.owner === zeroAddress) {\n const owner = options.account\n ? options.account.address\n : options.config\n ? getAccount(options.config).address\n : this._account?.address;\n if (owner) {\n payload.owner = owner;\n } else {\n throw new DeployableUnknownOwnerProvidedError();\n }\n }\n return {\n abi: simpleDenyListAbi,\n bytecode: bytecode as Hex,\n args: [prepareSimpleDenyListPayload(payload)],\n ...this.optionallyAttachAccount(options.account),\n };\n }\n}\n"],"names":["_SimpleDenyList","DeployableTarget","simpleDenyListAbi","address","params","readSimpleDenyListIsAllowed","zeroHash","addresses","allowed","request","result","simulateSimpleDenyListSetDenied","writeSimpleDenyListSetDenied","_payload","_options","payload","options","zeroAddress","owner","getAccount","_a","DeployableUnknownOwnerProvidedError","bytecode","prepareSimpleDenyListPayload","RegistryType","SimpleDenyList"],"mappings":"s+RAwDaA,EAAN,MAAMA,UAAuBC,EAAAA,gBAGlC,CAHK,aAAA,CAAA,MAAA,GAAA,SAAA,EAIL,KAAyB,IAAMC,GAAA,CA4B/B,MAAa,UACXC,EACAC,EACkB,CACX,OAAA,MAAMC,EAAAA,GAA4B,KAAK,QAAS,CACrD,QAAS,KAAK,mBAAmB,EACjC,KAAM,CAACF,EAASG,UAAQ,EACxB,GAAG,KAAK,wBAAwB,EAEhC,GAAIF,CAAA,CACL,CACH,CAYA,MAAa,UACXG,EACAC,EACAJ,EACA,CACA,OAAO,KAAK,YAAY,KAAK,aAAaG,EAAWC,EAASJ,CAAM,CAAC,CACvE,CAYA,MAAa,aACXG,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,EAA6B,GAAA,KAAK,QAASH,CAAO,EACtD,OAAAC,EACjB,CAmHgB,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,IAAKnB,EAAA,EACL,SAAAoB,EACA,KAAM,CAACC,+BAA6BR,CAAO,CAAC,EAC5C,GAAG,KAAK,wBAAwBC,EAAQ,OAAO,CAAA,CAEnD,CACF,EA5NyBhB,EAAA,KAAgB,6CASvCA,EAAuB,aAA6BwB,EAAa,aAAA,WArB5D,IAAMC,EAANzB"}
|
|
1
|
+
{"version":3,"file":"SimpleDenyList.cjs","sources":[],"sourcesContent":[],"names":[],"mappings":""}
|
|
@@ -1,10 +1,30 @@
|
|
|
1
1
|
import { simpleDenyListAbi } from '@boostxyz/evm';
|
|
2
2
|
import { type Address, type ContractEventName } from 'viem';
|
|
3
3
|
import type { DeployableOptions, GenericDeployableParams } from '../Deployable/Deployable';
|
|
4
|
-
import {
|
|
5
|
-
import { type GenericLog, type ReadParams, RegistryType, type
|
|
4
|
+
import { DeployableTargetWithRBAC } from '../Deployable/DeployableTargetWithRBAC';
|
|
5
|
+
import { type GenericLog, type ReadParams, RegistryType, type WriteParams } from '../utils';
|
|
6
6
|
export { simpleDenyListAbi };
|
|
7
|
-
|
|
7
|
+
/**
|
|
8
|
+
* Object representation of a {@link SimpleDenyList} initialization payload.
|
|
9
|
+
*
|
|
10
|
+
* @export
|
|
11
|
+
* @interface SimpleDenyListPayload
|
|
12
|
+
* @typedef {SimpleDenyListPayload}
|
|
13
|
+
*/
|
|
14
|
+
export interface SimpleDenyListPayload {
|
|
15
|
+
/**
|
|
16
|
+
* The allow list's owner
|
|
17
|
+
*
|
|
18
|
+
* @type {Address}
|
|
19
|
+
*/
|
|
20
|
+
owner: Address;
|
|
21
|
+
/**
|
|
22
|
+
* List of denied addresses.
|
|
23
|
+
*
|
|
24
|
+
* @type {Address[]}
|
|
25
|
+
*/
|
|
26
|
+
denied: Address[];
|
|
27
|
+
}
|
|
8
28
|
/**
|
|
9
29
|
* A generic `viem.Log` event with support for `SimpleDenyList` event types.
|
|
10
30
|
*
|
|
@@ -21,9 +41,9 @@ export type SimpleDenyListLog<event extends ContractEventName<typeof simpleDenyL
|
|
|
21
41
|
* @export
|
|
22
42
|
* @class SimpleDenyList
|
|
23
43
|
* @typedef {SimpleDenyList}
|
|
24
|
-
* @extends {
|
|
44
|
+
* @extends {DeployableTargetWithRBAC<SimpleDenyListPayload>}
|
|
25
45
|
*/
|
|
26
|
-
export declare class SimpleDenyList extends
|
|
46
|
+
export declare class SimpleDenyList<Payload = SimpleDenyListPayload> extends DeployableTargetWithRBAC<Payload | undefined, typeof simpleDenyListAbi> {
|
|
27
47
|
readonly abi: readonly [{
|
|
28
48
|
readonly type: "constructor";
|
|
29
49
|
readonly inputs: readonly [];
|
|
@@ -68,6 +88,10 @@ export declare class SimpleDenyList extends DeployableTarget<SimpleDenyListPaylo
|
|
|
68
88
|
readonly type: "error";
|
|
69
89
|
readonly inputs: readonly [];
|
|
70
90
|
readonly name: "Unauthorized";
|
|
91
|
+
}, {
|
|
92
|
+
readonly type: "error";
|
|
93
|
+
readonly inputs: readonly [];
|
|
94
|
+
readonly name: "Unauthorized";
|
|
71
95
|
}, {
|
|
72
96
|
readonly type: "event";
|
|
73
97
|
readonly anonymous: false;
|
|
@@ -113,6 +137,41 @@ export declare class SimpleDenyList extends DeployableTarget<SimpleDenyListPaylo
|
|
|
113
137
|
readonly indexed: true;
|
|
114
138
|
}];
|
|
115
139
|
readonly name: "OwnershipTransferred";
|
|
140
|
+
}, {
|
|
141
|
+
readonly type: "event";
|
|
142
|
+
readonly anonymous: false;
|
|
143
|
+
readonly inputs: readonly [{
|
|
144
|
+
readonly name: "user";
|
|
145
|
+
readonly internalType: "address";
|
|
146
|
+
readonly type: "address";
|
|
147
|
+
readonly indexed: true;
|
|
148
|
+
}, {
|
|
149
|
+
readonly name: "roles";
|
|
150
|
+
readonly internalType: "uint256";
|
|
151
|
+
readonly type: "uint256";
|
|
152
|
+
readonly indexed: true;
|
|
153
|
+
}];
|
|
154
|
+
readonly name: "RolesUpdated";
|
|
155
|
+
}, {
|
|
156
|
+
readonly type: "function";
|
|
157
|
+
readonly inputs: readonly [];
|
|
158
|
+
readonly name: "ADMIN_ROLE";
|
|
159
|
+
readonly outputs: readonly [{
|
|
160
|
+
readonly name: "";
|
|
161
|
+
readonly internalType: "uint256";
|
|
162
|
+
readonly type: "uint256";
|
|
163
|
+
}];
|
|
164
|
+
readonly stateMutability: "view";
|
|
165
|
+
}, {
|
|
166
|
+
readonly type: "function";
|
|
167
|
+
readonly inputs: readonly [];
|
|
168
|
+
readonly name: "MANAGER_ROLE";
|
|
169
|
+
readonly outputs: readonly [{
|
|
170
|
+
readonly name: "";
|
|
171
|
+
readonly internalType: "uint256";
|
|
172
|
+
readonly type: "uint256";
|
|
173
|
+
}];
|
|
174
|
+
readonly stateMutability: "view";
|
|
116
175
|
}, {
|
|
117
176
|
readonly type: "function";
|
|
118
177
|
readonly inputs: readonly [];
|
|
@@ -139,6 +198,70 @@ export declare class SimpleDenyList extends DeployableTarget<SimpleDenyListPaylo
|
|
|
139
198
|
readonly type: "bytes4";
|
|
140
199
|
}];
|
|
141
200
|
readonly stateMutability: "pure";
|
|
201
|
+
}, {
|
|
202
|
+
readonly type: "function";
|
|
203
|
+
readonly inputs: readonly [{
|
|
204
|
+
readonly name: "user";
|
|
205
|
+
readonly internalType: "address";
|
|
206
|
+
readonly type: "address";
|
|
207
|
+
}, {
|
|
208
|
+
readonly name: "roles";
|
|
209
|
+
readonly internalType: "uint256";
|
|
210
|
+
readonly type: "uint256";
|
|
211
|
+
}];
|
|
212
|
+
readonly name: "grantRoles";
|
|
213
|
+
readonly outputs: readonly [];
|
|
214
|
+
readonly stateMutability: "payable";
|
|
215
|
+
}, {
|
|
216
|
+
readonly type: "function";
|
|
217
|
+
readonly inputs: readonly [{
|
|
218
|
+
readonly name: "accounts_";
|
|
219
|
+
readonly internalType: "address[]";
|
|
220
|
+
readonly type: "address[]";
|
|
221
|
+
}, {
|
|
222
|
+
readonly name: "roles_";
|
|
223
|
+
readonly internalType: "uint256[]";
|
|
224
|
+
readonly type: "uint256[]";
|
|
225
|
+
}];
|
|
226
|
+
readonly name: "grantRoles";
|
|
227
|
+
readonly outputs: readonly [];
|
|
228
|
+
readonly stateMutability: "nonpayable";
|
|
229
|
+
}, {
|
|
230
|
+
readonly type: "function";
|
|
231
|
+
readonly inputs: readonly [{
|
|
232
|
+
readonly name: "user";
|
|
233
|
+
readonly internalType: "address";
|
|
234
|
+
readonly type: "address";
|
|
235
|
+
}, {
|
|
236
|
+
readonly name: "roles";
|
|
237
|
+
readonly internalType: "uint256";
|
|
238
|
+
readonly type: "uint256";
|
|
239
|
+
}];
|
|
240
|
+
readonly name: "hasAllRoles";
|
|
241
|
+
readonly outputs: readonly [{
|
|
242
|
+
readonly name: "";
|
|
243
|
+
readonly internalType: "bool";
|
|
244
|
+
readonly type: "bool";
|
|
245
|
+
}];
|
|
246
|
+
readonly stateMutability: "view";
|
|
247
|
+
}, {
|
|
248
|
+
readonly type: "function";
|
|
249
|
+
readonly inputs: readonly [{
|
|
250
|
+
readonly name: "user";
|
|
251
|
+
readonly internalType: "address";
|
|
252
|
+
readonly type: "address";
|
|
253
|
+
}, {
|
|
254
|
+
readonly name: "roles";
|
|
255
|
+
readonly internalType: "uint256";
|
|
256
|
+
readonly type: "uint256";
|
|
257
|
+
}];
|
|
258
|
+
readonly name: "hasAnyRole";
|
|
259
|
+
readonly outputs: readonly [{
|
|
260
|
+
readonly name: "";
|
|
261
|
+
readonly internalType: "bool";
|
|
262
|
+
readonly type: "bool";
|
|
263
|
+
}];
|
|
264
|
+
readonly stateMutability: "view";
|
|
142
265
|
}, {
|
|
143
266
|
readonly type: "function";
|
|
144
267
|
readonly inputs: readonly [{
|
|
@@ -167,6 +290,20 @@ export declare class SimpleDenyList extends DeployableTarget<SimpleDenyListPaylo
|
|
|
167
290
|
readonly type: "bool";
|
|
168
291
|
}];
|
|
169
292
|
readonly stateMutability: "view";
|
|
293
|
+
}, {
|
|
294
|
+
readonly type: "function";
|
|
295
|
+
readonly inputs: readonly [{
|
|
296
|
+
readonly name: "account_";
|
|
297
|
+
readonly internalType: "address";
|
|
298
|
+
readonly type: "address";
|
|
299
|
+
}];
|
|
300
|
+
readonly name: "isAuthorized";
|
|
301
|
+
readonly outputs: readonly [{
|
|
302
|
+
readonly name: "";
|
|
303
|
+
readonly internalType: "bool";
|
|
304
|
+
readonly type: "bool";
|
|
305
|
+
}];
|
|
306
|
+
readonly stateMutability: "view";
|
|
170
307
|
}, {
|
|
171
308
|
readonly type: "function";
|
|
172
309
|
readonly inputs: readonly [];
|
|
@@ -197,12 +334,78 @@ export declare class SimpleDenyList extends DeployableTarget<SimpleDenyListPaylo
|
|
|
197
334
|
readonly name: "renounceOwnership";
|
|
198
335
|
readonly outputs: readonly [];
|
|
199
336
|
readonly stateMutability: "payable";
|
|
337
|
+
}, {
|
|
338
|
+
readonly type: "function";
|
|
339
|
+
readonly inputs: readonly [{
|
|
340
|
+
readonly name: "roles";
|
|
341
|
+
readonly internalType: "uint256";
|
|
342
|
+
readonly type: "uint256";
|
|
343
|
+
}];
|
|
344
|
+
readonly name: "renounceRoles";
|
|
345
|
+
readonly outputs: readonly [];
|
|
346
|
+
readonly stateMutability: "payable";
|
|
200
347
|
}, {
|
|
201
348
|
readonly type: "function";
|
|
202
349
|
readonly inputs: readonly [];
|
|
203
350
|
readonly name: "requestOwnershipHandover";
|
|
204
351
|
readonly outputs: readonly [];
|
|
205
352
|
readonly stateMutability: "payable";
|
|
353
|
+
}, {
|
|
354
|
+
readonly type: "function";
|
|
355
|
+
readonly inputs: readonly [{
|
|
356
|
+
readonly name: "user";
|
|
357
|
+
readonly internalType: "address";
|
|
358
|
+
readonly type: "address";
|
|
359
|
+
}, {
|
|
360
|
+
readonly name: "roles";
|
|
361
|
+
readonly internalType: "uint256";
|
|
362
|
+
readonly type: "uint256";
|
|
363
|
+
}];
|
|
364
|
+
readonly name: "revokeRoles";
|
|
365
|
+
readonly outputs: readonly [];
|
|
366
|
+
readonly stateMutability: "payable";
|
|
367
|
+
}, {
|
|
368
|
+
readonly type: "function";
|
|
369
|
+
readonly inputs: readonly [{
|
|
370
|
+
readonly name: "accounts_";
|
|
371
|
+
readonly internalType: "address[]";
|
|
372
|
+
readonly type: "address[]";
|
|
373
|
+
}, {
|
|
374
|
+
readonly name: "roles_";
|
|
375
|
+
readonly internalType: "uint256[]";
|
|
376
|
+
readonly type: "uint256[]";
|
|
377
|
+
}];
|
|
378
|
+
readonly name: "revokeRoles";
|
|
379
|
+
readonly outputs: readonly [];
|
|
380
|
+
readonly stateMutability: "nonpayable";
|
|
381
|
+
}, {
|
|
382
|
+
readonly type: "function";
|
|
383
|
+
readonly inputs: readonly [{
|
|
384
|
+
readonly name: "user";
|
|
385
|
+
readonly internalType: "address";
|
|
386
|
+
readonly type: "address";
|
|
387
|
+
}];
|
|
388
|
+
readonly name: "rolesOf";
|
|
389
|
+
readonly outputs: readonly [{
|
|
390
|
+
readonly name: "roles";
|
|
391
|
+
readonly internalType: "uint256";
|
|
392
|
+
readonly type: "uint256";
|
|
393
|
+
}];
|
|
394
|
+
readonly stateMutability: "view";
|
|
395
|
+
}, {
|
|
396
|
+
readonly type: "function";
|
|
397
|
+
readonly inputs: readonly [{
|
|
398
|
+
readonly name: "accounts_";
|
|
399
|
+
readonly internalType: "address[]";
|
|
400
|
+
readonly type: "address[]";
|
|
401
|
+
}, {
|
|
402
|
+
readonly name: "authorized_";
|
|
403
|
+
readonly internalType: "bool[]";
|
|
404
|
+
readonly type: "bool[]";
|
|
405
|
+
}];
|
|
406
|
+
readonly name: "setAuthorized";
|
|
407
|
+
readonly outputs: readonly [];
|
|
408
|
+
readonly stateMutability: "nonpayable";
|
|
206
409
|
}, {
|
|
207
410
|
readonly type: "function";
|
|
208
411
|
readonly inputs: readonly [{
|
|
@@ -247,9 +450,9 @@ export declare class SimpleDenyList extends DeployableTarget<SimpleDenyListPaylo
|
|
|
247
450
|
*
|
|
248
451
|
* @public
|
|
249
452
|
* @static
|
|
250
|
-
* @type {Address}
|
|
453
|
+
* @type {Record<number, Address>}
|
|
251
454
|
*/
|
|
252
|
-
static
|
|
455
|
+
static bases: Record<number, Address>;
|
|
253
456
|
/**
|
|
254
457
|
* @inheritdoc
|
|
255
458
|
*
|
|
@@ -258,13 +461,22 @@ export declare class SimpleDenyList extends DeployableTarget<SimpleDenyListPaylo
|
|
|
258
461
|
* @type {RegistryType}
|
|
259
462
|
*/
|
|
260
463
|
static registryType: RegistryType;
|
|
464
|
+
/**
|
|
465
|
+
* Retrieves the owner
|
|
466
|
+
*
|
|
467
|
+
* @public
|
|
468
|
+
* @async
|
|
469
|
+
* @param {?ReadParams} [params]
|
|
470
|
+
* @returns {Promise<Address>} - The address of the owner
|
|
471
|
+
*/
|
|
472
|
+
owner(params?: ReadParams<typeof simpleDenyListAbi, 'owner'>): Promise<Address>;
|
|
261
473
|
/**
|
|
262
474
|
* Check if a user is authorized (i.e. not denied)
|
|
263
475
|
*
|
|
264
476
|
* @public
|
|
265
477
|
* @async
|
|
266
478
|
* @param {Address} address - The address of the user
|
|
267
|
-
* @param {?ReadParams
|
|
479
|
+
* @param {?ReadParams} [params]
|
|
268
480
|
* @returns {Promise<boolean>} - True if the user is authorized
|
|
269
481
|
*/
|
|
270
482
|
isAllowed(address: Address, params?: ReadParams<typeof simpleDenyListAbi, 'isAllowed'>): Promise<boolean>;
|
|
@@ -275,8 +487,8 @@ export declare class SimpleDenyList extends DeployableTarget<SimpleDenyListPaylo
|
|
|
275
487
|
* @async
|
|
276
488
|
* @param {Address[]} addresses - The list of users to update
|
|
277
489
|
* @param {boolean[]} allowed - The denied status of each user
|
|
278
|
-
* @param {?WriteParams
|
|
279
|
-
* @returns {
|
|
490
|
+
* @param {?WriteParams} [params]
|
|
491
|
+
* @returns {Promise<void>}
|
|
280
492
|
*/
|
|
281
493
|
setDenied(addresses: Address[], allowed: boolean[], params?: WriteParams<typeof simpleDenyListAbi, 'setDenied'>): Promise<void>;
|
|
282
494
|
/**
|
|
@@ -286,8 +498,8 @@ export declare class SimpleDenyList extends DeployableTarget<SimpleDenyListPaylo
|
|
|
286
498
|
* @async
|
|
287
499
|
* @param {Address[]} addresses - The list of users to update
|
|
288
500
|
* @param {boolean[]} allowed - The denied status of each user
|
|
289
|
-
* @param {?WriteParams
|
|
290
|
-
* @returns {
|
|
501
|
+
* @param {?WriteParams} [params]
|
|
502
|
+
* @returns {Promise<{ hash: `0x${string}`; result: void; }>}
|
|
291
503
|
*/
|
|
292
504
|
setDeniedRaw(addresses: Address[], allowed: boolean[], params?: WriteParams<typeof simpleDenyListAbi, 'setDenied'>): Promise<{
|
|
293
505
|
hash: `0x${string}`;
|
|
@@ -301,6 +513,15 @@ export declare class SimpleDenyList extends DeployableTarget<SimpleDenyListPaylo
|
|
|
301
513
|
* @param {?DeployableOptions} [_options]
|
|
302
514
|
* @returns {GenericDeployableParams}
|
|
303
515
|
*/
|
|
304
|
-
buildParameters(_payload?:
|
|
516
|
+
buildParameters(_payload?: Payload, _options?: DeployableOptions): GenericDeployableParams;
|
|
305
517
|
}
|
|
518
|
+
/**
|
|
519
|
+
* Given a {@link SimpleDenyListPayload}, properly encode the initialization payload.
|
|
520
|
+
*
|
|
521
|
+
* @param {SimpleDenyListPayload} param0
|
|
522
|
+
* @param {Address} param0.owner - The allow list's owner
|
|
523
|
+
* @param {Address[]} param0.denied - List of denied addresses.
|
|
524
|
+
* @returns {Hex}
|
|
525
|
+
*/
|
|
526
|
+
export declare function prepareSimpleDenyListPayload({ owner, denied, }: SimpleDenyListPayload): `0x${string}`;
|
|
306
527
|
//# sourceMappingURL=SimpleDenyList.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"SimpleDenyList.d.ts","sourceRoot":"","sources":["../../src/AllowLists/SimpleDenyList.ts"],"names":[],"mappings":"AAAA,OAAO,
|
|
1
|
+
{"version":3,"file":"SimpleDenyList.d.ts","sourceRoot":"","sources":["../../src/AllowLists/SimpleDenyList.ts"],"names":[],"mappings":"AAAA,OAAO,EAGL,iBAAiB,EAGlB,MAAM,eAAe,CAAC;AAGvB,OAAO,EACL,KAAK,OAAO,EACZ,KAAK,iBAAiB,EAKvB,MAAM,MAAM,CAAC;AAEd,OAAO,KAAK,EACV,iBAAiB,EACjB,uBAAuB,EACxB,MAAM,0BAA0B,CAAC;AAClC,OAAO,EAAE,wBAAwB,EAAE,MAAM,wCAAwC,CAAC;AAElF,OAAO,EACL,KAAK,UAAU,EACf,KAAK,UAAU,EACf,YAAY,EACZ,KAAK,WAAW,EACjB,MAAM,UAAU,CAAC;AAElB,OAAO,EAAE,iBAAiB,EAAE,CAAC;AAE7B;;;;;;GAMG;AACH,MAAM,WAAW,qBAAqB;IACpC;;;;OAIG;IACH,KAAK,EAAE,OAAO,CAAC;IACf;;;;OAIG;IACH,MAAM,EAAE,OAAO,EAAE,CAAC;CACnB;AAED;;;;;;;;GAQG;AACH,MAAM,MAAM,iBAAiB,CAC3B,KAAK,SAAS,iBAAiB,CAAC,OAAO,iBAAiB,CAAC,GAAG,iBAAiB,CAC3E,OAAO,iBAAiB,CACzB,IACC,UAAU,CAAC,OAAO,iBAAiB,EAAE,KAAK,CAAC,CAAC;AAEhD;;;;;;;GAOG;AACH,qBAAa,cAAc,CACzB,OAAO,GAAG,qBAAqB,CAC/B,SAAQ,wBAAwB,CAChC,OAAO,GAAG,SAAS,EACnB,OAAO,iBAAiB,CACzB;IACC,SAAyB,GAAG;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;OAAqB;IACjD;;;;;;OAMG;IACH,OAAuB,KAAK,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAEnD;IACF;;;;;;OAMG;IACH,OAAuB,YAAY,EAAE,YAAY,CAA2B;IAE5E;;;;;;;OAOG;IACU,KAAK,CAChB,MAAM,CAAC,EAAE,UAAU,CAAC,OAAO,iBAAiB,EAAE,OAAO,CAAC,GACrD,OAAO,CAAC,OAAO,CAAC;IAUnB;;;;;;;;OAQG;IACU,SAAS,CACpB,OAAO,EAAE,OAAO,EAChB,MAAM,CAAC,EAAE,UAAU,CAAC,OAAO,iBAAiB,EAAE,WAAW,CAAC,GACzD,OAAO,CAAC,OAAO,CAAC;IAUnB;;;;;;;;;OASG;IACU,SAAS,CACpB,SAAS,EAAE,OAAO,EAAE,EACpB,OAAO,EAAE,OAAO,EAAE,EAClB,MAAM,CAAC,EAAE,WAAW,CAAC,OAAO,iBAAiB,EAAE,WAAW,CAAC;IAO7D;;;;;;;;;OASG;IACU,YAAY,CACvB,SAAS,EAAE,OAAO,EAAE,EACpB,OAAO,EAAE,OAAO,EAAE,EAClB,MAAM,CAAC,EAAE,WAAW,CAAC,OAAO,iBAAiB,EAAE,WAAW,CAAC;;;;IAgB7D;;;;;;;OAOG;IACa,eAAe,CAC7B,QAAQ,CAAC,EAAE,OAAO,EAClB,QAAQ,CAAC,EAAE,iBAAiB,GAC3B,uBAAuB;CAsB3B;AAED;;;;;;;GAOG;AACH,wBAAgB,4BAA4B,CAAC,EAC3C,KAAK,EACL,MAAM,GACP,EAAE,qBAAqB,iBAQvB"}
|
|
@@ -1,203 +1,14 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import {
|
|
3
|
-
import
|
|
4
|
-
import
|
|
5
|
-
import
|
|
6
|
-
import
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
super(...arguments), this.abi = s;
|
|
10
|
-
}
|
|
11
|
-
/**
|
|
12
|
-
* Check if a user is authorized (i.e. not denied)
|
|
13
|
-
*
|
|
14
|
-
* @public
|
|
15
|
-
* @async
|
|
16
|
-
* @param {Address} address - The address of the user
|
|
17
|
-
* @param {?ReadParams<typeof simpleDenyListAbi, 'isAllowed'>} [params]
|
|
18
|
-
* @returns {Promise<boolean>} - True if the user is authorized
|
|
19
|
-
*/
|
|
20
|
-
async isAllowed(b, a) {
|
|
21
|
-
return await o(this._config, {
|
|
22
|
-
address: this.assertValidAddress(),
|
|
23
|
-
args: [b, l],
|
|
24
|
-
...this.optionallyAttachAccount(),
|
|
25
|
-
// biome-ignore lint/suspicious/noExplicitAny: Accept any shape of valid wagmi/viem parameters, wagmi does the same thing internally
|
|
26
|
-
...a
|
|
27
|
-
});
|
|
28
|
-
}
|
|
29
|
-
/**
|
|
30
|
-
* Set the denied status of a user. The length of the `users_` and `denied_` arrays must be the same. This function can only be called by the owner
|
|
31
|
-
*
|
|
32
|
-
* @public
|
|
33
|
-
* @async
|
|
34
|
-
* @param {Address[]} addresses - The list of users to update
|
|
35
|
-
* @param {boolean[]} allowed - The denied status of each user
|
|
36
|
-
* @param {?WriteParams<typeof simpleDenyListAbi, 'setDenied'>} [params]
|
|
37
|
-
* @returns {unknown}
|
|
38
|
-
*/
|
|
39
|
-
async setDenied(b, a, f) {
|
|
40
|
-
return this.awaitResult(this.setDeniedRaw(b, a, f));
|
|
41
|
-
}
|
|
42
|
-
/**
|
|
43
|
-
* Set the denied status of a user. The length of the `users_` and `denied_` arrays must be the same. This function can only be called by the owner
|
|
44
|
-
*
|
|
45
|
-
* @public
|
|
46
|
-
* @async
|
|
47
|
-
* @param {Address[]} addresses - The list of users to update
|
|
48
|
-
* @param {boolean[]} allowed - The denied status of each user
|
|
49
|
-
* @param {?WriteParams<typeof simpleDenyListAbi, 'setDenied'>} [params]
|
|
50
|
-
* @returns {unknown}
|
|
51
|
-
*/
|
|
52
|
-
async setDeniedRaw(b, a, f) {
|
|
53
|
-
const { request: e, result: d } = await i(
|
|
54
|
-
this._config,
|
|
55
|
-
{
|
|
56
|
-
address: this.assertValidAddress(),
|
|
57
|
-
args: [b, a],
|
|
58
|
-
...this.optionallyAttachAccount(),
|
|
59
|
-
// biome-ignore lint/suspicious/noExplicitAny: Accept any shape of valid wagmi/viem parameters, wagmi does the same thing internally
|
|
60
|
-
...f
|
|
61
|
-
}
|
|
62
|
-
);
|
|
63
|
-
return { hash: await n(this._config, e), result: d };
|
|
64
|
-
}
|
|
65
|
-
// /**
|
|
66
|
-
// * A typed wrapper for (viem.getLogs)[https://viem.sh/docs/actions/public/getLogs#getlogs].
|
|
67
|
-
// * Accepts `eventName` and `eventNames` as optional parameters to narrow the returned log types.
|
|
68
|
-
// * @example
|
|
69
|
-
// * ```ts
|
|
70
|
-
// * const logs = contract.getLogs({ eventName: 'EventName' })
|
|
71
|
-
// * const logs = contract.getLogs({ eventNames: ['EventName'] })
|
|
72
|
-
// * ```
|
|
73
|
-
// * @public
|
|
74
|
-
// * @async
|
|
75
|
-
// * @template {ContractEventName<typeof simpleDenyListAbi>} event
|
|
76
|
-
// * @template {ExtractAbiEvent<
|
|
77
|
-
// * typeof simpleDenyListAbi,
|
|
78
|
-
// * event
|
|
79
|
-
// * >} [abiEvent=ExtractAbiEvent<typeof simpleDenyListAbi, event>]
|
|
80
|
-
// * @param {?Omit<
|
|
81
|
-
// * GetLogsParams<typeof simpleDenyListAbi, event, abiEvent, abiEvent[]>,
|
|
82
|
-
// * 'event' | 'events'
|
|
83
|
-
// * > & {
|
|
84
|
-
// * eventName?: event;
|
|
85
|
-
// * eventNames?: event[];
|
|
86
|
-
// * }} [params]
|
|
87
|
-
// * @returns {Promise<GetLogsReturnType<abiEvent, abiEvent[]>>}
|
|
88
|
-
// */
|
|
89
|
-
// public async getLogs<
|
|
90
|
-
// event extends ContractEventName<typeof simpleDenyListAbi>,
|
|
91
|
-
// const abiEvent extends ExtractAbiEvent<
|
|
92
|
-
// typeof simpleDenyListAbi,
|
|
93
|
-
// event
|
|
94
|
-
// > = ExtractAbiEvent<typeof simpleDenyListAbi, event>,
|
|
95
|
-
// >(
|
|
96
|
-
// params?: Omit<
|
|
97
|
-
// GetLogsParams<typeof simpleDenyListAbi, event, abiEvent, abiEvent[]>,
|
|
98
|
-
// 'event' | 'events'
|
|
99
|
-
// > & {
|
|
100
|
-
// eventName?: event;
|
|
101
|
-
// eventNames?: event[];
|
|
102
|
-
// },
|
|
103
|
-
// ): Promise<GetLogsReturnType<abiEvent, abiEvent[]>> {
|
|
104
|
-
// return getLogs(this._config.getClient({ chainId: params?.chainId }), {
|
|
105
|
-
// // biome-ignore lint/suspicious/noExplicitAny: Accept any shape of valid wag
|
|
106
|
-
// ...(params as any),
|
|
107
|
-
// ...(params?.eventName
|
|
108
|
-
// ? {
|
|
109
|
-
// event: getAbiItem({
|
|
110
|
-
// abi: simpleDenyListAbi,
|
|
111
|
-
// name: params.eventName,
|
|
112
|
-
// // biome-ignore lint/suspicious/noExplicitAny: awkward abi intersection issue
|
|
113
|
-
// } as any),
|
|
114
|
-
// }
|
|
115
|
-
// : {}),
|
|
116
|
-
// ...(params?.eventNames
|
|
117
|
-
// ? {
|
|
118
|
-
// events: params.eventNames.map((name) =>
|
|
119
|
-
// getAbiItem({
|
|
120
|
-
// abi: simpleDenyListAbi,
|
|
121
|
-
// name,
|
|
122
|
-
// // biome-ignore lint/suspicious/noExplicitAny: awkward abi intersection issue
|
|
123
|
-
// } as any),
|
|
124
|
-
// ),
|
|
125
|
-
// }
|
|
126
|
-
// : {}),
|
|
127
|
-
// address: this.assertValidAddress(),
|
|
128
|
-
// });
|
|
129
|
-
// }
|
|
130
|
-
// /**
|
|
131
|
-
// * A typed wrapper for `wagmi.watchContractEvent`
|
|
132
|
-
// *
|
|
133
|
-
// * @public
|
|
134
|
-
// * @async
|
|
135
|
-
// * @template {ContractEventName<typeof simpleDenyListAbi>} event
|
|
136
|
-
// * @param {(log: SimpleDenyListLog<event>) => unknown} cb
|
|
137
|
-
// * @param {?WatchParams<typeof simpleDenyListAbi, event> & {
|
|
138
|
-
// * eventName?: event;
|
|
139
|
-
// * }} [params]
|
|
140
|
-
// * @returns {unknown, params?: any) => unknown} Unsubscribe function
|
|
141
|
-
// */
|
|
142
|
-
// public async subscribe<
|
|
143
|
-
// event extends ContractEventName<typeof simpleDenyListAbi>,
|
|
144
|
-
// >(
|
|
145
|
-
// cb: (log: SimpleDenyListLog<event>) => unknown,
|
|
146
|
-
// params?: WatchParams<typeof simpleDenyListAbi, event> & {
|
|
147
|
-
// eventName?: event;
|
|
148
|
-
// },
|
|
149
|
-
// ) {
|
|
150
|
-
// return watchContractEvent<
|
|
151
|
-
// typeof this._config,
|
|
152
|
-
// (typeof this._config)['chains'][number]['id'],
|
|
153
|
-
// typeof simpleDenyListAbi,
|
|
154
|
-
// event
|
|
155
|
-
// >(this._config, {
|
|
156
|
-
// // biome-ignore lint/suspicious/noExplicitAny: Accept any shape of valid wagmi/viem parameters, wagmi does the same thing internally
|
|
157
|
-
// ...(params as any),
|
|
158
|
-
// eventName: params?.eventName,
|
|
159
|
-
// abi: simpleDenyListAbi,
|
|
160
|
-
// address: this.assertValidAddress(),
|
|
161
|
-
// onLogs: (logs) => {
|
|
162
|
-
// for (let l of logs) {
|
|
163
|
-
// cb(l as unknown as SimpleDenyListLog<event>);
|
|
164
|
-
// }
|
|
165
|
-
// },
|
|
166
|
-
// });
|
|
167
|
-
// }
|
|
168
|
-
/**
|
|
169
|
-
* @inheritdoc
|
|
170
|
-
*
|
|
171
|
-
* @public
|
|
172
|
-
* @param {?SimpleDenyListPayload} [_payload]
|
|
173
|
-
* @param {?DeployableOptions} [_options]
|
|
174
|
-
* @returns {GenericDeployableParams}
|
|
175
|
-
*/
|
|
176
|
-
buildParameters(b, a) {
|
|
177
|
-
var d;
|
|
178
|
-
const [f, e] = this.validateDeploymentConfig(
|
|
179
|
-
b,
|
|
180
|
-
a
|
|
181
|
-
);
|
|
182
|
-
if (!f.owner || f.owner === p) {
|
|
183
|
-
const t = e.account ? e.account.address : e.config ? h(e.config).address : (d = this._account) == null ? void 0 : d.address;
|
|
184
|
-
if (t)
|
|
185
|
-
f.owner = t;
|
|
186
|
-
else
|
|
187
|
-
throw new w();
|
|
188
|
-
}
|
|
189
|
-
return {
|
|
190
|
-
abi: s,
|
|
191
|
-
bytecode: g,
|
|
192
|
-
args: [A(f)],
|
|
193
|
-
...this.optionallyAttachAccount(e.account)
|
|
194
|
-
};
|
|
195
|
-
}
|
|
196
|
-
};
|
|
197
|
-
c.base = "0x41A7c1aCC75BEccD11B8F586510759883092460F", c.registryType = y.ALLOW_LIST;
|
|
198
|
-
let r = c;
|
|
1
|
+
import { g as a } from "../generated-CKt2yCQd.js";
|
|
2
|
+
import { S as y, p as n } from "../SimpleDenyList-CGaWjuld.js";
|
|
3
|
+
import "@wagmi/core";
|
|
4
|
+
import "viem";
|
|
5
|
+
import "../deployments-oykLv3_Z.js";
|
|
6
|
+
import "../Deployable/DeployableTargetWithRBAC.js";
|
|
7
|
+
import "../errors.js";
|
|
8
|
+
import "../utils.js";
|
|
199
9
|
export {
|
|
200
|
-
|
|
201
|
-
|
|
10
|
+
y as SimpleDenyList,
|
|
11
|
+
n as prepareSimpleDenyListPayload,
|
|
12
|
+
a as simpleDenyListAbi
|
|
202
13
|
};
|
|
203
14
|
//# sourceMappingURL=SimpleDenyList.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"SimpleDenyList.js","sources":["../../src/AllowLists/SimpleDenyList.ts"],"sourcesContent":["import {\n readSimpleDenyListIsAllowed,\n simpleDenyListAbi,\n simulateSimpleDenyListSetDenied,\n writeSimpleDenyListSetDenied,\n} from '@boostxyz/evm';\nimport { bytecode } from '@boostxyz/evm/artifacts/contracts/allowlists/SimpleDenyList.sol/SimpleDenyList.json';\nimport { getAccount } from '@wagmi/core';\nimport {\n type Address,\n type ContractEventName,\n type Hex,\n 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 SimpleDenyListPayload,\n type WriteParams,\n prepareSimpleDenyListPayload,\n} from '../utils';\n\nexport { simpleDenyListAbi };\nexport type { SimpleDenyListPayload };\n\n/**\n * A generic `viem.Log` event with support for `SimpleDenyList` event types.\n *\n * @export\n * @typedef {SimpleDenyListLog}\n * @template {ContractEventName<typeof simpleDenyListAbi>} [event=ContractEventName<\n * typeof simpleDenyListAbi\n * >]\n */\nexport type SimpleDenyListLog<\n event extends ContractEventName<typeof simpleDenyListAbi> = ContractEventName<\n typeof simpleDenyListAbi\n >,\n> = GenericLog<typeof simpleDenyListAbi, event>;\n\n/**\n * A simple implementation of an AllowList that implicitly allows all addresses except those explicitly added to the deny list\n *\n * @export\n * @class SimpleDenyList\n * @typedef {SimpleDenyList}\n * @extends {DeployableTarget<SimpleDenyListPayload>}\n */\nexport class SimpleDenyList extends DeployableTarget<\n SimpleDenyListPayload,\n typeof simpleDenyListAbi\n> {\n public override readonly abi = simpleDenyListAbi;\n /**\n * @inheritdoc\n *\n * @public\n * @static\n * @type {Address}\n */\n public static override base: Address = import.meta.env\n .VITE_SIMPLE_DENYLIST_BASE;\n /**\n * @inheritdoc\n *\n * @public\n * @static\n * @type {RegistryType}\n */\n public static override registryType: RegistryType = RegistryType.ALLOW_LIST;\n\n /**\n * Check if a user is authorized (i.e. not denied)\n *\n * @public\n * @async\n * @param {Address} address - The address of the user\n * @param {?ReadParams<typeof simpleDenyListAbi, 'isAllowed'>} [params]\n * @returns {Promise<boolean>} - True if the user is authorized\n */\n public async isAllowed(\n address: Address,\n params?: ReadParams<typeof simpleDenyListAbi, 'isAllowed'>,\n ): Promise<boolean> {\n return await readSimpleDenyListIsAllowed(this._config, {\n address: this.assertValidAddress(),\n args: [address, zeroHash],\n ...this.optionallyAttachAccount(),\n // biome-ignore lint/suspicious/noExplicitAny: Accept any shape of valid wagmi/viem parameters, wagmi does the same thing internally\n ...(params as any),\n });\n }\n\n /**\n * Set the denied status of a user. The length of the `users_` and `denied_` arrays must be the same. This function can only be called by the owner\n *\n * @public\n * @async\n * @param {Address[]} addresses - The list of users to update\n * @param {boolean[]} allowed - The denied status of each user\n * @param {?WriteParams<typeof simpleDenyListAbi, 'setDenied'>} [params]\n * @returns {unknown}\n */\n public async setDenied(\n addresses: Address[],\n allowed: boolean[],\n params?: WriteParams<typeof simpleDenyListAbi, 'setDenied'>,\n ) {\n return this.awaitResult(this.setDeniedRaw(addresses, allowed, params));\n }\n\n /**\n * Set the denied status of a user. The length of the `users_` and `denied_` arrays must be the same. This function can only be called by the owner\n *\n * @public\n * @async\n * @param {Address[]} addresses - The list of users to update\n * @param {boolean[]} allowed - The denied status of each user\n * @param {?WriteParams<typeof simpleDenyListAbi, 'setDenied'>} [params]\n * @returns {unknown}\n */\n public async setDeniedRaw(\n addresses: Address[],\n allowed: boolean[],\n params?: WriteParams<typeof simpleDenyListAbi, 'setDenied'>,\n ) {\n const { request, result } = await simulateSimpleDenyListSetDenied(\n this._config,\n {\n address: this.assertValidAddress(),\n args: [addresses, allowed],\n ...this.optionallyAttachAccount(),\n // biome-ignore lint/suspicious/noExplicitAny: Accept any shape of valid wagmi/viem parameters, wagmi does the same thing internally\n ...(params as any),\n },\n );\n const hash = await writeSimpleDenyListSetDenied(this._config, request);\n return { hash, result };\n }\n\n // /**\n // * A typed wrapper for (viem.getLogs)[https://viem.sh/docs/actions/public/getLogs#getlogs].\n // * Accepts `eventName` and `eventNames` as optional parameters to narrow the returned log types.\n // * @example\n // * ```ts\n // * const logs = contract.getLogs({ eventName: 'EventName' })\n // * const logs = contract.getLogs({ eventNames: ['EventName'] })\n // * ```\n // * @public\n // * @async\n // * @template {ContractEventName<typeof simpleDenyListAbi>} event\n // * @template {ExtractAbiEvent<\n // * typeof simpleDenyListAbi,\n // * event\n // * >} [abiEvent=ExtractAbiEvent<typeof simpleDenyListAbi, event>]\n // * @param {?Omit<\n // * GetLogsParams<typeof simpleDenyListAbi, event, abiEvent, abiEvent[]>,\n // * 'event' | 'events'\n // * > & {\n // * eventName?: event;\n // * eventNames?: event[];\n // * }} [params]\n // * @returns {Promise<GetLogsReturnType<abiEvent, abiEvent[]>>}\n // */\n // public async getLogs<\n // event extends ContractEventName<typeof simpleDenyListAbi>,\n // const abiEvent extends ExtractAbiEvent<\n // typeof simpleDenyListAbi,\n // event\n // > = ExtractAbiEvent<typeof simpleDenyListAbi, event>,\n // >(\n // params?: Omit<\n // GetLogsParams<typeof simpleDenyListAbi, event, abiEvent, abiEvent[]>,\n // 'event' | 'events'\n // > & {\n // eventName?: event;\n // eventNames?: event[];\n // },\n // ): Promise<GetLogsReturnType<abiEvent, abiEvent[]>> {\n // return getLogs(this._config.getClient({ chainId: params?.chainId }), {\n // // biome-ignore lint/suspicious/noExplicitAny: Accept any shape of valid wag\n // ...(params as any),\n // ...(params?.eventName\n // ? {\n // event: getAbiItem({\n // abi: simpleDenyListAbi,\n // name: params.eventName,\n // // biome-ignore lint/suspicious/noExplicitAny: awkward abi intersection issue\n // } as any),\n // }\n // : {}),\n // ...(params?.eventNames\n // ? {\n // events: params.eventNames.map((name) =>\n // getAbiItem({\n // abi: simpleDenyListAbi,\n // name,\n // // biome-ignore lint/suspicious/noExplicitAny: awkward abi intersection issue\n // } as any),\n // ),\n // }\n // : {}),\n // address: this.assertValidAddress(),\n // });\n // }\n\n // /**\n // * A typed wrapper for `wagmi.watchContractEvent`\n // *\n // * @public\n // * @async\n // * @template {ContractEventName<typeof simpleDenyListAbi>} event\n // * @param {(log: SimpleDenyListLog<event>) => unknown} cb\n // * @param {?WatchParams<typeof simpleDenyListAbi, event> & {\n // * eventName?: event;\n // * }} [params]\n // * @returns {unknown, params?: any) => unknown} Unsubscribe function\n // */\n // public async subscribe<\n // event extends ContractEventName<typeof simpleDenyListAbi>,\n // >(\n // cb: (log: SimpleDenyListLog<event>) => unknown,\n // params?: WatchParams<typeof simpleDenyListAbi, event> & {\n // eventName?: event;\n // },\n // ) {\n // return watchContractEvent<\n // typeof this._config,\n // (typeof this._config)['chains'][number]['id'],\n // typeof simpleDenyListAbi,\n // event\n // >(this._config, {\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 // eventName: params?.eventName,\n // abi: simpleDenyListAbi,\n // address: this.assertValidAddress(),\n // onLogs: (logs) => {\n // for (let l of logs) {\n // cb(l as unknown as SimpleDenyListLog<event>);\n // }\n // },\n // });\n // }\n\n /**\n * @inheritdoc\n *\n * @public\n * @param {?SimpleDenyListPayload} [_payload]\n * @param {?DeployableOptions} [_options]\n * @returns {GenericDeployableParams}\n */\n public override buildParameters(\n _payload?: SimpleDenyListPayload,\n _options?: DeployableOptions,\n ): GenericDeployableParams {\n const [payload, options] = this.validateDeploymentConfig(\n _payload,\n _options,\n );\n if (!payload.owner || payload.owner === zeroAddress) {\n const owner = options.account\n ? options.account.address\n : options.config\n ? getAccount(options.config).address\n : this._account?.address;\n if (owner) {\n payload.owner = owner;\n } else {\n throw new DeployableUnknownOwnerProvidedError();\n }\n }\n return {\n abi: simpleDenyListAbi,\n bytecode: bytecode as Hex,\n args: [prepareSimpleDenyListPayload(payload)],\n ...this.optionallyAttachAccount(options.account),\n };\n }\n}\n"],"names":["_SimpleDenyList","DeployableTarget","simpleDenyListAbi","address","params","readSimpleDenyListIsAllowed","zeroHash","addresses","allowed","request","result","simulateSimpleDenyListSetDenied","writeSimpleDenyListSetDenied","_payload","_options","payload","options","zeroAddress","owner","getAccount","_a","DeployableUnknownOwnerProvidedError","bytecode","prepareSimpleDenyListPayload","RegistryType","SimpleDenyList"],"mappings":";;;;;;kuRAwDaA,IAAN,MAAMA,UAAuBC,EAGlC;AAAA,EAHK,cAAA;AAAA,UAAA,GAAA,SAAA,GAIL,KAAyB,MAAMC;AAAAA,EAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,EA4B/B,MAAa,UACXC,GACAC,GACkB;AACX,WAAA,MAAMC,EAA4B,KAAK,SAAS;AAAA,MACrD,SAAS,KAAK,mBAAmB;AAAA,MACjC,MAAM,CAACF,GAASG,CAAQ;AAAA,MACxB,GAAG,KAAK,wBAAwB;AAAA;AAAA,MAEhC,GAAIF;AAAA,IAAA,CACL;AAAA,EACH;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,EAYA,MAAa,UACXG,GACAC,GACAJ,GACA;AACA,WAAO,KAAK,YAAY,KAAK,aAAaG,GAAWC,GAASJ,CAAM,CAAC;AAAA,EACvE;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,EAYA,MAAa,aACXG,GACAC,GACAJ,GACA;AACA,UAAM,EAAE,SAAAK,GAAS,QAAAC,EAAO,IAAI,MAAMC;AAAAA,MAChC,KAAK;AAAA,MACL;AAAA,QACE,SAAS,KAAK,mBAAmB;AAAA,QACjC,MAAM,CAACJ,GAAWC,CAAO;AAAA,QACzB,GAAG,KAAK,wBAAwB;AAAA;AAAA,QAEhC,GAAIJ;AAAA,MACN;AAAA,IAAA;AAGK,WAAA,EAAE,MADI,MAAMQ,EAA6B,KAAK,SAASH,CAAO,GACtD,QAAAC;EACjB;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,EAmHgB,gBACdG,GACAC,GACyB;;AACzB,UAAM,CAACC,GAASC,CAAO,IAAI,KAAK;AAAA,MAC9BH;AAAA,MACAC;AAAA,IAAA;AAEF,QAAI,CAACC,EAAQ,SAASA,EAAQ,UAAUE,GAAa;AACnD,YAAMC,IAAQF,EAAQ,UAClBA,EAAQ,QAAQ,UAChBA,EAAQ,SACNG,EAAWH,EAAQ,MAAM,EAAE,WAC3BI,IAAA,KAAK,aAAL,gBAAAA,EAAe;AACrB,UAAIF;AACF,QAAAH,EAAQ,QAAQG;AAAA;AAEhB,cAAM,IAAIG,EAAoC;AAAA,IAElD;AACO,WAAA;AAAA,MACL,KAAKnB;AAAAA,MACL,UAAAoB;AAAA,MACA,MAAM,CAACC,EAA6BR,CAAO,CAAC;AAAA,MAC5C,GAAG,KAAK,wBAAwBC,EAAQ,OAAO;AAAA,IAAA;AAAA,EAEnD;AACF;AA5NyBhB,EAAA,OAAgB,8CASvCA,EAAuB,eAA6BwB,EAAa;AArB5D,IAAMC,IAANzB;"}
|
|
1
|
+
{"version":3,"file":"SimpleDenyList.js","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;;;;;"}
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const f=require("../generated-
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const f=require("../generated-CyTNlOwM.cjs"),a=require("../Deployable/Deployable.cjs"),s="0x6080604052348015600e575f80fd5b506101598061001c5f395ff3fe608060405234801561000f575f80fd5b5060043610610029575f3560e01c8063fe9fbb801461002d575b5f80fd5b610047600480360381019061004291906100c5565b61005d565b604051610054919061010a565b60405180910390f35b5f60019050919050565b5f80fd5b5f73ffffffffffffffffffffffffffffffffffffffff82169050919050565b5f6100948261006b565b9050919050565b6100a48161008a565b81146100ae575f80fd5b50565b5f813590506100bf8161009b565b92915050565b5f602082840312156100da576100d9610067565b5b5f6100e7848285016100b1565b91505092915050565b5f8115159050919050565b610104816100f0565b82525050565b5f60208201905061011d5f8301846100fb565b9291505056fea2646970667358221220d69fb5c3af806c7aa7833655670f5929f23f7d101298880775d4b9c7c8d0e62f64736f6c634300081a0033";class d extends a.Deployable{constructor(){super(...arguments),this.abi=f.xe}async isAuthorized(b,e){return await f.pg(this._config,{address:this.assertValidAddress(),args:[b],...e})}buildParameters(b,e){const[o,t]=this.validateDeploymentConfig({},e);return{abi:f.xe,bytecode:s,args:[],...this.optionallyAttachAccount(t.account)}}}exports.passthroughAuthAbi=f.xe;exports.PassthroughAuth=d;
|
|
2
2
|
//# sourceMappingURL=PassthroughAuth.cjs.map
|