@boostxyz/sdk 2.0.0-alpha.35 → 2.0.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (50) hide show
  1. package/dist/Incentives/AllowListIncentive.cjs +1 -1
  2. package/dist/Incentives/AllowListIncentive.cjs.map +1 -1
  3. package/dist/Incentives/AllowListIncentive.d.ts +18 -0
  4. package/dist/Incentives/AllowListIncentive.d.ts.map +1 -1
  5. package/dist/Incentives/AllowListIncentive.js +46 -20
  6. package/dist/Incentives/AllowListIncentive.js.map +1 -1
  7. package/dist/Incentives/CGDAIncentive.cjs +1 -1
  8. package/dist/Incentives/CGDAIncentive.cjs.map +1 -1
  9. package/dist/Incentives/CGDAIncentive.d.ts +18 -0
  10. package/dist/Incentives/CGDAIncentive.d.ts.map +1 -1
  11. package/dist/Incentives/CGDAIncentive.js +55 -24
  12. package/dist/Incentives/CGDAIncentive.js.map +1 -1
  13. package/dist/Incentives/ERC20Incentive.cjs +1 -1
  14. package/dist/Incentives/ERC20Incentive.cjs.map +1 -1
  15. package/dist/Incentives/ERC20Incentive.d.ts +18 -0
  16. package/dist/Incentives/ERC20Incentive.d.ts.map +1 -1
  17. package/dist/Incentives/ERC20Incentive.js +46 -20
  18. package/dist/Incentives/ERC20Incentive.js.map +1 -1
  19. package/dist/Incentives/ERC20VariableIncentive.cjs +1 -1
  20. package/dist/Incentives/ERC20VariableIncentive.cjs.map +1 -1
  21. package/dist/Incentives/ERC20VariableIncentive.d.ts +18 -0
  22. package/dist/Incentives/ERC20VariableIncentive.d.ts.map +1 -1
  23. package/dist/Incentives/ERC20VariableIncentive.js +35 -9
  24. package/dist/Incentives/ERC20VariableIncentive.js.map +1 -1
  25. package/dist/Incentives/PointsIncentive.cjs +1 -1
  26. package/dist/Incentives/PointsIncentive.cjs.map +1 -1
  27. package/dist/Incentives/PointsIncentive.d.ts +18 -0
  28. package/dist/Incentives/PointsIncentive.d.ts.map +1 -1
  29. package/dist/Incentives/PointsIncentive.js +41 -15
  30. package/dist/Incentives/PointsIncentive.js.map +1 -1
  31. package/dist/index.cjs +1 -1
  32. package/dist/index.js +30 -29
  33. package/dist/utils.cjs +1 -1
  34. package/dist/utils.cjs.map +1 -1
  35. package/dist/utils.d.ts +12 -0
  36. package/dist/utils.d.ts.map +1 -1
  37. package/dist/utils.js +64 -35
  38. package/dist/utils.js.map +1 -1
  39. package/package.json +1 -1
  40. package/src/Incentives/AllowListIncentive.test.ts +52 -4
  41. package/src/Incentives/AllowListIncentive.ts +28 -0
  42. package/src/Incentives/CGDAIncentive.test.ts +48 -3
  43. package/src/Incentives/CGDAIncentive.ts +34 -0
  44. package/src/Incentives/ERC20Incentive.test.ts +42 -0
  45. package/src/Incentives/ERC20Incentive.ts +28 -0
  46. package/src/Incentives/ERC20VariableIncentive.test.ts +41 -1
  47. package/src/Incentives/ERC20VariableIncentive.ts +28 -0
  48. package/src/Incentives/PointsIncentive.test.ts +47 -3
  49. package/src/Incentives/PointsIncentive.ts +28 -0
  50. package/src/utils.ts +46 -0
