@boostxyz/sdk 7.3.0 → 7.5.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 (193) hide show
  1. package/dist/Actions/Action.cjs +1 -1
  2. package/dist/Actions/Action.js +2 -2
  3. package/dist/Actions/EventAction.cjs +1 -1
  4. package/dist/Actions/EventAction.cjs.map +1 -1
  5. package/dist/Actions/EventAction.d.ts.map +1 -1
  6. package/dist/Actions/EventAction.js +160 -159
  7. package/dist/Actions/EventAction.js.map +1 -1
  8. package/dist/AllowLists/AllowList.cjs +1 -1
  9. package/dist/AllowLists/AllowList.js +3 -3
  10. package/dist/AllowLists/SimpleAllowList.cjs +1 -1
  11. package/dist/AllowLists/SimpleAllowList.cjs.map +1 -1
  12. package/dist/AllowLists/SimpleAllowList.d.ts.map +1 -1
  13. package/dist/AllowLists/SimpleAllowList.js +30 -30
  14. package/dist/AllowLists/SimpleAllowList.js.map +1 -1
  15. package/dist/AllowLists/SimpleDenyList.cjs +1 -1
  16. package/dist/AllowLists/SimpleDenyList.d.ts.map +1 -1
  17. package/dist/AllowLists/SimpleDenyList.js +3 -3
  18. package/dist/Auth/PassthroughAuth.cjs +1 -1
  19. package/dist/Auth/PassthroughAuth.js +1 -1
  20. package/dist/BoostCore.cjs +2 -2
  21. package/dist/BoostCore.cjs.map +1 -1
  22. package/dist/BoostCore.d.ts +14 -0
  23. package/dist/BoostCore.d.ts.map +1 -1
  24. package/dist/BoostCore.js +199 -180
  25. package/dist/BoostCore.js.map +1 -1
  26. package/dist/BoostRegistry.cjs +1 -1
  27. package/dist/BoostRegistry.cjs.map +1 -1
  28. package/dist/BoostRegistry.d.ts.map +1 -1
  29. package/dist/BoostRegistry.js +31 -31
  30. package/dist/BoostRegistry.js.map +1 -1
  31. package/dist/Budget-DGg1wCa6.cjs +2 -0
  32. package/dist/Budget-DGg1wCa6.cjs.map +1 -0
  33. package/dist/{Budget-B-grnRq9.js → Budget-ZnzzZsjK.js} +102 -102
  34. package/dist/Budget-ZnzzZsjK.js.map +1 -0
  35. package/dist/Budgets/Budget.cjs +1 -1
  36. package/dist/Budgets/Budget.js +3 -3
  37. package/dist/Budgets/ManagedBudget.cjs +1 -1
  38. package/dist/Budgets/ManagedBudget.cjs.map +1 -1
  39. package/dist/Budgets/ManagedBudget.d.ts.map +1 -1
  40. package/dist/Budgets/ManagedBudget.js +48 -48
  41. package/dist/Budgets/ManagedBudget.js.map +1 -1
  42. package/dist/Budgets/ManagedBudgetWithFees.d.ts.map +1 -1
  43. package/dist/Budgets/ManagedBudgetWithFeesV2.d.ts.map +1 -1
  44. package/dist/Budgets/TransparentBudget.d.ts.map +1 -1
  45. package/dist/Budgets/VestingBudget.d.ts.map +1 -1
  46. package/dist/Deployable/DeployableTarget.cjs +1 -1
  47. package/dist/Deployable/DeployableTarget.cjs.map +1 -1
  48. package/dist/Deployable/DeployableTarget.d.ts.map +1 -1
  49. package/dist/Deployable/DeployableTarget.js +5 -8
  50. package/dist/Deployable/DeployableTarget.js.map +1 -1
  51. package/dist/Deployable/DeployableTargetWithRBAC.cjs +1 -1
  52. package/dist/Deployable/DeployableTargetWithRBAC.js +19 -19
  53. package/dist/{Incentive-Bz_g-nID.js → Incentive-CYj6lbM5.js} +64 -64
  54. package/dist/Incentive-CYj6lbM5.js.map +1 -0
  55. package/dist/{Incentive-Dufx0ZjH.cjs → Incentive-Ckxpw7EN.cjs} +2 -2
  56. package/dist/Incentive-Ckxpw7EN.cjs.map +1 -0
  57. package/dist/Incentives/AllowListIncentive.cjs +1 -1
  58. package/dist/Incentives/AllowListIncentive.cjs.map +1 -1
  59. package/dist/Incentives/AllowListIncentive.d.ts.map +1 -1
  60. package/dist/Incentives/AllowListIncentive.js +36 -36
  61. package/dist/Incentives/AllowListIncentive.js.map +1 -1
  62. package/dist/Incentives/CGDAIncentive.cjs +1 -1
  63. package/dist/Incentives/CGDAIncentive.cjs.map +1 -1
  64. package/dist/Incentives/CGDAIncentive.d.ts.map +1 -1
  65. package/dist/Incentives/CGDAIncentive.js +37 -37
  66. package/dist/Incentives/CGDAIncentive.js.map +1 -1
  67. package/dist/Incentives/ERC1155Incentive.d.ts.map +1 -1
  68. package/dist/Incentives/ERC20Incentive.cjs +1 -1
  69. package/dist/Incentives/ERC20Incentive.cjs.map +1 -1
  70. package/dist/Incentives/ERC20Incentive.d.ts.map +1 -1
  71. package/dist/Incentives/ERC20Incentive.js +44 -44
  72. package/dist/Incentives/ERC20Incentive.js.map +1 -1
  73. package/dist/Incentives/ERC20PeggedIncentive.d.ts.map +1 -1
  74. package/dist/Incentives/ERC20PeggedVariableCriteriaIncentive.cjs +1 -1
  75. package/dist/Incentives/ERC20PeggedVariableCriteriaIncentive.cjs.map +1 -1
  76. package/dist/Incentives/ERC20PeggedVariableCriteriaIncentive.d.ts.map +1 -1
  77. package/dist/Incentives/ERC20PeggedVariableCriteriaIncentive.js +63 -63
  78. package/dist/Incentives/ERC20PeggedVariableCriteriaIncentive.js.map +1 -1
  79. package/dist/Incentives/ERC20PeggedVariableCriteriaIncentiveV2.cjs +1 -1
  80. package/dist/Incentives/ERC20PeggedVariableCriteriaIncentiveV2.cjs.map +1 -1
  81. package/dist/Incentives/ERC20PeggedVariableCriteriaIncentiveV2.d.ts.map +1 -1
  82. package/dist/Incentives/ERC20PeggedVariableCriteriaIncentiveV2.js +55 -53
  83. package/dist/Incentives/ERC20PeggedVariableCriteriaIncentiveV2.js.map +1 -1
  84. package/dist/Incentives/ERC20VariableCriteriaIncentive.cjs +1 -1
  85. package/dist/Incentives/ERC20VariableCriteriaIncentive.cjs.map +1 -1
  86. package/dist/Incentives/ERC20VariableCriteriaIncentive.d.ts.map +1 -1
  87. package/dist/Incentives/ERC20VariableCriteriaIncentive.js +45 -45
  88. package/dist/Incentives/ERC20VariableCriteriaIncentive.js.map +1 -1
  89. package/dist/Incentives/ERC20VariableCriteriaIncentiveV2.cjs +1 -1
  90. package/dist/Incentives/ERC20VariableCriteriaIncentiveV2.cjs.map +1 -1
  91. package/dist/Incentives/ERC20VariableCriteriaIncentiveV2.d.ts.map +1 -1
  92. package/dist/Incentives/ERC20VariableCriteriaIncentiveV2.js +51 -49
  93. package/dist/Incentives/ERC20VariableCriteriaIncentiveV2.js.map +1 -1
  94. package/dist/Incentives/ERC20VariableIncentive.cjs +1 -1
  95. package/dist/Incentives/ERC20VariableIncentive.cjs.map +1 -1
  96. package/dist/Incentives/ERC20VariableIncentive.d.ts.map +1 -1
  97. package/dist/Incentives/ERC20VariableIncentive.js +38 -38
  98. package/dist/Incentives/ERC20VariableIncentive.js.map +1 -1
  99. package/dist/Incentives/Incentive.cjs +1 -1
  100. package/dist/Incentives/Incentive.js +3 -3
  101. package/dist/Incentives/PointsIncentive.cjs +1 -1
  102. package/dist/Incentives/PointsIncentive.cjs.map +1 -1
  103. package/dist/Incentives/PointsIncentive.d.ts.map +1 -1
  104. package/dist/Incentives/PointsIncentive.js +35 -35
  105. package/dist/Incentives/PointsIncentive.js.map +1 -1
  106. package/dist/{SimpleDenyList-BlLgvhjE.js → SimpleDenyList-DUO4ex__.js} +32 -32
  107. package/dist/SimpleDenyList-DUO4ex__.js.map +1 -0
  108. package/dist/{SimpleDenyList-B2YDJ_gk.cjs → SimpleDenyList-v5G-fPfm.cjs} +2 -2
  109. package/dist/SimpleDenyList-v5G-fPfm.cjs.map +1 -0
  110. package/dist/Validator-BA8RC2J6.cjs +2 -0
  111. package/dist/Validator-BA8RC2J6.cjs.map +1 -0
  112. package/dist/Validator-D4CzwdB9.js +409 -0
  113. package/dist/Validator-D4CzwdB9.js.map +1 -0
  114. package/dist/Validators/LimitedSignerValidator.cjs +1 -1
  115. package/dist/Validators/LimitedSignerValidator.cjs.map +1 -1
  116. package/dist/Validators/LimitedSignerValidator.d.ts.map +1 -1
  117. package/dist/Validators/LimitedSignerValidator.js +39 -39
  118. package/dist/Validators/LimitedSignerValidator.js.map +1 -1
  119. package/dist/Validators/PayableLimitedSignerValidator.d.ts +829 -0
  120. package/dist/Validators/PayableLimitedSignerValidator.d.ts.map +1 -0
  121. package/dist/Validators/SignerValidator.cjs +1 -1
  122. package/dist/Validators/SignerValidator.cjs.map +1 -1
  123. package/dist/Validators/SignerValidator.d.ts.map +1 -1
  124. package/dist/Validators/SignerValidator.js +48 -48
  125. package/dist/Validators/SignerValidator.js.map +1 -1
  126. package/dist/Validators/Validator.cjs +1 -1
  127. package/dist/Validators/Validator.cjs.map +1 -1
  128. package/dist/Validators/Validator.d.ts +4 -3
  129. package/dist/Validators/Validator.d.ts.map +1 -1
  130. package/dist/Validators/Validator.js +14 -50
  131. package/dist/Validators/Validator.js.map +1 -1
  132. package/dist/componentInterfaces-D4QdH2Qz.cjs +2 -0
  133. package/dist/componentInterfaces-D4QdH2Qz.cjs.map +1 -0
  134. package/dist/componentInterfaces-DCTot4_O.js +24 -0
  135. package/dist/componentInterfaces-DCTot4_O.js.map +1 -0
  136. package/dist/{deployments-DKtAq6BT.js → deployments-B-ZU0zVY.js} +61 -34
  137. package/dist/{deployments-DKtAq6BT.js.map → deployments-B-ZU0zVY.js.map} +1 -1
  138. package/dist/deployments-CaacquP1.cjs +2 -0
  139. package/dist/deployments-CaacquP1.cjs.map +1 -0
  140. package/dist/deployments.json +32 -4
  141. package/dist/generated-BOBQ2ut4.cjs +3 -0
  142. package/dist/generated-BOBQ2ut4.cjs.map +1 -0
  143. package/dist/{generated-CINzoGbl.js → generated-ffteMTHN.js} +1157 -776
  144. package/dist/generated-ffteMTHN.js.map +1 -0
  145. package/dist/index.cjs +1 -1
  146. package/dist/index.d.ts +1 -0
  147. package/dist/index.d.ts.map +1 -1
  148. package/dist/index.js +123 -118
  149. package/package.json +1 -1
  150. package/src/Actions/EventAction.ts +3 -1
  151. package/src/AllowLists/SimpleAllowList.ts +3 -1
  152. package/src/AllowLists/SimpleDenyList.ts +3 -1
  153. package/src/BoostCore.ts +30 -1
  154. package/src/BoostRegistry.ts +3 -1
  155. package/src/Budgets/ManagedBudget.ts +3 -1
  156. package/src/Budgets/ManagedBudgetWithFees.ts +3 -1
  157. package/src/Budgets/ManagedBudgetWithFeesV2.ts +3 -1
  158. package/src/Budgets/TransparentBudget.ts +3 -1
  159. package/src/Budgets/VestingBudget.ts +3 -1
  160. package/src/Deployable/DeployableTarget.ts +2 -3
  161. package/src/Incentives/AllowListIncentive.ts +3 -1
  162. package/src/Incentives/CGDAIncentive.ts +3 -1
  163. package/src/Incentives/ERC1155Incentive.ts +3 -1
  164. package/src/Incentives/ERC20Incentive.ts +3 -1
  165. package/src/Incentives/ERC20PeggedIncentive.ts +3 -1
  166. package/src/Incentives/ERC20PeggedVariableCriteriaIncentive.ts +3 -1
  167. package/src/Incentives/ERC20PeggedVariableCriteriaIncentiveV2.ts +6 -2
  168. package/src/Incentives/ERC20VariableCriteriaIncentive.ts +3 -1
  169. package/src/Incentives/ERC20VariableCriteriaIncentiveV2.ts +5 -1
  170. package/src/Incentives/ERC20VariableIncentive.ts +3 -1
  171. package/src/Incentives/PointsIncentive.ts +3 -1
  172. package/src/Validators/LimitedSignerValidator.ts +3 -1
  173. package/src/Validators/PayableLimitedSignerValidator.test.ts +202 -0
  174. package/src/Validators/PayableLimitedSignerValidator.ts +667 -0
  175. package/src/Validators/SignerValidator.ts +3 -1
  176. package/src/Validators/Validator.ts +7 -1
  177. package/src/index.ts +1 -0
  178. package/dist/Budget-B-grnRq9.js.map +0 -1
  179. package/dist/Budget-uGKa2qzz.cjs +0 -2
  180. package/dist/Budget-uGKa2qzz.cjs.map +0 -1
  181. package/dist/Incentive-Bz_g-nID.js.map +0 -1
  182. package/dist/Incentive-Dufx0ZjH.cjs.map +0 -1
  183. package/dist/SimpleDenyList-B2YDJ_gk.cjs.map +0 -1
  184. package/dist/SimpleDenyList-BlLgvhjE.js.map +0 -1
  185. package/dist/componentInterfaces-C5ig8mCK.cjs +0 -2
  186. package/dist/componentInterfaces-C5ig8mCK.cjs.map +0 -1
  187. package/dist/componentInterfaces-Ddus5rIA.js +0 -23
  188. package/dist/componentInterfaces-Ddus5rIA.js.map +0 -1
  189. package/dist/deployments-Dk-Z1L2X.cjs +0 -2
  190. package/dist/deployments-Dk-Z1L2X.cjs.map +0 -1
  191. package/dist/generated-CINzoGbl.js.map +0 -1
  192. package/dist/generated-C_JEoLDO.cjs +0 -3
  193. package/dist/generated-C_JEoLDO.cjs.map +0 -1
