@boostxyz/sdk 7.6.0 → 7.8.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 (79) hide show
  1. package/dist/Actions/EventAction.cjs +1 -1
  2. package/dist/Actions/EventAction.cjs.map +1 -1
  3. package/dist/Actions/EventAction.d.ts +21 -0
  4. package/dist/Actions/EventAction.d.ts.map +1 -1
  5. package/dist/Actions/EventAction.js +133 -109
  6. package/dist/Actions/EventAction.js.map +1 -1
  7. package/dist/{AllowList-BYYm3b9d.cjs → AllowList-BJ9HQGFs.cjs} +2 -2
  8. package/dist/{AllowList-BYYm3b9d.cjs.map → AllowList-BJ9HQGFs.cjs.map} +1 -1
  9. package/dist/{AllowList-D_K4S6jV.js → AllowList-DiU7g4Hs.js} +3 -3
  10. package/dist/{AllowList-D_K4S6jV.js.map → AllowList-DiU7g4Hs.js.map} +1 -1
  11. package/dist/AllowLists/AllowList.cjs +1 -1
  12. package/dist/AllowLists/AllowList.js +2 -2
  13. package/dist/AllowLists/SimpleAllowList.cjs +1 -1
  14. package/dist/AllowLists/SimpleAllowList.js +1 -1
  15. package/dist/AllowLists/SimpleDenyList.cjs +1 -1
  16. package/dist/AllowLists/SimpleDenyList.js +2 -2
  17. package/dist/BoostCore.cjs +1 -1
  18. package/dist/BoostCore.js +6 -6
  19. package/dist/BoostRegistry.cjs +1 -1
  20. package/dist/BoostRegistry.js +1 -1
  21. package/dist/{Budget-DwVY-GGt.cjs → Budget-D_zhh1rh.cjs} +2 -2
  22. package/dist/{Budget-DwVY-GGt.cjs.map → Budget-D_zhh1rh.cjs.map} +1 -1
  23. package/dist/{Budget-DZlb1py_.js → Budget-YIhV65cc.js} +2 -2
  24. package/dist/{Budget-DZlb1py_.js.map → Budget-YIhV65cc.js.map} +1 -1
  25. package/dist/Budgets/Budget.cjs +1 -1
  26. package/dist/Budgets/Budget.js +1 -1
  27. package/dist/Budgets/ManagedBudget.cjs +1 -1
  28. package/dist/Budgets/ManagedBudget.js +1 -1
  29. package/dist/{Incentive-BKZisyIm.js → Incentive-CeoEla-t.js} +2 -2
  30. package/dist/{Incentive-BKZisyIm.js.map → Incentive-CeoEla-t.js.map} +1 -1
  31. package/dist/{Incentive-Ctfodrh5.cjs → Incentive-CrnbYN_a.cjs} +2 -2
  32. package/dist/{Incentive-Ctfodrh5.cjs.map → Incentive-CrnbYN_a.cjs.map} +1 -1
  33. package/dist/Incentives/AllowListIncentive.cjs +1 -1
  34. package/dist/Incentives/AllowListIncentive.js +2 -2
  35. package/dist/Incentives/CGDAIncentive.cjs +1 -1
  36. package/dist/Incentives/CGDAIncentive.js +1 -1
  37. package/dist/Incentives/ERC20Incentive.cjs +1 -1
  38. package/dist/Incentives/ERC20Incentive.js +1 -1
  39. package/dist/Incentives/ERC20PeggedVariableCriteriaIncentive.cjs +1 -1
  40. package/dist/Incentives/ERC20PeggedVariableCriteriaIncentive.js +1 -1
  41. package/dist/Incentives/ERC20PeggedVariableCriteriaIncentiveV2.cjs +1 -1
  42. package/dist/Incentives/ERC20PeggedVariableCriteriaIncentiveV2.js +1 -1
  43. package/dist/Incentives/ERC20VariableCriteriaIncentive.cjs +1 -1
  44. package/dist/Incentives/ERC20VariableCriteriaIncentive.js +1 -1
  45. package/dist/Incentives/ERC20VariableCriteriaIncentiveV2.cjs +1 -1
  46. package/dist/Incentives/ERC20VariableCriteriaIncentiveV2.js +1 -1
  47. package/dist/Incentives/ERC20VariableIncentive.cjs +1 -1
  48. package/dist/Incentives/ERC20VariableIncentive.js +1 -1
  49. package/dist/Incentives/Incentive.cjs +1 -1
  50. package/dist/Incentives/Incentive.js +1 -1
  51. package/dist/Incentives/PointsIncentive.cjs +1 -1
  52. package/dist/Incentives/PointsIncentive.js +1 -1
  53. package/dist/{SimpleDenyList-Bv2mSQJO.cjs → SimpleDenyList-7-VTqfsH.cjs} +2 -2
  54. package/dist/{SimpleDenyList-Bv2mSQJO.cjs.map → SimpleDenyList-7-VTqfsH.cjs.map} +1 -1
  55. package/dist/{SimpleDenyList-tEOqSTnD.js → SimpleDenyList-Dr03aOeP.js} +2 -2
  56. package/dist/{SimpleDenyList-tEOqSTnD.js.map → SimpleDenyList-Dr03aOeP.js.map} +1 -1
  57. package/dist/{Validator-ztOItKpP.js → Validator-DgvB9wge.js} +2 -2
  58. package/dist/{Validator-ztOItKpP.js.map → Validator-DgvB9wge.js.map} +1 -1
  59. package/dist/{Validator-CUGwkN06.cjs → Validator-rYW7PMwW.cjs} +2 -2
  60. package/dist/{Validator-CUGwkN06.cjs.map → Validator-rYW7PMwW.cjs.map} +1 -1
  61. package/dist/Validators/LimitedSignerValidator.cjs +1 -1
  62. package/dist/Validators/LimitedSignerValidator.js +1 -1
  63. package/dist/Validators/SignerValidator.cjs +1 -1
  64. package/dist/Validators/SignerValidator.js +1 -1
  65. package/dist/Validators/Validator.cjs +1 -1
  66. package/dist/Validators/Validator.js +1 -1
  67. package/dist/deployments-BjBgk03b.cjs +2 -0
  68. package/dist/deployments-BjBgk03b.cjs.map +1 -0
  69. package/dist/{deployments-EFoHkvCp.js → deployments-CHQ30INq.js} +31 -9
  70. package/dist/deployments-CHQ30INq.js.map +1 -0
  71. package/dist/deployments.json +23 -0
  72. package/dist/index.cjs +1 -1
  73. package/dist/index.js +185 -182
  74. package/package.json +1 -1
  75. package/src/Actions/EventAction.test.ts +161 -1
  76. package/src/Actions/EventAction.ts +52 -5
  77. package/dist/deployments-EFoHkvCp.js.map +0 -1
  78. package/dist/deployments-xekPSd2S.cjs +0 -2
  79. package/dist/deployments-xekPSd2S.cjs.map +0 -1
