@boostxyz/sdk 0.0.0-alpha.9 → 1.1.0-alpha.22
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/Actions/Action.cjs +1 -1
- package/dist/Actions/Action.cjs.map +1 -1
- package/dist/Actions/Action.js +7 -7
- package/dist/Actions/ContractAction.d.ts +11 -11
- package/dist/Actions/ContractAction.d.ts.map +1 -1
- package/dist/Actions/ERC721MintAction.d.ts +14 -14
- package/dist/Actions/ERC721MintAction.d.ts.map +1 -1
- package/dist/Actions/EventAction.cjs +1 -1
- package/dist/Actions/EventAction.cjs.map +1 -1
- package/dist/Actions/EventAction.d.ts +171 -41
- package/dist/Actions/EventAction.d.ts.map +1 -1
- package/dist/Actions/EventAction.js +15 -392
- package/dist/Actions/EventAction.js.map +1 -1
- package/dist/AllowLists/AllowList.cjs +1 -1
- package/dist/AllowLists/AllowList.cjs.map +1 -1
- package/dist/AllowLists/AllowList.d.ts +6 -4
- package/dist/AllowLists/AllowList.d.ts.map +1 -1
- package/dist/AllowLists/AllowList.js +45 -23
- package/dist/AllowLists/AllowList.js.map +1 -1
- package/dist/AllowLists/OpenAllowList.d.ts +423 -0
- package/dist/AllowLists/OpenAllowList.d.ts.map +1 -0
- package/dist/AllowLists/SimpleAllowList.cjs +1 -1
- package/dist/AllowLists/SimpleAllowList.cjs.map +1 -1
- package/dist/AllowLists/SimpleAllowList.d.ts +92 -37
- package/dist/AllowLists/SimpleAllowList.d.ts.map +1 -1
- package/dist/AllowLists/SimpleAllowList.js +55 -71
- package/dist/AllowLists/SimpleAllowList.js.map +1 -1
- package/dist/AllowLists/SimpleDenyList.cjs +1 -1
- package/dist/AllowLists/SimpleDenyList.cjs.map +1 -1
- package/dist/AllowLists/SimpleDenyList.d.ts +203 -11
- package/dist/AllowLists/SimpleDenyList.d.ts.map +1 -1
- package/dist/AllowLists/SimpleDenyList.js +11 -112
- package/dist/AllowLists/SimpleDenyList.js.map +1 -1
- package/dist/Auth/PassthroughAuth.cjs +1 -1
- package/dist/Auth/PassthroughAuth.js +1 -1
- package/dist/Boost.cjs +1 -1
- package/dist/Boost.cjs.map +1 -1
- package/dist/Boost.d.ts +20 -21
- package/dist/Boost.d.ts.map +1 -1
- package/dist/Boost.js +43 -57
- package/dist/Boost.js.map +1 -1
- package/dist/BoostCore-BVZExPPu.js +1462 -0
- package/dist/BoostCore-BVZExPPu.js.map +1 -0
- package/dist/BoostCore-D-E-cnGI.cjs +3 -0
- package/dist/BoostCore-D-E-cnGI.cjs.map +1 -0
- package/dist/BoostCore.cjs +1 -2
- package/dist/BoostCore.cjs.map +1 -1
- package/dist/BoostCore.d.ts +748 -77
- package/dist/BoostCore.d.ts.map +1 -1
- package/dist/BoostCore.js +29 -1150
- package/dist/BoostCore.js.map +1 -1
- package/dist/BoostRegistry.cjs +1 -1
- package/dist/BoostRegistry.cjs.map +1 -1
- package/dist/BoostRegistry.d.ts +80 -25
- package/dist/BoostRegistry.d.ts.map +1 -1
- package/dist/BoostRegistry.js +165 -83
- package/dist/BoostRegistry.js.map +1 -1
- package/dist/Budgets/Budget.cjs +1 -1
- package/dist/Budgets/Budget.cjs.map +1 -1
- package/dist/Budgets/Budget.d.ts.map +1 -1
- package/dist/Budgets/Budget.js +2 -2
- package/dist/Budgets/Budget.js.map +1 -1
- package/dist/Budgets/ManagedBudget.cjs +1 -1
- package/dist/Budgets/ManagedBudget.cjs.map +1 -1
- package/dist/Budgets/ManagedBudget.d.ts +75 -193
- package/dist/Budgets/ManagedBudget.d.ts.map +1 -1
- package/dist/Budgets/ManagedBudget.js +80 -298
- package/dist/Budgets/ManagedBudget.js.map +1 -1
- package/dist/Budgets/VestingBudget.d.ts +223 -89
- package/dist/Budgets/VestingBudget.d.ts.map +1 -1
- package/dist/Deployable/Contract.cjs +1 -1
- package/dist/Deployable/Contract.cjs.map +1 -1
- package/dist/Deployable/Contract.d.ts +4 -5
- package/dist/Deployable/Contract.d.ts.map +1 -1
- package/dist/Deployable/Contract.js +5 -7
- package/dist/Deployable/Contract.js.map +1 -1
- package/dist/Deployable/Deployable.cjs.map +1 -1
- package/dist/Deployable/Deployable.d.ts +1 -1
- package/dist/Deployable/Deployable.d.ts.map +1 -1
- package/dist/Deployable/Deployable.js +3 -5
- package/dist/Deployable/Deployable.js.map +1 -1
- package/dist/Deployable/DeployableTarget.cjs +1 -1
- package/dist/Deployable/DeployableTarget.cjs.map +1 -1
- package/dist/Deployable/DeployableTarget.d.ts +13 -13
- package/dist/Deployable/DeployableTarget.d.ts.map +1 -1
- package/dist/Deployable/DeployableTarget.js +28 -25
- package/dist/Deployable/DeployableTarget.js.map +1 -1
- package/dist/Deployable/DeployableTargetWithRBAC.cjs +2 -0
- package/dist/Deployable/DeployableTargetWithRBAC.cjs.map +1 -0
- package/dist/Deployable/DeployableTargetWithRBAC.d.ts +179 -0
- package/dist/Deployable/DeployableTargetWithRBAC.d.ts.map +1 -0
- package/dist/Deployable/DeployableTargetWithRBAC.js +222 -0
- package/dist/Deployable/DeployableTargetWithRBAC.js.map +1 -0
- package/dist/EventAction-BZt5cjbe.cjs +2 -0
- package/dist/EventAction-BZt5cjbe.cjs.map +1 -0
- package/dist/EventAction-C_-hJXWm.js +1541 -0
- package/dist/EventAction-C_-hJXWm.js.map +1 -0
- package/dist/Incentive-BhHaK3PZ.cjs +2 -0
- package/dist/Incentive-BhHaK3PZ.cjs.map +1 -0
- package/dist/Incentive-Cqg1w6wD.js +312 -0
- package/dist/Incentive-Cqg1w6wD.js.map +1 -0
- package/dist/Incentives/AllowListIncentive.cjs +1 -1
- package/dist/Incentives/AllowListIncentive.cjs.map +1 -1
- package/dist/Incentives/AllowListIncentive.d.ts +38 -16
- package/dist/Incentives/AllowListIncentive.d.ts.map +1 -1
- package/dist/Incentives/AllowListIncentive.js +42 -29
- package/dist/Incentives/AllowListIncentive.js.map +1 -1
- package/dist/Incentives/CGDAIncentive.cjs +1 -1
- package/dist/Incentives/CGDAIncentive.cjs.map +1 -1
- package/dist/Incentives/CGDAIncentive.d.ts +234 -21
- package/dist/Incentives/CGDAIncentive.d.ts.map +1 -1
- package/dist/Incentives/CGDAIncentive.js +45 -32
- package/dist/Incentives/CGDAIncentive.js.map +1 -1
- package/dist/Incentives/ERC1155Incentive.d.ts +224 -37
- package/dist/Incentives/ERC1155Incentive.d.ts.map +1 -1
- package/dist/Incentives/ERC20Incentive.cjs +1 -1
- package/dist/Incentives/ERC20Incentive.cjs.map +1 -1
- package/dist/Incentives/ERC20Incentive.d.ts +230 -29
- package/dist/Incentives/ERC20Incentive.d.ts.map +1 -1
- package/dist/Incentives/ERC20Incentive.js +56 -43
- package/dist/Incentives/ERC20Incentive.js.map +1 -1
- package/dist/{Budgets/SimpleBudget.d.ts → Incentives/ERC20VariableCriteriaIncentive.d.ts} +335 -440
- package/dist/Incentives/ERC20VariableCriteriaIncentive.d.ts.map +1 -0
- package/dist/Incentives/ERC20VariableIncentive.d.ts +231 -29
- package/dist/Incentives/ERC20VariableIncentive.d.ts.map +1 -1
- package/dist/Incentives/Incentive.cjs +1 -1
- package/dist/Incentives/Incentive.cjs.map +1 -1
- package/dist/Incentives/Incentive.d.ts +4 -4
- package/dist/Incentives/Incentive.d.ts.map +1 -1
- package/dist/Incentives/Incentive.js +16 -296
- package/dist/Incentives/Incentive.js.map +1 -1
- package/dist/Incentives/PointsIncentive.cjs +1 -1
- package/dist/Incentives/PointsIncentive.cjs.map +1 -1
- package/dist/Incentives/PointsIncentive.d.ts +40 -18
- package/dist/Incentives/PointsIncentive.d.ts.map +1 -1
- package/dist/Incentives/PointsIncentive.js +37 -24
- package/dist/Incentives/PointsIncentive.js.map +1 -1
- package/dist/SimpleDenyList-BUR17Tt1.cjs +2 -0
- package/dist/SimpleDenyList-BUR17Tt1.cjs.map +1 -0
- package/dist/SimpleDenyList-CGaWjuld.js +132 -0
- package/dist/SimpleDenyList-CGaWjuld.js.map +1 -0
- package/dist/Validators/SignerValidator.cjs +1 -1
- package/dist/Validators/SignerValidator.cjs.map +1 -1
- package/dist/Validators/SignerValidator.d.ts +16 -16
- package/dist/Validators/SignerValidator.d.ts.map +1 -1
- package/dist/Validators/SignerValidator.js +30 -27
- package/dist/Validators/SignerValidator.js.map +1 -1
- package/dist/Validators/Validator.cjs +1 -1
- package/dist/Validators/Validator.cjs.map +1 -1
- package/dist/Validators/Validator.d.ts +1 -1
- package/dist/Validators/Validator.js +2 -2
- package/dist/Validators/Validator.js.map +1 -1
- package/dist/claiming.cjs.map +1 -1
- package/dist/claiming.d.ts +1 -1
- package/dist/claiming.js.map +1 -1
- package/dist/componentInterfaces-BBCFkrZv.js +14 -0
- package/dist/componentInterfaces-BBCFkrZv.js.map +1 -0
- package/dist/componentInterfaces-DRI_dQ-P.cjs +2 -0
- package/dist/componentInterfaces-DRI_dQ-P.cjs.map +1 -0
- package/dist/deployments-DVXioW2i.cjs +2 -0
- package/dist/deployments-DVXioW2i.cjs.map +1 -0
- package/dist/deployments-oykLv3_Z.js +43 -0
- package/dist/deployments-oykLv3_Z.js.map +1 -0
- package/dist/deployments.json +44 -0
- package/dist/errors.cjs +1 -1
- package/dist/errors.cjs.map +1 -1
- package/dist/errors.d.ts +256 -20
- package/dist/errors.d.ts.map +1 -1
- package/dist/errors.js +183 -26
- package/dist/errors.js.map +1 -1
- package/dist/{generated-57_Kffpz.js → generated-CKt2yCQd.js} +3613 -1869
- package/dist/generated-CKt2yCQd.js.map +1 -0
- package/dist/generated-CyTNlOwM.cjs +3 -0
- package/dist/generated-CyTNlOwM.cjs.map +1 -0
- package/dist/index.cjs +1 -1
- package/dist/index.d.ts +5 -0
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +142 -108
- package/dist/index.js.map +1 -1
- package/dist/transfers.cjs.map +1 -1
- package/dist/transfers.d.ts +1 -1
- package/dist/transfers.js.map +1 -1
- package/dist/utils.cjs +1 -1
- package/dist/utils.cjs.map +1 -1
- package/dist/utils.d.ts +26 -12
- package/dist/utils.d.ts.map +1 -1
- package/dist/utils.js +38 -23
- package/dist/utils.js.map +1 -1
- package/package.json +20 -10
- package/src/Actions/Action.test.ts +14 -13
- package/src/Actions/ContractAction.test.ts +10 -10
- package/src/Actions/ContractAction.ts +11 -12
- package/src/Actions/ERC721MintAction.test.ts +6 -6
- package/src/Actions/ERC721MintAction.ts +14 -15
- package/src/Actions/EventAction.test.ts +729 -109
- package/src/Actions/EventAction.ts +542 -84
- package/src/AllowLists/AllowList.test.ts +7 -7
- package/src/AllowLists/AllowList.ts +5 -3
- package/src/AllowLists/OpenAllowList.test.ts +40 -0
- package/src/AllowLists/OpenAllowList.ts +45 -0
- package/src/AllowLists/SimpleAllowList.test.ts +4 -4
- package/src/AllowLists/SimpleAllowList.ts +39 -61
- package/src/AllowLists/SimpleDenyList.test.ts +4 -4
- package/src/AllowLists/SimpleDenyList.ts +40 -17
- package/src/Auth/PassthroughAuth.test.ts +1 -1
- package/src/Boost.ts +21 -24
- package/src/BoostCore.test.ts +323 -268
- package/src/BoostCore.ts +396 -219
- package/src/BoostRegistry.test.ts +53 -0
- package/src/BoostRegistry.ts +161 -40
- package/src/Budgets/Budget.test.ts +2 -2
- package/src/Budgets/Budget.ts +1 -2
- package/src/Budgets/ManagedBudget.test.ts +82 -19
- package/src/Budgets/ManagedBudget.ts +48 -310
- package/src/Budgets/VestingBudget.test.ts +7 -7
- package/src/Budgets/VestingBudget.ts +34 -106
- package/src/Deployable/Contract.ts +4 -5
- package/src/Deployable/Deployable.ts +1 -1
- package/src/Deployable/DeployableTarget.ts +30 -19
- package/src/Deployable/DeployableTargetWithRBAC.ts +323 -0
- package/src/Incentives/AllowListIncentive.test.ts +5 -5
- package/src/Incentives/AllowListIncentive.ts +29 -15
- package/src/Incentives/CGDAIncentive.test.ts +9 -6
- package/src/Incentives/CGDAIncentive.ts +38 -18
- package/src/Incentives/ERC1155Incentive.test.ts +3 -3
- package/src/Incentives/ERC1155Incentive.ts +28 -29
- package/src/Incentives/ERC20Incentive.test.ts +9 -6
- package/src/Incentives/ERC20Incentive.ts +46 -26
- package/src/Incentives/ERC20VariableCriteriaIncentive.test.ts +184 -0
- package/src/Incentives/ERC20VariableCriteriaIncentive.ts +324 -0
- package/src/Incentives/ERC20VariableIncentive.test.ts +8 -11
- package/src/Incentives/ERC20VariableIncentive.ts +49 -26
- package/src/Incentives/Incentive.test.ts +4 -1
- package/src/Incentives/Incentive.ts +7 -6
- package/src/Incentives/PointsIncentive.test.ts +24 -25
- package/src/Incentives/PointsIncentive.ts +31 -17
- package/src/Validators/SignerValidator.test.ts +6 -6
- package/src/Validators/SignerValidator.ts +19 -17
- package/src/Validators/Validator.test.ts +2 -2
- package/src/Validators/Validator.ts +1 -1
- package/src/claiming.ts +1 -1
- package/src/errors.ts +345 -21
- package/src/index.test.ts +118 -36
- package/src/index.ts +5 -0
- package/src/transfers.ts +1 -1
- package/src/utils.test.ts +2 -2
- package/src/utils.ts +61 -12
- package/dist/Budgets/SimpleBudget.d.ts.map +0 -1
- package/dist/componentInterfaces-CKCBwG16.cjs +0 -2
- package/dist/componentInterfaces-CKCBwG16.cjs.map +0 -1
- package/dist/componentInterfaces-DYkaxBda.js +0 -13
- package/dist/componentInterfaces-DYkaxBda.js.map +0 -1
- package/dist/generated-57_Kffpz.js.map +0 -1
- package/dist/generated-wKBNvm48.cjs +0 -3
- package/dist/generated-wKBNvm48.cjs.map +0 -1
- package/src/Budgets/SimpleBudget.test.ts +0 -152
- package/src/Budgets/SimpleBudget.ts +0 -564
|
@@ -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} from 'viem';\nimport type {\n DeployableOptions,\n GenericDeployableParams,\n} from '../Deployable/Deployable';\nimport { DeployableTarget } from '../Deployable/DeployableTarget';\nimport {\n type ClaimPayload,\n type 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. `StrategyType.MINT` is not supported for `ERC20Incentives`\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.\n *\n * @type {bigint}\n */\n limit: bigint;\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 {Address}\n */\n public static override base: Address = import.meta.env\n .VITE_ERC20_INCENTIVE_BASE;\n /**\n * @inheritdoc\n *\n * @public\n * @static\n * @type {RegistryType}\n */\n public static override registryType: RegistryType = RegistryType.INCENTIVE;\n\n /**\n * The owner of the incentive\n *\n * @public\n * @async\n * @param {?ReadParams<typeof erc20IncentiveAbi, 'owner'>} [params]\n * @returns {unknown}\n */\n public async owner(params?: ReadParams<typeof erc20IncentiveAbi, 'owner'>) {\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<typeof erc20IncentiveAbi, 'currentReward'>} [params]\n * @returns {Promise<bigint>} - The current reward\n */\n public async currentReward(\n params?: ReadParams<typeof erc20IncentiveAbi, 'currentReward'>,\n ) {\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<typeof erc20IncentiveAbi, 'claims'>} [params]\n * @returns {Promise<bigint>}\n */\n public async claims(params?: ReadParams<typeof erc20IncentiveAbi, 'claims'>) {\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<typeof erc20IncentiveAbi, 'claimed'>} [params]\n * @returns {Promise<boolean>}\n */\n public async claimed(\n address: Address,\n params?: ReadParams<typeof erc20IncentiveAbi, 'claimed'>,\n ) {\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<typeof erc20IncentiveAbi, 'asset'>} [params]\n * @returns {Promise<Address>}\n */\n public async asset(params?: ReadParams<typeof erc20IncentiveAbi, 'asset'>) {\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<typeof erc20IncentiveAbi, 'strategy'>} [params]\n * @returns {Promise<StrategyType>}\n */\n public strategy(\n params?: ReadParams<typeof erc20IncentiveAbi, 'strategy'>,\n ): 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<typeof erc20IncentiveAbi, 'reward'>} [params]\n * @returns {Promise<bigint>}\n */\n public async reward(params?: ReadParams<typeof erc20IncentiveAbi, 'reward'>) {\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<typeof erc20IncentiveAbi, 'limit'>} [params]\n * @returns {unknown}\n */\n public async limit(params?: ReadParams<typeof erc20IncentiveAbi, 'limit'>) {\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<typeof erc20IncentiveAbi, 'entries'>} [params]\n * @returns {Promise<Address>}\n */\n public async entries(\n i: bigint,\n params?: ReadParams<typeof erc20IncentiveAbi, 'entries'>,\n ) {\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<typeof erc20IncentiveAbi, 'claim'>} [params]\n * @returns {Promise<boolean>} - Returns true if successfully claimed\n */\n protected async claim(\n payload: ClaimPayload,\n params?: WriteParams<typeof erc20IncentiveAbi, 'claim'>,\n ) {\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<typeof erc20IncentiveAbi, 'claim'>} [params]\n * @returns {Promise<boolean>} - Returns true if successfully claimed\n */\n protected async claimRaw(\n payload: ClaimPayload,\n params?: WriteParams<typeof erc20IncentiveAbi, 'claim'>,\n ) {\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<typeof erc20IncentiveAbi, 'clawback'>} [params]\n * @returns {Promise<boolean>} - True if the assets were successfully clawbacked\n */\n public async clawback(\n payload: ClaimPayload,\n params?: WriteParams<typeof erc20IncentiveAbi, 'clawback'>,\n ) {\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<typeof erc20IncentiveAbi, 'clawback'>} [params]\n * @returns {Promise<boolean>} - True if the assets were successfully clawbacked\n */\n public async clawbackRaw(\n payload: ClaimPayload,\n params?: WriteParams<typeof erc20IncentiveAbi, 'clawback'>,\n ) {\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<typeof erc20IncentiveAbi, 'isClaimable'>} [params]\n * @returns {unknown} = True if the incentive is claimable based on the data payload\n */\n public async isClaimable(\n payload: ClaimPayload,\n params?: ReadParams<typeof erc20IncentiveAbi, 'isClaimable'>,\n ) {\n return await readErc20IncentiveIsClaimable(this._config, {\n address: this.assertValidAddress(),\n args: [prepareClaimPayload(payload)],\n // biome-ignore lint/suspicious/noExplicitAny: Accept any shape of valid wagmi/viem parameters, wagmi does the same thing internally\n ...(params as any),\n });\n }\n\n /**\n * 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<typeof erc20IncentiveAbi, 'drawRaffle'>} [params]\n * @returns {Promise<void>}\n */\n public async drawRaffle(\n params?: WriteParams<typeof erc20IncentiveAbi, 'drawRaffle'>,\n ) {\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<typeof erc20IncentiveAbi, 'drawRaffle'>} [params]\n * @returns {Promise<void>}\n */\n public async drawRaffleRaw(\n params?: WriteParams<typeof erc20IncentiveAbi, 'drawRaffle'>,\n ) {\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 * @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/**\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 * @returns {*}\n */\nexport function prepareERC20IncentivePayload({\n asset,\n strategy,\n reward,\n limit,\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 ],\n [asset, strategy, reward, limit],\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","_payload","_options","options","bytecode","prepareERC20IncentivePayload","RegistryType","ERC20Incentive","asset","strategy","reward","limit","encodeAbiParameters"],"mappings":"61jBAsGaA,EAAN,MAAMA,UAAuBC,EAAAA,gBAGlC,CAHK,aAAA,CAAA,MAAA,GAAA,SAAA,EAIL,KAAyB,IAAMC,GAAA,CA2B/B,MAAa,MAAMC,EAAwD,CAClE,OAAA,MAAMC,EAAAA,GAAwB,KAAK,QAAS,CACjD,QAAS,KAAK,mBAAmB,EACjC,KAAM,CAAC,EAEP,GAAID,CAAA,CACL,CACH,CAUA,MAAa,cACXA,EACA,CACO,OAAA,MAAME,EAAAA,GAAgC,KAAK,QAAS,CACzD,QAAS,KAAK,mBAAmB,EACjC,KAAM,CAAC,EAEP,GAAIF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,EAA6Bf,CAAO,CAAC,EAC5C,GAAG,KAAK,wBAAwBa,EAAQ,OAAO,CAAA,CAEnD,CACF,EApVyB5B,EAAA,KAAgB,6CASvCA,EAAuB,aAA6B+B,EAAa,aAAA,UArB5D,IAAMC,EAANhC,EA4WA,SAAS8B,EAA6B,CAC3C,MAAAG,EACA,SAAAC,EACA,OAAAC,EACA,MAAAC,CACF,EAA0B,CACjB,OAAAC,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,CACnC,EACA,CAACJ,EAAOC,EAAUC,EAAQC,CAAK,CAAA,CAEnC"}
|
|
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 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 type 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. `StrategyType.MINT` is not supported for `ERC20Incentives`\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.\n *\n * @type {bigint}\n */\n limit: bigint;\n /**\n * The entity that can `clawback` funds\n *\n * @type {Address}\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 ...(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<typeof erc20IncentiveAbi, 'owner'>) {\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(\n params?: ReadParams<typeof erc20IncentiveAbi, 'currentReward'>,\n ) {\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<typeof erc20IncentiveAbi, 'claims'>) {\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(\n address: Address,\n params?: ReadParams<typeof erc20IncentiveAbi, 'claimed'>,\n ) {\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<typeof erc20IncentiveAbi, 'asset'>) {\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(\n params?: ReadParams<typeof erc20IncentiveAbi, 'strategy'>,\n ): 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<typeof erc20IncentiveAbi, 'reward'>) {\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<typeof erc20IncentiveAbi, 'limit'>) {\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(\n i: bigint,\n params?: ReadParams<typeof erc20IncentiveAbi, 'entries'>,\n ) {\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(\n payload: ClaimPayload,\n params?: WriteParams<typeof erc20IncentiveAbi, 'claim'>,\n ) {\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(\n payload: ClaimPayload,\n params?: WriteParams<typeof erc20IncentiveAbi, 'claim'>,\n ) {\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(\n payload: ClaimPayload,\n params?: WriteParams<typeof erc20IncentiveAbi, 'clawback'>,\n ) {\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(\n payload: ClaimPayload,\n params?: WriteParams<typeof erc20IncentiveAbi, 'clawback'>,\n ) {\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(\n payload: ClaimPayload,\n params?: ReadParams<typeof erc20IncentiveAbi, 'isClaimable'>,\n ) {\n return await readErc20IncentiveIsClaimable(this._config, {\n address: this.assertValidAddress(),\n args: [prepareClaimPayload(payload)],\n // biome-ignore lint/suspicious/noExplicitAny: Accept any shape of valid wagmi/viem parameters, wagmi does the same thing internally\n ...(params as any),\n });\n }\n\n /**\n * 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(\n params?: WriteParams<typeof erc20IncentiveAbi, 'drawRaffle'>,\n ) {\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(\n params?: WriteParams<typeof erc20IncentiveAbi, 'drawRaffle'>,\n ) {\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 * @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 * 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 * @returns {Hex}\n */\nexport function prepareERC20IncentivePayload({\n asset,\n strategy,\n reward,\n limit,\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 ],\n [asset, strategy, reward, limit],\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","_payload","_options","options","bytecode","prepareERC20IncentivePayload","zeroHash","ERC20IncentiveBases","RegistryType","ERC20Incentive","asset","strategy","reward","limit","encodeAbiParameters"],"mappings":"0muBA8GaA,EAAN,MAAMA,UAAuBC,EAAAA,gBAGlC,CAHK,aAAA,CAAA,MAAA,GAAA,SAAA,EAIL,KAAyB,IAAMC,GAAA,CA4B/B,MAAa,MAAMC,EAAwD,CAClE,OAAA,MAAMC,EAAAA,GAAwB,KAAK,QAAS,CACjD,QAAS,KAAK,mBAAmB,EACjC,KAAM,CAAC,EAEP,GAAID,CAAA,CACL,CACH,CAUA,MAAa,cACXA,EACA,CACO,OAAA,MAAME,EAAAA,GAAgC,KAAK,QAAS,CACzD,QAAS,KAAK,mBAAmB,EACjC,KAAM,CAAC,EAEP,GAAIF,CAAA,CACL,CACH,CAUA,MAAa,OAAOA,EAAyD,CACpE,OAAA,MAAMG,EAAAA,GAAyB,KAAK,QAAS,CAClD,QAAS,KAAK,mBAAmB,EACjC,KAAM,CAAC,EAEP,GAAIH,CAAA,CACL,CACH,CAWA,MAAa,QACXI,EACAJ,EACA,CACO,OAAA,MAAMK,EAAAA,GAA0B,KAAK,QAAS,CACnD,QAAS,KAAK,mBAAmB,EACjC,KAAM,CAACD,CAAO,EAEd,GAAIJ,CAAA,CACL,CACH,CAUA,MAAa,MAAMA,EAAwD,CAClE,OAAA,MAAMM,EAAAA,GAAwB,KAAK,QAAS,CACjD,QAAS,KAAK,mBAAmB,EAEjC,GAAIN,CAAA,CACL,CACH,CAUO,SACLA,EACuB,CAChB,OAAAO,EAAA,GAA2B,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AACJ,EAAOC,EAAUC,EAAQC,CAAK,CAAA,CAEnC"}
|
|
@@ -37,6 +37,12 @@ export interface ERC20IncentivePayload {
|
|
|
37
37
|
* @type {bigint}
|
|
38
38
|
*/
|
|
39
39
|
limit: bigint;
|
|
40
|
+
/**
|
|
41
|
+
* The entity that can `clawback` funds
|
|
42
|
+
*
|
|
43
|
+
* @type {Address}
|
|
44
|
+
*/
|
|
45
|
+
manager: Address;
|
|
40
46
|
}
|
|
41
47
|
/**
|
|
42
48
|
* A generic `viem.Log` event with support for `ERC20Incentive` event types.
|
|
@@ -117,6 +123,10 @@ export declare class ERC20Incentive extends DeployableTarget<ERC20IncentivePaylo
|
|
|
117
123
|
readonly type: "error";
|
|
118
124
|
readonly inputs: readonly [];
|
|
119
125
|
readonly name: "InvalidInitializationData";
|
|
126
|
+
}, {
|
|
127
|
+
readonly type: "error";
|
|
128
|
+
readonly inputs: readonly [];
|
|
129
|
+
readonly name: "LengthMismatch";
|
|
120
130
|
}, {
|
|
121
131
|
readonly type: "error";
|
|
122
132
|
readonly inputs: readonly [];
|
|
@@ -211,6 +221,41 @@ export declare class ERC20Incentive extends DeployableTarget<ERC20IncentivePaylo
|
|
|
211
221
|
readonly indexed: true;
|
|
212
222
|
}];
|
|
213
223
|
readonly name: "OwnershipTransferred";
|
|
224
|
+
}, {
|
|
225
|
+
readonly type: "event";
|
|
226
|
+
readonly anonymous: false;
|
|
227
|
+
readonly inputs: readonly [{
|
|
228
|
+
readonly name: "user";
|
|
229
|
+
readonly internalType: "address";
|
|
230
|
+
readonly type: "address";
|
|
231
|
+
readonly indexed: true;
|
|
232
|
+
}, {
|
|
233
|
+
readonly name: "roles";
|
|
234
|
+
readonly internalType: "uint256";
|
|
235
|
+
readonly type: "uint256";
|
|
236
|
+
readonly indexed: true;
|
|
237
|
+
}];
|
|
238
|
+
readonly name: "RolesUpdated";
|
|
239
|
+
}, {
|
|
240
|
+
readonly type: "function";
|
|
241
|
+
readonly inputs: readonly [];
|
|
242
|
+
readonly name: "ADMIN_ROLE";
|
|
243
|
+
readonly outputs: readonly [{
|
|
244
|
+
readonly name: "";
|
|
245
|
+
readonly internalType: "uint256";
|
|
246
|
+
readonly type: "uint256";
|
|
247
|
+
}];
|
|
248
|
+
readonly stateMutability: "view";
|
|
249
|
+
}, {
|
|
250
|
+
readonly type: "function";
|
|
251
|
+
readonly inputs: readonly [];
|
|
252
|
+
readonly name: "MANAGER_ROLE";
|
|
253
|
+
readonly outputs: readonly [{
|
|
254
|
+
readonly name: "";
|
|
255
|
+
readonly internalType: "uint256";
|
|
256
|
+
readonly type: "uint256";
|
|
257
|
+
}];
|
|
258
|
+
readonly stateMutability: "view";
|
|
214
259
|
}, {
|
|
215
260
|
readonly type: "function";
|
|
216
261
|
readonly inputs: readonly [];
|
|
@@ -279,8 +324,12 @@ export declare class ERC20Incentive extends DeployableTarget<ERC20IncentivePaylo
|
|
|
279
324
|
readonly name: "clawback";
|
|
280
325
|
readonly outputs: readonly [{
|
|
281
326
|
readonly name: "";
|
|
282
|
-
readonly internalType: "
|
|
283
|
-
readonly type: "
|
|
327
|
+
readonly internalType: "uint256";
|
|
328
|
+
readonly type: "uint256";
|
|
329
|
+
}, {
|
|
330
|
+
readonly name: "";
|
|
331
|
+
readonly internalType: "address";
|
|
332
|
+
readonly type: "address";
|
|
284
333
|
}];
|
|
285
334
|
readonly stateMutability: "nonpayable";
|
|
286
335
|
}, {
|
|
@@ -333,6 +382,70 @@ export declare class ERC20Incentive extends DeployableTarget<ERC20IncentivePaylo
|
|
|
333
382
|
readonly type: "bytes4";
|
|
334
383
|
}];
|
|
335
384
|
readonly stateMutability: "pure";
|
|
385
|
+
}, {
|
|
386
|
+
readonly type: "function";
|
|
387
|
+
readonly inputs: readonly [{
|
|
388
|
+
readonly name: "user";
|
|
389
|
+
readonly internalType: "address";
|
|
390
|
+
readonly type: "address";
|
|
391
|
+
}, {
|
|
392
|
+
readonly name: "roles";
|
|
393
|
+
readonly internalType: "uint256";
|
|
394
|
+
readonly type: "uint256";
|
|
395
|
+
}];
|
|
396
|
+
readonly name: "grantRoles";
|
|
397
|
+
readonly outputs: readonly [];
|
|
398
|
+
readonly stateMutability: "payable";
|
|
399
|
+
}, {
|
|
400
|
+
readonly type: "function";
|
|
401
|
+
readonly inputs: readonly [{
|
|
402
|
+
readonly name: "accounts_";
|
|
403
|
+
readonly internalType: "address[]";
|
|
404
|
+
readonly type: "address[]";
|
|
405
|
+
}, {
|
|
406
|
+
readonly name: "roles_";
|
|
407
|
+
readonly internalType: "uint256[]";
|
|
408
|
+
readonly type: "uint256[]";
|
|
409
|
+
}];
|
|
410
|
+
readonly name: "grantRoles";
|
|
411
|
+
readonly outputs: readonly [];
|
|
412
|
+
readonly stateMutability: "nonpayable";
|
|
413
|
+
}, {
|
|
414
|
+
readonly type: "function";
|
|
415
|
+
readonly inputs: readonly [{
|
|
416
|
+
readonly name: "user";
|
|
417
|
+
readonly internalType: "address";
|
|
418
|
+
readonly type: "address";
|
|
419
|
+
}, {
|
|
420
|
+
readonly name: "roles";
|
|
421
|
+
readonly internalType: "uint256";
|
|
422
|
+
readonly type: "uint256";
|
|
423
|
+
}];
|
|
424
|
+
readonly name: "hasAllRoles";
|
|
425
|
+
readonly outputs: readonly [{
|
|
426
|
+
readonly name: "";
|
|
427
|
+
readonly internalType: "bool";
|
|
428
|
+
readonly type: "bool";
|
|
429
|
+
}];
|
|
430
|
+
readonly stateMutability: "view";
|
|
431
|
+
}, {
|
|
432
|
+
readonly type: "function";
|
|
433
|
+
readonly inputs: readonly [{
|
|
434
|
+
readonly name: "user";
|
|
435
|
+
readonly internalType: "address";
|
|
436
|
+
readonly type: "address";
|
|
437
|
+
}, {
|
|
438
|
+
readonly name: "roles";
|
|
439
|
+
readonly internalType: "uint256";
|
|
440
|
+
readonly type: "uint256";
|
|
441
|
+
}];
|
|
442
|
+
readonly name: "hasAnyRole";
|
|
443
|
+
readonly outputs: readonly [{
|
|
444
|
+
readonly name: "";
|
|
445
|
+
readonly internalType: "bool";
|
|
446
|
+
readonly type: "bool";
|
|
447
|
+
}];
|
|
448
|
+
readonly stateMutability: "view";
|
|
336
449
|
}, {
|
|
337
450
|
readonly type: "function";
|
|
338
451
|
readonly inputs: readonly [{
|
|
@@ -343,6 +456,20 @@ export declare class ERC20Incentive extends DeployableTarget<ERC20IncentivePaylo
|
|
|
343
456
|
readonly name: "initialize";
|
|
344
457
|
readonly outputs: readonly [];
|
|
345
458
|
readonly stateMutability: "nonpayable";
|
|
459
|
+
}, {
|
|
460
|
+
readonly type: "function";
|
|
461
|
+
readonly inputs: readonly [{
|
|
462
|
+
readonly name: "account_";
|
|
463
|
+
readonly internalType: "address";
|
|
464
|
+
readonly type: "address";
|
|
465
|
+
}];
|
|
466
|
+
readonly name: "isAuthorized";
|
|
467
|
+
readonly outputs: readonly [{
|
|
468
|
+
readonly name: "";
|
|
469
|
+
readonly internalType: "bool";
|
|
470
|
+
readonly type: "bool";
|
|
471
|
+
}];
|
|
472
|
+
readonly stateMutability: "view";
|
|
346
473
|
}, {
|
|
347
474
|
readonly type: "function";
|
|
348
475
|
readonly inputs: readonly [{
|
|
@@ -415,12 +542,50 @@ export declare class ERC20Incentive extends DeployableTarget<ERC20IncentivePaylo
|
|
|
415
542
|
readonly name: "renounceOwnership";
|
|
416
543
|
readonly outputs: readonly [];
|
|
417
544
|
readonly stateMutability: "payable";
|
|
545
|
+
}, {
|
|
546
|
+
readonly type: "function";
|
|
547
|
+
readonly inputs: readonly [{
|
|
548
|
+
readonly name: "roles";
|
|
549
|
+
readonly internalType: "uint256";
|
|
550
|
+
readonly type: "uint256";
|
|
551
|
+
}];
|
|
552
|
+
readonly name: "renounceRoles";
|
|
553
|
+
readonly outputs: readonly [];
|
|
554
|
+
readonly stateMutability: "payable";
|
|
418
555
|
}, {
|
|
419
556
|
readonly type: "function";
|
|
420
557
|
readonly inputs: readonly [];
|
|
421
558
|
readonly name: "requestOwnershipHandover";
|
|
422
559
|
readonly outputs: readonly [];
|
|
423
560
|
readonly stateMutability: "payable";
|
|
561
|
+
}, {
|
|
562
|
+
readonly type: "function";
|
|
563
|
+
readonly inputs: readonly [{
|
|
564
|
+
readonly name: "user";
|
|
565
|
+
readonly internalType: "address";
|
|
566
|
+
readonly type: "address";
|
|
567
|
+
}, {
|
|
568
|
+
readonly name: "roles";
|
|
569
|
+
readonly internalType: "uint256";
|
|
570
|
+
readonly type: "uint256";
|
|
571
|
+
}];
|
|
572
|
+
readonly name: "revokeRoles";
|
|
573
|
+
readonly outputs: readonly [];
|
|
574
|
+
readonly stateMutability: "payable";
|
|
575
|
+
}, {
|
|
576
|
+
readonly type: "function";
|
|
577
|
+
readonly inputs: readonly [{
|
|
578
|
+
readonly name: "accounts_";
|
|
579
|
+
readonly internalType: "address[]";
|
|
580
|
+
readonly type: "address[]";
|
|
581
|
+
}, {
|
|
582
|
+
readonly name: "roles_";
|
|
583
|
+
readonly internalType: "uint256[]";
|
|
584
|
+
readonly type: "uint256[]";
|
|
585
|
+
}];
|
|
586
|
+
readonly name: "revokeRoles";
|
|
587
|
+
readonly outputs: readonly [];
|
|
588
|
+
readonly stateMutability: "nonpayable";
|
|
424
589
|
}, {
|
|
425
590
|
readonly type: "function";
|
|
426
591
|
readonly inputs: readonly [];
|
|
@@ -431,6 +596,34 @@ export declare class ERC20Incentive extends DeployableTarget<ERC20IncentivePaylo
|
|
|
431
596
|
readonly type: "uint256";
|
|
432
597
|
}];
|
|
433
598
|
readonly stateMutability: "view";
|
|
599
|
+
}, {
|
|
600
|
+
readonly type: "function";
|
|
601
|
+
readonly inputs: readonly [{
|
|
602
|
+
readonly name: "user";
|
|
603
|
+
readonly internalType: "address";
|
|
604
|
+
readonly type: "address";
|
|
605
|
+
}];
|
|
606
|
+
readonly name: "rolesOf";
|
|
607
|
+
readonly outputs: readonly [{
|
|
608
|
+
readonly name: "roles";
|
|
609
|
+
readonly internalType: "uint256";
|
|
610
|
+
readonly type: "uint256";
|
|
611
|
+
}];
|
|
612
|
+
readonly stateMutability: "view";
|
|
613
|
+
}, {
|
|
614
|
+
readonly type: "function";
|
|
615
|
+
readonly inputs: readonly [{
|
|
616
|
+
readonly name: "accounts_";
|
|
617
|
+
readonly internalType: "address[]";
|
|
618
|
+
readonly type: "address[]";
|
|
619
|
+
}, {
|
|
620
|
+
readonly name: "authorized_";
|
|
621
|
+
readonly internalType: "bool[]";
|
|
622
|
+
readonly type: "bool[]";
|
|
623
|
+
}];
|
|
624
|
+
readonly name: "setAuthorized";
|
|
625
|
+
readonly outputs: readonly [];
|
|
626
|
+
readonly stateMutability: "nonpayable";
|
|
434
627
|
}, {
|
|
435
628
|
readonly type: "function";
|
|
436
629
|
readonly inputs: readonly [];
|
|
@@ -471,9 +664,9 @@ export declare class ERC20Incentive extends DeployableTarget<ERC20IncentivePaylo
|
|
|
471
664
|
*
|
|
472
665
|
* @public
|
|
473
666
|
* @static
|
|
474
|
-
* @type {Address}
|
|
667
|
+
* @type {Record<number, Address>}
|
|
475
668
|
*/
|
|
476
|
-
static
|
|
669
|
+
static bases: Record<number, Address>;
|
|
477
670
|
/**
|
|
478
671
|
* @inheritdoc
|
|
479
672
|
*
|
|
@@ -487,8 +680,8 @@ export declare class ERC20Incentive extends DeployableTarget<ERC20IncentivePaylo
|
|
|
487
680
|
*
|
|
488
681
|
* @public
|
|
489
682
|
* @async
|
|
490
|
-
* @param {?ReadParams
|
|
491
|
-
* @returns {
|
|
683
|
+
* @param {?ReadParams} [params]
|
|
684
|
+
* @returns {Promise<Address>}
|
|
492
685
|
*/
|
|
493
686
|
owner(params?: ReadParams<typeof erc20IncentiveAbi, 'owner'>): Promise<`0x${string}`>;
|
|
494
687
|
/**
|
|
@@ -496,7 +689,7 @@ export declare class ERC20Incentive extends DeployableTarget<ERC20IncentivePaylo
|
|
|
496
689
|
*
|
|
497
690
|
* @public
|
|
498
691
|
* @async
|
|
499
|
-
* @param {?ReadParams
|
|
692
|
+
* @param {?ReadParams} [params]
|
|
500
693
|
* @returns {Promise<bigint>} - The current reward
|
|
501
694
|
*/
|
|
502
695
|
currentReward(params?: ReadParams<typeof erc20IncentiveAbi, 'currentReward'>): Promise<bigint>;
|
|
@@ -505,7 +698,7 @@ export declare class ERC20Incentive extends DeployableTarget<ERC20IncentivePaylo
|
|
|
505
698
|
*
|
|
506
699
|
* @public
|
|
507
700
|
* @async
|
|
508
|
-
* @param {?ReadParams
|
|
701
|
+
* @param {?ReadParams} [params]
|
|
509
702
|
* @returns {Promise<bigint>}
|
|
510
703
|
*/
|
|
511
704
|
claims(params?: ReadParams<typeof erc20IncentiveAbi, 'claims'>): Promise<bigint>;
|
|
@@ -515,7 +708,7 @@ export declare class ERC20Incentive extends DeployableTarget<ERC20IncentivePaylo
|
|
|
515
708
|
* @public
|
|
516
709
|
* @async
|
|
517
710
|
* @param {Address} address
|
|
518
|
-
* @param {?ReadParams
|
|
711
|
+
* @param {?ReadParams} [params]
|
|
519
712
|
* @returns {Promise<boolean>}
|
|
520
713
|
*/
|
|
521
714
|
claimed(address: Address, params?: ReadParams<typeof erc20IncentiveAbi, 'claimed'>): Promise<boolean>;
|
|
@@ -524,7 +717,7 @@ export declare class ERC20Incentive extends DeployableTarget<ERC20IncentivePaylo
|
|
|
524
717
|
*
|
|
525
718
|
* @public
|
|
526
719
|
* @async
|
|
527
|
-
* @param {?ReadParams
|
|
720
|
+
* @param {?ReadParams} [params]
|
|
528
721
|
* @returns {Promise<Address>}
|
|
529
722
|
*/
|
|
530
723
|
asset(params?: ReadParams<typeof erc20IncentiveAbi, 'asset'>): Promise<`0x${string}`>;
|
|
@@ -533,7 +726,7 @@ export declare class ERC20Incentive extends DeployableTarget<ERC20IncentivePaylo
|
|
|
533
726
|
*
|
|
534
727
|
* @public
|
|
535
728
|
* @async
|
|
536
|
-
* @param {?ReadParams
|
|
729
|
+
* @param {?ReadParams} [params]
|
|
537
730
|
* @returns {Promise<StrategyType>}
|
|
538
731
|
*/
|
|
539
732
|
strategy(params?: ReadParams<typeof erc20IncentiveAbi, 'strategy'>): Promise<StrategyType>;
|
|
@@ -542,7 +735,7 @@ export declare class ERC20Incentive extends DeployableTarget<ERC20IncentivePaylo
|
|
|
542
735
|
*
|
|
543
736
|
* @public
|
|
544
737
|
* @async
|
|
545
|
-
* @param {?ReadParams
|
|
738
|
+
* @param {?ReadParams} [params]
|
|
546
739
|
* @returns {Promise<bigint>}
|
|
547
740
|
*/
|
|
548
741
|
reward(params?: ReadParams<typeof erc20IncentiveAbi, 'reward'>): Promise<bigint>;
|
|
@@ -551,8 +744,8 @@ export declare class ERC20Incentive extends DeployableTarget<ERC20IncentivePaylo
|
|
|
551
744
|
*
|
|
552
745
|
* @public
|
|
553
746
|
* @async
|
|
554
|
-
* @param {?ReadParams
|
|
555
|
-
* @returns {
|
|
747
|
+
* @param {?ReadParams} [params]
|
|
748
|
+
* @returns {Promise<bigint>}
|
|
556
749
|
*/
|
|
557
750
|
limit(params?: ReadParams<typeof erc20IncentiveAbi, 'limit'>): Promise<bigint>;
|
|
558
751
|
/**
|
|
@@ -561,7 +754,7 @@ export declare class ERC20Incentive extends DeployableTarget<ERC20IncentivePaylo
|
|
|
561
754
|
* @public
|
|
562
755
|
* @async
|
|
563
756
|
* @param {bigint} i - Index of address
|
|
564
|
-
* @param {?ReadParams
|
|
757
|
+
* @param {?ReadParams} [params]
|
|
565
758
|
* @returns {Promise<Address>}
|
|
566
759
|
*/
|
|
567
760
|
entries(i: bigint, params?: ReadParams<typeof erc20IncentiveAbi, 'entries'>): Promise<`0x${string}`>;
|
|
@@ -571,7 +764,7 @@ export declare class ERC20Incentive extends DeployableTarget<ERC20IncentivePaylo
|
|
|
571
764
|
* @public
|
|
572
765
|
* @async
|
|
573
766
|
* @param {ClaimPayload} payload
|
|
574
|
-
* @param {?WriteParams
|
|
767
|
+
* @param {?WriteParams} [params]
|
|
575
768
|
* @returns {Promise<boolean>} - Returns true if successfully claimed
|
|
576
769
|
*/
|
|
577
770
|
protected claim(payload: ClaimPayload, params?: WriteParams<typeof erc20IncentiveAbi, 'claim'>): Promise<boolean>;
|
|
@@ -581,8 +774,8 @@ export declare class ERC20Incentive extends DeployableTarget<ERC20IncentivePaylo
|
|
|
581
774
|
* @public
|
|
582
775
|
* @async
|
|
583
776
|
* @param {ClaimPayload} payload
|
|
584
|
-
* @param {?WriteParams
|
|
585
|
-
* @returns {Promise<boolean>} - Returns true if successfully claimed
|
|
777
|
+
* @param {?WriteParams} [params]
|
|
778
|
+
* @returns {Promise<{ hash: `0x${string}`; result: boolean; }>} - Returns true if successfully claimed
|
|
586
779
|
*/
|
|
587
780
|
protected claimRaw(payload: ClaimPayload, params?: WriteParams<typeof erc20IncentiveAbi, 'claim'>): Promise<{
|
|
588
781
|
hash: `0x${string}`;
|
|
@@ -594,22 +787,22 @@ export declare class ERC20Incentive extends DeployableTarget<ERC20IncentivePaylo
|
|
|
594
787
|
* @public
|
|
595
788
|
* @async
|
|
596
789
|
* @param {ClaimPayload} payload
|
|
597
|
-
* @param {?WriteParams
|
|
790
|
+
* @param {?WriteParams} [params]
|
|
598
791
|
* @returns {Promise<boolean>} - True if the assets were successfully clawbacked
|
|
599
792
|
*/
|
|
600
|
-
clawback(payload: ClaimPayload, params?: WriteParams<typeof erc20IncentiveAbi, 'clawback'>): Promise<
|
|
793
|
+
clawback(payload: ClaimPayload, params?: WriteParams<typeof erc20IncentiveAbi, 'clawback'>): Promise<readonly [bigint, `0x${string}`]>;
|
|
601
794
|
/**
|
|
602
795
|
* Clawback assets from the incentive
|
|
603
796
|
*
|
|
604
797
|
* @public
|
|
605
798
|
* @async
|
|
606
799
|
* @param {ClaimPayload} payload
|
|
607
|
-
* @param {?WriteParams
|
|
608
|
-
* @returns {Promise<boolean>} - True if the assets were successfully clawbacked
|
|
800
|
+
* @param {?WriteParams} [params]
|
|
801
|
+
* @returns {Promise<{ hash: `0x${string}`; result: boolean; }>} - True if the assets were successfully clawbacked
|
|
609
802
|
*/
|
|
610
803
|
clawbackRaw(payload: ClaimPayload, params?: WriteParams<typeof erc20IncentiveAbi, 'clawback'>): Promise<{
|
|
611
804
|
hash: `0x${string}`;
|
|
612
|
-
result:
|
|
805
|
+
result: readonly [bigint, `0x${string}`];
|
|
613
806
|
}>;
|
|
614
807
|
/**
|
|
615
808
|
* 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.
|
|
@@ -617,8 +810,8 @@ export declare class ERC20Incentive extends DeployableTarget<ERC20IncentivePaylo
|
|
|
617
810
|
* @public
|
|
618
811
|
* @async
|
|
619
812
|
* @param {ClaimPayload} payload
|
|
620
|
-
* @param {?ReadParams
|
|
621
|
-
* @returns {
|
|
813
|
+
* @param {?ReadParams} [params]
|
|
814
|
+
* @returns {Promise<boolean>} = True if the incentive is claimable based on the data payload
|
|
622
815
|
*/
|
|
623
816
|
isClaimable(payload: ClaimPayload, params?: ReadParams<typeof erc20IncentiveAbi, 'isClaimable'>): Promise<boolean>;
|
|
624
817
|
/**
|
|
@@ -626,7 +819,7 @@ export declare class ERC20Incentive extends DeployableTarget<ERC20IncentivePaylo
|
|
|
626
819
|
*
|
|
627
820
|
* @public
|
|
628
821
|
* @async
|
|
629
|
-
* @param {?WriteParams
|
|
822
|
+
* @param {?WriteParams} [params]
|
|
630
823
|
* @returns {Promise<void>}
|
|
631
824
|
*/
|
|
632
825
|
drawRaffle(params?: WriteParams<typeof erc20IncentiveAbi, 'drawRaffle'>): Promise<void>;
|
|
@@ -635,8 +828,8 @@ export declare class ERC20Incentive extends DeployableTarget<ERC20IncentivePaylo
|
|
|
635
828
|
*
|
|
636
829
|
* @public
|
|
637
830
|
* @async
|
|
638
|
-
* @param {?WriteParams
|
|
639
|
-
* @returns {Promise<void>}
|
|
831
|
+
* @param {?WriteParams} [params]
|
|
832
|
+
* @returns {Promise<{ hash: `0x${string}`; result: void; }>}
|
|
640
833
|
*/
|
|
641
834
|
drawRaffleRaw(params?: WriteParams<typeof erc20IncentiveAbi, 'drawRaffle'>): Promise<{
|
|
642
835
|
hash: `0x${string}`;
|
|
@@ -651,6 +844,14 @@ export declare class ERC20Incentive extends DeployableTarget<ERC20IncentivePaylo
|
|
|
651
844
|
* @returns {GenericDeployableParams}
|
|
652
845
|
*/
|
|
653
846
|
buildParameters(_payload?: ERC20IncentivePayload, _options?: DeployableOptions): GenericDeployableParams;
|
|
847
|
+
/**
|
|
848
|
+
* Builds the claim data for the ERC20Incentive.
|
|
849
|
+
*
|
|
850
|
+
* @public
|
|
851
|
+
* @returns {Hash} A `zeroHash`, as ERC20Incentive doesn't require specific claim data.
|
|
852
|
+
* @description This function returns `zeroHash` because ERC20Incentive doesn't use any specific claim data.
|
|
853
|
+
*/
|
|
854
|
+
buildClaimData(): "0x0000000000000000000000000000000000000000000000000000000000000000";
|
|
654
855
|
}
|
|
655
856
|
/**
|
|
656
857
|
* Given a {@link ERC20IncentivePayload}, properly encode a `ERC20Incentive.InitPayload` for use with {@link ERC20Incentive} initialization.
|
|
@@ -660,7 +861,7 @@ export declare class ERC20Incentive extends DeployableTarget<ERC20IncentivePaylo
|
|
|
660
861
|
* @param {StrategyType} param0.strategy - The type of disbursement strategy for the incentive. `StrategyType.MINT` is not supported for `ERC20Incentives`
|
|
661
862
|
* @param {bigint} param0.reward - The amount of the asset to distribute.
|
|
662
863
|
* @param {bigint} param0.limit - How many times can this incentive be claimed.
|
|
663
|
-
* @returns {
|
|
864
|
+
* @returns {Hex}
|
|
664
865
|
*/
|
|
665
866
|
export declare function prepareERC20IncentivePayload({ asset, strategy, reward, limit, }: ERC20IncentivePayload): `0x${string}`;
|
|
666
867
|
//# sourceMappingURL=ERC20Incentive.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ERC20Incentive.d.ts","sourceRoot":"","sources":["../../src/Incentives/ERC20Incentive.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,iBAAiB,EAiBlB,MAAM,eAAe,CAAC;AAEvB,OAAO,EACL,KAAK,OAAO,EACZ,KAAK,iBAAiB,
|
|
1
|
+
{"version":3,"file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