@@ -1 +1 @@
1
- {"version":3,"file":"ERC20Incentive.cjs","sources":["../../src/Incentives/ERC20Incentive.ts"],"sourcesContent":["import {\n erc20IncentiveAbi,\n readErc20IncentiveAsset,\n readErc20IncentiveClaimed,\n readErc20IncentiveClaims,\n readErc20IncentiveCurrentReward,\n readErc20IncentiveEntries,\n readErc20IncentiveIsClaimable,\n readErc20IncentiveLimit,\n readErc20IncentiveOwner,\n readErc20IncentiveReward,\n readErc20IncentiveStrategy,\n simulateErc20IncentiveClaim,\n simulateErc20IncentiveClawback,\n simulateErc20IncentiveDrawRaffle,\n writeErc20IncentiveClaim,\n writeErc20IncentiveClawback,\n writeErc20IncentiveDrawRaffle,\n} from '@boostxyz/evm';\nimport { bytecode } from '@boostxyz/evm/artifacts/contracts/incentives/ERC20Incentive.sol/ERC20Incentive.json';\nimport {\n type Address,\n type ContractEventName,\n type Hex,\n encodeAbiParameters,\n zeroAddress,\n zeroHash,\n} from 'viem';\nimport { ERC20Incentive as ERC20IncentiveBases } from '../../dist/deployments.json';\nimport type {\n DeployableOptions,\n GenericDeployableParams,\n} from '../Deployable/Deployable';\nimport { DeployableTarget } from '../Deployable/DeployableTarget';\nimport {\n type ClaimPayload,\n StrategyType,\n prepareClaimPayload,\n} from '../claiming';\nimport {\n type GenericLog,\n type ReadParams,\n RegistryType,\n type WriteParams,\n} from '../utils';\n\nexport { erc20IncentiveAbi };\n\n/**\n * The object representation of a `ERC20Incentive.InitPayload`\n *\n * @export\n * @interface ERC20IncentivePayload\n * @typedef {ERC20IncentivePayload}\n */\nexport interface ERC20IncentivePayload {\n /**\n * The address of the incentivized asset.\n *\n * @type {Address}\n */\n asset: Address;\n /**\n * The type of disbursement strategy for the incentive.\n *\n * @type {StrategyType}\n */\n strategy: StrategyType;\n /**\n * The amount of the asset to distribute.\n *\n * @type {bigint}\n */\n reward: bigint;\n /**\n * How many times can this incentive be claimed. This should ideally be 1n for `RAFFLE` strategy types.\n *\n * @type {bigint}\n */\n limit: bigint;\n /**\n * (Optional) The address of the entity that can trigger a raffle.\n * If omitted, the incentive will have no manager with permissions to draw the raffle.\n *\n * @type {Address}\n * @optional\n */\n manager?: Address;\n}\n\n/**\n * A generic `viem.Log` event with support for `ERC20Incentive` event types.\n *\n * @export\n * @typedef {ERC20IncentiveLog}\n * @template {ContractEventName<typeof erc20IncentiveAbi>} [event=ContractEventName<\n * typeof erc20IncentiveAbi\n * >]\n */\nexport type ERC20IncentiveLog<\n event extends ContractEventName<typeof erc20IncentiveAbi> = ContractEventName<\n typeof erc20IncentiveAbi\n >,\n> = GenericLog<typeof erc20IncentiveAbi, event>;\n\n/**\n * A simple ERC20 incentive implementation that allows claiming of tokens\n *\n * @export\n * @class ERC20Incentive\n * @typedef {ERC20Incentive}\n * @extends {DeployableTarget<ERC20IncentivePayload>}\n */\nexport class ERC20Incentive extends DeployableTarget<\n ERC20IncentivePayload,\n typeof erc20IncentiveAbi\n> {\n public override readonly abi = erc20IncentiveAbi;\n /**\n * @inheritdoc\n *\n * @public\n * @static\n * @type {Record<number, Address>}\n */\n public static override bases: Record<number, Address> = {\n 31337: import.meta.env.VITE_ERC20_INCENTIVE_BASE,\n ...(ERC20IncentiveBases 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 readErc20IncentiveOwner(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 readErc20IncentiveCurrentReward(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 readErc20IncentiveClaims(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 readErc20IncentiveClaimed(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 readErc20IncentiveAsset(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 strategy for the incentive (MINT or POOL)\n *\n * @public\n * @async\n * @param {?ReadParams} [params]\n * @returns {Promise<StrategyType>}\n */\n public strategy(params?: ReadParams): Promise<StrategyType> {\n return readErc20IncentiveStrategy(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 }) as Promise<StrategyType>;\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 readErc20IncentiveReward(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 claims, or max entries for raffles)\n *\n * @public\n * @async\n * @param {?ReadParams} [params]\n * @returns {Promise<bigint>}\n */\n public async limit(params?: ReadParams) {\n return await readErc20IncentiveLimit(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 set of addresses that have claimed a slot in the incentive raffle, accessed by bigint index.\n *\n * @public\n * @async\n * @param {bigint} i - Index of address\n * @param {?ReadParams} [params]\n * @returns {Promise<Address>}\n */\n public async entries(i: bigint, params?: ReadParams) {\n return await readErc20IncentiveEntries(this._config, {\n address: this.assertValidAddress(),\n args: [i],\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 simulateErc20IncentiveClaim(\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 writeErc20IncentiveClaim(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 simulateErc20IncentiveClawback(\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 writeErc20IncentiveClawback(this._config, request);\n return { hash, result };\n }\n\n /**\n * Check if an incentive is claimable. For the POOL strategy, the `bytes data` portion of the payload ignored. The recipient must not have already claimed the incentive.\n *\n * @public\n * @async\n * @param {ClaimPayload} payload\n * @param {?ReadParams} [params]\n * @returns {Promise<boolean>} = True if the incentive is claimable based on the data payload\n */\n public async isClaimable(payload: ClaimPayload, params?: ReadParams) {\n return await readErc20IncentiveIsClaimable(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 * Draw a winner from the raffle. Only callable by owner. Only valid when the strategy is set to `Strategy.RAFFLE`\n *\n * @public\n * @async\n * @param {?WriteParams} [params]\n * @returns {Promise<void>}\n */\n public async drawRaffle(params?: WriteParams) {\n return await this.awaitResult(this.drawRaffleRaw(params));\n }\n\n /**\n * Draw a winner from the raffle. Only callable by owner. Only valid when the strategy is set to `Strategy.RAFFLE`\n *\n * @public\n * @async\n * @param {?WriteParams} [params]\n * @returns {Promise<{ hash: `0x${string}`; result: void; }>}\n */\n public async drawRaffleRaw(params?: WriteParams) {\n const { request, result } = await simulateErc20IncentiveDrawRaffle(\n this._config,\n {\n address: this.assertValidAddress(),\n ...this.optionallyAttachAccount(),\n // biome-ignore lint/suspicious/noExplicitAny: Accept any shape of valid wagmi/viem parameters, wagmi does the same thing internally\n ...(params as any),\n },\n );\n const hash = await writeErc20IncentiveDrawRaffle(this._config, request);\n return { hash, result };\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 if (\n this.payload?.strategy !== undefined &&\n this.payload?.limit !== undefined &&\n this.payload?.reward !== undefined\n ) {\n return (this.payload.strategy as StrategyType) === StrategyType.POOL\n ? this.payload.limit * this.payload.reward\n : this.payload.reward;\n }\n const [strategy, limit, reward] = await Promise.all([\n this.strategy(params),\n this.limit(params),\n this.reward(params),\n ]);\n return strategy === StrategyType.POOL ? limit * reward : reward;\n }\n\n /**\n * Check if any claims remain by comparing the incentive's total claims against its limit. Does not take requesting user's elligibility into account.\n *\n * @public\n * @async\n * @param {?ReadParams} [params]\n * @returns {Promise<boolean>} - True if total claims is less than limit\n */\n public async canBeClaimed(params?: ReadParams) {\n return (await this.getRemainingClaimPotential(params)) > 0n;\n }\n\n /**\n * Check how many claims remain by comparing the incentive's total claims against its limit. Does not take requesting user's elligibility into account.\n *\n * @public\n * @async\n * @param {?ReadParams} [params]\n * @returns {Promise<bigint>} - True if total claims is less than limit\n */\n public async getRemainingClaimPotential(params?: ReadParams) {\n const [claims, limit] = await Promise.all([\n this.claims(params),\n this.limit(params),\n ]);\n return limit - claims;\n }\n\n /**\n * @inheritdoc\n *\n * @public\n * @param {?ERC20IncentivePayload} [_payload]\n * @param {?DeployableOptions} [_options]\n * @returns {GenericDeployableParams}\n */\n public override buildParameters(\n _payload?: ERC20IncentivePayload,\n _options?: DeployableOptions,\n ): GenericDeployableParams {\n const [payload, options] = this.validateDeploymentConfig(\n _payload,\n _options,\n );\n return {\n abi: erc20IncentiveAbi,\n bytecode: bytecode as Hex,\n args: [prepareERC20IncentivePayload(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 * A helper that composes a typed \"top-up\" parameter object\n * given a net top-up amount. You can name it whatever you like\n * (e.g. topupParamsFromNetAmount, getTopupPayload, etc.).\n *\n * @public\n * @param {bigint} netAmount The net top-up tokens the user wants to add\n * @param {?WriteParams} [params] (optional) if you need them\n * @returns {Hex} the ABI-encoded data for top-up\n */\n public async getTopupPayload(netAmount: bigint): Promise<Hex> {\n // 1. Build a typed object matching your `ERC20IncentivePayload`.\n // For example, you might want to increment `limit` by `netAmount`,\n // or set `reward = netAmount`. That’s up to your logic:\n const asset = await this.asset();\n const typed: ERC20IncentivePayload = {\n asset: asset || zeroAddress,\n strategy: StrategyType.POOL, // e.g. StrategyType.POOL\n reward: 1n, // store net top-up as the \"reward\"\n limit: netAmount, // or maybe add netAmount to existing limit\n manager: this.payload?.manager || zeroAddress,\n };\n\n // 2. Encode it with your existing `prepareERC20IncentivePayload(...)`.\n return prepareERC20IncentivePayload(typed);\n }\n\n /**\n * Builds the claim data for the ERC20Incentive.\n *\n * @public\n * @returns {Hash} A `zeroHash`, as ERC20Incentive doesn't require specific claim data.\n * @description This function returns `zeroHash` because ERC20Incentive doesn't use any specific claim data.\n */\n public buildClaimData() {\n return zeroHash;\n }\n}\n\n/**\n * Given a {@link ERC20IncentivePayload}, properly encode a `ERC20Incentive.InitPayload` for use with {@link ERC20Incentive} initialization.\n *\n * @param {ERC20IncentivePayload} param0\n * @param {Address} param0.asset - The address of the incentivized asset.\n * @param {StrategyType} param0.strategy - The type of disbursement strategy for the incentive. `StrategyType.MINT` is not supported for `ERC20Incentives`\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 draw raffles - defaults to unset\n * @returns {Hex}\n */\nexport function prepareERC20IncentivePayload({\n asset,\n strategy,\n reward,\n limit,\n manager = zeroAddress,\n}: ERC20IncentivePayload) {\n return encodeAbiParameters(\n [\n { type: 'address', name: 'asset' },\n { type: 'uint8', name: 'strategy' },\n { type: 'uint256', name: 'reward' },\n { type: 'uint256', name: 'limit' },\n { type: 'address', name: 'manager' },\n ],\n [\n asset,\n strategy,\n reward,\n // unclear how user set limit should work for raffle, so in order to avoid passing 0's let's correct it\n limit === 0n && strategy === StrategyType.RAFFLE ? 1n : limit,\n manager,\n ],\n );\n}\n"],"names":["_ERC20Incentive","DeployableTarget","erc20IncentiveAbi","params","readErc20IncentiveOwner","readErc20IncentiveCurrentReward","readErc20IncentiveClaims","address","readErc20IncentiveClaimed","readErc20IncentiveAsset","readErc20IncentiveStrategy","readErc20IncentiveReward","readErc20IncentiveLimit","i","readErc20IncentiveEntries","payload","request","result","simulateErc20IncentiveClaim","prepareClaimPayload","writeErc20IncentiveClaim","simulateErc20IncentiveClawback","writeErc20IncentiveClawback","readErc20IncentiveIsClaimable","simulateErc20IncentiveDrawRaffle","writeErc20IncentiveDrawRaffle","_a","_b","_c","StrategyType","strategy","limit","reward","claims","_payload","_options","options","bytecode","prepareERC20IncentivePayload","amount","encodeAbiParameters","netAmount","typed","zeroAddress","zeroHash","ERC20IncentiveBases","RegistryType","ERC20Incentive","asset","manager"],"mappings":"0siBAiHaA,EAAN,MAAMA,UAAuBC,EAAAA,gBAGlC,CAHK,aAAA,CAAA,MAAA,GAAA,SAAA,EAIL,KAAyB,IAAMC,GAAA,CA6B/B,MAAa,MAAMC,EAAqB,CAC/B,OAAA,MAAMC,EAAAA,GAAwB,KAAK,QAAS,CACjD,QAAS,KAAK,mBAAmB,EACjC,KAAM,CAAC,EAEP,GAAID,CAAA,CACL,CACH,CAUA,MAAa,cAAcA,EAAqB,CACvC,OAAA,MAAME,EAAAA,GAAgC,KAAK,QAAS,CACzD,QAAS,KAAK,mBAAmB,EACjC,KAAM,CAAC,EAEP,GAAIF,CAAA,CACL,CACH,CAUA,MAAa,OAAOA,EAAqB,CAChC,OAAA,MAAMG,EAAAA,GAAyB,KAAK,QAAS,CAClD,QAAS,KAAK,mBAAmB,EACjC,KAAM,CAAC,EAEP,GAAIH,CAAA,CACL,CACH,CAWA,MAAa,QAAQI,EAAkBJ,EAAqB,CACnD,OAAA,MAAMK,EAAAA,GAA0B,KAAK,QAAS,CACnD,QAAS,KAAK,mBAAmB,EACjC,KAAM,CAACD,CAAO,EAEd,GAAIJ,CAAA,CACL,CACH,CAUA,MAAa,MAAMA,EAAqB,CAC/B,OAAA,MAAMM,EAAAA,GAAwB,KAAK,QAAS,CACjD,QAAS,KAAK,mBAAmB,EAEjC,GAAIN,CAAA,CACL,CACH,CAUO,SAASA,EAA4C,CACnD,OAAAO,EAAA,GAA2B,KAAK,QAAS,CAC9C,QAAS,KAAK,mBAAmB,EAEjC,GAAIP,CAAA,CACL,CACH,CAUA,MAAa,OAAOA,EAAqB,CAChC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}
1
+ {"version":3,"file":"ERC20Incentive.cjs","sources":["../../src/Incentives/ERC20Incentive.ts"],"sourcesContent":["import {\n erc20IncentiveAbi,\n readErc20IncentiveAsset,\n readErc20IncentiveClaimed,\n readErc20IncentiveClaims,\n readErc20IncentiveCurrentReward,\n readErc20IncentiveEntries,\n readErc20IncentiveIsClaimable,\n readErc20IncentiveLimit,\n readErc20IncentiveOwner,\n readErc20IncentiveReward,\n readErc20IncentiveStrategy,\n simulateErc20IncentiveClaim,\n simulateErc20IncentiveClawback,\n simulateErc20IncentiveDrawRaffle,\n writeErc20IncentiveClaim,\n writeErc20IncentiveClawback,\n writeErc20IncentiveDrawRaffle,\n} from '@boostxyz/evm';\nimport { bytecode } from '@boostxyz/evm/artifacts/contracts/incentives/ERC20Incentive.sol/ERC20Incentive.json';\nimport {\n type Address,\n type ContractEventName,\n type Hex,\n encodeAbiParameters,\n zeroAddress,\n zeroHash,\n} from 'viem';\nimport { ERC20Incentive as ERC20IncentiveBases } from '../../dist/deployments.json';\nimport type {\n DeployableOptions,\n GenericDeployableParams,\n} from '../Deployable/Deployable';\nimport { DeployableTarget } from '../Deployable/DeployableTarget';\nimport {\n type ClaimPayload,\n StrategyType,\n prepareClaimPayload,\n} from '../claiming';\nimport {\n type GenericLog,\n type ReadParams,\n RegistryType,\n type WriteParams,\n} from '../utils';\n\nexport { erc20IncentiveAbi };\n\n/**\n * The object representation of a `ERC20Incentive.InitPayload`\n *\n * @export\n * @interface ERC20IncentivePayload\n * @typedef {ERC20IncentivePayload}\n */\nexport interface ERC20IncentivePayload {\n /**\n * The address of the incentivized asset.\n *\n * @type {Address}\n */\n asset: Address;\n /**\n * The type of disbursement strategy for the incentive.\n *\n * @type {StrategyType}\n */\n strategy: StrategyType;\n /**\n * The amount of the asset to distribute.\n *\n * @type {bigint}\n */\n reward: bigint;\n /**\n * How many times can this incentive be claimed. This should ideally be 1n for `RAFFLE` strategy types.\n *\n * @type {bigint}\n */\n limit: bigint;\n /**\n * (Optional) The address of the entity that can trigger a raffle.\n * If omitted, the incentive will have no manager with permissions to draw the raffle.\n *\n * @type {Address}\n * @optional\n */\n manager?: Address;\n}\n\n/**\n * A generic `viem.Log` event with support for `ERC20Incentive` event types.\n *\n * @export\n * @typedef {ERC20IncentiveLog}\n * @template {ContractEventName<typeof erc20IncentiveAbi>} [event=ContractEventName<\n * typeof erc20IncentiveAbi\n * >]\n */\nexport type ERC20IncentiveLog<\n event extends ContractEventName<typeof erc20IncentiveAbi> = ContractEventName<\n typeof erc20IncentiveAbi\n >,\n> = GenericLog<typeof erc20IncentiveAbi, event>;\n\n/**\n * A simple ERC20 incentive implementation that allows claiming of tokens\n *\n * @export\n * @class ERC20Incentive\n * @typedef {ERC20Incentive}\n * @extends {DeployableTarget<ERC20IncentivePayload>}\n */\nexport class ERC20Incentive extends DeployableTarget<\n ERC20IncentivePayload,\n typeof erc20IncentiveAbi\n> {\n public override readonly abi = erc20IncentiveAbi;\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 ...(ERC20IncentiveBases 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 readErc20IncentiveOwner(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 readErc20IncentiveCurrentReward(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 readErc20IncentiveClaims(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 readErc20IncentiveClaimed(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 readErc20IncentiveAsset(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 strategy for the incentive (MINT or POOL)\n *\n * @public\n * @async\n * @param {?ReadParams} [params]\n * @returns {Promise<StrategyType>}\n */\n public strategy(params?: ReadParams): Promise<StrategyType> {\n return readErc20IncentiveStrategy(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 }) as Promise<StrategyType>;\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 readErc20IncentiveReward(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 claims, or max entries for raffles)\n *\n * @public\n * @async\n * @param {?ReadParams} [params]\n * @returns {Promise<bigint>}\n */\n public async limit(params?: ReadParams) {\n return await readErc20IncentiveLimit(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 set of addresses that have claimed a slot in the incentive raffle, accessed by bigint index.\n *\n * @public\n * @async\n * @param {bigint} i - Index of address\n * @param {?ReadParams} [params]\n * @returns {Promise<Address>}\n */\n public async entries(i: bigint, params?: ReadParams) {\n return await readErc20IncentiveEntries(this._config, {\n address: this.assertValidAddress(),\n args: [i],\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 simulateErc20IncentiveClaim(\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 writeErc20IncentiveClaim(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 simulateErc20IncentiveClawback(\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 writeErc20IncentiveClawback(this._config, request);\n return { hash, result };\n }\n\n /**\n * Check if an incentive is claimable. For the POOL strategy, the `bytes data` portion of the payload ignored. The recipient must not have already claimed the incentive.\n *\n * @public\n * @async\n * @param {ClaimPayload} payload\n * @param {?ReadParams} [params]\n * @returns {Promise<boolean>} = True if the incentive is claimable based on the data payload\n */\n public async isClaimable(payload: ClaimPayload, params?: ReadParams) {\n return await readErc20IncentiveIsClaimable(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 * Draw a winner from the raffle. Only callable by owner. Only valid when the strategy is set to `Strategy.RAFFLE`\n *\n * @public\n * @async\n * @param {?WriteParams} [params]\n * @returns {Promise<void>}\n */\n public async drawRaffle(params?: WriteParams) {\n return await this.awaitResult(this.drawRaffleRaw(params));\n }\n\n /**\n * Draw a winner from the raffle. Only callable by owner. Only valid when the strategy is set to `Strategy.RAFFLE`\n *\n * @public\n * @async\n * @param {?WriteParams} [params]\n * @returns {Promise<{ hash: `0x${string}`; result: void; }>}\n */\n public async drawRaffleRaw(params?: WriteParams) {\n const { request, result } = await simulateErc20IncentiveDrawRaffle(\n this._config,\n {\n address: this.assertValidAddress(),\n ...this.optionallyAttachAccount(),\n // biome-ignore lint/suspicious/noExplicitAny: Accept any shape of valid wagmi/viem parameters, wagmi does the same thing internally\n ...(params as any),\n },\n );\n const hash = await writeErc20IncentiveDrawRaffle(this._config, request);\n return { hash, result };\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 if (\n this.payload?.strategy !== undefined &&\n this.payload?.limit !== undefined &&\n this.payload?.reward !== undefined\n ) {\n return (this.payload.strategy as StrategyType) === StrategyType.POOL\n ? this.payload.limit * this.payload.reward\n : this.payload.reward;\n }\n const [strategy, limit, reward] = await Promise.all([\n this.strategy(params),\n this.limit(params),\n this.reward(params),\n ]);\n return strategy === StrategyType.POOL ? limit * reward : reward;\n }\n\n /**\n * Check if any claims remain by comparing the incentive's total claims against its limit. Does not take requesting user's elligibility into account.\n *\n * @public\n * @async\n * @param {?ReadParams} [params]\n * @returns {Promise<boolean>} - True if total claims is less than limit\n */\n public async canBeClaimed(params?: ReadParams) {\n return (await this.getRemainingClaimPotential(params)) > 0n;\n }\n\n /**\n * Check how many claims remain by comparing the incentive's total claims against its limit. Does not take requesting user's elligibility into account.\n *\n * @public\n * @async\n * @param {?ReadParams} [params]\n * @returns {Promise<bigint>} - True if total claims is less than limit\n */\n public async getRemainingClaimPotential(params?: ReadParams) {\n const [claims, limit] = await Promise.all([\n this.claims(params),\n this.limit(params),\n ]);\n return limit - claims;\n }\n\n /**\n * @inheritdoc\n *\n * @public\n * @param {?ERC20IncentivePayload} [_payload]\n * @param {?DeployableOptions} [_options]\n * @returns {GenericDeployableParams}\n */\n public override buildParameters(\n _payload?: ERC20IncentivePayload,\n _options?: DeployableOptions,\n ): GenericDeployableParams {\n const [payload, options] = this.validateDeploymentConfig(\n _payload,\n _options,\n );\n return {\n abi: erc20IncentiveAbi,\n bytecode: bytecode as Hex,\n args: [prepareERC20IncentivePayload(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 * A helper that composes a typed \"top-up\" parameter object\n * given a net top-up amount. You can name it whatever you like\n * (e.g. topupParamsFromNetAmount, getTopupPayload, etc.).\n *\n * @public\n * @param {bigint} netAmount The net top-up tokens the user wants to add\n * @param {?WriteParams} [params] (optional) if you need them\n * @returns {Hex} the ABI-encoded data for top-up\n */\n public async getTopupPayload(netAmount: bigint): Promise<Hex> {\n // 1. Build a typed object matching your `ERC20IncentivePayload`.\n // For example, you might want to increment `limit` by `netAmount`,\n // or set `reward = netAmount`. That’s up to your logic:\n const asset = await this.asset();\n const typed: ERC20IncentivePayload = {\n asset: asset || zeroAddress,\n strategy: StrategyType.POOL, // e.g. StrategyType.POOL\n reward: 1n, // store net top-up as the \"reward\"\n limit: netAmount, // or maybe add netAmount to existing limit\n manager: this.payload?.manager || zeroAddress,\n };\n\n // 2. Encode it with your existing `prepareERC20IncentivePayload(...)`.\n return prepareERC20IncentivePayload(typed);\n }\n\n /**\n * Builds the claim data for the ERC20Incentive.\n *\n * @public\n * @returns {Hash} A `zeroHash`, as ERC20Incentive doesn't require specific claim data.\n * @description This function returns `zeroHash` because ERC20Incentive doesn't use any specific claim data.\n */\n public buildClaimData() {\n return zeroHash;\n }\n}\n\n/**\n * Given a {@link ERC20IncentivePayload}, properly encode a `ERC20Incentive.InitPayload` for use with {@link ERC20Incentive} initialization.\n *\n * @param {ERC20IncentivePayload} param0\n * @param {Address} param0.asset - The address of the incentivized asset.\n * @param {StrategyType} param0.strategy - The type of disbursement strategy for the incentive. `StrategyType.MINT` is not supported for `ERC20Incentives`\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 draw raffles - defaults to unset\n * @returns {Hex}\n */\nexport function prepareERC20IncentivePayload({\n asset,\n strategy,\n reward,\n limit,\n manager = zeroAddress,\n}: ERC20IncentivePayload) {\n return encodeAbiParameters(\n [\n { type: 'address', name: 'asset' },\n { type: 'uint8', name: 'strategy' },\n { type: 'uint256', name: 'reward' },\n { type: 'uint256', name: 'limit' },\n { type: 'address', name: 'manager' },\n ],\n [\n asset,\n strategy,\n reward,\n // unclear how user set limit should work for raffle, so in order to avoid passing 0's let's correct it\n limit === 0n && strategy === StrategyType.RAFFLE ? 1n : limit,\n manager,\n ],\n );\n}\n"],"names":["_ERC20Incentive","DeployableTarget","erc20IncentiveAbi","params","readErc20IncentiveOwner","readErc20IncentiveCurrentReward","readErc20IncentiveClaims","address","readErc20IncentiveClaimed","readErc20IncentiveAsset","readErc20IncentiveStrategy","readErc20IncentiveReward","readErc20IncentiveLimit","i","readErc20IncentiveEntries","payload","request","result","simulateErc20IncentiveClaim","prepareClaimPayload","writeErc20IncentiveClaim","simulateErc20IncentiveClawback","writeErc20IncentiveClawback","readErc20IncentiveIsClaimable","simulateErc20IncentiveDrawRaffle","writeErc20IncentiveDrawRaffle","_a","_b","_c","StrategyType","strategy","limit","reward","claims","_payload","_options","options","bytecode","prepareERC20IncentivePayload","amount","encodeAbiParameters","netAmount","typed","zeroAddress","zeroHash","__vite_import_meta_env__","ERC20IncentiveBases","RegistryType","ERC20Incentive","asset","manager"],"mappings":"y5iBAiHaA,EAAN,MAAMA,UAAuBC,EAAAA,gBAGlC,CAHK,aAAA,CAAA,MAAA,GAAA,SAAA,EAIL,KAAyB,IAAMC,GAAA,CA+B/B,MAAa,MAAMC,EAAqB,CAC/B,OAAA,MAAMC,EAAAA,GAAwB,KAAK,QAAS,CACjD,QAAS,KAAK,mBAAmB,EACjC,KAAM,CAAC,EAEP,GAAID,CAAA,CACL,CACH,CAUA,MAAa,cAAcA,EAAqB,CACvC,OAAA,MAAME,EAAAA,GAAgC,KAAK,QAAS,CACzD,QAAS,KAAK,mBAAmB,EACjC,KAAM,CAAC,EAEP,GAAIF,CAAA,CACL,CACH,CAUA,MAAa,OAAOA,EAAqB,CAChC,OAAA,MAAMG,EAAAA,GAAyB,KAAK,QAAS,CAClD,QAAS,KAAK,mBAAmB,EACjC,KAAM,CAAC,EAEP,GAAIH,CAAA,CACL,CACH,CAWA,MAAa,QAAQI,EAAkBJ,EAAqB,CACnD,OAAA,MAAMK,EAAAA,GAA0B,KAAK,QAAS,CACnD,QAAS,KAAK,mBAAmB,EACjC,KAAM,CAACD,CAAO,EAEd,GAAIJ,CAAA,CACL,CACH,CAUA,MAAa,MAAMA,EAAqB,CAC/B,OAAA,MAAMM,EAAAA,GAAwB,KAAK,QAAS,CACjD,QAAS,KAAK,mBAAmB,EAEjC,GAAIN,CAAA,CACL,CACH,CAUO,SAASA,EAA4C,CACnD,OAAAO,EAAA,GAA2B,KAAK,QAAS,CAC9C,QAAS,KAAK,mBAAmB,EAEjC,GAAIP,CAAA,CACL,CACH,CAUA,MAAa,OAAOA,EAAqB,CAChC,OAAA,MAAMQ,EAAAA,GAAyB,KAAK,QAAS,CAClD,QAAS,KAAK,mBAAmB,EAEjC,GAAIR,CAAA,CACL,CACH,CAUA,MAAa,MAAMA,EAAqB,CAC/B,OAAA,MAAMS,EAAAA,GAAw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CAAA,EAEK,MAAA,CACL,IAAKjC,EAAA,EACL,SAAAmC,EACA,KAAM,CAACC,EAA6BvB,CAAO,CAAC,EAC5C,GAAG,KAAK,wBAAwBqB,EAAQ,OAAO,CAAA,CAEnD,CASO,kBAAkBG,EAAgB,CAChC,OAAAC,EAAAA,oBAAoB,CAAC,CAAE,KAAM,UAAW,EAAG,CAACD,CAAM,CAAC,CAC5D,CAYA,MAAa,gBAAgBE,EAAiC,OAK5D,MAAMC,EAA+B,CACnC,MAFY,MAAM,KAAK,SAEPC,EAAA,YAChB,SAAUd,EAAa,aAAA,KACvB,OAAQ,GACR,MAAOY,EACP,UAASf,EAAA,KAAK,UAAL,YAAAA,EAAc,UAAWiB,EAAA,WAAA,EAIpC,OAAOL,EAA6BI,CAAK,CAC3C,CASO,gBAAiB,CACf,OAAAE,UACT,CACF,EAlaE5C,EAAuB,MAAiC,CACtD,GAAI6C,GAAA,MAAAA,EAAiB,0BACjB,CAAE,MAAO,QACT,CAAC,EACL,GAAIC,EAAA,cAAA,EASN9C,EAAuB,aAA6B+C,EAAa,aAAA,UAzB5D,IAAMC,EAANhD,EA2bA,SAASsC,EAA6B,CAC3C,MAAAW,EACA,SAAAnB,EACA,OAAAE,EACA,MAAAD,EACA,QAAAmB,EAAUP,EAAA,WACZ,EAA0B,CACjB,OAAAH,EAAA,oBACL,CACE,CAAE,KAAM,UAAW,KAAM,OAAQ,EACjC,CAAE,KAAM,QAAS,KAAM,UAAW,EAClC,CAAE,KAAM,UAAW,KAAM,QAAS,EAClC,CAAE,KAAM,UAAW,KAAM,OAAQ,EACjC,CAAE,KAAM,UAAW,KAAM,SAAU,CACrC,EACA,CACES,EACAnB,EACAE,EAEAD,IAAU,IAAMD,IAAaD,EAAA,aAAa,OAAS,GAAKE,EACxDmB,CACF,CAAA,CAEJ"}
@@ -1 +1 @@
1
- {"version":3,"file":"ERC20Incentive.d.ts","sourceRoot":"","sources":["../../src/Incentives/ERC20Incentive.ts"],"names":[],"mappings":"AAA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;;;;;;OAMG;IACI,iBAAiB,CAAC,MAAM,EAAE,MAAM;IAIvC;;;;;;;;;OASG;IACU,eAAe,CAAC,SAAS,EAAE,MAAM,GAAG,OAAO,CAAC,GAAG,CAAC;IAiB7D;;;;;;OAMG;IACI,cAAc;CAGtB;AAED;;;;;;;;;;GAUG;AACH,wBAAgB,4BAA4B,CAAC,EAC3C,KAAK,EACL,QAAQ,EACR,MAAM,EACN,KAAK,EACL,OAAqB,GACtB,EAAE,qBAAqB,iBAkBvB"}
@@ -1,12 +1,12 @@
1
- import { T as n, aQ as g, aR as w, aS as m, aT as p, aU as A, aV as M, aW as R, aX as V, aY as _, aZ as P, a_ as C, a$ as T, b0 as O, b1 as k, b2 as v, b3 as x } from "../generated-CINzoGbl.js";
2
- import { encodeAbiParameters as y, zeroAddress as t, zeroHash as D } from "viem";
3
- import { E as L } from "../deployments-DKtAq6BT.js";
4
- import { DeployableTarget as q } from "../Deployable/DeployableTarget.js";
5
- import { prepareClaimPayload as o, StrategyType as c } from "../claiming.js";
6
- import { RegistryType as z } from "../utils.js";
7
- const B = "0x6080604052348015600e575f80fd5b5060156019565b607c565b63409feecd198054600181161560365763f92ee8a95f526004601cfd5b6001600160401b03808260011c146077578060011b8355806020527fc7f505b2f371ae2175ee4913f4499e1f2633a7b5936321eed1cdaeb6115181d2602080a15b505050565b612149806100895f395ff3fe608060405260043610610243575f3560e01c806354d1f13d11610131578063c884ef83116100ac578063ec87621c1161007c578063f2fde38b11610062578063f2fde38b14610677578063fe9fbb801461068a578063fee81cf4146106a9575f80fd5b8063ec87621c14610650578063f04e283e14610664575f80fd5b8063c884ef83146105cf578063db09da12146105fd578063dcc213611461061c578063dcc59b6f1461063b575f80fd5b8063a4d66daf11610101578063b30906d4116100e7578063b30906d414610572578063bb1757cf14610591578063be4994f8146105b0575f80fd5b8063a4d66daf14610537578063a8c62e761461054c575f80fd5b806354d1f13d146104fb578063715018a61461050357806375b238fc1461050b5780638da5cb5b1461051f575f80fd5b80632de94807116101c1578063439fab91116101915780634a4ee7b1116101775780634a4ee7b1146104875780634e7165a21461049a578063514e62fc146104c6575f80fd5b8063439fab911461041f578063474f5a441461043e575f80fd5b80632de948071461035f57806330db555f1461039057806338d52e0f146103af5780634359d28a14610400575f80fd5b80631cd64df411610216578063228cb733116101fc578063228cb73314610309578063256929621461031d57806328d6183b14610325575f80fd5b80631cd64df4146102c05780632275aea9146102f5575f80fd5b806301ffc9a71461024757806307621eca1461027b578063183a4f6e146102985780631c10893f146102ad575b5f80fd5b348015610252575f80fd5b506102666102613660046119ee565b6106da565b60405190151581526020015b60405180910390f35b348015610286575f80fd5b505f545b604051908152602001610272565b6102ab6102a6366004611a2d565b610735565b005b6102ab6102bb366004611a6c565b610742565b3480156102cb575f80fd5b506102666102da366004611a6c565b638b78c6d8600c9081525f9290925260209091205481161490565b348015610300575f80fd5b506102ab610758565b348015610314575f80fd5b5061028a5f5481565b6102ab6108d7565b348015610330575f80fd5b506040517f7cc1d5bb000000000000000000000000000000000000000000000000000000008152602001610272565b34801561036a575f80fd5b5061028a610379366004611a94565b638b78c6d8600c9081525f91909152602090205490565b34801561039b575f80fd5b506102ab6103aa366004611a2d565b610924565b3480156103ba575f80fd5b506004546103db9073ffffffffffffffffffffffffffffffffffffffff1681565b60405173ffffffffffffffffffffffffffffffffffffffff9091168152602001610272565b34801561040b575f80fd5b506102ab61041a366004611af5565b610a83565b34801561042a575f80fd5b506102ab610439366004611b9f565b610b7d565b348015610449575f80fd5b5061045d610458366004611b9f565b610e4a565b6040805192835273ffffffffffffffffffffffffffffffffffffffff909116602083015201610272565b6102ab610495366004611a6c565b61104d565b3480156104a5575f80fd5b506104b96104b4366004611b9f565b61105f565b6040516102729190611c0c565b3480156104d1575f80fd5b506102666104e0366004611a6c565b638b78c6d8600c9081525f9290925260209091205416151590565b6102ab61112f565b6102ab611168565b348015610516575f80fd5b5061028a600281565b34801561052a575f80fd5b50638b78c6d819546103db565b348015610542575f80fd5b5061028a60065481565b348015610557575f80fd5b506002546105659060ff1681565b6040516102729190611c5f565b34801561057d575f80fd5b506103db61058c366004611a2d565b61117b565b34801561059c575f80fd5b506102666105ab366004611c6d565b6111b0565b3480156105bb575f80fd5b506102ab6105ca366004611af5565b611421565b3480156105da575f80fd5b506102666105e9366004611a94565b60016020525f908152604090205460ff1681565b348015610608575f80fd5b50610266610617366004611c6d565b6114bf565b348015610627575f80fd5b506102ab610636366004611af5565b6114d1565b348015610646575f80fd5b5061028a60055481565b34801561065b575f80fd5b5061028a600181565b6102ab610672366004611a94565b61156f565b6102ab610685366004611a94565b6115a9565b348015610695575f80fd5b506102666106a4366004611a94565b6115cf565b3480156106b4575f80fd5b5061028a6106c3366004611a94565b63389a75e1600c9081525f91909152602090205490565b5f7fffffffff0000000000000000000000000000000000000000000000000000000082167f7cc1d5bb00000000000000000000000000000000000000000000000000000000148061072f575061072f8261162e565b92915050565b61073f3382611683565b50565b61074a61168e565b61075482826116a8565b5050565b6001610763816116b4565b600160025460ff16600181111561077c5761077c611c1e565b146107b3576040517f82b4290000000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b5f604051806020016040528042446107cb9190611ce9565b905260038054602083208084529293505f926107e79190611d29565b815481106107f7576107f7611d3c565b5f918252602082200154905460045473ffffffffffffffffffffffffffffffffffffffff928316935061082d92169083906116d8565b6004545f546040517fffffffffffffffffffffffffffffffffffffffff000000000000000000000000606093841b811660208301529284901b9092166034830152604882015273ffffffffffffffffffffffffffffffffffffffff8216907f9ad2e7a4af16dceda9cce4274b2f59c328d8c012eb0e15eb5e1e73b7d8f264d39060680160408051601f19818403018152908290526108ca91611c0c565b60405180910390a2505050565b5f6202a30067ffffffffffffffff164201905063389a75e1600c52335f52806020600c2055337fdbf36a107da19e49527a7176a1babf963b4b0ff8cde35ee35d6cd8f1f9ac7e1d5f80a250565b600161092f8161172b565b815f03610968576040517ff92ee8a900000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b60045461098d9073ffffffffffffffffffffffffffffffffffffffff1633308561175c565b600160025460ff1660018111156109a6576109a6611c1e565b036109dd576040517f82b4290000000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b5f546109e99083611d29565b15610a20576040517ff92ee8a900000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b5f8054610a2d9084611d69565b90508060065f828254610a409190611ce9565b909155505060408051338152602081018590527fa64c2da41decbd538f8629e54c8fa0b7362c9102b691386a0fb6a1797454e9c6910160405180910390a1505050565b6002610a8e8161172b565b838214610ac7576040517fff633a3800000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b5f5b84811015610b75575f848483818110610ae457610ae4611d3c565b9050602002016020810190610af99190611d7c565b9050801515600103610b3b57610b36878784818110610b1a57610b1a611d3c565b9050602002016020810190610b2f9190611a94565b60016116a8565b610b6c565b610b6c878784818110610b5057610b50611d3c565b9050602002016020810190610b659190611a94565b6001611683565b50600101610ac9565b505050505050565b7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffbf6011328054600382558015610bce5760018160011c14303b10610bc55763f92ee8a95f526004601cfd5b818160ff1b1b91505b505f610bdc83850185611e22565b905080604001515f1480610bf257506060810151155b15610c29576040517ff92ee8a900000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b5f600182602001516001811115610c4257610c42611c1e565b03610c51578160400151610c65565b81606001518260400151610c659190611ea7565b82519091505f90610c8c9073ffffffffffffffffffffffffffffffffffffffff16306117be565b905081811015610cf65782516040517f5c54305e00000000000000000000000000000000000000000000000000000000815273ffffffffffffffffffffffffffffffffffffffff909116600482015260248101829052604481018390526064015b60405180910390fd5b8251600480547fffffffffffffffffffffffff00000000000000000000000000000000000000001673ffffffffffffffffffffffffffffffffffffffff9092169190911790556020830151600280547fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff001660018381811115610d7a57610d7a611c1e565b021790555060408301515f556060830151600655610d97336117f1565b610da683608001516001611839565b825f015173ffffffffffffffffffffffffffffffffffffffff167fe83379cf1b79044fa1d0063e68012349f4f5fb730e6a875bdc9d463747ecd0858460200151856040015186606001518760800151604051610e059493929190611ebe565b60405180910390a25050508015610e45576002815560016020527fc7f505b2f371ae2175ee4913f4499e1f2633a7b5936321eed1cdaeb6115181d2602080a15b505050565b5f806001610e578161172b565b5f610e6485870187611efd565b90505f8160200151806020019051810190610e7f9190611fd4565b9050600160025460ff166001811115610e9a57610e9a611c1e565b03610f11575f5481141580610eb057505f600554115b15610f08573382604051602001610ec79190611feb565b60408051601f19818403018152908290527f4139d81d000000000000000000000000000000000000000000000000000000008252610ced9291600401612025565b5f600655610f56565b5f54610f1d9082611d29565b15610f34573382604051602001610ec79190611feb565b5f54610f409082611d69565b60065f828254610f509190612053565b90915550505b8151600454610f7e9173ffffffffffffffffffffffffffffffffffffffff90911690836116d8565b81516004546040517fffffffffffffffffffffffffffffffffffffffff000000000000000000000000606092831b811660208301529183901b90911660348201526048810183905273ffffffffffffffffffffffffffffffffffffffff909116907f9ad2e7a4af16dceda9cce4274b2f59c328d8c012eb0e15eb5e1e73b7d8f264d39060680160408051601f198184030181529082905261101e91611c0c565b60405180910390a260045490945073ffffffffffffffffffffffffffffffffffffffff16925050509250929050565b61105561168e565b6107548282611683565b60605f61106e83850185611e22565b90505f60018260200151600181111561108957611089611c1e565b036110985781604001516110ac565b816060015182604001516110ac9190611ea7565b6040805160808101825260018152845173ffffffffffffffffffffffffffffffffffffffff16602080830191909152308284015282518082018452849052825180820185905283518082038301815290840184526060830152915192935061111692909101612066565b6040516020818303038152906040529250505092915050565b63389a75e1600c52335f525f6020600c2055337ffa7b8eab7da67f412cc9575ed43464468f9bfbae89d1675917346ca6d8fe3c925f80a2565b61117061168e565b6111795f61187a565b565b6003818154811061118a575f80fd5b5f9182526020909120015473ffffffffffffffffffffffffffffffffffffffff16905081565b5f6111b961168e565b6111c2846118c4565b6111f8576040517f6247a84e00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b5f60025460ff16600181111561121057611210611c1e565b036113375760058054905f611224836120dc565b909155505073ffffffffffffffffffffffffffffffffffffffff8085165f908152600160208190526040822080547fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff001690911790555460045461128a92169086906116d8565b6004545f546040517fffffffffffffffffffffffffffffffffffffffff000000000000000000000000606093841b811660208301529287901b9092166034830152604882015273ffffffffffffffffffffffffffffffffffffffff8516907f9ad2e7a4af16dceda9cce4274b2f59c328d8c012eb0e15eb5e1e73b7d8f264d39060680160408051601f198184030181529082905261132791611c0c565b60405180910390a250600161141a565b60058054905f611346836120dc565b909155505073ffffffffffffffffffffffffffffffffffffffff84165f81815260016020819052604080832080547fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff00168317905560038054928301815583527fc2575a0e9e593c00f959f8c92f12db2869c3395a3b0502d05e2516446f71f85b90910180547fffffffffffffffffffffffff00000000000000000000000000000000000000001684179055517ff0abe0f5c6f02112a9a4332e7b091bf49040ffddeedb73785a9b9a0a3ca7f1539190a25060015b9392505050565b600261142c8161172b565b838214611465576040517fff633a3800000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b5f5b84811015610b75576114b786868381811061148457611484611d3c565b90506020020160208101906114999190611a94565b8585848181106114ab576114ab611d3c565b905060200201356116a8565b600101611467565b5f6114c9846118c4565b949350505050565b60026114dc8161172b565b838214611515576040517fff633a3800000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b5f5b84811015610b755761156786868381811061153457611534611d3c565b90506020020160208101906115499190611a94565b85858481811061155b5761155b611d3c565b90506020020135611683565b600101611517565b61157761168e565b63389a75e1600c52805f526020600c20805442111561159d57636f5e88185f526004601cfd5b5f905561073f8161187a565b6115b161168e565b8060601b6115c657637448fbae5f526004601cfd5b61073f8161187a565b5f8173ffffffffffffffffffffffffffffffffffffffff166115f4638b78c6d8195490565b73ffffffffffffffffffffffffffffffffffffffff16148061072f5750638b78c6d8600c9081525f8390526020902054600316151561072f565b5f7fffffffff0000000000000000000000000000000000000000000000000000000082167fa921670500000000000000000000000000000000000000000000000000000000148061072f575061072f82611901565b61075482825f611997565b638b78c6d819543314611179576382b429005f526004601cfd5b61075482826001611997565b638b78c6d8600c52335f52806020600c20541661073f576382b429005f526004601cfd5b81601452806034526fa9059cbb0000000000000000000000005f5260205f604460105f875af18060015f51141661172157803d853b151710611721576390b8ec185f526004601cfd5b505f603452505050565b638b78c6d81954331461073f57638b78c6d8600c52335f52806020600c20541661073f576382b429005f526004601cfd5b60405181606052826040528360601b602c526f23b872dd000000000000000000000000600c5260205f6064601c5f895af18060015f5114166117b057803d873b1517106117b057637939f4245f526004601cfd5b505f60605260405250505050565b5f816014526f70a082310000000000000000000000005f5260208060246010865afa601f3d111660205102905092915050565b73ffffffffffffffffffffffffffffffffffffffff16638b78c6d819819055805f7f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e08180a350565b638b78c6d8600c52815f52806020600c205580600c5160601c7f715ad5ce61fc9595c7b415289d59cf203f23a94fa06f04af7e489a0a76e1fe265f80a35050565b638b78c6d819805473ffffffffffffffffffffffffffffffffffffffff9092169182907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e05f80a355565b73ffffffffffffffffffffffffffffffffffffffff81165f9081526001602052604081205460ff1615801561072f57506006546005541092915050565b5f7fffffffff0000000000000000000000000000000000000000000000000000000082167f6ab67a0d00000000000000000000000000000000000000000000000000000000148061072f57507f01ffc9a7000000000000000000000000000000000000000000000000000000007fffffffff0000000000000000000000000000000000000000000000000000000083161461072f565b638b78c6d8600c52825f526020600c208054838117836119b8575080841681185b80835580600c5160601c7f715ad5ce61fc9595c7b415289d59cf203f23a94fa06f04af7e489a0a76e1fe265f80a3505050505050565b5f602082840312156119fe575f80fd5b81357fffffffff000000000000000000000000000000000000000000000000000000008116811461141a575f80fd5b5f60208284031215611a3d575f80fd5b5035919050565b803573ffffffffffffffffffffffffffffffffffffffff81168114611a67575f80fd5b919050565b5f8060408385031215611a7d575f80fd5b611a8683611a44565b946020939093013593505050565b5f60208284031215611aa4575f80fd5b61141a82611a44565b5f8083601f840112611abd575f80fd5b50813567ffffffffffffffff811115611ad4575f80fd5b6020830191508360208260051b8501011115611aee575f80fd5b9250929050565b5f805f8060408587031215611b08575f80fd5b843567ffffffffffffffff811115611b1e575f80fd5b611b2a87828801611aad565b909550935050602085013567ffffffffffffffff811115611b49575f80fd5b611b5587828801611aad565b95989497509550505050565b5f8083601f840112611b71575f80fd5b50813567ffffffffffffffff811115611b88575f80fd5b602083019150836020828501011115611aee575f80fd5b5f8060208385031215611bb0575f80fd5b823567ffffffffffffffff811115611bc6575f80fd5b611bd285828601611b61565b90969095509350505050565b5f81518084528060208401602086015e5f602082860101526020601f19601f83011685010191505092915050565b602081525f61141a6020830184611bde565b7f4e487b71000000000000000000000000000000000000000000000000000000005f52602160045260245ffd5b60028110611c5b57611c5b611c1e565b9052565b6020810161072f8284611c4b565b5f805f60408486031215611c7f575f80fd5b611c8884611a44565b9250602084013567ffffffffffffffff811115611ca3575f80fd5b611caf86828701611b61565b9497909650939450505050565b7f4e487b71000000000000000000000000000000000000000000000000000000005f52601160045260245ffd5b8082018082111561072f5761072f611cbc565b7f4e487b71000000000000000000000000000000000000000000000000000000005f52601260045260245ffd5b5f82611d3757611d37611cfc565b500690565b7f4e487b71000000000000000000000000000000000000000000000000000000005f52603260045260245ffd5b5f82611d7757611d77611cfc565b500490565b5f60208284031215611d8c575f80fd5b8135801515811461141a575f80fd5b7f4e487b71000000000000000000000000000000000000000000000000000000005f52604160045260245ffd5b6040805190810167ffffffffffffffff81118282101715611deb57611deb611d9b565b60405290565b604051601f8201601f1916810167ffffffffffffffff81118282101715611e1a57611e1a611d9b565b604052919050565b5f60a0828403128015611e33575f80fd5b5060405160a0810167ffffffffffffffff81118282101715611e5757611e57611d9b565b604052611e6383611a44565b8152602083013560028110611e76575f80fd5b60208201526040838101359082015260608084013590820152611e9b60808401611a44565b60808201529392505050565b808202811582820484141761072f5761072f611cbc565b60808101611ecc8287611c4b565b84602083015283604083015273ffffffffffffffffffffffffffffffffffffffff8316606083015295945050505050565b5f60208284031215611f0d575f80fd5b813567ffffffffffffffff811115611f23575f80fd5b820160408185031215611f34575f80fd5b611f3c611dc8565b611f4582611a44565b8152602082013567ffffffffffffffff811115611f60575f80fd5b80830192505084601f830112611f74575f80fd5b813567ffffffffffffffff811115611f8e57611f8e611d9b565b611fa16020601f19601f84011601611df1565b818152866020838601011115611fb5575f80fd5b816020850160208301375f602092820183015290820152949350505050565b5f60208284031215611fe4575f80fd5b5051919050565b6020815273ffffffffffffffffffffffffffffffffffffffff82511660208201525f60208301516040808401526114c96060840182611bde565b73ffffffffffffffffffffffffffffffffffffffff83168152604060208201525f6114c96040830184611bde565b8181038181111561072f5761072f611cbc565b602081525f82516003811061207d5761207d611c1e565b8060208401525073ffffffffffffffffffffffffffffffffffffffff602084015116604083015273ffffffffffffffffffffffffffffffffffffffff604084015116606083015260608301516080808401526114c960a0840182611bde565b5f7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff820361210c5761210c611cbc565b506001019056fea26469706673582212209def68a22e935c7af91e946bb2187abd14944a4cd3b455abbdb234120eea61b564736f6c634300081a0033", s = class s extends q {
1
+ import { T as o, aQ as g, aR as m, aS as p, aT as A, aU as R, aV as E, aW as _, aX as T, aY as V, aZ as O, a_ as P, a$ as C, b0 as M, b1 as S, b2 as B, b3 as I } from "../generated-ffteMTHN.js";
2
+ import { encodeAbiParameters as y, zeroAddress as i, zeroHash as D } from "viem";
3
+ import { E as N } from "../deployments-B-ZU0zVY.js";
4
+ import { DeployableTarget as k } from "../Deployable/DeployableTarget.js";
5
+ import { prepareClaimPayload as l, StrategyType as c } from "../claiming.js";
6
+ import { RegistryType as x } from "../utils.js";
7
+ const F = "0x6080604052348015600e575f80fd5b5060156019565b607c565b63409feecd198054600181161560365763f92ee8a95f526004601cfd5b6001600160401b03808260011c146077578060011b8355806020527fc7f505b2f371ae2175ee4913f4499e1f2633a7b5936321eed1cdaeb6115181d2602080a15b505050565b612149806100895f395ff3fe608060405260043610610243575f3560e01c806354d1f13d11610131578063c884ef83116100ac578063ec87621c1161007c578063f2fde38b11610062578063f2fde38b14610677578063fe9fbb801461068a578063fee81cf4146106a9575f80fd5b8063ec87621c14610650578063f04e283e14610664575f80fd5b8063c884ef83146105cf578063db09da12146105fd578063dcc213611461061c578063dcc59b6f1461063b575f80fd5b8063a4d66daf11610101578063b30906d4116100e7578063b30906d414610572578063bb1757cf14610591578063be4994f8146105b0575f80fd5b8063a4d66daf14610537578063a8c62e761461054c575f80fd5b806354d1f13d146104fb578063715018a61461050357806375b238fc1461050b5780638da5cb5b1461051f575f80fd5b80632de94807116101c1578063439fab91116101915780634a4ee7b1116101775780634a4ee7b1146104875780634e7165a21461049a578063514e62fc146104c6575f80fd5b8063439fab911461041f578063474f5a441461043e575f80fd5b80632de948071461035f57806330db555f1461039057806338d52e0f146103af5780634359d28a14610400575f80fd5b80631cd64df411610216578063228cb733116101fc578063228cb73314610309578063256929621461031d57806328d6183b14610325575f80fd5b80631cd64df4146102c05780632275aea9146102f5575f80fd5b806301ffc9a71461024757806307621eca1461027b578063183a4f6e146102985780631c10893f146102ad575b5f80fd5b348015610252575f80fd5b506102666102613660046119ee565b6106da565b60405190151581526020015b60405180910390f35b348015610286575f80fd5b505f545b604051908152602001610272565b6102ab6102a6366004611a2d565b610735565b005b6102ab6102bb366004611a6c565b610742565b3480156102cb575f80fd5b506102666102da366004611a6c565b638b78c6d8600c9081525f9290925260209091205481161490565b348015610300575f80fd5b506102ab610758565b348015610314575f80fd5b5061028a5f5481565b6102ab6108d7565b348015610330575f80fd5b506040517f7cc1d5bb000000000000000000000000000000000000000000000000000000008152602001610272565b34801561036a575f80fd5b5061028a610379366004611a94565b638b78c6d8600c9081525f91909152602090205490565b34801561039b575f80fd5b506102ab6103aa366004611a2d565b610924565b3480156103ba575f80fd5b506004546103db9073ffffffffffffffffffffffffffffffffffffffff1681565b60405173ffffffffffffffffffffffffffffffffffffffff9091168152602001610272565b34801561040b575f80fd5b506102ab61041a366004611af5565b610a83565b34801561042a575f80fd5b506102ab610439366004611b9f565b610b7d565b348015610449575f80fd5b5061045d610458366004611b9f565b610e4a565b6040805192835273ffffffffffffffffffffffffffffffffffffffff909116602083015201610272565b6102ab610495366004611a6c565b61104d565b3480156104a5575f80fd5b506104b96104b4366004611b9f565b61105f565b6040516102729190611c0c565b3480156104d1575f80fd5b506102666104e0366004611a6c565b638b78c6d8600c9081525f9290925260209091205416151590565b6102ab61112f565b6102ab611168565b348015610516575f80fd5b5061028a600281565b34801561052a575f80fd5b50638b78c6d819546103db565b348015610542575f80fd5b5061028a60065481565b348015610557575f80fd5b506002546105659060ff1681565b6040516102729190611c5f565b34801561057d575f80fd5b506103db61058c366004611a2d565b61117b565b34801561059c575f80fd5b506102666105ab366004611c6d565b6111b0565b3480156105bb575f80fd5b506102ab6105ca366004611af5565b611421565b3480156105da575f80fd5b506102666105e9366004611a94565b60016020525f908152604090205460ff1681565b348015610608575f80fd5b50610266610617366004611c6d565b6114bf565b348015610627575f80fd5b506102ab610636366004611af5565b6114d1565b348015610646575f80fd5b5061028a60055481565b34801561065b575f80fd5b5061028a600181565b6102ab610672366004611a94565b61156f565b6102ab610685366004611a94565b6115a9565b348015610695575f80fd5b506102666106a4366004611a94565b6115cf565b3480156106b4575f80fd5b5061028a6106c3366004611a94565b63389a75e1600c9081525f91909152602090205490565b5f7fffffffff0000000000000000000000000000000000000000000000000000000082167f7cc1d5bb00000000000000000000000000000000000000000000000000000000148061072f575061072f8261162e565b92915050565b61073f3382611683565b50565b61074a61168e565b61075482826116a8565b5050565b6001610763816116b4565b600160025460ff16600181111561077c5761077c611c1e565b146107b3576040517f82b4290000000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b5f604051806020016040528042446107cb9190611ce9565b905260038054602083208084529293505f926107e79190611d29565b815481106107f7576107f7611d3c565b5f918252602082200154905460045473ffffffffffffffffffffffffffffffffffffffff928316935061082d92169083906116d8565b6004545f546040517fffffffffffffffffffffffffffffffffffffffff000000000000000000000000606093841b811660208301529284901b9092166034830152604882015273ffffffffffffffffffffffffffffffffffffffff8216907f9ad2e7a4af16dceda9cce4274b2f59c328d8c012eb0e15eb5e1e73b7d8f264d39060680160408051601f19818403018152908290526108ca91611c0c565b60405180910390a2505050565b5f6202a30067ffffffffffffffff164201905063389a75e1600c52335f52806020600c2055337fdbf36a107da19e49527a7176a1babf963b4b0ff8cde35ee35d6cd8f1f9ac7e1d5f80a250565b600161092f8161172b565b815f03610968576040517ff92ee8a900000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b60045461098d9073ffffffffffffffffffffffffffffffffffffffff1633308561175c565b600160025460ff1660018111156109a6576109a6611c1e565b036109dd576040517f82b4290000000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b5f546109e99083611d29565b15610a20576040517ff92ee8a900000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b5f8054610a2d9084611d69565b90508060065f828254610a409190611ce9565b909155505060408051338152602081018590527fa64c2da41decbd538f8629e54c8fa0b7362c9102b691386a0fb6a1797454e9c6910160405180910390a1505050565b6002610a8e8161172b565b838214610ac7576040517fff633a3800000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b5f5b84811015610b75575f848483818110610ae457610ae4611d3c565b9050602002016020810190610af99190611d7c565b9050801515600103610b3b57610b36878784818110610b1a57610b1a611d3c565b9050602002016020810190610b2f9190611a94565b60016116a8565b610b6c565b610b6c878784818110610b5057610b50611d3c565b9050602002016020810190610b659190611a94565b6001611683565b50600101610ac9565b505050505050565b7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffbf6011328054600382558015610bce5760018160011c14303b10610bc55763f92ee8a95f526004601cfd5b818160ff1b1b91505b505f610bdc83850185611e22565b905080604001515f1480610bf257506060810151155b15610c29576040517ff92ee8a900000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b5f600182602001516001811115610c4257610c42611c1e565b03610c51578160400151610c65565b81606001518260400151610c659190611ea7565b82519091505f90610c8c9073ffffffffffffffffffffffffffffffffffffffff16306117be565b905081811015610cf65782516040517f5c54305e00000000000000000000000000000000000000000000000000000000815273ffffffffffffffffffffffffffffffffffffffff909116600482015260248101829052604481018390526064015b60405180910390fd5b8251600480547fffffffffffffffffffffffff00000000000000000000000000000000000000001673ffffffffffffffffffffffffffffffffffffffff9092169190911790556020830151600280547fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff001660018381811115610d7a57610d7a611c1e565b021790555060408301515f556060830151600655610d97336117f1565b610da683608001516001611839565b825f015173ffffffffffffffffffffffffffffffffffffffff167fe83379cf1b79044fa1d0063e68012349f4f5fb730e6a875bdc9d463747ecd0858460200151856040015186606001518760800151604051610e059493929190611ebe565b60405180910390a25050508015610e45576002815560016020527fc7f505b2f371ae2175ee4913f4499e1f2633a7b5936321eed1cdaeb6115181d2602080a15b505050565b5f806001610e578161172b565b5f610e6485870187611efd565b90505f8160200151806020019051810190610e7f9190611fd4565b9050600160025460ff166001811115610e9a57610e9a611c1e565b03610f11575f5481141580610eb057505f600554115b15610f08573382604051602001610ec79190611feb565b60408051601f19818403018152908290527f4139d81d000000000000000000000000000000000000000000000000000000008252610ced9291600401612025565b5f600655610f56565b5f54610f1d9082611d29565b15610f34573382604051602001610ec79190611feb565b5f54610f409082611d69565b60065f828254610f509190612053565b90915550505b8151600454610f7e9173ffffffffffffffffffffffffffffffffffffffff90911690836116d8565b81516004546040517fffffffffffffffffffffffffffffffffffffffff000000000000000000000000606092831b811660208301529183901b90911660348201526048810183905273ffffffffffffffffffffffffffffffffffffffff909116907f9ad2e7a4af16dceda9cce4274b2f59c328d8c012eb0e15eb5e1e73b7d8f264d39060680160408051601f198184030181529082905261101e91611c0c565b60405180910390a260045490945073ffffffffffffffffffffffffffffffffffffffff16925050509250929050565b61105561168e565b6107548282611683565b60605f61106e83850185611e22565b90505f60018260200151600181111561108957611089611c1e565b036110985781604001516110ac565b816060015182604001516110ac9190611ea7565b6040805160808101825260018152845173ffffffffffffffffffffffffffffffffffffffff16602080830191909152308284015282518082018452849052825180820185905283518082038301815290840184526060830152915192935061111692909101612066565b6040516020818303038152906040529250505092915050565b63389a75e1600c52335f525f6020600c2055337ffa7b8eab7da67f412cc9575ed43464468f9bfbae89d1675917346ca6d8fe3c925f80a2565b61117061168e565b6111795f61187a565b565b6003818154811061118a575f80fd5b5f9182526020909120015473ffffffffffffffffffffffffffffffffffffffff16905081565b5f6111b961168e565b6111c2846118c4565b6111f8576040517f6247a84e00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b5f60025460ff16600181111561121057611210611c1e565b036113375760058054905f611224836120dc565b909155505073ffffffffffffffffffffffffffffffffffffffff8085165f908152600160208190526040822080547fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff001690911790555460045461128a92169086906116d8565b6004545f546040517fffffffffffffffffffffffffffffffffffffffff000000000000000000000000606093841b811660208301529287901b9092166034830152604882015273ffffffffffffffffffffffffffffffffffffffff8516907f9ad2e7a4af16dceda9cce4274b2f59c328d8c012eb0e15eb5e1e73b7d8f264d39060680160408051601f198184030181529082905261132791611c0c565b60405180910390a250600161141a565b60058054905f611346836120dc565b909155505073ffffffffffffffffffffffffffffffffffffffff84165f81815260016020819052604080832080547fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff00168317905560038054928301815583527fc2575a0e9e593c00f959f8c92f12db2869c3395a3b0502d05e2516446f71f85b90910180547fffffffffffffffffffffffff00000000000000000000000000000000000000001684179055517ff0abe0f5c6f02112a9a4332e7b091bf49040ffddeedb73785a9b9a0a3ca7f1539190a25060015b9392505050565b600261142c8161172b565b838214611465576040517fff633a3800000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b5f5b84811015610b75576114b786868381811061148457611484611d3c565b90506020020160208101906114999190611a94565b8585848181106114ab576114ab611d3c565b905060200201356116a8565b600101611467565b5f6114c9846118c4565b949350505050565b60026114dc8161172b565b838214611515576040517fff633a3800000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b5f5b84811015610b755761156786868381811061153457611534611d3c565b90506020020160208101906115499190611a94565b85858481811061155b5761155b611d3c565b90506020020135611683565b600101611517565b61157761168e565b63389a75e1600c52805f526020600c20805442111561159d57636f5e88185f526004601cfd5b5f905561073f8161187a565b6115b161168e565b8060601b6115c657637448fbae5f526004601cfd5b61073f8161187a565b5f8173ffffffffffffffffffffffffffffffffffffffff166115f4638b78c6d8195490565b73ffffffffffffffffffffffffffffffffffffffff16148061072f5750638b78c6d8600c9081525f8390526020902054600316151561072f565b5f7fffffffff0000000000000000000000000000000000000000000000000000000082167fa921670500000000000000000000000000000000000000000000000000000000148061072f575061072f82611901565b61075482825f611997565b638b78c6d819543314611179576382b429005f526004601cfd5b61075482826001611997565b638b78c6d8600c52335f52806020600c20541661073f576382b429005f526004601cfd5b81601452806034526fa9059cbb0000000000000000000000005f5260205f604460105f875af18060015f51141661172157803d853b151710611721576390b8ec185f526004601cfd5b505f603452505050565b638b78c6d81954331461073f57638b78c6d8600c52335f52806020600c20541661073f576382b429005f526004601cfd5b60405181606052826040528360601b602c526f23b872dd000000000000000000000000600c5260205f6064601c5f895af18060015f5114166117b057803d873b1517106117b057637939f4245f526004601cfd5b505f60605260405250505050565b5f816014526f70a082310000000000000000000000005f5260208060246010865afa601f3d111660205102905092915050565b73ffffffffffffffffffffffffffffffffffffffff16638b78c6d819819055805f7f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e08180a350565b638b78c6d8600c52815f52806020600c205580600c5160601c7f715ad5ce61fc9595c7b415289d59cf203f23a94fa06f04af7e489a0a76e1fe265f80a35050565b638b78c6d819805473ffffffffffffffffffffffffffffffffffffffff9092169182907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e05f80a355565b73ffffffffffffffffffffffffffffffffffffffff81165f9081526001602052604081205460ff1615801561072f57506006546005541092915050565b5f7fffffffff0000000000000000000000000000000000000000000000000000000082167f6ab67a0d00000000000000000000000000000000000000000000000000000000148061072f57507f01ffc9a7000000000000000000000000000000000000000000000000000000007fffffffff0000000000000000000000000000000000000000000000000000000083161461072f565b638b78c6d8600c52825f526020600c208054838117836119b8575080841681185b80835580600c5160601c7f715ad5ce61fc9595c7b415289d59cf203f23a94fa06f04af7e489a0a76e1fe265f80a3505050505050565b5f602082840312156119fe575f80fd5b81357fffffffff000000000000000000000000000000000000000000000000000000008116811461141a575f80fd5b5f60208284031215611a3d575f80fd5b5035919050565b803573ffffffffffffffffffffffffffffffffffffffff81168114611a67575f80fd5b919050565b5f8060408385031215611a7d575f80fd5b611a8683611a44565b946020939093013593505050565b5f60208284031215611aa4575f80fd5b61141a82611a44565b5f8083601f840112611abd575f80fd5b50813567ffffffffffffffff811115611ad4575f80fd5b6020830191508360208260051b8501011115611aee575f80fd5b9250929050565b5f805f8060408587031215611b08575f80fd5b843567ffffffffffffffff811115611b1e575f80fd5b611b2a87828801611aad565b909550935050602085013567ffffffffffffffff811115611b49575f80fd5b611b5587828801611aad565b95989497509550505050565b5f8083601f840112611b71575f80fd5b50813567ffffffffffffffff811115611b88575f80fd5b602083019150836020828501011115611aee575f80fd5b5f8060208385031215611bb0575f80fd5b823567ffffffffffffffff811115611bc6575f80fd5b611bd285828601611b61565b90969095509350505050565b5f81518084528060208401602086015e5f602082860101526020601f19601f83011685010191505092915050565b602081525f61141a6020830184611bde565b7f4e487b71000000000000000000000000000000000000000000000000000000005f52602160045260245ffd5b60028110611c5b57611c5b611c1e565b9052565b6020810161072f8284611c4b565b5f805f60408486031215611c7f575f80fd5b611c8884611a44565b9250602084013567ffffffffffffffff811115611ca3575f80fd5b611caf86828701611b61565b9497909650939450505050565b7f4e487b71000000000000000000000000000000000000000000000000000000005f52601160045260245ffd5b8082018082111561072f5761072f611cbc565b7f4e487b71000000000000000000000000000000000000000000000000000000005f52601260045260245ffd5b5f82611d3757611d37611cfc565b500690565b7f4e487b71000000000000000000000000000000000000000000000000000000005f52603260045260245ffd5b5f82611d7757611d77611cfc565b500490565b5f60208284031215611d8c575f80fd5b8135801515811461141a575f80fd5b7f4e487b71000000000000000000000000000000000000000000000000000000005f52604160045260245ffd5b6040805190810167ffffffffffffffff81118282101715611deb57611deb611d9b565b60405290565b604051601f8201601f1916810167ffffffffffffffff81118282101715611e1a57611e1a611d9b565b604052919050565b5f60a0828403128015611e33575f80fd5b5060405160a0810167ffffffffffffffff81118282101715611e5757611e57611d9b565b604052611e6383611a44565b8152602083013560028110611e76575f80fd5b60208201526040838101359082015260608084013590820152611e9b60808401611a44565b60808201529392505050565b808202811582820484141761072f5761072f611cbc565b60808101611ecc8287611c4b565b84602083015283604083015273ffffffffffffffffffffffffffffffffffffffff8316606083015295945050505050565b5f60208284031215611f0d575f80fd5b813567ffffffffffffffff811115611f23575f80fd5b820160408185031215611f34575f80fd5b611f3c611dc8565b611f4582611a44565b8152602082013567ffffffffffffffff811115611f60575f80fd5b80830192505084601f830112611f74575f80fd5b813567ffffffffffffffff811115611f8e57611f8e611d9b565b611fa16020601f19601f84011601611df1565b818152866020838601011115611fb5575f80fd5b816020850160208301375f602092820183015290820152949350505050565b5f60208284031215611fe4575f80fd5b5051919050565b6020815273ffffffffffffffffffffffffffffffffffffffff82511660208201525f60208301516040808401526114c96060840182611bde565b73ffffffffffffffffffffffffffffffffffffffff83168152604060208201525f6114c96040830184611bde565b8181038181111561072f5761072f611cbc565b602081525f82516003811061207d5761207d611c1e565b8060208401525073ffffffffffffffffffffffffffffffffffffffff602084015116604083015273ffffffffffffffffffffffffffffffffffffffff604084015116606083015260608301516080808401526114c960a0840182611bde565b5f7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff820361210c5761210c611cbc565b506001019056fea26469706673582212209def68a22e935c7af91e946bb2187abd14944a4cd3b455abbdb234120eea61b564736f6c634300081a0033", t = { 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 k {
8
8
  constructor() {
9
- super(...arguments), this.abi = n;
9
+ super(...arguments), this.abi = o;
10
10
  }
11
11
  /**
12
12
  * The owner of the incentive
@@ -33,7 +33,7 @@ const B = "0x6080604052348015600e575f80fd5b5060156019565b607c565b63409feecd19805
33
33
  * @returns {Promise<bigint>} - The current reward
34
34
  */
35
35
  async currentReward(f) {
36
- return await w(this._config, {
36
+ return await m(this._config, {
37
37
  address: this.assertValidAddress(),
38
38
  args: [],
39
39
  // biome-ignore lint/suspicious/noExplicitAny: Accept any shape of valid wagmi/viem parameters, wagmi does the same thing internally
@@ -49,7 +49,7 @@ const B = "0x6080604052348015600e575f80fd5b5060156019565b607c565b63409feecd19805
49
49
  * @returns {Promise<bigint>}
50
50
  */
51
51
  async claims(f) {
52
- return await m(this._config, {
52
+ return await p(this._config, {
53
53
  address: this.assertValidAddress(),
54
54
  args: [],
55
55
  // biome-ignore lint/suspicious/noExplicitAny: Accept any shape of valid wagmi/viem parameters, wagmi does the same thing internally
@@ -66,7 +66,7 @@ const B = "0x6080604052348015600e575f80fd5b5060156019565b607c565b63409feecd19805
66
66
  * @returns {Promise<boolean>}
67
67
  */
68
68
  async claimed(f, b) {
69
- return await p(this._config, {
69
+ return await A(this._config, {
70
70
  address: this.assertValidAddress(),
71
71
  args: [f],
72
72
  // biome-ignore lint/suspicious/noExplicitAny: Accept any shape of valid wagmi/viem parameters, wagmi does the same thing internally
@@ -82,7 +82,7 @@ const B = "0x6080604052348015600e575f80fd5b5060156019565b607c565b63409feecd19805
82
82
  * @returns {Promise<Address>}
83
83
  */
84
84
  async asset(f) {
85
- return await A(this._config, {
85
+ return await R(this._config, {
86
86
  address: this.assertValidAddress(),
87
87
  // biome-ignore lint/suspicious/noExplicitAny: Accept any shape of valid wagmi/viem parameters, wagmi does the same thing internally
88
88
  ...f
@@ -97,7 +97,7 @@ const B = "0x6080604052348015600e575f80fd5b5060156019565b607c565b63409feecd19805
97
97
  * @returns {Promise<StrategyType>}
98
98
  */
99
99
  strategy(f) {
100
- return M(this._config, {
100
+ return E(this._config, {
101
101
  address: this.assertValidAddress(),
102
102
  // biome-ignore lint/suspicious/noExplicitAny: Accept any shape of valid wagmi/viem parameters, wagmi does the same thing internally
103
103
  ...f
@@ -112,7 +112,7 @@ const B = "0x6080604052348015600e575f80fd5b5060156019565b607c565b63409feecd19805
112
112
  * @returns {Promise<bigint>}
113
113
  */
114
114
  async reward(f) {
115
- return await R(this._config, {
115
+ return await _(this._config, {
116
116
  address: this.assertValidAddress(),
117
117
  // biome-ignore lint/suspicious/noExplicitAny: Accept any shape of valid wagmi/viem parameters, wagmi does the same thing internally
118
118
  ...f
@@ -127,7 +127,7 @@ const B = "0x6080604052348015600e575f80fd5b5060156019565b607c565b63409feecd19805
127
127
  * @returns {Promise<bigint>}
128
128
  */
129
129
  async limit(f) {
130
- return await V(this._config, {
130
+ return await T(this._config, {
131
131
  address: this.assertValidAddress(),
132
132
  // biome-ignore lint/suspicious/noExplicitAny: Accept any shape of valid wagmi/viem parameters, wagmi does the same thing internally
133
133
  ...f
@@ -143,7 +143,7 @@ const B = "0x6080604052348015600e575f80fd5b5060156019565b607c565b63409feecd19805
143
143
  * @returns {Promise<Address>}
144
144
  */
145
145
  async entries(f, b) {
146
- return await _(this._config, {
146
+ return await V(this._config, {
147
147
  address: this.assertValidAddress(),
148
148
  args: [f],
149
149
  // biome-ignore lint/suspicious/noExplicitAny: Accept any shape of valid wagmi/viem parameters, wagmi does the same thing internally
@@ -172,17 +172,17 @@ const B = "0x6080604052348015600e575f80fd5b5060156019565b607c565b63409feecd19805
172
172
  * @returns {Promise<{ hash: `0x${string}`; result: boolean; }>} - Returns true if successfully claimed
173
173
  */
174
174
  async claimRaw(f, b) {
175
- const { request: a, result: d } = await P(
175
+ const { request: a, result: d } = await O(
176
176
  this._config,
177
177
  {
178
178
  address: this.assertValidAddress(),
179
- args: [o(f)],
179
+ args: [l(f)],
180
180
  ...this.optionallyAttachAccount(),
181
181
  // biome-ignore lint/suspicious/noExplicitAny: Accept any shape of valid wagmi/viem parameters, wagmi does the same thing internally
182
182
  ...b
183
183
  }
184
184
  );
185
- return { hash: await C(this._config, a), result: d };
185
+ return { hash: await P(this._config, a), result: d };
186
186
  }
187
187
  /**
188
188
  * Clawback assets from the incentive
@@ -206,17 +206,17 @@ const B = "0x6080604052348015600e575f80fd5b5060156019565b607c565b63409feecd19805
206
206
  * @returns {Promise<{ hash: `0x${string}`; result: boolean; }>} - True if the assets were successfully clawbacked
207
207
  */
208
208
  async clawbackRaw(f, b) {
209
- const { request: a, result: d } = await T(
209
+ const { request: a, result: d } = await C(
210
210
  this._config,
211
211
  {
212
212
  address: this.assertValidAddress(),
213
- args: [o(f)],
213
+ args: [l(f)],
214
214
  ...this.optionallyAttachAccount(),
215
215
  // biome-ignore lint/suspicious/noExplicitAny: Accept any shape of valid wagmi/viem parameters, wagmi does the same thing internally
216
216
  ...b
217
217
  }
218
218
  );
219
- return { hash: await O(this._config, a), result: d };
219
+ return { hash: await M(this._config, a), result: d };
220
220
  }
221
221
  /**
222
222
  * Check if an incentive is claimable. For the POOL strategy, the `bytes data` portion of the payload ignored. The recipient must not have already claimed the incentive.
@@ -228,7 +228,7 @@ const B = "0x6080604052348015600e575f80fd5b5060156019565b607c565b63409feecd19805
228
228
  * @returns {Promise<boolean>} = True if the incentive is claimable based on the data payload
229
229
  */
230
230
  async isClaimable(f, b) {
231
- return await k(this._config, {
231
+ return await S(this._config, {
232
232
  address: this.assertValidAddress(),
233
233
  args: [f.target, f.data],
234
234
  // biome-ignore lint/suspicious/noExplicitAny: Accept any shape of valid wagmi/viem parameters, wagmi does the same thing internally
@@ -255,7 +255,7 @@ const B = "0x6080604052348015600e575f80fd5b5060156019565b607c565b63409feecd19805
255
255
  * @returns {Promise<{ hash: `0x${string}`; result: void; }>}
256
256
  */
257
257
  async drawRaffleRaw(f) {
258
- const { request: b, result: a } = await v(
258
+ const { request: b, result: a } = await B(
259
259
  this._config,
260
260
  {
261
261
  address: this.assertValidAddress(),
@@ -264,7 +264,7 @@ const B = "0x6080604052348015600e575f80fd5b5060156019565b607c565b63409feecd19805
264
264
  ...f
265
265
  }
266
266
  );
267
- return { hash: await x(this._config, b), result: a };
267
+ return { hash: await I(this._config, b), result: a };
268
268
  }
269
269
  /**
270
270
  * Get the maximum amount that can be claimed by this incentive. Useful when used in conjunction with `BoostCore.calculateProtocolFee`
@@ -275,8 +275,8 @@ const B = "0x6080604052348015600e575f80fd5b5060156019565b607c565b63409feecd19805
275
275
  * @returns {Promise<bigint>} = Return a bigint representing that maximum amount that can be distributed by this incentive.
276
276
  */
277
277
  async getTotalBudget(f) {
278
- var e, i, r;
279
- if (((e = this.payload) == null ? void 0 : e.strategy) !== void 0 && ((i = this.payload) == null ? void 0 : i.limit) !== void 0 && ((r = this.payload) == null ? void 0 : r.reward) !== void 0)
278
+ var e, r, n;
279
+ if (((e = this.payload) == null ? void 0 : e.strategy) !== void 0 && ((r = this.payload) == null ? void 0 : r.limit) !== void 0 && ((n = this.payload) == null ? void 0 : n.reward) !== void 0)
280
280
  return this.payload.strategy === c.POOL ? this.payload.limit * this.payload.reward : this.payload.reward;
281
281
  const [b, a, d] = await Promise.all([
282
282
  this.strategy(f),
@@ -325,9 +325,9 @@ const B = "0x6080604052348015600e575f80fd5b5060156019565b607c565b63409feecd19805
325
325
  b
326
326
  );
327
327
  return {
328
- abi: n,
329
- bytecode: B,
330
- args: [h(a)],
328
+ abi: o,
329
+ bytecode: F,
330
+ args: [u(a)],
331
331
  ...this.optionallyAttachAccount(d.account)
332
332
  };
333
333
  }
@@ -354,16 +354,16 @@ const B = "0x6080604052348015600e575f80fd5b5060156019565b607c565b63409feecd19805
354
354
  async getTopupPayload(f) {
355
355
  var d;
356
356
  const a = {
357
- asset: await this.asset() || t,
357
+ asset: await this.asset() || i,
358
358
  strategy: c.POOL,
359
359
  // e.g. StrategyType.POOL
360
360
  reward: 1n,
361
361
  // store net top-up as the "reward"
362
362
  limit: f,
363
363
  // or maybe add netAmount to existing limit
364
- manager: ((d = this.payload) == null ? void 0 : d.manager) || t
364
+ manager: ((d = this.payload) == null ? void 0 : d.manager) || i
365
365
  };
366
- return h(a);
366
+ return u(a);
367
367
  }
368
368
  /**
369
369
  * Builds the claim data for the ERC20Incentive.
@@ -377,16 +377,16 @@ const B = "0x6080604052348015600e575f80fd5b5060156019565b607c565b63409feecd19805
377
377
  }
378
378
  };
379
379
  s.bases = {
380
- 31337: void 0,
381
- ...L
382
- }, s.registryType = z.INCENTIVE;
383
- let l = s;
384
- function h({
385
- asset: u,
380
+ ...t != null && t.VITE_ERC20_INCENTIVE_BASE ? { 31337: void 0 } : {},
381
+ ...N
382
+ }, s.registryType = x.INCENTIVE;
383
+ let h = s;
384
+ function u({
385
+ asset: w,
386
386
  strategy: f,
387
387
  reward: b,
388
388
  limit: a,
389
- manager: d = t
389
+ manager: d = i
390
390
  }) {
391
391
  return y(
392
392
  [
@@ -397,7 +397,7 @@ function h({
397
397
  { type: "address", name: "manager" }
398
398
  ],
399
399
  [
400
- u,
400
+ w,
401
401
  f,
402
402
  b,
403
403
  // unclear how user set limit should work for raffle, so in order to avoid passing 0's let's correct it
@@ -407,8 +407,8 @@ function h({
407
407
  );
408
408
  }
409
409
  export {
410
- l as ERC20Incentive,
411
- n as erc20IncentiveAbi,
412
- h as prepareERC20IncentivePayload
410
+ h as ERC20Incentive,
411
+ o as erc20IncentiveAbi,
412
+ u as prepareERC20IncentivePayload
413
413
  };
414
414
  //# sourceMappingURL=ERC20Incentive.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"ERC20Incentive.js","sources":["../../src/Incentives/ERC20Incentive.ts"],"sourcesContent":["import {\n erc20IncentiveAbi,\n readErc20IncentiveAsset,\n readErc20IncentiveClaimed,\n readErc20IncentiveClaims,\n readErc20IncentiveCurrentReward,\n readErc20IncentiveEntries,\n readErc20IncentiveIsClaimable,\n readErc20IncentiveLimit,\n readErc20IncentiveOwner,\n readErc20IncentiveReward,\n readErc20IncentiveStrategy,\n simulateErc20IncentiveClaim,\n simulateErc20IncentiveClawback,\n simulateErc20IncentiveDrawRaffle,\n writeErc20IncentiveClaim,\n writeErc20IncentiveClawback,\n writeErc20IncentiveDrawRaffle,\n} from '@boostxyz/evm';\nimport { bytecode } from '@boostxyz/evm/artifacts/contracts/incentives/ERC20Incentive.sol/ERC20Incentive.json';\nimport {\n type Address,\n type ContractEventName,\n type Hex,\n encodeAbiParameters,\n zeroAddress,\n zeroHash,\n} from 'viem';\nimport { ERC20Incentive as ERC20IncentiveBases } from '../../dist/deployments.json';\nimport type {\n DeployableOptions,\n GenericDeployableParams,\n} from '../Deployable/Deployable';\nimport { DeployableTarget } from '../Deployable/DeployableTarget';\nimport {\n type ClaimPayload,\n StrategyType,\n prepareClaimPayload,\n} from '../claiming';\nimport {\n type GenericLog,\n type ReadParams,\n RegistryType,\n type WriteParams,\n} from '../utils';\n\nexport { erc20IncentiveAbi };\n\n/**\n * The object representation of a `ERC20Incentive.InitPayload`\n *\n * @export\n * @interface ERC20IncentivePayload\n * @typedef {ERC20IncentivePayload}\n */\nexport interface ERC20IncentivePayload {\n /**\n * The address of the incentivized asset.\n *\n * @type {Address}\n */\n asset: Address;\n /**\n * The type of disbursement strategy for the incentive.\n *\n * @type {StrategyType}\n */\n strategy: StrategyType;\n /**\n * The amount of the asset to distribute.\n *\n * @type {bigint}\n */\n reward: bigint;\n /**\n * How many times can this incentive be claimed. This should ideally be 1n for `RAFFLE` strategy types.\n *\n * @type {bigint}\n */\n limit: bigint;\n /**\n * (Optional) The address of the entity that can trigger a raffle.\n * If omitted, the incentive will have no manager with permissions to draw the raffle.\n *\n * @type {Address}\n * @optional\n */\n manager?: Address;\n}\n\n/**\n * A generic `viem.Log` event with support for `ERC20Incentive` event types.\n *\n * @export\n * @typedef {ERC20IncentiveLog}\n * @template {ContractEventName<typeof erc20IncentiveAbi>} [event=ContractEventName<\n * typeof erc20IncentiveAbi\n * >]\n */\nexport type ERC20IncentiveLog<\n event extends ContractEventName<typeof erc20IncentiveAbi> = ContractEventName<\n typeof erc20IncentiveAbi\n >,\n> = GenericLog<typeof erc20IncentiveAbi, event>;\n\n/**\n * A simple ERC20 incentive implementation that allows claiming of tokens\n *\n * @export\n * @class ERC20Incentive\n * @typedef {ERC20Incentive}\n * @extends {DeployableTarget<ERC20IncentivePayload>}\n */\nexport class ERC20Incentive extends DeployableTarget<\n ERC20IncentivePayload,\n typeof erc20IncentiveAbi\n> {\n public override readonly abi = erc20IncentiveAbi;\n /**\n * @inheritdoc\n *\n * @public\n * @static\n * @type {Record<number, Address>}\n */\n public static override bases: Record<number, Address> = {\n 31337: import.meta.env.VITE_ERC20_INCENTIVE_BASE,\n ...(ERC20IncentiveBases 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 readErc20IncentiveOwner(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 readErc20IncentiveCurrentReward(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 readErc20IncentiveClaims(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 readErc20IncentiveClaimed(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 readErc20IncentiveAsset(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 strategy for the incentive (MINT or POOL)\n *\n * @public\n * @async\n * @param {?ReadParams} [params]\n * @returns {Promise<StrategyType>}\n */\n public strategy(params?: ReadParams): Promise<StrategyType> {\n return readErc20IncentiveStrategy(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 }) as Promise<StrategyType>;\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 readErc20IncentiveReward(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 claims, or max entries for raffles)\n *\n * @public\n * @async\n * @param {?ReadParams} [params]\n * @returns {Promise<bigint>}\n */\n public async limit(params?: ReadParams) {\n return await readErc20IncentiveLimit(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 set of addresses that have claimed a slot in the incentive raffle, accessed by bigint index.\n *\n * @public\n * @async\n * @param {bigint} i - Index of address\n * @param {?ReadParams} [params]\n * @returns {Promise<Address>}\n */\n public async entries(i: bigint, params?: ReadParams) {\n return await readErc20IncentiveEntries(this._config, {\n address: this.assertValidAddress(),\n args: [i],\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 simulateErc20IncentiveClaim(\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 writeErc20IncentiveClaim(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 simulateErc20IncentiveClawback(\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 writeErc20IncentiveClawback(this._config, request);\n return { hash, result };\n }\n\n /**\n * Check if an incentive is claimable. For the POOL strategy, the `bytes data` portion of the payload ignored. The recipient must not have already claimed the incentive.\n *\n * @public\n * @async\n * @param {ClaimPayload} payload\n * @param {?ReadParams} [params]\n * @returns {Promise<boolean>} = True if the incentive is claimable based on the data payload\n */\n public async isClaimable(payload: ClaimPayload, params?: ReadParams) {\n return await readErc20IncentiveIsClaimable(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 * Draw a winner from the raffle. Only callable by owner. Only valid when the strategy is set to `Strategy.RAFFLE`\n *\n * @public\n * @async\n * @param {?WriteParams} [params]\n * @returns {Promise<void>}\n */\n public async drawRaffle(params?: WriteParams) {\n return await this.awaitResult(this.drawRaffleRaw(params));\n }\n\n /**\n * Draw a winner from the raffle. Only callable by owner. Only valid when the strategy is set to `Strategy.RAFFLE`\n *\n * @public\n * @async\n * @param {?WriteParams} [params]\n * @returns {Promise<{ hash: `0x${string}`; result: void; }>}\n */\n public async drawRaffleRaw(params?: WriteParams) {\n const { request, result } = await simulateErc20IncentiveDrawRaffle(\n this._config,\n {\n address: this.assertValidAddress(),\n ...this.optionallyAttachAccount(),\n // biome-ignore lint/suspicious/noExplicitAny: Accept any shape of valid wagmi/viem parameters, wagmi does the same thing internally\n ...(params as any),\n },\n );\n const hash = await writeErc20IncentiveDrawRaffle(this._config, request);\n return { hash, result };\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 if (\n this.payload?.strategy !== undefined &&\n this.payload?.limit !== undefined &&\n this.payload?.reward !== undefined\n ) {\n return (this.payload.strategy as StrategyType) === StrategyType.POOL\n ? this.payload.limit * this.payload.reward\n : this.payload.reward;\n }\n const [strategy, limit, reward] = await Promise.all([\n this.strategy(params),\n this.limit(params),\n this.reward(params),\n ]);\n return strategy === StrategyType.POOL ? limit * reward : reward;\n }\n\n /**\n * Check if any claims remain by comparing the incentive's total claims against its limit. Does not take requesting user's elligibility into account.\n *\n * @public\n * @async\n * @param {?ReadParams} [params]\n * @returns {Promise<boolean>} - True if total claims is less than limit\n */\n public async canBeClaimed(params?: ReadParams) {\n return (await this.getRemainingClaimPotential(params)) > 0n;\n }\n\n /**\n * Check how many claims remain by comparing the incentive's total claims against its limit. Does not take requesting user's elligibility into account.\n *\n * @public\n * @async\n * @param {?ReadParams} [params]\n * @returns {Promise<bigint>} - True if total claims is less than limit\n */\n public async getRemainingClaimPotential(params?: ReadParams) {\n const [claims, limit] = await Promise.all([\n this.claims(params),\n this.limit(params),\n ]);\n return limit - claims;\n }\n\n /**\n * @inheritdoc\n *\n * @public\n * @param {?ERC20IncentivePayload} [_payload]\n * @param {?DeployableOptions} [_options]\n * @returns {GenericDeployableParams}\n */\n public override buildParameters(\n _payload?: ERC20IncentivePayload,\n _options?: DeployableOptions,\n ): GenericDeployableParams {\n const [payload, options] = this.validateDeploymentConfig(\n _payload,\n _options,\n );\n return {\n abi: erc20IncentiveAbi,\n bytecode: bytecode as Hex,\n args: [prepareERC20IncentivePayload(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 * A helper that composes a typed \"top-up\" parameter object\n * given a net top-up amount. You can name it whatever you like\n * (e.g. topupParamsFromNetAmount, getTopupPayload, etc.).\n *\n * @public\n * @param {bigint} netAmount The net top-up tokens the user wants to add\n * @param {?WriteParams} [params] (optional) if you need them\n * @returns {Hex} the ABI-encoded data for top-up\n */\n public async getTopupPayload(netAmount: bigint): Promise<Hex> {\n // 1. Build a typed object matching your `ERC20IncentivePayload`.\n // For example, you might want to increment `limit` by `netAmount`,\n // or set `reward = netAmount`. That’s up to your logic:\n const asset = await this.asset();\n const typed: ERC20IncentivePayload = {\n asset: asset || zeroAddress,\n strategy: StrategyType.POOL, // e.g. StrategyType.POOL\n reward: 1n, // store net top-up as the \"reward\"\n limit: netAmount, // or maybe add netAmount to existing limit\n manager: this.payload?.manager || zeroAddress,\n };\n\n // 2. Encode it with your existing `prepareERC20IncentivePayload(...)`.\n return prepareERC20IncentivePayload(typed);\n }\n\n /**\n * Builds the claim data for the ERC20Incentive.\n *\n * @public\n * @returns {Hash} A `zeroHash`, as ERC20Incentive doesn't require specific claim data.\n * @description This function returns `zeroHash` because ERC20Incentive doesn't use any specific claim data.\n */\n public buildClaimData() {\n return zeroHash;\n }\n}\n\n/**\n * Given a {@link ERC20IncentivePayload}, properly encode a `ERC20Incentive.InitPayload` for use with {@link ERC20Incentive} initialization.\n *\n * @param {ERC20IncentivePayload} param0\n * @param {Address} param0.asset - The address of the incentivized asset.\n * @param {StrategyType} param0.strategy - The type of disbursement strategy for the incentive. `StrategyType.MINT` is not supported for `ERC20Incentives`\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 draw raffles - defaults to unset\n * @returns {Hex}\n */\nexport function prepareERC20IncentivePayload({\n asset,\n strategy,\n reward,\n limit,\n manager = zeroAddress,\n}: ERC20IncentivePayload) {\n return encodeAbiParameters(\n [\n { type: 'address', name: 'asset' },\n { type: 'uint8', name: 'strategy' },\n { type: 'uint256', name: 'reward' },\n { type: 'uint256', name: 'limit' },\n { type: 'address', name: 'manager' },\n ],\n [\n asset,\n strategy,\n reward,\n // unclear how user set limit should work for raffle, so in order to avoid passing 0's let's correct it\n limit === 0n && strategy === StrategyType.RAFFLE ? 1n : limit,\n manager,\n ],\n );\n}\n"],"names":["_ERC20Incentive","DeployableTarget","erc20IncentiveAbi","params","readErc20IncentiveOwner","readErc20IncentiveCurrentReward","readErc20IncentiveClaims","address","readErc20IncentiveClaimed","readErc20IncentiveAsset","readErc20IncentiveStrategy","readErc20IncentiveReward","readErc20IncentiveLimit","i","readErc20IncentiveEntries","payload","request","result","simulateErc20IncentiveClaim","prepareClaimPayload","writeErc20IncentiveClaim","simulateErc20IncentiveClawback","writeErc20IncentiveClawback","readErc20IncentiveIsClaimable","simulateErc20IncentiveDrawRaffle","writeErc20IncentiveDrawRaffle","_a","_b","_c","StrategyType","strategy","limit","reward","claims","_payload","_options","options","bytecode","prepareERC20IncentivePayload","amount","encodeAbiParameters","netAmount","typed","zeroAddress","zeroHash","ERC20IncentiveBases","RegistryType","ERC20Incentive","asset","manager"],"mappings":";;;;;;o7hBAiHaA,IAAN,MAAMA,UAAuBC,EAGlC;AAAA,EAHK,cAAA;AAAA,UAAA,GAAA,SAAA,GAIL,KAAyB,MAAMC;AAAAA,EAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,EA6B/B,MAAa,MAAMC,GAAqB;AAC/B,WAAA,MAAMC,EAAwB,KAAK,SAAS;AAAA,MACjD,SAAS,KAAK,mBAAmB;AAAA,MACjC,MAAM,CAAC;AAAA;AAAA,MAEP,GAAID;AAAA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AAA,IACA;AAAA,MACEQ;AAAA,MACAlB;AAAA,MACAE;AAAA;AAAA,MAEAD,MAAU,MAAMD,MAAaD,EAAa,SAAS,KAAKE;AAAA,MACxDkB;AAAA,IACF;AAAA,EAAA;AAEJ;"}
1
+ {"version":3,"file":"ERC20Incentive.js","sources":["../../src/Incentives/ERC20Incentive.ts"],"sourcesContent":["import {\n erc20IncentiveAbi,\n readErc20IncentiveAsset,\n readErc20IncentiveClaimed,\n readErc20IncentiveClaims,\n readErc20IncentiveCurrentReward,\n readErc20IncentiveEntries,\n readErc20IncentiveIsClaimable,\n readErc20IncentiveLimit,\n readErc20IncentiveOwner,\n readErc20IncentiveReward,\n readErc20IncentiveStrategy,\n simulateErc20IncentiveClaim,\n simulateErc20IncentiveClawback,\n simulateErc20IncentiveDrawRaffle,\n writeErc20IncentiveClaim,\n writeErc20IncentiveClawback,\n writeErc20IncentiveDrawRaffle,\n} from '@boostxyz/evm';\nimport { bytecode } from '@boostxyz/evm/artifacts/contracts/incentives/ERC20Incentive.sol/ERC20Incentive.json';\nimport {\n type Address,\n type ContractEventName,\n type Hex,\n encodeAbiParameters,\n zeroAddress,\n zeroHash,\n} from 'viem';\nimport { ERC20Incentive as ERC20IncentiveBases } from '../../dist/deployments.json';\nimport type {\n DeployableOptions,\n GenericDeployableParams,\n} from '../Deployable/Deployable';\nimport { DeployableTarget } from '../Deployable/DeployableTarget';\nimport {\n type ClaimPayload,\n StrategyType,\n prepareClaimPayload,\n} from '../claiming';\nimport {\n type GenericLog,\n type ReadParams,\n RegistryType,\n type WriteParams,\n} from '../utils';\n\nexport { erc20IncentiveAbi };\n\n/**\n * The object representation of a `ERC20Incentive.InitPayload`\n *\n * @export\n * @interface ERC20IncentivePayload\n * @typedef {ERC20IncentivePayload}\n */\nexport interface ERC20IncentivePayload {\n /**\n * The address of the incentivized asset.\n *\n * @type {Address}\n */\n asset: Address;\n /**\n * The type of disbursement strategy for the incentive.\n *\n * @type {StrategyType}\n */\n strategy: StrategyType;\n /**\n * The amount of the asset to distribute.\n *\n * @type {bigint}\n */\n reward: bigint;\n /**\n * How many times can this incentive be claimed. This should ideally be 1n for `RAFFLE` strategy types.\n *\n * @type {bigint}\n */\n limit: bigint;\n /**\n * (Optional) The address of the entity that can trigger a raffle.\n * If omitted, the incentive will have no manager with permissions to draw the raffle.\n *\n * @type {Address}\n * @optional\n */\n manager?: Address;\n}\n\n/**\n * A generic `viem.Log` event with support for `ERC20Incentive` event types.\n *\n * @export\n * @typedef {ERC20IncentiveLog}\n * @template {ContractEventName<typeof erc20IncentiveAbi>} [event=ContractEventName<\n * typeof erc20IncentiveAbi\n * >]\n */\nexport type ERC20IncentiveLog<\n event extends ContractEventName<typeof erc20IncentiveAbi> = ContractEventName<\n typeof erc20IncentiveAbi\n >,\n> = GenericLog<typeof erc20IncentiveAbi, event>;\n\n/**\n * A simple ERC20 incentive implementation that allows claiming of tokens\n *\n * @export\n * @class ERC20Incentive\n * @typedef {ERC20Incentive}\n * @extends {DeployableTarget<ERC20IncentivePayload>}\n */\nexport class ERC20Incentive extends DeployableTarget<\n ERC20IncentivePayload,\n typeof erc20IncentiveAbi\n> {\n public override readonly abi = erc20IncentiveAbi;\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 ...(ERC20IncentiveBases 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 readErc20IncentiveOwner(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 readErc20IncentiveCurrentReward(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 readErc20IncentiveClaims(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 readErc20IncentiveClaimed(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 readErc20IncentiveAsset(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 strategy for the incentive (MINT or POOL)\n *\n * @public\n * @async\n * @param {?ReadParams} [params]\n * @returns {Promise<StrategyType>}\n */\n public strategy(params?: ReadParams): Promise<StrategyType> {\n return readErc20IncentiveStrategy(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 }) as Promise<StrategyType>;\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 readErc20IncentiveReward(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 claims, or max entries for raffles)\n *\n * @public\n * @async\n * @param {?ReadParams} [params]\n * @returns {Promise<bigint>}\n */\n public async limit(params?: ReadParams) {\n return await readErc20IncentiveLimit(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 set of addresses that have claimed a slot in the incentive raffle, accessed by bigint index.\n *\n * @public\n * @async\n * @param {bigint} i - Index of address\n * @param {?ReadParams} [params]\n * @returns {Promise<Address>}\n */\n public async entries(i: bigint, params?: ReadParams) {\n return await readErc20IncentiveEntries(this._config, {\n address: this.assertValidAddress(),\n args: [i],\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 simulateErc20IncentiveClaim(\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 writeErc20IncentiveClaim(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 simulateErc20IncentiveClawback(\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 writeErc20IncentiveClawback(this._config, request);\n return { hash, result };\n }\n\n /**\n * Check if an incentive is claimable. For the POOL strategy, the `bytes data` portion of the payload ignored. The recipient must not have already claimed the incentive.\n *\n * @public\n * @async\n * @param {ClaimPayload} payload\n * @param {?ReadParams} [params]\n * @returns {Promise<boolean>} = True if the incentive is claimable based on the data payload\n */\n public async isClaimable(payload: ClaimPayload, params?: ReadParams) {\n return await readErc20IncentiveIsClaimable(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 * Draw a winner from the raffle. Only callable by owner. Only valid when the strategy is set to `Strategy.RAFFLE`\n *\n * @public\n * @async\n * @param {?WriteParams} [params]\n * @returns {Promise<void>}\n */\n public async drawRaffle(params?: WriteParams) {\n return await this.awaitResult(this.drawRaffleRaw(params));\n }\n\n /**\n * Draw a winner from the raffle. Only callable by owner. Only valid when the strategy is set to `Strategy.RAFFLE`\n *\n * @public\n * @async\n * @param {?WriteParams} [params]\n * @returns {Promise<{ hash: `0x${string}`; result: void; }>}\n */\n public async drawRaffleRaw(params?: WriteParams) {\n const { request, result } = await simulateErc20IncentiveDrawRaffle(\n this._config,\n {\n address: this.assertValidAddress(),\n ...this.optionallyAttachAccount(),\n // biome-ignore lint/suspicious/noExplicitAny: Accept any shape of valid wagmi/viem parameters, wagmi does the same thing internally\n ...(params as any),\n },\n );\n const hash = await writeErc20IncentiveDrawRaffle(this._config, request);\n return { hash, result };\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 if (\n this.payload?.strategy !== undefined &&\n this.payload?.limit !== undefined &&\n this.payload?.reward !== undefined\n ) {\n return (this.payload.strategy as StrategyType) === StrategyType.POOL\n ? this.payload.limit * this.payload.reward\n : this.payload.reward;\n }\n const [strategy, limit, reward] = await Promise.all([\n this.strategy(params),\n this.limit(params),\n this.reward(params),\n ]);\n return strategy === StrategyType.POOL ? limit * reward : reward;\n }\n\n /**\n * Check if any claims remain by comparing the incentive's total claims against its limit. Does not take requesting user's elligibility into account.\n *\n * @public\n * @async\n * @param {?ReadParams} [params]\n * @returns {Promise<boolean>} - True if total claims is less than limit\n */\n public async canBeClaimed(params?: ReadParams) {\n return (await this.getRemainingClaimPotential(params)) > 0n;\n }\n\n /**\n * Check how many claims remain by comparing the incentive's total claims against its limit. Does not take requesting user's elligibility into account.\n *\n * @public\n * @async\n * @param {?ReadParams} [params]\n * @returns {Promise<bigint>} - True if total claims is less than limit\n */\n public async getRemainingClaimPotential(params?: ReadParams) {\n const [claims, limit] = await Promise.all([\n this.claims(params),\n this.limit(params),\n ]);\n return limit - claims;\n }\n\n /**\n * @inheritdoc\n *\n * @public\n * @param {?ERC20IncentivePayload} [_payload]\n * @param {?DeployableOptions} [_options]\n * @returns {GenericDeployableParams}\n */\n public override buildParameters(\n _payload?: ERC20IncentivePayload,\n _options?: DeployableOptions,\n ): GenericDeployableParams {\n const [payload, options] = this.validateDeploymentConfig(\n _payload,\n _options,\n );\n return {\n abi: erc20IncentiveAbi,\n bytecode: bytecode as Hex,\n args: [prepareERC20IncentivePayload(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 * A helper that composes a typed \"top-up\" parameter object\n * given a net top-up amount. You can name it whatever you like\n * (e.g. topupParamsFromNetAmount, getTopupPayload, etc.).\n *\n * @public\n * @param {bigint} netAmount The net top-up tokens the user wants to add\n * @param {?WriteParams} [params] (optional) if you need them\n * @returns {Hex} the ABI-encoded data for top-up\n */\n public async getTopupPayload(netAmount: bigint): Promise<Hex> {\n // 1. Build a typed object matching your `ERC20IncentivePayload`.\n // For example, you might want to increment `limit` by `netAmount`,\n // or set `reward = netAmount`. That’s up to your logic:\n const asset = await this.asset();\n const typed: ERC20IncentivePayload = {\n asset: asset || zeroAddress,\n strategy: StrategyType.POOL, // e.g. StrategyType.POOL\n reward: 1n, // store net top-up as the \"reward\"\n limit: netAmount, // or maybe add netAmount to existing limit\n manager: this.payload?.manager || zeroAddress,\n };\n\n // 2. Encode it with your existing `prepareERC20IncentivePayload(...)`.\n return prepareERC20IncentivePayload(typed);\n }\n\n /**\n * Builds the claim data for the ERC20Incentive.\n *\n * @public\n * @returns {Hash} A `zeroHash`, as ERC20Incentive doesn't require specific claim data.\n * @description This function returns `zeroHash` because ERC20Incentive doesn't use any specific claim data.\n */\n public buildClaimData() {\n return zeroHash;\n }\n}\n\n/**\n * Given a {@link ERC20IncentivePayload}, properly encode a `ERC20Incentive.InitPayload` for use with {@link ERC20Incentive} initialization.\n *\n * @param {ERC20IncentivePayload} param0\n * @param {Address} param0.asset - The address of the incentivized asset.\n * @param {StrategyType} param0.strategy - The type of disbursement strategy for the incentive. `StrategyType.MINT` is not supported for `ERC20Incentives`\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 draw raffles - defaults to unset\n * @returns {Hex}\n */\nexport function prepareERC20IncentivePayload({\n asset,\n strategy,\n reward,\n limit,\n manager = zeroAddress,\n}: ERC20IncentivePayload) {\n return encodeAbiParameters(\n [\n { type: 'address', name: 'asset' },\n { type: 'uint8', name: 'strategy' },\n { type: 'uint256', name: 'reward' },\n { type: 'uint256', name: 'limit' },\n { type: 'address', name: 'manager' },\n ],\n [\n asset,\n strategy,\n reward,\n // unclear how user set limit should work for raffle, so in order to avoid passing 0's let's correct it\n limit === 0n && strategy === StrategyType.RAFFLE ? 1n : limit,\n manager,\n ],\n );\n}\n"],"names":["_ERC20Incentive","DeployableTarget","erc20IncentiveAbi","params","readErc20IncentiveOwner","readErc20IncentiveCurrentReward","readErc20IncentiveClaims","address","readErc20IncentiveClaimed","readErc20IncentiveAsset","readErc20IncentiveStrategy","readErc20IncentiveReward","readErc20IncentiveLimit","i","readErc20IncentiveEntries","payload","request","result","simulateErc20IncentiveClaim","prepareClaimPayload","writeErc20IncentiveClaim","simulateErc20IncentiveClawback","writeErc20IncentiveClawback","readErc20IncentiveIsClaimable","simulateErc20IncentiveDrawRaffle","writeErc20IncentiveDrawRaffle","_a","_b","_c","StrategyType","strategy","limit","reward","claims","_payload","_options","options","bytecode","prepareERC20IncentivePayload","amount","encodeAbiParameters","netAmount","typed","zeroAddress","zeroHash","__vite_import_meta_env__","ERC20IncentiveBases","RegistryType","ERC20Incentive","asset","manager"],"mappings":";;;;;;qpiBAiHaA,IAAN,MAAMA,UAAuBC,EAGlC;AAAA,EAHK,cAAA;AAAA,UAAA,GAAA,SAAA,GAIL,KAAyB,MAAMC;AAAAA,EAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,EA+B/B,MAAa,MAAMC,GAAqB;AAC/B,WAAA,MAAMC,EAAwB,KAAK,SAAS;AAAA,MACjD,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,EAAgC,KAAK,SAAS;AAAA,MACzD,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,EAAyB,KAAK,SAAS;AAAA,MAClD,SAAS,KAAK,mBAAmB;AAAA,MACjC,MAAM,CAAC;AAAA;AAAA,MAEP,GAAIH;AAAA,IAAA,CACL;AAAA,EACH;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,EAWA,MAAa,QAAQI,GAAkBJ,GAAqB;AACnD,WAAA,MAAMK,EAA0B,KAAK,SAAS;AAAA,MACnD,SAAS,KAAK,mBAAmB;AAAA,MACjC,MAAM,C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;AAAA;AAAA;AAAA,EASO,iBAAiB;AACf,WAAAE;AAAA,EACT;AACF;AAlaE5C,EAAuB,QAAiC;AAAA,EACtD,GAAI6C,KAAA,QAAAA,EAAiB,4BACjB,EAAE,OAAO,WACT,CAAC;AAAA,EACL,GAAIC;AAAA,GASN9C,EAAuB,eAA6B+C,EAAa;AAzB5D,IAAMC,IAANhD;AA2bA,SAASsC,EAA6B;AAAA,EAC3C,OAAAW;AAAA,EACA,UAAAnB;AAAA,EACA,QAAAE;AAAA,EACA,OAAAD;AAAA,EACA,SAAAmB,IAAUP;AACZ,GAA0B;AACjB,SAAAH;AAAA,IACL;AAAA,MACE,EAAE,MAAM,WAAW,MAAM,QAAQ;AAAA,MACjC,EAAE,MAAM,SAAS,MAAM,WAAW;AAAA,MAClC,EAAE,MAAM,WAAW,MAAM,SAAS;AAAA,MAClC,EAAE,MAAM,WAAW,MAAM,QAAQ;AAAA,MACjC,EAAE,MAAM,WAAW,MAAM,UAAU;AAAA,IACrC;AAAA,IACA;AAAA,MACES;AAAA,MACAnB;AAAA,MACAE;AAAA;AAAA,MAEAD,MAAU,MAAMD,MAAaD,EAAa,SAAS,KAAKE;AAAA,MACxDmB;AAAA,IACF;AAAA,EAAA;AAEJ;"}
@@ -1 +1 @@
1
- {"version":3,"file":"ERC20PeggedIncentive.d.ts","sourceRoot":"","sources":["../../src/Incentives/ERC20PeggedIncentive.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,uBAAuB,EAgBxB,MAAM,eAAe,CAAC;AAEvB,OAAO,EACL,KAAK,OAAO,EACZ,KAAK,iBAAiB,EACtB,KAAK,GAAG,EAIT,MAAM,MAAM,CAAC;AAEd,OAAO,KAAK,EACV,iBAAiB,EACjB,uBAAuB,EACxB,MAAM,0BAA0B,CAAC;AAClC,OAAO,EAAE,gBAAgB,EAAE,MAAM,gCAAgC,CAAC;AAClE,OAAO,EAAE,KAAK,YAAY,EAAuB,MAAM,aAAa,CAAC;AACrE,OAAO,EACL,KAAK,U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