@@ -1 +1 @@
1
- {"version":3,"file":"Incentive-BKZisyIm.js","sources":["../src/Incentives/ERC20PeggedIncentive.ts","../src/Incentives/Incentive.ts"],"sourcesContent":["import {\n erc20PeggedIncentiveAbi,\n readErc20PeggedIncentiveAsset,\n readErc20PeggedIncentiveClaimed,\n readErc20PeggedIncentiveClaims,\n readErc20PeggedIncentiveCurrentReward,\n readErc20PeggedIncentiveGetPeg,\n readErc20PeggedIncentiveIsClaimable,\n readErc20PeggedIncentiveLimit,\n readErc20PeggedIncentiveOwner,\n readErc20PeggedIncentivePeg,\n readErc20PeggedIncentiveReward,\n readErc20PeggedIncentiveTotalClaimed,\n simulateErc20PeggedIncentiveClaim,\n simulateErc20PeggedIncentiveClawback,\n writeErc20PeggedIncentiveClaim,\n writeErc20PeggedIncentiveClawback,\n} from '@boostxyz/evm';\nimport { bytecode } from '@boostxyz/evm/artifacts/contracts/incentives/ERC20PeggedIncentive.sol/ERC20PeggedIncentive.json';\nimport {\n type Address,\n type ContractEventName,\n type Hex,\n decodeAbiParameters,\n encodeAbiParameters,\n zeroAddress,\n} from 'viem';\nimport { ERC20PeggedIncentive as ERC20PeggedIncentiveBases } 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 { erc20PeggedIncentiveAbi };\n\n/**\n * The object representation of a `ERC20PeggedIncentive.InitPayload`\n *\n * @export\n * @interface ERC20PeggedIncentivePayload\n * @typedef {ERC20PeggedIncentivePayload}\n */\nexport interface ERC20PeggedIncentivePayload {\n /**\n * The address of the incentivized asset.\n *\n * @type {Address}\n */\n asset: Address;\n /**\n * The peg to normalize to.\n *\n * @type {Address}\n */\n peg: Address;\n /**\n * The amount of the asset to distribute.\n *\n * @type {bigint}\n */\n reward: bigint;\n /**\n * Total spend for the incentive.\n *\n * @type {bigint}\n */\n limit: bigint;\n /**\n * (Optional) The address of the entity that can managed the incentive.\n *\n * @type {Address}\n * @optional\n */\n manager?: Address;\n}\n\n/**\n * A generic `viem.Log` event with support for `ERC20PeggedIncentive` event types.\n *\n * @export\n * @typedef {ERC20PeggedIncentiveLog}\n * @template {ContractEventName<typeof erc20PeggedIncentiveAbi>} [event=ContractEventName<\n * typeof erc20PeggedIncentiveAbi\n * >]\n */\nexport type ERC20PeggedIncentiveLog<\n event extends ContractEventName<\n typeof erc20PeggedIncentiveAbi\n > = ContractEventName<typeof erc20PeggedIncentiveAbi>,\n> = GenericLog<typeof erc20PeggedIncentiveAbi, event>;\n\n/**\n * A simple ERC20 incentive implementation that allows claiming of tokens\n *\n * @export\n * @class ERC20PeggedIncentive\n * @typedef {ERC20PeggedIncentive}\n * @extends {DeployableTarget<ERC20PeggedIncentivePayload>}\n */\nexport class ERC20PeggedIncentive extends DeployableTarget<\n ERC20PeggedIncentivePayload,\n typeof erc20PeggedIncentiveAbi\n> {\n public override readonly abi = erc20PeggedIncentiveAbi;\n /**\n * @inheritdoc\n *\n * @public\n * @static\n * @type {Record<number, Address>}\n */\n public static override bases: Record<number, Address> = {\n ...(import.meta.env?.VITE_ERC20_INCENTIVE_BASE\n ? { 31337: import.meta.env.VITE_ERC20_INCENTIVE_BASE }\n : {}),\n ...(ERC20PeggedIncentiveBases 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 owner of the incentive\n *\n * @public\n * @async\n * @param {?ReadParams} [params]\n * @returns {Promise<Address>}\n */\n public async owner(params?: ReadParams) {\n return await readErc20PeggedIncentiveOwner(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 * Calculates the current reward based on the time since the last claim. The reward is calculated based on the time since the last claim, the available budget, and the reward parameters. It increases linearly over time in the absence of claims, with each hour adding `rewardBoost` to the current reward, up to the available budget. For example, if there is one claim in the first hour, then no claims for three hours, the claimable reward would be `initialReward - rewardDecay + (rewardBoost * 3)`\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 readErc20PeggedIncentiveCurrentReward(this._config, {\n address: this.assertValidAddress(),\n args: [],\n // biome-ignore lint/suspicious/noExplicitAny: Accept any shape of valid wagmi/viem parameters, wagmi does the same thing internally\n ...(params as any),\n });\n }\n\n /**\n * The number of claims that have been made\n *\n * @public\n * @async\n * @param {?ReadParams} [params]\n * @returns {Promise<bigint>}\n */\n public async claims(params?: ReadParams) {\n return await readErc20PeggedIncentiveClaims(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 total amount of rewards claimed\n *\n * @public\n * @async\n * @param {?ReadParams} [params]\n * @returns {Promise<bigint>}\n */\n public async totalClaimed(params?: ReadParams) {\n return await readErc20PeggedIncentiveTotalClaimed(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 readErc20PeggedIncentiveClaimed(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 ERC20-like token\n *\n * @public\n * @async\n * @param {?ReadParams} [params]\n * @returns {Promise<Address>}\n */\n public async asset(params?: ReadParams) {\n return await readErc20PeggedIncentiveAsset(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 address of the pegged ERC20-like token\n *\n * @public\n * @async\n * @param {?ReadParams} [params]\n * @returns {Promise<Address>}\n */\n public async peg(params?: ReadParams) {\n return await readErc20PeggedIncentivePeg(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 reward amount issued for each claim\n *\n * @public\n * @async\n * @param {?ReadParams} [params]\n * @returns {Promise<bigint>}\n */\n public async reward(params?: ReadParams) {\n return await readErc20PeggedIncentiveReward(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 limit (max possible rewards payout in reward token)\n *\n * @public\n * @async\n * @param {?ReadParams} [params]\n * @returns {Promise<bigint>}\n */\n public async limit(params?: ReadParams) {\n return await readErc20PeggedIncentiveLimit(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>} - Returns true if 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; }>} - Returns true if successfully claimed\n */\n protected async claimRaw(payload: ClaimPayload, params?: WriteParams) {\n const { request, result } = await simulateErc20PeggedIncentiveClaim(\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 writeErc20PeggedIncentiveClaim(this._config, request);\n return { hash, result };\n }\n\n /**\n * Clawback assets from the incentive\n *\n * @public\n * @async\n * @param {ClaimPayload} payload\n * @param {?WriteParams} [params]\n * @returns {Promise<boolean>} - True if the assets were successfully clawbacked\n */\n public async clawback(payload: ClaimPayload, params?: WriteParams) {\n return await this.awaitResult(this.clawbackRaw(payload, params));\n }\n\n /**\n * Clawback assets from 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 assets were successfully clawbacked\n */\n public async clawbackRaw(payload: ClaimPayload, params?: WriteParams) {\n const { request, result } = await simulateErc20PeggedIncentiveClawback(\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 writeErc20PeggedIncentiveClawback(this._config, request);\n return { hash, result };\n }\n\n /**\n * Check if an incentive is claimable.\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 readErc20PeggedIncentiveIsClaimable(this._config, {\n address: this.assertValidAddress(),\n args: [payload.target, payload.data],\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 * read the peg token for the incentive.\n *\n * @public\n * @async\n * @param {?ReadParams} [params]\n * @returns {Promise<Address>} = The address of the token the reward is pegged to\n */\n public async getPeg(params?: ReadParams) {\n return await readErc20PeggedIncentiveGetPeg(this._config, {\n address: this.assertValidAddress(),\n args: [],\n // biome-ignore lint/suspicious/noExplicitAny: Accept any shape of valid wagmi/viem parameters, wagmi does the same thing internally\n ...(params as any),\n });\n }\n\n /**\n * Get the maximum amount that can be claimed by this incentive. Useful when used in conjunction with `BoostCore.calculateProtocolFee`\n *\n * @public\n * @async\n * @param {?ReadParams} [params]\n * @returns {Promise<bigint>} = Return a bigint representing that maximum amount that can be distributed by this incentive.\n */\n public async getTotalBudget(params?: ReadParams) {\n return await this.limit(params);\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 [totalClaimed, limit] = await Promise.all([\n this.totalClaimed(params),\n this.limit(params),\n ]);\n return limit - totalClaimed;\n }\n\n /**\n * @inheritdoc\n *\n * @public\n * @param {?ERC20PeggedIncentivePayload} [_payload]\n * @param {?DeployableOptions} [_options]\n * @returns {GenericDeployableParams}\n */\n public override buildParameters(\n _payload?: ERC20PeggedIncentivePayload,\n _options?: DeployableOptions,\n ): GenericDeployableParams {\n const [payload, options] = this.validateDeploymentConfig(\n _payload,\n _options,\n );\n return {\n abi: erc20PeggedIncentiveAbi,\n bytecode: bytecode as Hex,\n args: [prepareERC20PeggedIncentivePayload(payload)],\n ...this.optionallyAttachAccount(options.account),\n };\n }\n\n /**\n * Encodes an amount to clawback from the incentive\n *\n * @public\n * @param {bigint} amount - How much of the asset to clawback\n * @returns {Hex} - Returns an encoded uint256\n */\n public buildClawbackData(amount: bigint) {\n return encodeAbiParameters([{ type: 'uint256' }], [amount]);\n }\n\n /**\n * Builds the claim data for the ERC20PeggedIncentive.\n *\n * @public\n * @param {bigint} rewardAmount\n * @returns {Hash} Returns the encoded claim data\n * @description This function returns the encoded claim data for the ERC20PeggedIncentive.\n */\n public buildClaimData(rewardAmount: bigint) {\n return encodeAbiParameters(\n [{ type: 'uint256', name: 'rewardAmount' }],\n [rewardAmount],\n );\n }\n /**\n * Generates a top-up payload for the ERC20PeggedIncentive contract by incrementing\n * the existing `limit` field by `netAmount`. The entire payload is then re-encoded\n * via `prepareERC20PeggedIncentivePayload(...)`.\n *\n * @public\n * @param {bigint} netAmount - The additional limit to add to this incentive.\n * @returns {Hex} The ABI-encoded payload with the updated `limit`.\n */\n public async getTopupPayload(netAmount: bigint): Promise<Hex> {\n return prepareERC20PeggedIncentivePayload({\n asset: (await this.asset()) ?? zeroAddress,\n peg: this.payload?.peg ?? zeroAddress,\n reward: this.payload?.reward ?? 0n,\n limit: netAmount,\n manager: this.payload?.manager ?? zeroAddress,\n });\n }\n\n /**\n * Decodes claim data for the ERC20PeggedIncentive, returning the claim amount.\n * Useful when deriving amount claimed from logs.\n *\n * @public\n * @param {Hex} claimData\n * @returns {bigint} Returns the reward amount from a claim data payload\n */\n public decodeClaimData(claimData: Hex) {\n const boostClaimData = decodeAbiParameters(\n [\n {\n type: 'tuple',\n name: 'BoostClaimData',\n components: [\n { type: 'bytes', name: 'validatorData' },\n { type: 'bytes', name: 'incentiveData' },\n ],\n },\n ],\n claimData,\n );\n const signedAmount = decodeAbiParameters(\n [{ type: 'uint256' }],\n boostClaimData[0].incentiveData,\n )[0];\n return signedAmount;\n }\n}\n\n/**\n * Given a {@link ERC20PeggedIncentivePayload}, properly encode a `ERC20PeggedIncentive.InitPayload` for use with {@link ERC20PeggedIncentive} initialization.\n *\n * @param {ERC20PeggedIncentivePayload} param0\n * @param {Address} param0.asset - The address of the incentivized asset.\n * @param {Address} param0.peg - The peg to normalize to.\n * @param {bigint} param0.reward - The amount of the asset to distribute.\n * @param {bigint} param0.limit - How many times can this incentive be claimed.\n * @param {Address} [param0.manager=zeroAddress] - The entity that can manage the incentive.\n * @returns {Hex}\n */\nexport function prepareERC20PeggedIncentivePayload({\n asset,\n peg,\n reward,\n limit,\n manager = zeroAddress,\n}: ERC20PeggedIncentivePayload) {\n return encodeAbiParameters(\n [\n { type: 'address', name: 'asset' },\n { type: 'address', name: 'peg' },\n { type: 'uint256', name: 'reward' },\n { type: 'uint256', name: 'limit' },\n { type: 'address', name: 'manager' },\n ],\n [asset, peg, reward, limit, manager],\n );\n}\n","import { aIncentiveAbi } from '@boostxyz/evm';\nimport {\n AAllowListIncentive,\n ACGDAIncentive,\n AERC20Incentive,\n AERC20PeggedIncentive,\n AERC20PeggedVariableCriteriaIncentive,\n AERC20PeggedVariableCriteriaIncentiveV2,\n AERC20VariableCriteriaIncentive,\n AERC20VariableCriteriaIncentiveV2,\n AERC20VariableIncentive,\n // AERC20VariableCriteriaIncentive\n APointsIncentive,\n} from '@boostxyz/evm/deploys/componentInterfaces.json';\nimport { readContract } from '@wagmi/core';\nimport type { Address, Hex } from 'viem';\nimport type { DeployableOptions } from '../Deployable/Deployable';\nimport { InvalidComponentInterfaceError } from '../errors';\nimport type { ReadParams } from '../utils';\nimport { AllowListIncentive } from './AllowListIncentive';\nimport { CGDAIncentive } from './CGDAIncentive';\nimport { ERC20Incentive } from './ERC20Incentive';\nimport { ERC20PeggedIncentive } from './ERC20PeggedIncentive';\nimport { ERC20PeggedVariableCriteriaIncentive } from './ERC20PeggedVariableCriteriaIncentive';\nimport { ERC20PeggedVariableCriteriaIncentiveV2 } from './ERC20PeggedVariableCriteriaIncentiveV2';\nimport { ERC20VariableCriteriaIncentive } from './ERC20VariableCriteriaIncentive';\nimport { ERC20VariableCriteriaIncentiveV2 } from './ERC20VariableCriteriaIncentiveV2';\nimport { ERC20VariableIncentive } from './ERC20VariableIncentive';\n// import { ERC1155Incentive } from './ERC1155Incentive';\nimport { PointsIncentive } from './PointsIncentive';\n\nexport {\n AllowListIncentive,\n CGDAIncentive,\n // ERC1155Incentive,\n ERC20Incentive,\n ERC20PeggedIncentive,\n ERC20PeggedVariableCriteriaIncentive,\n ERC20PeggedVariableCriteriaIncentiveV2,\n PointsIncentive,\n ERC20VariableIncentive,\n ERC20VariableCriteriaIncentive,\n ERC20VariableCriteriaIncentiveV2,\n};\n\n/**\n * A union type representing all valid protocol Incentive implementations\n *\n * @export\n * @typedef {Incentive}\n */\nexport type Incentive =\n | AllowListIncentive\n | CGDAIncentive\n | ERC20Incentive\n // | ERC1155Incentive\n | ERC20PeggedIncentive\n | ERC20PeggedVariableCriteriaIncentive\n | ERC20PeggedVariableCriteriaIncentiveV2\n | PointsIncentive\n | ERC20VariableIncentive\n | ERC20VariableCriteriaIncentive\n | ERC20VariableCriteriaIncentiveV2;\n\n/**\n * A map of Incentive component interfaces to their constructors.\n *\n * @type {{ \"0xc5b24b8e\": typeof PointsIncentive; \"0x8c901437\": typeof ERC20Incentive; \"0x4414fbb4\": typeof ERC20PeggedIncentive; \"0xf60c99c9\": typeof ERC20PeggedVariableCriteriaIncentiveV2; \"0x56586338\": typeof AllowListIncentive; \"0xa39e44d9\": typeof CGDAIncentive; \"0xa8e4af1e\": typeof ERC20VariableIncentive; \"0x90318111\": typeof ERC20VariableCriteriaIncentiveV2 }}\n */\nexport const IncentiveByComponentInterface = {\n [APointsIncentive as Hex]: PointsIncentive,\n [AERC20Incentive as Hex]: ERC20Incentive,\n [AERC20PeggedVariableCriteriaIncentive as Hex]:\n ERC20PeggedVariableCriteriaIncentive,\n [AERC20PeggedVariableCriteriaIncentiveV2 as Hex]:\n ERC20PeggedVariableCriteriaIncentiveV2,\n [AERC20PeggedIncentive as Hex]: ERC20PeggedIncentive,\n [AAllowListIncentive]: AllowListIncentive,\n // [AERC1155Incentive as Hex]: ERC1155Incentive,\n [ACGDAIncentive as Hex]: CGDAIncentive,\n [AERC20VariableIncentive as Hex]: ERC20VariableIncentive,\n [AERC20VariableCriteriaIncentiveV2 as Hex]: ERC20VariableCriteriaIncentiveV2,\n [AERC20VariableCriteriaIncentive as Hex]: ERC20VariableCriteriaIncentive,\n};\n\n/**\n * A function that will read a contract's component interface using `getComponentInterface` and return the correct instantiated instance.\n *\n * @export\n * @async\n * @param {DeployableOptions} options\n * @param {Address} address\n * @returns {Incentive}\n * @throws {@link InvalidComponentInterfaceError}\n */\nexport async function incentiveFromAddress(\n options: DeployableOptions,\n address: Address,\n params?: ReadParams,\n) {\n const interfaceId = (await readContract(options.config, {\n abi: aIncentiveAbi,\n functionName: 'getComponentInterface',\n address,\n ...params,\n })) as keyof typeof IncentiveByComponentInterface;\n const Ctor = IncentiveByComponentInterface[interfaceId];\n if (!Ctor) {\n throw new InvalidComponentInterfaceError(\n Object.keys(IncentiveByComponentInterface) as Hex[],\n interfaceId as Hex,\n );\n }\n return new Ctor(options, address);\n}\n"],"names":["_ERC20PeggedIncentive","DeployableTarget","erc20PeggedIncentiveAbi","params","readErc20PeggedIncentiveOwner","readErc20PeggedIncentiveCurrentReward","readErc20PeggedIncentiveClaims","readErc20PeggedIncentiveTotalClaimed","address","readErc20PeggedIncentiveClaimed","readErc20PeggedIncentiveAsset","readErc20PeggedIncentivePeg","readErc20PeggedIncentiveReward","readErc20PeggedIncentiveLimit","payload","request","result","simulateErc20PeggedIncentiveClaim","prepareClaimPayload","writeErc20PeggedIncentiveClaim","simulateErc20PeggedIncentiveClawback","writeErc20PeggedIncentiveClawback","readErc20PeggedIncentiveIsClaimable","readErc20PeggedIncentiveGetPeg","totalClaimed","limit","_payload","_options","options","bytecode","prepareERC20PeggedIncentivePayload","amount","encodeAbiParameters","rewardAmount","netAmount","zeroAddress","_a","_b","_c","claimData","boostClaimData","decodeAbiParameters","__vite_import_meta_env__","ERC20PeggedIncentiveBases","RegistryType","ERC20PeggedIncentive","asset","peg","reward","manager","IncentiveByComponentInterface","APointsIncentive","PointsIncentive","AERC20Incentive","ERC20Incentive","AERC20PeggedVariableCriteriaIncentive","ERC20PeggedVariableCriteriaIncentive","AERC20PeggedVariableCriteriaIncentiveV2","ERC20PeggedVariableCriteriaIncentiveV2","AERC20PeggedIncentive","AAllowListIncentive","AllowListIncentive","ACGDAIncentive","CGDAIncentive","AERC20VariableIncentive","ERC20VariableIncentive","AERC20VariableCriteriaIncentiveV2","ERC20VariableCriteriaIncentiveV2","AERC20VariableCriteriaIncentive","ERC20VariableCriteriaIncentive","incentiveFromAddress","interfaceId","readContract","aIncentiveAbi","Ctor","InvalidComponentInterfaceError"],"mappings":";;;;;;;;;;;;;;;;;;w/dA2GaA,IAAN,MAAMA,UAA6BC,EAGxC;AAAA,EAHK,cAAA;AAAA,UAAA,GAAA,SAAA,GAIL,KAAyB,MAAMC;AAAAA,EAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,EA+B/B,MAAa,MAAMC,GAAqB;AAC/B,WAAA,MAAMC,EAA8B,KAAK,SAAS;AAAA,MACvD,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,EAAsC,KAAK,SAAS;AAAA,MAC/D,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,EAA+B,KAAK,SAAS;AAAA,MACxD,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,EAUA,MAAa,aAAaA,GAAqB;AACtC,WAAA,MAAMI,EAAqC,KAAK,SAAS;AAAA,MAC9D,SAAS,KAAK,mBAAmB;AAAA,MACjC,MAAM,CAAC;AAAA;AAAA,MAEP,GAAIJ;AAAA,IAAA,CACL;AAA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oEla-t.js","sources":["../src/Incentives/ERC20PeggedIncentive.ts","../src/Incentives/Incentive.ts"],"sourcesContent":["import {\n erc20PeggedIncentiveAbi,\n readErc20PeggedIncentiveAsset,\n readErc20PeggedIncentiveClaimed,\n readErc20PeggedIncentiveClaims,\n readErc20PeggedIncentiveCurrentReward,\n readErc20PeggedIncentiveGetPeg,\n readErc20PeggedIncentiveIsClaimable,\n readErc20PeggedIncentiveLimit,\n readErc20PeggedIncentiveOwner,\n readErc20PeggedIncentivePeg,\n readErc20PeggedIncentiveReward,\n readErc20PeggedIncentiveTotalClaimed,\n simulateErc20PeggedIncentiveClaim,\n simulateErc20PeggedIncentiveClawback,\n writeErc20PeggedIncentiveClaim,\n writeErc20PeggedIncentiveClawback,\n} from '@boostxyz/evm';\nimport { bytecode } from '@boostxyz/evm/artifacts/contracts/incentives/ERC20PeggedIncentive.sol/ERC20PeggedIncentive.json';\nimport {\n type Address,\n type ContractEventName,\n type Hex,\n decodeAbiParameters,\n encodeAbiParameters,\n zeroAddress,\n} from 'viem';\nimport { ERC20PeggedIncentive as ERC20PeggedIncentiveBases } 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 { erc20PeggedIncentiveAbi };\n\n/**\n * The object representation of a `ERC20PeggedIncentive.InitPayload`\n *\n * @export\n * @interface ERC20PeggedIncentivePayload\n * @typedef {ERC20PeggedIncentivePayload}\n */\nexport interface ERC20PeggedIncentivePayload {\n /**\n * The address of the incentivized asset.\n *\n * @type {Address}\n */\n asset: Address;\n /**\n * The peg to normalize to.\n *\n * @type {Address}\n */\n peg: Address;\n /**\n * The amount of the asset to distribute.\n *\n * @type {bigint}\n */\n reward: bigint;\n /**\n * Total spend for the incentive.\n *\n * @type {bigint}\n */\n limit: bigint;\n /**\n * (Optional) The address of the entity that can managed the incentive.\n *\n * @type {Address}\n * @optional\n */\n manager?: Address;\n}\n\n/**\n * A generic `viem.Log` event with support for `ERC20PeggedIncentive` event types.\n *\n * @export\n * @typedef {ERC20PeggedIncentiveLog}\n * @template {ContractEventName<typeof erc20PeggedIncentiveAbi>} [event=ContractEventName<\n * typeof erc20PeggedIncentiveAbi\n * >]\n */\nexport type ERC20PeggedIncentiveLog<\n event extends ContractEventName<\n typeof erc20PeggedIncentiveAbi\n > = ContractEventName<typeof erc20PeggedIncentiveAbi>,\n> = GenericLog<typeof erc20PeggedIncentiveAbi, event>;\n\n/**\n * A simple ERC20 incentive implementation that allows claiming of tokens\n *\n * @export\n * @class ERC20PeggedIncentive\n * @typedef {ERC20PeggedIncentive}\n * @extends {DeployableTarget<ERC20PeggedIncentivePayload>}\n */\nexport class ERC20PeggedIncentive extends DeployableTarget<\n ERC20PeggedIncentivePayload,\n typeof erc20PeggedIncentiveAbi\n> {\n public override readonly abi = erc20PeggedIncentiveAbi;\n /**\n * @inheritdoc\n *\n * @public\n * @static\n * @type {Record<number, Address>}\n */\n public static override bases: Record<number, Address> = {\n ...(import.meta.env?.VITE_ERC20_INCENTIVE_BASE\n ? { 31337: import.meta.env.VITE_ERC20_INCENTIVE_BASE }\n : {}),\n ...(ERC20PeggedIncentiveBases 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 owner of the incentive\n *\n * @public\n * @async\n * @param {?ReadParams} [params]\n * @returns {Promise<Address>}\n */\n public async owner(params?: ReadParams) {\n return await readErc20PeggedIncentiveOwner(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 * Calculates the current reward based on the time since the last claim. The reward is calculated based on the time since the last claim, the available budget, and the reward parameters. It increases linearly over time in the absence of claims, with each hour adding `rewardBoost` to the current reward, up to the available budget. For example, if there is one claim in the first hour, then no claims for three hours, the claimable reward would be `initialReward - rewardDecay + (rewardBoost * 3)`\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 readErc20PeggedIncentiveCurrentReward(this._config, {\n address: this.assertValidAddress(),\n args: [],\n // biome-ignore lint/suspicious/noExplicitAny: Accept any shape of valid wagmi/viem parameters, wagmi does the same thing internally\n ...(params as any),\n });\n }\n\n /**\n * The number of claims that have been made\n *\n * @public\n * @async\n * @param {?ReadParams} [params]\n * @returns {Promise<bigint>}\n */\n public async claims(params?: ReadParams) {\n return await readErc20PeggedIncentiveClaims(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 total amount of rewards claimed\n *\n * @public\n * @async\n * @param {?ReadParams} [params]\n * @returns {Promise<bigint>}\n */\n public async totalClaimed(params?: ReadParams) {\n return await readErc20PeggedIncentiveTotalClaimed(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 readErc20PeggedIncentiveClaimed(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 ERC20-like token\n *\n * @public\n * @async\n * @param {?ReadParams} [params]\n * @returns {Promise<Address>}\n */\n public async asset(params?: ReadParams) {\n return await readErc20PeggedIncentiveAsset(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 address of the pegged ERC20-like token\n *\n * @public\n * @async\n * @param {?ReadParams} [params]\n * @returns {Promise<Address>}\n */\n public async peg(params?: ReadParams) {\n return await readErc20PeggedIncentivePeg(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 reward amount issued for each claim\n *\n * @public\n * @async\n * @param {?ReadParams} [params]\n * @returns {Promise<bigint>}\n */\n public async reward(params?: ReadParams) {\n return await readErc20PeggedIncentiveReward(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 limit (max possible rewards payout in reward token)\n *\n * @public\n * @async\n * @param {?ReadParams} [params]\n * @returns {Promise<bigint>}\n */\n public async limit(params?: ReadParams) {\n return await readErc20PeggedIncentiveLimit(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>} - Returns true if 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; }>} - Returns true if successfully claimed\n */\n protected async claimRaw(payload: ClaimPayload, params?: WriteParams) {\n const { request, result } = await simulateErc20PeggedIncentiveClaim(\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 writeErc20PeggedIncentiveClaim(this._config, request);\n return { hash, result };\n }\n\n /**\n * Clawback assets from the incentive\n *\n * @public\n * @async\n * @param {ClaimPayload} payload\n * @param {?WriteParams} [params]\n * @returns {Promise<boolean>} - True if the assets were successfully clawbacked\n */\n public async clawback(payload: ClaimPayload, params?: WriteParams) {\n return await this.awaitResult(this.clawbackRaw(payload, params));\n }\n\n /**\n * Clawback assets from 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 assets were successfully clawbacked\n */\n public async clawbackRaw(payload: ClaimPayload, params?: WriteParams) {\n const { request, result } = await simulateErc20PeggedIncentiveClawback(\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 writeErc20PeggedIncentiveClawback(this._config, request);\n return { hash, result };\n }\n\n /**\n * Check if an incentive is claimable.\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 readErc20PeggedIncentiveIsClaimable(this._config, {\n address: this.assertValidAddress(),\n args: [payload.target, payload.data],\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 * read the peg token for the incentive.\n *\n * @public\n * @async\n * @param {?ReadParams} [params]\n * @returns {Promise<Address>} = The address of the token the reward is pegged to\n */\n public async getPeg(params?: ReadParams) {\n return await readErc20PeggedIncentiveGetPeg(this._config, {\n address: this.assertValidAddress(),\n args: [],\n // biome-ignore lint/suspicious/noExplicitAny: Accept any shape of valid wagmi/viem parameters, wagmi does the same thing internally\n ...(params as any),\n });\n }\n\n /**\n * Get the maximum amount that can be claimed by this incentive. Useful when used in conjunction with `BoostCore.calculateProtocolFee`\n *\n * @public\n * @async\n * @param {?ReadParams} [params]\n * @returns {Promise<bigint>} = Return a bigint representing that maximum amount that can be distributed by this incentive.\n */\n public async getTotalBudget(params?: ReadParams) {\n return await this.limit(params);\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 [totalClaimed, limit] = await Promise.all([\n this.totalClaimed(params),\n this.limit(params),\n ]);\n return limit - totalClaimed;\n }\n\n /**\n * @inheritdoc\n *\n * @public\n * @param {?ERC20PeggedIncentivePayload} [_payload]\n * @param {?DeployableOptions} [_options]\n * @returns {GenericDeployableParams}\n */\n public override buildParameters(\n _payload?: ERC20PeggedIncentivePayload,\n _options?: DeployableOptions,\n ): GenericDeployableParams {\n const [payload, options] = this.validateDeploymentConfig(\n _payload,\n _options,\n );\n return {\n abi: erc20PeggedIncentiveAbi,\n bytecode: bytecode as Hex,\n args: [prepareERC20PeggedIncentivePayload(payload)],\n ...this.optionallyAttachAccount(options.account),\n };\n }\n\n /**\n * Encodes an amount to clawback from the incentive\n *\n * @public\n * @param {bigint} amount - How much of the asset to clawback\n * @returns {Hex} - Returns an encoded uint256\n */\n public buildClawbackData(amount: bigint) {\n return encodeAbiParameters([{ type: 'uint256' }], [amount]);\n }\n\n /**\n * Builds the claim data for the ERC20PeggedIncentive.\n *\n * @public\n * @param {bigint} rewardAmount\n * @returns {Hash} Returns the encoded claim data\n * @description This function returns the encoded claim data for the ERC20PeggedIncentive.\n */\n public buildClaimData(rewardAmount: bigint) {\n return encodeAbiParameters(\n [{ type: 'uint256', name: 'rewardAmount' }],\n [rewardAmount],\n );\n }\n /**\n * Generates a top-up payload for the ERC20PeggedIncentive contract by incrementing\n * the existing `limit` field by `netAmount`. The entire payload is then re-encoded\n * via `prepareERC20PeggedIncentivePayload(...)`.\n *\n * @public\n * @param {bigint} netAmount - The additional limit to add to this incentive.\n * @returns {Hex} The ABI-encoded payload with the updated `limit`.\n */\n public async getTopupPayload(netAmount: bigint): Promise<Hex> {\n return prepareERC20PeggedIncentivePayload({\n asset: (await this.asset()) ?? zeroAddress,\n peg: this.payload?.peg ?? zeroAddress,\n reward: this.payload?.reward ?? 0n,\n limit: netAmount,\n manager: this.payload?.manager ?? zeroAddress,\n });\n }\n\n /**\n * Decodes claim data for the ERC20PeggedIncentive, returning the claim amount.\n * Useful when deriving amount claimed from logs.\n *\n * @public\n * @param {Hex} claimData\n * @returns {bigint} Returns the reward amount from a claim data payload\n */\n public decodeClaimData(claimData: Hex) {\n const boostClaimData = decodeAbiParameters(\n [\n {\n type: 'tuple',\n name: 'BoostClaimData',\n components: [\n { type: 'bytes', name: 'validatorData' },\n { type: 'bytes', name: 'incentiveData' },\n ],\n },\n ],\n claimData,\n );\n const signedAmount = decodeAbiParameters(\n [{ type: 'uint256' }],\n boostClaimData[0].incentiveData,\n )[0];\n return signedAmount;\n }\n}\n\n/**\n * Given a {@link ERC20PeggedIncentivePayload}, properly encode a `ERC20PeggedIncentive.InitPayload` for use with {@link ERC20PeggedIncentive} initialization.\n *\n * @param {ERC20PeggedIncentivePayload} param0\n * @param {Address} param0.asset - The address of the incentivized asset.\n * @param {Address} param0.peg - The peg to normalize to.\n * @param {bigint} param0.reward - The amount of the asset to distribute.\n * @param {bigint} param0.limit - How many times can this incentive be claimed.\n * @param {Address} [param0.manager=zeroAddress] - The entity that can manage the incentive.\n * @returns {Hex}\n */\nexport function prepareERC20PeggedIncentivePayload({\n asset,\n peg,\n reward,\n limit,\n manager = zeroAddress,\n}: ERC20PeggedIncentivePayload) {\n return encodeAbiParameters(\n [\n { type: 'address', name: 'asset' },\n { type: 'address', name: 'peg' },\n { type: 'uint256', name: 'reward' },\n { type: 'uint256', name: 'limit' },\n { type: 'address', name: 'manager' },\n ],\n [asset, peg, reward, limit, manager],\n );\n}\n","import { aIncentiveAbi } from '@boostxyz/evm';\nimport {\n AAllowListIncentive,\n ACGDAIncentive,\n AERC20Incentive,\n AERC20PeggedIncentive,\n AERC20PeggedVariableCriteriaIncentive,\n AERC20PeggedVariableCriteriaIncentiveV2,\n AERC20VariableCriteriaIncentive,\n AERC20VariableCriteriaIncentiveV2,\n AERC20VariableIncentive,\n // AERC20VariableCriteriaIncentive\n APointsIncentive,\n} from '@boostxyz/evm/deploys/componentInterfaces.json';\nimport { readContract } from '@wagmi/core';\nimport type { Address, Hex } from 'viem';\nimport type { DeployableOptions } from '../Deployable/Deployable';\nimport { InvalidComponentInterfaceError } from '../errors';\nimport type { ReadParams } from '../utils';\nimport { AllowListIncentive } from './AllowListIncentive';\nimport { CGDAIncentive } from './CGDAIncentive';\nimport { ERC20Incentive } from './ERC20Incentive';\nimport { ERC20PeggedIncentive } from './ERC20PeggedIncentive';\nimport { ERC20PeggedVariableCriteriaIncentive } from './ERC20PeggedVariableCriteriaIncentive';\nimport { ERC20PeggedVariableCriteriaIncentiveV2 } from './ERC20PeggedVariableCriteriaIncentiveV2';\nimport { ERC20VariableCriteriaIncentive } from './ERC20VariableCriteriaIncentive';\nimport { ERC20VariableCriteriaIncentiveV2 } from './ERC20VariableCriteriaIncentiveV2';\nimport { ERC20VariableIncentive } from './ERC20VariableIncentive';\n// import { ERC1155Incentive } from './ERC1155Incentive';\nimport { PointsIncentive } from './PointsIncentive';\n\nexport {\n AllowListIncentive,\n CGDAIncentive,\n // ERC1155Incentive,\n ERC20Incentive,\n ERC20PeggedIncentive,\n ERC20PeggedVariableCriteriaIncentive,\n ERC20PeggedVariableCriteriaIncentiveV2,\n PointsIncentive,\n ERC20VariableIncentive,\n ERC20VariableCriteriaIncentive,\n ERC20VariableCriteriaIncentiveV2,\n};\n\n/**\n * A union type representing all valid protocol Incentive implementations\n *\n * @export\n * @typedef {Incentive}\n */\nexport type Incentive =\n | AllowListIncentive\n | CGDAIncentive\n | ERC20Incentive\n // | ERC1155Incentive\n | ERC20PeggedIncentive\n | ERC20PeggedVariableCriteriaIncentive\n | ERC20PeggedVariableCriteriaIncentiveV2\n | PointsIncentive\n | ERC20VariableIncentive\n | ERC20VariableCriteriaIncentive\n | ERC20VariableCriteriaIncentiveV2;\n\n/**\n * A map of Incentive component interfaces to their constructors.\n *\n * @type {{ \"0xc5b24b8e\": typeof PointsIncentive; \"0x8c901437\": typeof ERC20Incentive; \"0x4414fbb4\": typeof ERC20PeggedIncentive; \"0xf60c99c9\": typeof ERC20PeggedVariableCriteriaIncentiveV2; \"0x56586338\": typeof AllowListIncentive; \"0xa39e44d9\": typeof CGDAIncentive; \"0xa8e4af1e\": typeof ERC20VariableIncentive; \"0x90318111\": typeof ERC20VariableCriteriaIncentiveV2 }}\n */\nexport const IncentiveByComponentInterface = {\n [APointsIncentive as Hex]: PointsIncentive,\n [AERC20Incentive as Hex]: ERC20Incentive,\n [AERC20PeggedVariableCriteriaIncentive as Hex]:\n ERC20PeggedVariableCriteriaIncentive,\n [AERC20PeggedVariableCriteriaIncentiveV2 as Hex]:\n ERC20PeggedVariableCriteriaIncentiveV2,\n [AERC20PeggedIncentive as Hex]: ERC20PeggedIncentive,\n [AAllowListIncentive]: AllowListIncentive,\n // [AERC1155Incentive as Hex]: ERC1155Incentive,\n [ACGDAIncentive as Hex]: CGDAIncentive,\n [AERC20VariableIncentive as Hex]: ERC20VariableIncentive,\n [AERC20VariableCriteriaIncentiveV2 as Hex]: ERC20VariableCriteriaIncentiveV2,\n [AERC20VariableCriteriaIncentive as Hex]: ERC20VariableCriteriaIncentive,\n};\n\n/**\n * A function that will read a contract's component interface using `getComponentInterface` and return the correct instantiated instance.\n *\n * @export\n * @async\n * @param {DeployableOptions} options\n * @param {Address} address\n * @returns {Incentive}\n * @throws {@link InvalidComponentInterfaceError}\n */\nexport async function incentiveFromAddress(\n options: DeployableOptions,\n address: Address,\n params?: ReadParams,\n) {\n const interfaceId = (await readContract(options.config, {\n abi: aIncentiveAbi,\n functionName: 'getComponentInterface',\n address,\n ...params,\n })) as keyof typeof IncentiveByComponentInterface;\n const Ctor = IncentiveByComponentInterface[interfaceId];\n if (!Ctor) {\n throw new InvalidComponentInterfaceError(\n Object.keys(IncentiveByComponentInterface) as Hex[],\n interfaceId as Hex,\n );\n }\n return new Ctor(options, address);\n}\n"],"names":["_ERC20PeggedIncentive","DeployableTarget","erc20PeggedIncentiveAbi","params","readErc20PeggedIncentiveOwner","readErc20PeggedIncentiveCurrentReward","readErc20PeggedIncentiveClaims","readErc20PeggedIncentiveTotalClaimed","address","readErc20PeggedIncentiveClaimed","readErc20PeggedIncentiveAsset","readErc20PeggedIncentivePeg","readErc20PeggedIncentiveReward","readErc20PeggedIncentiveLimit","payload","request","result","simulateErc20PeggedIncentiveClaim","prepareClaimPayload","writeErc20PeggedIncentiveClaim","simulateErc20PeggedIncentiveClawback","writeErc20PeggedIncentiveClawback","readErc20PeggedIncentiveIsClaimable","readErc20PeggedIncentiveGetPeg","totalClaimed","limit","_payload","_options","options","bytecode","prepareERC20PeggedIncentivePayload","amount","encodeAbiParameters","rewardAmount","netAmount","zeroAddress","_a","_b","_c","claimData","boostClaimData","decodeAbiParameters","__vite_import_meta_env__","ERC20PeggedIncentiveBases","RegistryType","ERC20PeggedIncentive","asset","peg","reward","manager","IncentiveByComponentInterface","APointsIncentive","PointsIncentive","AERC20Incentive","ERC20Incentive","AERC20PeggedVariableCriteriaIncentive","ERC20PeggedVariableCriteriaIncentive","AERC20PeggedVariableCriteriaIncentiveV2","ERC20PeggedVariableCriteriaIncentiveV2","AERC20PeggedIncentive","AAllowListIncentive","AllowListIncentive","ACGDAIncentive","CGDAIncentive","AERC20VariableIncentive","ERC20VariableIncentive","AERC20VariableCriteriaIncentiveV2","ERC20VariableCriteriaIncentiveV2","AERC20VariableCriteriaIncentive","ERC20VariableCriteriaIncentive","incentiveFromAddress","interfaceId","readContract","aIncentiveAbi","Ctor","InvalidComponentInterfaceError"],"mappings":";;;;;;;;;;;;;;;;;;w/dA2GaA,IAAN,MAAMA,UAA6BC,EAGxC;AAAA,EAHK,cAAA;AAAA,UAAA,GAAA,SAAA,GAIL,KAAyB,MAAMC;AAAAA,EAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,EA+B/B,MAAa,MAAMC,GAAqB;AAC/B,WAAA,MAAMC,EAA8B,KAAK,SAAS;AAAA,MACvD,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,EAAsC,KAAK,SAAS;AAAA,MAC/D,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,EAA+B,KAAK,SAAS;AAAA,MACxD,SAAS,KAAK,mBAAmB;AAAA,MACjC,MAAM,CAAC;AAAA;AAAA,MAEP,GAAIH;AAAA,IAAA,CACL;AAAA,EACH;AAAA;AAAA;A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A,CACJ,GACKuE,IAAOxB,EAA8BqB,CAAW;AACtD,MAAI,CAACG;AACH,UAAM,IAAIC;AAAA,MACR,OAAO,KAAKzB,CAA6B;AAAA,MACzCqB;AAAA,IAAA;AAGG,SAAA,IAAIG,EAAK9C,GAASpB,CAAO;AAClC;"}
@@ -1,2 +1,2 @@
1
- "use strict";const b=require("./generated-dd4FN0Fo.cjs"),c=require("./componentInterfaces-BZ3fSNkT.cjs"),C=require("@wagmi/core"),h=require("./errors.cjs"),m=require("./Incentives/AllowListIncentive.cjs"),y=require("./Incentives/CGDAIncentive.cjs"),A=require("./Incentives/ERC20Incentive.cjs"),t=require("viem"),I=require("./deployments-xekPSd2S.cjs"),w=require("./Deployable/DeployableTarget.cjs"),u=require("./claiming.cjs"),p=require("./utils.cjs"),E=require("./Incentives/ERC20PeggedVariableCriteriaIncentive.cjs"),V=require("./Incentives/ERC20PeggedVariableCriteriaIncentiveV2.cjs"),v=require("./Incentives/ERC20VariableCriteriaIncentive.cjs"),R=require("./Incentives/ERC20VariableCriteriaIncentiveV2.cjs"),P=require("./Incentives/ERC20VariableIncentive.cjs"),O=require("./Incentives/PointsIncentive.cjs"),q="0x6080604052348015600e575f80fd5b5060156019565b607c565b63409feecd198054600181161560365763f92ee8a95f526004601cfd5b6001600160401b03808260011c146077578060011b8355806020527fc7f505b2f371ae2175ee4913f4499e1f2633a7b5936321eed1cdaeb6115181d2602080a15b505050565b611cfa806100895f395ff3fe60806040526004361061025d575f3560e01c8063547d18641161014b578063c884ef83116100c6578063ec87621c1161007c578063f2fde38b11610062578063f2fde38b146106b8578063fe9fbb80146106cb578063fee81cf4146106ea575f80fd5b8063ec87621c14610691578063f04e283e146106a5575f80fd5b8063db09da12116100ac578063db09da121461063e578063dcc213611461065d578063dcc59b6f1461067c575f80fd5b8063c884ef83146105fb578063d54ad2a114610629575f80fd5b80638da5cb5b1161011b578063a4d66daf11610101578063a4d66daf146105a8578063bb1757cf146105bd578063be4994f8146105dc575f80fd5b80638da5cb5b146105665780639214fa4d1461057e575f80fd5b8063547d18641461052d57806354d1f13d14610542578063715018a61461054a57806375b238fc14610552575f80fd5b80632de94807116101db578063439fab91116101ab5780634a4ee7b1116101915780634a4ee7b1146104b95780634e7165a2146104cc578063514e62fc146104f8575f80fd5b8063439fab9114610451578063474f5a4414610470575f80fd5b80632de94807146103b657806330db555f146103e757806338d52e0f146104065780634359d28a14610432575f80fd5b80631cd64df411610230578063228cb73311610216578063228cb73314610360578063256929621461037457806328d6183b1461037c575f80fd5b80631cd64df4146102da5780631f1cb62b1461030f575f80fd5b806301ffc9a71461026157806307621eca14610295578063183a4f6e146102b25780631c10893f146102c7575b5f80fd5b34801561026c575f80fd5b5061028061027b366004611655565b61071b565b60405190151581526020015b60405180910390f35b3480156102a0575f80fd5b505f545b60405190815260200161028c565b6102c56102c0366004611694565b610776565b005b6102c56102d53660046116d3565b610783565b3480156102e5575f80fd5b506102806102f43660046116d3565b638b78c6d8600c9081525f9290925260209091205481161490565b34801561031a575f80fd5b5060075461033b9073ffffffffffffffffffffffffffffffffffffffff1681565b60405173ffffffffffffffffffffffffffffffffffffffff909116815260200161028c565b34801561036b575f80fd5b506102a45f5481565b6102c5610799565b348015610387575f80fd5b506040517f5658633800000000000000000000000000000000000000000000000000000000815260200161028c565b3480156103c1575f80fd5b506102a46103d03660046116fb565b638b78c6d8600c9081525f91909152602090205490565b3480156103f2575f80fd5b506102c5610401366004611694565b6107e6565b348015610411575f80fd5b5060035461033b9073ffffffffffffffffffffffffffffffffffffffff1681565b34801561043d575f80fd5b506102c561044c36600461175c565b6108a2565b34801561045c575f80fd5b506102c561046b366004611806565b61099c565b34801561047b575f80fd5b5061048f61048a366004611806565b610c39565b6040805192835273ffffffffffffffffffffffffffffffffffffffff90911660208301520161028c565b6102c56104c73660046116d3565b610d9b565b3480156104d7575f80fd5b506104eb6104e6366004611806565b610dad565b60405161028c9190611891565b348015610503575f80fd5b506102806105123660046116d3565b638b78c6d8600c9081525f9290925260209091205416151590565b348015610538575f80fd5b506102a460025481565b6102c5610e47565b6102c5610e80565b34801561055d575f80fd5b506102a4600281565b348015610571575f80fd5b50638b78c6d8195461033b565b348015610589575f80fd5b5060075473ffffffffffffffffffffffffffffffffffffffff1661033b565b3480156105b3575f80fd5b506102a460055481565b3480156105c8575f80fd5b506102806105d73660046118a3565b610e93565b3480156105e7575f80fd5b506102c56105f636600461175c565b611071565b348015610606575f80fd5b506102806106153660046116fb565b60016020525f908152604090205460ff1681565b348015610634575f80fd5b506102a460065481565b348015610649575f80fd5b506102806106583660046118a3565b61110f565b348015610668575f80fd5b506102c561067736600461175c565b61114e565b348015610687575f80fd5b506102a460045481565b34801561069c575f80fd5b506102a4600181565b6102c56106b33660046116fb565b6111ec565b6102c56106c63660046116fb565b611226565b3480156106d6575f80fd5b506102806106e53660046116fb565b61124c565b3480156106f5575f80fd5b506102a46107043660046116fb565b63389a75e1600c9081525f91909152602090205490565b5f7fffffffff0000000000000000000000000000000000000000000000000000000082167f565863380000000000000000000000000000000000000000000000000000000014806107705750610770826112ab565b92915050565b6107803382611300565b50565b61078b61130b565b6107958282611325565b5050565b5f6202a30067ffffffffffffffff164201905063389a75e1600c52335f52806020600c2055337fdbf36a107da19e49527a7176a1babf963b4b0ff8cde35ee35d6cd8f1f9ac7e1d5f80a250565b60016107f181611331565b815f0361082a576040517ff92ee8a900000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b60035461084f9073ffffffffffffffffffffffffffffffffffffffff16333085611362565b8160055f828254610860919061191f565b909155505060408051338152602081018490527fa64c2da41decbd538f8629e54c8fa0b7362c9102b691386a0fb6a1797454e9c6910160405180910390a15050565b60026108ad81611331565b8382146108e6576040517fff633a3800000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b5f5b84811015610994575f84848381811061090357610903611932565b9050602002016020810190610918919061195f565b905080151560010361095a5761095587878481811061093957610939611932565b905060200201602081019061094e91906116fb565b6001611325565b61098b565b61098b87878481811061096f5761096f611932565b905060200201602081019061098491906116fb565b6001611300565b506001016108e8565b505050505050565b7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffbf60113280546003825580156109ed5760018160011c14303b106109e45763f92ee8a95f526004601cfd5b818160ff1b1b91505b505f6109fb838501856119d4565b905080604001515f1480610a1157506060810151155b15610a48576040517ff92ee8a900000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b606081015181515f90610a719073ffffffffffffffffffffffffffffffffffffffff16306113c4565b905081811015610ada5782516040517f5c54305e00000000000000000000000000000000000000000000000000000000815273ffffffffffffffffffffffffffffffffffffffff9091166004820152602481018290526044810183905260640160405180910390fd5b82516003805473ffffffffffffffffffffffffffffffffffffffff9283167fffffffffffffffffffffffff00000000000000000000000000000000000000009182161790915560208501516007805491909316911617905560408301515f556060830151600555610b4a336113f7565b610b598360800151600161143f565b826020015173ffffffffffffffffffffffffffffffffffffffff16835f015173ffffffffffffffffffffffffffffffffffffffff167fd20715546497e6d32bc9b61b35416a25a8cc41d2fb7f389a1bb26dc040213a3b856040015186606001518760800151604051610bf493929190928352602083019190915273ffffffffffffffffffffffffffffffffffffffff16604082015260600190565b60405180910390a35050508015610c34576002815560016020527fc7f505b2f371ae2175ee4913f4499e1f2633a7b5936321eed1cdaeb6115181d2602080a15b505050565b5f806001610c4681611331565b5f610c5385870187611afd565b90505f8160200151806020019051810190610c6e9190611b7a565b90508060055f828254610c819190611b91565b90915550508151600354610cae9173ffffffffffffffffffffffffffffffffffffffff9091169083611480565b81516003546040517fffffffffffffffffffffffffffffffffffffffff000000000000000000000000606092831b811660208301529183901b90911660348201526048810183905273ffffffffffffffffffffffffffffffffffffffff909116907f9ad2e7a4af16dceda9cce4274b2f59c328d8c012eb0e15eb5e1e73b7d8f264d390606801604080517fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe081840301815290829052610d6c91611891565b60405180910390a260035490945073ffffffffffffffffffffffffffffffffffffffff16925050509250929050565b610da361130b565b6107958282611300565b60605f610dbc838501856119d4565b6060818101516040805160808101825260018152845173ffffffffffffffffffffffffffffffffffffffff16602080830191909152308284015282518082018452849052825180820185905283518082038301815290840184529482019490945290519394509092610e2e9201611ba4565b6040516020818303038152906040529250505092915050565b63389a75e1600c52335f525f6020600c2055337ffa7b8eab7da67f412cc9575ed43464468f9bfbae89d1675917346ca6d8fe3c925f80a2565b610e8861130b565b610e915f6114d3565b565b5f610e9c61130b565b5f610ea983850185611c47565b90505f8160200151806020019051810190610ec49190611b7a565b9050610ed0868261151d565b610f06576040517f6247a84e00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b60055481600654610f17919061191f565b1115610f4f576040517f360e42e100000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b8060065f828254610f60919061191f565b92505081905550600160045f828254610f79919061191f565b9091555050600354610fa29073ffffffffffffffffffffffffffffffffffffffff168783611480565b6003546040517fffffffffffffffffffffffffffffffffffffffff000000000000000000000000606092831b811660208301529188901b90911660348201526048810182905273ffffffffffffffffffffffffffffffffffffffff8716907f9ad2e7a4af16dceda9cce4274b2f59c328d8c012eb0e15eb5e1e73b7d8f264d390606801604080517fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe08184030181529082905261105d91611891565b60405180910390a250600195945050505050565b600261107c81611331565b8382146110b5576040517fff633a3800000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b5f5b84811015610994576111078686838181106110d4576110d4611932565b90506020020160208101906110e991906116fb565b8585848181106110fb576110fb611932565b90506020020135611325565b6001016110b7565b5f8061111d83850185611c47565b90505f81602001518060200190518101906111389190611b7a565b9050611144868261151d565b9695505050505050565b600261115981611331565b838214611192576040517fff633a3800000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b5f5b84811015610994576111e48686838181106111b1576111b1611932565b90506020020160208101906111c691906116fb565b8585848181106111d8576111d8611932565b90506020020135611300565b600101611194565b6111f461130b565b63389a75e1600c52805f526020600c20805442111561121a57636f5e88185f526004601cfd5b5f9055610780816114d3565b61122e61130b565b8060601b61124357637448fbae5f526004601cfd5b610780816114d3565b5f8173ffffffffffffffffffffffffffffffffffffffff16611271638b78c6d8195490565b73ffffffffffffffffffffffffffffffffffffffff1614806107705750638b78c6d8600c9081525f83905260209020546003161515610770565b5f7fffffffff0000000000000000000000000000000000000000000000000000000082167fa9216705000000000000000000000000000000000000000000000000000000001480610770575061077082611568565b61079582825f6115fe565b638b78c6d819543314610e91576382b429005f526004601cfd5b610795828260016115fe565b638b78c6d81954331461078057638b78c6d8600c52335f52806020600c205416610780576382b429005f526004601cfd5b60405181606052826040528360601b602c526f23b872dd000000000000000000000000600c5260205f6064601c5f895af18060015f5114166113b657803d873b1517106113b657637939f4245f526004601cfd5b505f60605260405250505050565b5f816014526f70a082310000000000000000000000005f5260208060246010865afa601f3d111660205102905092915050565b73ffffffffffffffffffffffffffffffffffffffff16638b78c6d819819055805f7f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e08180a350565b638b78c6d8600c52815f52806020600c205580600c5160601c7f715ad5ce61fc9595c7b415289d59cf203f23a94fa06f04af7e489a0a76e1fe265f80a35050565b81601452806034526fa9059cbb0000000000000000000000005f5260205f604460105f875af18060015f5114166114c957803d853b1517106114c9576390b8ec185f526004601cfd5b505f603452505050565b638b78c6d819805473ffffffffffffffffffffffffffffffffffffffff9092169182907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e05f80a355565b73ffffffffffffffffffffffffffffffffffffffff82165f9081526001602052604081205460ff1615801561156157506005548260065461155e919061191f565b11155b9392505050565b5f7fffffffff0000000000000000000000000000000000000000000000000000000082167f6ab67a0d00000000000000000000000000000000000000000000000000000000148061077057507f01ffc9a7000000000000000000000000000000000000000000000000000000007fffffffff00000000000000000000000000000000000000000000000000000000831614610770565b638b78c6d8600c52825f526020600c2080548381178361161f575080841681185b80835580600c5160601c7f715ad5ce61fc9595c7b415289d59cf203f23a94fa06f04af7e489a0a76e1fe265f80a3505050505050565b5f60208284031215611665575f80fd5b81357fffffffff0000000000000000000000000000000000000000000000000000000081168114611561575f80fd5b5f602082840312156116a4575f80fd5b5035919050565b803573ffffffffffffffffffffffffffffffffffffffff811681146116ce575f80fd5b919050565b5f80604083850312156116e4575f80fd5b6116ed836116ab565b946020939093013593505050565b5f6020828403121561170b575f80fd5b611561826116ab565b5f8083601f840112611724575f80fd5b50813567ffffffffffffffff81111561173b575f80fd5b6020830191508360208260051b8501011115611755575f80fd5b9250929050565b5f805f806040858703121561176f575f80fd5b843567ffffffffffffffff811115611785575f80fd5b61179187828801611714565b909550935050602085013567ffffffffffffffff8111156117b0575f80fd5b6117bc87828801611714565b95989497509550505050565b5f8083601f8401126117d8575f80fd5b50813567ffffffffffffffff8111156117ef575f80fd5b602083019150836020828501011115611755575f80fd5b5f8060208385031215611817575f80fd5b823567ffffffffffffffff81111561182d575f80fd5b611839858286016117c8565b90969095509350505050565b5f81518084528060208401602086015e5f6020828601015260207fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0601f83011685010191505092915050565b602081525f6115616020830184611845565b5f805f604084860312156118b5575f80fd5b6118be846116ab565b9250602084013567ffffffffffffffff8111156118d9575f80fd5b6118e5868287016117c8565b9497909650939450505050565b7f4e487b71000000000000000000000000000000000000000000000000000000005f52601160045260245ffd5b80820180821115610770576107706118f2565b7f4e487b71000000000000000000000000000000000000000000000000000000005f52603260045260245ffd5b5f6020828403121561196f575f80fd5b81358015158114611561575f80fd5b7f4e487b71000000000000000000000000000000000000000000000000000000005f52604160045260245ffd5b6040805190810167ffffffffffffffff811182821017156119ce576119ce61197e565b60405290565b5f60a08284031280156119e5575f80fd5b5060405160a0810167ffffffffffffffff81118282101715611a0957611a0961197e565b604052611a15836116ab565b8152611a23602084016116ab565b60208201526040838101359082015260608084013590820152611a48608084016116ab565b60808201529392505050565b5f82601f830112611a63575f80fd5b813567ffffffffffffffff811115611a7d57611a7d61197e565b604051601f82017fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0908116603f0116810167ffffffffffffffff81118282101715611aca57611aca61197e565b604052818152838201602001851015611ae1575f80fd5b816020850160208301375f918101602001919091529392505050565b5f60208284031215611b0d575f80fd5b813567ffffffffffffffff811115611b23575f80fd5b820160408185031215611b34575f80fd5b611b3c6119ab565b611b45826116ab565b8152602082013567ffffffffffffffff811115611b60575f80fd5b611b6c86828501611a54565b602083015250949350505050565b5f60208284031215611b8a575f80fd5b5051919050565b81810381811115610770576107706118f2565b602081525f825160038110611be0577f4e487b71000000000000000000000000000000000000000000000000000000005f52602160045260245ffd5b8060208401525073ffffffffffffffffffffffffffffffffffffffff602084015116604083015273ffffffffffffffffffffffffffffffffffffffff60408401511660608301526060830151608080840152611c3f60a0840182611845565b949350505050565b5f60208284031215611c57575f80fd5b813567ffffffffffffffff811115611c6d575f80fd5b820160408185031215611c7e575f80fd5b611c866119ab565b813567ffffffffffffffff811115611c9c575f80fd5b611ca886828501611a54565b825250602082013567ffffffffffffffff811115611b60575f80fdfea2646970667358221220ae9431c5aa2e6d904568c209e18398528ed1256e1be4fbeb1526712b5c3f955964736f6c634300081a0033",n={BASE_URL:"/",DEV:!1,MODE:"production",PROD:!0,SSR:!1,VITE_BOOST_MAINNET_SIGNER_EOA:"0xCBD0C302040bC803B4B2EDaF21Be0e49Deff5480",VITE_BOOST_TESTNET_SIGNER_EOA:"0xd63167e9db11B108940b2E8236581F961f33f396"},r=class r extends w.DeployableTarget{constructor(){super(...arguments),this.abi=b.g}async owner(f){return await b.yO(this._config,{address:this.assertValidAddress(),args:[],...f})}async currentReward(f){return await b.aO(this._config,{address:this.assertValidAddress(),args:[],...f})}async claims(f){return await b.nO(this._config,{address:this.assertValidAddress(),args:[],...f})}async totalClaimed(f){return await b.wO(this._config,{address:this.assertValidAddress(),args:[],...f})}async claimed(f,e){return await b.tO(this._config,{address:this.assertValidAddress(),args:[f],...e})}async asset(f){return await b.eO(this._config,{address:this.assertValidAddress(),...f})}async peg(f){return await b.cO(this._config,{address:this.assertValidAddress(),...f})}async reward(f){return await b.bO(this._config,{address:this.assertValidAddress(),...f})}async limit(f){return await b.lO(this._config,{address:this.assertValidAddress(),...f})}async claim(f,e){return await this.awaitResult(this.claimRaw(f,e))}async claimRaw(f,e){const{request:a,result:d}=await b.PO(this._config,{address:this.assertValidAddress(),args:[u.prepareClaimPayload(f)],...this.optionallyAttachAccount(),...e});return{hash:await b.hO(this._config,a),result:d}}async clawback(f,e){return await this.awaitResult(this.clawbackRaw(f,e))}async clawbackRaw(f,e){const{request:a,result:d}=await b.kO(this._config,{address:this.assertValidAddress(),args:[u.prepareClaimPayload(f)],...this.optionallyAttachAccount(),...e});return{hash:await b.IO(this._config,a),result:d}}async isClaimable(f,e){return await b.uO(this._config,{address:this.assertValidAddress(),args:[f.target,f.data],...e})}async getPeg(f){return await b.sO(this._config,{address:this.assertValidAddress(),args:[],...f})}async getTotalBudget(f){return await this.limit(f)}async canBeClaimed(f){return await this.getRemainingClaimPotential(f)>0n}async getRemainingClaimPotential(f){const[e,a]=await Promise.all([this.totalClaimed(f),this.limit(f)]);return a-e}buildParameters(f,e){const[a,d]=this.validateDeploymentConfig(f,e);return{abi:b.g,bytecode:q,args:[o(a)],...this.optionallyAttachAccount(d.account)}}buildClawbackData(f){return t.encodeAbiParameters([{type:"uint256"}],[f])}buildClaimData(f){return t.encodeAbiParameters([{type:"uint256",name:"rewardAmount"}],[f])}async getTopupPayload(f){var e,a,d;return o({asset:await this.asset()??t.zeroAddress,peg:((e=this.payload)==null?void 0:e.peg)??t.zeroAddress,reward:((a=this.payload)==null?void 0:a.reward)??0n,limit:f,manager:((d=this.payload)==null?void 0:d.manager)??t.zeroAddress})}decodeClaimData(f){const e=t.decodeAbiParameters([{type:"tuple",name:"BoostClaimData",components:[{type:"bytes",name:"validatorData"},{type:"bytes",name:"incentiveData"}]}],f);return t.decodeAbiParameters([{type:"uint256"}],e[0].incentiveData)[0]}};r.bases={...n!=null&&n.VITE_ERC20_INCENTIVE_BASE?{31337:void 0}:{},...I.ERC20PeggedIncentive},r.registryType=p.RegistryType.INCENTIVE;let s=r;function o({asset:i,peg:f,reward:e,limit:a,manager:d=t.zeroAddress}){return t.encodeAbiParameters([{type:"address",name:"asset"},{type:"address",name:"peg"},{type:"uint256",name:"reward"},{type:"uint256",name:"limit"},{type:"address",name:"manager"}],[i,f,e,a,d])}const l={[c.APointsIncentive]:O.PointsIncentive,[c.AERC20Incentive]:A.ERC20Incentive,[c.AERC20PeggedVariableCriteriaIncentive]:E.ERC20PeggedVariableCriteriaIncentive,[c.AERC20PeggedVariableCriteriaIncentiveV2]:V.ERC20PeggedVariableCriteriaIncentiveV2,[c.AERC20PeggedIncentive]:s,[c.AAllowListIncentive]:m.AllowListIncentive,[c.ACGDAIncentive]:y.CGDAIncentive,[c.AERC20VariableIncentive]:P.ERC20VariableIncentive,[c.AERC20VariableCriteriaIncentiveV2]:R.ERC20VariableCriteriaIncentiveV2,[c.AERC20VariableCriteriaIncentive]:v.ERC20VariableCriteriaIncentive};async function D(i,f,e){const a=await C.readContract(i.config,{abi:b.de,functionName:"getComponentInterface",address:f,...e}),d=l[a];if(!d)throw new h.InvalidComponentInterfaceError(Object.keys(l),a);return new d(i,f)}exports.ERC20PeggedIncentive=s;exports.IncentiveByComponentInterface=l;exports.incentiveFromAddress=D;exports.prepareERC20PeggedIncentivePayload=o;
2
- //# sourceMappingURL=Incentive-Ctfodrh5.cjs.map
1
+ "use strict";const b=require("./generated-dd4FN0Fo.cjs"),c=require("./componentInterfaces-BZ3fSNkT.cjs"),C=require("@wagmi/core"),h=require("./errors.cjs"),m=require("./Incentives/AllowListIncentive.cjs"),y=require("./Incentives/CGDAIncentive.cjs"),A=require("./Incentives/ERC20Incentive.cjs"),t=require("viem"),I=require("./deployments-BjBgk03b.cjs"),w=require("./Deployable/DeployableTarget.cjs"),u=require("./claiming.cjs"),p=require("./utils.cjs"),E=require("./Incentives/ERC20PeggedVariableCriteriaIncentive.cjs"),V=require("./Incentives/ERC20PeggedVariableCriteriaIncentiveV2.cjs"),v=require("./Incentives/ERC20VariableCriteriaIncentive.cjs"),R=require("./Incentives/ERC20VariableCriteriaIncentiveV2.cjs"),P=require("./Incentives/ERC20VariableIncentive.cjs"),O=require("./Incentives/PointsIncentive.cjs"),q="0x6080604052348015600e575f80fd5b5060156019565b607c565b63409feecd198054600181161560365763f92ee8a95f526004601cfd5b6001600160401b03808260011c146077578060011b8355806020527fc7f505b2f371ae2175ee4913f4499e1f2633a7b5936321eed1cdaeb6115181d2602080a15b505050565b611cfa806100895f395ff3fe60806040526004361061025d575f3560e01c8063547d18641161014b578063c884ef83116100c6578063ec87621c1161007c578063f2fde38b11610062578063f2fde38b146106b8578063fe9fbb80146106cb578063fee81cf4146106ea575f80fd5b8063ec87621c14610691578063f04e283e146106a5575f80fd5b8063db09da12116100ac578063db09da121461063e578063dcc213611461065d578063dcc59b6f1461067c575f80fd5b8063c884ef83146105fb578063d54ad2a114610629575f80fd5b80638da5cb5b1161011b578063a4d66daf11610101578063a4d66daf146105a8578063bb1757cf146105bd578063be4994f8146105dc575f80fd5b80638da5cb5b146105665780639214fa4d1461057e575f80fd5b8063547d18641461052d57806354d1f13d14610542578063715018a61461054a57806375b238fc14610552575f80fd5b80632de94807116101db578063439fab91116101ab5780634a4ee7b1116101915780634a4ee7b1146104b95780634e7165a2146104cc578063514e62fc146104f8575f80fd5b8063439fab9114610451578063474f5a4414610470575f80fd5b80632de94807146103b657806330db555f146103e757806338d52e0f146104065780634359d28a14610432575f80fd5b80631cd64df411610230578063228cb73311610216578063228cb73314610360578063256929621461037457806328d6183b1461037c575f80fd5b80631cd64df4146102da5780631f1cb62b1461030f575f80fd5b806301ffc9a71461026157806307621eca14610295578063183a4f6e146102b25780631c10893f146102c7575b5f80fd5b34801561026c575f80fd5b5061028061027b366004611655565b61071b565b60405190151581526020015b60405180910390f35b3480156102a0575f80fd5b505f545b60405190815260200161028c565b6102c56102c0366004611694565b610776565b005b6102c56102d53660046116d3565b610783565b3480156102e5575f80fd5b506102806102f43660046116d3565b638b78c6d8600c9081525f9290925260209091205481161490565b34801561031a575f80fd5b5060075461033b9073ffffffffffffffffffffffffffffffffffffffff1681565b60405173ffffffffffffffffffffffffffffffffffffffff909116815260200161028c565b34801561036b575f80fd5b506102a45f5481565b6102c5610799565b348015610387575f80fd5b506040517f5658633800000000000000000000000000000000000000000000000000000000815260200161028c565b3480156103c1575f80fd5b506102a46103d03660046116fb565b638b78c6d8600c9081525f91909152602090205490565b3480156103f2575f80fd5b506102c5610401366004611694565b6107e6565b348015610411575f80fd5b5060035461033b9073ffffffffffffffffffffffffffffffffffffffff1681565b34801561043d575f80fd5b506102c561044c36600461175c565b6108a2565b34801561045c575f80fd5b506102c561046b366004611806565b61099c565b34801561047b575f80fd5b5061048f61048a366004611806565b610c39565b6040805192835273ffffffffffffffffffffffffffffffffffffffff90911660208301520161028c565b6102c56104c73660046116d3565b610d9b565b3480156104d7575f80fd5b506104eb6104e6366004611806565b610dad565b60405161028c9190611891565b348015610503575f80fd5b506102806105123660046116d3565b638b78c6d8600c9081525f9290925260209091205416151590565b348015610538575f80fd5b506102a460025481565b6102c5610e47565b6102c5610e80565b34801561055d575f80fd5b506102a4600281565b348015610571575f80fd5b50638b78c6d8195461033b565b348015610589575f80fd5b5060075473ffffffffffffffffffffffffffffffffffffffff1661033b565b3480156105b3575f80fd5b506102a460055481565b3480156105c8575f80fd5b506102806105d73660046118a3565b610e93565b3480156105e7575f80fd5b506102c56105f636600461175c565b611071565b348015610606575f80fd5b506102806106153660046116fb565b60016020525f908152604090205460ff1681565b348015610634575f80fd5b506102a460065481565b348015610649575f80fd5b506102806106583660046118a3565b61110f565b348015610668575f80fd5b506102c561067736600461175c565b61114e565b348015610687575f80fd5b506102a460045481565b34801561069c575f80fd5b506102a4600181565b6102c56106b33660046116fb565b6111ec565b6102c56106c63660046116fb565b611226565b3480156106d6575f80fd5b506102806106e53660046116fb565b61124c565b3480156106f5575f80fd5b506102a46107043660046116fb565b63389a75e1600c9081525f91909152602090205490565b5f7fffffffff0000000000000000000000000000000000000000000000000000000082167f565863380000000000000000000000000000000000000000000000000000000014806107705750610770826112ab565b92915050565b6107803382611300565b50565b61078b61130b565b6107958282611325565b5050565b5f6202a30067ffffffffffffffff164201905063389a75e1600c52335f52806020600c2055337fdbf36a107da19e49527a7176a1babf963b4b0ff8cde35ee35d6cd8f1f9ac7e1d5f80a250565b60016107f181611331565b815f0361082a576040517ff92ee8a900000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b60035461084f9073ffffffffffffffffffffffffffffffffffffffff16333085611362565b8160055f828254610860919061191f565b909155505060408051338152602081018490527fa64c2da41decbd538f8629e54c8fa0b7362c9102b691386a0fb6a1797454e9c6910160405180910390a15050565b60026108ad81611331565b8382146108e6576040517fff633a3800000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b5f5b84811015610994575f84848381811061090357610903611932565b9050602002016020810190610918919061195f565b905080151560010361095a5761095587878481811061093957610939611932565b905060200201602081019061094e91906116fb565b6001611325565b61098b565b61098b87878481811061096f5761096f611932565b905060200201602081019061098491906116fb565b6001611300565b506001016108e8565b505050505050565b7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffbf60113280546003825580156109ed5760018160011c14303b106109e45763f92ee8a95f526004601cfd5b818160ff1b1b91505b505f6109fb838501856119d4565b905080604001515f1480610a1157506060810151155b15610a48576040517ff92ee8a900000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b606081015181515f90610a719073ffffffffffffffffffffffffffffffffffffffff16306113c4565b905081811015610ada5782516040517f5c54305e00000000000000000000000000000000000000000000000000000000815273ffffffffffffffffffffffffffffffffffffffff9091166004820152602481018290526044810183905260640160405180910390fd5b82516003805473ffffffffffffffffffffffffffffffffffffffff9283167fffffffffffffffffffffffff00000000000000000000000000000000000000009182161790915560208501516007805491909316911617905560408301515f556060830151600555610b4a336113f7565b610b598360800151600161143f565b826020015173ffffffffffffffffffffffffffffffffffffffff16835f015173ffffffffffffffffffffffffffffffffffffffff167fd20715546497e6d32bc9b61b35416a25a8cc41d2fb7f389a1bb26dc040213a3b856040015186606001518760800151604051610bf493929190928352602083019190915273ffffffffffffffffffffffffffffffffffffffff16604082015260600190565b60405180910390a35050508015610c34576002815560016020527fc7f505b2f371ae2175ee4913f4499e1f2633a7b5936321eed1cdaeb6115181d2602080a15b505050565b5f806001610c4681611331565b5f610c5385870187611afd565b90505f8160200151806020019051810190610c6e9190611b7a565b90508060055f828254610c819190611b91565b90915550508151600354610cae9173ffffffffffffffffffffffffffffffffffffffff9091169083611480565b81516003546040517fffffffffffffffffffffffffffffffffffffffff000000000000000000000000606092831b811660208301529183901b90911660348201526048810183905273ffffffffffffffffffffffffffffffffffffffff909116907f9ad2e7a4af16dceda9cce4274b2f59c328d8c012eb0e15eb5e1e73b7d8f264d390606801604080517fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe081840301815290829052610d6c91611891565b60405180910390a260035490945073ffffffffffffffffffffffffffffffffffffffff16925050509250929050565b610da361130b565b6107958282611300565b60605f610dbc838501856119d4565b6060818101516040805160808101825260018152845173ffffffffffffffffffffffffffffffffffffffff16602080830191909152308284015282518082018452849052825180820185905283518082038301815290840184529482019490945290519394509092610e2e9201611ba4565b6040516020818303038152906040529250505092915050565b63389a75e1600c52335f525f6020600c2055337ffa7b8eab7da67f412cc9575ed43464468f9bfbae89d1675917346ca6d8fe3c925f80a2565b610e8861130b565b610e915f6114d3565b565b5f610e9c61130b565b5f610ea983850185611c47565b90505f8160200151806020019051810190610ec49190611b7a565b9050610ed0868261151d565b610f06576040517f6247a84e00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b60055481600654610f17919061191f565b1115610f4f576040517f360e42e100000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b8060065f828254610f60919061191f565b92505081905550600160045f828254610f79919061191f565b9091555050600354610fa29073ffffffffffffffffffffffffffffffffffffffff168783611480565b6003546040517fffffffffffffffffffffffffffffffffffffffff000000000000000000000000606092831b811660208301529188901b90911660348201526048810182905273ffffffffffffffffffffffffffffffffffffffff8716907f9ad2e7a4af16dceda9cce4274b2f59c328d8c012eb0e15eb5e1e73b7d8f264d390606801604080517fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe08184030181529082905261105d91611891565b60405180910390a250600195945050505050565b600261107c81611331565b8382146110b5576040517fff633a3800000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b5f5b84811015610994576111078686838181106110d4576110d4611932565b90506020020160208101906110e991906116fb565b8585848181106110fb576110fb611932565b90506020020135611325565b6001016110b7565b5f8061111d83850185611c47565b90505f81602001518060200190518101906111389190611b7a565b9050611144868261151d565b9695505050505050565b600261115981611331565b838214611192576040517fff633a3800000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b5f5b84811015610994576111e48686838181106111b1576111b1611932565b90506020020160208101906111c691906116fb565b8585848181106111d8576111d8611932565b90506020020135611300565b600101611194565b6111f461130b565b63389a75e1600c52805f526020600c20805442111561121a57636f5e88185f526004601cfd5b5f9055610780816114d3565b61122e61130b565b8060601b61124357637448fbae5f526004601cfd5b610780816114d3565b5f8173ffffffffffffffffffffffffffffffffffffffff16611271638b78c6d8195490565b73ffffffffffffffffffffffffffffffffffffffff1614806107705750638b78c6d8600c9081525f83905260209020546003161515610770565b5f7fffffffff0000000000000000000000000000000000000000000000000000000082167fa9216705000000000000000000000000000000000000000000000000000000001480610770575061077082611568565b61079582825f6115fe565b638b78c6d819543314610e91576382b429005f526004601cfd5b610795828260016115fe565b638b78c6d81954331461078057638b78c6d8600c52335f52806020600c205416610780576382b429005f526004601cfd5b60405181606052826040528360601b602c526f23b872dd000000000000000000000000600c5260205f6064601c5f895af18060015f5114166113b657803d873b1517106113b657637939f4245f526004601cfd5b505f60605260405250505050565b5f816014526f70a082310000000000000000000000005f5260208060246010865afa601f3d111660205102905092915050565b73ffffffffffffffffffffffffffffffffffffffff16638b78c6d819819055805f7f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e08180a350565b638b78c6d8600c52815f52806020600c205580600c5160601c7f715ad5ce61fc9595c7b415289d59cf203f23a94fa06f04af7e489a0a76e1fe265f80a35050565b81601452806034526fa9059cbb0000000000000000000000005f5260205f604460105f875af18060015f5114166114c957803d853b1517106114c9576390b8ec185f526004601cfd5b505f603452505050565b638b78c6d819805473ffffffffffffffffffffffffffffffffffffffff9092169182907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e05f80a355565b73ffffffffffffffffffffffffffffffffffffffff82165f9081526001602052604081205460ff1615801561156157506005548260065461155e919061191f565b11155b9392505050565b5f7fffffffff0000000000000000000000000000000000000000000000000000000082167f6ab67a0d00000000000000000000000000000000000000000000000000000000148061077057507f01ffc9a7000000000000000000000000000000000000000000000000000000007fffffffff00000000000000000000000000000000000000000000000000000000831614610770565b638b78c6d8600c52825f526020600c2080548381178361161f575080841681185b80835580600c5160601c7f715ad5ce61fc9595c7b415289d59cf203f23a94fa06f04af7e489a0a76e1fe265f80a3505050505050565b5f60208284031215611665575f80fd5b81357fffffffff0000000000000000000000000000000000000000000000000000000081168114611561575f80fd5b5f602082840312156116a4575f80fd5b5035919050565b803573ffffffffffffffffffffffffffffffffffffffff811681146116ce575f80fd5b919050565b5f80604083850312156116e4575f80fd5b6116ed836116ab565b946020939093013593505050565b5f6020828403121561170b575f80fd5b611561826116ab565b5f8083601f840112611724575f80fd5b50813567ffffffffffffffff81111561173b575f80fd5b6020830191508360208260051b8501011115611755575f80fd5b9250929050565b5f805f806040858703121561176f575f80fd5b843567ffffffffffffffff811115611785575f80fd5b61179187828801611714565b909550935050602085013567ffffffffffffffff8111156117b0575f80fd5b6117bc87828801611714565b95989497509550505050565b5f8083601f8401126117d8575f80fd5b50813567ffffffffffffffff8111156117ef575f80fd5b602083019150836020828501011115611755575f80fd5b5f8060208385031215611817575f80fd5b823567ffffffffffffffff81111561182d575f80fd5b611839858286016117c8565b90969095509350505050565b5f81518084528060208401602086015e5f6020828601015260207fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0601f83011685010191505092915050565b602081525f6115616020830184611845565b5f805f604084860312156118b5575f80fd5b6118be846116ab565b9250602084013567ffffffffffffffff8111156118d9575f80fd5b6118e5868287016117c8565b9497909650939450505050565b7f4e487b71000000000000000000000000000000000000000000000000000000005f52601160045260245ffd5b80820180821115610770576107706118f2565b7f4e487b71000000000000000000000000000000000000000000000000000000005f52603260045260245ffd5b5f6020828403121561196f575f80fd5b81358015158114611561575f80fd5b7f4e487b71000000000000000000000000000000000000000000000000000000005f52604160045260245ffd5b6040805190810167ffffffffffffffff811182821017156119ce576119ce61197e565b60405290565b5f60a08284031280156119e5575f80fd5b5060405160a0810167ffffffffffffffff81118282101715611a0957611a0961197e565b604052611a15836116ab565b8152611a23602084016116ab565b60208201526040838101359082015260608084013590820152611a48608084016116ab565b60808201529392505050565b5f82601f830112611a63575f80fd5b813567ffffffffffffffff811115611a7d57611a7d61197e565b604051601f82017fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0908116603f0116810167ffffffffffffffff81118282101715611aca57611aca61197e565b604052818152838201602001851015611ae1575f80fd5b816020850160208301375f918101602001919091529392505050565b5f60208284031215611b0d575f80fd5b813567ffffffffffffffff811115611b23575f80fd5b820160408185031215611b34575f80fd5b611b3c6119ab565b611b45826116ab565b8152602082013567ffffffffffffffff811115611b60575f80fd5b611b6c86828501611a54565b602083015250949350505050565b5f60208284031215611b8a575f80fd5b5051919050565b81810381811115610770576107706118f2565b602081525f825160038110611be0577f4e487b71000000000000000000000000000000000000000000000000000000005f52602160045260245ffd5b8060208401525073ffffffffffffffffffffffffffffffffffffffff602084015116604083015273ffffffffffffffffffffffffffffffffffffffff60408401511660608301526060830151608080840152611c3f60a0840182611845565b949350505050565b5f60208284031215611c57575f80fd5b813567ffffffffffffffff811115611c6d575f80fd5b820160408185031215611c7e575f80fd5b611c866119ab565b813567ffffffffffffffff811115611c9c575f80fd5b611ca886828501611a54565b825250602082013567ffffffffffffffff811115611b60575f80fdfea2646970667358221220ae9431c5aa2e6d904568c209e18398528ed1256e1be4fbeb1526712b5c3f955964736f6c634300081a0033",n={BASE_URL:"/",DEV:!1,MODE:"production",PROD:!0,SSR:!1,VITE_BOOST_MAINNET_SIGNER_EOA:"0xCBD0C302040bC803B4B2EDaF21Be0e49Deff5480",VITE_BOOST_TESTNET_SIGNER_EOA:"0xd63167e9db11B108940b2E8236581F961f33f396"},r=class r extends w.DeployableTarget{constructor(){super(...arguments),this.abi=b.g}async owner(f){return await b.yO(this._config,{address:this.assertValidAddress(),args:[],...f})}async currentReward(f){return await b.aO(this._config,{address:this.assertValidAddress(),args:[],...f})}async claims(f){return await b.nO(this._config,{address:this.assertValidAddress(),args:[],...f})}async totalClaimed(f){return await b.wO(this._config,{address:this.assertValidAddress(),args:[],...f})}async claimed(f,e){return await b.tO(this._config,{address:this.assertValidAddress(),args:[f],...e})}async asset(f){return await b.eO(this._config,{address:this.assertValidAddress(),...f})}async peg(f){return await b.cO(this._config,{address:this.assertValidAddress(),...f})}async reward(f){return await b.bO(this._config,{address:this.assertValidAddress(),...f})}async limit(f){return await b.lO(this._config,{address:this.assertValidAddress(),...f})}async claim(f,e){return await this.awaitResult(this.claimRaw(f,e))}async claimRaw(f,e){const{request:a,result:d}=await b.PO(this._config,{address:this.assertValidAddress(),args:[u.prepareClaimPayload(f)],...this.optionallyAttachAccount(),...e});return{hash:await b.hO(this._config,a),result:d}}async clawback(f,e){return await this.awaitResult(this.clawbackRaw(f,e))}async clawbackRaw(f,e){const{request:a,result:d}=await b.kO(this._config,{address:this.assertValidAddress(),args:[u.prepareClaimPayload(f)],...this.optionallyAttachAccount(),...e});return{hash:await b.IO(this._config,a),result:d}}async isClaimable(f,e){return await b.uO(this._config,{address:this.assertValidAddress(),args:[f.target,f.data],...e})}async getPeg(f){return await b.sO(this._config,{address:this.assertValidAddress(),args:[],...f})}async getTotalBudget(f){return await this.limit(f)}async canBeClaimed(f){return await this.getRemainingClaimPotential(f)>0n}async getRemainingClaimPotential(f){const[e,a]=await Promise.all([this.totalClaimed(f),this.limit(f)]);return a-e}buildParameters(f,e){const[a,d]=this.validateDeploymentConfig(f,e);return{abi:b.g,bytecode:q,args:[o(a)],...this.optionallyAttachAccount(d.account)}}buildClawbackData(f){return t.encodeAbiParameters([{type:"uint256"}],[f])}buildClaimData(f){return t.encodeAbiParameters([{type:"uint256",name:"rewardAmount"}],[f])}async getTopupPayload(f){var e,a,d;return o({asset:await this.asset()??t.zeroAddress,peg:((e=this.payload)==null?void 0:e.peg)??t.zeroAddress,reward:((a=this.payload)==null?void 0:a.reward)??0n,limit:f,manager:((d=this.payload)==null?void 0:d.manager)??t.zeroAddress})}decodeClaimData(f){const e=t.decodeAbiParameters([{type:"tuple",name:"BoostClaimData",components:[{type:"bytes",name:"validatorData"},{type:"bytes",name:"incentiveData"}]}],f);return t.decodeAbiParameters([{type:"uint256"}],e[0].incentiveData)[0]}};r.bases={...n!=null&&n.VITE_ERC20_INCENTIVE_BASE?{31337:void 0}:{},...I.ERC20PeggedIncentive},r.registryType=p.RegistryType.INCENTIVE;let s=r;function o({asset:i,peg:f,reward:e,limit:a,manager:d=t.zeroAddress}){return t.encodeAbiParameters([{type:"address",name:"asset"},{type:"address",name:"peg"},{type:"uint256",name:"reward"},{type:"uint256",name:"limit"},{type:"address",name:"manager"}],[i,f,e,a,d])}const l={[c.APointsIncentive]:O.PointsIncentive,[c.AERC20Incentive]:A.ERC20Incentive,[c.AERC20PeggedVariableCriteriaIncentive]:E.ERC20PeggedVariableCriteriaIncentive,[c.AERC20PeggedVariableCriteriaIncentiveV2]:V.ERC20PeggedVariableCriteriaIncentiveV2,[c.AERC20PeggedIncentive]:s,[c.AAllowListIncentive]:m.AllowListIncentive,[c.ACGDAIncentive]:y.CGDAIncentive,[c.AERC20VariableIncentive]:P.ERC20VariableIncentive,[c.AERC20VariableCriteriaIncentiveV2]:R.ERC20VariableCriteriaIncentiveV2,[c.AERC20VariableCriteriaIncentive]:v.ERC20VariableCriteriaIncentive};async function D(i,f,e){const a=await C.readContract(i.config,{abi:b.de,functionName:"getComponentInterface",address:f,...e}),d=l[a];if(!d)throw new h.InvalidComponentInterfaceError(Object.keys(l),a);return new d(i,f)}exports.ERC20PeggedIncentive=s;exports.IncentiveByComponentInterface=l;exports.incentiveFromAddress=D;exports.prepareERC20PeggedIncentivePayload=o;
2
+ //# sourceMappingURL=Incentive-CrnbYN_a.cjs.map
@@ -1 +1 @@
1
- {"version":3,"file":"Incentive-Ctfodrh5.cjs","sources":["../src/Incentives/ERC20PeggedIncentive.ts","../src/Incentives/Incentive.ts"],"sourcesContent":["import {\n erc20PeggedIncentiveAbi,\n readErc20PeggedIncentiveAsset,\n readErc20PeggedIncentiveClaimed,\n readErc20PeggedIncentiveClaims,\n readErc20PeggedIncentiveCurrentReward,\n readErc20PeggedIncentiveGetPeg,\n readErc20PeggedIncentiveIsClaimable,\n readErc20PeggedIncentiveLimit,\n readErc20PeggedIncentiveOwner,\n readErc20PeggedIncentivePeg,\n readErc20PeggedIncentiveReward,\n readErc20PeggedIncentiveTotalClaimed,\n simulateErc20PeggedIncentiveClaim,\n simulateErc20PeggedIncentiveClawback,\n writeErc20PeggedIncentiveClaim,\n writeErc20PeggedIncentiveClawback,\n} from '@boostxyz/evm';\nimport { bytecode } from '@boostxyz/evm/artifacts/contracts/incentives/ERC20PeggedIncentive.sol/ERC20PeggedIncentive.json';\nimport {\n type Address,\n type ContractEventName,\n type Hex,\n decodeAbiParameters,\n encodeAbiParameters,\n zeroAddress,\n} from 'viem';\nimport { ERC20PeggedIncentive as ERC20PeggedIncentiveBases } 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 { erc20PeggedIncentiveAbi };\n\n/**\n * The object representation of a `ERC20PeggedIncentive.InitPayload`\n *\n * @export\n * @interface ERC20PeggedIncentivePayload\n * @typedef {ERC20PeggedIncentivePayload}\n */\nexport interface ERC20PeggedIncentivePayload {\n /**\n * The address of the incentivized asset.\n *\n * @type {Address}\n */\n asset: Address;\n /**\n * The peg to normalize to.\n *\n * @type {Address}\n */\n peg: Address;\n /**\n * The amount of the asset to distribute.\n *\n * @type {bigint}\n */\n reward: bigint;\n /**\n * Total spend for the incentive.\n *\n * @type {bigint}\n */\n limit: bigint;\n /**\n * (Optional) The address of the entity that can managed the incentive.\n *\n * @type {Address}\n * @optional\n */\n manager?: Address;\n}\n\n/**\n * A generic `viem.Log` event with support for `ERC20PeggedIncentive` event types.\n *\n * @export\n * @typedef {ERC20PeggedIncentiveLog}\n * @template {ContractEventName<typeof erc20PeggedIncentiveAbi>} [event=ContractEventName<\n * typeof erc20PeggedIncentiveAbi\n * >]\n */\nexport type ERC20PeggedIncentiveLog<\n event extends ContractEventName<\n typeof erc20PeggedIncentiveAbi\n > = ContractEventName<typeof erc20PeggedIncentiveAbi>,\n> = GenericLog<typeof erc20PeggedIncentiveAbi, event>;\n\n/**\n * A simple ERC20 incentive implementation that allows claiming of tokens\n *\n * @export\n * @class ERC20PeggedIncentive\n * @typedef {ERC20PeggedIncentive}\n * @extends {DeployableTarget<ERC20PeggedIncentivePayload>}\n */\nexport class ERC20PeggedIncentive extends DeployableTarget<\n ERC20PeggedIncentivePayload,\n typeof erc20PeggedIncentiveAbi\n> {\n public override readonly abi = erc20PeggedIncentiveAbi;\n /**\n * @inheritdoc\n *\n * @public\n * @static\n * @type {Record<number, Address>}\n */\n public static override bases: Record<number, Address> = {\n ...(import.meta.env?.VITE_ERC20_INCENTIVE_BASE\n ? { 31337: import.meta.env.VITE_ERC20_INCENTIVE_BASE }\n : {}),\n ...(ERC20PeggedIncentiveBases 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 owner of the incentive\n *\n * @public\n * @async\n * @param {?ReadParams} [params]\n * @returns {Promise<Address>}\n */\n public async owner(params?: ReadParams) {\n return await readErc20PeggedIncentiveOwner(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 * Calculates the current reward based on the time since the last claim. The reward is calculated based on the time since the last claim, the available budget, and the reward parameters. It increases linearly over time in the absence of claims, with each hour adding `rewardBoost` to the current reward, up to the available budget. For example, if there is one claim in the first hour, then no claims for three hours, the claimable reward would be `initialReward - rewardDecay + (rewardBoost * 3)`\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 readErc20PeggedIncentiveCurrentReward(this._config, {\n address: this.assertValidAddress(),\n args: [],\n // biome-ignore lint/suspicious/noExplicitAny: Accept any shape of valid wagmi/viem parameters, wagmi does the same thing internally\n ...(params as any),\n });\n }\n\n /**\n * The number of claims that have been made\n *\n * @public\n * @async\n * @param {?ReadParams} [params]\n * @returns {Promise<bigint>}\n */\n public async claims(params?: ReadParams) {\n return await readErc20PeggedIncentiveClaims(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 total amount of rewards claimed\n *\n * @public\n * @async\n * @param {?ReadParams} [params]\n * @returns {Promise<bigint>}\n */\n public async totalClaimed(params?: ReadParams) {\n return await readErc20PeggedIncentiveTotalClaimed(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 readErc20PeggedIncentiveClaimed(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 ERC20-like token\n *\n * @public\n * @async\n * @param {?ReadParams} [params]\n * @returns {Promise<Address>}\n */\n public async asset(params?: ReadParams) {\n return await readErc20PeggedIncentiveAsset(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 address of the pegged ERC20-like token\n *\n * @public\n * @async\n * @param {?ReadParams} [params]\n * @returns {Promise<Address>}\n */\n public async peg(params?: ReadParams) {\n return await readErc20PeggedIncentivePeg(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 reward amount issued for each claim\n *\n * @public\n * @async\n * @param {?ReadParams} [params]\n * @returns {Promise<bigint>}\n */\n public async reward(params?: ReadParams) {\n return await readErc20PeggedIncentiveReward(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 limit (max possible rewards payout in reward token)\n *\n * @public\n * @async\n * @param {?ReadParams} [params]\n * @returns {Promise<bigint>}\n */\n public async limit(params?: ReadParams) {\n return await readErc20PeggedIncentiveLimit(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>} - Returns true if 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; }>} - Returns true if successfully claimed\n */\n protected async claimRaw(payload: ClaimPayload, params?: WriteParams) {\n const { request, result } = await simulateErc20PeggedIncentiveClaim(\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 writeErc20PeggedIncentiveClaim(this._config, request);\n return { hash, result };\n }\n\n /**\n * Clawback assets from the incentive\n *\n * @public\n * @async\n * @param {ClaimPayload} payload\n * @param {?WriteParams} [params]\n * @returns {Promise<boolean>} - True if the assets were successfully clawbacked\n */\n public async clawback(payload: ClaimPayload, params?: WriteParams) {\n return await this.awaitResult(this.clawbackRaw(payload, params));\n }\n\n /**\n * Clawback assets from 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 assets were successfully clawbacked\n */\n public async clawbackRaw(payload: ClaimPayload, params?: WriteParams) {\n const { request, result } = await simulateErc20PeggedIncentiveClawback(\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 writeErc20PeggedIncentiveClawback(this._config, request);\n return { hash, result };\n }\n\n /**\n * Check if an incentive is claimable.\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 readErc20PeggedIncentiveIsClaimable(this._config, {\n address: this.assertValidAddress(),\n args: [payload.target, payload.data],\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 * read the peg token for the incentive.\n *\n * @public\n * @async\n * @param {?ReadParams} [params]\n * @returns {Promise<Address>} = The address of the token the reward is pegged to\n */\n public async getPeg(params?: ReadParams) {\n return await readErc20PeggedIncentiveGetPeg(this._config, {\n address: this.assertValidAddress(),\n args: [],\n // biome-ignore lint/suspicious/noExplicitAny: Accept any shape of valid wagmi/viem parameters, wagmi does the same thing internally\n ...(params as any),\n });\n }\n\n /**\n * Get the maximum amount that can be claimed by this incentive. Useful when used in conjunction with `BoostCore.calculateProtocolFee`\n *\n * @public\n * @async\n * @param {?ReadParams} [params]\n * @returns {Promise<bigint>} = Return a bigint representing that maximum amount that can be distributed by this incentive.\n */\n public async getTotalBudget(params?: ReadParams) {\n return await this.limit(params);\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 [totalClaimed, limit] = await Promise.all([\n this.totalClaimed(params),\n this.limit(params),\n ]);\n return limit - totalClaimed;\n }\n\n /**\n * @inheritdoc\n *\n * @public\n * @param {?ERC20PeggedIncentivePayload} [_payload]\n * @param {?DeployableOptions} [_options]\n * @returns {GenericDeployableParams}\n */\n public override buildParameters(\n _payload?: ERC20PeggedIncentivePayload,\n _options?: DeployableOptions,\n ): GenericDeployableParams {\n const [payload, options] = this.validateDeploymentConfig(\n _payload,\n _options,\n );\n return {\n abi: erc20PeggedIncentiveAbi,\n bytecode: bytecode as Hex,\n args: [prepareERC20PeggedIncentivePayload(payload)],\n ...this.optionallyAttachAccount(options.account),\n };\n }\n\n /**\n * Encodes an amount to clawback from the incentive\n *\n * @public\n * @param {bigint} amount - How much of the asset to clawback\n * @returns {Hex} - Returns an encoded uint256\n */\n public buildClawbackData(amount: bigint) {\n return encodeAbiParameters([{ type: 'uint256' }], [amount]);\n }\n\n /**\n * Builds the claim data for the ERC20PeggedIncentive.\n *\n * @public\n * @param {bigint} rewardAmount\n * @returns {Hash} Returns the encoded claim data\n * @description This function returns the encoded claim data for the ERC20PeggedIncentive.\n */\n public buildClaimData(rewardAmount: bigint) {\n return encodeAbiParameters(\n [{ type: 'uint256', name: 'rewardAmount' }],\n [rewardAmount],\n );\n }\n /**\n * Generates a top-up payload for the ERC20PeggedIncentive contract by incrementing\n * the existing `limit` field by `netAmount`. The entire payload is then re-encoded\n * via `prepareERC20PeggedIncentivePayload(...)`.\n *\n * @public\n * @param {bigint} netAmount - The additional limit to add to this incentive.\n * @returns {Hex} The ABI-encoded payload with the updated `limit`.\n */\n public async getTopupPayload(netAmount: bigint): Promise<Hex> {\n return prepareERC20PeggedIncentivePayload({\n asset: (await this.asset()) ?? zeroAddress,\n peg: this.payload?.peg ?? zeroAddress,\n reward: this.payload?.reward ?? 0n,\n limit: netAmount,\n manager: this.payload?.manager ?? zeroAddress,\n });\n }\n\n /**\n * Decodes claim data for the ERC20PeggedIncentive, returning the claim amount.\n * Useful when deriving amount claimed from logs.\n *\n * @public\n * @param {Hex} claimData\n * @returns {bigint} Returns the reward amount from a claim data payload\n */\n public decodeClaimData(claimData: Hex) {\n const boostClaimData = decodeAbiParameters(\n [\n {\n type: 'tuple',\n name: 'BoostClaimData',\n components: [\n { type: 'bytes', name: 'validatorData' },\n { type: 'bytes', name: 'incentiveData' },\n ],\n },\n ],\n claimData,\n );\n const signedAmount = decodeAbiParameters(\n [{ type: 'uint256' }],\n boostClaimData[0].incentiveData,\n )[0];\n return signedAmount;\n }\n}\n\n/**\n * Given a {@link ERC20PeggedIncentivePayload}, properly encode a `ERC20PeggedIncentive.InitPayload` for use with {@link ERC20PeggedIncentive} initialization.\n *\n * @param {ERC20PeggedIncentivePayload} param0\n * @param {Address} param0.asset - The address of the incentivized asset.\n * @param {Address} param0.peg - The peg to normalize to.\n * @param {bigint} param0.reward - The amount of the asset to distribute.\n * @param {bigint} param0.limit - How many times can this incentive be claimed.\n * @param {Address} [param0.manager=zeroAddress] - The entity that can manage the incentive.\n * @returns {Hex}\n */\nexport function prepareERC20PeggedIncentivePayload({\n asset,\n peg,\n reward,\n limit,\n manager = zeroAddress,\n}: ERC20PeggedIncentivePayload) {\n return encodeAbiParameters(\n [\n { type: 'address', name: 'asset' },\n { type: 'address', name: 'peg' },\n { type: 'uint256', name: 'reward' },\n { type: 'uint256', name: 'limit' },\n { type: 'address', name: 'manager' },\n ],\n [asset, peg, reward, limit, manager],\n );\n}\n","import { aIncentiveAbi } from '@boostxyz/evm';\nimport {\n AAllowListIncentive,\n ACGDAIncentive,\n AERC20Incentive,\n AERC20PeggedIncentive,\n AERC20PeggedVariableCriteriaIncentive,\n AERC20PeggedVariableCriteriaIncentiveV2,\n AERC20VariableCriteriaIncentive,\n AERC20VariableCriteriaIncentiveV2,\n AERC20VariableIncentive,\n // AERC20VariableCriteriaIncentive\n APointsIncentive,\n} from '@boostxyz/evm/deploys/componentInterfaces.json';\nimport { readContract } from '@wagmi/core';\nimport type { Address, Hex } from 'viem';\nimport type { DeployableOptions } from '../Deployable/Deployable';\nimport { InvalidComponentInterfaceError } from '../errors';\nimport type { ReadParams } from '../utils';\nimport { AllowListIncentive } from './AllowListIncentive';\nimport { CGDAIncentive } from './CGDAIncentive';\nimport { ERC20Incentive } from './ERC20Incentive';\nimport { ERC20PeggedIncentive } from './ERC20PeggedIncentive';\nimport { ERC20PeggedVariableCriteriaIncentive } from './ERC20PeggedVariableCriteriaIncentive';\nimport { ERC20PeggedVariableCriteriaIncentiveV2 } from './ERC20PeggedVariableCriteriaIncentiveV2';\nimport { ERC20VariableCriteriaIncentive } from './ERC20VariableCriteriaIncentive';\nimport { ERC20VariableCriteriaIncentiveV2 } from './ERC20VariableCriteriaIncentiveV2';\nimport { ERC20VariableIncentive } from './ERC20VariableIncentive';\n// import { ERC1155Incentive } from './ERC1155Incentive';\nimport { PointsIncentive } from './PointsIncentive';\n\nexport {\n AllowListIncentive,\n CGDAIncentive,\n // ERC1155Incentive,\n ERC20Incentive,\n ERC20PeggedIncentive,\n ERC20PeggedVariableCriteriaIncentive,\n ERC20PeggedVariableCriteriaIncentiveV2,\n PointsIncentive,\n ERC20VariableIncentive,\n ERC20VariableCriteriaIncentive,\n ERC20VariableCriteriaIncentiveV2,\n};\n\n/**\n * A union type representing all valid protocol Incentive implementations\n *\n * @export\n * @typedef {Incentive}\n */\nexport type Incentive =\n | AllowListIncentive\n | CGDAIncentive\n | ERC20Incentive\n // | ERC1155Incentive\n | ERC20PeggedIncentive\n | ERC20PeggedVariableCriteriaIncentive\n | ERC20PeggedVariableCriteriaIncentiveV2\n | PointsIncentive\n | ERC20VariableIncentive\n | ERC20VariableCriteriaIncentive\n | ERC20VariableCriteriaIncentiveV2;\n\n/**\n * A map of Incentive component interfaces to their constructors.\n *\n * @type {{ \"0xc5b24b8e\": typeof PointsIncentive; \"0x8c901437\": typeof ERC20Incentive; \"0x4414fbb4\": typeof ERC20PeggedIncentive; \"0xf60c99c9\": typeof ERC20PeggedVariableCriteriaIncentiveV2; \"0x56586338\": typeof AllowListIncentive; \"0xa39e44d9\": typeof CGDAIncentive; \"0xa8e4af1e\": typeof ERC20VariableIncentive; \"0x90318111\": typeof ERC20VariableCriteriaIncentiveV2 }}\n */\nexport const IncentiveByComponentInterface = {\n [APointsIncentive as Hex]: PointsIncentive,\n [AERC20Incentive as Hex]: ERC20Incentive,\n [AERC20PeggedVariableCriteriaIncentive as Hex]:\n ERC20PeggedVariableCriteriaIncentive,\n [AERC20PeggedVariableCriteriaIncentiveV2 as Hex]:\n ERC20PeggedVariableCriteriaIncentiveV2,\n [AERC20PeggedIncentive as Hex]: ERC20PeggedIncentive,\n [AAllowListIncentive]: AllowListIncentive,\n // [AERC1155Incentive as Hex]: ERC1155Incentive,\n [ACGDAIncentive as Hex]: CGDAIncentive,\n [AERC20VariableIncentive as Hex]: ERC20VariableIncentive,\n [AERC20VariableCriteriaIncentiveV2 as Hex]: ERC20VariableCriteriaIncentiveV2,\n [AERC20VariableCriteriaIncentive as Hex]: ERC20VariableCriteriaIncentive,\n};\n\n/**\n * A function that will read a contract's component interface using `getComponentInterface` and return the correct instantiated instance.\n *\n * @export\n * @async\n * @param {DeployableOptions} options\n * @param {Address} address\n * @returns {Incentive}\n * @throws {@link InvalidComponentInterfaceError}\n */\nexport async function incentiveFromAddress(\n options: DeployableOptions,\n address: Address,\n params?: ReadParams,\n) {\n const interfaceId = (await readContract(options.config, {\n abi: aIncentiveAbi,\n functionName: 'getComponentInterface',\n address,\n ...params,\n })) as keyof typeof IncentiveByComponentInterface;\n const Ctor = IncentiveByComponentInterface[interfaceId];\n if (!Ctor) {\n throw new InvalidComponentInterfaceError(\n Object.keys(IncentiveByComponentInterface) as Hex[],\n interfaceId as Hex,\n );\n }\n return new Ctor(options, address);\n}\n"],"names":["_ERC20PeggedIncentive","DeployableTarget","erc20PeggedIncentiveAbi","params","readErc20PeggedIncentiveOwner","readErc20PeggedIncentiveCurrentReward","readErc20PeggedIncentiveClaims","readErc20PeggedIncentiveTotalClaimed","address","readErc20PeggedIncentiveClaimed","readErc20PeggedIncentiveAsset","readErc20PeggedIncentivePeg","readErc20PeggedIncentiveReward","readErc20PeggedIncentiveLimit","payload","request","result","simulateErc20PeggedIncentiveClaim","prepareClaimPayload","writeErc20PeggedIncentiveClaim","simulateErc20PeggedIncentiveClawback","writeErc20PeggedIncentiveClawback","readErc20PeggedIncentiveIsClaimable","readErc20PeggedIncentiveGetPeg","totalClaimed","limit","_payload","_options","options","bytecode","prepareERC20PeggedIncentivePayload","amount","encodeAbiParameters","rewardAmount","netAmount","zeroAddress","_a","_b","_c","claimData","boostClaimData","decodeAbiParameters","__vite_import_meta_env__","ERC20PeggedIncentiveBases","RegistryType","ERC20PeggedIncentive","asset","peg","reward","manager","IncentiveByComponentInterface","APointsIncentive","PointsIncentive","AERC20Incentive","ERC20Incentive","AERC20PeggedVariableCriteriaIncentive","ERC20PeggedVariableCriteriaIncentive","AERC20PeggedVariableCriteriaIncentiveV2","ERC20PeggedVariableCriteriaIncentiveV2","AERC20PeggedIncentive","AAllowListIncentive","AllowListIncentive","ACGDAIncentive","CGDAIncentive","AERC20VariableIncentive","ERC20VariableIncentive","AERC20VariableCriteriaIncentiveV2","ERC20VariableCriteriaIncentiveV2","AERC20VariableCriteriaIncentive","ERC20VariableCriteriaIncentive","incentiveFromAddress","interfaceId","readContract","aIncentiveAbi","Ctor","InvalidComponentInterfaceError"],"mappings":"uwfA2GaA,EAAN,MAAMA,UAA6BC,EAAAA,gBAGxC,CAHK,aAAA,CAAA,MAAA,GAAA,SAAA,EAIL,KAAyB,IAAMC,GAAA,CA+B/B,MAAa,MAAMC,EAAqB,CAC/B,OAAA,MAAMC,EAAAA,GAA8B,KAAK,QAAS,CACvD,QAAS,KAAK,mBAAmB,EACjC,KAAM,CAAC,EAEP,GAAID,CAAA,CACL,CACH,CAUA,MAAa,cAAcA,EAAqB,CACvC,OAAA,MAAME,EAAAA,GAAsC,KAAK,QAAS,CAC/D,QAAS,KAAK,mBAAmB,EACjC,KAAM,CAAC,EAEP,GAAIF,CAAA,CACL,CACH,CAUA,MAAa,OAAOA,EAAqB,CAChC,OAAA,MAAMG,EAAAA,GAA+B,KAAK,QAAS,CACxD,QAAS,KAAK,mBAAmB,EACjC,KAAM,CAAC,EAEP,GAAIH,CAAA,CACL,CACH,CAUA,MAAa,aAAaA,EAAqB,CACtC,OAAA,MAAMI,EAAAA,GAAqC,KAAK,QAAS,CAC9D,QAAS,K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QAAS,EAClC,CAAE,KAAM,UAAW,KAAM,OAAQ,EACjC,CAAE,KAAM,UAAW,KAAM,SAAU,CACrC,EACA,CAACc,EAAOC,EAAKC,EAAQvB,EAAOwB,CAAO,CAAA,CAEvC,CC1eO,MAAMC,EAAgC,CAC3C,CAACC,EAAuB,gBAAA,EAAGC,EAAA,gBAC3B,CAACC,EAAsB,eAAA,EAAGC,EAAA,eAC1B,CAACC,EAA4C,qCAAA,EAC3CC,EAAA,qCACF,CAACC,EAA8C,uCAAA,EAC7CC,EAAA,uCACF,CAACC,EAA4B,qBAAA,EAAGd,EAChC,CAACe,EAAmB,mBAAA,EAAGC,EAAA,mBAEvB,CAACC,EAAqB,cAAA,EAAGC,EAAA,cACzB,CAACC,EAA8B,uBAAA,EAAGC,EAAA,uBAClC,CAACC,EAAwC,iCAAA,EAAGC,EAAA,iCAC5C,CAACC,EAAsC,+BAAA,EAAGC,EAAA,8BAC5C,EAYsB,eAAAC,EACpB1C,EACApB,EACAL,EACA,CACA,MAAMoE,EAAe,MAAMC,eAAa5C,EAAQ,OAAQ,CACtD,IAAK6C,EAAA,GACL,aAAc,wBACd,QAAAjE,EACA,GAAGL,CAAA,CACJ,EACKuE,EAAOxB,EAA8BqB,CAAW,EACtD,GAAI,CAACG,EACH,MAAM,IAAIC,EAAA,+BACR,OAAO,KAAKzB,CAA6B,EACzCqB,CAAA,EAGG,OAAA,IAAIG,EAAK9C,EAASpB,CAAO,CAClC"}
1
+ {"version":3,"file":"Incentive-CrnbYN_a.cjs","sources":["../src/Incentives/ERC20PeggedIncentive.ts","../src/Incentives/Incentive.ts"],"sourcesContent":["import {\n erc20PeggedIncentiveAbi,\n readErc20PeggedIncentiveAsset,\n readErc20PeggedIncentiveClaimed,\n readErc20PeggedIncentiveClaims,\n readErc20PeggedIncentiveCurrentReward,\n readErc20PeggedIncentiveGetPeg,\n readErc20PeggedIncentiveIsClaimable,\n readErc20PeggedIncentiveLimit,\n readErc20PeggedIncentiveOwner,\n readErc20PeggedIncentivePeg,\n readErc20PeggedIncentiveReward,\n readErc20PeggedIncentiveTotalClaimed,\n simulateErc20PeggedIncentiveClaim,\n simulateErc20PeggedIncentiveClawback,\n writeErc20PeggedIncentiveClaim,\n writeErc20PeggedIncentiveClawback,\n} from '@boostxyz/evm';\nimport { bytecode } from '@boostxyz/evm/artifacts/contracts/incentives/ERC20PeggedIncentive.sol/ERC20PeggedIncentive.json';\nimport {\n type Address,\n type ContractEventName,\n type Hex,\n decodeAbiParameters,\n encodeAbiParameters,\n zeroAddress,\n} from 'viem';\nimport { ERC20PeggedIncentive as ERC20PeggedIncentiveBases } 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 { erc20PeggedIncentiveAbi };\n\n/**\n * The object representation of a `ERC20PeggedIncentive.InitPayload`\n *\n * @export\n * @interface ERC20PeggedIncentivePayload\n * @typedef {ERC20PeggedIncentivePayload}\n */\nexport interface ERC20PeggedIncentivePayload {\n /**\n * The address of the incentivized asset.\n *\n * @type {Address}\n */\n asset: Address;\n /**\n * The peg to normalize to.\n *\n * @type {Address}\n */\n peg: Address;\n /**\n * The amount of the asset to distribute.\n *\n * @type {bigint}\n */\n reward: bigint;\n /**\n * Total spend for the incentive.\n *\n * @type {bigint}\n */\n limit: bigint;\n /**\n * (Optional) The address of the entity that can managed the incentive.\n *\n * @type {Address}\n * @optional\n */\n manager?: Address;\n}\n\n/**\n * A generic `viem.Log` event with support for `ERC20PeggedIncentive` event types.\n *\n * @export\n * @typedef {ERC20PeggedIncentiveLog}\n * @template {ContractEventName<typeof erc20PeggedIncentiveAbi>} [event=ContractEventName<\n * typeof erc20PeggedIncentiveAbi\n * >]\n */\nexport type ERC20PeggedIncentiveLog<\n event extends ContractEventName<\n typeof erc20PeggedIncentiveAbi\n > = ContractEventName<typeof erc20PeggedIncentiveAbi>,\n> = GenericLog<typeof erc20PeggedIncentiveAbi, event>;\n\n/**\n * A simple ERC20 incentive implementation that allows claiming of tokens\n *\n * @export\n * @class ERC20PeggedIncentive\n * @typedef {ERC20PeggedIncentive}\n * @extends {DeployableTarget<ERC20PeggedIncentivePayload>}\n */\nexport class ERC20PeggedIncentive extends DeployableTarget<\n ERC20PeggedIncentivePayload,\n typeof erc20PeggedIncentiveAbi\n> {\n public override readonly abi = erc20PeggedIncentiveAbi;\n /**\n * @inheritdoc\n *\n * @public\n * @static\n * @type {Record<number, Address>}\n */\n public static override bases: Record<number, Address> = {\n ...(import.meta.env?.VITE_ERC20_INCENTIVE_BASE\n ? { 31337: import.meta.env.VITE_ERC20_INCENTIVE_BASE }\n : {}),\n ...(ERC20PeggedIncentiveBases 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 owner of the incentive\n *\n * @public\n * @async\n * @param {?ReadParams} [params]\n * @returns {Promise<Address>}\n */\n public async owner(params?: ReadParams) {\n return await readErc20PeggedIncentiveOwner(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 * Calculates the current reward based on the time since the last claim. The reward is calculated based on the time since the last claim, the available budget, and the reward parameters. It increases linearly over time in the absence of claims, with each hour adding `rewardBoost` to the current reward, up to the available budget. For example, if there is one claim in the first hour, then no claims for three hours, the claimable reward would be `initialReward - rewardDecay + (rewardBoost * 3)`\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 readErc20PeggedIncentiveCurrentReward(this._config, {\n address: this.assertValidAddress(),\n args: [],\n // biome-ignore lint/suspicious/noExplicitAny: Accept any shape of valid wagmi/viem parameters, wagmi does the same thing internally\n ...(params as any),\n });\n }\n\n /**\n * The number of claims that have been made\n *\n * @public\n * @async\n * @param {?ReadParams} [params]\n * @returns {Promise<bigint>}\n */\n public async claims(params?: ReadParams) {\n return await readErc20PeggedIncentiveClaims(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 total amount of rewards claimed\n *\n * @public\n * @async\n * @param {?ReadParams} [params]\n * @returns {Promise<bigint>}\n */\n public async totalClaimed(params?: ReadParams) {\n return await readErc20PeggedIncentiveTotalClaimed(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 readErc20PeggedIncentiveClaimed(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 ERC20-like token\n *\n * @public\n * @async\n * @param {?ReadParams} [params]\n * @returns {Promise<Address>}\n */\n public async asset(params?: ReadParams) {\n return await readErc20PeggedIncentiveAsset(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 address of the pegged ERC20-like token\n *\n * @public\n * @async\n * @param {?ReadParams} [params]\n * @returns {Promise<Address>}\n */\n public async peg(params?: ReadParams) {\n return await readErc20PeggedIncentivePeg(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 reward amount issued for each claim\n *\n * @public\n * @async\n * @param {?ReadParams} [params]\n * @returns {Promise<bigint>}\n */\n public async reward(params?: ReadParams) {\n return await readErc20PeggedIncentiveReward(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 limit (max possible rewards payout in reward token)\n *\n * @public\n * @async\n * @param {?ReadParams} [params]\n * @returns {Promise<bigint>}\n */\n public async limit(params?: ReadParams) {\n return await readErc20PeggedIncentiveLimit(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>} - Returns true if 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; }>} - Returns true if successfully claimed\n */\n protected async claimRaw(payload: ClaimPayload, params?: WriteParams) {\n const { request, result } = await simulateErc20PeggedIncentiveClaim(\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 writeErc20PeggedIncentiveClaim(this._config, request);\n return { hash, result };\n }\n\n /**\n * Clawback assets from the incentive\n *\n * @public\n * @async\n * @param {ClaimPayload} payload\n * @param {?WriteParams} [params]\n * @returns {Promise<boolean>} - True if the assets were successfully clawbacked\n */\n public async clawback(payload: ClaimPayload, params?: WriteParams) {\n return await this.awaitResult(this.clawbackRaw(payload, params));\n }\n\n /**\n * Clawback assets from 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 assets were successfully clawbacked\n */\n public async clawbackRaw(payload: ClaimPayload, params?: WriteParams) {\n const { request, result } = await simulateErc20PeggedIncentiveClawback(\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 writeErc20PeggedIncentiveClawback(this._config, request);\n return { hash, result };\n }\n\n /**\n * Check if an incentive is claimable.\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 readErc20PeggedIncentiveIsClaimable(this._config, {\n address: this.assertValidAddress(),\n args: [payload.target, payload.data],\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 * read the peg token for the incentive.\n *\n * @public\n * @async\n * @param {?ReadParams} [params]\n * @returns {Promise<Address>} = The address of the token the reward is pegged to\n */\n public async getPeg(params?: ReadParams) {\n return await readErc20PeggedIncentiveGetPeg(this._config, {\n address: this.assertValidAddress(),\n args: [],\n // biome-ignore lint/suspicious/noExplicitAny: Accept any shape of valid wagmi/viem parameters, wagmi does the same thing internally\n ...(params as any),\n });\n }\n\n /**\n * Get the maximum amount that can be claimed by this incentive. Useful when used in conjunction with `BoostCore.calculateProtocolFee`\n *\n * @public\n * @async\n * @param {?ReadParams} [params]\n * @returns {Promise<bigint>} = Return a bigint representing that maximum amount that can be distributed by this incentive.\n */\n public async getTotalBudget(params?: ReadParams) {\n return await this.limit(params);\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 [totalClaimed, limit] = await Promise.all([\n this.totalClaimed(params),\n this.limit(params),\n ]);\n return limit - totalClaimed;\n }\n\n /**\n * @inheritdoc\n *\n * @public\n * @param {?ERC20PeggedIncentivePayload} [_payload]\n * @param {?DeployableOptions} [_options]\n * @returns {GenericDeployableParams}\n */\n public override buildParameters(\n _payload?: ERC20PeggedIncentivePayload,\n _options?: DeployableOptions,\n ): GenericDeployableParams {\n const [payload, options] = this.validateDeploymentConfig(\n _payload,\n _options,\n );\n return {\n abi: erc20PeggedIncentiveAbi,\n bytecode: bytecode as Hex,\n args: [prepareERC20PeggedIncentivePayload(payload)],\n ...this.optionallyAttachAccount(options.account),\n };\n }\n\n /**\n * Encodes an amount to clawback from the incentive\n *\n * @public\n * @param {bigint} amount - How much of the asset to clawback\n * @returns {Hex} - Returns an encoded uint256\n */\n public buildClawbackData(amount: bigint) {\n return encodeAbiParameters([{ type: 'uint256' }], [amount]);\n }\n\n /**\n * Builds the claim data for the ERC20PeggedIncentive.\n *\n * @public\n * @param {bigint} rewardAmount\n * @returns {Hash} Returns the encoded claim data\n * @description This function returns the encoded claim data for the ERC20PeggedIncentive.\n */\n public buildClaimData(rewardAmount: bigint) {\n return encodeAbiParameters(\n [{ type: 'uint256', name: 'rewardAmount' }],\n [rewardAmount],\n );\n }\n /**\n * Generates a top-up payload for the ERC20PeggedIncentive contract by incrementing\n * the existing `limit` field by `netAmount`. The entire payload is then re-encoded\n * via `prepareERC20PeggedIncentivePayload(...)`.\n *\n * @public\n * @param {bigint} netAmount - The additional limit to add to this incentive.\n * @returns {Hex} The ABI-encoded payload with the updated `limit`.\n */\n public async getTopupPayload(netAmount: bigint): Promise<Hex> {\n return prepareERC20PeggedIncentivePayload({\n asset: (await this.asset()) ?? zeroAddress,\n peg: this.payload?.peg ?? zeroAddress,\n reward: this.payload?.reward ?? 0n,\n limit: netAmount,\n manager: this.payload?.manager ?? zeroAddress,\n });\n }\n\n /**\n * Decodes claim data for the ERC20PeggedIncentive, returning the claim amount.\n * Useful when deriving amount claimed from logs.\n *\n * @public\n * @param {Hex} claimData\n * @returns {bigint} Returns the reward amount from a claim data payload\n */\n public decodeClaimData(claimData: Hex) {\n const boostClaimData = decodeAbiParameters(\n [\n {\n type: 'tuple',\n name: 'BoostClaimData',\n components: [\n { type: 'bytes', name: 'validatorData' },\n { type: 'bytes', name: 'incentiveData' },\n ],\n },\n ],\n claimData,\n );\n const signedAmount = decodeAbiParameters(\n [{ type: 'uint256' }],\n boostClaimData[0].incentiveData,\n )[0];\n return signedAmount;\n }\n}\n\n/**\n * Given a {@link ERC20PeggedIncentivePayload}, properly encode a `ERC20PeggedIncentive.InitPayload` for use with {@link ERC20PeggedIncentive} initialization.\n *\n * @param {ERC20PeggedIncentivePayload} param0\n * @param {Address} param0.asset - The address of the incentivized asset.\n * @param {Address} param0.peg - The peg to normalize to.\n * @param {bigint} param0.reward - The amount of the asset to distribute.\n * @param {bigint} param0.limit - How many times can this incentive be claimed.\n * @param {Address} [param0.manager=zeroAddress] - The entity that can manage the incentive.\n * @returns {Hex}\n */\nexport function prepareERC20PeggedIncentivePayload({\n asset,\n peg,\n reward,\n limit,\n manager = zeroAddress,\n}: ERC20PeggedIncentivePayload) {\n return encodeAbiParameters(\n [\n { type: 'address', name: 'asset' },\n { type: 'address', name: 'peg' },\n { type: 'uint256', name: 'reward' },\n { type: 'uint256', name: 'limit' },\n { type: 'address', name: 'manager' },\n ],\n [asset, peg, reward, limit, manager],\n );\n}\n","import { aIncentiveAbi } from '@boostxyz/evm';\nimport {\n AAllowListIncentive,\n ACGDAIncentive,\n AERC20Incentive,\n AERC20PeggedIncentive,\n AERC20PeggedVariableCriteriaIncentive,\n AERC20PeggedVariableCriteriaIncentiveV2,\n AERC20VariableCriteriaIncentive,\n AERC20VariableCriteriaIncentiveV2,\n AERC20VariableIncentive,\n // AERC20VariableCriteriaIncentive\n APointsIncentive,\n} from '@boostxyz/evm/deploys/componentInterfaces.json';\nimport { readContract } from '@wagmi/core';\nimport type { Address, Hex } from 'viem';\nimport type { DeployableOptions } from '../Deployable/Deployable';\nimport { InvalidComponentInterfaceError } from '../errors';\nimport type { ReadParams } from '../utils';\nimport { AllowListIncentive } from './AllowListIncentive';\nimport { CGDAIncentive } from './CGDAIncentive';\nimport { ERC20Incentive } from './ERC20Incentive';\nimport { ERC20PeggedIncentive } from './ERC20PeggedIncentive';\nimport { ERC20PeggedVariableCriteriaIncentive } from './ERC20PeggedVariableCriteriaIncentive';\nimport { ERC20PeggedVariableCriteriaIncentiveV2 } from './ERC20PeggedVariableCriteriaIncentiveV2';\nimport { ERC20VariableCriteriaIncentive } from './ERC20VariableCriteriaIncentive';\nimport { ERC20VariableCriteriaIncentiveV2 } from './ERC20VariableCriteriaIncentiveV2';\nimport { ERC20VariableIncentive } from './ERC20VariableIncentive';\n// import { ERC1155Incentive } from './ERC1155Incentive';\nimport { PointsIncentive } from './PointsIncentive';\n\nexport {\n AllowListIncentive,\n CGDAIncentive,\n // ERC1155Incentive,\n ERC20Incentive,\n ERC20PeggedIncentive,\n ERC20PeggedVariableCriteriaIncentive,\n ERC20PeggedVariableCriteriaIncentiveV2,\n PointsIncentive,\n ERC20VariableIncentive,\n ERC20VariableCriteriaIncentive,\n ERC20VariableCriteriaIncentiveV2,\n};\n\n/**\n * A union type representing all valid protocol Incentive implementations\n *\n * @export\n * @typedef {Incentive}\n */\nexport type Incentive =\n | AllowListIncentive\n | CGDAIncentive\n | ERC20Incentive\n // | ERC1155Incentive\n | ERC20PeggedIncentive\n | ERC20PeggedVariableCriteriaIncentive\n | ERC20PeggedVariableCriteriaIncentiveV2\n | PointsIncentive\n | ERC20VariableIncentive\n | ERC20VariableCriteriaIncentive\n | ERC20VariableCriteriaIncentiveV2;\n\n/**\n * A map of Incentive component interfaces to their constructors.\n *\n * @type {{ \"0xc5b24b8e\": typeof PointsIncentive; \"0x8c901437\": typeof ERC20Incentive; \"0x4414fbb4\": typeof ERC20PeggedIncentive; \"0xf60c99c9\": typeof ERC20PeggedVariableCriteriaIncentiveV2; \"0x56586338\": typeof AllowListIncentive; \"0xa39e44d9\": typeof CGDAIncentive; \"0xa8e4af1e\": typeof ERC20VariableIncentive; \"0x90318111\": typeof ERC20VariableCriteriaIncentiveV2 }}\n */\nexport const IncentiveByComponentInterface = {\n [APointsIncentive as Hex]: PointsIncentive,\n [AERC20Incentive as Hex]: ERC20Incentive,\n [AERC20PeggedVariableCriteriaIncentive as Hex]:\n ERC20PeggedVariableCriteriaIncentive,\n [AERC20PeggedVariableCriteriaIncentiveV2 as Hex]:\n ERC20PeggedVariableCriteriaIncentiveV2,\n [AERC20PeggedIncentive as Hex]: ERC20PeggedIncentive,\n [AAllowListIncentive]: AllowListIncentive,\n // [AERC1155Incentive as Hex]: ERC1155Incentive,\n [ACGDAIncentive as Hex]: CGDAIncentive,\n [AERC20VariableIncentive as Hex]: ERC20VariableIncentive,\n [AERC20VariableCriteriaIncentiveV2 as Hex]: ERC20VariableCriteriaIncentiveV2,\n [AERC20VariableCriteriaIncentive as Hex]: ERC20VariableCriteriaIncentive,\n};\n\n/**\n * A function that will read a contract's component interface using `getComponentInterface` and return the correct instantiated instance.\n *\n * @export\n * @async\n * @param {DeployableOptions} options\n * @param {Address} address\n * @returns {Incentive}\n * @throws {@link InvalidComponentInterfaceError}\n */\nexport async function incentiveFromAddress(\n options: DeployableOptions,\n address: Address,\n params?: ReadParams,\n) {\n const interfaceId = (await readContract(options.config, {\n abi: aIncentiveAbi,\n functionName: 'getComponentInterface',\n address,\n ...params,\n })) as keyof typeof IncentiveByComponentInterface;\n const Ctor = IncentiveByComponentInterface[interfaceId];\n if (!Ctor) {\n throw new InvalidComponentInterfaceError(\n Object.keys(IncentiveByComponentInterface) as Hex[],\n interfaceId as Hex,\n );\n }\n return new Ctor(options, address);\n}\n"],"names":["_ERC20PeggedIncentive","DeployableTarget","erc20PeggedIncentiveAbi","params","readErc20PeggedIncentiveOwner","readErc20PeggedIncentiveCurrentReward","readErc20PeggedIncentiveClaims","readErc20PeggedIncentiveTotalClaimed","address","readErc20PeggedIncentiveClaimed","readErc20PeggedIncentiveAsset","readErc20PeggedIncentivePeg","readErc20PeggedIncentiveReward","readErc20PeggedIncentiveLimit","payload","request","result","simulateErc20PeggedIncentiveClaim","prepareClaimPayload","writeErc20PeggedIncentiveClaim","simulateErc20PeggedIncentiveClawback","writeErc20PeggedIncentiveClawback","readErc20PeggedIncentiveIsClaimable","readErc20PeggedIncentiveGetPeg","totalClaimed","limit","_payload","_options","options","bytecode","prepareERC20PeggedIncentivePayload","amount","encodeAbiParameters","rewardAmount","netAmount","zeroAddress","_a","_b","_c","claimData","boostClaimData","decodeAbiParameters","__vite_import_meta_env__","ERC20PeggedIncentiveBases","RegistryType","ERC20PeggedIncentive","asset","peg","reward","manager","IncentiveByComponentInterface","APointsIncentive","PointsIncentive","AERC20Incentive","ERC20Incentive","AERC20PeggedVariableCriteriaIncentive","ERC20PeggedVariableCriteriaIncentive","AERC20PeggedVariableCriteriaIncentiveV2","ERC20PeggedVariableCriteriaIncentiveV2","AERC20PeggedIncentive","AAllowListIncentive","AllowListIncentive","ACGDAIncentive","CGDAIncentive","AERC20VariableIncentive","ERC20VariableIncentive","AERC20VariableCriteriaIncentiveV2","ERC20VariableCriteriaIncentiveV2","AERC20VariableCriteriaIncentive","ERC20VariableCriteriaIncentive","incentiveFromAddress","interfaceId","readContract","aIncentiveAbi","Ctor","InvalidComponentInterfaceError"],"mappings":"uwfA2GaA,EAAN,MAAMA,UAA6BC,EAAAA,gBAGxC,CAHK,aAAA,CAAA,MAAA,GAAA,SAAA,EAIL,KAAyB,IAAMC,GAAA,CA+B/B,MAAa,MAAMC,EAAqB,CAC/B,OAAA,MAAMC,EAAAA,GAA8B,KAAK,QAAS,CACvD,QAAS,KAAK,mBAAmB,EACjC,KAAM,CAAC,EAEP,GAAID,CAAA,CACL,CACH,CAUA,MAAa,cAAcA,EAAqB,CACvC,OAAA,MAAME,EAAAA,GAAsC,KAAK,QAAS,CAC/D,QAAS,KAAK,mBAAmB,EACjC,KAAM,CAAC,EAEP,GAAIF,CAAA,CACL,CACH,CAUA,MAAa,OAAOA,EAAqB,CAChC,OAAA,MAAMG,EAAAA,GAA+B,KAAK,QAAS,CACxD,QAAS,KAAK,mBAAmB,EACjC,KAAM,CAAC,EAEP,GAAIH,CAAA,CACL,CACH,CAUA,MAAa,aAAaA,EAAqB,CACtC,OAAA,MAAMI,EAAAA,GAAqC,KAAK,QAAS,CAC9D,QAAS,KAAK,mBAAmB,EACjC,KAAM,CAAC,EAEP,GAAIJ,CAAA,CACL,CACH,CAWA,MAAa,QAAQK,EAAkBL,EAAqB,CACnD,OAAA,MAAMM,EAAAA,GAAgC,KAAK,QAAS,CACzD,QAAS,KAAK,mBAAmB,EACjC,KAAM,CAACD,CAAO,EAEd,GAAIL,CAAA,CACL,CACH,CAUA,MAAa,MAAMA,EAAqB,CAC/B,OAAA,MAAMO,EAAAA,GAA8B,KAAK,QAAS,CACvD,QAAS,KAAK,mBAAmB,EAEjC,GAAIP,CAAA,CACL,CACH,CAUA,MAAa,IAAIA,EAAqB,CAC7B,OAAA,MAAMQ,EAAAA,GAA4B,KAAK,QAAS,CACrD,QAAS,KAAK,mBAAmB,EAEjC,GAAIR,CAAA,CACL,CACH,CAUA,MAAa,OAAOA,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AAwC,iCAAA,EAAGC,EAAA,iCAC5C,CAACC,EAAsC,+BAAA,EAAGC,EAAA,8BAC5C,EAYsB,eAAAC,EACpB1C,EACApB,EACAL,EACA,CACA,MAAMoE,EAAe,MAAMC,eAAa5C,EAAQ,OAAQ,CACtD,IAAK6C,EAAA,GACL,aAAc,wBACd,QAAAjE,EACA,GAAGL,CAAA,CACJ,EACKuE,EAAOxB,EAA8BqB,CAAW,EACtD,GAAI,CAACG,EACH,MAAM,IAAIC,EAAA,+BACR,OAAO,KAAKzB,CAA6B,EACzCqB,CAAA,EAGG,OAAA,IAAIG,EAAK9C,EAASpB,CAAO,CAClC"}
@@ -1,2 +1,2 @@
1
- "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const a=require("../generated-dd4FN0Fo.cjs"),d=require("viem"),l=require("../deployments-xekPSd2S.cjs");require("@wagmi/core");const o=require("../AllowLists/SimpleAllowList.cjs");require("../SimpleDenyList-Bv2mSQJO.cjs");const h=require("../Deployable/DeployableTarget.cjs"),u=require("../claiming.cjs"),g=require("../utils.cjs"),y="0x6080604052348015600e575f80fd5b5060156019565b607c565b63409feecd198054600181161560365763f92ee8a95f526004601cfd5b6001600160401b03808260011c146077578060011b8355806020527fc7f505b2f371ae2175ee4913f4499e1f2633a7b5936321eed1cdaeb6115181d2602080a15b505050565b610f75806100895f395ff3fe608060405260043610610162575f3560e01c8063715018a6116100c6578063c884ef831161007c578063f04e283e11610057578063f04e283e146103fd578063f2fde38b14610410578063fee81cf414610423575f80fd5b8063c884ef831461039b578063db09da12146103c9578063dcc59b6f146103e8575f80fd5b80638da5cb5b116100ac5780638da5cb5b14610334578063a4d66daf14610367578063bb1757cf1461037c575f80fd5b8063715018a61461030057806387b9d25c14610308575f80fd5b806338d52e0f1161011b578063474f5a4411610101578063474f5a44146102755780634e7165a2146102be57806354d1f13d146102f8575f80fd5b806338d52e0f1461020f578063439fab9114610256575f80fd5b8063228cb7331161014b578063228cb733146101b757806325692962146101cb57806328d6183b146101d5575f80fd5b806301ffc9a71461016657806307621eca1461019a575b5f80fd5b348015610171575f80fd5b50610185610180366004610bd8565b610454565b60405190151581526020015b60405180910390f35b3480156101a5575f80fd5b505f545b604051908152602001610191565b3480156101c2575f80fd5b506101a95f5481565b6101d36104af565b005b3480156101e0575f80fd5b506040517fc2c281ec000000000000000000000000000000000000000000000000000000008152602001610191565b34801561021a575f80fd5b5073deaddeaddeaddeaddeaddeaddeaddeaddeaddead5b60405173ffffffffffffffffffffffffffffffffffffffff9091168152602001610191565b348015610261575f80fd5b506101d3610270366004610c63565b6104fc565b348015610280575f80fd5b5061029461028f366004610c63565b6105ed565b6040805192835273ffffffffffffffffffffffffffffffffffffffff909116602083015201610191565b3480156102c9575f80fd5b506102eb6102d8366004610c63565b5050604080515f81526020810190915290565b6040516101919190610ca2565b6101d3610621565b6101d361065a565b348015610313575f80fd5b506001546102319073ffffffffffffffffffffffffffffffffffffffff1681565b34801561033f575f80fd5b507fffffffffffffffffffffffffffffffffffffffffffffffffffffffff7487392754610231565b348015610372575f80fd5b506101a960025481565b348015610387575f80fd5b50610185610396366004610d16565b61066d565b3480156103a6575f80fd5b506101856103b5366004610d67565b60036020525f908152604090205460ff1681565b3480156103d4575f80fd5b506101856103e3366004610d16565b6107e0565b3480156103f3575f80fd5b506101a960045481565b6101d361040b366004610d67565b6108ca565b6101d361041e366004610d67565b610907565b34801561042e575f80fd5b506101a961043d366004610d67565b63389a75e1600c9081525f91909152602090205490565b5f7fffffffff0000000000000000000000000000000000000000000000000000000082167fc2c281ec0000000000000000000000000000000000000000000000000000000014806104a957506104a98261092d565b92915050565b5f6202a30067ffffffffffffffff164201905063389a75e1600c52335f52806020600c2055337fdbf36a107da19e49527a7176a1babf963b4b0ff8cde35ee35d6cd8f1f9ac7e1d5f80a250565b7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffbf601132805460038255801561054d5760018160011c14303b106105445763f92ee8a95f526004601cfd5b818160ff1b1b91505b505f61055b83850185610d82565b905061056633610982565b8051600180547fffffffffffffffffffffffff00000000000000000000000000000000000000001673ffffffffffffffffffffffffffffffffffffffff9092169190911790556020015160025580156105e8576002815560016020527fc7f505b2f371ae2175ee4913f4499e1f2633a7b5936321eed1cdaeb6115181d2602080a15b505050565b5f806040517fd623472500000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b63389a75e1600c52335f525f6020600c2055337ffa7b8eab7da67f412cc9575ed43464468f9bfbae89d1675917346ca6d8fe3c925f80a2565b6106626109e5565b61066b5f610a1a565b565b5f6106766109e5565b60025460048054905f61068883610dff565b919050551015806106bd575073ffffffffffffffffffffffffffffffffffffffff84165f9081526003602052604090205460ff165b156106f4576040517f6247a84e00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b73ffffffffffffffffffffffffffffffffffffffff84165f90815260036020526040812080547fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff001660011790558061074b86610a7f565b6001546040517f3abb060400000000000000000000000000000000000000000000000000000000815292945090925073ffffffffffffffffffffffffffffffffffffffff1690633abb0604906107a79085908590600401610e5b565b5f604051808303815f87803b1580156107be575f80fd5b505af11580156107d0573d5f803e3d5ffd5b5060019998505050505050505050565b5f600254600454108015610819575073ffffffffffffffffffffffffffffffffffffffff84165f9081526003602052604090205460ff16155b80156108c25750600154604080517fe3f756de00000000000000000000000000000000000000000000000000000000815273ffffffffffffffffffffffffffffffffffffffff878116600483015260248201929092525f604482015291169063e3f756de90606401602060405180830381865afa15801561089c573d5f803e3d5ffd5b505050506040513d601f19601f820116820180604052508101906108c09190610ef3565b155b949350505050565b6108d26109e5565b63389a75e1600c52805f526020600c2080544211156108f857636f5e88185f526004601cfd5b5f905561090481610a1a565b50565b61090f6109e5565b8060601b61092457637448fbae5f526004601cfd5b61090481610a1a565b5f7fffffffff0000000000000000000000000000000000000000000000000000000082167fa92167050000000000000000000000000000000000000000000000000000000014806104a957506104a982610b42565b73ffffffffffffffffffffffffffffffffffffffff167fffffffffffffffffffffffffffffffffffffffffffffffffffffffff74873927819055805f7f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e08180a350565b7fffffffffffffffffffffffffffffffffffffffffffffffffffffffff7487392754331461066b576382b429005f526004601cfd5b7fffffffffffffffffffffffffffffffffffffffffffffffffffffffff74873927805473ffffffffffffffffffffffffffffffffffffffff9092169182907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e05f80a355565b60408051600180825281830190925260609182915f916020808301908036833750506040805160018082528183019092529293505f9291506020808301908036833701905050905084825f81518110610ada57610ada610f12565b602002602001019073ffffffffffffffffffffffffffffffffffffffff16908173ffffffffffffffffffffffffffffffffffffffff16815250506001815f81518110610b2857610b28610f12565b911515602092830291909101909101529094909350915050565b5f7fffffffff0000000000000000000000000000000000000000000000000000000082167f6ab67a0d0000000000000000000000000000000000000000000000000000000014806104a957507f01ffc9a7000000000000000000000000000000000000000000000000000000007fffffffff000000000000000000000000000000000000000000000000000000008316146104a9565b5f60208284031215610be8575f80fd5b81357fffffffff0000000000000000000000000000000000000000000000000000000081168114610c17575f80fd5b9392505050565b5f8083601f840112610c2e575f80fd5b50813567ffffffffffffffff811115610c45575f80fd5b602083019150836020828501011115610c5c575f80fd5b9250929050565b5f8060208385031215610c74575f80fd5b823567ffffffffffffffff811115610c8a575f80fd5b610c9685828601610c1e565b90969095509350505050565b602081525f82518060208401528060208501604085015e5f6040828501015260407fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0601f83011684010191505092915050565b73ffffffffffffffffffffffffffffffffffffffff81168114610904575f80fd5b5f805f60408486031215610d28575f80fd5b8335610d3381610cf5565b9250602084013567ffffffffffffffff811115610d4e575f80fd5b610d5a86828701610c1e565b9497909650939450505050565b5f60208284031215610d77575f80fd5b8135610c1781610cf5565b5f6040828403128015610d93575f80fd5b506040805190810167ffffffffffffffff81118282101715610ddc577f4e487b71000000000000000000000000000000000000000000000000000000005f52604160045260245ffd5b6040528235610dea81610cf5565b81526020928301359281019290925250919050565b5f7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff8203610e54577f4e487b71000000000000000000000000000000000000000000000000000000005f52601160045260245ffd5b5060010190565b604080825283519082018190525f9060208501906060840190835b81811015610eaa57835173ffffffffffffffffffffffffffffffffffffffff16835260209384019390920191600101610e76565b5050838103602080860191909152855180835291810192508501905f5b81811015610ee75782511515845260209384019390920191600101610ec7565b50919695505050505050565b5f60208284031215610f03575f80fd5b81518015158114610c17575f80fd5b7f4e487b71000000000000000000000000000000000000000000000000000000005f52603260045260245ffdfea264697066735822122078882949b606774e898c3e9d00e31c48ad33853e2fe0339ceb8db636fe54b7ea64736f6c634300081a0033",t={BASE_URL:"/",DEV:!1,MODE:"production",PROD:!0,SSR:!1,VITE_BOOST_MAINNET_SIGNER_EOA:"0xCBD0C302040bC803B4B2EDaF21Be0e49Deff5480",VITE_BOOST_TESTNET_SIGNER_EOA:"0xd63167e9db11B108940b2E8236581F961f33f396"},c=class c extends h.DeployableTarget{constructor(){super(...arguments),this.abi=a.q}async owner(f){return await a.hh(this._config,{address:this.assertValidAddress(),args:[],...f})}async claims(f){return await a.fh(this._config,{address:this.assertValidAddress(),args:[],...f})}async reward(f){return await a.Mh(this._config,{address:this.assertValidAddress(),args:[],...f})}async claimed(f,e){return await a.bh(this._config,{address:this.assertValidAddress(),args:[f],...e})}async allowList(f){const e=await a.ch(this._config,{address:this.assertValidAddress(),...f});return new o.SimpleAllowList({config:this._config,account:this._account},e)}async limit(f){return await a.Ah(this._config,{address:this.assertValidAddress(),...f})}async claim(f,e){return await this.awaitResult(this.claimRaw(f,e))}async claimRaw(f,e){const{request:b,result:s}=await a.Sh(this._config,{address:this.assertValidAddress(),args:[u.prepareClaimPayload(f)],...this.optionallyAttachAccount(),...e});return{hash:await a.Eh(this._config,b),result:s}}async isClaimable(f,e){return await a.gh(this._config,{address:this.assertValidAddress(),args:[f.target,"0x"],...e})}async canBeClaimed(f){return await this.getRemainingClaimPotential(f)>0n}async getRemainingClaimPotential(f){const[e,b]=await Promise.all([this.claims(f),this.limit(f)]);return b-e}buildParameters(f,e){const[b,s]=this.validateDeploymentConfig(f,e);return{abi:a.q,bytecode:y,args:[r(b)],...this.optionallyAttachAccount(s.account)}}getTopupPayload(f){var e;return d.encodeAbiParameters([{type:"address",name:"allowList"},{type:"uint256",name:"limit"}],[((e=this.payload)==null?void 0:e.allowList)??d.zeroHash,f])}buildClaimData(){return d.zeroHash}};c.bases={...t!=null&&t.VITE_ALLOWLIST_INCENTIVE_BASE?{31337:void 0}:{},...l.AllowListIncentive},c.registryType=g.RegistryType.INCENTIVE;let i=c;const r=({allowList:n,limit:f})=>d.encodeAbiParameters([{type:"address",name:"allowList"},{type:"uint256",name:"limit"}],[n,f]);exports.allowListIncentiveAbi=a.q;exports.AllowListIncentive=i;exports.prepareAllowListIncentivePayload=r;
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const a=require("../generated-dd4FN0Fo.cjs"),d=require("viem"),l=require("../deployments-BjBgk03b.cjs");require("@wagmi/core");const o=require("../AllowLists/SimpleAllowList.cjs");require("../SimpleDenyList-7-VTqfsH.cjs");const h=require("../Deployable/DeployableTarget.cjs"),u=require("../claiming.cjs"),g=require("../utils.cjs"),y="0x6080604052348015600e575f80fd5b5060156019565b607c565b63409feecd198054600181161560365763f92ee8a95f526004601cfd5b6001600160401b03808260011c146077578060011b8355806020527fc7f505b2f371ae2175ee4913f4499e1f2633a7b5936321eed1cdaeb6115181d2602080a15b505050565b610f75806100895f395ff3fe608060405260043610610162575f3560e01c8063715018a6116100c6578063c884ef831161007c578063f04e283e11610057578063f04e283e146103fd578063f2fde38b14610410578063fee81cf414610423575f80fd5b8063c884ef831461039b578063db09da12146103c9578063dcc59b6f146103e8575f80fd5b80638da5cb5b116100ac5780638da5cb5b14610334578063a4d66daf14610367578063bb1757cf1461037c575f80fd5b8063715018a61461030057806387b9d25c14610308575f80fd5b806338d52e0f1161011b578063474f5a4411610101578063474f5a44146102755780634e7165a2146102be57806354d1f13d146102f8575f80fd5b806338d52e0f1461020f578063439fab9114610256575f80fd5b8063228cb7331161014b578063228cb733146101b757806325692962146101cb57806328d6183b146101d5575f80fd5b806301ffc9a71461016657806307621eca1461019a575b5f80fd5b348015610171575f80fd5b50610185610180366004610bd8565b610454565b60405190151581526020015b60405180910390f35b3480156101a5575f80fd5b505f545b604051908152602001610191565b3480156101c2575f80fd5b506101a95f5481565b6101d36104af565b005b3480156101e0575f80fd5b506040517fc2c281ec000000000000000000000000000000000000000000000000000000008152602001610191565b34801561021a575f80fd5b5073deaddeaddeaddeaddeaddeaddeaddeaddeaddead5b60405173ffffffffffffffffffffffffffffffffffffffff9091168152602001610191565b348015610261575f80fd5b506101d3610270366004610c63565b6104fc565b348015610280575f80fd5b5061029461028f366004610c63565b6105ed565b6040805192835273ffffffffffffffffffffffffffffffffffffffff909116602083015201610191565b3480156102c9575f80fd5b506102eb6102d8366004610c63565b5050604080515f81526020810190915290565b6040516101919190610ca2565b6101d3610621565b6101d361065a565b348015610313575f80fd5b506001546102319073ffffffffffffffffffffffffffffffffffffffff1681565b34801561033f575f80fd5b507fffffffffffffffffffffffffffffffffffffffffffffffffffffffff7487392754610231565b348015610372575f80fd5b506101a960025481565b348015610387575f80fd5b50610185610396366004610d16565b61066d565b3480156103a6575f80fd5b506101856103b5366004610d67565b60036020525f908152604090205460ff1681565b3480156103d4575f80fd5b506101856103e3366004610d16565b6107e0565b3480156103f3575f80fd5b506101a960045481565b6101d361040b366004610d67565b6108ca565b6101d361041e366004610d67565b610907565b34801561042e575f80fd5b506101a961043d366004610d67565b63389a75e1600c9081525f91909152602090205490565b5f7fffffffff0000000000000000000000000000000000000000000000000000000082167fc2c281ec0000000000000000000000000000000000000000000000000000000014806104a957506104a98261092d565b92915050565b5f6202a30067ffffffffffffffff164201905063389a75e1600c52335f52806020600c2055337fdbf36a107da19e49527a7176a1babf963b4b0ff8cde35ee35d6cd8f1f9ac7e1d5f80a250565b7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffbf601132805460038255801561054d5760018160011c14303b106105445763f92ee8a95f526004601cfd5b818160ff1b1b91505b505f61055b83850185610d82565b905061056633610982565b8051600180547fffffffffffffffffffffffff00000000000000000000000000000000000000001673ffffffffffffffffffffffffffffffffffffffff9092169190911790556020015160025580156105e8576002815560016020527fc7f505b2f371ae2175ee4913f4499e1f2633a7b5936321eed1cdaeb6115181d2602080a15b505050565b5f806040517fd623472500000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b63389a75e1600c52335f525f6020600c2055337ffa7b8eab7da67f412cc9575ed43464468f9bfbae89d1675917346ca6d8fe3c925f80a2565b6106626109e5565b61066b5f610a1a565b565b5f6106766109e5565b60025460048054905f61068883610dff565b919050551015806106bd575073ffffffffffffffffffffffffffffffffffffffff84165f9081526003602052604090205460ff165b156106f4576040517f6247a84e00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b73ffffffffffffffffffffffffffffffffffffffff84165f90815260036020526040812080547fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff001660011790558061074b86610a7f565b6001546040517f3abb060400000000000000000000000000000000000000000000000000000000815292945090925073ffffffffffffffffffffffffffffffffffffffff1690633abb0604906107a79085908590600401610e5b565b5f604051808303815f87803b1580156107be575f80fd5b505af11580156107d0573d5f803e3d5ffd5b5060019998505050505050505050565b5f600254600454108015610819575073ffffffffffffffffffffffffffffffffffffffff84165f9081526003602052604090205460ff16155b80156108c25750600154604080517fe3f756de00000000000000000000000000000000000000000000000000000000815273ffffffffffffffffffffffffffffffffffffffff878116600483015260248201929092525f604482015291169063e3f756de90606401602060405180830381865afa15801561089c573d5f803e3d5ffd5b505050506040513d601f19601f820116820180604052508101906108c09190610ef3565b155b949350505050565b6108d26109e5565b63389a75e1600c52805f526020600c2080544211156108f857636f5e88185f526004601cfd5b5f905561090481610a1a565b50565b61090f6109e5565b8060601b61092457637448fbae5f526004601cfd5b61090481610a1a565b5f7fffffffff0000000000000000000000000000000000000000000000000000000082167fa92167050000000000000000000000000000000000000000000000000000000014806104a957506104a982610b42565b73ffffffffffffffffffffffffffffffffffffffff167fffffffffffffffffffffffffffffffffffffffffffffffffffffffff74873927819055805f7f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e08180a350565b7fffffffffffffffffffffffffffffffffffffffffffffffffffffffff7487392754331461066b576382b429005f526004601cfd5b7fffffffffffffffffffffffffffffffffffffffffffffffffffffffff74873927805473ffffffffffffffffffffffffffffffffffffffff9092169182907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e05f80a355565b60408051600180825281830190925260609182915f916020808301908036833750506040805160018082528183019092529293505f9291506020808301908036833701905050905084825f81518110610ada57610ada610f12565b602002602001019073ffffffffffffffffffffffffffffffffffffffff16908173ffffffffffffffffffffffffffffffffffffffff16815250506001815f81518110610b2857610b28610f12565b911515602092830291909101909101529094909350915050565b5f7fffffffff0000000000000000000000000000000000000000000000000000000082167f6ab67a0d0000000000000000000000000000000000000000000000000000000014806104a957507f01ffc9a7000000000000000000000000000000000000000000000000000000007fffffffff000000000000000000000000000000000000000000000000000000008316146104a9565b5f60208284031215610be8575f80fd5b81357fffffffff0000000000000000000000000000000000000000000000000000000081168114610c17575f80fd5b9392505050565b5f8083601f840112610c2e575f80fd5b50813567ffffffffffffffff811115610c45575f80fd5b602083019150836020828501011115610c5c575f80fd5b9250929050565b5f8060208385031215610c74575f80fd5b823567ffffffffffffffff811115610c8a575f80fd5b610c9685828601610c1e565b90969095509350505050565b602081525f82518060208401528060208501604085015e5f6040828501015260407fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0601f83011684010191505092915050565b73ffffffffffffffffffffffffffffffffffffffff81168114610904575f80fd5b5f805f60408486031215610d28575f80fd5b8335610d3381610cf5565b9250602084013567ffffffffffffffff811115610d4e575f80fd5b610d5a86828701610c1e565b9497909650939450505050565b5f60208284031215610d77575f80fd5b8135610c1781610cf5565b5f6040828403128015610d93575f80fd5b506040805190810167ffffffffffffffff81118282101715610ddc577f4e487b71000000000000000000000000000000000000000000000000000000005f52604160045260245ffd5b6040528235610dea81610cf5565b81526020928301359281019290925250919050565b5f7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff8203610e54577f4e487b71000000000000000000000000000000000000000000000000000000005f52601160045260245ffd5b5060010190565b604080825283519082018190525f9060208501906060840190835b81811015610eaa57835173ffffffffffffffffffffffffffffffffffffffff16835260209384019390920191600101610e76565b5050838103602080860191909152855180835291810192508501905f5b81811015610ee75782511515845260209384019390920191600101610ec7565b50919695505050505050565b5f60208284031215610f03575f80fd5b81518015158114610c17575f80fd5b7f4e487b71000000000000000000000000000000000000000000000000000000005f52603260045260245ffdfea264697066735822122078882949b606774e898c3e9d00e31c48ad33853e2fe0339ceb8db636fe54b7ea64736f6c634300081a0033",t={BASE_URL:"/",DEV:!1,MODE:"production",PROD:!0,SSR:!1,VITE_BOOST_MAINNET_SIGNER_EOA:"0xCBD0C302040bC803B4B2EDaF21Be0e49Deff5480",VITE_BOOST_TESTNET_SIGNER_EOA:"0xd63167e9db11B108940b2E8236581F961f33f396"},c=class c extends h.DeployableTarget{constructor(){super(...arguments),this.abi=a.q}async owner(f){return await a.hh(this._config,{address:this.assertValidAddress(),args:[],...f})}async claims(f){return await a.fh(this._config,{address:this.assertValidAddress(),args:[],...f})}async reward(f){return await a.Mh(this._config,{address:this.assertValidAddress(),args:[],...f})}async claimed(f,e){return await a.bh(this._config,{address:this.assertValidAddress(),args:[f],...e})}async allowList(f){const e=await a.ch(this._config,{address:this.assertValidAddress(),...f});return new o.SimpleAllowList({config:this._config,account:this._account},e)}async limit(f){return await a.Ah(this._config,{address:this.assertValidAddress(),...f})}async claim(f,e){return await this.awaitResult(this.claimRaw(f,e))}async claimRaw(f,e){const{request:b,result:s}=await a.Sh(this._config,{address:this.assertValidAddress(),args:[u.prepareClaimPayload(f)],...this.optionallyAttachAccount(),...e});return{hash:await a.Eh(this._config,b),result:s}}async isClaimable(f,e){return await a.gh(this._config,{address:this.assertValidAddress(),args:[f.target,"0x"],...e})}async canBeClaimed(f){return await this.getRemainingClaimPotential(f)>0n}async getRemainingClaimPotential(f){const[e,b]=await Promise.all([this.claims(f),this.limit(f)]);return b-e}buildParameters(f,e){const[b,s]=this.validateDeploymentConfig(f,e);return{abi:a.q,bytecode:y,args:[r(b)],...this.optionallyAttachAccount(s.account)}}getTopupPayload(f){var e;return d.encodeAbiParameters([{type:"address",name:"allowList"},{type:"uint256",name:"limit"}],[((e=this.payload)==null?void 0:e.allowList)??d.zeroHash,f])}buildClaimData(){return d.zeroHash}};c.bases={...t!=null&&t.VITE_ALLOWLIST_INCENTIVE_BASE?{31337:void 0}:{},...l.AllowListIncentive},c.registryType=g.RegistryType.INCENTIVE;let i=c;const r=({allowList:n,limit:f})=>d.encodeAbiParameters([{type:"address",name:"allowList"},{type:"uint256",name:"limit"}],[n,f]);exports.allowListIncentiveAbi=a.q;exports.AllowListIncentive=i;exports.prepareAllowListIncentivePayload=r;
2
2
  //# sourceMappingURL=AllowListIncentive.cjs.map