@@ -1 +1 @@
1
- {"version":3,"file":"PointsIncentive.cjs","sources":["../../src/Incentives/PointsIncentive.ts"],"sourcesContent":["import {\n pointsIncentiveAbi,\n readPointsIncentiveClaimed,\n readPointsIncentiveClaims,\n readPointsIncentiveCurrentReward,\n readPointsIncentiveIsClaimable,\n readPointsIncentiveLimit,\n readPointsIncentiveReward,\n readPointsIncentiveSelector,\n readPointsIncentiveVenue,\n simulatePointsIncentiveClaim,\n writePointsIncentiveClaim,\n} from '@boostxyz/evm';\nimport { bytecode } from '@boostxyz/evm/artifacts/contracts/incentives/PointsIncentive.sol/PointsIncentive.json';\nimport {\n type Address,\n type ContractEventName,\n type Hex,\n encodeAbiParameters,\n zeroHash,\n} from 'viem';\nimport { PointsIncentive as PointsIncentiveBases } from '../../dist/deployments.json';\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 { pointsIncentiveAbi };\n\n/**\n * The object representation of a `PointsIncentive.InitPayload`\n *\n * @export\n * @interface PointsIncentivePayload\n * @typedef {PointsIncentivePayload}\n */\nexport interface PointsIncentivePayload {\n /**\n * The address of the points contract\n *\n * @type {Address}\n */\n venue: Address;\n /**\n * The selector for the issuance function on the points contract\n *\n * @type {Hex}\n */\n selector: Hex;\n /**\n * The reward amount issued for each claim\n *\n * @type {bigint}\n */\n reward: bigint;\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 `PointsIncentive` event types.\n *\n * @export\n * @typedef {PointsIncentiveLog}\n * @template {ContractEventName<\n * typeof pointsIncentiveAbi\n * >} [event=ContractEventName<typeof pointsIncentiveAbi>]\n */\nexport type PointsIncentiveLog<\n event extends ContractEventName<\n typeof pointsIncentiveAbi\n > = ContractEventName<typeof pointsIncentiveAbi>,\n> = GenericLog<typeof pointsIncentiveAbi, event>;\n\n/**\n * A simple on-chain points incentive implementation that allows claiming of soulbound tokens.\n *\n * In order for any claim to be successful:\n * - The claimer must not have already claimed the incentive; and\n * - The maximum number of claims must not have been reached; and\n * - This contract must be authorized to operate the points contract's issuance function\n *\n * @export\n * @class PointsIncentive\n * @typedef {PointsIncentive}\n * @extends {DeployableTarget<PointsIncentivePayload>}\n */\nexport class PointsIncentive extends DeployableTarget<\n PointsIncentivePayload,\n typeof pointsIncentiveAbi\n> {\n public override readonly abi = pointsIncentiveAbi;\n /**\n * @inheritdoc\n *\n * @public\n * @static\n * @type {Record<number, Address>}\n */\n public static override bases: Record<number, Address> = {\n 31337: import.meta.env.VITE_POINTS_INCENTIVE_BASE,\n ...(PointsIncentiveBases as Record<number, Address>),\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 number of claims that have been made\n *\n * @public\n * @async\n * @param {?ReadParams} [params]\n * @returns {Promise<bigint>}\n */\n public async claims(params?: ReadParams) {\n return await readPointsIncentiveClaims(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 current reward\n *\n * @public\n * @async\n * @param {?ReadParams} [params]\n * @returns {Promise<bigint>} - The current reward\n */\n public async currentReward(params?: ReadParams) {\n return await readPointsIncentiveCurrentReward(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} [params]\n * @returns {Promise<bigint>} The reward amount issued for each claim\n */\n public async reward(params?: ReadParams) {\n return await readPointsIncentiveReward(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 * A mapping of address to claim status\n *\n * @public\n * @async\n * @param {Address} address\n * @param {?ReadParams} [params]\n * @returns {Promise<boolean>}\n */\n public async claimed(address: Address, params?: ReadParams) {\n return await readPointsIncentiveClaimed(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 address of the points contract\n *\n * @public\n * @async\n * @param {?ReadParams} [params]\n * @returns {Promise<Address>}\n */\n public async venue(params?: ReadParams) {\n return await readPointsIncentiveVenue(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 * The maximum number of claims that can be made (one per address)\n *\n * @public\n * @async\n * @param {?ReadParams} [params]\n * @returns {Promise<bigint>}\n */\n public async limit(params?: ReadParams) {\n return await readPointsIncentiveLimit(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 * The selector for the issuance function on the points contract\n *\n * @public\n * @async\n * @param {?ReadParams} [params]\n * @returns {Promise<Hex>}\n */\n public async selector(params?: ReadParams) {\n return await readPointsIncentiveSelector(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 the incentive\n *\n * @public\n * @async\n * @param {ClaimPayload} payload\n * @param {?WriteParams} [params]\n * @returns {Promise<boolean>} - True if the incentive was successfully claimed\n */\n protected async claim(payload: ClaimPayload, params?: WriteParams) {\n return await this.awaitResult(this.claimRaw(payload, params));\n }\n\n /**\n * Claim the incentive\n *\n * @public\n * @async\n * @param {ClaimPayload} payload\n * @param {?WriteParams} [params]\n * @returns {Promise<{ hash: `0x${string}`; result: boolean; }>} - True if the incentive was successfully claimed\n */\n protected async claimRaw(payload: ClaimPayload, params?: WriteParams) {\n const { request, result } = await simulatePointsIncentiveClaim(\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 writePointsIncentiveClaim(this._config, request);\n return { hash, result };\n }\n\n /**\n * Check if an incentive is claimable.\n * For the POOL strategy, the `bytes data` portion of the payload ignored.\n * The recipient must not have already claimed the incentive.\n *\n * @public\n * @async\n * @param {ClaimPayload} payload\n * @param {?ReadParams} [params]\n * @returns {Promise<boolean>} - True if the incentive is claimable based on the data payload\n */\n public async isClaimable(payload: ClaimPayload, params?: ReadParams) {\n return await readPointsIncentiveIsClaimable(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 {?PointsIncentivePayload} [_payload]\n * @param {?DeployableOptions} [_options]\n * @returns {GenericDeployableParams}\n */\n public override buildParameters(\n _payload?: PointsIncentivePayload,\n _options?: DeployableOptions,\n ): GenericDeployableParams {\n const [payload, options] = this.validateDeploymentConfig(\n _payload,\n _options,\n );\n return {\n abi: pointsIncentiveAbi,\n bytecode: bytecode as Hex,\n args: [preparePointsIncentivePayload(payload)],\n ...this.optionallyAttachAccount(options.account),\n };\n }\n\n /**\n * Builds the claim data for the PointsIncentive.\n *\n * @public\n * @returns {Hash} A `zeroHash`, as PointsIncentive doesn't require specific claim data.\n * @description This function returns `zeroHash` because PointsIncentive doesn't use any specific claim data.\n */\n public buildClaimData() {\n return zeroHash;\n }\n}\n\n/**\n * Given a {@link PointsIncentivePayload}, properly encode a `PointsIncentive.InitPayload` for use with {@link PointsIncentive} initialization.\n *\n * @param {PointsIncentivePayload} param0\n * @param {Address} param0.venue - The address of the points contract\n * @param {Hex} param0.selector - The selector for the issuance function on the points contract\n * @param {bigint} param0.reward - The reward amount issued for each claim\n * @param {bigint} param0.limit - The maximum number of claims that can be made (one per address)\n * @returns {*}\n */\nexport const preparePointsIncentivePayload = ({\n venue,\n selector,\n reward,\n limit,\n}: PointsIncentivePayload) => {\n return encodeAbiParameters(\n [\n { type: 'address', name: 'venue' },\n { type: 'bytes4', name: 'selector' },\n { type: 'uint256', name: 'reward' },\n { type: 'uint256', name: 'limit' },\n ],\n [venue, selector, reward, limit],\n );\n};\n"],"names":["_PointsIncentive","DeployableTarget","pointsIncentiveAbi","params","readPointsIncentiveClaims","readPointsIncentiveCurrentReward","readPointsIncentiveReward","address","readPointsIncentiveClaimed","readPointsIncentiveVenue","readPointsIncentiveLimit","readPointsIncentiveSelector","payload","request","result","simulatePointsIncentiveClaim","prepareClaimPayload","writePointsIncentiveClaim","readPointsIncentiveIsClaimable","_payload","_options","options","bytecode","preparePointsIncentivePayload","zeroHash","PointsIncentiveBases","RegistryType","PointsIncentive","venue","selector","reward","limit","encodeAbiParameters"],"mappings":"wodAmGaA,EAAN,MAAMA,UAAwBC,EAAAA,gBAGnC,CAHK,aAAA,CAAA,MAAA,GAAA,SAAA,EAIL,KAAyB,IAAMC,GAAA,CA6B/B,MAAa,OAAOC,EAAqB,CAChC,OAAA,MAAMC,EAAAA,GAA0B,KAAK,QAAS,CACnD,QAAS,KAAK,mBAAmB,EACjC,KAAM,CAAC,EAEP,GAAID,CAAA,CACL,CACH,CAUA,MAAa,cAAcA,EAAqB,CACvC,OAAA,MAAME,EAAAA,GAAiC,KAAK,QAAS,CAC1D,QAAS,KAAK,mBAAmB,EACjC,KAAM,CAAC,EAEP,GAAIF,CAAA,CACL,CACH,CAUA,MAAa,OAAOA,EAAqB,CAChC,OAAA,MAAMG,EAAAA,GAA0B,KAAK,QAAS,CACnD,QAAS,KAAK,mBAAmB,EACjC,KAAM,CAAC,EAEP,GAAIH,CAAA,CACL,CACH,CAWA,MAAa,QAAQI,EAAkBJ,EAAqB,CACnD,OAAA,MAAMK,EAAAA,GAA2B,KAAK,QAAS,CACpD,QAAS,KAAK,mBAAmB,EACjC,KAAM,CAACD,CAAO,EAEd,GAAIJ,CAAA,CACL,CACH,CAUA,MAAa,MAAMA,EAAqB,CAC/B,OAAA,MAAMM,EAAAA,GAAyB,KAAK,QAAS,CAClD,QAAS,KAAK,mBAAmB,EAEjC,GAAIN,CAAA,CACL,CACH,CAUA,MAAa,MAAMA,EAAqB,CAC/B,OAAA,MAAMO,EAAAA,GAAyB,KAAK,QAAS,CAClD,QAAS,KAAK,mBAAmB,EAEj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oBACL,CACE,CAAE,KAAM,UAAW,KAAM,OAAQ,EACjC,CAAE,KAAM,SAAU,KAAM,UAAW,EACnC,CAAE,KAAM,UAAW,KAAM,QAAS,EAClC,CAAE,KAAM,UAAW,KAAM,OAAQ,CACnC,EACA,CAACJ,EAAOC,EAAUC,EAAQC,CAAK,CAAA"}
1
+ {"version":3,"file":"PointsIncentive.cjs","sources":["../../src/Incentives/PointsIncentive.ts"],"sourcesContent":["import {\n pointsIncentiveAbi,\n readPointsIncentiveClaimed,\n readPointsIncentiveClaims,\n readPointsIncentiveCurrentReward,\n readPointsIncentiveIsClaimable,\n readPointsIncentiveLimit,\n readPointsIncentiveReward,\n readPointsIncentiveSelector,\n readPointsIncentiveVenue,\n simulatePointsIncentiveClaim,\n writePointsIncentiveClaim,\n} from '@boostxyz/evm';\nimport { bytecode } from '@boostxyz/evm/artifacts/contracts/incentives/PointsIncentive.sol/PointsIncentive.json';\nimport {\n type Address,\n type ContractEventName,\n type Hex,\n encodeAbiParameters,\n zeroHash,\n} from 'viem';\nimport { PointsIncentive as PointsIncentiveBases } from '../../dist/deployments.json';\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 { pointsIncentiveAbi };\n\n/**\n * The object representation of a `PointsIncentive.InitPayload`\n *\n * @export\n * @interface PointsIncentivePayload\n * @typedef {PointsIncentivePayload}\n */\nexport interface PointsIncentivePayload {\n /**\n * The address of the points contract\n *\n * @type {Address}\n */\n venue: Address;\n /**\n * The selector for the issuance function on the points contract\n *\n * @type {Hex}\n */\n selector: Hex;\n /**\n * The reward amount issued for each claim\n *\n * @type {bigint}\n */\n reward: bigint;\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 `PointsIncentive` event types.\n *\n * @export\n * @typedef {PointsIncentiveLog}\n * @template {ContractEventName<\n * typeof pointsIncentiveAbi\n * >} [event=ContractEventName<typeof pointsIncentiveAbi>]\n */\nexport type PointsIncentiveLog<\n event extends ContractEventName<\n typeof pointsIncentiveAbi\n > = ContractEventName<typeof pointsIncentiveAbi>,\n> = GenericLog<typeof pointsIncentiveAbi, event>;\n\n/**\n * A simple on-chain points incentive implementation that allows claiming of soulbound tokens.\n *\n * In order for any claim to be successful:\n * - The claimer must not have already claimed the incentive; and\n * - The maximum number of claims must not have been reached; and\n * - This contract must be authorized to operate the points contract's issuance function\n *\n * @export\n * @class PointsIncentive\n * @typedef {PointsIncentive}\n * @extends {DeployableTarget<PointsIncentivePayload>}\n */\nexport class PointsIncentive extends DeployableTarget<\n PointsIncentivePayload,\n typeof pointsIncentiveAbi\n> {\n public override readonly abi = pointsIncentiveAbi;\n /**\n * @inheritdoc\n *\n * @public\n * @static\n * @type {Record<number, Address>}\n */\n public static override bases: Record<number, Address> = {\n 31337: import.meta.env.VITE_POINTS_INCENTIVE_BASE,\n ...(PointsIncentiveBases as Record<number, Address>),\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 number of claims that have been made\n *\n * @public\n * @async\n * @param {?ReadParams} [params]\n * @returns {Promise<bigint>}\n */\n public async claims(params?: ReadParams) {\n return await readPointsIncentiveClaims(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 current reward\n *\n * @public\n * @async\n * @param {?ReadParams} [params]\n * @returns {Promise<bigint>} - The current reward\n */\n public async currentReward(params?: ReadParams) {\n return await readPointsIncentiveCurrentReward(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} [params]\n * @returns {Promise<bigint>} The reward amount issued for each claim\n */\n public async reward(params?: ReadParams) {\n return await readPointsIncentiveReward(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 * A mapping of address to claim status\n *\n * @public\n * @async\n * @param {Address} address\n * @param {?ReadParams} [params]\n * @returns {Promise<boolean>}\n */\n public async claimed(address: Address, params?: ReadParams) {\n return await readPointsIncentiveClaimed(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 address of the points contract\n *\n * @public\n * @async\n * @param {?ReadParams} [params]\n * @returns {Promise<Address>}\n */\n public async venue(params?: ReadParams) {\n return await readPointsIncentiveVenue(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 * The maximum number of claims that can be made (one per address)\n *\n * @public\n * @async\n * @param {?ReadParams} [params]\n * @returns {Promise<bigint>}\n */\n public async limit(params?: ReadParams) {\n return await readPointsIncentiveLimit(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 * The selector for the issuance function on the points contract\n *\n * @public\n * @async\n * @param {?ReadParams} [params]\n * @returns {Promise<Hex>}\n */\n public async selector(params?: ReadParams) {\n return await readPointsIncentiveSelector(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 the incentive\n *\n * @public\n * @async\n * @param {ClaimPayload} payload\n * @param {?WriteParams} [params]\n * @returns {Promise<boolean>} - True if the incentive was successfully claimed\n */\n protected async claim(payload: ClaimPayload, params?: WriteParams) {\n return await this.awaitResult(this.claimRaw(payload, params));\n }\n\n /**\n * Claim the incentive\n *\n * @public\n * @async\n * @param {ClaimPayload} payload\n * @param {?WriteParams} [params]\n * @returns {Promise<{ hash: `0x${string}`; result: boolean; }>} - True if the incentive was successfully claimed\n */\n protected async claimRaw(payload: ClaimPayload, params?: WriteParams) {\n const { request, result } = await simulatePointsIncentiveClaim(\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 writePointsIncentiveClaim(this._config, request);\n return { hash, result };\n }\n\n /**\n * Check if an incentive is claimable.\n * For the POOL strategy, the `bytes data` portion of the payload ignored.\n * The recipient must not have already claimed the incentive.\n *\n * @public\n * @async\n * @param {ClaimPayload} payload\n * @param {?ReadParams} [params]\n * @returns {Promise<boolean>} - True if the incentive is claimable based on the data payload\n */\n public async isClaimable(payload: ClaimPayload, params?: ReadParams) {\n return await readPointsIncentiveIsClaimable(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 * Check if any claims remain by comparing the incentive's total claims against its limit. Does not take requesting user's elligibility into account.\n *\n * @public\n * @async\n * @param {?ReadParams} [params]\n * @returns {Promise<boolean>} - True if total claims is less than limit\n */\n public async canBeClaimed(params?: ReadParams) {\n return (await this.getRemainingClaimPotential(params)) > 0n;\n }\n\n /**\n * Check how many claims remain by comparing the incentive's total claims against its limit. Does not take requesting user's elligibility into account.\n *\n * @public\n * @async\n * @param {?ReadParams} [params]\n * @returns {Promise<bigint>} - True if total claims is less than limit\n */\n public async getRemainingClaimPotential(params?: ReadParams) {\n const [claims, limit] = await Promise.all([\n this.claims(params),\n this.limit(params),\n ]);\n return limit - claims;\n }\n\n /**\n * @inheritdoc\n *\n * @public\n * @param {?PointsIncentivePayload} [_payload]\n * @param {?DeployableOptions} [_options]\n * @returns {GenericDeployableParams}\n */\n public override buildParameters(\n _payload?: PointsIncentivePayload,\n _options?: DeployableOptions,\n ): GenericDeployableParams {\n const [payload, options] = this.validateDeploymentConfig(\n _payload,\n _options,\n );\n return {\n abi: pointsIncentiveAbi,\n bytecode: bytecode as Hex,\n args: [preparePointsIncentivePayload(payload)],\n ...this.optionallyAttachAccount(options.account),\n };\n }\n\n /**\n * Builds the claim data for the PointsIncentive.\n *\n * @public\n * @returns {Hash} A `zeroHash`, as PointsIncentive doesn't require specific claim data.\n * @description This function returns `zeroHash` because PointsIncentive doesn't use any specific claim data.\n */\n public buildClaimData() {\n return zeroHash;\n }\n}\n\n/**\n * Given a {@link PointsIncentivePayload}, properly encode a `PointsIncentive.InitPayload` for use with {@link PointsIncentive} initialization.\n *\n * @param {PointsIncentivePayload} param0\n * @param {Address} param0.venue - The address of the points contract\n * @param {Hex} param0.selector - The selector for the issuance function on the points contract\n * @param {bigint} param0.reward - The reward amount issued for each claim\n * @param {bigint} param0.limit - The maximum number of claims that can be made (one per address)\n * @returns {*}\n */\nexport const preparePointsIncentivePayload = ({\n venue,\n selector,\n reward,\n limit,\n}: PointsIncentivePayload) => {\n return encodeAbiParameters(\n [\n { type: 'address', name: 'venue' },\n { type: 'bytes4', name: 'selector' },\n { type: 'uint256', name: 'reward' },\n { type: 'uint256', name: 'limit' },\n ],\n [venue, selector, reward, limit],\n );\n};\n"],"names":["_PointsIncentive","DeployableTarget","pointsIncentiveAbi","params","readPointsIncentiveClaims","readPointsIncentiveCurrentReward","readPointsIncentiveReward","address","readPointsIncentiveClaimed","readPointsIncentiveVenue","readPointsIncentiveLimit","readPointsIncentiveSelector","payload","request","result","simulatePointsIncentiveClaim","prepareClaimPayload","writePointsIncentiveClaim","readPointsIncentiveIsClaimable","claims","limit","_payload","_options","options","bytecode","preparePointsIncentivePayload","zeroHash","PointsIncentiveBases","RegistryType","PointsIncentive","venue","selector","reward","encodeAbiParameters"],"mappings":"wodAmGaA,EAAN,MAAMA,UAAwBC,EAAAA,gBAGnC,CAHK,aAAA,CAAA,MAAA,GAAA,SAAA,EAIL,KAAyB,IAAMC,GAAA,CA6B/B,MAAa,OAAOC,EAAqB,CAChC,OAAA,MAAMC,EAAAA,GAA0B,KAAK,QAAS,CACnD,QAAS,KAAK,mBAAmB,EACjC,KAAM,CAAC,EAEP,GAAID,CAAA,CACL,CACH,CAUA,MAAa,cAAcA,EAAqB,CACvC,OAAA,MAAME,EAAAA,GAAiC,KAAK,QAAS,CAC1D,QAAS,KAAK,mBAAmB,EACjC,KAAM,CAAC,EAEP,GAAIF,CAAA,CACL,CACH,CAUA,MAAa,OAAOA,EAAqB,CAChC,OAAA,MAAMG,EAAAA,GAA0B,KAAK,QAAS,CACnD,QAAS,KAAK,mBAAmB,EACjC,KAAM,CAAC,EAEP,GAAIH,CAAA,CACL,CACH,CAWA,MAAa,QAAQI,EAAkBJ,EAAqB,CACnD,OAAA,MAAMK,EAAAA,GAA2B,KAAK,QAAS,CACpD,QAAS,KAAK,mBAAmB,EACjC,KAAM,CAACD,CAAO,EAEd,GAAIJ,CAAA,CACL,CACH,CAUA,MAAa,MAAMA,EAAqB,CAC/B,OAAA,MAAMM,EAAAA,GAAyB,KAAK,QAAS,CAClD,QAAS,KAAK,mBAAmB,EAEjC,GAAIN,CAAA,CACL,CACH,CAUA,MAAa,MAAMA,EAAqB,CAC/B,OAAA,MAAMO,EAAAA,GAAyB,KAAK,QAAS,CAClD,QAAS,KAAK,mBAAmB,EAEjC,GAAIP,CAAA,CACL,CACH,CAUA,MAAa,SA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ACF,EAzPE1B,EAAuB,MAAiC,CACtD,MAAO,OACP,GAAI2B,EAAA,eAAA,EASN3B,EAAuB,aAA6B4B,EAAa,aAAA,UAvB5D,IAAMC,EAAN7B,EAiRA,MAAMyB,EAAgC,CAAC,CAC5C,MAAAK,EACA,SAAAC,EACA,OAAAC,EACA,MAAAZ,CACF,IACSa,EAAA,oBACL,CACE,CAAE,KAAM,UAAW,KAAM,OAAQ,EACjC,CAAE,KAAM,SAAU,KAAM,UAAW,EACnC,CAAE,KAAM,UAAW,KAAM,QAAS,EAClC,CAAE,KAAM,UAAW,KAAM,OAAQ,CACnC,EACA,CAACH,EAAOC,EAAUC,EAAQZ,CAAK,CAAA"}
@@ -649,6 +649,24 @@ export declare class PointsIncentive extends DeployableTarget<PointsIncentivePay
649
649
  * @returns {Promise<boolean>} - True if the incentive is claimable based on the data payload
650
650
  */
651
651
  isClaimable(payload: ClaimPayload, params?: ReadParams): Promise<boolean>;
