@boostxyz/sdk 0.0.0-alpha.12 → 0.0.0-alpha.13
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.js +1 -1
- package/dist/Actions/ContractAction.d.ts +2 -2
- package/dist/Actions/ContractAction.d.ts.map +1 -1
- package/dist/Actions/ERC721MintAction.d.ts +2 -2
- 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 +2 -2
- package/dist/Actions/EventAction.d.ts.map +1 -1
- package/dist/Actions/EventAction.js +47 -43
- package/dist/Actions/EventAction.js.map +1 -1
- package/dist/AllowLists/AllowList.cjs +1 -1
- package/dist/AllowLists/AllowList.js +2 -2
- package/dist/AllowLists/SimpleAllowList.cjs +1 -1
- package/dist/AllowLists/SimpleAllowList.cjs.map +1 -1
- package/dist/AllowLists/SimpleAllowList.d.ts +2 -2
- package/dist/AllowLists/SimpleAllowList.d.ts.map +1 -1
- package/dist/AllowLists/SimpleAllowList.js +23 -19
- package/dist/AllowLists/SimpleAllowList.js.map +1 -1
- package/dist/AllowLists/SimpleDenyList.cjs +1 -1
- package/dist/AllowLists/SimpleDenyList.d.ts +2 -2
- package/dist/AllowLists/SimpleDenyList.d.ts.map +1 -1
- package/dist/AllowLists/SimpleDenyList.js +6 -5
- package/dist/AllowLists/SimpleDenyList.js.map +1 -1
- package/dist/Auth/PassthroughAuth.cjs +1 -1
- package/dist/Auth/PassthroughAuth.js +1 -1
- package/dist/BoostCore.cjs +2 -2
- package/dist/BoostCore.cjs.map +1 -1
- package/dist/BoostCore.d.ts +27 -5
- package/dist/BoostCore.d.ts.map +1 -1
- package/dist/BoostCore.js +438 -347
- 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 +26 -5
- package/dist/BoostRegistry.d.ts.map +1 -1
- package/dist/BoostRegistry.js +125 -64
- package/dist/BoostRegistry.js.map +1 -1
- package/dist/Budgets/Budget.cjs +1 -1
- package/dist/Budgets/Budget.js +1 -1
- package/dist/Budgets/ManagedBudget.cjs +1 -1
- package/dist/Budgets/ManagedBudget.cjs.map +1 -1
- package/dist/Budgets/ManagedBudget.d.ts +2 -2
- package/dist/Budgets/ManagedBudget.d.ts.map +1 -1
- package/dist/Budgets/ManagedBudget.js +41 -37
- package/dist/Budgets/ManagedBudget.js.map +1 -1
- package/dist/Budgets/SimpleBudget.d.ts +2 -2
- package/dist/Budgets/SimpleBudget.d.ts.map +1 -1
- package/dist/Budgets/VestingBudget.d.ts +2 -2
- package/dist/Budgets/VestingBudget.d.ts.map +1 -1
- package/dist/Deployable/DeployableTarget.cjs +1 -1
- package/dist/Deployable/DeployableTarget.cjs.map +1 -1
- package/dist/Deployable/DeployableTarget.d.ts +6 -6
- package/dist/Deployable/DeployableTarget.d.ts.map +1 -1
- package/dist/Deployable/DeployableTarget.js +22 -17
- package/dist/Deployable/DeployableTarget.js.map +1 -1
- package/dist/Incentives/AllowListIncentive.cjs +1 -1
- package/dist/Incentives/AllowListIncentive.cjs.map +1 -1
- package/dist/Incentives/AllowListIncentive.d.ts +2 -2
- package/dist/Incentives/AllowListIncentive.d.ts.map +1 -1
- package/dist/Incentives/AllowListIncentive.js +17 -13
- 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 +14 -2
- package/dist/Incentives/CGDAIncentive.d.ts.map +1 -1
- package/dist/Incentives/CGDAIncentive.js +27 -23
- package/dist/Incentives/CGDAIncentive.js.map +1 -1
- package/dist/Incentives/ERC1155Incentive.d.ts +2 -2
- 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 +2 -2
- package/dist/Incentives/ERC20Incentive.d.ts.map +1 -1
- package/dist/Incentives/ERC20Incentive.js +17 -13
- package/dist/Incentives/ERC20Incentive.js.map +1 -1
- package/dist/Incentives/ERC20VariableIncentive.d.ts +2 -2
- 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.js +32 -28
- 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 +2 -2
- package/dist/Incentives/PointsIncentive.d.ts.map +1 -1
- package/dist/Incentives/PointsIncentive.js +13 -9
- package/dist/Incentives/PointsIncentive.js.map +1 -1
- package/dist/{SimpleDenyList-IJ9Ipya7.js → SimpleDenyList-C21O9Yfi.js} +23 -19
- package/dist/SimpleDenyList-C21O9Yfi.js.map +1 -0
- package/dist/SimpleDenyList-DeJRKD2D.cjs +2 -0
- package/dist/{SimpleDenyList-IJ9Ipya7.js.map → SimpleDenyList-DeJRKD2D.cjs.map} +1 -1
- package/dist/Validators/SignerValidator.cjs +1 -1
- package/dist/Validators/SignerValidator.cjs.map +1 -1
- package/dist/Validators/SignerValidator.d.ts +2 -2
- package/dist/Validators/SignerValidator.d.ts.map +1 -1
- package/dist/Validators/SignerValidator.js +18 -14
- package/dist/Validators/SignerValidator.js.map +1 -1
- package/dist/Validators/Validator.cjs +1 -1
- package/dist/Validators/Validator.js +1 -1
- package/dist/deployments-BvFcK_eR.js +40 -0
- package/dist/deployments-BvFcK_eR.js.map +1 -0
- package/dist/deployments-Ho4PnGCS.cjs +2 -0
- package/dist/deployments-Ho4PnGCS.cjs.map +1 -0
- package/dist/deployments.json +38 -0
- package/dist/errors.cjs +1 -1
- package/dist/errors.cjs.map +1 -1
- package/dist/errors.d.ts +6 -0
- package/dist/errors.d.ts.map +1 -1
- package/dist/errors.js +70 -54
- package/dist/errors.js.map +1 -1
- package/dist/{generated-HGddZXHJ.js → generated-LpgSHrH0.js} +130 -90
- package/dist/generated-LpgSHrH0.js.map +1 -0
- package/dist/generated-tq_HLZJ0.cjs +3 -0
- package/dist/generated-tq_HLZJ0.cjs.map +1 -0
- package/dist/index.cjs +1 -1
- package/dist/index.js +113 -109
- package/dist/utils.cjs +1 -1
- package/dist/utils.cjs.map +1 -1
- package/dist/utils.d.ts +25 -11
- package/dist/utils.d.ts.map +1 -1
- package/dist/utils.js +38 -23
- package/dist/utils.js.map +1 -1
- package/package.json +6 -5
- package/src/Actions/ContractAction.ts +5 -3
- package/src/Actions/ERC721MintAction.ts +5 -3
- package/src/Actions/EventAction.ts +6 -2
- package/src/AllowLists/AllowList.test.ts +1 -1
- package/src/AllowLists/SimpleAllowList.ts +6 -3
- package/src/AllowLists/SimpleDenyList.ts +6 -3
- package/src/BoostCore.test.ts +31 -91
- package/src/BoostCore.ts +137 -34
- package/src/BoostRegistry.ts +89 -21
- package/src/Budgets/ManagedBudget.ts +6 -4
- package/src/Budgets/SimpleBudget.ts +4 -3
- package/src/Budgets/VestingBudget.ts +4 -3
- package/src/Deployable/DeployableTarget.ts +22 -11
- package/src/Incentives/AllowListIncentive.ts +6 -3
- package/src/Incentives/CGDAIncentive.ts +6 -3
- package/src/Incentives/ERC1155Incentive.ts +4 -3
- package/src/Incentives/ERC20Incentive.ts +6 -3
- package/src/Incentives/ERC20VariableIncentive.ts +6 -3
- package/src/Incentives/PointsIncentive.ts +6 -3
- package/src/Validators/SignerValidator.ts +6 -3
- package/src/errors.ts +17 -1
- package/src/utils.ts +60 -11
- package/dist/SimpleDenyList-CqT0BMP7.cjs +0 -2
- package/dist/SimpleDenyList-CqT0BMP7.cjs.map +0 -1
- package/dist/generated-HGddZXHJ.js.map +0 -1
- package/dist/generated-wKBNvm48.cjs +0 -3
- package/dist/generated-wKBNvm48.cjs.map +0 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"DeployableTarget.cjs","sources":["../../src/Deployable/DeployableTarget.ts"],"sourcesContent":["import {\n type aCloneableAbi,\n readACloneableGetComponentInterface
|
|
1
|
+
{"version":3,"file":"DeployableTarget.cjs","sources":["../../src/Deployable/DeployableTarget.ts"],"sourcesContent":["import {\n type aCloneableAbi,\n readACloneableGetComponentInterface,\n readACloneableSupportsInterface,\n} from '@boostxyz/evm';\nimport { deployContract } from '@wagmi/core';\nimport {\n type Abi,\n type Address,\n type Hash,\n type Hex,\n type WaitForTransactionReceiptParameters,\n isAddress,\n isAddressEqual,\n zeroAddress,\n} from 'viem';\nimport {\n DeployableAlreadyDeployedError,\n DeployableMissingPayloadError,\n} from '../errors';\nimport { type ReadParams, RegistryType } from '../utils';\nimport {\n Deployable,\n type DeployableOptions,\n type DeployablePayloadOrAddress,\n} from './Deployable';\n\n/**\n * A base class representing a generic base Boost Protocol target contract, extended by Actions, AllowLists, Budgets, Incentives, and Validators.\n *\n * @export\n * @class DeployableTarget\n * @typedef {DeployableTarget}\n * @template [Payload=unknown]\n * @extends {Deployable<Payload>}\n */\nexport class DeployableTarget<\n Payload,\n ContractAbi extends Abi,\n> extends Deployable<Payload, ContractAbi> {\n /**\n * A static property representing a map of stringified chain ID's to the address of the base implementation on chain, used when cloning base contracts.\n *\n * @static\n * @readonly\n * @type {Record<string, Address>}\n */\n static readonly bases: Record<number, Address> = {};\n /**\n * The target's registry type.\n *\n * @static\n * @readonly\n * @type {RegistryType}\n */\n static readonly registryType: RegistryType = RegistryType.ACTION;\n /**\n * A property asserting that the protocol should eiher clone and initialize a new target from the base implementation, or re-use an existing contract without initializing.\n *\n * @readonly\n * @type {boolean}\n */\n protected _isBase = true;\n get isBase() {\n if (\n !!this.address &&\n Object.values(this.bases).some((base) =>\n // biome-ignore lint/style/noNonNullAssertion: won't evaluate this if address checked and defined above\n isAddressEqual(this.address!, base),\n )\n )\n return true;\n return this._isBase;\n }\n\n /**\n * Creates an instance of DeployableTarget.\n *\n * @constructor\n * @param {DeployableOptions} options\n * @param {DeployablePayloadOrAddress<Payload>} payload - Either a given implementation's initialization payload, or an address to an existing on chain target.\n * @param {?boolean} [isBase] - A property asserting that the protocol should eiher clone and initialize a new target from the base implementation, or re-use an existing contract without initializing.\n */\n constructor(\n options: DeployableOptions,\n payload?: DeployablePayloadOrAddress<Payload>,\n isBase?: boolean,\n ) {\n super(options, payload);\n // if supplying a custom address, safe enough to assume it is not a base address which makes reusing contracts like budgets easier\n if (\n typeof payload === 'string' &&\n isAddress(payload) &&\n payload !== zeroAddress &&\n !Object.values(this.bases).some((base) => {\n if (!payload || !base) return false;\n return isAddressEqual(payload, base);\n })\n )\n isBase = false;\n if (isBase !== undefined) this._isBase = isBase;\n }\n\n /**\n * A getter that will return the base implementation's static addresses by numerical chain ID\n *\n * @public\n * @readonly\n * @type {Record<number, Address>}\n */\n public get bases(): Record<number, Address> {\n return (this.constructor as typeof DeployableTarget).bases;\n }\n\n /**\n * A getter that returns the registry type of the base implementation\n *\n * @public\n * @readonly\n * @type {RegistryType}\n */\n public get registryType(): RegistryType {\n return (this.constructor as typeof DeployableTarget).registryType;\n }\n\n /**\n * @inheritdoc\n *\n * @public\n * @async\n * @param {?Payload} [payload]\n * @param {?DeployableOptions} [options]\n * @param {?Omit<WaitForTransactionReceiptParameters, 'hash'>} [waitParams]\n * @returns {unknown}\n */\n protected override async deploy(\n payload?: Payload,\n options?: DeployableOptions,\n waitParams?: Omit<WaitForTransactionReceiptParameters, 'hash'>,\n ) {\n await super.deploy(payload, options, waitParams);\n this.assertValidAddress();\n return this;\n }\n\n /**\n * @inheritdoc\n *\n * @public\n * @async\n * @param {?Payload} [_payload]\n * @param {?DeployableOptions} [_options]\n * @returns {Promise<Hash>}\n */\n protected override async deployRaw(\n _payload?: Payload,\n _options?: DeployableOptions,\n ): Promise<Hash> {\n if (this.address) throw new DeployableAlreadyDeployedError(this.address);\n const payload = _payload || this._payload;\n const config = _options?.config || this._config;\n const { args, ...deployment } = this.buildParameters(payload);\n return await deployContract(config, {\n ...deployment,\n ...this.optionallyAttachAccount(_options?.account),\n // Deployable targets don't construct with arguments, they initialize with encoded payloads\n args: [],\n });\n }\n\n /**\n * Check if the contract supports the given interface\n *\n * @public\n * @async\n * @param {Hex} interfaceId - The interface identifier\n * @param {?ReadParams<typeof contractActionAbi, 'supportsInterface'>} [params]\n * @returns {unknown} - True if the contract supports the interface\n */\n public async supportsInterface(\n interfaceId: Hex,\n params?: ReadParams<typeof aCloneableAbi, 'supportsInterface'>,\n ) {\n return await readACloneableSupportsInterface(this._config, {\n address: this.assertValidAddress(),\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 args: [interfaceId],\n });\n }\n\n /**\n * Return a cloneable's unique identifier for downstream consumers to differentiate various targets\n * All implementations must override this function\n *\n * @public\n * @async\n * @param {?ReadParams<typeof contractActionAbi, 'getComponentInterface'>} [params]\n * @returns {unknown}\n */\n public async getComponentInterface(\n params?: ReadParams<typeof aCloneableAbi, 'getComponentInterface'>,\n ) {\n return await readACloneableGetComponentInterface(this._config, {\n address: this.assertValidAddress(),\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 args: [],\n });\n }\n\n /**\n * @inheritdoc\n *\n * @protected\n * @template [P=Payload]\n * @param {?P} [_payload]\n * @param {?DeployableOptions} [_options]\n * @returns {[P, DeployableOptions]}\n */\n protected override validateDeploymentConfig<P = Payload>(\n _payload?: P,\n _options?: DeployableOptions,\n ) {\n const payload = _payload || this._payload;\n if (!payload) throw new DeployableMissingPayloadError();\n return super.validateDeploymentConfig(payload, _options) as [\n P,\n DeployableOptions,\n ];\n }\n}\n"],"names":["_DeployableTarget","Deployable","options","payload","isBase","isAddress","zeroAddress","base","isAddressEqual","waitParams","_payload","_options","DeployableAlreadyDeployedError","config","args","deployment","deployContract","interfaceId","params","readACloneableSupportsInterface","readACloneableGetComponentInterface","DeployableMissingPayloadError","RegistryType","DeployableTarget"],"mappings":"2PAoCaA,EAAN,MAAMA,UAGHC,EAAAA,UAAiC,CA4CzC,YACEC,EACAC,EACAC,EACA,CACA,MAAMF,EAASC,CAAO,EA1BxB,KAAU,QAAU,GA6BhB,OAAOA,GAAY,UACnBE,EAAU,UAAAF,CAAO,GACjBA,IAAYG,EAAAA,aACZ,CAAC,OAAO,OAAO,KAAK,KAAK,EAAE,KAAMC,GAC3B,CAACJ,GAAW,CAACI,EAAa,GACvBC,EAAA,eAAeL,EAASI,CAAI,CACpC,IAEQH,EAAA,IACPA,IAAW,SAAW,KAAK,QAAUA,EAC3C,CAtCA,IAAI,QAAS,CAET,OAAE,KAAK,SACP,OAAO,OAAO,KAAK,KAAK,EAAE,KAAMG,GAE9BC,iBAAe,KAAK,QAAUD,CAAI,CACpC,EAEO,GACF,KAAK,OACd,CAqCA,IAAW,OAAiC,CAC1C,OAAQ,KAAK,YAAwC,KACvD,CASA,IAAW,cAA6B,CACtC,OAAQ,KAAK,YAAwC,YACvD,CAYA,MAAyB,OACvBJ,EACAD,EACAO,EACA,CACA,aAAM,MAAM,OAAON,EAASD,EAASO,CAAU,EAC/C,KAAK,mBAAmB,EACjB,IACT,CAWA,MAAyB,UACvBC,EACAC,EACe,CACf,GAAI,KAAK,QAAe,MAAA,IAAIC,EAA+B,+BAAA,KAAK,OAAO,EACjE,MAAAT,EAAUO,GAAY,KAAK,SAC3BG,GAASF,GAAA,YAAAA,EAAU,SAAU,KAAK,QAClC,CAAE,KAAAG,EAAM,GAAGC,GAAe,KAAK,gBAAgBZ,CAAO,EACrD,OAAA,MAAMa,iBAAeH,EAAQ,CAClC,GAAGE,EACH,GAAG,KAAK,wBAAwBJ,GAAA,YAAAA,EAAU,OAAO,EAEjD,KAAM,CAAC,CAAA,CACR,CACH,CAWA,MAAa,kBACXM,EACAC,EACA,CACO,OAAA,MAAMC,EAAAA,GAAgC,KAAK,QAAS,CACzD,QAAS,KAAK,mBAAmB,EACjC,GAAG,KAAK,wBAAwB,EAEhC,GAAID,EACJ,KAAM,CAACD,CAAW,CAAA,CACnB,CACH,CAWA,MAAa,sBACXC,EACA,CACO,OAAA,MAAME,EAAAA,GAAoC,KAAK,QAAS,CAC7D,QAAS,KAAK,mBAAmB,EACjC,GAAG,KAAK,wBAAwB,EAEhC,GAAIF,EACJ,KAAM,CAAC,CAAA,CACR,CACH,CAWmB,yBACjBR,EACAC,EACA,CACM,MAAAR,EAAUO,GAAY,KAAK,SACjC,GAAI,CAACP,EAAS,MAAM,IAAIkB,EAA8B,8BAC/C,OAAA,MAAM,yBAAyBlB,EAASQ,CAAQ,CAIzD,CACF,EA1LEX,EAAgB,MAAiC,GAQjDA,EAAgB,aAA6BsB,EAAa,aAAA,OAnBrD,IAAMC,EAANvB"}
|
|
@@ -13,13 +13,13 @@ import { Deployable, type DeployableOptions, type DeployablePayloadOrAddress } f
|
|
|
13
13
|
*/
|
|
14
14
|
export declare class DeployableTarget<Payload, ContractAbi extends Abi> extends Deployable<Payload, ContractAbi> {
|
|
15
15
|
/**
|
|
16
|
-
* A static property representing the address of the base implementation on chain, used when cloning base contracts.
|
|
16
|
+
* A static property representing a map of stringified chain ID's to the address of the base implementation on chain, used when cloning base contracts.
|
|
17
17
|
*
|
|
18
18
|
* @static
|
|
19
19
|
* @readonly
|
|
20
|
-
* @type {Address}
|
|
20
|
+
* @type {Record<string, Address>}
|
|
21
21
|
*/
|
|
22
|
-
static readonly
|
|
22
|
+
static readonly bases: Record<number, Address>;
|
|
23
23
|
/**
|
|
24
24
|
* The target's registry type.
|
|
25
25
|
*
|
|
@@ -46,13 +46,13 @@ export declare class DeployableTarget<Payload, ContractAbi extends Abi> extends
|
|
|
46
46
|
*/
|
|
47
47
|
constructor(options: DeployableOptions, payload?: DeployablePayloadOrAddress<Payload>, isBase?: boolean);
|
|
48
48
|
/**
|
|
49
|
-
* A getter that will return the base implementation's static
|
|
49
|
+
* A getter that will return the base implementation's static addresses by numerical chain ID
|
|
50
50
|
*
|
|
51
51
|
* @public
|
|
52
52
|
* @readonly
|
|
53
|
-
* @type {Address}
|
|
53
|
+
* @type {Record<number, Address>}
|
|
54
54
|
*/
|
|
55
|
-
get
|
|
55
|
+
get bases(): Record<number, Address>;
|
|
56
56
|
/**
|
|
57
57
|
* A getter that returns the registry type of the base implementation
|
|
58
58
|
*
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"DeployableTarget.d.ts","sourceRoot":"","sources":["../../src/Deployable/DeployableTarget.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,KAAK,aAAa,EAGnB,MAAM,eAAe,CAAC;AAEvB,OAAO,EACL,KAAK,GAAG,EACR,KAAK,OAAO,EACZ,KAAK,IAAI,EACT,KAAK,GAAG,EACR,KAAK,mCAAmC,
|
|
1
|
+
{"version":3,"file":"DeployableTarget.d.ts","sourceRoot":"","sources":["../../src/Deployable/DeployableTarget.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,KAAK,aAAa,EAGnB,MAAM,eAAe,CAAC;AAEvB,OAAO,EACL,KAAK,GAAG,EACR,KAAK,OAAO,EACZ,KAAK,IAAI,EACT,KAAK,GAAG,EACR,KAAK,mCAAmC,EAIzC,MAAM,MAAM,CAAC;AAKd,OAAO,EAAE,KAAK,UAAU,EAAE,YAAY,EAAE,MAAM,UAAU,CAAC;AACzD,OAAO,EACL,UAAU,EACV,KAAK,iBAAiB,EACtB,KAAK,0BAA0B,EAChC,MAAM,cAAc,CAAC;AAEtB;;;;;;;;GAQG;AACH,qBAAa,gBAAgB,CAC3B,OAAO,EACP,WAAW,SAAS,GAAG,CACvB,SAAQ,UAAU,CAAC,OAAO,EAAE,WAAW,CAAC;IACxC;;;;;;OAMG;IACH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../generated-LpgSHrH0.js";
|
|
2
2
|
import { deployContract as h } from "@wagmi/core";
|
|
3
|
-
import { isAddress as
|
|
4
|
-
import { DeployableAlreadyDeployedError as
|
|
5
|
-
import { RegistryType as
|
|
3
|
+
import { isAddress as u, zeroAddress as l, isAddressEqual as a } from "viem";
|
|
4
|
+
import { DeployableAlreadyDeployedError as y, DeployableMissingPayloadError as f } from "../errors.js";
|
|
5
|
+
import { RegistryType as m } from "../utils.js";
|
|
6
6
|
import { Deployable as p } from "./Deployable.js";
|
|
7
|
-
const
|
|
7
|
+
const i = class i extends p {
|
|
8
8
|
/**
|
|
9
9
|
* Creates an instance of DeployableTarget.
|
|
10
10
|
*
|
|
@@ -14,20 +14,25 @@ const e = class e extends p {
|
|
|
14
14
|
* @param {?boolean} [isBase] - A property asserting that the protocol should eiher clone and initialize a new target from the base implementation, or re-use an existing contract without initializing.
|
|
15
15
|
*/
|
|
16
16
|
constructor(t, s, r) {
|
|
17
|
-
super(t, s), this._isBase = !0, typeof s == "string" &&
|
|
17
|
+
super(t, s), this._isBase = !0, typeof s == "string" && u(s) && s !== l && !Object.values(this.bases).some((e) => !s || !e ? !1 : a(s, e)) && (r = !1), r !== void 0 && (this._isBase = r);
|
|
18
18
|
}
|
|
19
19
|
get isBase() {
|
|
20
|
-
return this.address &&
|
|
20
|
+
return this.address && Object.values(this.bases).some(
|
|
21
|
+
(t) => (
|
|
22
|
+
// biome-ignore lint/style/noNonNullAssertion: won't evaluate this if address checked and defined above
|
|
23
|
+
a(this.address, t)
|
|
24
|
+
)
|
|
25
|
+
) ? !0 : this._isBase;
|
|
21
26
|
}
|
|
22
27
|
/**
|
|
23
|
-
* A getter that will return the base implementation's static
|
|
28
|
+
* A getter that will return the base implementation's static addresses by numerical chain ID
|
|
24
29
|
*
|
|
25
30
|
* @public
|
|
26
31
|
* @readonly
|
|
27
|
-
* @type {Address}
|
|
32
|
+
* @type {Record<number, Address>}
|
|
28
33
|
*/
|
|
29
|
-
get
|
|
30
|
-
return this.constructor.
|
|
34
|
+
get bases() {
|
|
35
|
+
return this.constructor.bases;
|
|
31
36
|
}
|
|
32
37
|
/**
|
|
33
38
|
* A getter that returns the registry type of the base implementation
|
|
@@ -63,9 +68,9 @@ const e = class e extends p {
|
|
|
63
68
|
*/
|
|
64
69
|
async deployRaw(t, s) {
|
|
65
70
|
if (this.address)
|
|
66
|
-
throw new
|
|
67
|
-
const r = t || this._payload,
|
|
68
|
-
return await h(
|
|
71
|
+
throw new y(this.address);
|
|
72
|
+
const r = t || this._payload, e = (s == null ? void 0 : s.config) || this._config, { args: g, ...n } = this.buildParameters(r);
|
|
73
|
+
return await h(e, {
|
|
69
74
|
...n,
|
|
70
75
|
...this.optionallyAttachAccount(s == null ? void 0 : s.account),
|
|
71
76
|
// Deployable targets don't construct with arguments, they initialize with encoded payloads
|
|
@@ -124,9 +129,9 @@ const e = class e extends p {
|
|
|
124
129
|
return super.validateDeploymentConfig(r, s);
|
|
125
130
|
}
|
|
126
131
|
};
|
|
127
|
-
|
|
128
|
-
let
|
|
132
|
+
i.bases = {}, i.registryType = m.ACTION;
|
|
133
|
+
let o = i;
|
|
129
134
|
export {
|
|
130
|
-
|
|
135
|
+
o as DeployableTarget
|
|
131
136
|
};
|
|
132
137
|
//# sourceMappingURL=DeployableTarget.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"DeployableTarget.js","sources":["../../src/Deployable/DeployableTarget.ts"],"sourcesContent":["import {\n type aCloneableAbi,\n readACloneableGetComponentInterface
|
|
1
|
+
{"version":3,"file":"DeployableTarget.js","sources":["../../src/Deployable/DeployableTarget.ts"],"sourcesContent":["import {\n type aCloneableAbi,\n readACloneableGetComponentInterface,\n readACloneableSupportsInterface,\n} from '@boostxyz/evm';\nimport { deployContract } from '@wagmi/core';\nimport {\n type Abi,\n type Address,\n type Hash,\n type Hex,\n type WaitForTransactionReceiptParameters,\n isAddress,\n isAddressEqual,\n zeroAddress,\n} from 'viem';\nimport {\n DeployableAlreadyDeployedError,\n DeployableMissingPayloadError,\n} from '../errors';\nimport { type ReadParams, RegistryType } from '../utils';\nimport {\n Deployable,\n type DeployableOptions,\n type DeployablePayloadOrAddress,\n} from './Deployable';\n\n/**\n * A base class representing a generic base Boost Protocol target contract, extended by Actions, AllowLists, Budgets, Incentives, and Validators.\n *\n * @export\n * @class DeployableTarget\n * @typedef {DeployableTarget}\n * @template [Payload=unknown]\n * @extends {Deployable<Payload>}\n */\nexport class DeployableTarget<\n Payload,\n ContractAbi extends Abi,\n> extends Deployable<Payload, ContractAbi> {\n /**\n * A static property representing a map of stringified chain ID's to the address of the base implementation on chain, used when cloning base contracts.\n *\n * @static\n * @readonly\n * @type {Record<string, Address>}\n */\n static readonly bases: Record<number, Address> = {};\n /**\n * The target's registry type.\n *\n * @static\n * @readonly\n * @type {RegistryType}\n */\n static readonly registryType: RegistryType = RegistryType.ACTION;\n /**\n * A property asserting that the protocol should eiher clone and initialize a new target from the base implementation, or re-use an existing contract without initializing.\n *\n * @readonly\n * @type {boolean}\n */\n protected _isBase = true;\n get isBase() {\n if (\n !!this.address &&\n Object.values(this.bases).some((base) =>\n // biome-ignore lint/style/noNonNullAssertion: won't evaluate this if address checked and defined above\n isAddressEqual(this.address!, base),\n )\n )\n return true;\n return this._isBase;\n }\n\n /**\n * Creates an instance of DeployableTarget.\n *\n * @constructor\n * @param {DeployableOptions} options\n * @param {DeployablePayloadOrAddress<Payload>} payload - Either a given implementation's initialization payload, or an address to an existing on chain target.\n * @param {?boolean} [isBase] - A property asserting that the protocol should eiher clone and initialize a new target from the base implementation, or re-use an existing contract without initializing.\n */\n constructor(\n options: DeployableOptions,\n payload?: DeployablePayloadOrAddress<Payload>,\n isBase?: boolean,\n ) {\n super(options, payload);\n // if supplying a custom address, safe enough to assume it is not a base address which makes reusing contracts like budgets easier\n if (\n typeof payload === 'string' &&\n isAddress(payload) &&\n payload !== zeroAddress &&\n !Object.values(this.bases).some((base) => {\n if (!payload || !base) return false;\n return isAddressEqual(payload, base);\n })\n )\n isBase = false;\n if (isBase !== undefined) this._isBase = isBase;\n }\n\n /**\n * A getter that will return the base implementation's static addresses by numerical chain ID\n *\n * @public\n * @readonly\n * @type {Record<number, Address>}\n */\n public get bases(): Record<number, Address> {\n return (this.constructor as typeof DeployableTarget).bases;\n }\n\n /**\n * A getter that returns the registry type of the base implementation\n *\n * @public\n * @readonly\n * @type {RegistryType}\n */\n public get registryType(): RegistryType {\n return (this.constructor as typeof DeployableTarget).registryType;\n }\n\n /**\n * @inheritdoc\n *\n * @public\n * @async\n * @param {?Payload} [payload]\n * @param {?DeployableOptions} [options]\n * @param {?Omit<WaitForTransactionReceiptParameters, 'hash'>} [waitParams]\n * @returns {unknown}\n */\n protected override async deploy(\n payload?: Payload,\n options?: DeployableOptions,\n waitParams?: Omit<WaitForTransactionReceiptParameters, 'hash'>,\n ) {\n await super.deploy(payload, options, waitParams);\n this.assertValidAddress();\n return this;\n }\n\n /**\n * @inheritdoc\n *\n * @public\n * @async\n * @param {?Payload} [_payload]\n * @param {?DeployableOptions} [_options]\n * @returns {Promise<Hash>}\n */\n protected override async deployRaw(\n _payload?: Payload,\n _options?: DeployableOptions,\n ): Promise<Hash> {\n if (this.address) throw new DeployableAlreadyDeployedError(this.address);\n const payload = _payload || this._payload;\n const config = _options?.config || this._config;\n const { args, ...deployment } = this.buildParameters(payload);\n return await deployContract(config, {\n ...deployment,\n ...this.optionallyAttachAccount(_options?.account),\n // Deployable targets don't construct with arguments, they initialize with encoded payloads\n args: [],\n });\n }\n\n /**\n * Check if the contract supports the given interface\n *\n * @public\n * @async\n * @param {Hex} interfaceId - The interface identifier\n * @param {?ReadParams<typeof contractActionAbi, 'supportsInterface'>} [params]\n * @returns {unknown} - True if the contract supports the interface\n */\n public async supportsInterface(\n interfaceId: Hex,\n params?: ReadParams<typeof aCloneableAbi, 'supportsInterface'>,\n ) {\n return await readACloneableSupportsInterface(this._config, {\n address: this.assertValidAddress(),\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 args: [interfaceId],\n });\n }\n\n /**\n * Return a cloneable's unique identifier for downstream consumers to differentiate various targets\n * All implementations must override this function\n *\n * @public\n * @async\n * @param {?ReadParams<typeof contractActionAbi, 'getComponentInterface'>} [params]\n * @returns {unknown}\n */\n public async getComponentInterface(\n params?: ReadParams<typeof aCloneableAbi, 'getComponentInterface'>,\n ) {\n return await readACloneableGetComponentInterface(this._config, {\n address: this.assertValidAddress(),\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 args: [],\n });\n }\n\n /**\n * @inheritdoc\n *\n * @protected\n * @template [P=Payload]\n * @param {?P} [_payload]\n * @param {?DeployableOptions} [_options]\n * @returns {[P, DeployableOptions]}\n */\n protected override validateDeploymentConfig<P = Payload>(\n _payload?: P,\n _options?: DeployableOptions,\n ) {\n const payload = _payload || this._payload;\n if (!payload) throw new DeployableMissingPayloadError();\n return super.validateDeploymentConfig(payload, _options) as [\n P,\n DeployableOptions,\n ];\n }\n}\n"],"names":["_DeployableTarget","Deployable","options","payload","isBase","isAddress","zeroAddress","base","isAddressEqual","waitParams","_payload","_options","DeployableAlreadyDeployedError","config","args","deployment","deployContract","interfaceId","params","readACloneableSupportsInterface","readACloneableGetComponentInterface","DeployableMissingPayloadError","RegistryType","DeployableTarget"],"mappings":";;;;;;AAoCO,MAAMA,IAAN,MAAMA,UAGHC,EAAiC;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,EA4CzC,YACEC,GACAC,GACAC,GACA;AACA,UAAMF,GAASC,CAAO,GA1BxB,KAAU,UAAU,IA6BhB,OAAOA,KAAY,YACnBE,EAAUF,CAAO,KACjBA,MAAYG,KACZ,CAAC,OAAO,OAAO,KAAK,KAAK,EAAE,KAAK,CAACC,MAC3B,CAACJ,KAAW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,GACA;AACO,WAAA,MAAMC,EAAgC,KAAK,SAAS;AAAA,MACzD,SAAS,KAAK,mBAAmB;AAAA,MACjC,GAAG,KAAK,wBAAwB;AAAA;AAAA,MAEhC,GAAID;AAAA,MACJ,MAAM,CAACD,CAAW;AAAA,IAAA,CACnB;AAAA,EACH;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,EAWA,MAAa,sBACXC,GACA;AACO,WAAA,MAAME,EAAoC,KAAK,SAAS;AAAA,MAC7D,SAAS,KAAK,mBAAmB;AAAA,MACjC,GAAG,KAAK,wBAAwB;AAAA;AAAA,MAEhC,GAAIF;AAAA,MACJ,MAAM,CAAC;AAAA,IAAA,CACR;AAAA,EACH;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,EAWmB,yBACjBR,GACAC,GACA;AACM,UAAAR,IAAUO,KAAY,KAAK;AACjC,QAAI,CAACP;AAAS,YAAM,IAAIkB,EAA8B;AAC/C,WAAA,MAAM,yBAAyBlB,GAASQ,CAAQ;AAAA,EAIzD;AACF;AA1LEX,EAAgB,QAAiC,IAQjDA,EAAgB,eAA6BsB,EAAa;AAnBrD,IAAMC,IAANvB;"}
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const b=require("../generated-wKBNvm48.cjs"),n=require("viem");require("@wagmi/core");const l=require("../AllowLists/SimpleAllowList.cjs");require("../SimpleDenyList-CqT0BMP7.cjs");const o=require("../Deployable/DeployableTarget.cjs"),t=require("../claiming.cjs"),u=require("../utils.cjs"),h="0x6080604052348015600e575f80fd5b50601b601f60201b60201c565b60b0565b5f602c608760201b60201c565b90508054600181161560455763f92ee8a95f526004601cfd5b8160c01c808260011c146082578060011b8355806020527fc7f505b2f371ae2175ee4913f4499e1f2633a7b5936321eed1cdaeb6115181d2602080a15b505050565b5f7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffbf6011325f1b905090565b611791806100bd5f395ff3fe60806040526004361061011e575f3560e01c806387b9d25c1161009f578063db09da1211610063578063db09da1214610390578063dcc59b6f146103cc578063f04e283e146103f6578063f2fde38b14610412578063fee81cf41461042e5761011e565b806387b9d25c1461029a5780638da5cb5b146102c4578063a4d66daf146102ee578063bb1757cf14610318578063c884ef83146103545761011e565b8063439fab91116100e6578063439fab91146101e6578063474f5a441461020e5780634e7165a21461024a57806354d1f13d14610286578063715018a6146102905761011e565b806301ffc9a71461012257806307621eca1461015e578063228cb7331461018857806325692962146101b257806328d6183b146101bc575b5f80fd5b34801561012d575f80fd5b5061014860048036038101906101439190610fa9565b61046a565b6040516101559190610fee565b60405180910390f35b348015610169575f80fd5b506101726104e3565b60405161017f919061101f565b60405180910390f35b348015610193575f80fd5b5061019c6104ec565b6040516101a9919061101f565b60405180910390f35b6101ba6104f2565b005b3480156101c7575f80fd5b506101d0610543565b6040516101dd9190611047565b60405180910390f35b3480156101f1575f80fd5b5061020c600480360381019061020791906110c1565b61056a565b005b348015610219575f80fd5b50610234600480360381019061022f91906110c1565b61064a565b6040516102419190610fee565b60405180910390f35b348015610255575f80fd5b50610270600480360381019061026b91906110c1565b61067d565b60405161027d919061117c565b60405180910390f35b61028e6106d4565b005b61029861070d565b005b3480156102a5575f80fd5b506102ae610720565b6040516102bb9190611216565b60405180910390f35b3480156102cf575f80fd5b506102d8610745565b6040516102e5919061124f565b60405180910390f35b3480156102f9575f80fd5b5061030261076d565b60405161030f919061101f565b60405180910390f35b348015610323575f80fd5b5061033e60048036038101906103399190611292565b610773565b60405161034b9190610fee565b60405180910390f35b34801561035f575f80fd5b5061037a600480360381019061037591906112ef565b610918565b6040516103879190610fee565b60405180910390f35b34801561039b575f80fd5b506103b660048036038101906103b19190611292565b610935565b6040516103c39190610fee565b60405180910390f35b3480156103d7575f80fd5b506103e0610a3a565b6040516103ed919061101f565b60405180910390f35b610410600480360381019061040b91906112ef565b610a3f565b005b61042c600480360381019061042791906112ef565b610a7d565b005b348015610439575f80fd5b50610454600480360381019061044f91906112ef565b610aa6565b604051610461919061101f565b60405180910390f35b5f7f0a466e6f000000000000000000000000000000000000000000000000000000007bffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916827bffffffffffffffffffffffffffffffffffffffffffffffffffffffff191614806104dc57506104db82610abf565b5b9050919050565b5f600154905090565b60015481565b5f6104fb610b38565b67ffffffffffffffff164201905063389a75e1600c52335f52806020600c2055337fdbf36a107da19e49527a7176a1babf963b4b0ff8cde35ee35d6cd8f1f9ac7e1d5f80a250565b5f7f0a466e6f00000000000000000000000000000000000000000000000000000000905090565b5f610573610b42565b905080546003825580156105a55760018160011c14303b1061059c5763f92ee8a95f526004601cfd5b818160ff1b1b91505b505f83838101906105b69190611448565b90506105c133610b6b565b805f015160035f6101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff1602179055508060200151600481905550508015610645576002815560016020527fc7f505b2f371ae2175ee4913f4499e1f2633a7b5936321eed1cdaeb6115181d2602080a15b505050565b5f6040517fd623472500000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b60605f67ffffffffffffffff8111156106995761069861131e565b5b6040519080825280601f01601f1916602001820160405280156106cb5781602001600182028036833780820191505090505b50905092915050565b63389a75e1600c52335f525f6020600c2055337ffa7b8eab7da67f412cc9575ed43464468f9bfbae89d1675917346ca6d8fe3c925f80a2565b610715610c41565b61071e5f610c78565b565b60035f9054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b5f7fffffffffffffffffffffffffffffffffffffffffffffffffffffffff7487392754905090565b60045481565b5f61077c610c41565b6004545f80815480929190610790906114a0565b919050551015806107e7575060025f8573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020015f205f9054906101000a900460ff165b1561081e576040517f6247a84e00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b600160025f8673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020015f205f6101000a81548160ff0219169083151502179055505f8061087e86610d3e565b9150915060035f9054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16633abb060483836040518363ffffffff1660e01b81526004016108de929190611655565b5f604051808303815f87803b1580156108f5575f80fd5b505af1158015610907573d5f803e3d5ffd5b505050506001925050509392505050565b6002602052805f5260405f205f915054906101000a900460ff1681565b5f6004545f5410801561098f575060025f8573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020015f205f9054906101000a900460ff16155b8015610a31575060035f9054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1663e3f756de856040518263ffffffff1660e01b81526004016109f091906116ad565b602060405180830381865afa158015610a0b573d5f803e3d5ffd5b505050506040513d601f19601f82011682018060405250810190610a2f9190611703565b155b90509392505050565b5f5481565b610a47610c41565b63389a75e1600c52805f526020600c208054421115610a6d57636f5e88185f526004601cfd5b5f815550610a7a81610c78565b50565b610a85610c41565b8060601b610a9a57637448fbae5f526004601cfd5b610aa381610c78565b50565b5f63389a75e1600c52815f526020600c20549050919050565b5f7f5970a689000000000000000000000000000000000000000000000000000000007bffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916827bffffffffffffffffffffffffffffffffffffffffffffffffffffffff19161480610b315750610b3082610e5d565b5b9050919050565b5f6202a300905090565b5f7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffbf6011325f1b905090565b610b73610ed6565b15610beb577fffffffffffffffffffffffffffffffffffffffffffffffffffffffff74873927805415610bad57630dc149f05f526004601cfd5b8160601b60601c9150811560ff1b82178155815f7f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e05f80a350610c3e565b8060601b60601c9050807fffffffffffffffffffffffffffffffffffffffffffffffffffffffff7487392755805f7f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e05f80a35b50565b7fffffffffffffffffffffffffffffffffffffffffffffffffffffffff74873927543314610c76576382b429005f526004601cfd5b565b610c80610ed6565b15610ce5577fffffffffffffffffffffffffffffffffffffffffffffffffffffffff748739278160601b60601c91508181547f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e05f80a3811560ff1b8217815550610d3b565b7fffffffffffffffffffffffffffffffffffffffffffffffffffffffff748739278160601b60601c91508181547f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e05f80a3818155505b50565b6060805f600167ffffffffffffffff811115610d5d57610d5c61131e565b5b604051908082528060200260200182016040528015610d8b5781602001602082028036833780820191505090505b5090505f600167ffffffffffffffff811115610daa57610da961131e565b5b604051908082528060200260200182016040528015610dd85781602001602082028036833780820191505090505b50905084825f81518110610def57610dee61172e565b5b602002602001019073ffffffffffffffffffffffffffffffffffffffff16908173ffffffffffffffffffffffffffffffffffffffff16815250506001815f81518110610e3e57610e3d61172e565b5b6020026020010190151590811515815250508181935093505050915091565b5f7f6ab67a0d000000000000000000000000000000000000000000000000000000007bffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916827bffffffffffffffffffffffffffffffffffffffffffffffffffffffff19161480610ecf5750610ece82610eda565b5b9050919050565b5f90565b5f7f01ffc9a7000000000000000000000000000000000000000000000000000000007bffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916827bffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916149050919050565b5f604051905090565b5f80fd5b5f80fd5b5f7fffffffff0000000000000000000000000000000000000000000000000000000082169050919050565b610f8881610f54565b8114610f92575f80fd5b50565b5f81359050610fa381610f7f565b92915050565b5f60208284031215610fbe57610fbd610f4c565b5b5f610fcb84828501610f95565b91505092915050565b5f8115159050919050565b610fe881610fd4565b82525050565b5f6020820190506110015f830184610fdf565b92915050565b5f819050919050565b61101981611007565b82525050565b5f6020820190506110325f830184611010565b92915050565b61104181610f54565b82525050565b5f60208201905061105a5f830184611038565b92915050565b5f80fd5b5f80fd5b5f80fd5b5f8083601f84011261108157611080611060565b5b8235905067ffffffffffffffff81111561109e5761109d611064565b5b6020830191508360018202830111156110ba576110b9611068565b5b9250929050565b5f80602083850312156110d7576110d6610f4c565b5b5f83013567ffffffffffffffff8111156110f4576110f3610f50565b5b6111008582860161106c565b92509250509250929050565b5f81519050919050565b5f82825260208201905092915050565b8281835e5f83830152505050565b5f601f19601f8301169050919050565b5f61114e8261110c565b6111588185611116565b9350611168818560208601611126565b61117181611134565b840191505092915050565b5f6020820190508181035f8301526111948184611144565b905092915050565b5f73ffffffffffffffffffffffffffffffffffffffff82169050919050565b5f819050919050565b5f6111de6111d96111d48461119c565b6111bb565b61119c565b9050919050565b5f6111ef826111c4565b9050919050565b5f611200826111e5565b9050919050565b611210816111f6565b82525050565b5f6020820190506112295f830184611207565b92915050565b5f6112398261119c565b9050919050565b6112498161122f565b82525050565b5f6020820190506112625f830184611240565b92915050565b6112718161122f565b811461127b575f80fd5b50565b5f8135905061128c81611268565b92915050565b5f805f604084860312156112a9576112a8610f4c565b5b5f6112b68682870161127e565b935050602084013567ffffffffffffffff8111156112d7576112d6610f50565b5b6112e38682870161106c565b92509250509250925092565b5f6020828403121561130457611303610f4c565b5b5f6113118482850161127e565b91505092915050565b5f80fd5b7f4e487b71000000000000000000000000000000000000000000000000000000005f52604160045260245ffd5b61135482611134565b810181811067ffffffffffffffff821117156113735761137261131e565b5b80604052505050565b5f611385610f43565b9050611391828261134b565b919050565b5f6113a08261122f565b9050919050565b6113b081611396565b81146113ba575f80fd5b50565b5f813590506113cb816113a7565b92915050565b6113da81611007565b81146113e4575f80fd5b50565b5f813590506113f5816113d1565b92915050565b5f604082840312156114105761140f61131a565b5b61141a604061137c565b90505f611429848285016113bd565b5f83015250602061143c848285016113e7565b60208301525092915050565b5f6040828403121561145d5761145c610f4c565b5b5f61146a848285016113fb565b91505092915050565b7f4e487b71000000000000000000000000000000000000000000000000000000005f52601160045260245ffd5b5f6114aa82611007565b91507fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff82036114dc576114db611473565b5b600182019050919050565b5f81519050919050565b5f82825260208201905092915050565b5f819050602082019050919050565b6115198161122f565b82525050565b5f61152a8383611510565b60208301905092915050565b5f602082019050919050565b5f61154c826114e7565b61155681856114f1565b935061156183611501565b805f5b83811015611591578151611578888261151f565b975061158383611536565b925050600181019050611564565b5085935050505092915050565b5f81519050919050565b5f82825260208201905092915050565b5f819050602082019050919050565b6115d081610fd4565b82525050565b5f6115e183836115c7565b60208301905092915050565b5f602082019050919050565b5f6116038261159e565b61160d81856115a8565b9350611618836115b8565b805f5b8381101561164857815161162f88826115d6565b975061163a836115ed565b92505060018101905061161b565b5085935050505092915050565b5f6040820190508181035f83015261166d8185611542565b9050818103602083015261168181846115f9565b90509392505050565b50565b5f6116985f83611116565b91506116a38261168a565b5f82019050919050565b5f6040820190506116c05f830184611240565b81810360208301526116d18161168d565b905092915050565b6116e281610fd4565b81146116ec575f80fd5b50565b5f815190506116fd816116d9565b92915050565b5f6020828403121561171857611717610f4c565b5b5f611725848285016116ef565b91505092915050565b7f4e487b71000000000000000000000000000000000000000000000000000000005f52603260045260245ffdfea26469706673582212208bc630e11c065de18b61496283ea93bb882211261a2de5178b91a410f78a5c9a64736f6c634300081a0033",e=class e extends o.DeployableTarget{constructor(){super(...arguments),this.abi=b.A}async owner(f){return await b.ju(this._config,{address:this.assertValidAddress(),args:[],...f})}async claims(f){return await b.Pu(this._config,{address:this.assertValidAddress(),args:[],...f})}async reward(f){return await b.Ju(this._config,{address:this.assertValidAddress(),args:[],...f})}async claimed(f,a){return await b.Du(this._config,{address:this.assertValidAddress(),args:[f],...a})}async allowList(f){const a=await b.ku(this._config,{address:this.assertValidAddress(),...f});return new l.SimpleAllowList({config:this._config,account:this._account},a)}async limit(f){return await b.$u(this._config,{address:this.assertValidAddress(),...f})}async claim(f,a){return await this.awaitResult(this.claimRaw(f,a))}async claimRaw(f,a){const{request:d,result:c}=await b.pl(this._config,{address:this.assertValidAddress(),args:[t.prepareClaimPayload(f)],...this.optionallyAttachAccount(),...a});return{hash:await b.el(this._config,d),result:c}}async isClaimable(f,a){return await b.Zu(this._config,{address:this.assertValidAddress(),args:[t.prepareClaimPayload(f)],...a})}buildParameters(f,a){const[d,c]=this.validateDeploymentConfig(f,a);return{abi:b.A,bytecode:h,args:[i(d)],...this.optionallyAttachAccount(c.account)}}};e.base="0x8d80dfac4927387E6819B76b850aF50d2E29835a",e.registryType=u.RegistryType.INCENTIVE;let s=e;const i=({allowList:r,limit:f})=>n.encodeAbiParameters([{type:"address",name:"allowList"},{type:"uint256",name:"limit"}],[r,f]);exports.allowListIncentiveAbi=b.A;exports.AllowListIncentive=s;exports.prepareAllowListIncentivePayload=i;
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const b=require("../generated-tq_HLZJ0.cjs"),n=require("viem"),l=require("../deployments-Ho4PnGCS.cjs");require("@wagmi/core");const o=require("../AllowLists/SimpleAllowList.cjs");require("../SimpleDenyList-DeJRKD2D.cjs");const u=require("../Deployable/DeployableTarget.cjs"),t=require("../claiming.cjs"),h=require("../utils.cjs"),y="0x6080604052348015600e575f80fd5b50601b601f60201b60201c565b60b0565b5f602c608760201b60201c565b90508054600181161560455763f92ee8a95f526004601cfd5b8160c01c808260011c146082578060011b8355806020527fc7f505b2f371ae2175ee4913f4499e1f2633a7b5936321eed1cdaeb6115181d2602080a15b505050565b5f7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffbf6011325f1b905090565b611791806100bd5f395ff3fe60806040526004361061011e575f3560e01c806387b9d25c1161009f578063db09da1211610063578063db09da1214610390578063dcc59b6f146103cc578063f04e283e146103f6578063f2fde38b14610412578063fee81cf41461042e5761011e565b806387b9d25c1461029a5780638da5cb5b146102c4578063a4d66daf146102ee578063bb1757cf14610318578063c884ef83146103545761011e565b8063439fab91116100e6578063439fab91146101e6578063474f5a441461020e5780634e7165a21461024a57806354d1f13d14610286578063715018a6146102905761011e565b806301ffc9a71461012257806307621eca1461015e578063228cb7331461018857806325692962146101b257806328d6183b146101bc575b5f80fd5b34801561012d575f80fd5b5061014860048036038101906101439190610fa9565b61046a565b6040516101559190610fee565b60405180910390f35b348015610169575f80fd5b506101726104e3565b60405161017f919061101f565b60405180910390f35b348015610193575f80fd5b5061019c6104ec565b6040516101a9919061101f565b60405180910390f35b6101ba6104f2565b005b3480156101c7575f80fd5b506101d0610543565b6040516101dd9190611047565b60405180910390f35b3480156101f1575f80fd5b5061020c600480360381019061020791906110c1565b61056a565b005b348015610219575f80fd5b50610234600480360381019061022f91906110c1565b61064a565b6040516102419190610fee565b60405180910390f35b348015610255575f80fd5b50610270600480360381019061026b91906110c1565b61067d565b60405161027d919061117c565b60405180910390f35b61028e6106d4565b005b61029861070d565b005b3480156102a5575f80fd5b506102ae610720565b6040516102bb9190611216565b60405180910390f35b3480156102cf575f80fd5b506102d8610745565b6040516102e5919061124f565b60405180910390f35b3480156102f9575f80fd5b5061030261076d565b60405161030f919061101f565b60405180910390f35b348015610323575f80fd5b5061033e60048036038101906103399190611292565b610773565b60405161034b9190610fee565b60405180910390f35b34801561035f575f80fd5b5061037a600480360381019061037591906112ef565b610918565b6040516103879190610fee565b60405180910390f35b34801561039b575f80fd5b506103b660048036038101906103b19190611292565b610935565b6040516103c39190610fee565b60405180910390f35b3480156103d7575f80fd5b506103e0610a3a565b6040516103ed919061101f565b60405180910390f35b610410600480360381019061040b91906112ef565b610a3f565b005b61042c600480360381019061042791906112ef565b610a7d565b005b348015610439575f80fd5b50610454600480360381019061044f91906112ef565b610aa6565b604051610461919061101f565b60405180910390f35b5f7f0a466e6f000000000000000000000000000000000000000000000000000000007bffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916827bffffffffffffffffffffffffffffffffffffffffffffffffffffffff191614806104dc57506104db82610abf565b5b9050919050565b5f600154905090565b60015481565b5f6104fb610b38565b67ffffffffffffffff164201905063389a75e1600c52335f52806020600c2055337fdbf36a107da19e49527a7176a1babf963b4b0ff8cde35ee35d6cd8f1f9ac7e1d5f80a250565b5f7f0a466e6f00000000000000000000000000000000000000000000000000000000905090565b5f610573610b42565b905080546003825580156105a55760018160011c14303b1061059c5763f92ee8a95f526004601cfd5b818160ff1b1b91505b505f83838101906105b69190611448565b90506105c133610b6b565b805f015160035f6101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff1602179055508060200151600481905550508015610645576002815560016020527fc7f505b2f371ae2175ee4913f4499e1f2633a7b5936321eed1cdaeb6115181d2602080a15b505050565b5f6040517fd623472500000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b60605f67ffffffffffffffff8111156106995761069861131e565b5b6040519080825280601f01601f1916602001820160405280156106cb5781602001600182028036833780820191505090505b50905092915050565b63389a75e1600c52335f525f6020600c2055337ffa7b8eab7da67f412cc9575ed43464468f9bfbae89d1675917346ca6d8fe3c925f80a2565b610715610c41565b61071e5f610c78565b565b60035f9054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b5f7fffffffffffffffffffffffffffffffffffffffffffffffffffffffff7487392754905090565b60045481565b5f61077c610c41565b6004545f80815480929190610790906114a0565b919050551015806107e7575060025f8573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020015f205f9054906101000a900460ff165b1561081e576040517f6247a84e00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b600160025f8673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020015f205f6101000a81548160ff0219169083151502179055505f8061087e86610d3e565b9150915060035f9054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16633abb060483836040518363ffffffff1660e01b81526004016108de929190611655565b5f604051808303815f87803b1580156108f5575f80fd5b505af1158015610907573d5f803e3d5ffd5b505050506001925050509392505050565b6002602052805f5260405f205f915054906101000a900460ff1681565b5f6004545f5410801561098f575060025f8573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020015f205f9054906101000a900460ff16155b8015610a31575060035f9054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1663e3f756de856040518263ffffffff1660e01b81526004016109f091906116ad565b602060405180830381865afa158015610a0b573d5f803e3d5ffd5b505050506040513d601f19601f82011682018060405250810190610a2f9190611703565b155b90509392505050565b5f5481565b610a47610c41565b63389a75e1600c52805f526020600c208054421115610a6d57636f5e88185f526004601cfd5b5f815550610a7a81610c78565b50565b610a85610c41565b8060601b610a9a57637448fbae5f526004601cfd5b610aa381610c78565b50565b5f63389a75e1600c52815f526020600c20549050919050565b5f7f5970a689000000000000000000000000000000000000000000000000000000007bffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916827bffffffffffffffffffffffffffffffffffffffffffffffffffffffff19161480610b315750610b3082610e5d565b5b9050919050565b5f6202a300905090565b5f7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffbf6011325f1b905090565b610b73610ed6565b15610beb577fffffffffffffffffffffffffffffffffffffffffffffffffffffffff74873927805415610bad57630dc149f05f526004601cfd5b8160601b60601c9150811560ff1b82178155815f7f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e05f80a350610c3e565b8060601b60601c9050807fffffffffffffffffffffffffffffffffffffffffffffffffffffffff7487392755805f7f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e05f80a35b50565b7fffffffffffffffffffffffffffffffffffffffffffffffffffffffff74873927543314610c76576382b429005f526004601cfd5b565b610c80610ed6565b15610ce5577fffffffffffffffffffffffffffffffffffffffffffffffffffffffff748739278160601b60601c91508181547f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e05f80a3811560ff1b8217815550610d3b565b7fffffffffffffffffffffffffffffffffffffffffffffffffffffffff748739278160601b60601c91508181547f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e05f80a3818155505b50565b6060805f600167ffffffffffffffff811115610d5d57610d5c61131e565b5b604051908082528060200260200182016040528015610d8b5781602001602082028036833780820191505090505b5090505f600167ffffffffffffffff811115610daa57610da961131e565b5b604051908082528060200260200182016040528015610dd85781602001602082028036833780820191505090505b50905084825f81518110610def57610dee61172e565b5b602002602001019073ffffffffffffffffffffffffffffffffffffffff16908173ffffffffffffffffffffffffffffffffffffffff16815250506001815f81518110610e3e57610e3d61172e565b5b6020026020010190151590811515815250508181935093505050915091565b5f7f6ab67a0d000000000000000000000000000000000000000000000000000000007bffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916827bffffffffffffffffffffffffffffffffffffffffffffffffffffffff19161480610ecf5750610ece82610eda565b5b9050919050565b5f90565b5f7f01ffc9a7000000000000000000000000000000000000000000000000000000007bffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916827bffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916149050919050565b5f604051905090565b5f80fd5b5f80fd5b5f7fffffffff0000000000000000000000000000000000000000000000000000000082169050919050565b610f8881610f54565b8114610f92575f80fd5b50565b5f81359050610fa381610f7f565b92915050565b5f60208284031215610fbe57610fbd610f4c565b5b5f610fcb84828501610f95565b91505092915050565b5f8115159050919050565b610fe881610fd4565b82525050565b5f6020820190506110015f830184610fdf565b92915050565b5f819050919050565b61101981611007565b82525050565b5f6020820190506110325f830184611010565b92915050565b61104181610f54565b82525050565b5f60208201905061105a5f830184611038565b92915050565b5f80fd5b5f80fd5b5f80fd5b5f8083601f84011261108157611080611060565b5b8235905067ffffffffffffffff81111561109e5761109d611064565b5b6020830191508360018202830111156110ba576110b9611068565b5b9250929050565b5f80602083850312156110d7576110d6610f4c565b5b5f83013567ffffffffffffffff8111156110f4576110f3610f50565b5b6111008582860161106c565b92509250509250929050565b5f81519050919050565b5f82825260208201905092915050565b8281835e5f83830152505050565b5f601f19601f8301169050919050565b5f61114e8261110c565b6111588185611116565b9350611168818560208601611126565b61117181611134565b840191505092915050565b5f6020820190508181035f8301526111948184611144565b905092915050565b5f73ffffffffffffffffffffffffffffffffffffffff82169050919050565b5f819050919050565b5f6111de6111d96111d48461119c565b6111bb565b61119c565b9050919050565b5f6111ef826111c4565b9050919050565b5f611200826111e5565b9050919050565b611210816111f6565b82525050565b5f6020820190506112295f830184611207565b92915050565b5f6112398261119c565b9050919050565b6112498161122f565b82525050565b5f6020820190506112625f830184611240565b92915050565b6112718161122f565b811461127b575f80fd5b50565b5f8135905061128c81611268565b92915050565b5f805f604084860312156112a9576112a8610f4c565b5b5f6112b68682870161127e565b935050602084013567ffffffffffffffff8111156112d7576112d6610f50565b5b6112e38682870161106c565b92509250509250925092565b5f6020828403121561130457611303610f4c565b5b5f6113118482850161127e565b91505092915050565b5f80fd5b7f4e487b71000000000000000000000000000000000000000000000000000000005f52604160045260245ffd5b61135482611134565b810181811067ffffffffffffffff821117156113735761137261131e565b5b80604052505050565b5f611385610f43565b9050611391828261134b565b919050565b5f6113a08261122f565b9050919050565b6113b081611396565b81146113ba575f80fd5b50565b5f813590506113cb816113a7565b92915050565b6113da81611007565b81146113e4575f80fd5b50565b5f813590506113f5816113d1565b92915050565b5f604082840312156114105761140f61131a565b5b61141a604061137c565b90505f611429848285016113bd565b5f83015250602061143c848285016113e7565b60208301525092915050565b5f6040828403121561145d5761145c610f4c565b5b5f61146a848285016113fb565b91505092915050565b7f4e487b71000000000000000000000000000000000000000000000000000000005f52601160045260245ffd5b5f6114aa82611007565b91507fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff82036114dc576114db611473565b5b600182019050919050565b5f81519050919050565b5f82825260208201905092915050565b5f819050602082019050919050565b6115198161122f565b82525050565b5f61152a8383611510565b60208301905092915050565b5f602082019050919050565b5f61154c826114e7565b61155681856114f1565b935061156183611501565b805f5b83811015611591578151611578888261151f565b975061158383611536565b925050600181019050611564565b5085935050505092915050565b5f81519050919050565b5f82825260208201905092915050565b5f819050602082019050919050565b6115d081610fd4565b82525050565b5f6115e183836115c7565b60208301905092915050565b5f602082019050919050565b5f6116038261159e565b61160d81856115a8565b9350611618836115b8565b805f5b8381101561164857815161162f88826115d6565b975061163a836115ed565b92505060018101905061161b565b5085935050505092915050565b5f6040820190508181035f83015261166d8185611542565b9050818103602083015261168181846115f9565b90509392505050565b50565b5f6116985f83611116565b91506116a38261168a565b5f82019050919050565b5f6040820190506116c05f830184611240565b81810360208301526116d18161168d565b905092915050565b6116e281610fd4565b81146116ec575f80fd5b50565b5f815190506116fd816116d9565b92915050565b5f6020828403121561171857611717610f4c565b5b5f611725848285016116ef565b91505092915050565b7f4e487b71000000000000000000000000000000000000000000000000000000005f52603260045260245ffdfea26469706673582212208bc630e11c065de18b61496283ea93bb882211261a2de5178b91a410f78a5c9a64736f6c634300081a0033",a=class a extends u.DeployableTarget{constructor(){super(...arguments),this.abi=b.A}async owner(f){return await b.ju(this._config,{address:this.assertValidAddress(),args:[],...f})}async claims(f){return await b.Pu(this._config,{address:this.assertValidAddress(),args:[],...f})}async reward(f){return await b.Ju(this._config,{address:this.assertValidAddress(),args:[],...f})}async claimed(f,e){return await b.Du(this._config,{address:this.assertValidAddress(),args:[f],...e})}async allowList(f){const e=await b.ku(this._config,{address:this.assertValidAddress(),...f});return new o.SimpleAllowList({config:this._config,account:this._account},e)}async limit(f){return await b.$u(this._config,{address:this.assertValidAddress(),...f})}async claim(f,e){return await this.awaitResult(this.claimRaw(f,e))}async claimRaw(f,e){const{request:d,result:c}=await b.pl(this._config,{address:this.assertValidAddress(),args:[t.prepareClaimPayload(f)],...this.optionallyAttachAccount(),...e});return{hash:await b.el(this._config,d),result:c}}async isClaimable(f,e){return await b.Zu(this._config,{address:this.assertValidAddress(),args:[t.prepareClaimPayload(f)],...e})}buildParameters(f,e){const[d,c]=this.validateDeploymentConfig(f,e);return{abi:b.A,bytecode:y,args:[i(d)],...this.optionallyAttachAccount(c.account)}}};a.bases={...l.AllowListIncentive,31337:"0x8d80dfac4927387E6819B76b850aF50d2E29835a"},a.registryType=h.RegistryType.INCENTIVE;let s=a;const i=({allowList:r,limit:f})=>n.encodeAbiParameters([{type:"address",name:"allowList"},{type:"uint256",name:"limit"}],[r,f]);exports.allowListIncentiveAbi=b.A;exports.AllowListIncentive=s;exports.prepareAllowListIncentivePayload=i;
|
|
2
2
|
//# sourceMappingURL=AllowListIncentive.cjs.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"AllowListIncentive.cjs","sources":["../../src/Incentives/AllowListIncentive.ts"],"sourcesContent":["import {\n allowListIncentiveAbi,\n readAllowListIncentiveAllowList,\n readAllowListIncentiveClaimed,\n readAllowListIncentiveClaims,\n readAllowListIncentiveIsClaimable,\n readAllowListIncentiveLimit,\n readAllowListIncentiveOwner,\n readAllowListIncentiveReward,\n simulateAllowListIncentiveClaim,\n writeAllowListIncentiveClaim,\n} from '@boostxyz/evm';\nimport { bytecode } from '@boostxyz/evm/artifacts/contracts/incentives/AllowListIncentive.sol/AllowListIncentive.json';\nimport {\n type Address,\n type ContractEventName,\n type Hex,\n encodeAbiParameters,\n} from 'viem';\nimport { SimpleAllowList } from '../AllowLists/AllowList';\nimport type {\n DeployableOptions,\n GenericDeployableParams,\n} from '../Deployable/Deployable';\nimport { DeployableTarget } from '../Deployable/DeployableTarget';\nimport { type ClaimPayload, prepareClaimPayload } from '../claiming';\nimport {\n type GenericLog,\n type ReadParams,\n RegistryType,\n type WriteParams,\n} from '../utils';\n\nexport { allowListIncentiveAbi };\n\n/**\n * The object representation of a `AllowListIncentive.InitPayload`\n *\n * @export\n * @interface AllowListIncentivePayload\n * @typedef {AllowListIncentivePayload}\n */\nexport interface AllowListIncentivePayload {\n /**\n * The address to the allowlist to add claimers to.\n *\n * @type {Address}\n */\n allowList: Address;\n /**\n * The maximum number of claims that can be made (one per address)\n *\n * @type {bigint}\n */\n limit: bigint;\n}\n\n/**\n * A generic `viem.Log` event with support for `AllowListIncentive` event types.\n *\n * @export\n * @typedef {AllowListIncentiveLog}\n * @template {ContractEventName<\n * typeof allowListIncentiveAbi\n * >} [event=ContractEventName<typeof allowListIncentiveAbi>]\n */\nexport type AllowListIncentiveLog<\n event extends ContractEventName<\n typeof allowListIncentiveAbi\n > = ContractEventName<typeof allowListIncentiveAbi>,\n> = GenericLog<typeof allowListIncentiveAbi, event>;\n\n/**\n * An incentive implementation that grants the claimer a slot on an {SimpleAllowList}\n * In order for any claim to be successful:\n * - The claimer must not already be on the allow list; and\n * - The maximum number of claims must not have been reached; and\n * - This contract must be authorized to modify the allow list\n *\n * @export\n * @class AllowListIncentive\n * @typedef {AllowListIncentive}\n * @extends {DeployableTarget<AllowListIncentivePayload>}\n */\nexport class AllowListIncentive extends DeployableTarget<\n AllowListIncentivePayload,\n typeof allowListIncentiveAbi\n> {\n public override readonly abi = allowListIncentiveAbi;\n /**\n * @inheritdoc\n *\n * @public\n * @static\n * @type {Address}\n */\n public static override base: Address = import.meta.env\n .VITE_ALLOWLIST_INCENTIVE_BASE;\n /**\n * @inheritdoc\n *\n * @public\n * @static\n * @type {RegistryType}\n */\n public static override registryType: RegistryType = RegistryType.INCENTIVE;\n\n /**\n * The owner of the allowList\n *\n * @public\n * @async\n * @param {?ReadParams<typeof allowListIncentiveAbi, 'owner'>} [params]\n * @returns {unknown}\n */\n public async owner(\n params?: ReadParams<typeof allowListIncentiveAbi, 'owner'>,\n ) {\n return await readAllowListIncentiveOwner(this._config, {\n address: this.assertValidAddress(),\n args: [],\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 * The number of claims that have been made\n *\n * @public\n * @async\n * @param {?ReadParams<typeof allowListIncentiveAbi, 'claims'>} [params]\n * @returns {Promise<bigint>}\n */\n public async claims(\n params?: ReadParams<typeof allowListIncentiveAbi, 'claims'>,\n ) {\n return await readAllowListIncentiveClaims(this._config, {\n address: this.assertValidAddress(),\n args: [],\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 * The reward amount issued for each claim\n *\n * @public\n * @async\n * @param {?ReadParams<typeof allowListIncentiveAbi, 'reward'>} [params]\n * @returns {Promise<bigint>}\n */\n public async reward(\n params?: ReadParams<typeof allowListIncentiveAbi, 'reward'>,\n ) {\n return await readAllowListIncentiveReward(this._config, {\n address: this.assertValidAddress(),\n args: [],\n // biome-ignore lint/suspicious/noExplicitAny: Accept any shape of valid wagmi/viem parameters, wagmi does the same thing internally\n ...(params as any),\n });\n }\n\n /**\n * Get the claim status for a user\n *\n * @public\n * @async\n * @param {Address} address\n * @param {?ReadParams<typeof allowListIncentiveAbi, 'claimed'>} [params]\n * @returns {Promise<boolean>}\n */\n public async claimed(\n address: Address,\n params?: ReadParams<typeof allowListIncentiveAbi, 'claimed'>,\n ) {\n return await readAllowListIncentiveClaimed(this._config, {\n address: this.assertValidAddress(),\n args: [address],\n // biome-ignore lint/suspicious/noExplicitAny: Accept any shape of valid wagmi/viem parameters, wagmi does the same thing internally\n ...(params as any),\n });\n }\n\n /**\n * The {@link SimpleAllowList} contract\n *\n * @public\n * @async\n * @param {?ReadParams<typeof allowListIncentiveAbi, 'allowList'>} [params]\n * @returns {Promise<SimpleAllowList>}\n */\n public async allowList(\n params?: ReadParams<typeof allowListIncentiveAbi, 'allowList'>,\n ): Promise<SimpleAllowList> {\n const address = await readAllowListIncentiveAllowList(this._config, {\n address: this.assertValidAddress(),\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 return new SimpleAllowList(\n { config: this._config, account: this._account },\n address,\n );\n }\n\n /**\n * The maximum number of claims that can be made (one per address)\n *\n * @public\n * @async\n * @param {?ReadParams<typeof allowListIncentiveAbi, 'limit'>} [params]\n * @returns {unknown}\n */\n public async limit(\n params?: ReadParams<typeof allowListIncentiveAbi, 'limit'>,\n ) {\n return await readAllowListIncentiveLimit(this._config, {\n address: this.assertValidAddress(),\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 * Claim a slot on the {@link SimpleAllowList}\n *\n * @public\n * @async\n * @param {Pick<ClaimPayload, 'target'>} payload\n * @param {?WriteParams<typeof allowListIncentiveAbi, 'claim'>} [params]\n * @returns {Promise<true>} - return true if successful, otherwise revert\n */\n protected async claim(\n payload: Pick<ClaimPayload, 'target'>,\n params?: WriteParams<typeof allowListIncentiveAbi, 'claim'>,\n ) {\n return await this.awaitResult(this.claimRaw(payload, params));\n }\n\n /**\n * Claim a slot on the {@link SimpleAllowList}\n *\n * @public\n * @async\n * @param {Pick<ClaimPayload, 'target'>} payload\n * @param {?WriteParams<typeof allowListIncentiveAbi, 'claim'>} [params]\n * @returns {Promise<true>} - return true if successful, otherwise revert\n */\n protected async claimRaw(\n payload: Pick<ClaimPayload, 'target'>,\n params?: WriteParams<typeof allowListIncentiveAbi, 'claim'>,\n ) {\n const { request, result } = await simulateAllowListIncentiveClaim(\n this._config,\n {\n address: this.assertValidAddress(),\n args: [prepareClaimPayload(payload)],\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 writeAllowListIncentiveClaim(this._config, request);\n return { hash, result };\n }\n\n /**\n * Check if an incentive is claimable\n *\n * @public\n * @async\n * @param {Pick<ClaimPayload, 'target'>} payload\n * @param {?ReadParams<typeof allowListIncentiveAbi, 'isClaimable'>} [params]\n * @returns {Promise<boolean>} - True if the incentive is claimable based on the data payload\n */\n public async isClaimable(\n payload: Pick<ClaimPayload, 'target'>,\n params?: ReadParams<typeof allowListIncentiveAbi, 'isClaimable'>,\n ) {\n return await readAllowListIncentiveIsClaimable(this._config, {\n address: this.assertValidAddress(),\n args: [prepareClaimPayload(payload)],\n // biome-ignore lint/suspicious/noExplicitAny: Accept any shape of valid wagmi/viem parameters, wagmi does the same thing internally\n ...(params as any),\n });\n }\n\n /**\n * @inheritdoc\n *\n * @public\n * @param {?AllowListIncentivePayload} [_payload]\n * @param {?DeployableOptions} [_options]\n * @returns {GenericDeployableParams}\n */\n public override buildParameters(\n _payload?: AllowListIncentivePayload,\n _options?: DeployableOptions,\n ): GenericDeployableParams {\n const [payload, options] = this.validateDeploymentConfig(\n _payload,\n _options,\n );\n return {\n abi: allowListIncentiveAbi,\n bytecode: bytecode as Hex,\n args: [prepareAllowListIncentivePayload(payload)],\n ...this.optionallyAttachAccount(options.account),\n };\n }\n}\n\n/**\n * Given a {@link AllowListIncentivePayload}, properly encode a `AllowListIncentive.InitPayload` for use with {@link AllowListIncentive} initialization.\n *\n * @param {AllowListIncentivePayload} param0\n * @param {Address} param0.allowList - The address to the allowlist to add claimers to.\n * @param {bigint} param0.limit - The maximum number of claims that can be made (one per address)\n * @returns {Hex}\n */\nexport const prepareAllowListIncentivePayload = ({\n allowList,\n limit,\n}: AllowListIncentivePayload) => {\n return encodeAbiParameters(\n [\n { type: 'address', name: 'allowList' },\n { type: 'uint256', name: 'limit' },\n ],\n [allowList, limit],\n );\n};\n"],"names":["_AllowListIncentive","DeployableTarget","allowListIncentiveAbi","params","readAllowListIncentiveOwner","readAllowListIncentiveClaims","readAllowListIncentiveReward","address","readAllowListIncentiveClaimed","readAllowListIncentiveAllowList","SimpleAllowList","readAllowListIncentiveLimit","payload","request","result","simulateAllowListIncentiveClaim","prepareClaimPayload","writeAllowListIncentiveClaim","readAllowListIncentiveIsClaimable","_payload","_options","options","bytecode","prepareAllowListIncentivePayload","RegistryType","AllowListIncentive","allowList","limit","encodeAbiParameters"],"mappings":"qhZAoFaA,EAAN,MAAMA,UAA2BC,EAAAA,gBAGtC,CAHK,aAAA,CAAA,MAAA,GAAA,SAAA,EAIL,KAAyB,IAAMC,GAAA,CA2B/B,MAAa,MACXC,EACA,CACO,OAAA,MAAMC,EAAAA,GAA4B,KAAK,QAAS,CACrD,QAAS,KAAK,mBAAmB,EACjC,KAAM,CAAC,EAEP,GAAID,CAAA,CACL,CACH,CAUA,MAAa,OAC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KAAK,QAAS,CAC3D,QAAS,KAAK,mBAAmB,EACjC,KAAM,CAACF,sBAAoBJ,CAAO,CAAC,EAEnC,GAAIT,CAAA,CACL,CACH,CAUgB,gBACdgB,EACAC,EACyB,CACzB,KAAM,CAACR,EAASS,CAAO,EAAI,KAAK,yBAC9BF,EACAC,CAAA,EAEK,MAAA,CACL,IAAKlB,EAAA,EACL,SAAAoB,EACA,KAAM,CAACC,EAAiCX,CAAO,CAAC,EAChD,GAAG,KAAK,wBAAwBS,EAAQ,OAAO,CAAA,CAEnD,CACF,EAxNyBrB,EAAA,KAAgB,6CASvCA,EAAuB,aAA6BwB,EAAa,aAAA,UArB5D,IAAMC,EAANzB,EA8OA,MAAMuB,EAAmC,CAAC,CAC/C,UAAAG,EACA,MAAAC,CACF,IACSC,EAAA,oBACL,CACE,CAAE,KAAM,UAAW,KAAM,WAAY,EACrC,CAAE,KAAM,UAAW,KAAM,OAAQ,CACnC,EACA,CAACF,EAAWC,CAAK,CAAA"}
|
|
1
|
+
{"version":3,"file":"AllowListIncentive.cjs","sources":["../../src/Incentives/AllowListIncentive.ts"],"sourcesContent":["import {\n allowListIncentiveAbi,\n readAllowListIncentiveAllowList,\n readAllowListIncentiveClaimed,\n readAllowListIncentiveClaims,\n readAllowListIncentiveIsClaimable,\n readAllowListIncentiveLimit,\n readAllowListIncentiveOwner,\n readAllowListIncentiveReward,\n simulateAllowListIncentiveClaim,\n writeAllowListIncentiveClaim,\n} from '@boostxyz/evm';\nimport { bytecode } from '@boostxyz/evm/artifacts/contracts/incentives/AllowListIncentive.sol/AllowListIncentive.json';\nimport {\n type Address,\n type ContractEventName,\n type Hex,\n encodeAbiParameters,\n} from 'viem';\nimport { AllowListIncentive as AllowListIncentiveBases } from '../../dist/deployments.json';\nimport { SimpleAllowList } from '../AllowLists/AllowList';\nimport type {\n DeployableOptions,\n GenericDeployableParams,\n} from '../Deployable/Deployable';\nimport { DeployableTarget } from '../Deployable/DeployableTarget';\nimport { type ClaimPayload, prepareClaimPayload } from '../claiming';\nimport {\n type GenericLog,\n type ReadParams,\n RegistryType,\n type WriteParams,\n} from '../utils';\n\nexport { allowListIncentiveAbi };\n\n/**\n * The object representation of a `AllowListIncentive.InitPayload`\n *\n * @export\n * @interface AllowListIncentivePayload\n * @typedef {AllowListIncentivePayload}\n */\nexport interface AllowListIncentivePayload {\n /**\n * The address to the allowlist to add claimers to.\n *\n * @type {Address}\n */\n allowList: Address;\n /**\n * The maximum number of claims that can be made (one per address)\n *\n * @type {bigint}\n */\n limit: bigint;\n}\n\n/**\n * A generic `viem.Log` event with support for `AllowListIncentive` event types.\n *\n * @export\n * @typedef {AllowListIncentiveLog}\n * @template {ContractEventName<\n * typeof allowListIncentiveAbi\n * >} [event=ContractEventName<typeof allowListIncentiveAbi>]\n */\nexport type AllowListIncentiveLog<\n event extends ContractEventName<\n typeof allowListIncentiveAbi\n > = ContractEventName<typeof allowListIncentiveAbi>,\n> = GenericLog<typeof allowListIncentiveAbi, event>;\n\n/**\n * An incentive implementation that grants the claimer a slot on an {SimpleAllowList}\n * In order for any claim to be successful:\n * - The claimer must not already be on the allow list; and\n * - The maximum number of claims must not have been reached; and\n * - This contract must be authorized to modify the allow list\n *\n * @export\n * @class AllowListIncentive\n * @typedef {AllowListIncentive}\n * @extends {DeployableTarget<AllowListIncentivePayload>}\n */\nexport class AllowListIncentive extends DeployableTarget<\n AllowListIncentivePayload,\n typeof allowListIncentiveAbi\n> {\n public override readonly abi = allowListIncentiveAbi;\n /**\n * @inheritdoc\n *\n * @public\n * @static\n * @type {Record<number, Address>}\n */\n public static override bases: Record<number, Address> = {\n ...(AllowListIncentiveBases as Record<number, Address>),\n 31337: import.meta.env.VITE_ALLOWLIST_INCENTIVE_BASE,\n };\n /**\n * @inheritdoc\n *\n * @public\n * @static\n * @type {RegistryType}\n */\n public static override registryType: RegistryType = RegistryType.INCENTIVE;\n\n /**\n * The owner of the allowList\n *\n * @public\n * @async\n * @param {?ReadParams<typeof allowListIncentiveAbi, 'owner'>} [params]\n * @returns {unknown}\n */\n public async owner(\n params?: ReadParams<typeof allowListIncentiveAbi, 'owner'>,\n ) {\n return await readAllowListIncentiveOwner(this._config, {\n address: this.assertValidAddress(),\n args: [],\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 * The number of claims that have been made\n *\n * @public\n * @async\n * @param {?ReadParams<typeof allowListIncentiveAbi, 'claims'>} [params]\n * @returns {Promise<bigint>}\n */\n public async claims(\n params?: ReadParams<typeof allowListIncentiveAbi, 'claims'>,\n ) {\n return await readAllowListIncentiveClaims(this._config, {\n address: this.assertValidAddress(),\n args: [],\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 * The reward amount issued for each claim\n *\n * @public\n * @async\n * @param {?ReadParams<typeof allowListIncentiveAbi, 'reward'>} [params]\n * @returns {Promise<bigint>}\n */\n public async reward(\n params?: ReadParams<typeof allowListIncentiveAbi, 'reward'>,\n ) {\n return await readAllowListIncentiveReward(this._config, {\n address: this.assertValidAddress(),\n args: [],\n // biome-ignore lint/suspicious/noExplicitAny: Accept any shape of valid wagmi/viem parameters, wagmi does the same thing internally\n ...(params as any),\n });\n }\n\n /**\n * Get the claim status for a user\n *\n * @public\n * @async\n * @param {Address} address\n * @param {?ReadParams<typeof allowListIncentiveAbi, 'claimed'>} [params]\n * @returns {Promise<boolean>}\n */\n public async claimed(\n address: Address,\n params?: ReadParams<typeof allowListIncentiveAbi, 'claimed'>,\n ) {\n return await readAllowListIncentiveClaimed(this._config, {\n address: this.assertValidAddress(),\n args: [address],\n // biome-ignore lint/suspicious/noExplicitAny: Accept any shape of valid wagmi/viem parameters, wagmi does the same thing internally\n ...(params as any),\n });\n }\n\n /**\n * The {@link SimpleAllowList} contract\n *\n * @public\n * @async\n * @param {?ReadParams<typeof allowListIncentiveAbi, 'allowList'>} [params]\n * @returns {Promise<SimpleAllowList>}\n */\n public async allowList(\n params?: ReadParams<typeof allowListIncentiveAbi, 'allowList'>,\n ): Promise<SimpleAllowList> {\n const address = await readAllowListIncentiveAllowList(this._config, {\n address: this.assertValidAddress(),\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 return new SimpleAllowList(\n { config: this._config, account: this._account },\n address,\n );\n }\n\n /**\n * The maximum number of claims that can be made (one per address)\n *\n * @public\n * @async\n * @param {?ReadParams<typeof allowListIncentiveAbi, 'limit'>} [params]\n * @returns {unknown}\n */\n public async limit(\n params?: ReadParams<typeof allowListIncentiveAbi, 'limit'>,\n ) {\n return await readAllowListIncentiveLimit(this._config, {\n address: this.assertValidAddress(),\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 * Claim a slot on the {@link SimpleAllowList}\n *\n * @public\n * @async\n * @param {Pick<ClaimPayload, 'target'>} payload\n * @param {?WriteParams<typeof allowListIncentiveAbi, 'claim'>} [params]\n * @returns {Promise<true>} - return true if successful, otherwise revert\n */\n protected async claim(\n payload: Pick<ClaimPayload, 'target'>,\n params?: WriteParams<typeof allowListIncentiveAbi, 'claim'>,\n ) {\n return await this.awaitResult(this.claimRaw(payload, params));\n }\n\n /**\n * Claim a slot on the {@link SimpleAllowList}\n *\n * @public\n * @async\n * @param {Pick<ClaimPayload, 'target'>} payload\n * @param {?WriteParams<typeof allowListIncentiveAbi, 'claim'>} [params]\n * @returns {Promise<true>} - return true if successful, otherwise revert\n */\n protected async claimRaw(\n payload: Pick<ClaimPayload, 'target'>,\n params?: WriteParams<typeof allowListIncentiveAbi, 'claim'>,\n ) {\n const { request, result } = await simulateAllowListIncentiveClaim(\n this._config,\n {\n address: this.assertValidAddress(),\n args: [prepareClaimPayload(payload)],\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 writeAllowListIncentiveClaim(this._config, request);\n return { hash, result };\n }\n\n /**\n * Check if an incentive is claimable\n *\n * @public\n * @async\n * @param {Pick<ClaimPayload, 'target'>} payload\n * @param {?ReadParams<typeof allowListIncentiveAbi, 'isClaimable'>} [params]\n * @returns {Promise<boolean>} - True if the incentive is claimable based on the data payload\n */\n public async isClaimable(\n payload: Pick<ClaimPayload, 'target'>,\n params?: ReadParams<typeof allowListIncentiveAbi, 'isClaimable'>,\n ) {\n return await readAllowListIncentiveIsClaimable(this._config, {\n address: this.assertValidAddress(),\n args: [prepareClaimPayload(payload)],\n // biome-ignore lint/suspicious/noExplicitAny: Accept any shape of valid wagmi/viem parameters, wagmi does the same thing internally\n ...(params as any),\n });\n }\n\n /**\n * @inheritdoc\n *\n * @public\n * @param {?AllowListIncentivePayload} [_payload]\n * @param {?DeployableOptions} [_options]\n * @returns {GenericDeployableParams}\n */\n public override buildParameters(\n _payload?: AllowListIncentivePayload,\n _options?: DeployableOptions,\n ): GenericDeployableParams {\n const [payload, options] = this.validateDeploymentConfig(\n _payload,\n _options,\n );\n return {\n abi: allowListIncentiveAbi,\n bytecode: bytecode as Hex,\n args: [prepareAllowListIncentivePayload(payload)],\n ...this.optionallyAttachAccount(options.account),\n };\n }\n}\n\n/**\n * Given a {@link AllowListIncentivePayload}, properly encode a `AllowListIncentive.InitPayload` for use with {@link AllowListIncentive} initialization.\n *\n * @param {AllowListIncentivePayload} param0\n * @param {Address} param0.allowList - The address to the allowlist to add claimers to.\n * @param {bigint} param0.limit - The maximum number of claims that can be made (one per address)\n * @returns {Hex}\n */\nexport const prepareAllowListIncentivePayload = ({\n allowList,\n limit,\n}: AllowListIncentivePayload) => {\n return encodeAbiParameters(\n [\n { type: 'address', name: 'allowList' },\n { type: 'uint256', name: 'limit' },\n ],\n [allowList, limit],\n );\n};\n"],"names":["_AllowListIncentive","DeployableTarget","allowListIncentiveAbi","params","readAllowListIncentiveOwner","readAllowListIncentiveClaims","readAllowListIncentiveReward","address","readAllowListIncentiveClaimed","readAllowListIncentiveAllowList","SimpleAllowList","readAllowListIncentiveLimit","payload","request","result","simulateAllowListIncentiveClaim","prepareClaimPayload","writeAllowListIncentiveClaim","readAllowListIncentiveIsClaimable","_payload","_options","options","bytecode","prepareAllowListIncentivePayload","AllowListIncentiveBases","RegistryType","AllowListIncentive","allowList","limit","encodeAbiParameters"],"mappings":"8jZAqFaA,EAAN,MAAMA,UAA2BC,EAAAA,gBAGtC,CAHK,aAAA,CAAA,MAAA,GAAA,SAAA,EAIL,KAAyB,IAAMC,GAAA,CA6B/B,MAAa,MACXC,EACA,CACO,OAAA,MAAMC,EAAAA,GAA4B,KAAK,QAAS,CACrD,QAAS,KAAK,mBAAmB,EACjC,KAAM,CAAC,EAEP,GAAID,CAAA,CACL,CACH,CAUA,MAAa,OACXA,EACA,CACO,OAAA,MAAME,EAAAA,GAA6B,KAAK,QAAS,CACtD,QAAS,KAAK,mBAAmB,EACjC,KAAM,CAAC,EAEP,GAAIF,CAAA,CACL,CACH,CAUA,MAAa,OACXA,EACA,CACO,OAAA,MAAMG,EAAAA,GAA6B,KAAK,QAAS,CACtD,QAAS,KAAK,mBAAmB,EACjC,KAAM,CAAC,EAEP,GAAIH,CAAA,CACL,CACH,CAWA,MAAa,QACXI,EACAJ,EACA,CACO,OAAA,MAAMK,EAAAA,GAA8B,KAAK,QAAS,CACvD,QAAS,KAAK,mBAAmB,EACjC,KAAM,CAACD,CAAO,EAEd,GAAIJ,CAAA,CACL,CACH,CAUA,MAAa,UACXA,EAC0B,CAC1B,MAAMI,EAAU,MAAME,KAAgC,KAAK,QAAS,CAClE,QAAS,KAAK,mBAAmB,EAEjC,GAAIN,CAAA,CACL,EACD,OAAO,IAAIO,EAAA,gBACT,CAAE,OAAQ,KAAK,QAAS,QAAS,KAAK,QAAS,EAC/CH,CAAA,CAEJ,CAUA,MAAa,MACXJ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
|
@@ -392,9 +392,9 @@ export declare class AllowListIncentive extends DeployableTarget<AllowListIncent
|
|
|
392
392
|
*
|
|
393
393
|
* @public
|
|
394
394
|
* @static
|
|
395
|
-
* @type {Address}
|
|
395
|
+
* @type {Record<number, Address>}
|
|
396
396
|
*/
|
|
397
|
-
static
|
|
397
|
+
static bases: Record<number, Address>;
|
|
398
398
|
/**
|
|
399
399
|
* @inheritdoc
|
|
400
400
|
*
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"AllowListIncentive.d.ts","sourceRoot":"","sources":["../../src/Incentives/AllowListIncentive.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,qBAAqB,EAUtB,MAAM,eAAe,CAAC;AAEvB,OAAO,EACL,KAAK,OAAO,EACZ,KAAK,iBAAiB,EAGvB,MAAM,MAAM,CAAC;
|
|
1
|
+
{"version":3,"file":"AllowListIncentive.d.ts","sourceRoot":"","sources":["../../src/Incentives/AllowListIncentive.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,qBAAqB,EAUtB,MAAM,eAAe,CAAC;AAEvB,OAAO,EACL,KAAK,OAAO,EACZ,KAAK,iBAAiB,EAGvB,MAAM,MAAM,CAAC;AAEd,OAAO,EAAE,eAAe,EAAE,MAAM,yBAAyB,CAAC;AAC1D,OAAO,KAAK,EACV,iBAAiB,EACjB,uBAAuB,EACxB,MAAM,0BAA0B,CAAC;AAClC,OAAO,EAAE,gBAAgB,EAAE,MAAM,gCAAgC,CAAC;AAClE,OAAO,EAAE,KAAK,YAAY,EAAuB,MAAM,aAAa,CAAC;AACrE,OAAO,EACL,KAAK,UAAU,EACf,KAAK,UAAU,EACf,YAAY,EACZ,KAAK,WAAW,EACjB,MAAM,UAAU,CAAC;AAElB,OAAO,EAAE,qBAAqB,EAAE,CAAC;AAEjC;;;;;;GAMG;AACH,MAAM,WAAW,yBAAyB;IACxC;;;;OAIG;IACH,SAAS,EAAE,OAAO,CAAC;IACnB;;;;OAIG;IACH,KAAK,EAAE,M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EAAE,OAAO,EAChB,MAAM,CAAC,EAAE,UAAU,CAAC,OAAO,qBAAqB,EAAE,SAAS,CAAC;IAU9D;;;;;;;OAOG;IACU,SAAS,CACpB,MAAM,CAAC,EAAE,UAAU,CAAC,OAAO,qBAAqB,EAAE,WAAW,CAAC,GAC7D,OAAO,CAAC,eAAe,CAAC;IAY3B;;;;;;;OAOG;IACU,KAAK,CAChB,MAAM,CAAC,EAAE,UAAU,CAAC,OAAO,qBAAqB,EAAE,OAAO,CAAC;IAS5D;;;;;;;;OAQG;cACa,KAAK,CACnB,OAAO,EAAE,IAAI,CAAC,YAAY,EAAE,QAAQ,CAAC,EACrC,MAAM,CAAC,EAAE,WAAW,CAAC,OAAO,qBAAqB,EAAE,OAAO,CAAC;IAK7D;;;;;;;;OAQG;cACa,QAAQ,CACtB,OAAO,EAAE,IAAI,CAAC,YAAY,EAAE,QAAQ,CAAC,EACrC,MAAM,CAAC,EAAE,WAAW,CAAC,OAAO,qBAAqB,EAAE,OAAO,CAAC;;;;IAgB7D;;;;;;;;OAQG;IACU,WAAW,CACtB,OAAO,EAAE,IAAI,CAAC,YAAY,EAAE,QAAQ,CAAC,EACrC,MAAM,CAAC,EAAE,UAAU,CAAC,OAAO,qBAAqB,EAAE,aAAa,CAAC;IAUlE;;;;;;;OAOG;IACa,eAAe,CAC7B,QAAQ,CAAC,EAAE,yBAAyB,EACpC,QAAQ,CAAC,EAAE,iBAAiB,GAC3B,uBAAuB;CAY3B;AAED;;;;;;;GAOG;AACH,eAAO,MAAM,gCAAgC,0BAG1C,yBAAyB,kBAQ3B,CAAC"}
|
|
@@ -1,12 +1,13 @@
|
|
|
1
|
-
import { A as c,
|
|
1
|
+
import { A as c, L as r, N as o, R as n, W as l, Z as h, $ as m, _ as u, a0 as p, a1 as g } from "../generated-LpgSHrH0.js";
|
|
2
2
|
import { encodeAbiParameters as y } from "viem";
|
|
3
|
+
import { A as w } from "../deployments-BvFcK_eR.js";
|
|
3
4
|
import "@wagmi/core";
|
|
4
|
-
import { SimpleAllowList as
|
|
5
|
-
import "../SimpleDenyList-
|
|
6
|
-
import { DeployableTarget as
|
|
5
|
+
import { SimpleAllowList as A } from "../AllowLists/SimpleAllowList.js";
|
|
6
|
+
import "../SimpleDenyList-C21O9Yfi.js";
|
|
7
|
+
import { DeployableTarget as _ } from "../Deployable/DeployableTarget.js";
|
|
7
8
|
import { prepareClaimPayload as s } from "../claiming.js";
|
|
8
9
|
import { RegistryType as V } from "../utils.js";
|
|
9
|
-
const _ = "0x6080604052348015600e575f80fd5b50601b601f60201b60201c565b60b0565b5f602c608760201b60201c565b90508054600181161560455763f92ee8a95f526004601cfd5b8160c01c808260011c146082578060011b8355806020527fc7f505b2f371ae2175ee4913f4499e1f2633a7b5936321eed1cdaeb6115181d2602080a15b505050565b5f7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffbf6011325f1b905090565b611791806100bd5f395ff3fe60806040526004361061011e575f3560e01c806387b9d25c1161009f578063db09da1211610063578063db09da1214610390578063dcc59b6f146103cc578063f04e283e146103f6578063f2fde38b14610412578063fee81cf41461042e5761011e565b806387b9d25c1461029a5780638da5cb5b146102c4578063a4d66daf146102ee578063bb1757cf14610318578063c884ef83146103545761011e565b8063439fab91116100e6578063439fab91146101e6578063474f5a441461020e5780634e7165a21461024a57806354d1f13d14610286578063715018a6146102905761011e565b806301ffc9a71461012257806307621eca1461015e578063228cb7331461018857806325692962146101b257806328d6183b146101bc575b5f80fd5b34801561012d575f80fd5b5061014860048036038101906101439190610fa9565b61046a565b6040516101559190610fee565b60405180910390f35b348015610169575f80fd5b506101726104e3565b60405161017f919061101f565b60405180910390f35b348015610193575f80fd5b5061019c6104ec565b6040516101a9919061101f565b60405180910390f35b6101ba6104f2565b005b3480156101c7575f80fd5b506101d0610543565b6040516101dd9190611047565b60405180910390f35b3480156101f1575f80fd5b5061020c600480360381019061020791906110c1565b61056a565b005b348015610219575f80fd5b50610234600480360381019061022f91906110c1565b61064a565b6040516102419190610fee565b60405180910390f35b348015610255575f80fd5b50610270600480360381019061026b91906110c1565b61067d565b60405161027d919061117c565b60405180910390f35b61028e6106d4565b005b61029861070d565b005b3480156102a5575f80fd5b506102ae610720565b6040516102bb9190611216565b60405180910390f35b3480156102cf575f80fd5b506102d8610745565b6040516102e5919061124f565b60405180910390f35b3480156102f9575f80fd5b5061030261076d565b60405161030f919061101f565b60405180910390f35b348015610323575f80fd5b5061033e60048036038101906103399190611292565b610773565b60405161034b9190610fee565b60405180910390f35b34801561035f575f80fd5b5061037a600480360381019061037591906112ef565b610918565b6040516103879190610fee565b60405180910390f35b34801561039b575f80fd5b506103b660048036038101906103b19190611292565b610935565b6040516103c39190610fee565b60405180910390f35b3480156103d7575f80fd5b506103e0610a3a565b6040516103ed919061101f565b60405180910390f35b610410600480360381019061040b91906112ef565b610a3f565b005b61042c600480360381019061042791906112ef565b610a7d565b005b348015610439575f80fd5b50610454600480360381019061044f91906112ef565b610aa6565b604051610461919061101f565b60405180910390f35b5f7f0a466e6f000000000000000000000000000000000000000000000000000000007bffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916827bffffffffffffffffffffffffffffffffffffffffffffffffffffffff191614806104dc57506104db82610abf565b5b9050919050565b5f600154905090565b60015481565b5f6104fb610b38565b67ffffffffffffffff164201905063389a75e1600c52335f52806020600c2055337fdbf36a107da19e49527a7176a1babf963b4b0ff8cde35ee35d6cd8f1f9ac7e1d5f80a250565b5f7f0a466e6f00000000000000000000000000000000000000000000000000000000905090565b5f610573610b42565b905080546003825580156105a55760018160011c14303b1061059c5763f92ee8a95f526004601cfd5b818160ff1b1b91505b505f83838101906105b69190611448565b90506105c133610b6b565b805f015160035f6101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff1602179055508060200151600481905550508015610645576002815560016020527fc7f505b2f371ae2175ee4913f4499e1f2633a7b5936321eed1cdaeb6115181d2602080a15b505050565b5f6040517fd623472500000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b60605f67ffffffffffffffff8111156106995761069861131e565b5b6040519080825280601f01601f1916602001820160405280156106cb5781602001600182028036833780820191505090505b50905092915050565b63389a75e1600c52335f525f6020600c2055337ffa7b8eab7da67f412cc9575ed43464468f9bfbae89d1675917346ca6d8fe3c925f80a2565b610715610c41565b61071e5f610c78565b565b60035f9054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b5f7fffffffffffffffffffffffffffffffffffffffffffffffffffffffff7487392754905090565b60045481565b5f61077c610c41565b6004545f80815480929190610790906114a0565b919050551015806107e7575060025f8573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020015f205f9054906101000a900460ff165b1561081e576040517f6247a84e00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b600160025f8673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020015f205f6101000a81548160ff0219169083151502179055505f8061087e86610d3e565b9150915060035f9054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16633abb060483836040518363ffffffff1660e01b81526004016108de929190611655565b5f604051808303815f87803b1580156108f5575f80fd5b505af1158015610907573d5f803e3d5ffd5b505050506001925050509392505050565b6002602052805f5260405f205f915054906101000a900460ff1681565b5f6004545f5410801561098f575060025f8573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020015f205f9054906101000a900460ff16155b8015610a31575060035f9054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1663e3f756de856040518263ffffffff1660e01b81526004016109f091906116ad565b602060405180830381865afa158015610a0b573d5f803e3d5ffd5b505050506040513d601f19601f82011682018060405250810190610a2f9190611703565b155b90509392505050565b5f5481565b610a47610c41565b63389a75e1600c52805f526020600c208054421115610a6d57636f5e88185f526004601cfd5b5f815550610a7a81610c78565b50565b610a85610c41565b8060601b610a9a57637448fbae5f526004601cfd5b610aa381610c78565b50565b5f63389a75e1600c52815f526020600c20549050919050565b5f7f5970a689000000000000000000000000000000000000000000000000000000007bffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916827bffffffffffffffffffffffffffffffffffffffffffffffffffffffff19161480610b315750610b3082610e5d565b5b9050919050565b5f6202a300905090565b5f7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffbf6011325f1b905090565b610b73610ed6565b15610beb577fffffffffffffffffffffffffffffffffffffffffffffffffffffffff74873927805415610bad57630dc149f05f526004601cfd5b8160601b60601c9150811560ff1b82178155815f7f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e05f80a350610c3e565b8060601b60601c9050807fffffffffffffffffffffffffffffffffffffffffffffffffffffffff7487392755805f7f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e05f80a35b50565b7fffffffffffffffffffffffffffffffffffffffffffffffffffffffff74873927543314610c76576382b429005f526004601cfd5b565b610c80610ed6565b15610ce5577fffffffffffffffffffffffffffffffffffffffffffffffffffffffff748739278160601b60601c91508181547f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e05f80a3811560ff1b8217815550610d3b565b7fffffffffffffffffffffffffffffffffffffffffffffffffffffffff748739278160601b60601c91508181547f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e05f80a3818155505b50565b6060805f600167ffffffffffffffff811115610d5d57610d5c61131e565b5b604051908082528060200260200182016040528015610d8b5781602001602082028036833780820191505090505b5090505f600167ffffffffffffffff811115610daa57610da961131e565b5b604051908082528060200260200182016040528015610dd85781602001602082028036833780820191505090505b50905084825f81518110610def57610dee61172e565b5b602002602001019073ffffffffffffffffffffffffffffffffffffffff16908173ffffffffffffffffffffffffffffffffffffffff16815250506001815f81518110610e3e57610e3d61172e565b5b6020026020010190151590811515815250508181935093505050915091565b5f7f6ab67a0d000000000000000000000000000000000000000000000000000000007bffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916827bffffffffffffffffffffffffffffffffffffffffffffffffffffffff19161480610ecf5750610ece82610eda565b5b9050919050565b5f90565b5f7f01ffc9a7000000000000000000000000000000000000000000000000000000007bffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916827bffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916149050919050565b5f604051905090565b5f80fd5b5f80fd5b5f7fffffffff0000000000000000000000000000000000000000000000000000000082169050919050565b610f8881610f54565b8114610f92575f80fd5b50565b5f81359050610fa381610f7f565b92915050565b5f60208284031215610fbe57610fbd610f4c565b5b5f610fcb84828501610f95565b91505092915050565b5f8115159050919050565b610fe881610fd4565b82525050565b5f6020820190506110015f830184610fdf565b92915050565b5f819050919050565b61101981611007565b82525050565b5f6020820190506110325f830184611010565b92915050565b61104181610f54565b82525050565b5f60208201905061105a5f830184611038565b92915050565b5f80fd5b5f80fd5b5f80fd5b5f8083601f84011261108157611080611060565b5b8235905067ffffffffffffffff81111561109e5761109d611064565b5b6020830191508360018202830111156110ba576110b9611068565b5b9250929050565b5f80602083850312156110d7576110d6610f4c565b5b5f83013567ffffffffffffffff8111156110f4576110f3610f50565b5b6111008582860161106c565b92509250509250929050565b5f81519050919050565b5f82825260208201905092915050565b8281835e5f83830152505050565b5f601f19601f8301169050919050565b5f61114e8261110c565b6111588185611116565b9350611168818560208601611126565b61117181611134565b840191505092915050565b5f6020820190508181035f8301526111948184611144565b905092915050565b5f73ffffffffffffffffffffffffffffffffffffffff82169050919050565b5f819050919050565b5f6111de6111d96111d48461119c565b6111bb565b61119c565b9050919050565b5f6111ef826111c4565b9050919050565b5f611200826111e5565b9050919050565b611210816111f6565b82525050565b5f6020820190506112295f830184611207565b92915050565b5f6112398261119c565b9050919050565b6112498161122f565b82525050565b5f6020820190506112625f830184611240565b92915050565b6112718161122f565b811461127b575f80fd5b50565b5f8135905061128c81611268565b92915050565b5f805f604084860312156112a9576112a8610f4c565b5b5f6112b68682870161127e565b935050602084013567ffffffffffffffff8111156112d7576112d6610f50565b5b6112e38682870161106c565b92509250509250925092565b5f6020828403121561130457611303610f4c565b5b5f6113118482850161127e565b91505092915050565b5f80fd5b7f4e487b71000000000000000000000000000000000000000000000000000000005f52604160045260245ffd5b61135482611134565b810181811067ffffffffffffffff821117156113735761137261131e565b5b80604052505050565b5f611385610f43565b9050611391828261134b565b919050565b5f6113a08261122f565b9050919050565b6113b081611396565b81146113ba575f80fd5b50565b5f813590506113cb816113a7565b92915050565b6113da81611007565b81146113e4575f80fd5b50565b5f813590506113f5816113d1565b92915050565b5f604082840312156114105761140f61131a565b5b61141a604061137c565b90505f611429848285016113bd565b5f83015250602061143c848285016113e7565b60208301525092915050565b5f6040828403121561145d5761145c610f4c565b5b5f61146a848285016113fb565b91505092915050565b7f4e487b71000000000000000000000000000000000000000000000000000000005f52601160045260245ffd5b5f6114aa82611007565b91507fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff82036114dc576114db611473565b5b600182019050919050565b5f81519050919050565b5f82825260208201905092915050565b5f819050602082019050919050565b6115198161122f565b82525050565b5f61152a8383611510565b60208301905092915050565b5f602082019050919050565b5f61154c826114e7565b61155681856114f1565b935061156183611501565b805f5b83811015611591578151611578888261151f565b975061158383611536565b925050600181019050611564565b5085935050505092915050565b5f81519050919050565b5f82825260208201905092915050565b5f819050602082019050919050565b6115d081610fd4565b82525050565b5f6115e183836115c7565b60208301905092915050565b5f602082019050919050565b5f6116038261159e565b61160d81856115a8565b9350611618836115b8565b805f5b8381101561164857815161162f88826115d6565b975061163a836115ed565b92505060018101905061161b565b5085935050505092915050565b5f6040820190508181035f83015261166d8185611542565b9050818103602083015261168181846115f9565b90509392505050565b50565b5f6116985f83611116565b91506116a38261168a565b5f82019050919050565b5f6040820190506116c05f830184611240565b81810360208301526116d18161168d565b905092915050565b6116e281610fd4565b81146116ec575f80fd5b50565b5f815190506116fd816116d9565b92915050565b5f6020828403121561171857611717610f4c565b5b5f611725848285016116ef565b91505092915050565b7f4e487b71000000000000000000000000000000000000000000000000000000005f52603260045260245ffdfea26469706673582212208bc630e11c065de18b61496283ea93bb882211261a2de5178b91a410f78a5c9a64736f6c634300081a0033", a = class a extends A {
|
|
10
|
+
const P = "0x6080604052348015600e575f80fd5b50601b601f60201b60201c565b60b0565b5f602c608760201b60201c565b90508054600181161560455763f92ee8a95f526004601cfd5b8160c01c808260011c146082578060011b8355806020527fc7f505b2f371ae2175ee4913f4499e1f2633a7b5936321eed1cdaeb6115181d2602080a15b505050565b5f7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffbf6011325f1b905090565b611791806100bd5f395ff3fe60806040526004361061011e575f3560e01c806387b9d25c1161009f578063db09da1211610063578063db09da1214610390578063dcc59b6f146103cc578063f04e283e146103f6578063f2fde38b14610412578063fee81cf41461042e5761011e565b806387b9d25c1461029a5780638da5cb5b146102c4578063a4d66daf146102ee578063bb1757cf14610318578063c884ef83146103545761011e565b8063439fab91116100e6578063439fab91146101e6578063474f5a441461020e5780634e7165a21461024a57806354d1f13d14610286578063715018a6146102905761011e565b806301ffc9a71461012257806307621eca1461015e578063228cb7331461018857806325692962146101b257806328d6183b146101bc575b5f80fd5b34801561012d575f80fd5b5061014860048036038101906101439190610fa9565b61046a565b6040516101559190610fee565b60405180910390f35b348015610169575f80fd5b506101726104e3565b60405161017f919061101f565b60405180910390f35b348015610193575f80fd5b5061019c6104ec565b6040516101a9919061101f565b60405180910390f35b6101ba6104f2565b005b3480156101c7575f80fd5b506101d0610543565b6040516101dd9190611047565b60405180910390f35b3480156101f1575f80fd5b5061020c600480360381019061020791906110c1565b61056a565b005b348015610219575f80fd5b50610234600480360381019061022f91906110c1565b61064a565b6040516102419190610fee565b60405180910390f35b348015610255575f80fd5b50610270600480360381019061026b91906110c1565b61067d565b60405161027d919061117c565b60405180910390f35b61028e6106d4565b005b61029861070d565b005b3480156102a5575f80fd5b506102ae610720565b6040516102bb9190611216565b60405180910390f35b3480156102cf575f80fd5b506102d8610745565b6040516102e5919061124f565b60405180910390f35b3480156102f9575f80fd5b5061030261076d565b60405161030f919061101f565b60405180910390f35b348015610323575f80fd5b5061033e60048036038101906103399190611292565b610773565b60405161034b9190610fee565b60405180910390f35b34801561035f575f80fd5b5061037a600480360381019061037591906112ef565b610918565b6040516103879190610fee565b60405180910390f35b34801561039b575f80fd5b506103b660048036038101906103b19190611292565b610935565b6040516103c39190610fee565b60405180910390f35b3480156103d7575f80fd5b506103e0610a3a565b6040516103ed919061101f565b60405180910390f35b610410600480360381019061040b91906112ef565b610a3f565b005b61042c600480360381019061042791906112ef565b610a7d565b005b348015610439575f80fd5b50610454600480360381019061044f91906112ef565b610aa6565b604051610461919061101f565b60405180910390f35b5f7f0a466e6f000000000000000000000000000000000000000000000000000000007bffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916827bffffffffffffffffffffffffffffffffffffffffffffffffffffffff191614806104dc57506104db82610abf565b5b9050919050565b5f600154905090565b60015481565b5f6104fb610b38565b67ffffffffffffffff164201905063389a75e1600c52335f52806020600c2055337fdbf36a107da19e49527a7176a1babf963b4b0ff8cde35ee35d6cd8f1f9ac7e1d5f80a250565b5f7f0a466e6f00000000000000000000000000000000000000000000000000000000905090565b5f610573610b42565b905080546003825580156105a55760018160011c14303b1061059c5763f92ee8a95f526004601cfd5b818160ff1b1b91505b505f83838101906105b69190611448565b90506105c133610b6b565b805f015160035f6101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff1602179055508060200151600481905550508015610645576002815560016020527fc7f505b2f371ae2175ee4913f4499e1f2633a7b5936321eed1cdaeb6115181d2602080a15b505050565b5f6040517fd623472500000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b60605f67ffffffffffffffff8111156106995761069861131e565b5b6040519080825280601f01601f1916602001820160405280156106cb5781602001600182028036833780820191505090505b50905092915050565b63389a75e1600c52335f525f6020600c2055337ffa7b8eab7da67f412cc9575ed43464468f9bfbae89d1675917346ca6d8fe3c925f80a2565b610715610c41565b61071e5f610c78565b565b60035f9054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b5f7fffffffffffffffffffffffffffffffffffffffffffffffffffffffff7487392754905090565b60045481565b5f61077c610c41565b6004545f80815480929190610790906114a0565b919050551015806107e7575060025f8573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020015f205f9054906101000a900460ff165b1561081e576040517f6247a84e00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b600160025f8673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020015f205f6101000a81548160ff0219169083151502179055505f8061087e86610d3e565b9150915060035f9054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16633abb060483836040518363ffffffff1660e01b81526004016108de929190611655565b5f604051808303815f87803b1580156108f5575f80fd5b505af1158015610907573d5f803e3d5ffd5b505050506001925050509392505050565b6002602052805f5260405f205f915054906101000a900460ff1681565b5f6004545f5410801561098f575060025f8573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020015f205f9054906101000a900460ff16155b8015610a31575060035f9054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1663e3f756de856040518263ffffffff1660e01b81526004016109f091906116ad565b602060405180830381865afa158015610a0b573d5f803e3d5ffd5b505050506040513d601f19601f82011682018060405250810190610a2f9190611703565b155b90509392505050565b5f5481565b610a47610c41565b63389a75e1600c52805f526020600c208054421115610a6d57636f5e88185f526004601cfd5b5f815550610a7a81610c78565b50565b610a85610c41565b8060601b610a9a57637448fbae5f526004601cfd5b610aa381610c78565b50565b5f63389a75e1600c52815f526020600c20549050919050565b5f7f5970a689000000000000000000000000000000000000000000000000000000007bffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916827bffffffffffffffffffffffffffffffffffffffffffffffffffffffff19161480610b315750610b3082610e5d565b5b9050919050565b5f6202a300905090565b5f7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffbf6011325f1b905090565b610b73610ed6565b15610beb577fffffffffffffffffffffffffffffffffffffffffffffffffffffffff74873927805415610bad57630dc149f05f526004601cfd5b8160601b60601c9150811560ff1b82178155815f7f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e05f80a350610c3e565b8060601b60601c9050807fffffffffffffffffffffffffffffffffffffffffffffffffffffffff7487392755805f7f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e05f80a35b50565b7fffffffffffffffffffffffffffffffffffffffffffffffffffffffff74873927543314610c76576382b429005f526004601cfd5b565b610c80610ed6565b15610ce5577fffffffffffffffffffffffffffffffffffffffffffffffffffffffff748739278160601b60601c91508181547f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e05f80a3811560ff1b8217815550610d3b565b7fffffffffffffffffffffffffffffffffffffffffffffffffffffffff748739278160601b60601c91508181547f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e05f80a3818155505b50565b6060805f600167ffffffffffffffff811115610d5d57610d5c61131e565b5b604051908082528060200260200182016040528015610d8b5781602001602082028036833780820191505090505b5090505f600167ffffffffffffffff811115610daa57610da961131e565b5b604051908082528060200260200182016040528015610dd85781602001602082028036833780820191505090505b50905084825f81518110610def57610dee61172e565b5b602002602001019073ffffffffffffffffffffffffffffffffffffffff16908173ffffffffffffffffffffffffffffffffffffffff16815250506001815f81518110610e3e57610e3d61172e565b5b6020026020010190151590811515815250508181935093505050915091565b5f7f6ab67a0d000000000000000000000000000000000000000000000000000000007bffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916827bffffffffffffffffffffffffffffffffffffffffffffffffffffffff19161480610ecf5750610ece82610eda565b5b9050919050565b5f90565b5f7f01ffc9a7000000000000000000000000000000000000000000000000000000007bffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916827bffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916149050919050565b5f604051905090565b5f80fd5b5f80fd5b5f7fffffffff0000000000000000000000000000000000000000000000000000000082169050919050565b610f8881610f54565b8114610f92575f80fd5b50565b5f81359050610fa381610f7f565b92915050565b5f60208284031215610fbe57610fbd610f4c565b5b5f610fcb84828501610f95565b91505092915050565b5f8115159050919050565b610fe881610fd4565b82525050565b5f6020820190506110015f830184610fdf565b92915050565b5f819050919050565b61101981611007565b82525050565b5f6020820190506110325f830184611010565b92915050565b61104181610f54565b82525050565b5f60208201905061105a5f830184611038565b92915050565b5f80fd5b5f80fd5b5f80fd5b5f8083601f84011261108157611080611060565b5b8235905067ffffffffffffffff81111561109e5761109d611064565b5b6020830191508360018202830111156110ba576110b9611068565b5b9250929050565b5f80602083850312156110d7576110d6610f4c565b5b5f83013567ffffffffffffffff8111156110f4576110f3610f50565b5b6111008582860161106c565b92509250509250929050565b5f81519050919050565b5f82825260208201905092915050565b8281835e5f83830152505050565b5f601f19601f8301169050919050565b5f61114e8261110c565b6111588185611116565b9350611168818560208601611126565b61117181611134565b840191505092915050565b5f6020820190508181035f8301526111948184611144565b905092915050565b5f73ffffffffffffffffffffffffffffffffffffffff82169050919050565b5f819050919050565b5f6111de6111d96111d48461119c565b6111bb565b61119c565b9050919050565b5f6111ef826111c4565b9050919050565b5f611200826111e5565b9050919050565b611210816111f6565b82525050565b5f6020820190506112295f830184611207565b92915050565b5f6112398261119c565b9050919050565b6112498161122f565b82525050565b5f6020820190506112625f830184611240565b92915050565b6112718161122f565b811461127b575f80fd5b50565b5f8135905061128c81611268565b92915050565b5f805f604084860312156112a9576112a8610f4c565b5b5f6112b68682870161127e565b935050602084013567ffffffffffffffff8111156112d7576112d6610f50565b5b6112e38682870161106c565b92509250509250925092565b5f6020828403121561130457611303610f4c565b5b5f6113118482850161127e565b91505092915050565b5f80fd5b7f4e487b71000000000000000000000000000000000000000000000000000000005f52604160045260245ffd5b61135482611134565b810181811067ffffffffffffffff821117156113735761137261131e565b5b80604052505050565b5f611385610f43565b9050611391828261134b565b919050565b5f6113a08261122f565b9050919050565b6113b081611396565b81146113ba575f80fd5b50565b5f813590506113cb816113a7565b92915050565b6113da81611007565b81146113e4575f80fd5b50565b5f813590506113f5816113d1565b92915050565b5f604082840312156114105761140f61131a565b5b61141a604061137c565b90505f611429848285016113bd565b5f83015250602061143c848285016113e7565b60208301525092915050565b5f6040828403121561145d5761145c610f4c565b5b5f61146a848285016113fb565b91505092915050565b7f4e487b71000000000000000000000000000000000000000000000000000000005f52601160045260245ffd5b5f6114aa82611007565b91507fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff82036114dc576114db611473565b5b600182019050919050565b5f81519050919050565b5f82825260208201905092915050565b5f819050602082019050919050565b6115198161122f565b82525050565b5f61152a8383611510565b60208301905092915050565b5f602082019050919050565b5f61154c826114e7565b61155681856114f1565b935061156183611501565b805f5b83811015611591578151611578888261151f565b975061158383611536565b925050600181019050611564565b5085935050505092915050565b5f81519050919050565b5f82825260208201905092915050565b5f819050602082019050919050565b6115d081610fd4565b82525050565b5f6115e183836115c7565b60208301905092915050565b5f602082019050919050565b5f6116038261159e565b61160d81856115a8565b9350611618836115b8565b805f5b8381101561164857815161162f88826115d6565b975061163a836115ed565b92505060018101905061161b565b5085935050505092915050565b5f6040820190508181035f83015261166d8185611542565b9050818103602083015261168181846115f9565b90509392505050565b50565b5f6116985f83611116565b91506116a38261168a565b5f82019050919050565b5f6040820190506116c05f830184611240565b81810360208301526116d18161168d565b905092915050565b6116e281610fd4565b81146116ec575f80fd5b50565b5f815190506116fd816116d9565b92915050565b5f6020828403121561171857611717610f4c565b5b5f611725848285016116ef565b91505092915050565b7f4e487b71000000000000000000000000000000000000000000000000000000005f52603260045260245ffdfea26469706673582212208bc630e11c065de18b61496283ea93bb882211261a2de5178b91a410f78a5c9a64736f6c634300081a0033", a = class a extends _ {
|
|
10
11
|
constructor() {
|
|
11
12
|
super(...arguments), this.abi = c;
|
|
12
13
|
}
|
|
@@ -89,7 +90,7 @@ const _ = "0x6080604052348015600e575f80fd5b50601b601f60201b60201c565b60b0565b5f6
|
|
|
89
90
|
// biome-ignore lint/suspicious/noExplicitAny: Accept any shape of valid wagmi/viem parameters, wagmi does the same thing internally
|
|
90
91
|
...f
|
|
91
92
|
});
|
|
92
|
-
return new
|
|
93
|
+
return new A(
|
|
93
94
|
{ config: this._config, account: this._account },
|
|
94
95
|
b
|
|
95
96
|
);
|
|
@@ -103,7 +104,7 @@ const _ = "0x6080604052348015600e575f80fd5b50601b601f60201b60201c565b60b0565b5f6
|
|
|
103
104
|
* @returns {unknown}
|
|
104
105
|
*/
|
|
105
106
|
async limit(f) {
|
|
106
|
-
return await
|
|
107
|
+
return await m(this._config, {
|
|
107
108
|
address: this.assertValidAddress(),
|
|
108
109
|
// biome-ignore lint/suspicious/noExplicitAny: Accept any shape of valid wagmi/viem parameters, wagmi does the same thing internally
|
|
109
110
|
...f
|
|
@@ -131,7 +132,7 @@ const _ = "0x6080604052348015600e575f80fd5b50601b601f60201b60201c565b60b0565b5f6
|
|
|
131
132
|
* @returns {Promise<true>} - return true if successful, otherwise revert
|
|
132
133
|
*/
|
|
133
134
|
async claimRaw(f, b) {
|
|
134
|
-
const { request: e, result: d } = await
|
|
135
|
+
const { request: e, result: d } = await u(
|
|
135
136
|
this._config,
|
|
136
137
|
{
|
|
137
138
|
address: this.assertValidAddress(),
|
|
@@ -175,15 +176,18 @@ const _ = "0x6080604052348015600e575f80fd5b50601b601f60201b60201c565b60b0565b5f6
|
|
|
175
176
|
);
|
|
176
177
|
return {
|
|
177
178
|
abi: c,
|
|
178
|
-
bytecode:
|
|
179
|
-
args: [
|
|
179
|
+
bytecode: P,
|
|
180
|
+
args: [R(e)],
|
|
180
181
|
...this.optionallyAttachAccount(d.account)
|
|
181
182
|
};
|
|
182
183
|
}
|
|
183
184
|
};
|
|
184
|
-
a.
|
|
185
|
+
a.bases = {
|
|
186
|
+
...w,
|
|
187
|
+
31337: "0x8d80dfac4927387E6819B76b850aF50d2E29835a"
|
|
188
|
+
}, a.registryType = V.INCENTIVE;
|
|
185
189
|
let t = a;
|
|
186
|
-
const
|
|
190
|
+
const R = ({
|
|
187
191
|
allowList: i,
|
|
188
192
|
limit: f
|
|
189
193
|
}) => y(
|
|
@@ -196,6 +200,6 @@ const P = ({
|
|
|
196
200
|
export {
|
|
197
201
|
t as AllowListIncentive,
|
|
198
202
|
c as allowListIncentiveAbi,
|
|
199
|
-
|
|
203
|
+
R as prepareAllowListIncentivePayload
|
|
200
204
|
};
|
|
201
205
|
//# sourceMappingURL=AllowListIncentive.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"AllowListIncentive.js","sources":["../../src/Incentives/AllowListIncentive.ts"],"sourcesContent":["import {\n allowListIncentiveAbi,\n readAllowListIncentiveAllowList,\n readAllowListIncentiveClaimed,\n readAllowListIncentiveClaims,\n readAllowListIncentiveIsClaimable,\n readAllowListIncentiveLimit,\n readAllowListIncentiveOwner,\n readAllowListIncentiveReward,\n simulateAllowListIncentiveClaim,\n writeAllowListIncentiveClaim,\n} from '@boostxyz/evm';\nimport { bytecode } from '@boostxyz/evm/artifacts/contracts/incentives/AllowListIncentive.sol/AllowListIncentive.json';\nimport {\n type Address,\n type ContractEventName,\n type Hex,\n encodeAbiParameters,\n} from 'viem';\nimport { SimpleAllowList } from '../AllowLists/AllowList';\nimport type {\n DeployableOptions,\n GenericDeployableParams,\n} from '../Deployable/Deployable';\nimport { DeployableTarget } from '../Deployable/DeployableTarget';\nimport { type ClaimPayload, prepareClaimPayload } from '../claiming';\nimport {\n type GenericLog,\n type ReadParams,\n RegistryType,\n type WriteParams,\n} from '../utils';\n\nexport { allowListIncentiveAbi };\n\n/**\n * The object representation of a `AllowListIncentive.InitPayload`\n *\n * @export\n * @interface AllowListIncentivePayload\n * @typedef {AllowListIncentivePayload}\n */\nexport interface AllowListIncentivePayload {\n /**\n * The address to the allowlist to add claimers to.\n *\n * @type {Address}\n */\n allowList: Address;\n /**\n * The maximum number of claims that can be made (one per address)\n *\n * @type {bigint}\n */\n limit: bigint;\n}\n\n/**\n * A generic `viem.Log` event with support for `AllowListIncentive` event types.\n *\n * @export\n * @typedef {AllowListIncentiveLog}\n * @template {ContractEventName<\n * typeof allowListIncentiveAbi\n * >} [event=ContractEventName<typeof allowListIncentiveAbi>]\n */\nexport type AllowListIncentiveLog<\n event extends ContractEventName<\n typeof allowListIncentiveAbi\n > = ContractEventName<typeof allowListIncentiveAbi>,\n> = GenericLog<typeof allowListIncentiveAbi, event>;\n\n/**\n * An incentive implementation that grants the claimer a slot on an {SimpleAllowList}\n * In order for any claim to be successful:\n * - The claimer must not already be on the allow list; and\n * - The maximum number of claims must not have been reached; and\n * - This contract must be authorized to modify the allow list\n *\n * @export\n * @class AllowListIncentive\n * @typedef {AllowListIncentive}\n * @extends {DeployableTarget<AllowListIncentivePayload>}\n */\nexport class AllowListIncentive extends DeployableTarget<\n AllowListIncentivePayload,\n typeof allowListIncentiveAbi\n> {\n public override readonly abi = allowListIncentiveAbi;\n /**\n * @inheritdoc\n *\n * @public\n * @static\n * @type {Address}\n */\n public static override base: Address = import.meta.env\n .VITE_ALLOWLIST_INCENTIVE_BASE;\n /**\n * @inheritdoc\n *\n * @public\n * @static\n * @type {RegistryType}\n */\n public static override registryType: RegistryType = RegistryType.INCENTIVE;\n\n /**\n * The owner of the allowList\n *\n * @public\n * @async\n * @param {?ReadParams<typeof allowListIncentiveAbi, 'owner'>} [params]\n * @returns {unknown}\n */\n public async owner(\n params?: ReadParams<typeof allowListIncentiveAbi, 'owner'>,\n ) {\n return await readAllowListIncentiveOwner(this._config, {\n address: this.assertValidAddress(),\n args: [],\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 * The number of claims that have been made\n *\n * @public\n * @async\n * @param {?ReadParams<typeof allowListIncentiveAbi, 'claims'>} [params]\n * @returns {Promise<bigint>}\n */\n public async claims(\n params?: ReadParams<typeof allowListIncentiveAbi, 'claims'>,\n ) {\n return await readAllowListIncentiveClaims(this._config, {\n address: this.assertValidAddress(),\n args: [],\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 * The reward amount issued for each claim\n *\n * @public\n * @async\n * @param {?ReadParams<typeof allowListIncentiveAbi, 'reward'>} [params]\n * @returns {Promise<bigint>}\n */\n public async reward(\n params?: ReadParams<typeof allowListIncentiveAbi, 'reward'>,\n ) {\n return await readAllowListIncentiveReward(this._config, {\n address: this.assertValidAddress(),\n args: [],\n // biome-ignore lint/suspicious/noExplicitAny: Accept any shape of valid wagmi/viem parameters, wagmi does the same thing internally\n ...(params as any),\n });\n }\n\n /**\n * Get the claim status for a user\n *\n * @public\n * @async\n * @param {Address} address\n * @param {?ReadParams<typeof allowListIncentiveAbi, 'claimed'>} [params]\n * @returns {Promise<boolean>}\n */\n public async claimed(\n address: Address,\n params?: ReadParams<typeof allowListIncentiveAbi, 'claimed'>,\n ) {\n return await readAllowListIncentiveClaimed(this._config, {\n address: this.assertValidAddress(),\n args: [address],\n // biome-ignore lint/suspicious/noExplicitAny: Accept any shape of valid wagmi/viem parameters, wagmi does the same thing internally\n ...(params as any),\n });\n }\n\n /**\n * The {@link SimpleAllowList} contract\n *\n * @public\n * @async\n * @param {?ReadParams<typeof allowListIncentiveAbi, 'allowList'>} [params]\n * @returns {Promise<SimpleAllowList>}\n */\n public async allowList(\n params?: ReadParams<typeof allowListIncentiveAbi, 'allowList'>,\n ): Promise<SimpleAllowList> {\n const address = await readAllowListIncentiveAllowList(this._config, {\n address: this.assertValidAddress(),\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 return new SimpleAllowList(\n { config: this._config, account: this._account },\n address,\n );\n }\n\n /**\n * The maximum number of claims that can be made (one per address)\n *\n * @public\n * @async\n * @param {?ReadParams<typeof allowListIncentiveAbi, 'limit'>} [params]\n * @returns {unknown}\n */\n public async limit(\n params?: ReadParams<typeof allowListIncentiveAbi, 'limit'>,\n ) {\n return await readAllowListIncentiveLimit(this._config, {\n address: this.assertValidAddress(),\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 * Claim a slot on the {@link SimpleAllowList}\n *\n * @public\n * @async\n * @param {Pick<ClaimPayload, 'target'>} payload\n * @param {?WriteParams<typeof allowListIncentiveAbi, 'claim'>} [params]\n * @returns {Promise<true>} - return true if successful, otherwise revert\n */\n protected async claim(\n payload: Pick<ClaimPayload, 'target'>,\n params?: WriteParams<typeof allowListIncentiveAbi, 'claim'>,\n ) {\n return await this.awaitResult(this.claimRaw(payload, params));\n }\n\n /**\n * Claim a slot on the {@link SimpleAllowList}\n *\n * @public\n * @async\n * @param {Pick<ClaimPayload, 'target'>} payload\n * @param {?WriteParams<typeof allowListIncentiveAbi, 'claim'>} [params]\n * @returns {Promise<true>} - return true if successful, otherwise revert\n */\n protected async claimRaw(\n payload: Pick<ClaimPayload, 'target'>,\n params?: WriteParams<typeof allowListIncentiveAbi, 'claim'>,\n ) {\n const { request, result } = await simulateAllowListIncentiveClaim(\n this._config,\n {\n address: this.assertValidAddress(),\n args: [prepareClaimPayload(payload)],\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 writeAllowListIncentiveClaim(this._config, request);\n return { hash, result };\n }\n\n /**\n * Check if an incentive is claimable\n *\n * @public\n * @async\n * @param {Pick<ClaimPayload, 'target'>} payload\n * @param {?ReadParams<typeof allowListIncentiveAbi, 'isClaimable'>} [params]\n * @returns {Promise<boolean>} - True if the incentive is claimable based on the data payload\n */\n public async isClaimable(\n payload: Pick<ClaimPayload, 'target'>,\n params?: ReadParams<typeof allowListIncentiveAbi, 'isClaimable'>,\n ) {\n return await readAllowListIncentiveIsClaimable(this._config, {\n address: this.assertValidAddress(),\n args: [prepareClaimPayload(payload)],\n // biome-ignore lint/suspicious/noExplicitAny: Accept any shape of valid wagmi/viem parameters, wagmi does the same thing internally\n ...(params as any),\n });\n }\n\n /**\n * @inheritdoc\n *\n * @public\n * @param {?AllowListIncentivePayload} [_payload]\n * @param {?DeployableOptions} [_options]\n * @returns {GenericDeployableParams}\n */\n public override buildParameters(\n _payload?: AllowListIncentivePayload,\n _options?: DeployableOptions,\n ): GenericDeployableParams {\n const [payload, options] = this.validateDeploymentConfig(\n _payload,\n _options,\n );\n return {\n abi: allowListIncentiveAbi,\n bytecode: bytecode as Hex,\n args: [prepareAllowListIncentivePayload(payload)],\n ...this.optionallyAttachAccount(options.account),\n };\n }\n}\n\n/**\n * Given a {@link AllowListIncentivePayload}, properly encode a `AllowListIncentive.InitPayload` for use with {@link AllowListIncentive} initialization.\n *\n * @param {AllowListIncentivePayload} param0\n * @param {Address} param0.allowList - The address to the allowlist to add claimers to.\n * @param {bigint} param0.limit - The maximum number of claims that can be made (one per address)\n * @returns {Hex}\n */\nexport const prepareAllowListIncentivePayload = ({\n allowList,\n limit,\n}: AllowListIncentivePayload) => {\n return encodeAbiParameters(\n [\n { type: 'address', name: 'allowList' },\n { type: 'uint256', name: 'limit' },\n ],\n [allowList, limit],\n );\n};\n"],"names":["_AllowListIncentive","DeployableTarget","allowListIncentiveAbi","params","readAllowListIncentiveOwner","readAllowListIncentiveClaims","readAllowListIncentiveReward","address","readAllowListIncentiveClaimed","readAllowListIncentiveAllowList","SimpleAllowList","readAllowListIncentiveLimit","payload","request","result","simulateAllowListIncentiveClaim","prepareClaimPayload","writeAllowListIncentiveClaim","readAllowListIncentiveIsClaimable","_payload","_options","options","bytecode","prepareAllowListIncentivePayload","RegistryType","AllowListIncentive","allowList","limit","encodeAbiParameters"],"mappings":";;;;;;;;4qYAoFaA,IAAN,MAAMA,UAA2BC,EAGtC;AAAA,EAHK,cAAA;AAAA,UAAA,GAAA,SAAA,GAIL,KAAyB,MAAMC;AAAAA,EAAA;AAAA;AAAA;AAAA;AAAA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ACA,MAAM,CAACC,EAAiCX,CAAO,CAAC;AAAA,MAChD,GAAG,KAAK,wBAAwBS,EAAQ,OAAO;AAAA,IAAA;AAAA,EAEnD;AACF;AAxNyBrB,EAAA,OAAgB,8CASvCA,EAAuB,eAA6BwB,EAAa;AArB5D,IAAMC,IAANzB;AA8OA,MAAMuB,IAAmC,CAAC;AAAA,EAC/C,WAAAG;AAAA,EACA,OAAAC;AACF,MACSC;AAAA,EACL;AAAA,IACE,EAAE,MAAM,WAAW,MAAM,YAAY;AAAA,IACrC,EAAE,MAAM,WAAW,MAAM,QAAQ;AAAA,EACnC;AAAA,EACA,CAACF,GAAWC,CAAK;AAAA;"}
|
|
1
|
+
{"version":3,"file":"AllowListIncentive.js","sources":["../../src/Incentives/AllowListIncentive.ts"],"sourcesContent":["import {\n allowListIncentiveAbi,\n readAllowListIncentiveAllowList,\n readAllowListIncentiveClaimed,\n readAllowListIncentiveClaims,\n readAllowListIncentiveIsClaimable,\n readAllowListIncentiveLimit,\n readAllowListIncentiveOwner,\n readAllowListIncentiveReward,\n simulateAllowListIncentiveClaim,\n writeAllowListIncentiveClaim,\n} from '@boostxyz/evm';\nimport { bytecode } from '@boostxyz/evm/artifacts/contracts/incentives/AllowListIncentive.sol/AllowListIncentive.json';\nimport {\n type Address,\n type ContractEventName,\n type Hex,\n encodeAbiParameters,\n} from 'viem';\nimport { AllowListIncentive as AllowListIncentiveBases } from '../../dist/deployments.json';\nimport { SimpleAllowList } from '../AllowLists/AllowList';\nimport type {\n DeployableOptions,\n GenericDeployableParams,\n} from '../Deployable/Deployable';\nimport { DeployableTarget } from '../Deployable/DeployableTarget';\nimport { type ClaimPayload, prepareClaimPayload } from '../claiming';\nimport {\n type GenericLog,\n type ReadParams,\n RegistryType,\n type WriteParams,\n} from '../utils';\n\nexport { allowListIncentiveAbi };\n\n/**\n * The object representation of a `AllowListIncentive.InitPayload`\n *\n * @export\n * @interface AllowListIncentivePayload\n * @typedef {AllowListIncentivePayload}\n */\nexport interface AllowListIncentivePayload {\n /**\n * The address to the allowlist to add claimers to.\n *\n * @type {Address}\n */\n allowList: Address;\n /**\n * The maximum number of claims that can be made (one per address)\n *\n * @type {bigint}\n */\n limit: bigint;\n}\n\n/**\n * A generic `viem.Log` event with support for `AllowListIncentive` event types.\n *\n * @export\n * @typedef {AllowListIncentiveLog}\n * @template {ContractEventName<\n * typeof allowListIncentiveAbi\n * >} [event=ContractEventName<typeof allowListIncentiveAbi>]\n */\nexport type AllowListIncentiveLog<\n event extends ContractEventName<\n typeof allowListIncentiveAbi\n > = ContractEventName<typeof allowListIncentiveAbi>,\n> = GenericLog<typeof allowListIncentiveAbi, event>;\n\n/**\n * An incentive implementation that grants the claimer a slot on an {SimpleAllowList}\n * In order for any claim to be successful:\n * - The claimer must not already be on the allow list; and\n * - The maximum number of claims must not have been reached; and\n * - This contract must be authorized to modify the allow list\n *\n * @export\n * @class AllowListIncentive\n * @typedef {AllowListIncentive}\n * @extends {DeployableTarget<AllowListIncentivePayload>}\n */\nexport class AllowListIncentive extends DeployableTarget<\n AllowListIncentivePayload,\n typeof allowListIncentiveAbi\n> {\n public override readonly abi = allowListIncentiveAbi;\n /**\n * @inheritdoc\n *\n * @public\n * @static\n * @type {Record<number, Address>}\n */\n public static override bases: Record<number, Address> = {\n ...(AllowListIncentiveBases as Record<number, Address>),\n 31337: import.meta.env.VITE_ALLOWLIST_INCENTIVE_BASE,\n };\n /**\n * @inheritdoc\n *\n * @public\n * @static\n * @type {RegistryType}\n */\n public static override registryType: RegistryType = RegistryType.INCENTIVE;\n\n /**\n * The owner of the allowList\n *\n * @public\n * @async\n * @param {?ReadParams<typeof allowListIncentiveAbi, 'owner'>} [params]\n * @returns {unknown}\n */\n public async owner(\n params?: ReadParams<typeof allowListIncentiveAbi, 'owner'>,\n ) {\n return await readAllowListIncentiveOwner(this._config, {\n address: this.assertValidAddress(),\n args: [],\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 * The number of claims that have been made\n *\n * @public\n * @async\n * @param {?ReadParams<typeof allowListIncentiveAbi, 'claims'>} [params]\n * @returns {Promise<bigint>}\n */\n public async claims(\n params?: ReadParams<typeof allowListIncentiveAbi, 'claims'>,\n ) {\n return await readAllowListIncentiveClaims(this._config, {\n address: this.assertValidAddress(),\n args: [],\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 * The reward amount issued for each claim\n *\n * @public\n * @async\n * @param {?ReadParams<typeof allowListIncentiveAbi, 'reward'>} [params]\n * @returns {Promise<bigint>}\n */\n public async reward(\n params?: ReadParams<typeof allowListIncentiveAbi, 'reward'>,\n ) {\n return await readAllowListIncentiveReward(this._config, {\n address: this.assertValidAddress(),\n args: [],\n // biome-ignore lint/suspicious/noExplicitAny: Accept any shape of valid wagmi/viem parameters, wagmi does the same thing internally\n ...(params as any),\n });\n }\n\n /**\n * Get the claim status for a user\n *\n * @public\n * @async\n * @param {Address} address\n * @param {?ReadParams<typeof allowListIncentiveAbi, 'claimed'>} [params]\n * @returns {Promise<boolean>}\n */\n public async claimed(\n address: Address,\n params?: ReadParams<typeof allowListIncentiveAbi, 'claimed'>,\n ) {\n return await readAllowListIncentiveClaimed(this._config, {\n address: this.assertValidAddress(),\n args: [address],\n // biome-ignore lint/suspicious/noExplicitAny: Accept any shape of valid wagmi/viem parameters, wagmi does the same thing internally\n ...(params as any),\n });\n }\n\n /**\n * The {@link SimpleAllowList} contract\n *\n * @public\n * @async\n * @param {?ReadParams<typeof allowListIncentiveAbi, 'allowList'>} [params]\n * @returns {Promise<SimpleAllowList>}\n */\n public async allowList(\n params?: ReadParams<typeof allowListIncentiveAbi, 'allowList'>,\n ): Promise<SimpleAllowList> {\n const address = await readAllowListIncentiveAllowList(this._config, {\n address: this.assertValidAddress(),\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 return new SimpleAllowList(\n { config: this._config, account: this._account },\n address,\n );\n }\n\n /**\n * The maximum number of claims that can be made (one per address)\n *\n * @public\n * @async\n * @param {?ReadParams<typeof allowListIncentiveAbi, 'limit'>} [params]\n * @returns {unknown}\n */\n public async limit(\n params?: ReadParams<typeof allowListIncentiveAbi, 'limit'>,\n ) {\n return await readAllowListIncentiveLimit(this._config, {\n address: this.assertValidAddress(),\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 * Claim a slot on the {@link SimpleAllowList}\n *\n * @public\n * @async\n * @param {Pick<ClaimPayload, 'target'>} payload\n * @param {?WriteParams<typeof allowListIncentiveAbi, 'claim'>} [params]\n * @returns {Promise<true>} - return true if successful, otherwise revert\n */\n protected async claim(\n payload: Pick<ClaimPayload, 'target'>,\n params?: WriteParams<typeof allowListIncentiveAbi, 'claim'>,\n ) {\n return await this.awaitResult(this.claimRaw(payload, params));\n }\n\n /**\n * Claim a slot on the {@link SimpleAllowList}\n *\n * @public\n * @async\n * @param {Pick<ClaimPayload, 'target'>} payload\n * @param {?WriteParams<typeof allowListIncentiveAbi, 'claim'>} [params]\n * @returns {Promise<true>} - return true if successful, otherwise revert\n */\n protected async claimRaw(\n payload: Pick<ClaimPayload, 'target'>,\n params?: WriteParams<typeof allowListIncentiveAbi, 'claim'>,\n ) {\n const { request, result } = await simulateAllowListIncentiveClaim(\n this._config,\n {\n address: this.assertValidAddress(),\n args: [prepareClaimPayload(payload)],\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 writeAllowListIncentiveClaim(this._config, request);\n return { hash, result };\n }\n\n /**\n * Check if an incentive is claimable\n *\n * @public\n * @async\n * @param {Pick<ClaimPayload, 'target'>} payload\n * @param {?ReadParams<typeof allowListIncentiveAbi, 'isClaimable'>} [params]\n * @returns {Promise<boolean>} - True if the incentive is claimable based on the data payload\n */\n public async isClaimable(\n payload: Pick<ClaimPayload, 'target'>,\n params?: ReadParams<typeof allowListIncentiveAbi, 'isClaimable'>,\n ) {\n return await readAllowListIncentiveIsClaimable(this._config, {\n address: this.assertValidAddress(),\n args: [prepareClaimPayload(payload)],\n // biome-ignore lint/suspicious/noExplicitAny: Accept any shape of valid wagmi/viem parameters, wagmi does the same thing internally\n ...(params as any),\n });\n }\n\n /**\n * @inheritdoc\n *\n * @public\n * @param {?AllowListIncentivePayload} [_payload]\n * @param {?DeployableOptions} [_options]\n * @returns {GenericDeployableParams}\n */\n public override buildParameters(\n _payload?: AllowListIncentivePayload,\n _options?: DeployableOptions,\n ): GenericDeployableParams {\n const [payload, options] = this.validateDeploymentConfig(\n _payload,\n _options,\n );\n return {\n abi: allowListIncentiveAbi,\n bytecode: bytecode as Hex,\n args: [prepareAllowListIncentivePayload(payload)],\n ...this.optionallyAttachAccount(options.account),\n };\n }\n}\n\n/**\n * Given a {@link AllowListIncentivePayload}, properly encode a `AllowListIncentive.InitPayload` for use with {@link AllowListIncentive} initialization.\n *\n * @param {AllowListIncentivePayload} param0\n * @param {Address} param0.allowList - The address to the allowlist to add claimers to.\n * @param {bigint} param0.limit - The maximum number of claims that can be made (one per address)\n * @returns {Hex}\n */\nexport const prepareAllowListIncentivePayload = ({\n allowList,\n limit,\n}: AllowListIncentivePayload) => {\n return encodeAbiParameters(\n [\n { type: 'address', name: 'allowList' },\n { type: 'uint256', name: 'limit' },\n ],\n [allowList, limit],\n );\n};\n"],"names":["_AllowListIncentive","DeployableTarget","allowListIncentiveAbi","params","readAllowListIncentiveOwner","readAllowListIncentiveClaims","readAllowListIncentiveReward","address","readAllowListIncentiveClaimed","readAllowListIncentiveAllowList","SimpleAllowList","readAllowListIncentiveLimit","payload","request","result","simulateAllowListIncentiveClaim","prepareClaimPayload","writeAllowListIncentiveClaim","readAllowListIncentiveIsClaimable","_payload","_options","options","bytecode","prepareAllowListIncentivePayload","AllowListIncentiveBases","RegistryType","AllowListIncentive","allowList","limit","encodeAbiParameters"],"mappings":";;;;;;;;;4qYAqFaA,IAAN,MAAMA,UAA2BC,EAGtC;AAAA,EAHK,cAAA;AAAA,UAAA,GAAA,SAAA,GAIL,KAAyB,MAAMC;AAAAA,EAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,EA6B/B,MAAa,MACXC,GACA;AACO,WAAA,MAAMC,EAA4B,KAAK,SAAS;AAAA,MACrD,SAAS,KAAK,mBAAmB;AAAA,MACjC,MAAM,CAAC;AAAA;AAAA,MAEP,GAAID;AAAA,IAAA,CACL;AAAA,EACH;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,EAUA,MAAa,OACXA,GACA;AACO,WAAA,MAAME,EAA6B,KAAK,SAAS;AAAA,MACtD,SAAS,KAAK,mBAAmB;AAAA,MACjC,MAAM,CAAC;AAAA;AAAA,MAEP,GAAIF;AAAA,IAAA,CACL;AAAA,EACH;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,EAUA,MAAa,OACXA,GACA;AACO,WAAA,MAAMG,EAA6B,KAAK,SAAS;AAAA,MACtD,SAAS,KAAK,mBAAmB;AAAA,MACjC,MAAM,CAAC;AAAA;AAAA,MAEP,GAAIH;AAAA,IAAA,CACL;AAAA,EACH;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,EAWA,MAAa,QACXI,GACAJ,GACA;AACO,WAAA,MAAMK,EAA8B,KAAK,SAAS;AAAA,MACvD,SAAS,KAAK,mBAAmB;AAAA,MACjC,MAAM,CAACD,CAAO;AAAA;AAAA,MAEd,GAAIJ;AAAA,IAAA,CACL;AAAA,EACH;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,EAUA,MAAa,UACXA,GAC0B;AAC1B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