@@ -1,9 +1,9 @@
1
1
  import { q as c, an as o, ao as l, ap as h, aq as m, ar as u, as as p, at as g, au as y, av as w } from "../generated-B6mEIx8i.js";
2
2
  import { encodeAbiParameters as r, zeroHash as t } from "viem";
3
- import { A } from "../deployments-EFoHkvCp.js";
3
+ import { A } from "../deployments-CHQ30INq.js";
4
4
  import "@wagmi/core";
5
5
  import { SimpleAllowList as E } from "../AllowLists/SimpleAllowList.js";
6
- import "../SimpleDenyList-tEOqSTnD.js";
6
+ import "../SimpleDenyList-Dr03aOeP.js";
7
7
  import { DeployableTarget as T } from "../Deployable/DeployableTarget.js";
8
8
  import { prepareClaimPayload as V } from "../claiming.js";
9
9
  import { RegistryType as _ } from "../utils.js";
@@ -1,2 +1,2 @@
1
- "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const a=require("../generated-dd4FN0Fo.cjs"),t=require("viem"),h=require("../deployments-xekPSd2S.cjs"),y=require("../Deployable/DeployableTarget.cjs"),n=require("../claiming.cjs"),o=require("../utils.cjs"),g="0x6080604052348015600e575f80fd5b5060156019565b607c565b63409feecd198054600181161560365763f92ee8a95f526004601cfd5b6001600160401b03808260011c146077578060011b8355806020527fc7f505b2f371ae2175ee4913f4499e1f2633a7b5936321eed1cdaeb6115181d2602080a15b505050565b611b6f806100895f395ff3fe6080604052600436106101f5575f3560e01c806354d1f13d11610117578063c884ef83116100ac578063ec87621c1161007c578063f2fde38b11610062578063f2fde38b146105f8578063fe9fbb801461060b578063fee81cf41461062a575f80fd5b8063ec87621c146105d1578063f04e283e146105e5575f80fd5b8063c884ef8314610550578063db09da121461057e578063dcc213611461059d578063dcc59b6f146105bc575f80fd5b80638da5cb5b116100e75780638da5cb5b146104e5578063bb1757cf146104fd578063be4994f81461051c578063c78da39a1461053b575f80fd5b806354d1f13d1461047f578063715018a61461048757806375b238fc1461048f57806375ef18d0146104a3575f80fd5b80632de948071161018d578063474f5a441161015d578063474f5a44146103c25780634a4ee7b11461040b5780634e7165a21461041e578063514e62fc1461044a575f80fd5b80632de948071461030257806338d52e0f146103335780634359d28a14610384578063439fab91146103a3575f80fd5b80631cd64df4116101c85780631cd64df414610277578063228cb733146102ac57806325692962146102c057806328d6183b146102c8575f80fd5b806301ffc9a7146101f957806307621eca1461022d578063183a4f6e1461024f5780631c10893f14610264575b5f80fd5b348015610204575f80fd5b50610218610213366004611502565b61065b565b60405190151581526020015b60405180910390f35b348015610238575f80fd5b506102416106b6565b604051908152602001610224565b61026261025d366004611541565b610736565b005b610262610272366004611580565b610743565b348015610282575f80fd5b50610218610291366004611580565b638b78c6d8600c9081525f9290925260209091205481161490565b3480156102b7575f80fd5b506102415f5481565b610262610759565b3480156102d3575f80fd5b506040517f53cf8555000000000000000000000000000000000000000000000000000000008152602001610224565b34801561030d575f80fd5b5061024161031c3660046115a8565b638b78c6d8600c9081525f91909152602090205490565b34801561033e575f80fd5b5060075461035f9073ffffffffffffffffffffffffffffffffffffffff1681565b60405173ffffffffffffffffffffffffffffffffffffffff9091168152602001610224565b34801561038f575f80fd5b5061026261039e366004611609565b6107a6565b3480156103ae575f80fd5b506102626103bd3660046116b3565b6108a0565b3480156103cd575f80fd5b506103e16103dc3660046116b3565b610b63565b6040805192835273ffffffffffffffffffffffffffffffffffffffff909116602083015201610224565b610262610419366004611580565b610c90565b348015610429575f80fd5b5061043d6104383660046116b3565b610ca2565b6040516102249190611720565b348015610455575f80fd5b50610218610464366004611580565b638b78c6d8600c9081525f9290925260209091205416151590565b610262610d60565b610262610d99565b34801561049a575f80fd5b50610241600281565b3480156104ae575f80fd5b506002546003546004546005546104c59392919084565b604080519485526020850193909352918301526060820152608001610224565b3480156104f0575f80fd5b50638b78c6d8195461035f565b348015610508575f80fd5b50610218610517366004611732565b610dac565b348015610527575f80fd5b50610262610536366004611609565b610f82565b348015610546575f80fd5b5061024160065481565b34801561055b575f80fd5b5061021861056a3660046115a8565b60016020525f908152604090205460ff1681565b348015610589575f80fd5b50610218610598366004611732565b611020565b3480156105a8575f80fd5b506102626105b7366004611609565b611032565b3480156105c7575f80fd5b5061024160085481565b3480156105dc575f80fd5b50610241600181565b6102626105f33660046115a8565b6110d0565b6102626106063660046115a8565b61110a565b348015610616575f80fd5b506102186106253660046115a8565b611130565b348015610635575f80fd5b506102416106443660046115a8565b63389a75e1600c9081525f91909152602090205490565b5f7fffffffff0000000000000000000000000000000000000000000000000000000082167f53cf85550000000000000000000000000000000000000000000000000000000014806106b057506106b08261118f565b92915050565b6004545f9081906106c790426117ae565b6007549091505f906106ef9073ffffffffffffffffffffffffffffffffffffffff16306111e4565b90505f610e106002600101548461070691906117c1565b61071091906117d8565b60055461071d9190611810565b905081811161072c578061072e565b815b935050505090565b6107403382611217565b50565b61074b611222565b610755828261123c565b5050565b5f6202a30067ffffffffffffffff164201905063389a75e1600c52335f52806020600c2055337fdbf36a107da19e49527a7176a1babf963b4b0ff8cde35ee35d6cd8f1f9ac7e1d5f80a250565b60026107b181611248565b8382146107ea576040517fff633a3800000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b5f5b84811015610898575f84848381811061080757610807611823565b905060200201602081019061081c9190611850565b905080151560010361085e5761085987878481811061083d5761083d611823565b905060200201602081019061085291906115a8565b600161123c565b61088f565b61088f87878481811061087357610873611823565b905060200201602081019061088891906115a8565b6001611217565b506001016107ec565b505050505050565b7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffbf60113280546003825580156108f15760018160011c14303b106108e85763f92ee8a95f526004601cfd5b818160ff1b1b91505b505f6108ff838501856118f6565b80519091505f906109269073ffffffffffffffffffffffffffffffffffffffff16306111e4565b9050816080015181101561099757815160808301516040517f5c54305e00000000000000000000000000000000000000000000000000000000815273ffffffffffffffffffffffffffffffffffffffff90921660048301526024820183905260448201526064015b60405180910390fd5b602082015115806109aa57506040820151155b806109b757506060820151155b806109c9575081602001518260800151105b15610a00576040517ff92ee8a900000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b8151600780547fffffffffffffffffffffffff00000000000000000000000000000000000000001673ffffffffffffffffffffffffffffffffffffffff90921691909117905560408051608080820183528285015180835260608087015160208086018290524296860187905288015191909401819052600291909155600392909255600492909255600555820151600655610a9b33611279565b610aaa8260a0015160016112c1565b815f015173ffffffffffffffffffffffffffffffffffffffff167f2364e5ed5f8639e9bae046dc67aabf43f410e931f25143a10f5e1a8744ad717e8360200151846040015185606001518660800151604051610b1f949392919093845260208401929092526040830152606082015260800190565b60405180910390a250508015610b5e576002815560016020527fc7f505b2f371ae2175ee4913f4499e1f2633a7b5936321eed1cdaeb6115181d2602080a15b505050565b5f806001610b7081611248565b5f610b7d85870187611979565b90505f8160200151806020019051810190610b989190611a50565b8251600754919250610bc19173ffffffffffffffffffffffffffffffffffffffff169083611302565b81516007546040517fffffffffffffffffffffffffffffffffffffffff000000000000000000000000606092831b811660208301529183901b90911660348201526048810183905273ffffffffffffffffffffffffffffffffffffffff909116907f9ad2e7a4af16dceda9cce4274b2f59c328d8c012eb0e15eb5e1e73b7d8f264d39060680160408051601f1981840301815290829052610c6191611720565b60405180910390a260075490945073ffffffffffffffffffffffffffffffffffffffff16925050509250929050565b610c98611222565b6107558282611217565b60605f610cb1838501856118f6565b60408051608081019091529091508060018152602001825f015173ffffffffffffffffffffffffffffffffffffffff1681526020013073ffffffffffffffffffffffffffffffffffffffff16815260200160405180602001604052808460800151815250604051602001610d289151815260200190565b60408051601f19818403018152918152915251610d489190602001611a67565b60405160208183030381529060405291505092915050565b63389a75e1600c52335f525f6020600c2055337ffa7b8eab7da67f412cc9575ed43464468f9bfbae89d1675917346ca6d8fe3c925f80a2565b610da1611222565b610daa5f611355565b565b5f610db5611222565b610dbe8461139f565b610e1b57604080517f4139d81d00000000000000000000000000000000000000000000000000000000815273ffffffffffffffffffffffffffffffffffffffff8616600482015260248101919091525f604482015260640161098e565b73ffffffffffffffffffffffffffffffffffffffff84165f908152600160208190526040822080547fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff001690911790556008805491610e7883611b02565b91905055505f610e866106b6565b426004556002549091508111610e9e57600254610eab565b600254610eab90826117ae565b600555600754610ed29073ffffffffffffffffffffffffffffffffffffffff168683611302565b6007546040517fffffffffffffffffffffffffffffffffffffffff000000000000000000000000606092831b811660208301529187901b90911660348201526048810182905273ffffffffffffffffffffffffffffffffffffffff8616907f9ad2e7a4af16dceda9cce4274b2f59c328d8c012eb0e15eb5e1e73b7d8f264d39060680160408051601f1981840301815290829052610f6f91611720565b60405180910390a2506001949350505050565b6002610f8d81611248565b838214610fc6576040517fff633a3800000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b5f5b8481101561089857611018868683818110610fe557610fe5611823565b9050602002016020810190610ffa91906115a8565b85858481811061100c5761100c611823565b9050602002013561123c565b600101610fc8565b5f61102a8461139f565b949350505050565b600261103d81611248565b838214611076576040517fff633a3800000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b5f5b84811015610898576110c886868381811061109557611095611823565b90506020020160208101906110aa91906115a8565b8585848181106110bc576110bc611823565b90506020020135611217565b600101611078565b6110d8611222565b63389a75e1600c52805f526020600c2080544211156110fe57636f5e88185f526004601cfd5b5f905561074081611355565b611112611222565b8060601b61112757637448fbae5f526004601cfd5b61074081611355565b5f8173ffffffffffffffffffffffffffffffffffffffff16611155638b78c6d8195490565b73ffffffffffffffffffffffffffffffffffffffff1614806106b05750638b78c6d8600c9081525f839052602090205460031615156106b0565b5f7fffffffff0000000000000000000000000000000000000000000000000000000082167fa92167050000000000000000000000000000000000000000000000000000000014806106b057506106b082611415565b5f816014526f70a082310000000000000000000000005f5260208060246010865afa601f3d111660205102905092915050565b61075582825f6114ab565b638b78c6d819543314610daa576382b429005f526004601cfd5b610755828260016114ab565b638b78c6d81954331461074057638b78c6d8600c52335f52806020600c205416610740576382b429005f526004601cfd5b73ffffffffffffffffffffffffffffffffffffffff16638b78c6d819819055805f7f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e08180a350565b638b78c6d8600c52815f52806020600c205580600c5160601c7f715ad5ce61fc9595c7b415289d59cf203f23a94fa06f04af7e489a0a76e1fe265f80a35050565b81601452806034526fa9059cbb0000000000000000000000005f5260205f604460105f875af18060015f51141661134b57803d853b15171061134b576390b8ec185f526004601cfd5b505f603452505050565b638b78c6d819805473ffffffffffffffffffffffffffffffffffffffff9092169182907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e05f80a355565b5f806113a96106b6565b90505f811180156113dd575060075481906113da9073ffffffffffffffffffffffffffffffffffffffff16306111e4565b10155b801561140e575073ffffffffffffffffffffffffffffffffffffffff83165f9081526001602052604090205460ff16155b9392505050565b5f7fffffffff0000000000000000000000000000000000000000000000000000000082167f6ab67a0d0000000000000000000000000000000000000000000000000000000014806106b057507f01ffc9a7000000000000000000000000000000000000000000000000000000007fffffffff000000000000000000000000000000000000000000000000000000008316146106b0565b638b78c6d8600c52825f526020600c208054838117836114cc575080841681185b80835580600c5160601c7f715ad5ce61fc9595c7b415289d59cf203f23a94fa06f04af7e489a0a76e1fe265f80a3505050505050565b5f60208284031215611512575f80fd5b81357fffffffff000000000000000000000000000000000000000000000000000000008116811461140e575f80fd5b5f60208284031215611551575f80fd5b5035919050565b803573ffffffffffffffffffffffffffffffffffffffff8116811461157b575f80fd5b919050565b5f8060408385031215611591575f80fd5b61159a83611558565b946020939093013593505050565b5f602082840312156115b8575f80fd5b61140e82611558565b5f8083601f8401126115d1575f80fd5b50813567ffffffffffffffff8111156115e8575f80fd5b6020830191508360208260051b8501011115611602575f80fd5b9250929050565b5f805f806040858703121561161c575f80fd5b843567ffffffffffffffff811115611632575f80fd5b61163e878288016115c1565b909550935050602085013567ffffffffffffffff81111561165d575f80fd5b611669878288016115c1565b95989497509550505050565b5f8083601f840112611685575f80fd5b50813567ffffffffffffffff81111561169c575f80fd5b602083019150836020828501011115611602575f80fd5b5f80602083850312156116c4575f80fd5b823567ffffffffffffffff8111156116da575f80fd5b6116e685828601611675565b90969095509350505050565b5f81518084528060208401602086015e5f602082860101526020601f19601f83011685010191505092915050565b602081525f61140e60208301846116f2565b5f805f60408486031215611744575f80fd5b61174d84611558565b9250602084013567ffffffffffffffff811115611768575f80fd5b61177486828701611675565b9497909650939450505050565b7f4e487b71000000000000000000000000000000000000000000000000000000005f52601160045260245ffd5b818103818111156106b0576106b0611781565b80820281158282048414176106b0576106b0611781565b5f8261180b577f4e487b71000000000000000000000000000000000000000000000000000000005f52601260045260245ffd5b500490565b808201808211156106b0576106b0611781565b7f4e487b71000000000000000000000000000000000000000000000000000000005f52603260045260245ffd5b5f60208284031215611860575f80fd5b8135801515811461140e575f80fd5b7f4e487b71000000000000000000000000000000000000000000000000000000005f52604160045260245ffd5b6040805190810167ffffffffffffffff811182821017156118bf576118bf61186f565b60405290565b604051601f8201601f1916810167ffffffffffffffff811182821017156118ee576118ee61186f565b604052919050565b5f60c0828403128015611907575f80fd5b5060405160c0810167ffffffffffffffff8111828210171561192b5761192b61186f565b60405261193783611558565b81526020838101359082015260408084013590820152606080840135908201526080808401359082015261196d60a08401611558565b60a08201529392505050565b5f60208284031215611989575f80fd5b813567ffffffffffffffff81111561199f575f80fd5b8201604081850312156119b0575f80fd5b6119b861189c565b6119c182611558565b8152602082013567ffffffffffffffff8111156119dc575f80fd5b80830192505084601f8301126119f0575f80fd5b813567ffffffffffffffff811115611a0a57611a0a61186f565b611a1d6020601f19601f840116016118c5565b818152866020838601011115611a31575f80fd5b816020850160208301375f602092820183015290820152949350505050565b5f60208284031215611a60575f80fd5b5051919050565b602081525f825160038110611aa3577f4e487b71000000000000000000000000000000000000000000000000000000005f52602160045260245ffd5b8060208401525073ffffffffffffffffffffffffffffffffffffffff602084015116604083015273ffffffffffffffffffffffffffffffffffffffff6040840151166060830152606083015160808084015261102a60a08401826116f2565b5f7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff8203611b3257611b32611781565b506001019056fea2646970667358221220b907f524c00fc94c347789c150ead10c0b70a2de12eb7cada7da415e65dc020864736f6c634300081a0033",r={BASE_URL:"/",DEV:!1,MODE:"production",PROD:!0,SSR:!1,VITE_BOOST_MAINNET_SIGNER_EOA:"0xCBD0C302040bC803B4B2EDaF21Be0e49Deff5480",VITE_BOOST_TESTNET_SIGNER_EOA:"0xd63167e9db11B108940b2E8236581F961f33f396"},s=class s extends y.DeployableTarget{constructor(){super(...arguments),this.abi=a.z}async owner(f){return await a.zN(this._config,{address:this.assertValidAddress(),args:[],...f})}async claims(f){return await a.NN(this._config,{address:this.assertValidAddress(),args:[],...f})}async reward(f){return await a.xN(this._config,{address:this.assertValidAddress(),args:[],...f})}async claimed(f,b){return await a.IN(this._config,{address:this.assertValidAddress(),args:[f],...b})}async asset(f){return await a.AN(this._config,{address:this.assertValidAddress(),...f})}async cgdaParams(f){const[b,e,d,c]=await a.hN(this._config,{address:this.assertValidAddress(),...f});return{rewardDecay:b,rewardBoost:e,lastClaimTime:d,currentReward:c}}async totalBudget(f){return await a.SN(this._config,{address:this.assertValidAddress(),...f})}async claim(f,b){return await this.awaitResult(this.claimRaw(f,b))}async claimRaw(f,b){const{request:e,result:d}=await a.t5(this._config,{address:this.assertValidAddress(),args:[n.prepareClaimPayload(f)],...this.optionallyAttachAccount(),...b});return{hash:await a._N(this._config,e),result:d}}async clawback(f,b){return await this.awaitResult(this.clawbackRaw(f,b))}async clawbackRaw(f,b){const{request:e,result:d}=await a.n5(this._config,{address:this.assertValidAddress(),args:[n.prepareClaimPayload(f)],...this.optionallyAttachAccount(),...b});return{hash:await a.DN(this._config,e),result:d}}async isClaimable(f,b){return await a.VN(this._config,{address:this.assertValidAddress(),args:[f.target,f.data],...b})}async canBeClaimed(f){return await this.getRemainingClaimPotential(f)>0n}async getRemainingClaimPotential(f){const[b,e]=await Promise.all([this.currentReward(f),o.getErc20Balance(this._config,await this.asset(),this.assertValidAddress(),f)]);return e-b}async currentReward(f){return await a.MN(this._config,{address:this.assertValidAddress(),...f})}async getTotalBudget(f){var b;return((b=this.payload)==null?void 0:b.totalBudget)!==void 0?this.payload.totalBudget:await this.totalBudget(f)}buildParameters(f,b){const[e,d]=this.validateDeploymentConfig(f,b);return{abi:a.z,bytecode:g,args:[l(e)],...this.optionallyAttachAccount(d.account)}}buildClawbackData(f){return t.encodeAbiParameters([{type:"uint256"}],[f])}async getTopupPayload(f){var b,e,d,c;return t.encodeAbiParameters([{type:"address",name:"asset"},{type:"uint256",name:"initialReward"},{type:"uint256",name:"rewardDecay"},{type:"uint256",name:"rewardBoost"},{type:"uint256",name:"totalBudget"},{type:"address",name:"manager"}],[await this.asset()??t.zeroHash,((b=this.payload)==null?void 0:b.initialReward)??0n,((e=this.payload)==null?void 0:e.rewardDecay)??0n,((d=this.payload)==null?void 0:d.rewardBoost)??0n,f,((c=this.payload)==null?void 0:c.manager)??t.zeroHash])}buildClaimData(){return t.zeroHash}};s.bases={...r!=null&&r.VITE_CGDA_INCENTIVE_BASE?{31337:void 0}:{},...h.CGDAIncentive},s.registryType=o.RegistryType.INCENTIVE;let i=s;function l({asset:u,initialReward:f,rewardDecay:b,rewardBoost:e,totalBudget:d,manager:c}){return t.encodeAbiParameters([{type:"address",name:"asset"},{type:"uint256",name:"initialReward"},{type:"uint256",name:"rewardDecay"},{type:"uint256",name:"rewardBoost"},{type:"uint256",name:"totalBudget"},{type:"address",name:"manager"}],[u,f,b,e,d,c])}exports.cgdaIncentiveAbi=a.z;exports.CGDAIncentive=i;exports.prepareCGDAIncentivePayload=l;
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const a=require("../generated-dd4FN0Fo.cjs"),t=require("viem"),h=require("../deployments-BjBgk03b.cjs"),y=require("../Deployable/DeployableTarget.cjs"),n=require("../claiming.cjs"),o=require("../utils.cjs"),g="0x6080604052348015600e575f80fd5b5060156019565b607c565b63409feecd198054600181161560365763f92ee8a95f526004601cfd5b6001600160401b03808260011c146077578060011b8355806020527fc7f505b2f371ae2175ee4913f4499e1f2633a7b5936321eed1cdaeb6115181d2602080a15b505050565b611b6f806100895f395ff3fe6080604052600436106101f5575f3560e01c806354d1f13d11610117578063c884ef83116100ac578063ec87621c1161007c578063f2fde38b11610062578063f2fde38b146105f8578063fe9fbb801461060b578063fee81cf41461062a575f80fd5b8063ec87621c146105d1578063f04e283e146105e5575f80fd5b8063c884ef8314610550578063db09da121461057e578063dcc213611461059d578063dcc59b6f146105bc575f80fd5b80638da5cb5b116100e75780638da5cb5b146104e5578063bb1757cf146104fd578063be4994f81461051c578063c78da39a1461053b575f80fd5b806354d1f13d1461047f578063715018a61461048757806375b238fc1461048f57806375ef18d0146104a3575f80fd5b80632de948071161018d578063474f5a441161015d578063474f5a44146103c25780634a4ee7b11461040b5780634e7165a21461041e578063514e62fc1461044a575f80fd5b80632de948071461030257806338d52e0f146103335780634359d28a14610384578063439fab91146103a3575f80fd5b80631cd64df4116101c85780631cd64df414610277578063228cb733146102ac57806325692962146102c057806328d6183b146102c8575f80fd5b806301ffc9a7146101f957806307621eca1461022d578063183a4f6e1461024f5780631c10893f14610264575b5f80fd5b348015610204575f80fd5b50610218610213366004611502565b61065b565b60405190151581526020015b60405180910390f35b348015610238575f80fd5b506102416106b6565b604051908152602001610224565b61026261025d366004611541565b610736565b005b610262610272366004611580565b610743565b348015610282575f80fd5b50610218610291366004611580565b638b78c6d8600c9081525f9290925260209091205481161490565b3480156102b7575f80fd5b506102415f5481565b610262610759565b3480156102d3575f80fd5b506040517f53cf8555000000000000000000000000000000000000000000000000000000008152602001610224565b34801561030d575f80fd5b5061024161031c3660046115a8565b638b78c6d8600c9081525f91909152602090205490565b34801561033e575f80fd5b5060075461035f9073ffffffffffffffffffffffffffffffffffffffff1681565b60405173ffffffffffffffffffffffffffffffffffffffff9091168152602001610224565b34801561038f575f80fd5b5061026261039e366004611609565b6107a6565b3480156103ae575f80fd5b506102626103bd3660046116b3565b6108a0565b3480156103cd575f80fd5b506103e16103dc3660046116b3565b610b63565b6040805192835273ffffffffffffffffffffffffffffffffffffffff909116602083015201610224565b610262610419366004611580565b610c90565b348015610429575f80fd5b5061043d6104383660046116b3565b610ca2565b6040516102249190611720565b348015610455575f80fd5b50610218610464366004611580565b638b78c6d8600c9081525f9290925260209091205416151590565b610262610d60565b610262610d99565b34801561049a575f80fd5b50610241600281565b3480156104ae575f80fd5b506002546003546004546005546104c59392919084565b604080519485526020850193909352918301526060820152608001610224565b3480156104f0575f80fd5b50638b78c6d8195461035f565b348015610508575f80fd5b50610218610517366004611732565b610dac565b348015610527575f80fd5b50610262610536366004611609565b610f82565b348015610546575f80fd5b5061024160065481565b34801561055b575f80fd5b5061021861056a3660046115a8565b60016020525f908152604090205460ff1681565b348015610589575f80fd5b50610218610598366004611732565b611020565b3480156105a8575f80fd5b506102626105b7366004611609565b611032565b3480156105c7575f80fd5b5061024160085481565b3480156105dc575f80fd5b50610241600181565b6102626105f33660046115a8565b6110d0565b6102626106063660046115a8565b61110a565b348015610616575f80fd5b506102186106253660046115a8565b611130565b348015610635575f80fd5b506102416106443660046115a8565b63389a75e1600c9081525f91909152602090205490565b5f7fffffffff0000000000000000000000000000000000000000000000000000000082167f53cf85550000000000000000000000000000000000000000000000000000000014806106b057506106b08261118f565b92915050565b6004545f9081906106c790426117ae565b6007549091505f906106ef9073ffffffffffffffffffffffffffffffffffffffff16306111e4565b90505f610e106002600101548461070691906117c1565b61071091906117d8565b60055461071d9190611810565b905081811161072c578061072e565b815b935050505090565b6107403382611217565b50565b61074b611222565b610755828261123c565b5050565b5f6202a30067ffffffffffffffff164201905063389a75e1600c52335f52806020600c2055337fdbf36a107da19e49527a7176a1babf963b4b0ff8cde35ee35d6cd8f1f9ac7e1d5f80a250565b60026107b181611248565b8382146107ea576040517fff633a3800000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b5f5b84811015610898575f84848381811061080757610807611823565b905060200201602081019061081c9190611850565b905080151560010361085e5761085987878481811061083d5761083d611823565b905060200201602081019061085291906115a8565b600161123c565b61088f565b61088f87878481811061087357610873611823565b905060200201602081019061088891906115a8565b6001611217565b506001016107ec565b505050505050565b7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffbf60113280546003825580156108f15760018160011c14303b106108e85763f92ee8a95f526004601cfd5b818160ff1b1b91505b505f6108ff838501856118f6565b80519091505f906109269073ffffffffffffffffffffffffffffffffffffffff16306111e4565b9050816080015181101561099757815160808301516040517f5c54305e00000000000000000000000000000000000000000000000000000000815273ffffffffffffffffffffffffffffffffffffffff90921660048301526024820183905260448201526064015b60405180910390fd5b602082015115806109aa57506040820151155b806109b757506060820151155b806109c9575081602001518260800151105b15610a00576040517ff92ee8a900000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b8151600780547fffffffffffffffffffffffff00000000000000000000000000000000000000001673ffffffffffffffffffffffffffffffffffffffff90921691909117905560408051608080820183528285015180835260608087015160208086018290524296860187905288015191909401819052600291909155600392909255600492909255600555820151600655610a9b33611279565b610aaa8260a0015160016112c1565b815f015173ffffffffffffffffffffffffffffffffffffffff167f2364e5ed5f8639e9bae046dc67aabf43f410e931f25143a10f5e1a8744ad717e8360200151846040015185606001518660800151604051610b1f949392919093845260208401929092526040830152606082015260800190565b60405180910390a250508015610b5e576002815560016020527fc7f505b2f371ae2175ee4913f4499e1f2633a7b5936321eed1cdaeb6115181d2602080a15b505050565b5f806001610b7081611248565b5f610b7d85870187611979565b90505f8160200151806020019051810190610b989190611a50565b8251600754919250610bc19173ffffffffffffffffffffffffffffffffffffffff169083611302565b81516007546040517fffffffffffffffffffffffffffffffffffffffff000000000000000000000000606092831b811660208301529183901b90911660348201526048810183905273ffffffffffffffffffffffffffffffffffffffff909116907f9ad2e7a4af16dceda9cce4274b2f59c328d8c012eb0e15eb5e1e73b7d8f264d39060680160408051601f1981840301815290829052610c6191611720565b60405180910390a260075490945073ffffffffffffffffffffffffffffffffffffffff16925050509250929050565b610c98611222565b6107558282611217565b60605f610cb1838501856118f6565b60408051608081019091529091508060018152602001825f015173ffffffffffffffffffffffffffffffffffffffff1681526020013073ffffffffffffffffffffffffffffffffffffffff16815260200160405180602001604052808460800151815250604051602001610d289151815260200190565b60408051601f19818403018152918152915251610d489190602001611a67565b60405160208183030381529060405291505092915050565b63389a75e1600c52335f525f6020600c2055337ffa7b8eab7da67f412cc9575ed43464468f9bfbae89d1675917346ca6d8fe3c925f80a2565b610da1611222565b610daa5f611355565b565b5f610db5611222565b610dbe8461139f565b610e1b57604080517f4139d81d00000000000000000000000000000000000000000000000000000000815273ffffffffffffffffffffffffffffffffffffffff8616600482015260248101919091525f604482015260640161098e565b73ffffffffffffffffffffffffffffffffffffffff84165f908152600160208190526040822080547fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff001690911790556008805491610e7883611b02565b91905055505f610e866106b6565b426004556002549091508111610e9e57600254610eab565b600254610eab90826117ae565b600555600754610ed29073ffffffffffffffffffffffffffffffffffffffff168683611302565b6007546040517fffffffffffffffffffffffffffffffffffffffff000000000000000000000000606092831b811660208301529187901b90911660348201526048810182905273ffffffffffffffffffffffffffffffffffffffff8616907f9ad2e7a4af16dceda9cce4274b2f59c328d8c012eb0e15eb5e1e73b7d8f264d39060680160408051601f1981840301815290829052610f6f91611720565b60405180910390a2506001949350505050565b6002610f8d81611248565b838214610fc6576040517fff633a3800000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b5f5b8481101561089857611018868683818110610fe557610fe5611823565b9050602002016020810190610ffa91906115a8565b85858481811061100c5761100c611823565b9050602002013561123c565b600101610fc8565b5f61102a8461139f565b949350505050565b600261103d81611248565b838214611076576040517fff633a3800000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b5f5b84811015610898576110c886868381811061109557611095611823565b90506020020160208101906110aa91906115a8565b8585848181106110bc576110bc611823565b90506020020135611217565b600101611078565b6110d8611222565b63389a75e1600c52805f526020600c2080544211156110fe57636f5e88185f526004601cfd5b5f905561074081611355565b611112611222565b8060601b61112757637448fbae5f526004601cfd5b61074081611355565b5f8173ffffffffffffffffffffffffffffffffffffffff16611155638b78c6d8195490565b73ffffffffffffffffffffffffffffffffffffffff1614806106b05750638b78c6d8600c9081525f839052602090205460031615156106b0565b5f7fffffffff0000000000000000000000000000000000000000000000000000000082167fa92167050000000000000000000000000000000000000000000000000000000014806106b057506106b082611415565b5f816014526f70a082310000000000000000000000005f5260208060246010865afa601f3d111660205102905092915050565b61075582825f6114ab565b638b78c6d819543314610daa576382b429005f526004601cfd5b610755828260016114ab565b638b78c6d81954331461074057638b78c6d8600c52335f52806020600c205416610740576382b429005f526004601cfd5b73ffffffffffffffffffffffffffffffffffffffff16638b78c6d819819055805f7f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e08180a350565b638b78c6d8600c52815f52806020600c205580600c5160601c7f715ad5ce61fc9595c7b415289d59cf203f23a94fa06f04af7e489a0a76e1fe265f80a35050565b81601452806034526fa9059cbb0000000000000000000000005f5260205f604460105f875af18060015f51141661134b57803d853b15171061134b576390b8ec185f526004601cfd5b505f603452505050565b638b78c6d819805473ffffffffffffffffffffffffffffffffffffffff9092169182907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e05f80a355565b5f806113a96106b6565b90505f811180156113dd575060075481906113da9073ffffffffffffffffffffffffffffffffffffffff16306111e4565b10155b801561140e575073ffffffffffffffffffffffffffffffffffffffff83165f9081526001602052604090205460ff16155b9392505050565b5f7fffffffff0000000000000000000000000000000000000000000000000000000082167f6ab67a0d0000000000000000000000000000000000000000000000000000000014806106b057507f01ffc9a7000000000000000000000000000000000000000000000000000000007fffffffff000000000000000000000000000000000000000000000000000000008316146106b0565b638b78c6d8600c52825f526020600c208054838117836114cc575080841681185b80835580600c5160601c7f715ad5ce61fc9595c7b415289d59cf203f23a94fa06f04af7e489a0a76e1fe265f80a3505050505050565b5f60208284031215611512575f80fd5b81357fffffffff000000000000000000000000000000000000000000000000000000008116811461140e575f80fd5b5f60208284031215611551575f80fd5b5035919050565b803573ffffffffffffffffffffffffffffffffffffffff8116811461157b575f80fd5b919050565b5f8060408385031215611591575f80fd5b61159a83611558565b946020939093013593505050565b5f602082840312156115b8575f80fd5b61140e82611558565b5f8083601f8401126115d1575f80fd5b50813567ffffffffffffffff8111156115e8575f80fd5b6020830191508360208260051b8501011115611602575f80fd5b9250929050565b5f805f806040858703121561161c575f80fd5b843567ffffffffffffffff811115611632575f80fd5b61163e878288016115c1565b909550935050602085013567ffffffffffffffff81111561165d575f80fd5b611669878288016115c1565b95989497509550505050565b5f8083601f840112611685575f80fd5b50813567ffffffffffffffff81111561169c575f80fd5b602083019150836020828501011115611602575f80fd5b5f80602083850312156116c4575f80fd5b823567ffffffffffffffff8111156116da575f80fd5b6116e685828601611675565b90969095509350505050565b5f81518084528060208401602086015e5f602082860101526020601f19601f83011685010191505092915050565b602081525f61140e60208301846116f2565b5f805f60408486031215611744575f80fd5b61174d84611558565b9250602084013567ffffffffffffffff811115611768575f80fd5b61177486828701611675565b9497909650939450505050565b7f4e487b71000000000000000000000000000000000000000000000000000000005f52601160045260245ffd5b818103818111156106b0576106b0611781565b80820281158282048414176106b0576106b0611781565b5f8261180b577f4e487b71000000000000000000000000000000000000000000000000000000005f52601260045260245ffd5b500490565b808201808211156106b0576106b0611781565b7f4e487b71000000000000000000000000000000000000000000000000000000005f52603260045260245ffd5b5f60208284031215611860575f80fd5b8135801515811461140e575f80fd5b7f4e487b71000000000000000000000000000000000000000000000000000000005f52604160045260245ffd5b6040805190810167ffffffffffffffff811182821017156118bf576118bf61186f565b60405290565b604051601f8201601f1916810167ffffffffffffffff811182821017156118ee576118ee61186f565b604052919050565b5f60c0828403128015611907575f80fd5b5060405160c0810167ffffffffffffffff8111828210171561192b5761192b61186f565b60405261193783611558565b81526020838101359082015260408084013590820152606080840135908201526080808401359082015261196d60a08401611558565b60a08201529392505050565b5f60208284031215611989575f80fd5b813567ffffffffffffffff81111561199f575f80fd5b8201604081850312156119b0575f80fd5b6119b861189c565b6119c182611558565b8152602082013567ffffffffffffffff8111156119dc575f80fd5b80830192505084601f8301126119f0575f80fd5b813567ffffffffffffffff811115611a0a57611a0a61186f565b611a1d6020601f19601f840116016118c5565b818152866020838601011115611a31575f80fd5b816020850160208301375f602092820183015290820152949350505050565b5f60208284031215611a60575f80fd5b5051919050565b602081525f825160038110611aa3577f4e487b71000000000000000000000000000000000000000000000000000000005f52602160045260245ffd5b8060208401525073ffffffffffffffffffffffffffffffffffffffff602084015116604083015273ffffffffffffffffffffffffffffffffffffffff6040840151166060830152606083015160808084015261102a60a08401826116f2565b5f7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff8203611b3257611b32611781565b506001019056fea2646970667358221220b907f524c00fc94c347789c150ead10c0b70a2de12eb7cada7da415e65dc020864736f6c634300081a0033",r={BASE_URL:"/",DEV:!1,MODE:"production",PROD:!0,SSR:!1,VITE_BOOST_MAINNET_SIGNER_EOA:"0xCBD0C302040bC803B4B2EDaF21Be0e49Deff5480",VITE_BOOST_TESTNET_SIGNER_EOA:"0xd63167e9db11B108940b2E8236581F961f33f396"},s=class s extends y.DeployableTarget{constructor(){super(...arguments),this.abi=a.z}async owner(f){return await a.zN(this._config,{address:this.assertValidAddress(),args:[],...f})}async claims(f){return await a.NN(this._config,{address:this.assertValidAddress(),args:[],...f})}async reward(f){return await a.xN(this._config,{address:this.assertValidAddress(),args:[],...f})}async claimed(f,b){return await a.IN(this._config,{address:this.assertValidAddress(),args:[f],...b})}async asset(f){return await a.AN(this._config,{address:this.assertValidAddress(),...f})}async cgdaParams(f){const[b,e,d,c]=await a.hN(this._config,{address:this.assertValidAddress(),...f});return{rewardDecay:b,rewardBoost:e,lastClaimTime:d,currentReward:c}}async totalBudget(f){return await a.SN(this._config,{address:this.assertValidAddress(),...f})}async claim(f,b){return await this.awaitResult(this.claimRaw(f,b))}async claimRaw(f,b){const{request:e,result:d}=await a.t5(this._config,{address:this.assertValidAddress(),args:[n.prepareClaimPayload(f)],...this.optionallyAttachAccount(),...b});return{hash:await a._N(this._config,e),result:d}}async clawback(f,b){return await this.awaitResult(this.clawbackRaw(f,b))}async clawbackRaw(f,b){const{request:e,result:d}=await a.n5(this._config,{address:this.assertValidAddress(),args:[n.prepareClaimPayload(f)],...this.optionallyAttachAccount(),...b});return{hash:await a.DN(this._config,e),result:d}}async isClaimable(f,b){return await a.VN(this._config,{address:this.assertValidAddress(),args:[f.target,f.data],...b})}async canBeClaimed(f){return await this.getRemainingClaimPotential(f)>0n}async getRemainingClaimPotential(f){const[b,e]=await Promise.all([this.currentReward(f),o.getErc20Balance(this._config,await this.asset(),this.assertValidAddress(),f)]);return e-b}async currentReward(f){return await a.MN(this._config,{address:this.assertValidAddress(),...f})}async getTotalBudget(f){var b;return((b=this.payload)==null?void 0:b.totalBudget)!==void 0?this.payload.totalBudget:await this.totalBudget(f)}buildParameters(f,b){const[e,d]=this.validateDeploymentConfig(f,b);return{abi:a.z,bytecode:g,args:[l(e)],...this.optionallyAttachAccount(d.account)}}buildClawbackData(f){return t.encodeAbiParameters([{type:"uint256"}],[f])}async getTopupPayload(f){var b,e,d,c;return t.encodeAbiParameters([{type:"address",name:"asset"},{type:"uint256",name:"initialReward"},{type:"uint256",name:"rewardDecay"},{type:"uint256",name:"rewardBoost"},{type:"uint256",name:"totalBudget"},{type:"address",name:"manager"}],[await this.asset()??t.zeroHash,((b=this.payload)==null?void 0:b.initialReward)??0n,((e=this.payload)==null?void 0:e.rewardDecay)??0n,((d=this.payload)==null?void 0:d.rewardBoost)??0n,f,((c=this.payload)==null?void 0:c.manager)??t.zeroHash])}buildClaimData(){return t.zeroHash}};s.bases={...r!=null&&r.VITE_CGDA_INCENTIVE_BASE?{31337:void 0}:{},...h.CGDAIncentive},s.registryType=o.RegistryType.INCENTIVE;let i=s;function l({asset:u,initialReward:f,rewardDecay:b,rewardBoost:e,totalBudget:d,manager:c}){return t.encodeAbiParameters([{type:"address",name:"asset"},{type:"uint256",name:"initialReward"},{type:"uint256",name:"rewardDecay"},{type:"uint256",name:"rewardBoost"},{type:"uint256",name:"totalBudget"},{type:"address",name:"manager"}],[u,f,b,e,d,c])}exports.cgdaIncentiveAbi=a.z;exports.CGDAIncentive=i;exports.prepareCGDAIncentivePayload=l;
2
2
  //# sourceMappingURL=CGDAIncentive.cjs.map
@@ -1,6 +1,6 @@
1
1
  import { z as i, aD as u, aE as h, aF as y, aG as g, aH as w, aI as m, aJ as p, aK as A, aL as B, aM as E, aN as N, aO as R, aP as V } from "../generated-B6mEIx8i.js";
2
2
  import { encodeAbiParameters as r, zeroHash as t } from "viem";
3
- import { C as _ } from "../deployments-EFoHkvCp.js";
3
+ import { C as _ } from "../deployments-CHQ30INq.js";
4
4
  import { DeployableTarget as T } from "../Deployable/DeployableTarget.js";
5
5
  import { prepareClaimPayload as n } from "../claiming.js";
6
6
  import { RegistryType as D, getErc20Balance as C } from "../utils.js";