652
+ /**
653
+ * Check if any claims remain by comparing the incentive's total claims against its limit. Does not take requesting user's elligibility into account.
654
+ *
655
+ * @public
656
+ * @async
657
+ * @param {?ReadParams} [params]
658
+ * @returns {Promise<boolean>} - True if total claims is less than limit
659
+ */
660
+ canBeClaimed(params?: ReadParams): Promise<boolean>;
661
+ /**
662
+ * Check how many claims remain by comparing the incentive's total claims against its limit. Does not take requesting user's elligibility into account.
663
+ *
664
+ * @public
665
+ * @async
666
+ * @param {?ReadParams} [params]
667
+ * @returns {Promise<bigint>} - True if total claims is less than limit
668
+ */
669
+ getRemainingClaimPotential(params?: ReadParams): Promise<bigint>;
652
670
  /**
653
671
  * @inheritdoc
654
672
  *
@@ -1 +1 @@
1
- {"version":3,"file":"PointsIncentive.d.ts","sourceRoot":"","sources":["../../src/Incentives/PointsIncentive.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,kBAAkB,EAWnB,MAAM,eAAe,CAAC;AAEvB,OAAO,EACL,KAAK,OAAO,EACZ,KAAK,iBAAiB,EACtB,KAAK,GA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AQ,CAAC,OAAO,EAAE,YAAY,EAAE,MAAM,CAAC,EAAE,WAAW;;;;IAepE;;;;;;;;;;OAUG;IACU,WAAW,CAAC,OAAO,EAAE,YAAY,EAAE,MAAM,CAAC,EAAE,UAAU;IASnE;;;;;;;OAOG;IACU,YAAY,CAAC,MAAM,CAAC,EAAE,UAAU;IAI7C;;;;;;;OAOG;IACU,0BAA0B,CAAC,MAAM,CAAC,EAAE,UAAU;IAQ3D;;;;;;;OAOG;IACa,eAAe,CAC7B,QAAQ,CAAC,EAAE,sBAAsB,EACjC,QAAQ,CAAC,EAAE,iBAAiB,GAC3B,uBAAuB;IAa1B;;;;;;OAMG;IACI,cAAc;CAGtB;AAED;;;;;;;;;GASG;AACH,eAAO,MAAM,6BAA6B,wCAKvC,sBAAsB,kBAUxB,CAAC"}
@@ -1,10 +1,10 @@
1
- import { T as c, b1 as i, b2 as n, b3 as o, b4 as l, b5 as h, b6 as m, b7 as u, b8 as y, b9 as p, ba as g } from "../generated-CDEDSOGZ.js";
1
+ import { T as c, b1 as r, b2 as n, b3 as o, b4 as l, b5 as m, b6 as h, b7 as u, b8 as y, b9 as g, ba as p } from "../generated-CDEDSOGZ.js";
2
2
  import { zeroHash as w, encodeAbiParameters as A } from "viem";
3
3
  import { P as V } from "../deployments-BdPDIh-i.js";
4
4
  import { DeployableTarget as O } from "../Deployable/DeployableTarget.js";
5
5
  import { prepareClaimPayload as s } from "../claiming.js";
6
- import { RegistryType as _ } from "../utils.js";
7
- const C = "0x608060405273deaddeaddeaddeaddeaddeaddeaddeaddeaddead5f806101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff160217905550348015610062575f80fd5b5061007161007660201b60201c565b61010b565b5f6100856100e260201b60201c565b90508054600181161561009f5763f92ee8a95f526004601cfd5b8160c01c808260011c146100dd578060011b8355806020527fc7f505b2f371ae2175ee4913f4499e1f2633a7b5936321eed1cdaeb6115181d2602080a15b505050565b5f7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffbf6011325f1b905090565b611b99806101185f395ff3fe6080604052600436106101b6575f3560e01c8063514e62fc116100eb578063c884ef8311610089578063ea3d508a11610063578063ea3d508a146105c1578063f04e283e146105eb578063f2fde38b14610607578063fee81cf414610623576101b6565b8063c884ef831461051f578063db09da121461055b578063dcc59b6f14610597576101b6565b80638da5cb5b116100c55780638da5cb5b14610465578063a270a7371461048f578063a4d66daf146104b9578063bb1757cf146104e3576101b6565b8063514e62fc1461041557806354d1f13d14610451578063715018a61461045b576101b6565b806328d6183b11610158578063439fab9111610132578063439fab9114610358578063474f5a44146103805780634a4ee7b1146103bd5780634e7165a2146103d9576101b6565b806328d6183b146102c85780632de94807146102f257806338d52e0f1461032e576101b6565b80631c10893f116101945780631c10893f1461023c5780631cd64df414610258578063228cb7331461029457806325692962146102be576101b6565b806301ffc9a7146101ba57806307621eca146101f6578063183a4f6e14610220575b5f80fd5b3480156101c5575f80fd5b506101e060048036038101906101db9190611407565b61065f565b6040516101ed919061144c565b60405180910390f35b348015610201575f80fd5b5061020a6106d8565b604051610217919061147d565b60405180910390f35b61023a600480360381019061023591906114c0565b6106e1565b005b61025660048036038101906102519190611545565b6106ee565b005b348015610263575f80fd5b5061027e60048036038101906102799190611545565b610704565b60405161028b919061144c565b60405180910390f35b34801561029f575f80fd5b506102a861071a565b6040516102b5919061147d565b60405180910390f35b6102c6610720565b005b3480156102d3575f80fd5b506102dc610771565b6040516102e99190611592565b60405180910390f35b3480156102fd575f80fd5b50610318600480360381019061031391906115ab565b610798565b604051610325919061147d565b60405180910390f35b348015610339575f80fd5b506103426107b1565b60405161034f91906115e5565b60405180910390f35b348015610363575f80fd5b5061037e6004803603810190610379919061165f565b6107d4565b005b34801561038b575f80fd5b506103a660048036038101906103a1919061165f565b61092c565b6040516103b49291906116aa565b60405180910390f35b6103d760048036038101906103d29190611545565b610960565b005b3480156103e4575f80fd5b506103ff60048036038101906103fa919061165f565b610976565b60405161040c9190611741565b60405180910390f35b348015610420575f80fd5b5061043b60048036038101906104369190611545565b6109cd565b604051610448919061144c565b60405180910390f35b6104596109e4565b005b610463610a1d565b005b348015610470575f80fd5b50610479610a30565b60405161048691906115e5565b60405180910390f35b34801561049a575f80fd5b506104a3610a58565b6040516104b091906115e5565b60405180910390f35b3480156104c4575f80fd5b506104cd610a7d565b6040516104da919061147d565b60405180910390f35b3480156104ee575f80fd5b5061050960048036038101906105049190611761565b610a83565b604051610516919061144c565b60405180910390f35b34801561052a575f80fd5b50610545600480360381019061054091906115ab565b610e9b565b604051610552919061144c565b60405180910390f35b348015610566575f80fd5b50610581600480360381019061057c9190611761565b610eb8565b60405161058e919061144c565b60405180910390f35b3480156105a2575f80fd5b506105ab610ecb565b6040516105b8919061147d565b60405180910390f35b3480156105cc575f80fd5b506105d5610ed1565b6040516105e29190611592565b60405180910390f35b610605600480360381019061060091906115ab565b610ee3565b005b610621600480360381019061061c91906115ab565b610f21565b005b34801561062e575f80fd5b50610649600480360381019061064491906115ab565b610f4a565b604051610656919061147d565b60405180910390f35b5f7f0d36a40d000000000000000000000000000000000000000000000000000000007bffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916827bffffffffffffffffffffffffffffffffffffffffffffffffffffffff191614806106d157506106d082610f63565b5b9050919050565b5f600254905090565b6106eb3382610fdc565b50565b6106f6610feb565b6107008282611022565b5050565b5f818261071085610798565b1614905092915050565b60025481565b5f610729611032565b67ffffffffffffffff164201905063389a75e1600c52335f52806020600c2055337fdbf36a107da19e49527a7176a1babf963b4b0ff8cde35ee35d6cd8f1f9ac7e1d5f80a250565b5f7f0d36a40d00000000000000000000000000000000000000000000000000000000905090565b5f638b78c6d8600c52815f526020600c20549050919050565b5f8054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b5f6107dd61103c565b9050805460038255801561080f5760018160011c14303b106108065763f92ee8a95f526004601cfd5b818160ff1b1b91505b505f838381019061082091906118af565b90505f8160400151148061083757505f8160600151145b1561086e576040517ff92ee8a900000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b805f015160045f6101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff160217905550806020015160065f6101000a81548163ffffffff021916908360e01c0217905550806040015160028190555080606001516005819055506108f133611065565b508015610927576002815560016020527fc7f505b2f371ae2175ee4913f4499e1f2633a7b5936321eed1cdaeb6115181d2602080a15b505050565b5f806040517fd623472500000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b610968610feb565b6109728282610fdc565b5050565b60605f67ffffffffffffffff811115610992576109916117c2565b5b6040519080825280601f01601f1916602001820160405280156109c45781602001600182028036833780820191505090505b50905092915050565b5f80826109d985610798565b161415905092915050565b63389a75e1600c52335f525f6020600c2055337ffa7b8eab7da67f412cc9575ed43464468f9bfbae89d1675917346ca6d8fe3c925f80a2565b610a25610feb565b610a2e5f61113b565b565b5f7fffffffffffffffffffffffffffffffffffffffffffffffffffffffff7487392754905090565b60045f9054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b60055481565b5f610a8c610feb565b5f60045f9054906101000a900473ffffffffffffffffffffffffffffffffffffffff1690503073ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff16638da5cb5b6040518163ffffffff1660e01b8152600401602060405180830381865afa158015610b11573d5f803e3d5ffd5b505050506040513d601f19601f82011682018060405250810190610b3591906118ee565b73ffffffffffffffffffffffffffffffffffffffff1614158015610bd85750600115158173ffffffffffffffffffffffffffffffffffffffff1663514e62fc3060026040518363ffffffff1660e01b8152600401610b9492919061195b565b602060405180830381865afa158015610baf573d5f803e3d5ffd5b505050506040513d601f19601f82011682018060405250810190610bd391906119ac565b151514155b15610c0f576040517f82b4290000000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b610c1885611201565b610c4e576040517f6247a84e00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b60015f815480929190610c6090611a04565b9190505550600160035f8773ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020015f205f6101000a81548160ff0219169083151502179055505f60045f9054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1660065f9054906101000a900460e01b87600254604051602401610d17929190611a4b565b604051602081830303815290604052907bffffffffffffffffffffffffffffffffffffffffffffffffffffffff19166020820180517bffffffffffffffffffffffffffffffffffffffffffffffffffffffff8381831617835250505050604051610d819190611aac565b5f604051808303815f865af19150503d805f8114610dba576040519150601f19603f3d011682016040523d82523d5f602084013e610dbf565b606091505b5050905080610dfa576040517f360e42e100000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b8573ffffffffffffffffffffffffffffffffffffffff167f9ad2e7a4af16dceda9cce4274b2f59c328d8c012eb0e15eb5e1e73b7d8f264d360045f9054906101000a900473ffffffffffffffffffffffffffffffffffffffff1688600254604051602001610e6a93929190611b27565b604051602081830303815290604052604051610e869190611741565b60405180910390a26001925050509392505050565b6003602052805f5260405f205f915054906101000a900460ff1681565b5f610ec284611201565b90509392505050565b60015481565b60065f9054906101000a900460e01b81565b610eeb610feb565b63389a75e1600c52805f526020600c208054421115610f1157636f5e88185f526004601cfd5b5f815550610f1e8161113b565b50565b610f29610feb565b8060601b610f3e57637448fbae5f526004601cfd5b610f478161113b565b50565b5f63389a75e1600c52815f526020600c20549050919050565b5f7fa9216705000000000000000000000000000000000000000000000000000000007bffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916827bffffffffffffffffffffffffffffffffffffffffffffffffffffffff19161480610fd55750610fd482611263565b5b9050919050565b610fe782825f6112dc565b5050565b7fffffffffffffffffffffffffffffffffffffffffffffffffffffffff74873927543314611020576382b429005f526004601cfd5b565b61102e828260016112dc565b5050565b5f6202a300905090565b5f7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffbf6011325f1b905090565b61106d611334565b156110e5577fffffffffffffffffffffffffffffffffffffffffffffffffffffffff748739278054156110a757630dc149f05f526004601cfd5b8160601b60601c9150811560ff1b82178155815f7f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e05f80a350611138565b8060601b60601c9050807fffffffffffffffffffffffffffffffffffffffffffffffffffffffff7487392755805f7f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e05f80a35b50565b611143611334565b156111a8577fffffffffffffffffffffffffffffffffffffffffffffffffffffffff748739278160601b60601c91508181547f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e05f80a3811560ff1b82178155506111fe565b7fffffffffffffffffffffffffffffffffffffffffffffffffffffffff748739278160601b60601c91508181547f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e05f80a3818155505b50565b5f60035f8373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020015f205f9054906101000a900460ff1615801561125c5750600554600154105b9050919050565b5f7f6ab67a0d000000000000000000000000000000000000000000000000000000007bffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916827bffffffffffffffffffffffffffffffffffffffffffffffffffffffff191614806112d557506112d482611338565b5b9050919050565b638b78c6d8600c52825f526020600c208054838117836112fe57848216821890505b80835580600c5160601c7f715ad5ce61fc9595c7b415289d59cf203f23a94fa06f04af7e489a0a76e1fe265f80a3505050505050565b5f90565b5f7f01ffc9a7000000000000000000000000000000000000000000000000000000007bffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916827bffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916149050919050565b5f604051905090565b5f80fd5b5f80fd5b5f7fffffffff0000000000000000000000000000000000000000000000000000000082169050919050565b6113e6816113b2565b81146113f0575f80fd5b50565b5f81359050611401816113dd565b92915050565b5f6020828403121561141c5761141b6113aa565b5b5f611429848285016113f3565b91505092915050565b5f8115159050919050565b61144681611432565b82525050565b5f60208201905061145f5f83018461143d565b92915050565b5f819050919050565b61147781611465565b82525050565b5f6020820190506114905f83018461146e565b92915050565b61149f81611465565b81146114a9575f80fd5b50565b5f813590506114ba81611496565b92915050565b5f602082840312156114d5576114d46113aa565b5b5f6114e2848285016114ac565b91505092915050565b5f73ffffffffffffffffffffffffffffffffffffffff82169050919050565b5f611514826114eb565b9050919050565b6115248161150a565b811461152e575f80fd5b50565b5f8135905061153f8161151b565b92915050565b5f806040838503121561155b5761155a6113aa565b5b5f61156885828601611531565b9250506020611579858286016114ac565b9150509250929050565b61158c816113b2565b82525050565b5f6020820190506115a55f830184611583565b92915050565b5f602082840312156115c0576115bf6113aa565b5b5f6115cd84828501611531565b91505092915050565b6115df8161150a565b82525050565b5f6020820190506115f85f8301846115d6565b92915050565b5f80fd5b5f80fd5b5f80fd5b5f8083601f84011261161f5761161e6115fe565b5b8235905067ffffffffffffffff81111561163c5761163b611602565b5b60208301915083600182028301111561165857611657611606565b5b9250929050565b5f8060208385031215611675576116746113aa565b5b5f83013567ffffffffffffffff811115611692576116916113ae565b5b61169e8582860161160a565b92509250509250929050565b5f6040820190506116bd5f83018561146e565b6116ca60208301846115d6565b9392505050565b5f81519050919050565b5f82825260208201905092915050565b8281835e5f83830152505050565b5f601f19601f8301169050919050565b5f611713826116d1565b61171d81856116db565b935061172d8185602086016116eb565b611736816116f9565b840191505092915050565b5f6020820190508181035f8301526117598184611709565b905092915050565b5f805f60408486031215611778576117776113aa565b5b5f61178586828701611531565b935050602084013567ffffffffffffffff8111156117a6576117a56113ae565b5b6117b28682870161160a565b92509250509250925092565b5f80fd5b7f4e487b71000000000000000000000000000000000000000000000000000000005f52604160045260245ffd5b6117f8826116f9565b810181811067ffffffffffffffff82111715611817576118166117c2565b5b80604052505050565b5f6118296113a1565b905061183582826117ef565b919050565b5f6080828403121561184f5761184e6117be565b5b6118596080611820565b90505f61186884828501611531565b5f83015250602061187b848285016113f3565b602083015250604061188f848285016114ac565b60408301525060606118a3848285016114ac565b60608301525092915050565b5f608082840312156118c4576118c36113aa565b5b5f6118d18482850161183a565b91505092915050565b5f815190506118e88161151b565b92915050565b5f60208284031215611903576119026113aa565b5b5f611910848285016118da565b91505092915050565b5f819050919050565b5f819050919050565b5f61194561194061193b84611919565b611922565b611465565b9050919050565b6119558161192b565b82525050565b5f60408201905061196e5f8301856115d6565b61197b602083018461194c565b9392505050565b61198b81611432565b8114611995575f80fd5b50565b5f815190506119a681611982565b92915050565b5f602082840312156119c1576119c06113aa565b5b5f6119ce84828501611998565b91505092915050565b7f4e487b71000000000000000000000000000000000000000000000000000000005f52601160045260245ffd5b5f611a0e82611465565b91507fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff8203611a4057611a3f6119d7565b5b600182019050919050565b5f604082019050611a5e5f8301856115d6565b611a6b602083018461146e565b9392505050565b5f81905092915050565b5f611a86826116d1565b611a908185611a72565b9350611aa08185602086016116eb565b80840191505092915050565b5f611ab78284611a7c565b915081905092915050565b5f8160601b9050919050565b5f611ad882611ac2565b9050919050565b5f611ae982611ace565b9050919050565b611b01611afc8261150a565b611adf565b82525050565b5f819050919050565b611b21611b1c82611465565b611b07565b82525050565b5f611b328286611af0565b601482019150611b428285611af0565b601482019150611b528284611b10565b60208201915081905094935050505056fea2646970667358221220e1ce7f1c57a6d62d7c8e566241c04213bed868c0967ce7c24b4cc5c5f5d63e4364736f6c634300081a0033", e = class e extends O {
6
+ import { RegistryType as C } from "../utils.js";
7
+ const _ = "0x608060405273deaddeaddeaddeaddeaddeaddeaddeaddeaddead5f806101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff160217905550348015610062575f80fd5b5061007161007660201b60201c565b61010b565b5f6100856100e260201b60201c565b90508054600181161561009f5763f92ee8a95f526004601cfd5b8160c01c808260011c146100dd578060011b8355806020527fc7f505b2f371ae2175ee4913f4499e1f2633a7b5936321eed1cdaeb6115181d2602080a15b505050565b5f7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffbf6011325f1b905090565b611b99806101185f395ff3fe6080604052600436106101b6575f3560e01c8063514e62fc116100eb578063c884ef8311610089578063ea3d508a11610063578063ea3d508a146105c1578063f04e283e146105eb578063f2fde38b14610607578063fee81cf414610623576101b6565b8063c884ef831461051f578063db09da121461055b578063dcc59b6f14610597576101b6565b80638da5cb5b116100c55780638da5cb5b14610465578063a270a7371461048f578063a4d66daf146104b9578063bb1757cf146104e3576101b6565b8063514e62fc1461041557806354d1f13d14610451578063715018a61461045b576101b6565b806328d6183b11610158578063439fab9111610132578063439fab9114610358578063474f5a44146103805780634a4ee7b1146103bd5780634e7165a2146103d9576101b6565b806328d6183b146102c85780632de94807146102f257806338d52e0f1461032e576101b6565b80631c10893f116101945780631c10893f1461023c5780631cd64df414610258578063228cb7331461029457806325692962146102be576101b6565b806301ffc9a7146101ba57806307621eca146101f6578063183a4f6e14610220575b5f80fd5b3480156101c5575f80fd5b506101e060048036038101906101db9190611407565b61065f565b6040516101ed919061144c565b60405180910390f35b348015610201575f80fd5b5061020a6106d8565b604051610217919061147d565b60405180910390f35b61023a600480360381019061023591906114c0565b6106e1565b005b61025660048036038101906102519190611545565b6106ee565b005b348015610263575f80fd5b5061027e60048036038101906102799190611545565b610704565b60405161028b919061144c565b60405180910390f35b34801561029f575f80fd5b506102a861071a565b6040516102b5919061147d565b60405180910390f35b6102c6610720565b005b3480156102d3575f80fd5b506102dc610771565b6040516102e99190611592565b60405180910390f35b3480156102fd575f80fd5b50610318600480360381019061031391906115ab565b610798565b604051610325919061147d565b60405180910390f35b348015610339575f80fd5b506103426107b1565b60405161034f91906115e5565b60405180910390f35b348015610363575f80fd5b5061037e6004803603810190610379919061165f565b6107d4565b005b34801561038b575f80fd5b506103a660048036038101906103a1919061165f565b61092c565b6040516103b49291906116aa565b60405180910390f35b6103d760048036038101906103d29190611545565b610960565b005b3480156103e4575f80fd5b506103ff60048036038101906103fa919061165f565b610976565b60405161040c9190611741565b60405180910390f35b348015610420575f80fd5b5061043b60048036038101906104369190611545565b6109cd565b604051610448919061144c565b60405180910390f35b6104596109e4565b005b610463610a1d565b005b348015610470575f80fd5b50610479610a30565b60405161048691906115e5565b60405180910390f35b34801561049a575f80fd5b506104a3610a58565b6040516104b091906115e5565b60405180910390f35b3480156104c4575f80fd5b506104cd610a7d565b6040516104da919061147d565b60405180910390f35b3480156104ee575f80fd5b5061050960048036038101906105049190611761565b610a83565b604051610516919061144c565b60405180910390f35b34801561052a575f80fd5b50610545600480360381019061054091906115ab565b610e9b565b604051610552919061144c565b60405180910390f35b348015610566575f80fd5b50610581600480360381019061057c9190611761565b610eb8565b60405161058e919061144c565b60405180910390f35b3480156105a2575f80fd5b506105ab610ecb565b6040516105b8919061147d565b60405180910390f35b3480156105cc575f80fd5b506105d5610ed1565b6040516105e29190611592565b60405180910390f35b610605600480360381019061060091906115ab565b610ee3565b005b610621600480360381019061061c91906115ab565b610f21565b005b34801561062e575f80fd5b50610649600480360381019061064491906115ab565b610f4a565b604051610656919061147d565b60405180910390f35b5f7f0d36a40d000000000000000000000000000000000000000000000000000000007bffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916827bffffffffffffffffffffffffffffffffffffffffffffffffffffffff191614806106d157506106d082610f63565b5b9050919050565b5f600254905090565b6106eb3382610fdc565b50565b6106f6610feb565b6107008282611022565b5050565b5f818261071085610798565b1614905092915050565b60025481565b5f610729611032565b67ffffffffffffffff164201905063389a75e1600c52335f52806020600c2055337fdbf36a107da19e49527a7176a1babf963b4b0ff8cde35ee35d6cd8f1f9ac7e1d5f80a250565b5f7f0d36a40d00000000000000000000000000000000000000000000000000000000905090565b5f638b78c6d8600c52815f526020600c20549050919050565b5f8054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b5f6107dd61103c565b9050805460038255801561080f5760018160011c14303b106108065763f92ee8a95f526004601cfd5b818160ff1b1b91505b505f838381019061082091906118af565b90505f8160400151148061083757505f8160600151145b1561086e576040517ff92ee8a900000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b805f015160045f6101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff160217905550806020015160065f6101000a81548163ffffffff021916908360e01c0217905550806040015160028190555080606001516005819055506108f133611065565b508015610927576002815560016020527fc7f505b2f371ae2175ee4913f4499e1f2633a7b5936321eed1cdaeb6115181d2602080a15b505050565b5f806040517fd623472500000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b610968610feb565b6109728282610fdc565b5050565b60605f67ffffffffffffffff811115610992576109916117c2565b5b6040519080825280601f01601f1916602001820160405280156109c45781602001600182028036833780820191505090505b50905092915050565b5f80826109d985610798565b161415905092915050565b63389a75e1600c52335f525f6020600c2055337ffa7b8eab7da67f412cc9575ed43464468f9bfbae89d1675917346ca6d8fe3c925f80a2565b610a25610feb565b610a2e5f61113b565b565b5f7fffffffffffffffffffffffffffffffffffffffffffffffffffffffff7487392754905090565b60045f9054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b60055481565b5f610a8c610feb565b5f60045f9054906101000a900473ffffffffffffffffffffffffffffffffffffffff1690503073ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff16638da5cb5b6040518163ffffffff1660e01b8152600401602060405180830381865afa158015610b11573d5f803e3d5ffd5b505050506040513d601f19601f82011682018060405250810190610b3591906118ee565b73ffffffffffffffffffffffffffffffffffffffff1614158015610bd85750600115158173ffffffffffffffffffffffffffffffffffffffff1663514e62fc3060026040518363ffffffff1660e01b8152600401610b9492919061195b565b602060405180830381865afa158015610baf573d5f803e3d5ffd5b505050506040513d601f19601f82011682018060405250810190610bd391906119ac565b151514155b15610c0f576040517f82b4290000000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b610c1885611201565b610c4e576040517f6247a84e00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b60015f815480929190610c6090611a04565b9190505550600160035f8773ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020015f205f6101000a81548160ff0219169083151502179055505f60045f9054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1660065f9054906101000a900460e01b87600254604051602401610d17929190611a4b565b604051602081830303815290604052907bffffffffffffffffffffffffffffffffffffffffffffffffffffffff19166020820180517bffffffffffffffffffffffffffffffffffffffffffffffffffffffff8381831617835250505050604051610d819190611aac565b5f604051808303815f865af19150503d805f8114610dba576040519150601f19603f3d011682016040523d82523d5f602084013e610dbf565b606091505b5050905080610dfa576040517f360e42e100000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b8573ffffffffffffffffffffffffffffffffffffffff167f9ad2e7a4af16dceda9cce4274b2f59c328d8c012eb0e15eb5e1e73b7d8f264d360045f9054906101000a900473ffffffffffffffffffffffffffffffffffffffff1688600254604051602001610e6a93929190611b27565b604051602081830303815290604052604051610e869190611741565b60405180910390a26001925050509392505050565b6003602052805f5260405f205f915054906101000a900460ff1681565b5f610ec284611201565b90509392505050565b60015481565b60065f9054906101000a900460e01b81565b610eeb610feb565b63389a75e1600c52805f526020600c208054421115610f1157636f5e88185f526004601cfd5b5f815550610f1e8161113b565b50565b610f29610feb565b8060601b610f3e57637448fbae5f526004601cfd5b610f478161113b565b50565b5f63389a75e1600c52815f526020600c20549050919050565b5f7fa9216705000000000000000000000000000000000000000000000000000000007bffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916827bffffffffffffffffffffffffffffffffffffffffffffffffffffffff19161480610fd55750610fd482611263565b5b9050919050565b610fe782825f6112dc565b5050565b7fffffffffffffffffffffffffffffffffffffffffffffffffffffffff74873927543314611020576382b429005f526004601cfd5b565b61102e828260016112dc565b5050565b5f6202a300905090565b5f7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffbf6011325f1b905090565b61106d611334565b156110e5577fffffffffffffffffffffffffffffffffffffffffffffffffffffffff748739278054156110a757630dc149f05f526004601cfd5b8160601b60601c9150811560ff1b82178155815f7f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e05f80a350611138565b8060601b60601c9050807fffffffffffffffffffffffffffffffffffffffffffffffffffffffff7487392755805f7f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e05f80a35b50565b611143611334565b156111a8577fffffffffffffffffffffffffffffffffffffffffffffffffffffffff748739278160601b60601c91508181547f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e05f80a3811560ff1b82178155506111fe565b7fffffffffffffffffffffffffffffffffffffffffffffffffffffffff748739278160601b60601c91508181547f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e05f80a3818155505b50565b5f60035f8373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020015f205f9054906101000a900460ff1615801561125c5750600554600154105b9050919050565b5f7f6ab67a0d000000000000000000000000000000000000000000000000000000007bffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916827bffffffffffffffffffffffffffffffffffffffffffffffffffffffff191614806112d557506112d482611338565b5b9050919050565b638b78c6d8600c52825f526020600c208054838117836112fe57848216821890505b80835580600c5160601c7f715ad5ce61fc9595c7b415289d59cf203f23a94fa06f04af7e489a0a76e1fe265f80a3505050505050565b5f90565b5f7f01ffc9a7000000000000000000000000000000000000000000000000000000007bffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916827bffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916149050919050565b5f604051905090565b5f80fd5b5f80fd5b5f7fffffffff0000000000000000000000000000000000000000000000000000000082169050919050565b6113e6816113b2565b81146113f0575f80fd5b50565b5f81359050611401816113dd565b92915050565b5f6020828403121561141c5761141b6113aa565b5b5f611429848285016113f3565b91505092915050565b5f8115159050919050565b61144681611432565b82525050565b5f60208201905061145f5f83018461143d565b92915050565b5f819050919050565b61147781611465565b82525050565b5f6020820190506114905f83018461146e565b92915050565b61149f81611465565b81146114a9575f80fd5b50565b5f813590506114ba81611496565b92915050565b5f602082840312156114d5576114d46113aa565b5b5f6114e2848285016114ac565b91505092915050565b5f73ffffffffffffffffffffffffffffffffffffffff82169050919050565b5f611514826114eb565b9050919050565b6115248161150a565b811461152e575f80fd5b50565b5f8135905061153f8161151b565b92915050565b5f806040838503121561155b5761155a6113aa565b5b5f61156885828601611531565b9250506020611579858286016114ac565b9150509250929050565b61158c816113b2565b82525050565b5f6020820190506115a55f830184611583565b92915050565b5f602082840312156115c0576115bf6113aa565b5b5f6115cd84828501611531565b91505092915050565b6115df8161150a565b82525050565b5f6020820190506115f85f8301846115d6565b92915050565b5f80fd5b5f80fd5b5f80fd5b5f8083601f84011261161f5761161e6115fe565b5b8235905067ffffffffffffffff81111561163c5761163b611602565b5b60208301915083600182028301111561165857611657611606565b5b9250929050565b5f8060208385031215611675576116746113aa565b5b5f83013567ffffffffffffffff811115611692576116916113ae565b5b61169e8582860161160a565b92509250509250929050565b5f6040820190506116bd5f83018561146e565b6116ca60208301846115d6565b9392505050565b5f81519050919050565b5f82825260208201905092915050565b8281835e5f83830152505050565b5f601f19601f8301169050919050565b5f611713826116d1565b61171d81856116db565b935061172d8185602086016116eb565b611736816116f9565b840191505092915050565b5f6020820190508181035f8301526117598184611709565b905092915050565b5f805f60408486031215611778576117776113aa565b5b5f61178586828701611531565b935050602084013567ffffffffffffffff8111156117a6576117a56113ae565b5b6117b28682870161160a565b92509250509250925092565b5f80fd5b7f4e487b71000000000000000000000000000000000000000000000000000000005f52604160045260245ffd5b6117f8826116f9565b810181811067ffffffffffffffff82111715611817576118166117c2565b5b80604052505050565b5f6118296113a1565b905061183582826117ef565b919050565b5f6080828403121561184f5761184e6117be565b5b6118596080611820565b90505f61186884828501611531565b5f83015250602061187b848285016113f3565b602083015250604061188f848285016114ac565b60408301525060606118a3848285016114ac565b60608301525092915050565b5f608082840312156118c4576118c36113aa565b5b5f6118d18482850161183a565b91505092915050565b5f815190506118e88161151b565b92915050565b5f60208284031215611903576119026113aa565b5b5f611910848285016118da565b91505092915050565b5f819050919050565b5f819050919050565b5f61194561194061193b84611919565b611922565b611465565b9050919050565b6119558161192b565b82525050565b5f60408201905061196e5f8301856115d6565b61197b602083018461194c565b9392505050565b61198b81611432565b8114611995575f80fd5b50565b5f815190506119a681611982565b92915050565b5f602082840312156119c1576119c06113aa565b5b5f6119ce84828501611998565b91505092915050565b7f4e487b71000000000000000000000000000000000000000000000000000000005f52601160045260245ffd5b5f611a0e82611465565b91507fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff8203611a4057611a3f6119d7565b5b600182019050919050565b5f604082019050611a5e5f8301856115d6565b611a6b602083018461146e565b9392505050565b5f81905092915050565b5f611a86826116d1565b611a908185611a72565b9350611aa08185602086016116eb565b80840191505092915050565b5f611ab78284611a7c565b915081905092915050565b5f8160601b9050919050565b5f611ad882611ac2565b9050919050565b5f611ae982611ace565b9050919050565b611b01611afc8261150a565b611adf565b82525050565b5f819050919050565b611b21611b1c82611465565b611b07565b82525050565b5f611b328286611af0565b601482019150611b428285611af0565b601482019150611b528284611b10565b60208201915081905094935050505056fea2646970667358221220e1ce7f1c57a6d62d7c8e566241c04213bed868c0967ce7c24b4cc5c5f5d63e4364736f6c634300081a0033", e = class e extends O {
8
8
  constructor() {
9
9
  super(...arguments), this.abi = c;
10
10
  }
@@ -17,7 +17,7 @@ const C = "0x608060405273deaddeaddeaddeaddeaddeaddeaddeaddeaddead5f806101000a815
17
17
  * @returns {Promise<bigint>}
18
18
  */
19
19
  async claims(f) {
20
- return await i(this._config, {
20
+ return await r(this._config, {
21
21
  address: this.assertValidAddress(),
22
22
  args: [],
23
23
  // biome-ignore lint/suspicious/noExplicitAny: Accept any shape of valid wagmi/viem parameters, wagmi does the same thing internally
@@ -82,7 +82,7 @@ const C = "0x608060405273deaddeaddeaddeaddeaddeaddeaddeaddeaddead5f806101000a815
82
82
  * @returns {Promise<Address>}
83
83
  */
84
84
  async venue(f) {
85
- return await h(this._config, {
85
+ return await m(this._config, {
86
86
  address: this.assertValidAddress(),
87
87
  // biome-ignore lint/suspicious/noExplicitAny: Accept any shape of valid wagmi/viem parameters, wagmi does the same thing internally
88
88
  ...f
@@ -97,7 +97,7 @@ const C = "0x608060405273deaddeaddeaddeaddeaddeaddeaddeaddeaddead5f806101000a815
97
97
  * @returns {Promise<bigint>}
98
98
  */
99
99
  async limit(f) {
100
- return await m(this._config, {
100
+ return await h(this._config, {
101
101
  address: this.assertValidAddress(),
102
102
  // biome-ignore lint/suspicious/noExplicitAny: Accept any shape of valid wagmi/viem parameters, wagmi does the same thing internally
103
103
  ...f
@@ -150,7 +150,7 @@ const C = "0x608060405273deaddeaddeaddeaddeaddeaddeaddeaddeaddead5f806101000a815
150
150
  ...b
151
151
  }
152
152
  );
153
- return { hash: await p(this._config, a), result: d };
153
+ return { hash: await g(this._config, a), result: d };
154
154
  }
155
155
  /**
156
156
  * Check if an incentive is claimable.
@@ -164,13 +164,39 @@ const C = "0x608060405273deaddeaddeaddeaddeaddeaddeaddeaddeaddead5f806101000a815
164
164
  * @returns {Promise<boolean>} - True if the incentive is claimable based on the data payload
165
165
  */
166
166
  async isClaimable(f, b) {
167
- return await g(this._config, {
167
+ return await p(this._config, {
168
168
  address: this.assertValidAddress(),
169
169
  args: [s(f)],
170
170
  // biome-ignore lint/suspicious/noExplicitAny: Accept any shape of valid wagmi/viem parameters, wagmi does the same thing internally
171
171
  ...b
172
172
  });
173
173
  }
174
+ /**
175
+ * Check if any claims remain by comparing the incentive's total claims against its limit. Does not take requesting user's elligibility into account.
176
+ *
177
+ * @public
178
+ * @async
179
+ * @param {?ReadParams} [params]
180
+ * @returns {Promise<boolean>} - True if total claims is less than limit
181
+ */
182
+ async canBeClaimed(f) {
183
+ return await this.getRemainingClaimPotential(f) > 0n;
184
+ }
185
+ /**
186
+ * Check how many claims remain by comparing the incentive's total claims against its limit. Does not take requesting user's elligibility into account.
187
+ *
188
+ * @public
189
+ * @async
190
+ * @param {?ReadParams} [params]
191
+ * @returns {Promise<bigint>} - True if total claims is less than limit
192
+ */
193
+ async getRemainingClaimPotential(f) {
194
+ const [b, a] = await Promise.all([
195
+ this.claims(f),
196
+ this.limit(f)
197
+ ]);
198
+ return a - b;
199
+ }
174
200
  /**
175
201
  * @inheritdoc
176
202
  *
@@ -186,8 +212,8 @@ const C = "0x608060405273deaddeaddeaddeaddeaddeaddeaddeaddeaddead5f806101000a815
186
212
  );
187
213
  return {
188
214
  abi: c,
189
- bytecode: C,
190
- args: [T(a)],
215
+ bytecode: _,
216
+ args: [P(a)],
191
217
  ...this.optionallyAttachAccount(d.account)
192
218
  };
193
219
  }
@@ -205,10 +231,10 @@ const C = "0x608060405273deaddeaddeaddeaddeaddeaddeaddeaddeaddead5f806101000a815
205
231
  e.bases = {
206
232
  31337: void 0,
207
233
  ...V
208
- }, e.registryType = _.INCENTIVE;
234
+ }, e.registryType = C.INCENTIVE;
209
235
  let t = e;
210
- const T = ({
211
- venue: r,
236
+ const P = ({
237
+ venue: i,
212
238
  selector: f,
213
239
  reward: b,
214
240
  limit: a
@@ -219,11 +245,11 @@ const T = ({
219
245
  { type: "uint256", name: "reward" },
220
246
  { type: "uint256", name: "limit" }
221
247
  ],
222
- [r, f, b, a]
248
+ [i, f, b, a]
223
249
  );
224
250
  export {
225
251
  t as PointsIncentive,
226
252
  c as pointsIncentiveAbi,
227
- T as preparePointsIncentivePayload
253
+ P as preparePointsIncentivePayload
228
254
  };
229
255
  //# sourceMappingURL=PointsIncentive.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"PointsIncentive.js","sources":["../../src/Incentives/PointsIncentive.ts"],"sourcesContent":["import {\n pointsIncentiveAbi,\n readPointsIncentiveClaimed,\n readPointsIncentiveClaims,\n readPointsIncentiveCurrentReward,\n readPointsIncentiveIsClaimable,\n readPointsIncentiveLimit,\n readPointsIncentiveReward,\n readPointsIncentiveSelector,\n readPointsIncentiveVenue,\n simulatePointsIncentiveClaim,\n writePointsIncentiveClaim,\n} from '@boostxyz/evm';\nimport { bytecode } from '@boostxyz/evm/artifacts/contracts/incentives/PointsIncentive.sol/PointsIncentive.json';\nimport {\n type Address,\n type ContractEventName,\n type Hex,\n encodeAbiParameters,\n zeroHash,\n} from 'viem';\nimport { PointsIncentive as PointsIncentiveBases } from '../../dist/deployments.json';\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 { pointsIncentiveAbi };\n\n/**\n * The object representation of a `PointsIncentive.InitPayload`\n *\n * @export\n * @interface PointsIncentivePayload\n * @typedef {PointsIncentivePayload}\n */\nexport interface PointsIncentivePayload {\n /**\n * The address of the points contract\n *\n * @type {Address}\n */\n venue: Address;\n /**\n * The selector for the issuance function on the points contract\n *\n * @type {Hex}\n */\n selector: Hex;\n /**\n * The reward amount issued for each claim\n *\n * @type {bigint}\n */\n reward: bigint;\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 `PointsIncentive` event types.\n *\n * @export\n * @typedef {PointsIncentiveLog}\n * @template {ContractEventName<\n * typeof pointsIncentiveAbi\n * >} [event=ContractEventName<typeof pointsIncentiveAbi>]\n */\nexport type PointsIncentiveLog<\n event extends ContractEventName<\n typeof pointsIncentiveAbi\n > = ContractEventName<typeof pointsIncentiveAbi>,\n> = GenericLog<typeof pointsIncentiveAbi, event>;\n\n/**\n * A simple on-chain points incentive implementation that allows claiming of soulbound tokens.\n *\n * In order for any claim to be successful:\n * - The claimer must not have already claimed the incentive; and\n * - The maximum number of claims must not have been reached; and\n * - This contract must be authorized to operate the points contract's issuance function\n *\n * @export\n * @class PointsIncentive\n * @typedef {PointsIncentive}\n * @extends {DeployableTarget<PointsIncentivePayload>}\n */\nexport class PointsIncentive extends DeployableTarget<\n PointsIncentivePayload,\n typeof pointsIncentiveAbi\n> {\n public override readonly abi = pointsIncentiveAbi;\n /**\n * @inheritdoc\n *\n * @public\n * @static\n * @type {Record<number, Address>}\n */\n public static override bases: Record<number, Address> = {\n 31337: import.meta.env.VITE_POINTS_INCENTIVE_BASE,\n ...(PointsIncentiveBases as Record<number, Address>),\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 number of claims that have been made\n *\n * @public\n * @async\n * @param {?ReadParams} [params]\n * @returns {Promise<bigint>}\n */\n public async claims(params?: ReadParams) {\n return await readPointsIncentiveClaims(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 current reward\n *\n * @public\n * @async\n * @param {?ReadParams} [params]\n * @returns {Promise<bigint>} - The current reward\n */\n public async currentReward(params?: ReadParams) {\n return await readPointsIncentiveCurrentReward(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} [params]\n * @returns {Promise<bigint>} The reward amount issued for each claim\n */\n public async reward(params?: ReadParams) {\n return await readPointsIncentiveReward(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 * A mapping of address to claim status\n *\n * @public\n * @async\n * @param {Address} address\n * @param {?ReadParams} [params]\n * @returns {Promise<boolean>}\n */\n public async claimed(address: Address, params?: ReadParams) {\n return await readPointsIncentiveClaimed(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 address of the points contract\n *\n * @public\n * @async\n * @param {?ReadParams} [params]\n * @returns {Promise<Address>}\n */\n public async venue(params?: ReadParams) {\n return await readPointsIncentiveVenue(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 * The maximum number of claims that can be made (one per address)\n *\n * @public\n * @async\n * @param {?ReadParams} [params]\n * @returns {Promise<bigint>}\n */\n public async limit(params?: ReadParams) {\n return await readPointsIncentiveLimit(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 * The selector for the issuance function on the points contract\n *\n * @public\n * @async\n * @param {?ReadParams} [params]\n * @returns {Promise<Hex>}\n */\n public async selector(params?: ReadParams) {\n return await readPointsIncentiveSelector(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 the incentive\n *\n * @public\n * @async\n * @param {ClaimPayload} payload\n * @param {?WriteParams} [params]\n * @returns {Promise<boolean>} - True if the incentive was successfully claimed\n */\n protected async claim(payload: ClaimPayload, params?: WriteParams) {\n return await this.awaitResult(this.claimRaw(payload, params));\n }\n\n /**\n * Claim the incentive\n *\n * @public\n * @async\n * @param {ClaimPayload} payload\n * @param {?WriteParams} [params]\n * @returns {Promise<{ hash: `0x${string}`; result: boolean; }>} - True if the incentive was successfully claimed\n */\n protected async claimRaw(payload: ClaimPayload, params?: WriteParams) {\n const { request, result } = await simulatePointsIncentiveClaim(\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 writePointsIncentiveClaim(this._config, request);\n return { hash, result };\n }\n\n /**\n * Check if an incentive is claimable.\n * For the POOL strategy, the `bytes data` portion of the payload ignored.\n * The recipient must not have already claimed the incentive.\n *\n * @public\n * @async\n * @param {ClaimPayload} payload\n * @param {?ReadParams} [params]\n * @returns {Promise<boolean>} - True if the incentive is claimable based on the data payload\n */\n public async isClaimable(payload: ClaimPayload, params?: ReadParams) {\n return await readPointsIncentiveIsClaimable(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 {?PointsIncentivePayload} [_payload]\n * @param {?DeployableOptions} [_options]\n * @returns {GenericDeployableParams}\n */\n public override buildParameters(\n _payload?: PointsIncentivePayload,\n _options?: DeployableOptions,\n ): GenericDeployableParams {\n const [payload, options] = this.validateDeploymentConfig(\n _payload,\n _options,\n );\n return {\n abi: pointsIncentiveAbi,\n bytecode: bytecode as Hex,\n args: [preparePointsIncentivePayload(payload)],\n ...this.optionallyAttachAccount(options.account),\n };\n }\n\n /**\n * Builds the claim data for the PointsIncentive.\n *\n * @public\n * @returns {Hash} A `zeroHash`, as PointsIncentive doesn't require specific claim data.\n * @description This function returns `zeroHash` because PointsIncentive doesn't use any specific claim data.\n */\n public buildClaimData() {\n return zeroHash;\n }\n}\n\n/**\n * Given a {@link PointsIncentivePayload}, properly encode a `PointsIncentive.InitPayload` for use with {@link PointsIncentive} initialization.\n *\n * @param {PointsIncentivePayload} param0\n * @param {Address} param0.venue - The address of the points contract\n * @param {Hex} param0.selector - The selector for the issuance function on the points contract\n * @param {bigint} param0.reward - The reward amount issued for each claim\n * @param {bigint} param0.limit - The maximum number of claims that can be made (one per address)\n * @returns {*}\n */\nexport const preparePointsIncentivePayload = ({\n venue,\n selector,\n reward,\n limit,\n}: PointsIncentivePayload) => {\n return encodeAbiParameters(\n [\n { type: 'address', name: 'venue' },\n { type: 'bytes4', name: 'selector' },\n { type: 'uint256', name: 'reward' },\n { type: 'uint256', name: 'limit' },\n ],\n [venue, selector, reward, limit],\n );\n};\n"],"names":["_PointsIncentive","DeployableTarget","pointsIncentiveAbi","params","readPointsIncentiveClaims","readPointsIncentiveCurrentReward","readPointsIncentiveReward","address","readPointsIncentiveClaimed","readPointsIncentiveVenue","readPointsIncentiveLimit","readPointsIncentiveSelector","payload","request","result","simulatePointsIncentiveClaim","prepareClaimPayload","writePointsIncentiveClaim","readPointsIncentiveIsClaimable","_payload","_options","options","bytecode","preparePointsIncentivePayload","zeroHash","PointsIncentiveBases","RegistryType","PointsIncentive","venue","selector","reward","limit","encodeAbiParameters"],"mappings":";;;;;;k3cAmGaA,IAAN,MAAMA,UAAwBC,EAGnC;AAAA,EAHK,cAAA;AAAA,UAAA,GAAA,SAAA,GAIL,KAAyB,MAAMC;AAAAA,EAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,EA6B/B,MAAa,OAAOC,GAAqB;AAChC,WAAA,MAAMC,EAA0B,KAAK,SAAS;AAAA,MACnD,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,cAAcA,GAAqB;AACvC,WAAA,MAAME,EAAiC,KAAK,SAAS;AAAA,MAC1D,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,OAAOA,GAAqB;AAChC,WAAA,MAAMG,EAA0B,KAAK,SAAS;AAAA,MACnD,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,QAAQI,GAAkBJ,GAAqB;AACnD,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AAQ;AAAA,EACnC;AAAA,EACA,CAACJ,GAAOC,GAAUC,GAAQC,CAAK;AAAA;"}
1
+ {"version":3,"file":"PointsIncentive.js","sources":["../../src/Incentives/PointsIncentive.ts"],"sourcesContent":["import {\n pointsIncentiveAbi,\n readPointsIncentiveClaimed,\n readPointsIncentiveClaims,\n readPointsIncentiveCurrentReward,\n readPointsIncentiveIsClaimable,\n readPointsIncentiveLimit,\n readPointsIncentiveReward,\n readPointsIncentiveSelector,\n readPointsIncentiveVenue,\n simulatePointsIncentiveClaim,\n writePointsIncentiveClaim,\n} from '@boostxyz/evm';\nimport { bytecode } from '@boostxyz/evm/artifacts/contracts/incentives/PointsIncentive.sol/PointsIncentive.json';\nimport {\n type Address,\n type ContractEventName,\n type Hex,\n encodeAbiParameters,\n zeroHash,\n} from 'viem';\nimport { PointsIncentive as PointsIncentiveBases } from '../../dist/deployments.json';\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 { pointsIncentiveAbi };\n\n/**\n * The object representation of a `PointsIncentive.InitPayload`\n *\n * @export\n * @interface PointsIncentivePayload\n * @typedef {PointsIncentivePayload}\n */\nexport interface PointsIncentivePayload {\n /**\n * The address of the points contract\n *\n * @type {Address}\n */\n venue: Address;\n /**\n * The selector for the issuance function on the points contract\n *\n * @type {Hex}\n */\n selector: Hex;\n /**\n * The reward amount issued for each claim\n *\n * @type {bigint}\n */\n reward: bigint;\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 `PointsIncentive` event types.\n *\n * @export\n * @typedef {PointsIncentiveLog}\n * @template {ContractEventName<\n * typeof pointsIncentiveAbi\n * >} [event=ContractEventName<typeof pointsIncentiveAbi>]\n */\nexport type PointsIncentiveLog<\n event extends ContractEventName<\n typeof pointsIncentiveAbi\n > = ContractEventName<typeof pointsIncentiveAbi>,\n> = GenericLog<typeof pointsIncentiveAbi, event>;\n\n/**\n * A simple on-chain points incentive implementation that allows claiming of soulbound tokens.\n *\n * In order for any claim to be successful:\n * - The claimer must not have already claimed the incentive; and\n * - The maximum number of claims must not have been reached; and\n * - This contract must be authorized to operate the points contract's issuance function\n *\n * @export\n * @class PointsIncentive\n * @typedef {PointsIncentive}\n * @extends {DeployableTarget<PointsIncentivePayload>}\n */\nexport class PointsIncentive extends DeployableTarget<\n PointsIncentivePayload,\n typeof pointsIncentiveAbi\n> {\n public override readonly abi = pointsIncentiveAbi;\n /**\n * @inheritdoc\n *\n * @public\n * @static\n * @type {Record<number, Address>}\n */\n public static override bases: Record<number, Address> = {\n 31337: import.meta.env.VITE_POINTS_INCENTIVE_BASE,\n ...(PointsIncentiveBases as Record<number, Address>),\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 number of claims that have been made\n *\n * @public\n * @async\n * @param {?ReadParams} [params]\n * @returns {Promise<bigint>}\n */\n public async claims(params?: ReadParams) {\n return await readPointsIncentiveClaims(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 current reward\n *\n * @public\n * @async\n * @param {?ReadParams} [params]\n * @returns {Promise<bigint>} - The current reward\n */\n public async currentReward(params?: ReadParams) {\n return await readPointsIncentiveCurrentReward(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} [params]\n * @returns {Promise<bigint>} The reward amount issued for each claim\n */\n public async reward(params?: ReadParams) {\n return await readPointsIncentiveReward(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 * A mapping of address to claim status\n *\n * @public\n * @async\n * @param {Address} address\n * @param {?ReadParams} [params]\n * @returns {Promise<boolean>}\n */\n public async claimed(address: Address, params?: ReadParams) {\n return await readPointsIncentiveClaimed(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 address of the points contract\n *\n * @public\n * @async\n * @param {?ReadParams} [params]\n * @returns {Promise<Address>}\n */\n public async venue(params?: ReadParams) {\n return await readPointsIncentiveVenue(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 * The maximum number of claims that can be made (one per address)\n *\n * @public\n * @async\n * @param {?ReadParams} [params]\n * @returns {Promise<bigint>}\n */\n public async limit(params?: ReadParams) {\n return await readPointsIncentiveLimit(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 * The selector for the issuance function on the points contract\n *\n * @public\n * @async\n * @param {?ReadParams} [params]\n * @returns {Promise<Hex>}\n */\n public async selector(params?: ReadParams) {\n return await readPointsIncentiveSelector(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 the incentive\n *\n * @public\n * @async\n * @param {ClaimPayload} payload\n * @param {?WriteParams} [params]\n * @returns {Promise<boolean>} - True if the incentive was successfully claimed\n */\n protected async claim(payload: ClaimPayload, params?: WriteParams) {\n return await this.awaitResult(this.claimRaw(payload, params));\n }\n\n /**\n * Claim the incentive\n *\n * @public\n * @async\n * @param {ClaimPayload} payload\n * @param {?WriteParams} [params]\n * @returns {Promise<{ hash: `0x${string}`; result: boolean; }>} - True if the incentive was successfully claimed\n */\n protected async claimRaw(payload: ClaimPayload, params?: WriteParams) {\n const { request, result } = await simulatePointsIncentiveClaim(\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 writePointsIncentiveClaim(this._config, request);\n return { hash, result };\n }\n\n /**\n * Check if an incentive is claimable.\n * For the POOL strategy, the `bytes data` portion of the payload ignored.\n * The recipient must not have already claimed the incentive.\n *\n * @public\n * @async\n * @param {ClaimPayload} payload\n * @param {?ReadParams} [params]\n * @returns {Promise<boolean>} - True if the incentive is claimable based on the data payload\n */\n public async isClaimable(payload: ClaimPayload, params?: ReadParams) {\n return await readPointsIncentiveIsClaimable(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 * Check if any claims remain by comparing the incentive's total claims against its limit. Does not take requesting user's elligibility into account.\n *\n * @public\n * @async\n * @param {?ReadParams} [params]\n * @returns {Promise<boolean>} - True if total claims is less than limit\n */\n public async canBeClaimed(params?: ReadParams) {\n return (await this.getRemainingClaimPotential(params)) > 0n;\n }\n\n /**\n * Check how many claims remain by comparing the incentive's total claims against its limit. Does not take requesting user's elligibility into account.\n *\n * @public\n * @async\n * @param {?ReadParams} [params]\n * @returns {Promise<bigint>} - True if total claims is less than limit\n */\n public async getRemainingClaimPotential(params?: ReadParams) {\n const [claims, limit] = await Promise.all([\n this.claims(params),\n this.limit(params),\n ]);\n return limit - claims;\n }\n\n /**\n * @inheritdoc\n *\n * @public\n * @param {?PointsIncentivePayload} [_payload]\n * @param {?DeployableOptions} [_options]\n * @returns {GenericDeployableParams}\n */\n public override buildParameters(\n _payload?: PointsIncentivePayload,\n _options?: DeployableOptions,\n ): GenericDeployableParams {\n const [payload, options] = this.validateDeploymentConfig(\n _payload,\n _options,\n );\n return {\n abi: pointsIncentiveAbi,\n bytecode: bytecode as Hex,\n args: [preparePointsIncentivePayload(payload)],\n ...this.optionallyAttachAccount(options.account),\n };\n }\n\n /**\n * Builds the claim data for the PointsIncentive.\n *\n * @public\n * @returns {Hash} A `zeroHash`, as PointsIncentive doesn't require specific claim data.\n * @description This function returns `zeroHash` because PointsIncentive doesn't use any specific claim data.\n */\n public buildClaimData() {\n return zeroHash;\n }\n}\n\n/**\n * Given a {@link PointsIncentivePayload}, properly encode a `PointsIncentive.InitPayload` for use with {@link PointsIncentive} initialization.\n *\n * @param {PointsIncentivePayload} param0\n * @param {Address} param0.venue - The address of the points contract\n * @param {Hex} param0.selector - The selector for the issuance function on the points contract\n * @param {bigint} param0.reward - The reward amount issued for each claim\n * @param {bigint} param0.limit - The maximum number of claims that can be made (one per address)\n * @returns {*}\n */\nexport const preparePointsIncentivePayload = ({\n venue,\n selector,\n reward,\n limit,\n}: PointsIncentivePayload) => {\n return encodeAbiParameters(\n [\n { type: 'address', name: 'venue' },\n { type: 'bytes4', name: 'selector' },\n { type: 'uint256', name: 'reward' },\n { type: 'uint256', name: 'limit' },\n ],\n [venue, selector, reward, limit],\n );\n};\n"],"names":["_PointsIncentive","DeployableTarget","pointsIncentiveAbi","params","readPointsIncentiveClaims","readPointsIncentiveCurrentReward","readPointsIncentiveReward","address","readPointsIncentiveClaimed","readPointsIncentiveVenue","readPointsIncentiveLimit","readPointsIncentiveSelector","payload","request","result","simulatePointsIncentiveClaim","prepareClaimPayload","writePointsIncentiveClaim","readPointsIncentiveIsClaimable","claims","limit","_payload","_options","options","bytecode","preparePointsIncentivePayload","zeroHash","PointsIncentiveBases","RegistryType","PointsIncentive","venue","selector","reward","encodeAbiParameters"],"mappings":";;;;;;k3cAmGaA,IAAN,MAAMA,UAAwBC,EAGnC;AAAA,EAHK,cAAA;AAAA,UAAA,GAAA,SAAA,GAIL,KAAyB,MAAMC;AAAAA,EAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,EA6B/B,MAAa,OAAOC,GAAqB;AAChC,WAAA,MAAMC,EAA0B,KAAK,SAAS;AAAA,MACnD,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,cAAcA,GAAqB;AACvC,WAAA,MAAME,EAAiC,KAAK,SAAS;AAAA,MAC1D,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,OAAOA,GAAqB;AAChC,WAAA,MAAMG,EAA0B,KAAK,SAAS;AAAA,MACnD,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,QAAQI,GAAkBJ,GAAqB;AACnD,WAAA,MAAMK,EAA2B,KAAK,SAAS;AAAA,MACpD,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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AAAZ;AACF,MACSa;AAAA,EACL;AAAA,IACE,EAAE,MAAM,WAAW,MAAM,QAAQ;AAAA,IACjC,EAAE,MAAM,UAAU,MAAM,WAAW;AAAA,IACnC,EAAE,MAAM,WAAW,MAAM,SAAS;AAAA,IAClC,EAAE,MAAM,WAAW,MAAM,QAAQ;AAAA,EACnC;AAAA,EACA,CAACH,GAAOC,GAAUC,GAAQZ,CAAK;AAAA;"}
package/dist/index.cjs CHANGED
@@ -1,2 +1,2 @@
1
- "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const p=require("./BoostRegistry.cjs"),n=require("./BoostCore.cjs"),A=require("./Boost.cjs"),C=require("./Actions/Action.cjs"),a=require("./Actions/EventAction.cjs"),c=require("./AllowLists/AllowList.cjs"),E=require("./AllowLists/SimpleAllowList.cjs"),u=require("./SimpleDenyList-wDvsNIuY.cjs"),g=require("./Budgets/Budget.cjs"),o=require("./Budgets/ManagedBudget.cjs"),B=require("./Deployable/Deployable.cjs"),T=require("./Deployable/Contract.cjs"),V=require("./Deployable/DeployableTarget.cjs"),I=require("./Deployable/DeployableTargetWithRBAC.cjs"),m=require("./Incentives/AllowListIncentive.cjs"),S=require("./Incentives/CGDAIncentive.cjs"),v=require("./Incentives/ERC20Incentive.cjs"),P=require("./Incentives/ERC20VariableIncentive.cjs"),y=require("./Incentives/ERC20VariableCriteriaIncentive.cjs"),b=require("./Incentives/Incentive.cjs"),R=require("./Incentives/PointsIncentive.cjs"),l=require("./Validators/SignerValidator.cjs"),d=require("./Validators/LimitedSignerValidator.cjs"),s=require("./Validators/Validator.cjs"),e=require("./errors.cjs"),i=require("./utils.cjs"),D=require("./claiming.cjs"),t=require("./transfers.cjs"),L=require("./Auth/PassthroughAuth.cjs"),r=require("./generated-D3DE5TfH.cjs");exports.BOOST_REGISTRY_ADDRESS=p.BOOST_REGISTRY_ADDRESS;exports.BOOST_REGISTRY_ADDRESSES=p.BOOST_REGISTRY_ADDRESSES;exports.BoostRegistry=p.BoostRegistry;exports.BOOST_CORE_ADDRESS=n.BOOST_CORE_ADDRESS;exports.BOOST_CORE_ADDRESSES=n.BOOST_CORE_ADDRESSES;exports.BoostCore=n.BoostCore;exports.FEE_DENOMINATOR=n.FEE_DENOMINATOR;exports.Boost=A.Boost;exports.prepareBoostPayload=A.prepareBoostPayload;exports.ActionByComponentInterface=C.ActionByComponentInterface;exports.actionFromAddress=C.actionFromAddress;exports.EventAction=a.EventAction;exports.FilterType=a.FilterType;exports.PrimitiveType=a.PrimitiveType;exports.SignatureType=a.SignatureType;exports.anyActionParameter=a.anyActionParameter;exports.isEventActionPayloadSimple=a.isEventActionPayloadSimple;exports.prepareEventActionPayload=a.prepareEventActionPayload;exports.transactionSenderClaimant=a.transactionSenderClaimant;exports.AllowListByComponentInterface=c.AllowListByComponentInterface;exports.OpenAllowList=c.OpenAllowList;exports.allowListFromAddress=c.allowListFromAddress;exports.LIST_MANAGER_ROLE=E.LIST_MANAGER_ROLE;exports.SimpleAllowList=E.SimpleAllowList;exports.prepareSimpleAllowListPayload=E.prepareSimpleAllowListPayload;exports.SimpleDenyList=u.SimpleDenyList;exports.prepareSimpleDenyListPayload=u.prepareSimpleDenyListPayload;exports.BudgetByComponentInterface=g.BudgetByComponentInterface;exports.budgetFromAddress=g.budgetFromAddress;exports.ManagedBudget=o.ManagedBudget;exports.ManagedBudgetRoles=o.ManagedBudgetRoles;exports.isERC1155TransferPayload=o.isERC1155TransferPayload;exports.isFungibleTransfer=o.isFungibleTransfer;exports.prepareManagedBudgetPayload=o.prepareManagedBudgetPayload;exports.prepareTransfer=o.prepareTransfer;exports.Deployable=B.Deployable;exports.Contract=T.Contract;exports.DeployableTarget=V.DeployableTarget;exports.DeployableTargetWithRBAC=I.DeployableTargetWithRBAC;exports.Roles=I.Roles;exports.AllowListIncentive=m.AllowListIncentive;exports.prepareAllowListIncentivePayload=m.prepareAllowListIncentivePayload;exports.CGDAIncentive=S.CGDAIncentive;exports.prepareCGDAIncentivePayload=S.prepareCGDAIncentivePayload;exports.ERC20Incentive=v.ERC20Incentive;exports.prepareERC20IncentivePayload=v.prepareERC20IncentivePayload;exports.ERC20VariableIncentive=P.ERC20VariableIncentive;exports.prepareERC20VariableIncentivePayload=P.prepareERC20VariableIncentivePayload;exports.ERC20VariableCriteriaIncentive=y.ERC20VariableCriteriaIncentive;exports.gasRebateIncentiveCriteria=y.gasRebateIncentiveCriteria;exports.prepareERC20VariableCriteriaIncentivePayload=y.prepareERC20VariableCriteriaIncentivePayload;exports.IncentiveByComponentInterface=b.IncentiveByComponentInterface;exports.incentiveFromAddress=b.incentiveFromAddress;exports.PointsIncentive=R.PointsIncentive;exports.preparePointsIncentivePayload=R.preparePointsIncentivePayload;exports.SignerValidator=l.SignerValidator;exports.prepareSignerValidatorClaimDataPayload=l.prepareSignerValidatorClaimDataPayload;exports.prepareSignerValidatorInputParams=l.prepareSignerValidatorInputParams;exports.prepareSignerValidatorPayload=l.prepareSignerValidatorPayload;exports.LimitedSignerValidator=d.LimitedSignerValidator;exports.prepareLimitedSignerValidatorClaimDataPayload=d.prepareLimitedSignerValidatorClaimDataPayload;exports.prepareLimitedSignerValidatorInputParams=d.prepareLimitedSignerValidatorInputParams;exports.prepareLimitedSignerValidatorPayload=d.prepareLimitedSignerValidatorPayload;exports.BoostValidatorEOA=s.BoostValidatorEOA;exports.ValidatorByComponentInterface=s.ValidatorByComponentInterface;exports.decodeClaimData=s.decodeClaimData;exports.validatorFromAddress=s.validatorFromAddress;exports.BoostCoreNoIdentifierEmitted=e.BoostCoreNoIdentifierEmitted;exports.BoostNotFoundError=e.BoostNotFoundError;exports.BudgetMustAuthorizeBoostCore=e.BudgetMustAuthorizeBoostCore;exports.ContractAddressRequiredError=e.ContractAddressRequiredError;exports.DecodedArgsError=e.DecodedArgsError;exports.DecodedArgsMalformedError=e.DecodedArgsMalformedError;exports.DeployableAlreadyDeployedError=e.DeployableAlreadyDeployedError;exports.DeployableBuildParametersUnspecifiedError=e.DeployableBuildParametersUnspecifiedError;exports.DeployableMissingPayloadError=e.DeployableMissingPayloadError;exports.DeployableUnknownOwnerProvidedError=e.DeployableUnknownOwnerProvidedError;exports.DeployableWagmiConfigurationRequiredError=e.DeployableWagmiConfigurationRequiredError;exports.FieldActionValidationError=e.FieldActionValidationError;exports.FieldValueNotComparableError=e.FieldValueNotComparableError;exports.FieldValueUndefinedError=e.FieldValueUndefinedError;exports.FunctionDataDecodeError=e.FunctionDataDecodeError;exports.IncentiveCriteriaNotFoundError=e.IncentiveCriteriaNotFoundError;exports.IncentiveNotCloneableError=e.IncentiveNotCloneableError;exports.InvalidComponentInterfaceError=e.InvalidComponentInterfaceError;exports.InvalidCriteriaTypeError=e.InvalidCriteriaTypeError;exports.InvalidNumericalCriteriaError=e.InvalidNumericalCriteriaError;exports.InvalidProtocolChainIdError=e.InvalidProtocolChainIdError;exports.MustInitializeBudgetError=e.MustInitializeBudgetError;exports.NoConnectedChainIdError=e.NoConnectedChainIdError;exports.NoContractAddressUponReceiptError=e.NoContractAddressUponReceiptError;exports.NoEventActionStepsProvidedError=e.NoEventActionStepsProvidedError;exports.NoMatchingLogsError=e.NoMatchingLogsError;exports.TooManyEventActionStepsProvidedError=e.TooManyEventActionStepsProvidedError;exports.UnknownTransferPayloadSupplied=e.UnknownTransferPayloadSupplied;exports.UnparseableAbiParamError=e.UnparseableAbiParamError;exports.UnrecognizedFilterTypeError=e.UnrecognizedFilterTypeError;exports.ValidationAbiMissingError=e.ValidationAbiMissingError;exports.CheatCodes=i.CheatCodes;exports.RegistryType=i.RegistryType;exports.assertValidAddressByChainId=i.assertValidAddressByChainId;exports.awaitResult=i.awaitResult;exports.bytes4=i.bytes4;exports.getDeployedContractAddress=i.getDeployedContractAddress;exports.StrategyType=D.StrategyType;exports.prepareClaimPayload=D.prepareClaimPayload;exports.AssetType=t.AssetType;exports.prepareERC1155Payload=t.prepareERC1155Payload;exports.prepareERC1155Transfer=t.prepareERC1155Transfer;exports.prepareFungiblePayload=t.prepareFungiblePayload;exports.prepareFungibleTransfer=t.prepareFungibleTransfer;exports.prepareTransferPayload=t.prepareTransferPayload;exports.PassthroughAuth=L.PassthroughAuth;exports.allowListIncentiveAbi=r.C;exports.boostCoreAbi=r.A;exports.boostRegistryAbi=r.oe;exports.cgdaIncentiveAbi=r.f;exports.erc20IncentiveAbi=r.d;exports.erc20VariableCriteriaIncentiveAbi=r.c;exports.erc20VariableIncentiveAbi=r.v;exports.limitedSignerValidatorAbi=r.z;exports.managedBudgetAbi=r.m;exports.passthroughAuthAbi=r.Ve;exports.pointsIncentiveAbi=r.T;exports.rbacAbi=r.O;exports.signerValidatorAbi=r.S;exports.simpleAllowListAbi=r.g;exports.simpleDenyListAbi=r.M;
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const p=require("./BoostRegistry.cjs"),n=require("./BoostCore.cjs"),A=require("./Boost.cjs"),C=require("./Actions/Action.cjs"),a=require("./Actions/EventAction.cjs"),c=require("./AllowLists/AllowList.cjs"),E=require("./AllowLists/SimpleAllowList.cjs"),g=require("./SimpleDenyList-wDvsNIuY.cjs"),u=require("./Budgets/Budget.cjs"),i=require("./Budgets/ManagedBudget.cjs"),B=require("./Deployable/Deployable.cjs"),T=require("./Deployable/Contract.cjs"),V=require("./Deployable/DeployableTarget.cjs"),I=require("./Deployable/DeployableTargetWithRBAC.cjs"),m=require("./Incentives/AllowListIncentive.cjs"),S=require("./Incentives/CGDAIncentive.cjs"),v=require("./Incentives/ERC20Incentive.cjs"),P=require("./Incentives/ERC20VariableIncentive.cjs"),y=require("./Incentives/ERC20VariableCriteriaIncentive.cjs"),b=require("./Incentives/Incentive.cjs"),R=require("./Incentives/PointsIncentive.cjs"),l=require("./Validators/SignerValidator.cjs"),d=require("./Validators/LimitedSignerValidator.cjs"),s=require("./Validators/Validator.cjs"),e=require("./errors.cjs"),o=require("./utils.cjs"),D=require("./claiming.cjs"),t=require("./transfers.cjs"),L=require("./Auth/PassthroughAuth.cjs"),r=require("./generated-D3DE5TfH.cjs");exports.BOOST_REGISTRY_ADDRESS=p.BOOST_REGISTRY_ADDRESS;exports.BOOST_REGISTRY_ADDRESSES=p.BOOST_REGISTRY_ADDRESSES;exports.BoostRegistry=p.BoostRegistry;exports.BOOST_CORE_ADDRESS=n.BOOST_CORE_ADDRESS;exports.BOOST_CORE_ADDRESSES=n.BOOST_CORE_ADDRESSES;exports.BoostCore=n.BoostCore;exports.FEE_DENOMINATOR=n.FEE_DENOMINATOR;exports.Boost=A.Boost;exports.prepareBoostPayload=A.prepareBoostPayload;exports.ActionByComponentInterface=C.ActionByComponentInterface;exports.actionFromAddress=C.actionFromAddress;exports.EventAction=a.EventAction;exports.FilterType=a.FilterType;exports.PrimitiveType=a.PrimitiveType;exports.SignatureType=a.SignatureType;exports.anyActionParameter=a.anyActionParameter;exports.isEventActionPayloadSimple=a.isEventActionPayloadSimple;exports.prepareEventActionPayload=a.prepareEventActionPayload;exports.transactionSenderClaimant=a.transactionSenderClaimant;exports.AllowListByComponentInterface=c.AllowListByComponentInterface;exports.OpenAllowList=c.OpenAllowList;exports.allowListFromAddress=c.allowListFromAddress;exports.LIST_MANAGER_ROLE=E.LIST_MANAGER_ROLE;exports.SimpleAllowList=E.SimpleAllowList;exports.prepareSimpleAllowListPayload=E.prepareSimpleAllowListPayload;exports.SimpleDenyList=g.SimpleDenyList;exports.prepareSimpleDenyListPayload=g.prepareSimpleDenyListPayload;exports.BudgetByComponentInterface=u.BudgetByComponentInterface;exports.budgetFromAddress=u.budgetFromAddress;exports.ManagedBudget=i.ManagedBudget;exports.ManagedBudgetRoles=i.ManagedBudgetRoles;exports.isERC1155TransferPayload=i.isERC1155TransferPayload;exports.isFungibleTransfer=i.isFungibleTransfer;exports.prepareManagedBudgetPayload=i.prepareManagedBudgetPayload;exports.prepareTransfer=i.prepareTransfer;exports.Deployable=B.Deployable;exports.Contract=T.Contract;exports.DeployableTarget=V.DeployableTarget;exports.DeployableTargetWithRBAC=I.DeployableTargetWithRBAC;exports.Roles=I.Roles;exports.AllowListIncentive=m.AllowListIncentive;exports.prepareAllowListIncentivePayload=m.prepareAllowListIncentivePayload;exports.CGDAIncentive=S.CGDAIncentive;exports.prepareCGDAIncentivePayload=S.prepareCGDAIncentivePayload;exports.ERC20Incentive=v.ERC20Incentive;exports.prepareERC20IncentivePayload=v.prepareERC20IncentivePayload;exports.ERC20VariableIncentive=P.ERC20VariableIncentive;exports.prepareERC20VariableIncentivePayload=P.prepareERC20VariableIncentivePayload;exports.ERC20VariableCriteriaIncentive=y.ERC20VariableCriteriaIncentive;exports.gasRebateIncentiveCriteria=y.gasRebateIncentiveCriteria;exports.prepareERC20VariableCriteriaIncentivePayload=y.prepareERC20VariableCriteriaIncentivePayload;exports.IncentiveByComponentInterface=b.IncentiveByComponentInterface;exports.incentiveFromAddress=b.incentiveFromAddress;exports.PointsIncentive=R.PointsIncentive;exports.preparePointsIncentivePayload=R.preparePointsIncentivePayload;exports.SignerValidator=l.SignerValidator;exports.prepareSignerValidatorClaimDataPayload=l.prepareSignerValidatorClaimDataPayload;exports.prepareSignerValidatorInputParams=l.prepareSignerValidatorInputParams;exports.prepareSignerValidatorPayload=l.prepareSignerValidatorPayload;exports.LimitedSignerValidator=d.LimitedSignerValidator;exports.prepareLimitedSignerValidatorClaimDataPayload=d.prepareLimitedSignerValidatorClaimDataPayload;exports.prepareLimitedSignerValidatorInputParams=d.prepareLimitedSignerValidatorInputParams;exports.prepareLimitedSignerValidatorPayload=d.prepareLimitedSignerValidatorPayload;exports.BoostValidatorEOA=s.BoostValidatorEOA;exports.ValidatorByComponentInterface=s.ValidatorByComponentInterface;exports.decodeClaimData=s.decodeClaimData;exports.validatorFromAddress=s.validatorFromAddress;exports.BoostCoreNoIdentifierEmitted=e.BoostCoreNoIdentifierEmitted;exports.BoostNotFoundError=e.BoostNotFoundError;exports.BudgetMustAuthorizeBoostCore=e.BudgetMustAuthorizeBoostCore;exports.ContractAddressRequiredError=e.ContractAddressRequiredError;exports.DecodedArgsError=e.DecodedArgsError;exports.DecodedArgsMalformedError=e.DecodedArgsMalformedError;exports.DeployableAlreadyDeployedError=e.DeployableAlreadyDeployedError;exports.DeployableBuildParametersUnspecifiedError=e.DeployableBuildParametersUnspecifiedError;exports.DeployableMissingPayloadError=e.DeployableMissingPayloadError;exports.DeployableUnknownOwnerProvidedError=e.DeployableUnknownOwnerProvidedError;exports.DeployableWagmiConfigurationRequiredError=e.DeployableWagmiConfigurationRequiredError;exports.FieldActionValidationError=e.FieldActionValidationError;exports.FieldValueNotComparableError=e.FieldValueNotComparableError;exports.FieldValueUndefinedError=e.FieldValueUndefinedError;exports.FunctionDataDecodeError=e.FunctionDataDecodeError;exports.IncentiveCriteriaNotFoundError=e.IncentiveCriteriaNotFoundError;exports.IncentiveNotCloneableError=e.IncentiveNotCloneableError;exports.InvalidComponentInterfaceError=e.InvalidComponentInterfaceError;exports.InvalidCriteriaTypeError=e.InvalidCriteriaTypeError;exports.InvalidNumericalCriteriaError=e.InvalidNumericalCriteriaError;exports.InvalidProtocolChainIdError=e.InvalidProtocolChainIdError;exports.MustInitializeBudgetError=e.MustInitializeBudgetError;exports.NoConnectedChainIdError=e.NoConnectedChainIdError;exports.NoContractAddressUponReceiptError=e.NoContractAddressUponReceiptError;exports.NoEventActionStepsProvidedError=e.NoEventActionStepsProvidedError;exports.NoMatchingLogsError=e.NoMatchingLogsError;exports.TooManyEventActionStepsProvidedError=e.TooManyEventActionStepsProvidedError;exports.UnknownTransferPayloadSupplied=e.UnknownTransferPayloadSupplied;exports.UnparseableAbiParamError=e.UnparseableAbiParamError;exports.UnrecognizedFilterTypeError=e.UnrecognizedFilterTypeError;exports.ValidationAbiMissingError=e.ValidationAbiMissingError;exports.CheatCodes=o.CheatCodes;exports.RegistryType=o.RegistryType;exports.assertValidAddressByChainId=o.assertValidAddressByChainId;exports.awaitResult=o.awaitResult;exports.bytes4=o.bytes4;exports.getDeployedContractAddress=o.getDeployedContractAddress;exports.getErc20Balance=o.getErc20Balance;exports.StrategyType=D.StrategyType;exports.prepareClaimPayload=D.prepareClaimPayload;exports.AssetType=t.AssetType;exports.prepareERC1155Payload=t.prepareERC1155Payload;exports.prepareERC1155Transfer=t.prepareERC1155Transfer;exports.prepareFungiblePayload=t.prepareFungiblePayload;exports.prepareFungibleTransfer=t.prepareFungibleTransfer;exports.prepareTransferPayload=t.prepareTransferPayload;exports.PassthroughAuth=L.PassthroughAuth;exports.allowListIncentiveAbi=r.C;exports.boostCoreAbi=r.A;exports.boostRegistryAbi=r.oe;exports.cgdaIncentiveAbi=r.f;exports.erc20IncentiveAbi=r.d;exports.erc20VariableCriteriaIncentiveAbi=r.c;exports.erc20VariableIncentiveAbi=r.v;exports.limitedSignerValidatorAbi=r.z;exports.managedBudgetAbi=r.m;exports.passthroughAuthAbi=r.Ve;exports.pointsIncentiveAbi=r.T;exports.rbacAbi=r.O;exports.signerValidatorAbi=r.S;exports.simpleAllowListAbi=r.g;exports.simpleDenyListAbi=r.M;
2
2
  //# sourceMappingURL=index.cjs.map
package/dist/index.js CHANGED
@@ -23,16 +23,16 @@ import { SignerValidator as ue, prepareSignerValidatorClaimDataPayload as Re, pr
23
23
  import { LimitedSignerValidator as Te, prepareLimitedSignerValidatorClaimDataPayload as Ve, prepareLimitedSignerValidatorInputParams as Le, prepareLimitedSignerValidatorPayload as Fe } from "./Validators/LimitedSignerValidator.js";
24
24
  import { BoostValidatorEOA as he, ValidatorByComponentInterface as we, decodeClaimData as Me, validatorFromAddress as Ne } from "./Validators/Validator.js";
25
25
  import { BoostCoreNoIdentifierEmitted as Ue, BoostNotFoundError as Ge, BudgetMustAuthorizeBoostCore as ze, ContractAddressRequiredError as ke, DecodedArgsError as qe, DecodedArgsMalformedError as We, DeployableAlreadyDeployedError as Ye, DeployableBuildParametersUnspecifiedError as je, DeployableMissingPayloadError as He, DeployableUnknownOwnerProvidedError as Je, DeployableWagmiConfigurationRequiredError as Ke, FieldActionValidationError as Qe, FieldValueNotComparableError as Xe, FieldValueUndefinedError as Ze, FunctionDataDecodeError as $e, IncentiveCriteriaNotFoundError as er, IncentiveNotCloneableError as rr, InvalidComponentInterfaceError as or, InvalidCriteriaTypeError as ar, InvalidNumericalCriteriaError as tr, InvalidProtocolChainIdError as ir, MustInitializeBudgetError as nr, NoConnectedChainIdError as pr, NoContractAddressUponReceiptError as lr, NoEventActionStepsProvidedError as dr, NoMatchingLogsError as sr, TooManyEventActionStepsProvidedError as mr, UnknownTransferPayloadSupplied as cr, UnparseableAbiParamError as Ar, UnrecognizedFilterTypeError as Er, ValidationAbiMissingError as yr } from "./errors.js";
26
- import { CheatCodes as fr, RegistryType as gr, assertValidAddressByChainId as br, awaitResult as Ir, bytes4 as Sr, getDeployedContractAddress as vr } from "./utils.js";
27
- import { StrategyType as ur, prepareClaimPayload as Rr } from "./claiming.js";
28
- import { AssetType as xr, prepareERC1155Payload as Br, prepareERC1155Transfer as Tr, prepareFungiblePayload as Vr, prepareFungibleTransfer as Lr, prepareTransferPayload as Fr } from "./transfers.js";
29
- import { PassthroughAuth as hr } from "./Auth/PassthroughAuth.js";
30
- import { C as Mr, A as Nr, o as _r, f as Ur, d as Gr, c as zr, v as kr, z as qr, m as Wr, V as Yr, T as jr, O as Hr, S as Jr, g as Kr, M as Qr } from "./generated-CDEDSOGZ.js";
26
+ import { CheatCodes as fr, RegistryType as gr, assertValidAddressByChainId as br, awaitResult as Ir, bytes4 as Sr, getDeployedContractAddress as vr, getErc20Balance as Pr } from "./utils.js";
27
+ import { StrategyType as Rr, prepareClaimPayload as Dr } from "./claiming.js";
28
+ import { AssetType as Br, prepareERC1155Payload as Tr, prepareERC1155Transfer as Vr, prepareFungiblePayload as Lr, prepareFungibleTransfer as Fr, prepareTransferPayload as Or } from "./transfers.js";
29
+ import { PassthroughAuth as wr } from "./Auth/PassthroughAuth.js";
30
+ import { C as Nr, A as _r, o as Ur, f as Gr, d as zr, c as kr, v as qr, z as Wr, m as Yr, V as jr, T as Hr, O as Jr, S as Kr, g as Qr, M as Xr } from "./generated-CDEDSOGZ.js";
31
31
  export {
32
32
  E as ActionByComponentInterface,
33
33
  D as AllowListByComponentInterface,
34
34
  oe as AllowListIncentive,
35
- xr as AssetType,
35
+ Br as AssetType,
36
36
  n as BOOST_CORE_ADDRESS,
37
37
  p as BOOST_CORE_ADDRESSES,
38
38
  o as BOOST_REGISTRY_ADDRESS,
@@ -86,7 +86,7 @@ export {
86
86
  dr as NoEventActionStepsProvidedError,
87
87
  sr as NoMatchingLogsError,
88
88
  x as OpenAllowList,
89
- hr as PassthroughAuth,
89
+ wr as PassthroughAuth,
90
90
  Se as PointsIncentive,
91
91
  b as PrimitiveType,
92
92
  gr as RegistryType,
@@ -95,7 +95,7 @@ export {
95
95
  ue as SignerValidator,
96
96
  L as SimpleAllowList,
97
97
  h as SimpleDenyList,
98
- ur as StrategyType,
98
+ Rr as StrategyType,
99
99
  mr as TooManyEventActionStepsProvidedError,
100
100
  cr as UnknownTransferPayloadSupplied,
101
101
  Ar as UnparseableAbiParamError,
@@ -104,41 +104,42 @@ export {
104
104
  we as ValidatorByComponentInterface,
105
105
  y as actionFromAddress,
106
106
  B as allowListFromAddress,
107
- Mr as allowListIncentiveAbi,
107
+ Nr as allowListIncentiveAbi,
108
108
  S as anyActionParameter,
109
109
  br as assertValidAddressByChainId,
110
110
  Ir as awaitResult,
111
- Nr as boostCoreAbi,
112
- _r as boostRegistryAbi,
111
+ _r as boostCoreAbi,
112
+ Ur as boostRegistryAbi,
113
113
  _ as budgetFromAddress,
114
114
  Sr as bytes4,
115
- Ur as cgdaIncentiveAbi,
115
+ Gr as cgdaIncentiveAbi,
116
116
  Me as decodeClaimData,
117
- Gr as erc20IncentiveAbi,
118
- zr as erc20VariableCriteriaIncentiveAbi,
119
- kr as erc20VariableIncentiveAbi,
117
+ zr as erc20IncentiveAbi,
118
+ kr as erc20VariableCriteriaIncentiveAbi,
119
+ qr as erc20VariableIncentiveAbi,
120
120
  ye as gasRebateIncentiveCriteria,
121
121
  vr as getDeployedContractAddress,
122
+ Pr as getErc20Balance,
122
123
  be as incentiveFromAddress,
123
124
  k as isERC1155TransferPayload,
124
125
  v as isEventActionPayloadSimple,
125
126
  q as isFungibleTransfer,
126
- qr as limitedSignerValidatorAbi,
127
- Wr as managedBudgetAbi,
128
- Yr as passthroughAuthAbi,
129
- jr as pointsIncentiveAbi,
127
+ Wr as limitedSignerValidatorAbi,
128
+ Yr as managedBudgetAbi,
129
+ jr as passthroughAuthAbi,
130
+ Hr as pointsIncentiveAbi,
130
131
  ae as prepareAllowListIncentivePayload,
131
132
  c as prepareBoostPayload,
132
133
  ne as prepareCGDAIncentivePayload,
133
- Rr as prepareClaimPayload,
134
- Br as prepareERC1155Payload,
135
- Tr as prepareERC1155Transfer,
134
+ Dr as prepareClaimPayload,
135
+ Tr as prepareERC1155Payload,
136
+ Vr as prepareERC1155Transfer,
136
137
  de as prepareERC20IncentivePayload,
137
138
  Ce as prepareERC20VariableCriteriaIncentivePayload,
138
139
  ce as prepareERC20VariableIncentivePayload,
139
140
  P as prepareEventActionPayload,
140
- Vr as prepareFungiblePayload,
141
- Lr as prepareFungibleTransfer,
141
+ Lr as prepareFungiblePayload,
142
+ Fr as prepareFungibleTransfer,
142
143
  Ve as prepareLimitedSignerValidatorClaimDataPayload,
143
144
  Le as prepareLimitedSignerValidatorInputParams,
144
145
  Fe as prepareLimitedSignerValidatorPayload,
@@ -150,11 +151,11 @@ export {
150
151
  F as prepareSimpleAllowListPayload,
151
152
  w as prepareSimpleDenyListPayload,
152
153
  Y as prepareTransfer,
153
- Fr as prepareTransferPayload,
154
- Hr as rbacAbi,
155
- Jr as signerValidatorAbi,
156
- Kr as simpleAllowListAbi,
157
- Qr as simpleDenyListAbi,
154
+ Or as prepareTransferPayload,
155
+ Jr as rbacAbi,
156
+ Kr as signerValidatorAbi,
157
+ Qr as simpleAllowListAbi,
158
+ Xr as simpleDenyListAbi,
158
159
  u as transactionSenderClaimant,
159
160
  Ne as validatorFromAddress
160
161
  };
package/dist/utils.cjs CHANGED
@@ -1,2 +1,2 @@
1
- "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const a=require("@wagmi/core"),i=require("viem"),A=require("./errors.cjs");var u=(t=>(t[t.ACTION=0]="ACTION",t[t.ALLOW_LIST=1]="ALLOW_LIST",t[t.BUDGET=2]="BUDGET",t[t.INCENTIVE=3]="INCENTIVE",t[t.VALIDATOR=4]="VALIDATOR",t))(u||{}),N=(t=>(t[t.ANY_ACTION_PARAM=255]="ANY_ACTION_PARAM",t[t.TX_SENDER_CLAIMANT=255]="TX_SENDER_CLAIMANT",t[t.GAS_REBATE_INCENTIVE=255]="GAS_REBATE_INCENTIVE",t))(N||{});function E(t){return i.slice(i.isHex(t)?i.keccak256(t):i.keccak256(i.toHex(t)),0,4)}async function I(t,c,n){const r=await a.waitForTransactionReceipt(t,{...n,hash:await c});if(!r.contractAddress)throw new A.NoContractAddressUponReceiptError(r);return r.contractAddress}async function s(t,c,n){const{hash:r,result:o}=await c;return await a.waitForTransactionReceipt(t,{...n,hash:r}),o}function f(t,c,n){let r;const o=a.getChainId(t);if(o&&c[o]&&(r=o),n!==void 0?c[n]&&(r=n):o!==void 0&&c[o]&&(r=o),r===void 0){const e=a.getAccount(t);e.chainId!==void 0&&c[e.chainId]&&(r=e.chainId)}if(r===void 0&&(r=11155111),!c[r])throw new A.InvalidProtocolChainIdError(r,Object.keys(c).map(Number));return{chainId:r,address:c[r]}}exports.CheatCodes=N;exports.RegistryType=u;exports.assertValidAddressByChainId=f;exports.awaitResult=s;exports.bytes4=E;exports.getDeployedContractAddress=I;
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const o=require("@wagmi/core"),r=require("viem"),A=require("./errors.cjs");var u=(t=>(t[t.ACTION=0]="ACTION",t[t.ALLOW_LIST=1]="ALLOW_LIST",t[t.BUDGET=2]="BUDGET",t[t.INCENTIVE=3]="INCENTIVE",t[t.VALIDATOR=4]="VALIDATOR",t))(u||{}),s=(t=>(t[t.ANY_ACTION_PARAM=255]="ANY_ACTION_PARAM",t[t.TX_SENDER_CLAIMANT=255]="TX_SENDER_CLAIMANT",t[t.GAS_REBATE_INCENTIVE=255]="GAS_REBATE_INCENTIVE",t))(s||{});function E(t){return r.slice(r.isHex(t)?r.keccak256(t):r.keccak256(r.toHex(t)),0,4)}async function N(t,a,c){const n=await o.waitForTransactionReceipt(t,{...c,hash:await a});if(!n.contractAddress)throw new A.NoContractAddressUponReceiptError(n);return n.contractAddress}async function l(t,a,c){const{hash:n,result:e}=await a;return await o.waitForTransactionReceipt(t,{...c,hash:n}),e}function f(t,a,c){let n;const e=o.getChainId(t);if(e&&a[e]&&(n=e),c!==void 0?a[c]&&(n=c):e!==void 0&&a[e]&&(n=e),n===void 0){const i=o.getAccount(t);i.chainId!==void 0&&a[i.chainId]&&(n=i.chainId)}if(n===void 0&&(n=11155111),!a[n])throw new A.InvalidProtocolChainIdError(n,Object.keys(a).map(Number));return{chainId:n,address:a[n]}}async function I(t,a,c,n){return await o.readContract(t,{...n,functionName:"balanceOf",address:a,args:[c],abi:[{constant:!0,inputs:[{name:"_owner",type:"address"}],name:"balanceOf",outputs:[{name:"balance",type:"uint256"}],stateMutability:"view",type:"function"}]})}exports.CheatCodes=s;exports.RegistryType=u;exports.assertValidAddressByChainId=f;exports.awaitResult=l;exports.bytes4=E;exports.getDeployedContractAddress=N;exports.getErc20Balance=I;
2
2
  //# sourceMappingURL=utils.cjs.map