@boostxyz/sdk 8.0.0-canary.2 → 8.0.0-canary.4
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/Actions/Action.cjs +1 -1
- package/dist/Actions/Action.js +2 -2
- package/dist/Actions/EventAction.cjs +1 -1
- package/dist/Actions/EventAction.cjs.map +1 -1
- package/dist/Actions/EventAction.js +46 -46
- package/dist/Actions/EventAction.js.map +1 -1
- package/dist/{AllowList-DQf-8HQC.js → AllowList-CTRuUBCQ.js} +41 -41
- package/dist/{AllowList-DQf-8HQC.js.map → AllowList-CTRuUBCQ.js.map} +1 -1
- package/dist/{AllowList-DaX239DR.cjs → AllowList-GEmUfOR1.cjs} +2 -2
- package/dist/{AllowList-DaX239DR.cjs.map → AllowList-GEmUfOR1.cjs.map} +1 -1
- package/dist/AllowLists/AllowList.cjs +1 -1
- package/dist/AllowLists/AllowList.js +4 -4
- package/dist/AllowLists/SimpleAllowList.cjs +1 -1
- package/dist/AllowLists/SimpleAllowList.js +7 -7
- package/dist/AllowLists/SimpleDenyList.cjs +1 -1
- package/dist/AllowLists/SimpleDenyList.js +3 -3
- package/dist/Auth/PassthroughAuth.cjs +1 -1
- package/dist/Auth/PassthroughAuth.js +2 -2
- package/dist/BoostCore.cjs +2 -2
- package/dist/BoostCore.cjs.map +1 -1
- package/dist/BoostCore.d.ts +137 -2
- package/dist/BoostCore.d.ts.map +1 -1
- package/dist/BoostCore.js +336 -206
- package/dist/BoostCore.js.map +1 -1
- package/dist/BoostRegistry.cjs +1 -1
- package/dist/BoostRegistry.js +21 -21
- package/dist/{Budget-LnAQ_Slw.js → Budget-BH0s7Bxu.js} +52 -52
- package/dist/{Budget-LnAQ_Slw.js.map → Budget-BH0s7Bxu.js.map} +1 -1
- package/dist/{Budget-WIB8IJoM.cjs → Budget-CwNhsa3m.cjs} +2 -2
- package/dist/{Budget-WIB8IJoM.cjs.map → Budget-CwNhsa3m.cjs.map} +1 -1
- package/dist/Budgets/Budget.cjs +1 -1
- package/dist/Budgets/Budget.js +3 -3
- package/dist/Budgets/ManagedBudget.cjs +1 -1
- package/dist/Budgets/ManagedBudget.js +26 -26
- package/dist/Deployable/DeployableTarget.cjs +1 -1
- package/dist/Deployable/DeployableTarget.js +1 -1
- package/dist/Deployable/DeployableTargetWithRBAC.cjs +1 -1
- package/dist/Deployable/DeployableTargetWithRBAC.js +17 -17
- package/dist/{Incentive-gT7z-4v3.cjs → Incentive-B2ZBE5LU.cjs} +2 -2
- package/dist/{Incentive-gT7z-4v3.cjs.map → Incentive-B2ZBE5LU.cjs.map} +1 -1
- package/dist/{Incentive-D_IBex5V.js → Incentive-BCSV7OtF.js} +41 -41
- package/dist/{Incentive-D_IBex5V.js.map → Incentive-BCSV7OtF.js.map} +1 -1
- package/dist/Incentives/AllowListIncentive.cjs +1 -1
- package/dist/Incentives/AllowListIncentive.js +17 -17
- package/dist/Incentives/CGDAIncentive.cjs +1 -1
- package/dist/Incentives/CGDAIncentive.js +14 -14
- package/dist/Incentives/ERC20Incentive.cjs +1 -1
- package/dist/Incentives/ERC20Incentive.js +13 -13
- package/dist/Incentives/ERC20PeggedVariableCriteriaIncentive.cjs +1 -1
- package/dist/Incentives/ERC20PeggedVariableCriteriaIncentive.js +71 -71
- package/dist/Incentives/ERC20PeggedVariableCriteriaIncentiveV2.cjs +1 -1
- package/dist/Incentives/ERC20PeggedVariableCriteriaIncentiveV2.cjs.map +1 -1
- package/dist/Incentives/ERC20PeggedVariableCriteriaIncentiveV2.js +36 -36
- package/dist/Incentives/ERC20PeggedVariableCriteriaIncentiveV2.js.map +1 -1
- package/dist/Incentives/ERC20VariableCriteriaIncentive.cjs +1 -1
- package/dist/Incentives/ERC20VariableCriteriaIncentive.js +9 -9
- package/dist/Incentives/ERC20VariableCriteriaIncentiveV2.cjs +1 -1
- package/dist/Incentives/ERC20VariableCriteriaIncentiveV2.cjs.map +1 -1
- package/dist/Incentives/ERC20VariableCriteriaIncentiveV2.js +13 -13
- package/dist/Incentives/ERC20VariableCriteriaIncentiveV2.js.map +1 -1
- package/dist/Incentives/ERC20VariableIncentive.cjs +1 -1
- package/dist/Incentives/ERC20VariableIncentive.js +8 -8
- package/dist/Incentives/Incentive.cjs +1 -1
- package/dist/Incentives/Incentive.js +3 -3
- package/dist/Incentives/PointsIncentive.cjs +1 -1
- package/dist/Incentives/PointsIncentive.js +28 -28
- package/dist/{SimpleDenyList-D5AoBdVi.cjs → SimpleDenyList-6_sxnZB0.cjs} +2 -2
- package/dist/{SimpleDenyList-D5AoBdVi.cjs.map → SimpleDenyList-6_sxnZB0.cjs.map} +1 -1
- package/dist/{SimpleDenyList-CtdXM49y.js → SimpleDenyList-CrjjFnn5.js} +17 -17
- package/dist/{SimpleDenyList-CtdXM49y.js.map → SimpleDenyList-CrjjFnn5.js.map} +1 -1
- package/dist/Validators/LimitedSignerValidator.cjs +1 -1
- package/dist/Validators/LimitedSignerValidator.cjs.map +1 -1
- package/dist/Validators/LimitedSignerValidator.d.ts +9 -9
- package/dist/Validators/LimitedSignerValidator.d.ts.map +1 -1
- package/dist/Validators/LimitedSignerValidator.js +19 -19
- package/dist/Validators/LimitedSignerValidator.js.map +1 -1
- package/dist/Validators/LimitedSignerValidatorV2.cjs +2 -0
- package/dist/Validators/LimitedSignerValidatorV2.cjs.map +1 -0
- package/dist/Validators/LimitedSignerValidatorV2.d.ts +842 -0
- package/dist/Validators/LimitedSignerValidatorV2.d.ts.map +1 -0
- package/dist/Validators/LimitedSignerValidatorV2.js +301 -0
- package/dist/Validators/LimitedSignerValidatorV2.js.map +1 -0
- package/dist/Validators/PayableLimitedSignerValidator.cjs +2 -0
- package/dist/Validators/PayableLimitedSignerValidator.cjs.map +1 -0
- package/dist/Validators/PayableLimitedSignerValidator.d.ts.map +1 -1
- package/dist/{Validator-BEUqV28V.js → Validators/PayableLimitedSignerValidator.js} +56 -102
- package/dist/Validators/PayableLimitedSignerValidator.js.map +1 -0
- package/dist/Validators/PayableLimitedSignerValidatorV2.cjs +2 -0
- package/dist/Validators/PayableLimitedSignerValidatorV2.cjs.map +1 -0
- package/dist/Validators/PayableLimitedSignerValidatorV2.d.ts +855 -0
- package/dist/Validators/PayableLimitedSignerValidatorV2.d.ts.map +1 -0
- package/dist/Validators/PayableLimitedSignerValidatorV2.js +372 -0
- package/dist/Validators/PayableLimitedSignerValidatorV2.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 +4 -2
- package/dist/Validators/SignerValidator.d.ts.map +1 -1
- package/dist/Validators/SignerValidator.js +12 -12
- package/dist/Validators/SignerValidator.js.map +1 -1
- package/dist/Validators/SignerValidatorV2.cjs +2 -0
- package/dist/Validators/SignerValidatorV2.cjs.map +1 -0
- package/dist/Validators/SignerValidatorV2.d.ts +728 -0
- package/dist/Validators/SignerValidatorV2.d.ts.map +1 -0
- package/dist/Validators/SignerValidatorV2.js +299 -0
- package/dist/Validators/SignerValidatorV2.js.map +1 -0
- package/dist/Validators/Validator.cjs +1 -1
- package/dist/Validators/Validator.cjs.map +1 -1
- package/dist/Validators/Validator.d.ts +19 -4
- package/dist/Validators/Validator.d.ts.map +1 -1
- package/dist/Validators/Validator.js +79 -14
- package/dist/Validators/Validator.js.map +1 -1
- package/dist/componentInterfaces-43ygGrVO.js +28 -0
- package/dist/componentInterfaces-43ygGrVO.js.map +1 -0
- package/dist/componentInterfaces-JU4NBkEc.cjs +2 -0
- package/dist/componentInterfaces-JU4NBkEc.cjs.map +1 -0
- package/dist/{deployments-Dw5Suk_D.js → deployments-COm00j8v.js} +48 -39
- package/dist/{deployments-Dw5Suk_D.js.map → deployments-COm00j8v.js.map} +1 -1
- package/dist/deployments-uLDgrxCp.cjs +2 -0
- package/dist/deployments-uLDgrxCp.cjs.map +1 -0
- package/dist/deployments.json +30 -21
- package/dist/generated-CkZm1EVH.cjs +3 -0
- package/dist/generated-CkZm1EVH.cjs.map +1 -0
- package/dist/{generated-krkFnwbV.js → generated-DRbljODL.js} +2314 -1284
- package/dist/generated-DRbljODL.js.map +1 -0
- package/dist/index.cjs +1 -1
- package/dist/index.d.ts +3 -0
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +185 -165
- package/dist/index.js.map +1 -1
- package/package.json +25 -1
- package/src/Actions/EventAction.ts +1 -1
- package/src/BoostCore.test.ts +77 -11
- package/src/BoostCore.ts +165 -4
- package/src/Budgets/ManagedBudgetWithFees.test.ts +14 -14
- package/src/Budgets/ManagedBudgetWithFeesV2.test.ts +3 -3
- package/src/Incentives/AllowListIncentive.test.ts +5 -5
- package/src/Incentives/CGDAIncentive.test.ts +6 -6
- package/src/Incentives/ERC1155Incentive.test.ts +2 -2
- package/src/Incentives/ERC20Incentive.test.ts +6 -6
- package/src/Incentives/ERC20PeggedVariableCriteriaIncentiveV2.test.ts +5 -5
- package/src/Incentives/ERC20PeggedVariableCriteriaIncentiveV2.ts +1 -1
- package/src/Incentives/ERC20VariableCriteriaIncentiveV2.test.ts +5 -5
- package/src/Incentives/ERC20VariableCriteriaIncentiveV2.ts +1 -1
- package/src/Incentives/ERC20VariableIncentive.test.ts +7 -8
- package/src/Incentives/PointsIncentive.test.ts +5 -5
- package/src/Validators/LimitedSignerValidator.test.ts +1 -1
- package/src/Validators/LimitedSignerValidator.ts +9 -10
- package/src/Validators/LimitedSignerValidatorV2.test.ts +231 -0
- package/src/Validators/LimitedSignerValidatorV2.ts +707 -0
- package/src/Validators/PayableLimitedSignerValidator.test.ts +1 -1
- package/src/Validators/PayableLimitedSignerValidator.ts +0 -1
- package/src/Validators/PayableLimitedSignerValidatorV2.test.ts +202 -0
- package/src/Validators/PayableLimitedSignerValidatorV2.ts +688 -0
- package/src/Validators/SignerValidator.ts +4 -2
- package/src/Validators/SignerValidatorV2.test.ts +163 -0
- package/src/Validators/SignerValidatorV2.ts +635 -0
- package/src/Validators/Validator.ts +45 -2
- package/src/index.ts +3 -0
- package/dist/Validator-BEUqV28V.js.map +0 -1
- package/dist/Validator-FxcxYKhR.cjs +0 -2
- package/dist/Validator-FxcxYKhR.cjs.map +0 -1
- package/dist/componentInterfaces-BZ3fSNkT.cjs +0 -2
- package/dist/componentInterfaces-BZ3fSNkT.cjs.map +0 -1
- package/dist/componentInterfaces-D2s6AXlV.js +0 -25
- package/dist/componentInterfaces-D2s6AXlV.js.map +0 -1
- package/dist/deployments-DimWVnA4.cjs +0 -2
- package/dist/deployments-DimWVnA4.cjs.map +0 -1
- package/dist/generated-Cf82M-QP.cjs +0 -3
- package/dist/generated-Cf82M-QP.cjs.map +0 -1
- package/dist/generated-krkFnwbV.js.map +0 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ERC20PeggedVariableCriteriaIncentiveV2.cjs","sources":["../../src/Incentives/ERC20PeggedVariableCriteriaIncentiveV2.ts"],"sourcesContent":["import {\n erc20PeggedVariableCriteriaIncentiveV2Abi,\n readErc20PeggedVariableCriteriaIncentiveV2Asset,\n readErc20PeggedVariableCriteriaIncentiveV2Claimed,\n readErc20PeggedVariableCriteriaIncentiveV2Claims,\n readErc20PeggedVariableCriteriaIncentiveV2CurrentReward,\n readErc20PeggedVariableCriteriaIncentiveV2GetIncentiveCriteria,\n readErc20PeggedVariableCriteriaIncentiveV2GetMaxReward,\n readErc20PeggedVariableCriteriaIncentiveV2GetPeg,\n readErc20PeggedVariableCriteriaIncentiveV2IsClaimable,\n readErc20PeggedVariableCriteriaIncentiveV2Limit,\n readErc20PeggedVariableCriteriaIncentiveV2Owner,\n readErc20PeggedVariableCriteriaIncentiveV2Peg,\n readErc20PeggedVariableCriteriaIncentiveV2Reward,\n readErc20PeggedVariableCriteriaIncentiveV2TotalClaimed,\n simulateErc20PeggedVariableCriteriaIncentiveV2Claim,\n simulateErc20PeggedVariableCriteriaIncentiveV2Clawback,\n writeErc20PeggedVariableCriteriaIncentiveV2Claim,\n writeErc20PeggedVariableCriteriaIncentiveV2Clawback,\n} from '@boostxyz/evm';\nimport { bytecode } from '@boostxyz/evm/artifacts/contracts/incentives/ERC20PeggedVariableCriteriaIncentiveV2.sol/ERC20PeggedVariableCriteriaIncentiveV2.json';\nimport { getTransaction, getTransactionReceipt } from '@wagmi/core';\nimport type { AbiEvent } from 'abitype';\nimport {\n type AbiFunction,\n type Address,\n type ContractEventName,\n type Hex,\n decodeAbiParameters,\n decodeFunctionData,\n encodeAbiParameters,\n parseEther,\n parseEventLogs,\n zeroAddress,\n zeroHash,\n} from 'viem';\nimport { ERC20PeggedVariableCriteriaIncentiveV2 as ERC20PeggedVariableCriteriaIncentiveV2Bases } from '../../dist/deployments.json';\nimport {\n SignatureType,\n decodeAndReorderLogArgs,\n getScalarValue,\n} from '../Actions/EventAction';\nimport type {\n DeployableOptions,\n GenericDeployableParams,\n} from '../Deployable/Deployable';\nimport { DeployableTarget } from '../Deployable/DeployableTarget';\nimport { type ClaimPayload, prepareClaimPayload } from '../claiming';\nimport {\n DecodedArgsError,\n IncentiveCriteriaNotFoundError,\n InvalidCriteriaTypeError,\n NoMatchingLogsError,\n} from '../errors';\nimport {\n CheatCodes,\n type GenericLog,\n type ReadParams,\n RegistryType,\n type WriteParams,\n} from '../utils';\nimport type {\n GetIncentiveScalarV2Params,\n IncentiveCriteriaV2,\n} from './ERC20VariableCriteriaIncentiveV2';\n\nexport { erc20PeggedVariableCriteriaIncentiveV2Abi };\n\n/**\n * The object representation of a `Erc20PeggedVariableCriteriaIncentiveV2.InitPayload`\n *\n * @export\n * @interface Erc20PeggedVariableCriteriaIncentiveV2\n * @typedef {Erc20PeggedVariableCriteriaIncentiveV2}\n */\nexport interface ERC20PeggedVariableCriteriaIncentiveV2Payload {\n /**\n * The address of the incentivized asset.\n *\n * @type {Address}\n */\n asset: Address;\n /**\n * The peg to normalize to.\n *\n * @type {Address}\n */\n peg: Address;\n /**\n * The amount of the asset to distribute.\n *\n * @type {bigint}\n */\n reward: bigint;\n /**\n * Total spend for the incentive.\n *\n * @type {bigint}\n */\n limit: bigint;\n /**\n * Maximum reward each claim is elligible for.\n *\n * @type {bigint}\n */\n maxReward: bigint;\n /**\n * (Optional) The address of the entity that can managed the incentive.\n *\n * @type {Address}\n * @optional\n */\n manager?: Address;\n /**\n * The criteria for the incentive that determines how the reward is distributed.\n *\n * @type {IncentiveCriteria}\n */\n criteria: IncentiveCriteriaV2;\n}\n\n/**\n * A generic `viem.Log` event with support for `Erc20PeggedVariableCriteriaIncentiveV2` event types.\n *\n * @export\n * @typedef {Erc20PeggedVariableCriteriaIncentiveV2Log}\n * @template {ContractEventName<typeof erc20PeggedVariableCriteriaIncentiveV2Abi>} [event=ContractEventName<\n * typeof erc20PeggedVariableCriteriaIncentiveV2Abi\n * >]\n */\nexport type Erc20PeggedVariableCriteriaIncentiveV2Log<\n event extends ContractEventName<\n typeof erc20PeggedVariableCriteriaIncentiveV2Abi\n > = ContractEventName<typeof erc20PeggedVariableCriteriaIncentiveV2Abi>,\n> = GenericLog<typeof erc20PeggedVariableCriteriaIncentiveV2Abi, event>;\n\n/**\n * A simple ERC20 incentive implementation that allows claiming of tokens\n *\n * @export\n * @class Erc20PeggedVariableCriteriaIncentive\n * @typedef {ERC20PeggedVariableCriteriaIncentiveV2}\n * @extends {DeployableTarget<ERC20PeggedVariableCriteriaIncentiveV2>}\n */\nexport class ERC20PeggedVariableCriteriaIncentiveV2 extends DeployableTarget<\n ERC20PeggedVariableCriteriaIncentiveV2Payload,\n typeof erc20PeggedVariableCriteriaIncentiveV2Abi\n> {\n public override readonly abi = erc20PeggedVariableCriteriaIncentiveV2Abi;\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_PEGGED_VARIABLE_CRITERIA_INCENTIVE_V2_BASE\n ? {\n 31337: import.meta.env\n .VITE_ERC20_PEGGED_VARIABLE_CRITERIA_INCENTIVE_V2_BASE,\n }\n : {}),\n ...(ERC20PeggedVariableCriteriaIncentiveV2Bases 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 readErc20PeggedVariableCriteriaIncentiveV2Owner(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 readErc20PeggedVariableCriteriaIncentiveV2CurrentReward(\n this._config,\n {\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 /**\n * Retrieves the maximum reward amount per claim.\n *\n * @public\n * @async\n * @param {?ReadParams} [params]\n * @returns {Promise<bigint>} The maximum reward amount per claim\n */\n public async getMaxReward(params?: ReadParams): Promise<bigint> {\n const maxReward =\n await readErc20PeggedVariableCriteriaIncentiveV2GetMaxReward(\n this._config,\n {\n ...params,\n address: this.assertValidAddress(),\n },\n );\n\n return maxReward;\n }\n\n /**\n * Fetches the incentive scalar from a transaction hash\n *\n * @param {GetIncentiveScalarParams} params\n * @param {?ReadParams} [params]\n * @returns {Promise<bigint>}\n * @throws {InvalidCriteriaTypeError | NoMatchingLogsError | DecodedArgsError}\n */\n public async getIncentiveScalar(\n { chainId, hash, knownSignatures, logs }: GetIncentiveScalarV2Params,\n params?: ReadParams,\n ): Promise<bigint> {\n const criteria = await this.getIncentiveCriteria(params);\n if (criteria.criteriaType === SignatureType.EVENT) {\n const eventAbi = knownSignatures[criteria.signature] as AbiEvent;\n\n if (criteria.fieldIndex === CheatCodes.GAS_REBATE_INCENTIVE) {\n const transactionReceipt = await getTransactionReceipt(this._config, {\n chainId,\n hash,\n });\n const totalCost =\n transactionReceipt.gasUsed * transactionReceipt.effectiveGasPrice + // Normal gas cost\n (transactionReceipt.blobGasUsed ?? 0n) *\n (transactionReceipt.blobGasPrice ?? 0n); // Blob gas cost - account for potential undefined values\n return totalCost;\n }\n\n // if logs are provided, use them to extract the scalar\n if (logs && logs.length > 0) {\n try {\n // only check logs that match the criteria signature\n const signatureMatchingLogs = logs\n .filter((log) => log.topics && log.topics[0] === criteria.signature)\n .map((log) => decodeAndReorderLogArgs(eventAbi, log));\n\n if (signatureMatchingLogs.length > 0) {\n for (const log of signatureMatchingLogs) {\n try {\n return getScalarValue(\n log.args as unknown[],\n criteria.fieldIndex,\n );\n } catch {\n continue;\n }\n }\n }\n } catch (e) {\n throw new DecodedArgsError(\n `An error occurred while extracting scalar from logs: ${(e as Error).message}`,\n );\n }\n }\n\n const transactionReceipt = await getTransactionReceipt(this._config, {\n chainId,\n hash,\n });\n const receiptLogs = transactionReceipt.logs;\n\n if (receiptLogs.length === 0) {\n throw new NoMatchingLogsError(\n `No logs found for event signature ${criteria.signature}`,\n );\n }\n\n // Decode the event log\n try {\n const eventAbi = knownSignatures[criteria.signature] as AbiEvent;\n const decodedEvents = parseEventLogs({\n abi: [eventAbi],\n logs: receiptLogs,\n });\n if (decodedEvents == undefined || decodedEvents.length === 0) {\n throw new NoMatchingLogsError(\n `No logs found for event signature ${criteria.signature}`,\n );\n }\n\n return getScalarValue(\n decodedEvents[0]?.args as unknown[],\n criteria.fieldIndex,\n );\n } catch (e) {\n throw new DecodedArgsError(\n `Failed to decode event log for signature ${criteria.signature}: ${(e as Error).message}`,\n );\n }\n } else if (criteria.criteriaType === SignatureType.FUNC) {\n // Fetch the transaction data\n const transaction = await getTransaction(this._config, {\n chainId,\n hash,\n });\n try {\n // Decode function data\n const func = knownSignatures[criteria.signature] as AbiFunction;\n const decodedFunction = decodeFunctionData({\n abi: [func],\n data: transaction.input,\n });\n\n return getScalarValue(\n decodedFunction.args as unknown[],\n criteria.fieldIndex,\n );\n } catch (e) {\n throw new DecodedArgsError(\n `Failed to decode function data for signature ${criteria.signature}: ${(e as Error).message}`,\n );\n }\n } else {\n throw new InvalidCriteriaTypeError(\n `Invalid criteria type ${criteria.criteriaType}`,\n );\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 readErc20PeggedVariableCriteriaIncentiveV2Claims(\n this._config,\n {\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 /**\n * The total amount of rewards claimed\n *\n * @public\n * @async\n * @param {?ReadParams} [params]\n * @returns {Promise<bigint>}\n */\n public async totalClaimed(params?: ReadParams) {\n return await readErc20PeggedVariableCriteriaIncentiveV2TotalClaimed(\n this._config,\n {\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 /**\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 readErc20PeggedVariableCriteriaIncentiveV2Claimed(\n this._config,\n {\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 /**\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 readErc20PeggedVariableCriteriaIncentiveV2Asset(this._config, {\n address: this.assertValidAddress(),\n // biome-ignore lint/suspicious/noExplicitAny: Accept any shape of valid wagmi/viem parameters, wagmi does the same thing internally\n ...(params as any),\n });\n }\n\n /**\n * The address of the pegged ERC20-like token\n *\n * @public\n * @async\n * @param {?ReadParams} [params]\n * @returns {Promise<Address>}\n */\n public async peg(params?: ReadParams) {\n return await readErc20PeggedVariableCriteriaIncentiveV2Peg(this._config, {\n address: this.assertValidAddress(),\n // biome-ignore lint/suspicious/noExplicitAny: Accept any shape of valid wagmi/viem parameters, wagmi does the same thing internally\n ...(params as any),\n });\n }\n\n /**\n * The reward amount issued for each claim\n *\n * @public\n * @async\n * @param {?ReadParams} [params]\n * @returns {Promise<bigint>}\n */\n public async reward(params?: ReadParams) {\n return await readErc20PeggedVariableCriteriaIncentiveV2Reward(\n this._config,\n {\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 /**\n * The limit (max possible rewards payout in reward token)\n *\n * @public\n * @async\n * @param {?ReadParams} [params]\n * @returns {Promise<bigint>}\n */\n public async limit(params?: ReadParams) {\n return await readErc20PeggedVariableCriteriaIncentiveV2Limit(this._config, {\n address: this.assertValidAddress(),\n // biome-ignore lint/suspicious/noExplicitAny: Accept any shape of valid wagmi/viem parameters, wagmi does the same thing internally\n ...(params as any),\n });\n }\n\n /**\n * Claim the incentive\n *\n * @public\n * @async\n * @param {ClaimPayload} payload\n * @param {?WriteParams} [params]\n * @returns {Promise<boolean>} - Returns true if successfully claimed\n */\n protected async claim(payload: ClaimPayload, params?: WriteParams) {\n return await this.awaitResult(this.claimRaw(payload, params));\n }\n\n /**\n * Claim the incentive\n *\n * @public\n * @async\n * @param {ClaimPayload} payload\n * @param {?WriteParams} [params]\n * @returns {Promise<{ hash: `0x${string}`; result: boolean; }>} - Returns true if successfully claimed\n */\n protected async claimRaw(payload: ClaimPayload, params?: WriteParams) {\n const { request, result } =\n await simulateErc20PeggedVariableCriteriaIncentiveV2Claim(this._config, {\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 const hash = await writeErc20PeggedVariableCriteriaIncentiveV2Claim(\n this._config,\n request,\n );\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 } =\n await simulateErc20PeggedVariableCriteriaIncentiveV2Clawback(\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 writeErc20PeggedVariableCriteriaIncentiveV2Clawback(\n this._config,\n request,\n );\n return { hash, result };\n }\n\n /**\n * Check if an incentive is claimable.\n *\n * @public\n * @async\n * @param {ClaimPayload} payload\n * @param {?ReadParams} [params]\n * @returns {Promise<boolean>} = True if the incentive is claimable based on the data payload\n */\n public async isClaimable(payload: ClaimPayload, params?: ReadParams) {\n return await readErc20PeggedVariableCriteriaIncentiveV2IsClaimable(\n this._config,\n {\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 /**\n * read the peg token for the incentive.\n *\n * @public\n * @async\n * @param {?ReadParams} [params]\n * @returns {Promise<Address>} = The address of the token the reward is pegged to\n */\n public async getPeg(params?: ReadParams) {\n return await readErc20PeggedVariableCriteriaIncentiveV2GetPeg(\n this._config,\n {\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 /**\n * Get the maximum amount that can be claimed by this incentive. Useful when used in conjunction with `BoostCore.calculateProtocolFee`\n *\n * @public\n * @async\n * @param {?ReadParams} [params]\n * @returns {Promise<bigint>} = Return a bigint representing that maximum amount that can be distributed by this incentive.\n */\n public async getTotalBudget(params?: ReadParams) {\n return await this.limit(params);\n }\n\n /**\n * Check if any claims remain by comparing the incentive's total claims against its limit. Does not take requesting user's elligibility into account.\n *\n * @public\n * @async\n * @param {?ReadParams} [params]\n * @returns {Promise<boolean>} - True if total claims is less than limit\n */\n public async canBeClaimed(params?: ReadParams) {\n return (await this.getRemainingClaimPotential(params)) > 0n;\n }\n\n /**\n * Check how many claims remain by comparing the incentive's total claims against its limit. Does not take requesting user's elligibility into account.\n *\n * @public\n * @async\n * @param {?ReadParams} [params]\n * @returns {Promise<bigint>} - True if total claims is less than limit\n */\n public async getRemainingClaimPotential(params?: ReadParams) {\n const [totalClaimed, limit] = await Promise.all([\n this.totalClaimed(params),\n this.limit(params),\n ]);\n return limit - totalClaimed;\n }\n\n /**\n *Functions from the ERC20VariableIncentive contract\n */\n\n /**\n * Fetches the IncentiveCriteria struct from the contract\n *\n * @param {?ReadParams} [params]\n * @returns {Promise<IncentiveCriteria>} Incentive criteria structure\n * @throws {IncentiveCriteriaNotFoundError}\n */\n public async getIncentiveCriteria(\n params?: ReadParams,\n ): Promise<IncentiveCriteriaV2> {\n try {\n const criteria =\n await readErc20PeggedVariableCriteriaIncentiveV2GetIncentiveCriteria(\n this._config,\n {\n ...params,\n address: this.assertValidAddress(),\n },\n );\n\n return criteria;\n } catch (e) {\n throw new IncentiveCriteriaNotFoundError(e as Error);\n }\n }\n\n /**\n * Generates a top-up payload for the ERC20PeggedIncentive contract by incrementing\n * the existing `limit` field by `netAmount`. The entire payload is then re-encoded\n * via `prepareERC20PeggedIncentivePayload(...)`.\n *\n * @public\n * @param {bigint} netAmount - The additional limit to add to this incentive.\n * @returns {Hex} The ABI-encoded payload with the updated `limit`.\n */\n public async getTopupPayload(netAmount: bigint): Promise<Hex> {\n return prepareERC20PeggedVariableCriteriaIncentiveV2Payload({\n asset: (await this.asset()) ?? zeroAddress,\n peg: this.payload?.peg ?? zeroAddress,\n reward: this.payload?.reward ?? 0n,\n limit: netAmount,\n maxReward: this.payload?.maxReward ?? 0n,\n manager: this.payload?.manager ?? zeroAddress,\n criteria: this.payload?.criteria ?? {\n criteriaType: 0,\n signature: zeroHash,\n fieldIndex: 0,\n targetContract: zeroAddress,\n valueType: 0,\n },\n });\n }\n\n /**\n * @inheritdoc\n *\n * @public\n * @param {?ERC20PeggedVariableCriteriaIncentiveV2Payload} [_payload]\n * @param {?DeployableOptions} [_options]\n * @returns {GenericDeployableParams}\n */\n public override buildParameters(\n _payload?: ERC20PeggedVariableCriteriaIncentiveV2Payload,\n _options?: DeployableOptions,\n ): GenericDeployableParams {\n const [payload, options] = this.validateDeploymentConfig(\n _payload,\n _options,\n );\n return {\n abi: erc20PeggedVariableCriteriaIncentiveV2Abi,\n bytecode: bytecode as Hex,\n args: [prepareERC20PeggedVariableCriteriaIncentiveV2Payload(payload)],\n ...this.optionallyAttachAccount(options.account),\n };\n }\n\n /**\n * Encodes an amount to clawback from the incentive\n *\n * @public\n * @param {bigint} amount - How much of the asset to clawback\n * @returns {Hex} - Returns an encoded uint256\n */\n public buildClawbackData(amount: bigint) {\n return encodeAbiParameters([{ type: 'uint256' }], [amount]);\n }\n\n /**\n * Builds the claim data for the ERC20PeggedVariableCriteriaIncentivePayload.\n *\n * @public\n * @param {bigint} signedAmount\n * @returns {Hash} Returns the encoded claim data\n * @description This function returns the encoded claim data for the ERC20PeggedVariableCriteriaIncentiveV2Payload.\n */\n public buildClaimData(signedAmount: bigint) {\n return encodeAbiParameters(\n [{ type: 'uint256', name: 'signedAmount' }],\n [signedAmount],\n );\n }\n\n /**\n * Decodes claim data for the ERC20PeggedVariableCriteriaIncentiveV2, returning the claim amount.\n * Useful when deriving amount claimed from logs.\n *\n * @public\n * @param {Hex} claimData\n * @returns {Promise<bigint>} Returns the reward amount from a claim data payload\n */\n public async decodeClaimData(claimData: Hex) {\n const boostClaimData = decodeAbiParameters(\n [\n {\n type: 'tuple',\n name: 'BoostClaimData',\n components: [\n { type: 'bytes', name: 'validatorData' },\n { type: 'bytes', name: 'incentiveData' },\n ],\n },\n ],\n claimData,\n );\n const signedAmount = decodeAbiParameters(\n [{ type: 'uint256' }],\n boostClaimData[0].incentiveData,\n )[0];\n let claimAmount = signedAmount;\n const [reward, maxReward] = await Promise.all([\n this.reward(),\n this.getMaxReward(),\n ]);\n\n if (reward === 0n) {\n return claimAmount;\n } else {\n claimAmount = (reward * signedAmount) / parseEther('1');\n }\n\n if (maxReward !== 0n && claimAmount > maxReward) {\n claimAmount = maxReward;\n }\n\n return claimAmount;\n }\n\n /**\n * Decodes claim data for the ERC20PeggedVariableCriteriaIncentiveV2, returning the claim amount.\n * Useful when deriving amount claimed from logs.\n * Use this function instead of `decodeClaimData` if you have reward details.\n *\n * @public\n * @param {Hex} claimData\n * @param {bigint} [reward]\n * @param {bigint} [maxReward]\n * @returns {BigInt} Returns the reward amount from a claim data payload\n */\n public decodeClaimDataWithRewardDetails(\n claimData: Hex,\n reward: bigint,\n maxReward: bigint,\n ) {\n const boostClaimData = decodeAbiParameters(\n [\n {\n type: 'tuple',\n name: 'BoostClaimData',\n components: [\n { type: 'bytes', name: 'validatorData' },\n { type: 'bytes', name: 'incentiveData' },\n ],\n },\n ],\n claimData,\n );\n const signedAmount = decodeAbiParameters(\n [{ type: 'uint256' }],\n boostClaimData[0].incentiveData,\n )[0];\n let claimAmount = signedAmount;\n\n if (reward === 0n) {\n return claimAmount;\n } else {\n claimAmount = (reward * signedAmount) / parseEther('1');\n }\n\n if (maxReward !== 0n && claimAmount > maxReward) {\n claimAmount = maxReward;\n }\n\n return claimAmount;\n }\n}\n\n/**\n * Given a {@link ERC20PeggedVariableCriteriaIncentiveV2Payload}, properly encode a `ERC20PeggedVariableCriteriaIncentiveV2Payload.InitPayload` for use with {@link ERC20PeggedVariableCriteriaIncentiveV2Payload} initialization.\n *\n * @param {ERC20PeggedVariableCriteriaIncentiveV2Payload} param0\n * @param {Address} param0.asset - The address of the incentivized asset.\n * @param {Address} param0.peg - The peg to normalize to.\n * @param {bigint} param0.reward - The amount of the asset to distribute.\n * @param {bigint} param0.limit - How many times can this incentive be claimed.\n * @param {Address} [param0.manager=zeroAddress] - The entity that can manage the incentive.\n * @param {IncentiveCriteria} param0.criteria - The incentive criteria for reward distribution.\n * @returns {Hex}\n */\nexport function prepareERC20PeggedVariableCriteriaIncentiveV2Payload({\n asset,\n peg,\n reward,\n limit,\n maxReward = 0n,\n manager = zeroAddress,\n criteria,\n}: ERC20PeggedVariableCriteriaIncentiveV2Payload) {\n return encodeAbiParameters(\n [\n {\n type: 'tuple',\n name: 'initPayloadExtended',\n components: [\n { type: 'address', name: 'asset' },\n { type: 'address', name: 'peg' },\n { type: 'uint256', name: 'reward' },\n { type: 'uint256', name: 'limit' },\n { type: 'address', name: 'manager' },\n { type: 'uint256', name: 'maxReward' },\n {\n type: 'tuple',\n name: 'criteria',\n components: [\n { type: 'uint8', name: 'criteriaType' },\n { type: 'bytes32', name: 'signature' },\n { type: 'uint8', name: 'fieldIndex' },\n { type: 'address', name: 'targetContract' },\n { type: 'uint8', name: 'valueType' },\n ],\n },\n ],\n },\n ],\n [\n {\n asset,\n peg,\n reward,\n limit,\n manager,\n maxReward,\n criteria: {\n criteriaType: criteria.criteriaType,\n signature: criteria.signature,\n fieldIndex: criteria.fieldIndex,\n targetContract: criteria.targetContract,\n valueType: criteria.valueType,\n },\n },\n ],\n );\n}\n"],"names":["_ERC20PeggedVariableCriteriaIncentiveV2","DeployableTarget","erc20PeggedVariableCriteriaIncentiveV2Abi","params","readErc20PeggedVariableCriteriaIncentiveV2Owner","readErc20PeggedVariableCriteriaIncentiveV2CurrentReward","readErc20PeggedVariableCriteriaIncentiveV2GetMaxReward","chainId","hash","knownSignatures","logs","criteria","SignatureType","eventAbi","CheatCodes","transactionReceipt","getTransactionReceipt","signatureMatchingLogs","log","decodeAndReorderLogArgs","getScalarValue","e","DecodedArgsError","receiptLogs","NoMatchingLogsError","decodedEvents","parseEventLogs","_a","transaction","getTransaction","func","decodedFunction","decodeFunctionData","InvalidCriteriaTypeError","readErc20PeggedVariableCriteriaIncentiveV2Claims","readErc20PeggedVariableCriteriaIncentiveV2TotalClaimed","address","readErc20PeggedVariableCriteriaIncentiveV2Claimed","readErc20PeggedVariableCriteriaIncentiveV2Asset","readErc20PeggedVariableCriteriaIncentiveV2Peg","readErc20PeggedVariableCriteriaIncentiveV2Reward","readErc20PeggedVariableCriteriaIncentiveV2Limit","payload","request","result","simulateErc20PeggedVariableCriteriaIncentiveV2Claim","prepareClaimPayload","writeErc20PeggedVariableCriteriaIncentiveV2Claim","simulateErc20PeggedVariableCriteriaIncentiveV2Clawback","writeErc20PeggedVariableCriteriaIncentiveV2Clawback","readErc20PeggedVariableCriteriaIncentiveV2IsClaimable","readErc20PeggedVariableCriteriaIncentiveV2GetPeg","totalClaimed","limit","readErc20PeggedVariableCriteriaIncentiveV2GetIncentiveCriteria","IncentiveCriteriaNotFoundError","netAmount","prepareERC20PeggedVariableCriteriaIncentiveV2Payload","zeroAddress","_b","_c","_d","_e","zeroHash","_payload","_options","options","bytecode","amount","encodeAbiParameters","signedAmount","claimData","boostClaimData","decodeAbiParameters","claimAmount","reward","maxReward","parseEther","__vite_import_meta_env__","ERC20PeggedVariableCriteriaIncentiveV2Bases","RegistryType","ERC20PeggedVariableCriteriaIncentiveV2","asset","peg","manager"],"mappings":"iykBAgJaA,EAAN,MAAMA,UAA+CC,EAAAA,gBAG1D,CAHK,aAAA,CAAA,MAAA,GAAA,SAAA,EAIL,KAAyB,IAAMC,GAAA,CAkC/B,MAAa,MAAMC,EAAqB,CAC/B,OAAA,MAAMC,EAAAA,GAAgD,KAAK,QAAS,CACzE,QAAS,KAAK,mBAAmB,EACjC,KAAM,CAAC,EAEP,GAAID,CAAA,CACL,CACH,CAUA,MAAa,cAAcA,EAAqB,CAC9C,OAAO,MAAME,EAAA,GACX,KAAK,QACL,CACE,QAAS,KAAK,mBAAmB,EACjC,KAAM,CAAC,EAEP,GAAIF,CACN,CAAA,CAEJ,CAUA,MAAa,aAAaA,EAAsC,CAUvD,OARL,MAAMG,EAAA,GACJ,KAAK,QACL,CACE,GAAGH,EACH,QAAS,KAAK,mBAAmB,CACnC,CAAA,CAIN,CAUA,MAAa,mBACX,CAAE,QAAAI,EAAS,KAAAC,EAAM,gBAAAC,EAAiB,KAAAC,GAClCP,EACiB,OACjB,MAAMQ,EAAW,MAAM,KAAK,qBAAqBR,CAAM,EACnD,GAAAQ,EAAS,eAAiBC,EAAA,cAAc,MAAO,CAC3C,MAAAC,EAAWJ,EAAgBE,EAAS,SAAS,EAE/C,GAAAA,EAAS,aAAeG,EAAA,WAAW,qBAAsB,CAC3D,MAAMC,EAAqB,MAAMC,wBAAsB,KAAK,QAAS,CACnE,QAAAT,EACA,KAAAC,CAAA,CACD,EAKM,OAHLO,EAAmB,QAAUA,EAAmB,mBAC/CA,EAAmB,aAAe,KAChCA,EAAmB,cAAgB,GAE1C,CAGI,GAAAL,GAAQA,EAAK,OAAS,EACpB,GAAA,CAEI,MAAAO,EAAwBP,EAC3B,OAAQQ,GAAQA,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F,EAosBA,SAASyD,EAAqD,CACnE,MAAAyB,EACA,IAAAC,EACA,OAAAR,EACA,MAAAtB,EACA,UAAAuB,EAAY,GACZ,QAAAQ,EAAU1B,EAAA,YACV,SAAA/C,CACF,EAAkD,CACzC,OAAA0D,EAAA,oBACL,CACE,CACE,KAAM,QACN,KAAM,sBACN,WAAY,CACV,CAAE,KAAM,UAAW,KAAM,OAAQ,EACjC,CAAE,KAAM,UAAW,KAAM,KAAM,EAC/B,CAAE,KAAM,UAAW,KAAM,QAAS,EAClC,CAAE,KAAM,UAAW,KAAM,OAAQ,EACjC,CAAE,KAAM,UAAW,KAAM,SAAU,EACnC,CAAE,KAAM,UAAW,KAAM,WAAY,EACrC,CACE,KAAM,QACN,KAAM,WACN,WAAY,CACV,CAAE,KAAM,QAAS,KAAM,cAAe,EACtC,CAAE,KAAM,UAAW,KAAM,WAAY,EACrC,CAAE,KAAM,QAAS,KAAM,YAAa,EACpC,CAAE,KAAM,UAAW,KAAM,gBAAiB,EAC1C,CAAE,KAAM,QAAS,KAAM,WAAY,CACrC,CACF,CACF,CACF,CACF,EACA,CACE,CACE,MAAAa,EACA,IAAAC,EACA,OAAAR,EACA,MAAAtB,EACA,QAAA+B,EACA,UAAAR,EACA,SAAU,CACR,aAAcjE,EAAS,aACvB,UAAWA,EAAS,UACpB,WAAYA,EAAS,WACrB,eAAgBA,EAAS,eACzB,UAAWA,EAAS,SACtB,CACF,CACF,CAAA,CAEJ"}
|
|
1
|
+
{"version":3,"file":"ERC20PeggedVariableCriteriaIncentiveV2.cjs","sources":["../../src/Incentives/ERC20PeggedVariableCriteriaIncentiveV2.ts"],"sourcesContent":["import {\n erc20PeggedVariableCriteriaIncentiveV2Abi,\n readErc20PeggedVariableCriteriaIncentiveV2Asset,\n readErc20PeggedVariableCriteriaIncentiveV2Claimed,\n readErc20PeggedVariableCriteriaIncentiveV2Claims,\n readErc20PeggedVariableCriteriaIncentiveV2CurrentReward,\n readErc20PeggedVariableCriteriaIncentiveV2GetIncentiveCriteria,\n readErc20PeggedVariableCriteriaIncentiveV2GetMaxReward,\n readErc20PeggedVariableCriteriaIncentiveV2GetPeg,\n readErc20PeggedVariableCriteriaIncentiveV2IsClaimable,\n readErc20PeggedVariableCriteriaIncentiveV2Limit,\n readErc20PeggedVariableCriteriaIncentiveV2Owner,\n readErc20PeggedVariableCriteriaIncentiveV2Peg,\n readErc20PeggedVariableCriteriaIncentiveV2Reward,\n readErc20PeggedVariableCriteriaIncentiveV2TotalClaimed,\n simulateErc20PeggedVariableCriteriaIncentiveV2Claim,\n simulateErc20PeggedVariableCriteriaIncentiveV2Clawback,\n writeErc20PeggedVariableCriteriaIncentiveV2Claim,\n writeErc20PeggedVariableCriteriaIncentiveV2Clawback,\n} from '@boostxyz/evm';\nimport { bytecode } from '@boostxyz/evm/artifacts/contracts/incentives/ERC20PeggedVariableCriteriaIncentiveV2.sol/ERC20PeggedVariableCriteriaIncentiveV2.json';\nimport { getTransaction, getTransactionReceipt } from '@wagmi/core';\nimport type { AbiEvent } from 'abitype';\nimport {\n type AbiFunction,\n type Address,\n type ContractEventName,\n type Hex,\n decodeAbiParameters,\n decodeFunctionData,\n encodeAbiParameters,\n parseEther,\n parseEventLogs,\n zeroAddress,\n zeroHash,\n} from 'viem';\nimport { ERC20PeggedVariableCriteriaIncentiveV2 as ERC20PeggedVariableCriteriaIncentiveV2Bases } from '../../dist/deployments.json';\nimport {\n SignatureType,\n decodeAndReorderLogArgs,\n getScalarValue,\n} from '../Actions/EventAction';\nimport type {\n DeployableOptions,\n GenericDeployableParams,\n} from '../Deployable/Deployable';\nimport { DeployableTarget } from '../Deployable/DeployableTarget';\nimport { type ClaimPayload, prepareClaimPayload } from '../claiming';\nimport {\n DecodedArgsError,\n IncentiveCriteriaNotFoundError,\n InvalidCriteriaTypeError,\n NoMatchingLogsError,\n} from '../errors';\nimport {\n CheatCodes,\n type GenericLog,\n type ReadParams,\n RegistryType,\n type WriteParams,\n} from '../utils';\nimport type {\n GetIncentiveScalarV2Params,\n IncentiveCriteriaV2,\n} from './ERC20VariableCriteriaIncentiveV2';\n\nexport { erc20PeggedVariableCriteriaIncentiveV2Abi };\n\n/**\n * The object representation of a `Erc20PeggedVariableCriteriaIncentiveV2.InitPayload`\n *\n * @export\n * @interface Erc20PeggedVariableCriteriaIncentiveV2\n * @typedef {Erc20PeggedVariableCriteriaIncentiveV2}\n */\nexport interface ERC20PeggedVariableCriteriaIncentiveV2Payload {\n /**\n * The address of the incentivized asset.\n *\n * @type {Address}\n */\n asset: Address;\n /**\n * The peg to normalize to.\n *\n * @type {Address}\n */\n peg: Address;\n /**\n * The amount of the asset to distribute.\n *\n * @type {bigint}\n */\n reward: bigint;\n /**\n * Total spend for the incentive.\n *\n * @type {bigint}\n */\n limit: bigint;\n /**\n * Maximum reward each claim is elligible for.\n *\n * @type {bigint}\n */\n maxReward: bigint;\n /**\n * (Optional) The address of the entity that can managed the incentive.\n *\n * @type {Address}\n * @optional\n */\n manager?: Address;\n /**\n * The criteria for the incentive that determines how the reward is distributed.\n *\n * @type {IncentiveCriteria}\n */\n criteria: IncentiveCriteriaV2;\n}\n\n/**\n * A generic `viem.Log` event with support for `Erc20PeggedVariableCriteriaIncentiveV2` event types.\n *\n * @export\n * @typedef {Erc20PeggedVariableCriteriaIncentiveV2Log}\n * @template {ContractEventName<typeof erc20PeggedVariableCriteriaIncentiveV2Abi>} [event=ContractEventName<\n * typeof erc20PeggedVariableCriteriaIncentiveV2Abi\n * >]\n */\nexport type Erc20PeggedVariableCriteriaIncentiveV2Log<\n event extends ContractEventName<\n typeof erc20PeggedVariableCriteriaIncentiveV2Abi\n > = ContractEventName<typeof erc20PeggedVariableCriteriaIncentiveV2Abi>,\n> = GenericLog<typeof erc20PeggedVariableCriteriaIncentiveV2Abi, event>;\n\n/**\n * A simple ERC20 incentive implementation that allows claiming of tokens\n *\n * @export\n * @class Erc20PeggedVariableCriteriaIncentive\n * @typedef {ERC20PeggedVariableCriteriaIncentiveV2}\n * @extends {DeployableTarget<ERC20PeggedVariableCriteriaIncentiveV2>}\n */\nexport class ERC20PeggedVariableCriteriaIncentiveV2 extends DeployableTarget<\n ERC20PeggedVariableCriteriaIncentiveV2Payload,\n typeof erc20PeggedVariableCriteriaIncentiveV2Abi\n> {\n public override readonly abi = erc20PeggedVariableCriteriaIncentiveV2Abi;\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_PEGGED_VARIABLE_CRITERIA_INCENTIVE_V2_BASE\n ? {\n 31337: import.meta.env\n .VITE_ERC20_PEGGED_VARIABLE_CRITERIA_INCENTIVE_V2_BASE,\n }\n : {}),\n ...(ERC20PeggedVariableCriteriaIncentiveV2Bases 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 readErc20PeggedVariableCriteriaIncentiveV2Owner(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 readErc20PeggedVariableCriteriaIncentiveV2CurrentReward(\n this._config,\n {\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 /**\n * Retrieves the maximum reward amount per claim.\n *\n * @public\n * @async\n * @param {?ReadParams} [params]\n * @returns {Promise<bigint>} The maximum reward amount per claim\n */\n public async getMaxReward(params?: ReadParams): Promise<bigint> {\n const maxReward =\n await readErc20PeggedVariableCriteriaIncentiveV2GetMaxReward(\n this._config,\n {\n ...params,\n address: this.assertValidAddress(),\n },\n );\n\n return maxReward;\n }\n\n /**\n * Fetches the incentive scalar from a transaction hash\n *\n * @param {GetIncentiveScalarParams} params\n * @param {?ReadParams} [params]\n * @returns {Promise<bigint>}\n * @throws {InvalidCriteriaTypeError | NoMatchingLogsError | DecodedArgsError}\n */\n public async getIncentiveScalar(\n { chainId, hash, knownSignatures, logs }: GetIncentiveScalarV2Params,\n params?: ReadParams,\n ): Promise<bigint> {\n const criteria = await this.getIncentiveCriteria(params);\n if (criteria.criteriaType === SignatureType.EVENT) {\n const eventAbi = knownSignatures[criteria.signature] as AbiEvent;\n\n if (criteria.fieldIndex === CheatCodes.GAS_REBATE_INCENTIVE) {\n const transactionReceipt = await getTransactionReceipt(this._config, {\n chainId,\n hash,\n });\n const totalCost =\n transactionReceipt.gasUsed * transactionReceipt.effectiveGasPrice + // Normal gas cost\n (transactionReceipt.blobGasUsed ?? 0n) *\n (transactionReceipt.blobGasPrice ?? 0n); // Blob gas cost - account for potential undefined values\n return totalCost;\n }\n\n // if logs are provided, use them to extract the scalar\n if (logs && logs.length > 0) {\n try {\n // only check logs that match the criteria signature\n const signatureMatchingLogs = logs\n .filter((log) => log.topics && log.topics[0] === criteria.signature)\n .map((log) => decodeAndReorderLogArgs(eventAbi, log));\n\n if (signatureMatchingLogs.length > 0) {\n for (const log of signatureMatchingLogs) {\n try {\n return getScalarValue(\n log.args as unknown[],\n criteria.fieldIndex,\n );\n } catch {\n continue;\n }\n }\n }\n } catch (e) {\n throw new DecodedArgsError(\n `An error occurred while extracting scalar from logs: ${(e as Error).message}`,\n );\n }\n }\n\n const transactionReceipt = await getTransactionReceipt(this._config, {\n chainId,\n hash,\n });\n const receiptLogs = transactionReceipt.logs;\n\n if (receiptLogs.length === 0) {\n throw new NoMatchingLogsError(\n `No logs found for event signature ${criteria.signature}`,\n );\n }\n\n // Decode the event log\n try {\n const eventAbi = knownSignatures[criteria.signature] as AbiEvent;\n const decodedEvents = parseEventLogs({\n abi: [eventAbi],\n logs: receiptLogs,\n });\n if (decodedEvents == undefined || decodedEvents.length === 0) {\n throw new NoMatchingLogsError(\n `No logs found for event signature ${criteria.signature}`,\n );\n }\n\n return getScalarValue(\n decodedEvents[0]?.args as unknown[],\n criteria.fieldIndex,\n );\n } catch (e) {\n throw new DecodedArgsError(\n `Failed to decode event log for signature ${criteria.signature}: ${(e as Error).message}`,\n );\n }\n } else if (criteria.criteriaType === SignatureType.FUNC) {\n // Fetch the transaction data\n const transaction = await getTransaction(this._config, {\n chainId,\n hash,\n });\n try {\n // Decode function data\n const func = knownSignatures[criteria.signature] as AbiFunction;\n const decodedFunction = decodeFunctionData({\n abi: [func],\n data: transaction.input,\n });\n\n return getScalarValue(\n decodedFunction.args as unknown[],\n criteria.fieldIndex,\n );\n } catch (e) {\n throw new DecodedArgsError(\n `Failed to decode function data for signature ${criteria.signature}: ${(e as Error).message}`,\n );\n }\n } else {\n throw new InvalidCriteriaTypeError(\n `Invalid criteria type ${criteria.criteriaType}`,\n );\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 readErc20PeggedVariableCriteriaIncentiveV2Claims(\n this._config,\n {\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 /**\n * The total amount of rewards claimed\n *\n * @public\n * @async\n * @param {?ReadParams} [params]\n * @returns {Promise<bigint>}\n */\n public async totalClaimed(params?: ReadParams) {\n return await readErc20PeggedVariableCriteriaIncentiveV2TotalClaimed(\n this._config,\n {\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 /**\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 readErc20PeggedVariableCriteriaIncentiveV2Claimed(\n this._config,\n {\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 /**\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 readErc20PeggedVariableCriteriaIncentiveV2Asset(this._config, {\n address: this.assertValidAddress(),\n // biome-ignore lint/suspicious/noExplicitAny: Accept any shape of valid wagmi/viem parameters, wagmi does the same thing internally\n ...(params as any),\n });\n }\n\n /**\n * The address of the pegged ERC20-like token\n *\n * @public\n * @async\n * @param {?ReadParams} [params]\n * @returns {Promise<Address>}\n */\n public async peg(params?: ReadParams) {\n return await readErc20PeggedVariableCriteriaIncentiveV2Peg(this._config, {\n address: this.assertValidAddress(),\n // biome-ignore lint/suspicious/noExplicitAny: Accept any shape of valid wagmi/viem parameters, wagmi does the same thing internally\n ...(params as any),\n });\n }\n\n /**\n * The reward amount issued for each claim\n *\n * @public\n * @async\n * @param {?ReadParams} [params]\n * @returns {Promise<bigint>}\n */\n public async reward(params?: ReadParams) {\n return await readErc20PeggedVariableCriteriaIncentiveV2Reward(\n this._config,\n {\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 /**\n * The limit (max possible rewards payout in reward token)\n *\n * @public\n * @async\n * @param {?ReadParams} [params]\n * @returns {Promise<bigint>}\n */\n public async limit(params?: ReadParams) {\n return await readErc20PeggedVariableCriteriaIncentiveV2Limit(this._config, {\n address: this.assertValidAddress(),\n // biome-ignore lint/suspicious/noExplicitAny: Accept any shape of valid wagmi/viem parameters, wagmi does the same thing internally\n ...(params as any),\n });\n }\n\n /**\n * Claim the incentive\n *\n * @public\n * @async\n * @param {ClaimPayload} payload\n * @param {?WriteParams} [params]\n * @returns {Promise<boolean>} - Returns true if successfully claimed\n */\n protected async claim(payload: ClaimPayload, params?: WriteParams) {\n return await this.awaitResult(this.claimRaw(payload, params));\n }\n\n /**\n * Claim the incentive\n *\n * @public\n * @async\n * @param {ClaimPayload} payload\n * @param {?WriteParams} [params]\n * @returns {Promise<{ hash: `0x${string}`; result: boolean; }>} - Returns true if successfully claimed\n */\n protected async claimRaw(payload: ClaimPayload, params?: WriteParams) {\n const { request, result } =\n await simulateErc20PeggedVariableCriteriaIncentiveV2Claim(this._config, {\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 const hash = await writeErc20PeggedVariableCriteriaIncentiveV2Claim(\n this._config,\n request,\n );\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 } =\n await simulateErc20PeggedVariableCriteriaIncentiveV2Clawback(\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 writeErc20PeggedVariableCriteriaIncentiveV2Clawback(\n this._config,\n request,\n );\n return { hash, result };\n }\n\n /**\n * Check if an incentive is claimable.\n *\n * @public\n * @async\n * @param {ClaimPayload} payload\n * @param {?ReadParams} [params]\n * @returns {Promise<boolean>} = True if the incentive is claimable based on the data payload\n */\n public async isClaimable(payload: ClaimPayload, params?: ReadParams) {\n return await readErc20PeggedVariableCriteriaIncentiveV2IsClaimable(\n this._config,\n {\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 /**\n * read the peg token for the incentive.\n *\n * @public\n * @async\n * @param {?ReadParams} [params]\n * @returns {Promise<Address>} = The address of the token the reward is pegged to\n */\n public async getPeg(params?: ReadParams) {\n return await readErc20PeggedVariableCriteriaIncentiveV2GetPeg(\n this._config,\n {\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 /**\n * Get the maximum amount that can be claimed by this incentive. Useful when used in conjunction with `BoostCore.calculateProtocolFee`\n *\n * @public\n * @async\n * @param {?ReadParams} [params]\n * @returns {Promise<bigint>} = Return a bigint representing that maximum amount that can be distributed by this incentive.\n */\n public async getTotalBudget(params?: ReadParams) {\n return await this.limit(params);\n }\n\n /**\n * Check if any claims remain by comparing the incentive's total claims against its limit. Does not take requesting user's elligibility into account.\n *\n * @public\n * @async\n * @param {?ReadParams} [params]\n * @returns {Promise<boolean>} - True if total claims is less than limit\n */\n public async canBeClaimed(params?: ReadParams) {\n return (await this.getRemainingClaimPotential(params)) > 0n;\n }\n\n /**\n * Check how many claims remain by comparing the incentive's total claims against its limit. Does not take requesting user's elligibility into account.\n *\n * @public\n * @async\n * @param {?ReadParams} [params]\n * @returns {Promise<bigint>} - True if total claims is less than limit\n */\n public async getRemainingClaimPotential(params?: ReadParams) {\n const [totalClaimed, limit] = await Promise.all([\n this.totalClaimed(params),\n this.limit(params),\n ]);\n return limit - totalClaimed;\n }\n\n /**\n *Functions from the ERC20VariableIncentive contract\n */\n\n /**\n * Fetches the IncentiveCriteria struct from the contract\n *\n * @param {?ReadParams} [params]\n * @returns {Promise<IncentiveCriteria>} Incentive criteria structure\n * @throws {IncentiveCriteriaNotFoundError}\n */\n public async getIncentiveCriteria(\n params?: ReadParams,\n ): Promise<IncentiveCriteriaV2> {\n try {\n const criteria =\n await readErc20PeggedVariableCriteriaIncentiveV2GetIncentiveCriteria(\n this._config,\n {\n ...params,\n address: this.assertValidAddress(),\n },\n );\n\n return criteria;\n } catch (e) {\n throw new IncentiveCriteriaNotFoundError(e as Error);\n }\n }\n\n /**\n * Generates a top-up payload for the ERC20PeggedIncentive contract by incrementing\n * the existing `limit` field by `netAmount`. The entire payload is then re-encoded\n * via `prepareERC20PeggedIncentivePayload(...)`.\n *\n * @public\n * @param {bigint} netAmount - The additional limit to add to this incentive.\n * @returns {Hex} The ABI-encoded payload with the updated `limit`.\n */\n public async getTopupPayload(netAmount: bigint): Promise<Hex> {\n return prepareERC20PeggedVariableCriteriaIncentiveV2Payload({\n asset: (await this.asset()) ?? zeroAddress,\n peg: this.payload?.peg ?? zeroAddress,\n reward: this.payload?.reward ?? 0n,\n limit: netAmount,\n maxReward: this.payload?.maxReward ?? 0n,\n manager: this.payload?.manager ?? zeroAddress,\n criteria: this.payload?.criteria ?? {\n criteriaType: 0,\n signature: zeroHash,\n fieldIndex: 0,\n targetContract: zeroAddress,\n valueType: 0,\n },\n });\n }\n\n /**\n * @inheritdoc\n *\n * @public\n * @param {?ERC20PeggedVariableCriteriaIncentiveV2Payload} [_payload]\n * @param {?DeployableOptions} [_options]\n * @returns {GenericDeployableParams}\n */\n public override buildParameters(\n _payload?: ERC20PeggedVariableCriteriaIncentiveV2Payload,\n _options?: DeployableOptions,\n ): GenericDeployableParams {\n const [payload, options] = this.validateDeploymentConfig(\n _payload,\n _options,\n );\n return {\n abi: erc20PeggedVariableCriteriaIncentiveV2Abi,\n bytecode: bytecode as Hex,\n args: [prepareERC20PeggedVariableCriteriaIncentiveV2Payload(payload)],\n ...this.optionallyAttachAccount(options.account),\n };\n }\n\n /**\n * Encodes an amount to clawback from the incentive\n *\n * @public\n * @param {bigint} amount - How much of the asset to clawback\n * @returns {Hex} - Returns an encoded uint256\n */\n public buildClawbackData(amount: bigint) {\n return encodeAbiParameters([{ type: 'uint256' }], [amount]);\n }\n\n /**\n * Builds the claim data for the ERC20PeggedVariableCriteriaIncentivePayload.\n *\n * @public\n * @param {bigint} signedAmount\n * @returns {Hash} Returns the encoded claim data\n * @description This function returns the encoded claim data for the ERC20PeggedVariableCriteriaIncentiveV2Payload.\n */\n public buildClaimData(signedAmount: bigint) {\n return encodeAbiParameters(\n [{ type: 'uint256', name: 'signedAmount' }],\n [signedAmount],\n );\n }\n\n /**\n * Decodes claim data for the ERC20PeggedVariableCriteriaIncentiveV2, returning the claim amount.\n * Useful when deriving amount claimed from logs.\n *\n * @public\n * @param {Hex} claimData\n * @returns {Promise<bigint>} Returns the reward amount from a claim data payload\n */\n public async decodeClaimData(claimData: Hex) {\n const boostClaimData = decodeAbiParameters(\n [\n {\n type: 'tuple',\n name: 'BoostClaimData',\n components: [\n { type: 'bytes', name: 'validatorData' },\n { type: 'bytes', name: 'incentiveData' },\n ],\n },\n ],\n claimData,\n );\n const signedAmount = decodeAbiParameters(\n [{ type: 'uint256' }],\n boostClaimData[0].incentiveData,\n )[0];\n let claimAmount = signedAmount;\n const [reward, maxReward] = await Promise.all([\n this.reward(),\n this.getMaxReward(),\n ]);\n\n if (reward === 0n) {\n return claimAmount;\n } else {\n claimAmount = (reward * signedAmount) / parseEther('1');\n }\n\n if (maxReward !== 0n && claimAmount > maxReward) {\n claimAmount = maxReward;\n }\n\n return claimAmount;\n }\n\n /**\n * Decodes claim data for the ERC20PeggedVariableCriteriaIncentiveV2, returning the claim amount.\n * Useful when deriving amount claimed from logs.\n * Use this function instead of `decodeClaimData` if you have reward details.\n *\n * @public\n * @param {Hex} claimData\n * @param {bigint} [reward]\n * @param {bigint} [maxReward]\n * @returns {BigInt} Returns the reward amount from a claim data payload\n */\n public decodeClaimDataWithRewardDetails(\n claimData: Hex,\n reward: bigint,\n maxReward: bigint,\n ) {\n const boostClaimData = decodeAbiParameters(\n [\n {\n type: 'tuple',\n name: 'BoostClaimData',\n components: [\n { type: 'bytes', name: 'validatorData' },\n { type: 'bytes', name: 'incentiveData' },\n ],\n },\n ],\n claimData,\n );\n const signedAmount = decodeAbiParameters(\n [{ type: 'uint256' }],\n boostClaimData[0].incentiveData,\n )[0];\n let claimAmount = signedAmount;\n\n if (reward === 0n) {\n return claimAmount;\n } else {\n claimAmount = (reward * signedAmount) / parseEther('1');\n }\n\n if (maxReward !== 0n && claimAmount > maxReward) {\n claimAmount = maxReward;\n }\n\n return claimAmount;\n }\n}\n\n/**\n * Given a {@link ERC20PeggedVariableCriteriaIncentiveV2Payload}, properly encode a `ERC20PeggedVariableCriteriaIncentiveV2Payload.InitPayload` for use with {@link ERC20PeggedVariableCriteriaIncentiveV2Payload} initialization.\n *\n * @param {ERC20PeggedVariableCriteriaIncentiveV2Payload} param0\n * @param {Address} param0.asset - The address of the incentivized asset.\n * @param {Address} param0.peg - The peg to normalize to.\n * @param {bigint} param0.reward - The amount of the asset to distribute.\n * @param {bigint} param0.limit - How many times can this incentive be claimed.\n * @param {Address} [param0.manager=zeroAddress] - The entity that can manage the incentive.\n * @param {IncentiveCriteria} param0.criteria - The incentive criteria for reward distribution.\n * @returns {Hex}\n */\nexport function prepareERC20PeggedVariableCriteriaIncentiveV2Payload({\n asset,\n peg,\n reward,\n limit,\n maxReward = 0n,\n manager = zeroAddress,\n criteria,\n}: ERC20PeggedVariableCriteriaIncentiveV2Payload) {\n return encodeAbiParameters(\n [\n {\n type: 'tuple',\n name: 'initPayloadExtended',\n components: [\n { type: 'address', name: 'asset' },\n { type: 'address', name: 'peg' },\n { type: 'uint256', name: 'reward' },\n { type: 'uint256', name: 'limit' },\n { type: 'address', name: 'manager' },\n { type: 'uint256', name: 'maxReward' },\n {\n type: 'tuple',\n name: 'criteria',\n components: [\n { type: 'uint8', name: 'criteriaType' },\n { type: 'bytes32', name: 'signature' },\n { type: 'uint32', name: 'fieldIndex' },\n { type: 'address', name: 'targetContract' },\n { type: 'uint8', name: 'valueType' },\n ],\n },\n ],\n },\n ],\n [\n {\n asset,\n peg,\n reward,\n limit,\n manager,\n maxReward,\n criteria: {\n criteriaType: criteria.criteriaType,\n signature: criteria.signature,\n fieldIndex: criteria.fieldIndex,\n targetContract: criteria.targetContract,\n valueType: criteria.valueType,\n },\n },\n ],\n );\n}\n"],"names":["_ERC20PeggedVariableCriteriaIncentiveV2","DeployableTarget","erc20PeggedVariableCriteriaIncentiveV2Abi","params","readErc20PeggedVariableCriteriaIncentiveV2Owner","readErc20PeggedVariableCriteriaIncentiveV2CurrentReward","readErc20PeggedVariableCriteriaIncentiveV2GetMaxReward","chainId","hash","knownSignatures","logs","criteria","SignatureType","eventAbi","CheatCodes","transactionReceipt","getTransactionReceipt","signatureMatchingLogs","log","decodeAndReorderLogArgs","getScalarValue","e","DecodedArgsError","receiptLogs","NoMatchingLogsError","decodedEvents","parseEventLogs","_a","transaction","getTransaction","func","decodedFunction","decodeFunctionData","InvalidCriteriaTypeError","readErc20PeggedVariableCriteriaIncentiveV2Claims","readErc20PeggedVariableCriteriaIncentiveV2TotalClaimed","address","readErc20PeggedVariableCriteriaIncentiveV2Claimed","readErc20PeggedVariableCriteriaIncentiveV2Asset","readErc20PeggedVariableCriteriaIncentiveV2Peg","readErc20PeggedVariableCriteriaIncentiveV2Reward","readErc20PeggedVariableCriteriaIncentiveV2Limit","payload","request","result","simulateErc20PeggedVariableCriteriaIncentiveV2Claim","prepareClaimPayload","writeErc20PeggedVariableCriteriaIncentiveV2Claim","simulateErc20PeggedVariableCriteriaIncentiveV2Clawback","writeErc20PeggedVariableCriteriaIncentiveV2Clawback","readErc20PeggedVariableCriteriaIncentiveV2IsClaimable","readErc20PeggedVariableCriteriaIncentiveV2GetPeg","totalClaimed","limit","readErc20PeggedVariableCriteriaIncentiveV2GetIncentiveCriteria","IncentiveCriteriaNotFoundError","netAmount","prepareERC20PeggedVariableCriteriaIncentiveV2Payload","zeroAddress","_b","_c","_d","_e","zeroHash","_payload","_options","options","bytecode","amount","encodeAbiParameters","signedAmount","claimData","boostClaimData","decodeAbiParameters","claimAmount","reward","maxReward","parseEther","__vite_import_meta_env__","ERC20PeggedVariableCriteriaIncentiveV2Bases","RegistryType","ERC20PeggedVariableCriteriaIncentiveV2","asset","peg","manager"],"mappings":"iykBAgJaA,EAAN,MAAMA,UAA+CC,EAAAA,gBAG1D,CAHK,aAAA,CAAA,MAAA,GAAA,SAAA,EAIL,KAAyB,IAAMC,GAAA,CAkC/B,MAAa,MAAMC,EAAqB,CAC/B,OAAA,MAAMC,EAAAA,GAAgD,KAAK,QAAS,CACzE,QAAS,KAAK,mBAAmB,EACjC,KAAM,CAAC,EAEP,GAAID,CAAA,CACL,CACH,CAUA,MAAa,cAAcA,EAAqB,CAC9C,OAAO,MAAME,EAAA,GACX,KAAK,QACL,CACE,QAAS,KAAK,mBAAmB,EACjC,KAAM,CAAC,EAEP,GAAIF,CACN,CAAA,CAEJ,CAUA,MAAa,aAAaA,EAAsC,CAUvD,OARL,MAAMG,EAAA,GACJ,KAAK,QACL,CACE,GAAGH,EACH,QAAS,KAAK,mBAAmB,CACnC,CAAA,CAIN,CAUA,MAAa,mBACX,CAAE,QAAAI,EAAS,KAAAC,EAAM,gBAAAC,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UAAAR,EACA,SAAU,CACR,aAAcjE,EAAS,aACvB,UAAWA,EAAS,UACpB,WAAYA,EAAS,WACrB,eAAgBA,EAAS,eACzB,UAAWA,EAAS,SACtB,CACF,CACF,CAAA,CAEJ"}
|
|
@@ -1,13 +1,13 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import { getTransactionReceipt as A, getTransaction as
|
|
3
|
-
import { parseEventLogs as
|
|
4
|
-
import { f as
|
|
5
|
-
import { SignatureType as C, decodeAndReorderLogArgs as
|
|
6
|
-
import { DeployableTarget as
|
|
1
|
+
import { b as w, bG as D, bH as x, bI as v, bJ as N, bK as H, bL as P, bM as B, bN as S, bO as O, bP as F, bQ as G, bR as $, bS as L, bT as M, bU as U, bV as k, bW as q } from "../generated-DRbljODL.js";
|
|
2
|
+
import { getTransactionReceipt as A, getTransaction as z } from "@wagmi/core";
|
|
3
|
+
import { parseEventLogs as W, decodeFunctionData as J, zeroAddress as i, zeroHash as K, encodeAbiParameters as y, decodeAbiParameters as o, parseEther as E } from "viem";
|
|
4
|
+
import { f as Q } from "../deployments-COm00j8v.js";
|
|
5
|
+
import { SignatureType as C, decodeAndReorderLogArgs as Y, getScalarValue as u } from "../Actions/EventAction.js";
|
|
6
|
+
import { DeployableTarget as Z } from "../Deployable/DeployableTarget.js";
|
|
7
7
|
import { prepareClaimPayload as T } from "../claiming.js";
|
|
8
|
-
import { DecodedArgsError as m, NoMatchingLogsError as R, InvalidCriteriaTypeError as j, IncentiveCriteriaNotFoundError as
|
|
8
|
+
import { DecodedArgsError as m, NoMatchingLogsError as R, InvalidCriteriaTypeError as j, IncentiveCriteriaNotFoundError as X } from "../errors.js";
|
|
9
9
|
import { RegistryType as f0, CheatCodes as a0 } from "../utils.js";
|
|
10
|
-
const e0 = "0x6080604052348015600e575f80fd5b5060156019565b607c565b63409feecd198054600181161560365763f92ee8a95f526004601cfd5b6001600160401b03808260011c146077578060011b8355806020527fc7f505b2f371ae2175ee4913f4499e1f2633a7b5936321eed1cdaeb6115181d2602080a15b505050565b6122df806100895f395ff3fe6080604052600436106102ab575f3560e01c8063715018a611610165578063c884ef83116100c6578063ec87621c1161007c578063f2fde38b11610062578063f2fde38b146107b3578063fe9fbb80146107c6578063fee81cf4146107e5575f80fd5b8063ec87621c1461078c578063f04e283e146107a0575f80fd5b8063db09da12116100ac578063db09da1214610739578063dcc2136114610758578063dcc59b6f14610777575f80fd5b8063c884ef83146106f6578063d54ad2a114610724575f80fd5b8063a4d66daf1161011b578063bb1757cf11610101578063bb1757cf146106a4578063be4994f8146106c3578063c213f3f9146106e2575f80fd5b8063a4d66daf1461066e578063a871ced214610683575f80fd5b8063775486871161014b57806377548687146105b45780638da5cb5b1461062c5780639214fa4d14610644575f80fd5b8063715018a61461059857806375b238fc146105a0575f80fd5b806330db555f1161020f5780634a4ee7b1116101c5578063514e62fc116101ab578063514e62fc14610546578063547d18641461057b57806354d1f13d14610590575f80fd5b80634a4ee7b1146105075780634e7165a21461051a575f80fd5b80634359d28a116101f55780634359d28a14610480578063439fab911461049f578063474f5a44146104be575f80fd5b806330db555f1461043557806338d52e0f14610454575f80fd5b80631f1cb62b11610264578063256929621161024a57806325692962146103c257806328d6183b146103ca5780632de9480714610404575f80fd5b80631f1cb62b1461035d578063228cb733146103ae575f80fd5b8063183a4f6e11610294578063183a4f6e146103005780631c10893f146103155780631cd64df414610328575f80fd5b806301ffc9a7146102af57806307621eca146102e3575b5f80fd5b3480156102ba575f80fd5b506102ce6102c93660046119e1565b610816565b60405190151581526020015b60405180910390f35b3480156102ee575f80fd5b505f545b6040519081526020016102da565b61031361030e366004611a27565b610871565b005b610313610323366004611a66565b61087e565b348015610333575f80fd5b506102ce610342366004611a66565b638b78c6d8600c9081525f9290925260209091205481161490565b348015610368575f80fd5b50600a546103899073ffffffffffffffffffffffffffffffffffffffff1681565b60405173ffffffffffffffffffffffffffffffffffffffff90911681526020016102da565b3480156103b9575f80fd5b506102f25f5481565b610313610894565b3480156103d5575f80fd5b506040517ff60c99c90000000000000000000000000000000000000000000000000000000081526020016102da565b34801561040f575f80fd5b506102f261041e366004611a8e565b638b78c6d8600c9081525f91909152602090205490565b348015610440575f80fd5b5061031361044f366004611a27565b6108e1565b34801561045f575f80fd5b506006546103899073ffffffffffffffffffffffffffffffffffffffff1681565b34801561048b575f80fd5b5061031361049a366004611aef565b61099d565b3480156104aa575f80fd5b506103136104b9366004611b99565b610a97565b3480156104c9575f80fd5b506104dd6104d8366004611b99565b610e2f565b6040805192835273ffffffffffffffffffffffffffffffffffffffff9091166020830152016102da565b610313610515366004611a66565b610f91565b348015610525575f80fd5b50610539610534366004611b99565b610fa3565b6040516102da9190611c24565b348015610551575f80fd5b506102ce610560366004611a66565b638b78c6d8600c9081525f9290925260209091205416151590565b348015610586575f80fd5b506102f260025481565b61031361103d565b610313611076565b3480156105ab575f80fd5b506102f2600281565b3480156105bf575f80fd5b5060035460045460055461061b9260ff908116929163ffffffff81169173ffffffffffffffffffffffffffffffffffffffff64010000000083041691780100000000000000000000000000000000000000000000000090041685565b6040516102da959493929190611c73565b348015610637575f80fd5b50638b78c6d81954610389565b34801561064f575f80fd5b50600a5473ffffffffffffffffffffffffffffffffffffffff16610389565b348015610679575f80fd5b506102f260085481565b34801561068e575f80fd5b50610697611089565b6040516102da9190611d2c565b3480156106af575f80fd5b506102ce6106be366004611d3a565b611178565b3480156106ce575f80fd5b506103136106dd366004611aef565b6113a5565b3480156106ed575f80fd5b50600b546102f2565b348015610701575f80fd5b506102ce610710366004611a8e565b60016020525f908152604090205460ff1681565b34801561072f575f80fd5b506102f260095481565b348015610744575f80fd5b506102ce610753366004611d3a565b611443565b348015610763575f80fd5b50610313610772366004611aef565b6114b6565b348015610782575f80fd5b506102f260075481565b348015610797575f80fd5b506102f2600181565b6103136107ae366004611a8e565b611554565b6103136107c1366004611a8e565b61158e565b3480156107d1575f80fd5b506102ce6107e0366004611a8e565b6115b4565b3480156107f0575f80fd5b506102f26107ff366004611a8e565b63389a75e1600c9081525f91909152602090205490565b5f7fffffffff0000000000000000000000000000000000000000000000000000000082167ff60c99c900000000000000000000000000000000000000000000000000000000148061086b575061086b82611613565b92915050565b61087b3382611668565b50565b610886611673565b610890828261168d565b5050565b5f6202a30067ffffffffffffffff164201905063389a75e1600c52335f52806020600c2055337fdbf36a107da19e49527a7176a1babf963b4b0ff8cde35ee35d6cd8f1f9ac7e1d5f80a250565b60016108ec81611699565b815f03610925576040517ff92ee8a900000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b60065461094a9073ffffffffffffffffffffffffffffffffffffffff163330856116ca565b8160085f82825461095b9190611db6565b909155505060408051338152602081018490527fa64c2da41decbd538f8629e54c8fa0b7362c9102b691386a0fb6a1797454e9c6910160405180910390a15050565b60026109a881611699565b8382146109e1576040517fff633a3800000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b5f5b84811015610a8f575f8484838181106109fe576109fe611dc9565b9050602002016020810190610a139190611df6565b9050801515600103610a5557610a50878784818110610a3457610a34611dc9565b9050602002016020810190610a499190611a8e565b600161168d565b610a86565b610a86878784818110610a6a57610a6a611dc9565b9050602002016020810190610a7f9190611a8e565b6001611668565b506001016109e3565b505050505050565b7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffbf6011328054600382558015610ae85760018160011c14303b10610adf5763f92ee8a95f526004601cfd5b818160ff1b1b91505b505f610af683850185611ebd565b905080606001515f03610b35576040517ff92ee8a900000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b606081015181515f90610b5e9073ffffffffffffffffffffffffffffffffffffffff163061172c565b905081811015610bc75782516040517f5c54305e00000000000000000000000000000000000000000000000000000000815273ffffffffffffffffffffffffffffffffffffffff9091166004820152602481018290526044810183905260640160405180910390fd5b60c083015183516006805473ffffffffffffffffffffffffffffffffffffffff9283167fffffffffffffffffffffffff0000000000000000000000000000000000000000918216179091556020860151600a805491909316911617905560408401515f55606084015160085560a0840151600b5580516003805483929082907fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff001660018381811115610c7b57610c7b611c36565b021790555060208201516001808301919091556040830151600283018054606086015173ffffffffffffffffffffffffffffffffffffffff16640100000000027fffffffffffffffff00000000000000000000000000000000000000000000000090911663ffffffff90931692909217919091178082556080850151927fffffffffffffff00ffffffffffffffffffffffffffffffffffffffffffffffff909116907801000000000000000000000000000000000000000000000000908490811115610d4957610d49611c36565b0217905550905050610d5a3361175f565b610d69846080015160016117a7565b836020015173ffffffffffffffffffffffffffffffffffffffff16845f015173ffffffffffffffffffffffffffffffffffffffff167f68c413c27d17fa0454f7f4da49ac4979f28e363c5fa9c158ae0dfdc9c3317e078660400151876060015188608001518960a001518a60c00151604051610de9959493929190611fc6565b60405180910390a3505050508015610e2a576002815560016020527fc7f505b2f371ae2175ee4913f4499e1f2633a7b5936321eed1cdaeb6115181d2602080a15b505050565b5f806001610e3c81611699565b5f610e49858701876120b8565b90505f8160200151806020019051810190610e649190612135565b90508060085f828254610e77919061214c565b90915550508151600654610ea49173ffffffffffffffffffffffffffffffffffffffff90911690836117e8565b81516006546040517fffffffffffffffffffffffffffffffffffffffff000000000000000000000000606092831b811660208301529183901b90911660348201526048810183905273ffffffffffffffffffffffffffffffffffffffff909116907f9ad2e7a4af16dceda9cce4274b2f59c328d8c012eb0e15eb5e1e73b7d8f264d390606801604080517fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe081840301815290829052610f6291611c24565b60405180910390a260065490945073ffffffffffffffffffffffffffffffffffffffff16925050509250929050565b610f99611673565b6108908282611668565b60605f610fb283850185611ebd565b6060818101516040805160808101825260018152845173ffffffffffffffffffffffffffffffffffffffff16602080830191909152308284015282518082018452849052825180820185905283518082038301815290840184529482019490945290519394509092611024920161215f565b6040516020818303038152906040529250505092915050565b63389a75e1600c52335f525f6020600c2055337ffa7b8eab7da67f412cc9575ed43464468f9bfbae89d1675917346ca6d8fe3c925f80a2565b61107e611673565b6110875f61183b565b565b6040805160a0810182525f808252602082018190529181018290526060810182905260808101919091526040805160a0810190915260038054829060ff1660018111156110d8576110d8611c36565b60018111156110e9576110e9611c36565b81526001828101546020830152600283015463ffffffff81166040840152640100000000810473ffffffffffffffffffffffffffffffffffffffff1660608401526080909201917801000000000000000000000000000000000000000000000000900460ff169081111561115f5761115f611c36565b600181111561117057611170611c36565b905250919050565b5f611181611673565b5f61118e838501856121dd565b90505f81602001518060200190518101906111a99190612135565b90505f80545f036111bb5750806111de565b670de0b6b3a7640000825f546111d1919061225a565b6111db9190612271565b90505b600b54158015906111f05750600b5481115b156111fa5750600b545b61120381611885565b611239576040517f6247a84e00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b6008548160095461124a9190611db6565b1115611282576040517f360e42e100000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b8060095f8282546112939190611db6565b92505081905550600160075f8282546112ac9190611db6565b90915550506006546112d59073ffffffffffffffffffffffffffffffffffffffff1688836117e8565b6006546040517fffffffffffffffffffffffffffffffffffffffff000000000000000000000000606092831b811660208301529189901b90911660348201526048810182905273ffffffffffffffffffffffffffffffffffffffff8816907f9ad2e7a4af16dceda9cce4274b2f59c328d8c012eb0e15eb5e1e73b7d8f264d390606801604080517fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe08184030181529082905261139091611c24565b60405180910390a25060019695505050505050565b60026113b081611699565b8382146113e9576040517fff633a3800000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b5f5b84811015610a8f5761143b86868381811061140857611408611dc9565b905060200201602081019061141d9190611a8e565b85858481811061142f5761142f611dc9565b9050602002013561168d565b6001016113eb565b5f8080611452848601866121dd565b90505f816020015180602001905181019061146d9190612135565b90505f545f0361147f578092506114a2565b670de0b6b3a7640000815f54611495919061225a565b61149f9190612271565b92505b6114ab83611885565b979650505050505050565b60026114c181611699565b8382146114fa576040517fff633a3800000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b5f5b84811015610a8f5761154c86868381811061151957611519611dc9565b905060200201602081019061152e9190611a8e565b85858481811061154057611540611dc9565b90506020020135611668565b6001016114fc565b61155c611673565b63389a75e1600c52805f526020600c20805442111561158257636f5e88185f526004601cfd5b5f905561087b8161183b565b611596611673565b8060601b6115ab57637448fbae5f526004601cfd5b61087b8161183b565b5f8173ffffffffffffffffffffffffffffffffffffffff166115d9638b78c6d8195490565b73ffffffffffffffffffffffffffffffffffffffff16148061086b5750638b78c6d8600c9081525f8390526020902054600316151561086b565b5f7fffffffff0000000000000000000000000000000000000000000000000000000082167f5658633800000000000000000000000000000000000000000000000000000000148061086b575061086b8261189f565b61089082825f6118f4565b638b78c6d819543314611087576382b429005f526004601cfd5b610890828260016118f4565b638b78c6d81954331461087b57638b78c6d8600c52335f52806020600c20541661087b576382b429005f526004601cfd5b60405181606052826040528360601b602c526f23b872dd000000000000000000000000600c5260205f6064601c5f895af18060015f51141661171e57803d873b15171061171e57637939f4245f526004601cfd5b505f60605260405250505050565b5f816014526f70a082310000000000000000000000005f5260208060246010865afa601f3d111660205102905092915050565b73ffffffffffffffffffffffffffffffffffffffff16638b78c6d819819055805f7f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e08180a350565b638b78c6d8600c52815f52806020600c205580600c5160601c7f715ad5ce61fc9595c7b415289d59cf203f23a94fa06f04af7e489a0a76e1fe265f80a35050565b81601452806034526fa9059cbb0000000000000000000000005f5260205f604460105f875af18060015f51141661183157803d853b151710611831576390b8ec185f526004601cfd5b505f603452505050565b638b78c6d819805473ffffffffffffffffffffffffffffffffffffffff9092169182907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e05f80a355565b5f600854826009546118979190611db6565b111592915050565b5f7fffffffff0000000000000000000000000000000000000000000000000000000082167fa921670500000000000000000000000000000000000000000000000000000000148061086b575061086b8261194b565b638b78c6d8600c52825f526020600c20805483811783611915575080841681185b80835580600c5160601c7f715ad5ce61fc9595c7b415289d59cf203f23a94fa06f04af7e489a0a76e1fe265f80a3505050505050565b5f7fffffffff0000000000000000000000000000000000000000000000000000000082167f6ab67a0d00000000000000000000000000000000000000000000000000000000148061086b57507f01ffc9a7000000000000000000000000000000000000000000000000000000007fffffffff0000000000000000000000000000000000000000000000000000000083161461086b565b5f602082840312156119f1575f80fd5b81357fffffffff0000000000000000000000000000000000000000000000000000000081168114611a20575f80fd5b9392505050565b5f60208284031215611a37575f80fd5b5035919050565b803573ffffffffffffffffffffffffffffffffffffffff81168114611a61575f80fd5b919050565b5f8060408385031215611a77575f80fd5b611a8083611a3e565b946020939093013593505050565b5f60208284031215611a9e575f80fd5b611a2082611a3e565b5f8083601f840112611ab7575f80fd5b50813567ffffffffffffffff811115611ace575f80fd5b6020830191508360208260051b8501011115611ae8575f80fd5b9250929050565b5f805f8060408587031215611b02575f80fd5b843567ffffffffffffffff811115611b18575f80fd5b611b2487828801611aa7565b909550935050602085013567ffffffffffffffff811115611b43575f80fd5b611b4f87828801611aa7565b95989497509550505050565b5f8083601f840112611b6b575f80fd5b50813567ffffffffffffffff811115611b82575f80fd5b602083019150836020828501011115611ae8575f80fd5b5f8060208385031215611baa575f80fd5b823567ffffffffffffffff811115611bc0575f80fd5b611bcc85828601611b5b565b90969095509350505050565b5f81518084528060208401602086015e5f6020828601015260207fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0601f83011685010191505092915050565b602081525f611a206020830184611bd8565b7f4e487b71000000000000000000000000000000000000000000000000000000005f52602160045260245ffd5b6002811061087b5761087b611c36565b60a08101611c8087611c63565b86825285602083015263ffffffff8516604083015273ffffffffffffffffffffffffffffffffffffffff84166060830152611cba83611c63565b8260808301529695505050505050565b8051611cd581611c63565b808352506020810151602083015263ffffffff604082015116604083015273ffffffffffffffffffffffffffffffffffffffff60608201511660608301526080810151611d2181611c63565b806080840152505050565b60a0810161086b8284611cca565b5f805f60408486031215611d4c575f80fd5b611d5584611a3e565b9250602084013567ffffffffffffffff811115611d70575f80fd5b611d7c86828701611b5b565b9497909650939450505050565b7f4e487b71000000000000000000000000000000000000000000000000000000005f52601160045260245ffd5b8082018082111561086b5761086b611d89565b7f4e487b71000000000000000000000000000000000000000000000000000000005f52603260045260245ffd5b5f60208284031215611e06575f80fd5b81358015158114611a20575f80fd5b7f4e487b71000000000000000000000000000000000000000000000000000000005f52604160045260245ffd5b60405160e0810167ffffffffffffffff81118282101715611e6557611e65611e15565b60405290565b60405160a0810167ffffffffffffffff81118282101715611e6557611e65611e15565b6040805190810167ffffffffffffffff81118282101715611e6557611e65611e15565b6002811061087b575f80fd5b5f81830361016081128015611ed0575f80fd5b50611ed9611e42565b611ee284611a3e565b8152611ef060208501611a3e565b60208201526040848101359082015260608085013590820152611f1560808501611a3e565b608082015260a084810135818301527fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff4083011215611f51575f80fd5b611f59611e6b565b915060c0840135611f6981611eb1565b825260e0840135602083015261010084013563ffffffff81168114611f8c575f80fd5b6040830152611f9e6101208501611a3e565b6060830152610140840135611fb281611eb1565b608083015260c08101919091529392505050565b8581526020810185905273ffffffffffffffffffffffffffffffffffffffff841660408201526060810183905261012081016120056080830184611cca565b9695505050505050565b5f82601f83011261201e575f80fd5b813567ffffffffffffffff81111561203857612038611e15565b604051601f82017fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0908116603f0116810167ffffffffffffffff8111828210171561208557612085611e15565b60405281815283820160200185101561209c575f80fd5b816020850160208301375f918101602001919091529392505050565b5f602082840312156120c8575f80fd5b813567ffffffffffffffff8111156120de575f80fd5b8201604081850312156120ef575f80fd5b6120f7611e8e565b61210082611a3e565b8152602082013567ffffffffffffffff81111561211b575f80fd5b6121278682850161200f565b602083015250949350505050565b5f60208284031215612145575f80fd5b5051919050565b8181038181111561086b5761086b611d89565b602081525f82516003811061217657612176611c36565b8060208401525073ffffffffffffffffffffffffffffffffffffffff602084015116604083015273ffffffffffffffffffffffffffffffffffffffff604084015116606083015260608301516080808401526121d560a0840182611bd8565b949350505050565b5f602082840312156121ed575f80fd5b813567ffffffffffffffff811115612203575f80fd5b820160408185031215612214575f80fd5b61221c611e8e565b813567ffffffffffffffff811115612232575f80fd5b61223e8682850161200f565b825250602082013567ffffffffffffffff81111561211b575f80fd5b808202811582820484141761086b5761086b611d89565b5f826122a4577f4e487b71000000000000000000000000000000000000000000000000000000005f52601260045260245ffd5b50049056fea2646970667358221220eddd99b4115a50f989fc036f59be415827f402b0d83b3e46667fbcfcb69547d164736f6c634300081a0033", y = { BASE_URL: "/", DEV: !1, MODE: "production", PROD: !0, SSR: !1, VITE_BOOST_MAINNET_SIGNER_EOA: "0xCBD0C302040bC803B4B2EDaF21Be0e49Deff5480", VITE_BOOST_TESTNET_SIGNER_EOA: "0xd63167e9db11B108940b2E8236581F961f33f396" }, l = class l extends Y {
|
|
10
|
+
const e0 = "0x6080604052348015600e575f80fd5b5060156019565b607c565b63409feecd198054600181161560365763f92ee8a95f526004601cfd5b6001600160401b03808260011c146077578060011b8355806020527fc7f505b2f371ae2175ee4913f4499e1f2633a7b5936321eed1cdaeb6115181d2602080a15b505050565b6122df806100895f395ff3fe6080604052600436106102ab575f3560e01c8063715018a611610165578063c884ef83116100c6578063ec87621c1161007c578063f2fde38b11610062578063f2fde38b146107b3578063fe9fbb80146107c6578063fee81cf4146107e5575f80fd5b8063ec87621c1461078c578063f04e283e146107a0575f80fd5b8063db09da12116100ac578063db09da1214610739578063dcc2136114610758578063dcc59b6f14610777575f80fd5b8063c884ef83146106f6578063d54ad2a114610724575f80fd5b8063a4d66daf1161011b578063bb1757cf11610101578063bb1757cf146106a4578063be4994f8146106c3578063c213f3f9146106e2575f80fd5b8063a4d66daf1461066e578063a871ced214610683575f80fd5b8063775486871161014b57806377548687146105b45780638da5cb5b1461062c5780639214fa4d14610644575f80fd5b8063715018a61461059857806375b238fc146105a0575f80fd5b806330db555f1161020f5780634a4ee7b1116101c5578063514e62fc116101ab578063514e62fc14610546578063547d18641461057b57806354d1f13d14610590575f80fd5b80634a4ee7b1146105075780634e7165a21461051a575f80fd5b80634359d28a116101f55780634359d28a14610480578063439fab911461049f578063474f5a44146104be575f80fd5b806330db555f1461043557806338d52e0f14610454575f80fd5b80631f1cb62b11610264578063256929621161024a57806325692962146103c257806328d6183b146103ca5780632de9480714610404575f80fd5b80631f1cb62b1461035d578063228cb733146103ae575f80fd5b8063183a4f6e11610294578063183a4f6e146103005780631c10893f146103155780631cd64df414610328575f80fd5b806301ffc9a7146102af57806307621eca146102e3575b5f80fd5b3480156102ba575f80fd5b506102ce6102c93660046119e1565b610816565b60405190151581526020015b60405180910390f35b3480156102ee575f80fd5b505f545b6040519081526020016102da565b61031361030e366004611a27565b610871565b005b610313610323366004611a66565b61087e565b348015610333575f80fd5b506102ce610342366004611a66565b638b78c6d8600c9081525f9290925260209091205481161490565b348015610368575f80fd5b50600a546103899073ffffffffffffffffffffffffffffffffffffffff1681565b60405173ffffffffffffffffffffffffffffffffffffffff90911681526020016102da565b3480156103b9575f80fd5b506102f25f5481565b610313610894565b3480156103d5575f80fd5b506040517ff60c99c90000000000000000000000000000000000000000000000000000000081526020016102da565b34801561040f575f80fd5b506102f261041e366004611a8e565b638b78c6d8600c9081525f91909152602090205490565b348015610440575f80fd5b5061031361044f366004611a27565b6108e1565b34801561045f575f80fd5b506006546103899073ffffffffffffffffffffffffffffffffffffffff1681565b34801561048b575f80fd5b5061031361049a366004611aef565b61099d565b3480156104aa575f80fd5b506103136104b9366004611b99565b610a97565b3480156104c9575f80fd5b506104dd6104d8366004611b99565b610e2f565b6040805192835273ffffffffffffffffffffffffffffffffffffffff9091166020830152016102da565b610313610515366004611a66565b610f91565b348015610525575f80fd5b50610539610534366004611b99565b610fa3565b6040516102da9190611c24565b348015610551575f80fd5b506102ce610560366004611a66565b638b78c6d8600c9081525f9290925260209091205416151590565b348015610586575f80fd5b506102f260025481565b61031361103d565b610313611076565b3480156105ab575f80fd5b506102f2600281565b3480156105bf575f80fd5b5060035460045460055461061b9260ff908116929163ffffffff81169173ffffffffffffffffffffffffffffffffffffffff64010000000083041691780100000000000000000000000000000000000000000000000090041685565b6040516102da959493929190611c73565b348015610637575f80fd5b50638b78c6d81954610389565b34801561064f575f80fd5b50600a5473ffffffffffffffffffffffffffffffffffffffff16610389565b348015610679575f80fd5b506102f260085481565b34801561068e575f80fd5b50610697611089565b6040516102da9190611d2c565b3480156106af575f80fd5b506102ce6106be366004611d3a565b611178565b3480156106ce575f80fd5b506103136106dd366004611aef565b6113a5565b3480156106ed575f80fd5b50600b546102f2565b348015610701575f80fd5b506102ce610710366004611a8e565b60016020525f908152604090205460ff1681565b34801561072f575f80fd5b506102f260095481565b348015610744575f80fd5b506102ce610753366004611d3a565b611443565b348015610763575f80fd5b50610313610772366004611aef565b6114b6565b348015610782575f80fd5b506102f260075481565b348015610797575f80fd5b506102f2600181565b6103136107ae366004611a8e565b611554565b6103136107c1366004611a8e565b61158e565b3480156107d1575f80fd5b506102ce6107e0366004611a8e565b6115b4565b3480156107f0575f80fd5b506102f26107ff366004611a8e565b63389a75e1600c9081525f91909152602090205490565b5f7fffffffff0000000000000000000000000000000000000000000000000000000082167ff60c99c900000000000000000000000000000000000000000000000000000000148061086b575061086b82611613565b92915050565b61087b3382611668565b50565b610886611673565b610890828261168d565b5050565b5f6202a30067ffffffffffffffff164201905063389a75e1600c52335f52806020600c2055337fdbf36a107da19e49527a7176a1babf963b4b0ff8cde35ee35d6cd8f1f9ac7e1d5f80a250565b60016108ec81611699565b815f03610925576040517ff92ee8a900000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b60065461094a9073ffffffffffffffffffffffffffffffffffffffff163330856116ca565b8160085f82825461095b9190611db6565b909155505060408051338152602081018490527fa64c2da41decbd538f8629e54c8fa0b7362c9102b691386a0fb6a1797454e9c6910160405180910390a15050565b60026109a881611699565b8382146109e1576040517fff633a3800000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b5f5b84811015610a8f575f8484838181106109fe576109fe611dc9565b9050602002016020810190610a139190611df6565b9050801515600103610a5557610a50878784818110610a3457610a34611dc9565b9050602002016020810190610a499190611a8e565b600161168d565b610a86565b610a86878784818110610a6a57610a6a611dc9565b9050602002016020810190610a7f9190611a8e565b6001611668565b506001016109e3565b505050505050565b7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffbf6011328054600382558015610ae85760018160011c14303b10610adf5763f92ee8a95f526004601cfd5b818160ff1b1b91505b505f610af683850185611ebd565b905080606001515f03610b35576040517ff92ee8a900000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b606081015181515f90610b5e9073ffffffffffffffffffffffffffffffffffffffff163061172c565b905081811015610bc75782516040517f5c54305e00000000000000000000000000000000000000000000000000000000815273ffffffffffffffffffffffffffffffffffffffff9091166004820152602481018290526044810183905260640160405180910390fd5b60c083015183516006805473ffffffffffffffffffffffffffffffffffffffff9283167fffffffffffffffffffffffff0000000000000000000000000000000000000000918216179091556020860151600a805491909316911617905560408401515f55606084015160085560a0840151600b5580516003805483929082907fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff001660018381811115610c7b57610c7b611c36565b021790555060208201516001808301919091556040830151600283018054606086015173ffffffffffffffffffffffffffffffffffffffff16640100000000027fffffffffffffffff00000000000000000000000000000000000000000000000090911663ffffffff90931692909217919091178082556080850151927fffffffffffffff00ffffffffffffffffffffffffffffffffffffffffffffffff909116907801000000000000000000000000000000000000000000000000908490811115610d4957610d49611c36565b0217905550905050610d5a3361175f565b610d69846080015160016117a7565b836020015173ffffffffffffffffffffffffffffffffffffffff16845f015173ffffffffffffffffffffffffffffffffffffffff167f68c413c27d17fa0454f7f4da49ac4979f28e363c5fa9c158ae0dfdc9c3317e078660400151876060015188608001518960a001518a60c00151604051610de9959493929190611fc6565b60405180910390a3505050508015610e2a576002815560016020527fc7f505b2f371ae2175ee4913f4499e1f2633a7b5936321eed1cdaeb6115181d2602080a15b505050565b5f806001610e3c81611699565b5f610e49858701876120b8565b90505f8160200151806020019051810190610e649190612135565b90508060085f828254610e77919061214c565b90915550508151600654610ea49173ffffffffffffffffffffffffffffffffffffffff90911690836117e8565b81516006546040517fffffffffffffffffffffffffffffffffffffffff000000000000000000000000606092831b811660208301529183901b90911660348201526048810183905273ffffffffffffffffffffffffffffffffffffffff909116907f9ad2e7a4af16dceda9cce4274b2f59c328d8c012eb0e15eb5e1e73b7d8f264d390606801604080517fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe081840301815290829052610f6291611c24565b60405180910390a260065490945073ffffffffffffffffffffffffffffffffffffffff16925050509250929050565b610f99611673565b6108908282611668565b60605f610fb283850185611ebd565b6060818101516040805160808101825260018152845173ffffffffffffffffffffffffffffffffffffffff16602080830191909152308284015282518082018452849052825180820185905283518082038301815290840184529482019490945290519394509092611024920161215f565b6040516020818303038152906040529250505092915050565b63389a75e1600c52335f525f6020600c2055337ffa7b8eab7da67f412cc9575ed43464468f9bfbae89d1675917346ca6d8fe3c925f80a2565b61107e611673565b6110875f61183b565b565b6040805160a0810182525f808252602082018190529181018290526060810182905260808101919091526040805160a0810190915260038054829060ff1660018111156110d8576110d8611c36565b60018111156110e9576110e9611c36565b81526001828101546020830152600283015463ffffffff81166040840152640100000000810473ffffffffffffffffffffffffffffffffffffffff1660608401526080909201917801000000000000000000000000000000000000000000000000900460ff169081111561115f5761115f611c36565b600181111561117057611170611c36565b905250919050565b5f611181611673565b5f61118e838501856121dd565b90505f81602001518060200190518101906111a99190612135565b90505f80545f036111bb5750806111de565b670de0b6b3a7640000825f546111d1919061225a565b6111db9190612271565b90505b600b54158015906111f05750600b5481115b156111fa5750600b545b61120381611885565b611239576040517f6247a84e00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b6008548160095461124a9190611db6565b1115611282576040517f360e42e100000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b8060095f8282546112939190611db6565b92505081905550600160075f8282546112ac9190611db6565b90915550506006546112d59073ffffffffffffffffffffffffffffffffffffffff1688836117e8565b6006546040517fffffffffffffffffffffffffffffffffffffffff000000000000000000000000606092831b811660208301529189901b90911660348201526048810182905273ffffffffffffffffffffffffffffffffffffffff8816907f9ad2e7a4af16dceda9cce4274b2f59c328d8c012eb0e15eb5e1e73b7d8f264d390606801604080517fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe08184030181529082905261139091611c24565b60405180910390a25060019695505050505050565b60026113b081611699565b8382146113e9576040517fff633a3800000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b5f5b84811015610a8f5761143b86868381811061140857611408611dc9565b905060200201602081019061141d9190611a8e565b85858481811061142f5761142f611dc9565b9050602002013561168d565b6001016113eb565b5f8080611452848601866121dd565b90505f816020015180602001905181019061146d9190612135565b90505f545f0361147f578092506114a2565b670de0b6b3a7640000815f54611495919061225a565b61149f9190612271565b92505b6114ab83611885565b979650505050505050565b60026114c181611699565b8382146114fa576040517fff633a3800000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b5f5b84811015610a8f5761154c86868381811061151957611519611dc9565b905060200201602081019061152e9190611a8e565b85858481811061154057611540611dc9565b90506020020135611668565b6001016114fc565b61155c611673565b63389a75e1600c52805f526020600c20805442111561158257636f5e88185f526004601cfd5b5f905561087b8161183b565b611596611673565b8060601b6115ab57637448fbae5f526004601cfd5b61087b8161183b565b5f8173ffffffffffffffffffffffffffffffffffffffff166115d9638b78c6d8195490565b73ffffffffffffffffffffffffffffffffffffffff16148061086b5750638b78c6d8600c9081525f8390526020902054600316151561086b565b5f7fffffffff0000000000000000000000000000000000000000000000000000000082167f5658633800000000000000000000000000000000000000000000000000000000148061086b575061086b8261189f565b61089082825f6118f4565b638b78c6d819543314611087576382b429005f526004601cfd5b610890828260016118f4565b638b78c6d81954331461087b57638b78c6d8600c52335f52806020600c20541661087b576382b429005f526004601cfd5b60405181606052826040528360601b602c526f23b872dd000000000000000000000000600c5260205f6064601c5f895af18060015f51141661171e57803d873b15171061171e57637939f4245f526004601cfd5b505f60605260405250505050565b5f816014526f70a082310000000000000000000000005f5260208060246010865afa601f3d111660205102905092915050565b73ffffffffffffffffffffffffffffffffffffffff16638b78c6d819819055805f7f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e08180a350565b638b78c6d8600c52815f52806020600c205580600c5160601c7f715ad5ce61fc9595c7b415289d59cf203f23a94fa06f04af7e489a0a76e1fe265f80a35050565b81601452806034526fa9059cbb0000000000000000000000005f5260205f604460105f875af18060015f51141661183157803d853b151710611831576390b8ec185f526004601cfd5b505f603452505050565b638b78c6d819805473ffffffffffffffffffffffffffffffffffffffff9092169182907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e05f80a355565b5f600854826009546118979190611db6565b111592915050565b5f7fffffffff0000000000000000000000000000000000000000000000000000000082167fa921670500000000000000000000000000000000000000000000000000000000148061086b575061086b8261194b565b638b78c6d8600c52825f526020600c20805483811783611915575080841681185b80835580600c5160601c7f715ad5ce61fc9595c7b415289d59cf203f23a94fa06f04af7e489a0a76e1fe265f80a3505050505050565b5f7fffffffff0000000000000000000000000000000000000000000000000000000082167f6ab67a0d00000000000000000000000000000000000000000000000000000000148061086b57507f01ffc9a7000000000000000000000000000000000000000000000000000000007fffffffff0000000000000000000000000000000000000000000000000000000083161461086b565b5f602082840312156119f1575f80fd5b81357fffffffff0000000000000000000000000000000000000000000000000000000081168114611a20575f80fd5b9392505050565b5f60208284031215611a37575f80fd5b5035919050565b803573ffffffffffffffffffffffffffffffffffffffff81168114611a61575f80fd5b919050565b5f8060408385031215611a77575f80fd5b611a8083611a3e565b946020939093013593505050565b5f60208284031215611a9e575f80fd5b611a2082611a3e565b5f8083601f840112611ab7575f80fd5b50813567ffffffffffffffff811115611ace575f80fd5b6020830191508360208260051b8501011115611ae8575f80fd5b9250929050565b5f805f8060408587031215611b02575f80fd5b843567ffffffffffffffff811115611b18575f80fd5b611b2487828801611aa7565b909550935050602085013567ffffffffffffffff811115611b43575f80fd5b611b4f87828801611aa7565b95989497509550505050565b5f8083601f840112611b6b575f80fd5b50813567ffffffffffffffff811115611b82575f80fd5b602083019150836020828501011115611ae8575f80fd5b5f8060208385031215611baa575f80fd5b823567ffffffffffffffff811115611bc0575f80fd5b611bcc85828601611b5b565b90969095509350505050565b5f81518084528060208401602086015e5f6020828601015260207fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0601f83011685010191505092915050565b602081525f611a206020830184611bd8565b7f4e487b71000000000000000000000000000000000000000000000000000000005f52602160045260245ffd5b6002811061087b5761087b611c36565b60a08101611c8087611c63565b86825285602083015263ffffffff8516604083015273ffffffffffffffffffffffffffffffffffffffff84166060830152611cba83611c63565b8260808301529695505050505050565b8051611cd581611c63565b808352506020810151602083015263ffffffff604082015116604083015273ffffffffffffffffffffffffffffffffffffffff60608201511660608301526080810151611d2181611c63565b806080840152505050565b60a0810161086b8284611cca565b5f805f60408486031215611d4c575f80fd5b611d5584611a3e565b9250602084013567ffffffffffffffff811115611d70575f80fd5b611d7c86828701611b5b565b9497909650939450505050565b7f4e487b71000000000000000000000000000000000000000000000000000000005f52601160045260245ffd5b8082018082111561086b5761086b611d89565b7f4e487b71000000000000000000000000000000000000000000000000000000005f52603260045260245ffd5b5f60208284031215611e06575f80fd5b81358015158114611a20575f80fd5b7f4e487b71000000000000000000000000000000000000000000000000000000005f52604160045260245ffd5b60405160e0810167ffffffffffffffff81118282101715611e6557611e65611e15565b60405290565b60405160a0810167ffffffffffffffff81118282101715611e6557611e65611e15565b6040805190810167ffffffffffffffff81118282101715611e6557611e65611e15565b6002811061087b575f80fd5b5f81830361016081128015611ed0575f80fd5b50611ed9611e42565b611ee284611a3e565b8152611ef060208501611a3e565b60208201526040848101359082015260608085013590820152611f1560808501611a3e565b608082015260a084810135818301527fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff4083011215611f51575f80fd5b611f59611e6b565b915060c0840135611f6981611eb1565b825260e0840135602083015261010084013563ffffffff81168114611f8c575f80fd5b6040830152611f9e6101208501611a3e565b6060830152610140840135611fb281611eb1565b608083015260c08101919091529392505050565b8581526020810185905273ffffffffffffffffffffffffffffffffffffffff841660408201526060810183905261012081016120056080830184611cca565b9695505050505050565b5f82601f83011261201e575f80fd5b813567ffffffffffffffff81111561203857612038611e15565b604051601f82017fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0908116603f0116810167ffffffffffffffff8111828210171561208557612085611e15565b60405281815283820160200185101561209c575f80fd5b816020850160208301375f918101602001919091529392505050565b5f602082840312156120c8575f80fd5b813567ffffffffffffffff8111156120de575f80fd5b8201604081850312156120ef575f80fd5b6120f7611e8e565b61210082611a3e565b8152602082013567ffffffffffffffff81111561211b575f80fd5b6121278682850161200f565b602083015250949350505050565b5f60208284031215612145575f80fd5b5051919050565b8181038181111561086b5761086b611d89565b602081525f82516003811061217657612176611c36565b8060208401525073ffffffffffffffffffffffffffffffffffffffff602084015116604083015273ffffffffffffffffffffffffffffffffffffffff604084015116606083015260608301516080808401526121d560a0840182611bd8565b949350505050565b5f602082840312156121ed575f80fd5b813567ffffffffffffffff811115612203575f80fd5b820160408185031215612214575f80fd5b61221c611e8e565b813567ffffffffffffffff811115612232575f80fd5b61223e8682850161200f565b825250602082013567ffffffffffffffff81111561211b575f80fd5b808202811582820484141761086b5761086b611d89565b5f826122a4577f4e487b71000000000000000000000000000000000000000000000000000000005f52601260045260245ffd5b50049056fea26469706673582212203fca38fce7264204d15264c812842ecd95cc564a520927bcc78f2f9c48a3908564736f6c634300081a0033", p = { BASE_URL: "/", DEV: !1, MODE: "production", PROD: !0, SSR: !1, VITE_BOOST_MAINNET_SIGNER_EOA: "0xCBD0C302040bC803B4B2EDaF21Be0e49Deff5480", VITE_BOOST_TESTNET_SIGNER_EOA: "0xd63167e9db11B108940b2E8236581F961f33f396" }, l = class l extends Z {
|
|
11
11
|
constructor() {
|
|
12
12
|
super(...arguments), this.abi = w;
|
|
13
13
|
}
|
|
@@ -20,7 +20,7 @@ const e0 = "0x6080604052348015600e575f80fd5b5060156019565b607c565b63409feecd1980
|
|
|
20
20
|
* @returns {Promise<Address>}
|
|
21
21
|
*/
|
|
22
22
|
async owner(f) {
|
|
23
|
-
return await
|
|
23
|
+
return await D(this._config, {
|
|
24
24
|
address: this.assertValidAddress(),
|
|
25
25
|
args: [],
|
|
26
26
|
// biome-ignore lint/suspicious/noExplicitAny: Accept any shape of valid wagmi/viem parameters, wagmi does the same thing internally
|
|
@@ -36,7 +36,7 @@ const e0 = "0x6080604052348015600e575f80fd5b5060156019565b607c565b63409feecd1980
|
|
|
36
36
|
* @returns {Promise<bigint>} - The current reward
|
|
37
37
|
*/
|
|
38
38
|
async currentReward(f) {
|
|
39
|
-
return await
|
|
39
|
+
return await x(
|
|
40
40
|
this._config,
|
|
41
41
|
{
|
|
42
42
|
address: this.assertValidAddress(),
|
|
@@ -86,7 +86,7 @@ const e0 = "0x6080604052348015600e575f80fd5b5060156019565b607c565b63409feecd1980
|
|
|
86
86
|
}
|
|
87
87
|
if (d && d.length > 0)
|
|
88
88
|
try {
|
|
89
|
-
const c = d.filter((s) => s.topics && s.topics[0] === a.signature).map((s) =>
|
|
89
|
+
const c = d.filter((s) => s.topics && s.topics[0] === a.signature).map((s) => Y(g, s));
|
|
90
90
|
if (c.length > 0)
|
|
91
91
|
for (const s of c)
|
|
92
92
|
try {
|
|
@@ -111,7 +111,7 @@ const e0 = "0x6080604052348015600e575f80fd5b5060156019565b607c565b63409feecd1980
|
|
|
111
111
|
`No logs found for event signature ${a.signature}`
|
|
112
112
|
);
|
|
113
113
|
try {
|
|
114
|
-
const c = b[a.signature], s =
|
|
114
|
+
const c = b[a.signature], s = W({
|
|
115
115
|
abi: [c],
|
|
116
116
|
logs: n
|
|
117
117
|
});
|
|
@@ -129,7 +129,7 @@ const e0 = "0x6080604052348015600e575f80fd5b5060156019565b607c565b63409feecd1980
|
|
|
129
129
|
);
|
|
130
130
|
}
|
|
131
131
|
} else if (a.criteriaType === C.FUNC) {
|
|
132
|
-
const g = await
|
|
132
|
+
const g = await z(this._config, {
|
|
133
133
|
chainId: f,
|
|
134
134
|
hash: e
|
|
135
135
|
});
|
|
@@ -161,7 +161,7 @@ const e0 = "0x6080604052348015600e575f80fd5b5060156019565b607c565b63409feecd1980
|
|
|
161
161
|
* @returns {Promise<bigint>}
|
|
162
162
|
*/
|
|
163
163
|
async claims(f) {
|
|
164
|
-
return await
|
|
164
|
+
return await N(
|
|
165
165
|
this._config,
|
|
166
166
|
{
|
|
167
167
|
address: this.assertValidAddress(),
|
|
@@ -180,7 +180,7 @@ const e0 = "0x6080604052348015600e575f80fd5b5060156019565b607c565b63409feecd1980
|
|
|
180
180
|
* @returns {Promise<bigint>}
|
|
181
181
|
*/
|
|
182
182
|
async totalClaimed(f) {
|
|
183
|
-
return await
|
|
183
|
+
return await H(
|
|
184
184
|
this._config,
|
|
185
185
|
{
|
|
186
186
|
address: this.assertValidAddress(),
|
|
@@ -219,7 +219,7 @@ const e0 = "0x6080604052348015600e575f80fd5b5060156019565b607c565b63409feecd1980
|
|
|
219
219
|
* @returns {Promise<Address>}
|
|
220
220
|
*/
|
|
221
221
|
async asset(f) {
|
|
222
|
-
return await
|
|
222
|
+
return await B(this._config, {
|
|
223
223
|
address: this.assertValidAddress(),
|
|
224
224
|
// biome-ignore lint/suspicious/noExplicitAny: Accept any shape of valid wagmi/viem parameters, wagmi does the same thing internally
|
|
225
225
|
...f
|
|
@@ -234,7 +234,7 @@ const e0 = "0x6080604052348015600e575f80fd5b5060156019565b607c565b63409feecd1980
|
|
|
234
234
|
* @returns {Promise<Address>}
|
|
235
235
|
*/
|
|
236
236
|
async peg(f) {
|
|
237
|
-
return await
|
|
237
|
+
return await S(this._config, {
|
|
238
238
|
address: this.assertValidAddress(),
|
|
239
239
|
// biome-ignore lint/suspicious/noExplicitAny: Accept any shape of valid wagmi/viem parameters, wagmi does the same thing internally
|
|
240
240
|
...f
|
|
@@ -249,7 +249,7 @@ const e0 = "0x6080604052348015600e575f80fd5b5060156019565b607c565b63409feecd1980
|
|
|
249
249
|
* @returns {Promise<bigint>}
|
|
250
250
|
*/
|
|
251
251
|
async reward(f) {
|
|
252
|
-
return await
|
|
252
|
+
return await O(
|
|
253
253
|
this._config,
|
|
254
254
|
{
|
|
255
255
|
address: this.assertValidAddress(),
|
|
@@ -267,7 +267,7 @@ const e0 = "0x6080604052348015600e575f80fd5b5060156019565b607c565b63409feecd1980
|
|
|
267
267
|
* @returns {Promise<bigint>}
|
|
268
268
|
*/
|
|
269
269
|
async limit(f) {
|
|
270
|
-
return await
|
|
270
|
+
return await F(this._config, {
|
|
271
271
|
address: this.assertValidAddress(),
|
|
272
272
|
// biome-ignore lint/suspicious/noExplicitAny: Accept any shape of valid wagmi/viem parameters, wagmi does the same thing internally
|
|
273
273
|
...f
|
|
@@ -295,14 +295,14 @@ const e0 = "0x6080604052348015600e575f80fd5b5060156019565b607c565b63409feecd1980
|
|
|
295
295
|
* @returns {Promise<{ hash: `0x${string}`; result: boolean; }>} - Returns true if successfully claimed
|
|
296
296
|
*/
|
|
297
297
|
async claimRaw(f, e) {
|
|
298
|
-
const { request: b, result: d } = await
|
|
298
|
+
const { request: b, result: d } = await G(this._config, {
|
|
299
299
|
address: this.assertValidAddress(),
|
|
300
300
|
args: [T(f)],
|
|
301
301
|
...this.optionallyAttachAccount(),
|
|
302
302
|
// biome-ignore lint/suspicious/noExplicitAny: Accept any shape of valid wagmi/viem parameters, wagmi does the same thing internally
|
|
303
303
|
...e
|
|
304
304
|
});
|
|
305
|
-
return { hash: await
|
|
305
|
+
return { hash: await $(
|
|
306
306
|
this._config,
|
|
307
307
|
b
|
|
308
308
|
), result: d };
|
|
@@ -329,7 +329,7 @@ const e0 = "0x6080604052348015600e575f80fd5b5060156019565b607c565b63409feecd1980
|
|
|
329
329
|
* @returns {Promise<{ hash: `0x${string}`; result: boolean; }>} - True if the assets were successfully clawbacked
|
|
330
330
|
*/
|
|
331
331
|
async clawbackRaw(f, e) {
|
|
332
|
-
const { request: b, result: d } = await
|
|
332
|
+
const { request: b, result: d } = await L(
|
|
333
333
|
this._config,
|
|
334
334
|
{
|
|
335
335
|
address: this.assertValidAddress(),
|
|
@@ -339,7 +339,7 @@ const e0 = "0x6080604052348015600e575f80fd5b5060156019565b607c565b63409feecd1980
|
|
|
339
339
|
...e
|
|
340
340
|
}
|
|
341
341
|
);
|
|
342
|
-
return { hash: await
|
|
342
|
+
return { hash: await M(
|
|
343
343
|
this._config,
|
|
344
344
|
b
|
|
345
345
|
), result: d };
|
|
@@ -354,7 +354,7 @@ const e0 = "0x6080604052348015600e575f80fd5b5060156019565b607c565b63409feecd1980
|
|
|
354
354
|
* @returns {Promise<boolean>} = True if the incentive is claimable based on the data payload
|
|
355
355
|
*/
|
|
356
356
|
async isClaimable(f, e) {
|
|
357
|
-
return await
|
|
357
|
+
return await U(
|
|
358
358
|
this._config,
|
|
359
359
|
{
|
|
360
360
|
address: this.assertValidAddress(),
|
|
@@ -373,7 +373,7 @@ const e0 = "0x6080604052348015600e575f80fd5b5060156019565b607c565b63409feecd1980
|
|
|
373
373
|
* @returns {Promise<Address>} = The address of the token the reward is pegged to
|
|
374
374
|
*/
|
|
375
375
|
async getPeg(f) {
|
|
376
|
-
return await
|
|
376
|
+
return await k(
|
|
377
377
|
this._config,
|
|
378
378
|
{
|
|
379
379
|
address: this.assertValidAddress(),
|
|
@@ -432,7 +432,7 @@ const e0 = "0x6080604052348015600e575f80fd5b5060156019565b607c565b63409feecd1980
|
|
|
432
432
|
*/
|
|
433
433
|
async getIncentiveCriteria(f) {
|
|
434
434
|
try {
|
|
435
|
-
return await
|
|
435
|
+
return await q(
|
|
436
436
|
this._config,
|
|
437
437
|
{
|
|
438
438
|
...f,
|
|
@@ -440,7 +440,7 @@ const e0 = "0x6080604052348015600e575f80fd5b5060156019565b607c565b63409feecd1980
|
|
|
440
440
|
}
|
|
441
441
|
);
|
|
442
442
|
} catch (e) {
|
|
443
|
-
throw new
|
|
443
|
+
throw new X(e);
|
|
444
444
|
}
|
|
445
445
|
}
|
|
446
446
|
/**
|
|
@@ -463,7 +463,7 @@ const e0 = "0x6080604052348015600e575f80fd5b5060156019565b607c565b63409feecd1980
|
|
|
463
463
|
manager: ((t = this.payload) == null ? void 0 : t.manager) ?? i,
|
|
464
464
|
criteria: ((a = this.payload) == null ? void 0 : a.criteria) ?? {
|
|
465
465
|
criteriaType: 0,
|
|
466
|
-
signature:
|
|
466
|
+
signature: K,
|
|
467
467
|
fieldIndex: 0,
|
|
468
468
|
targetContract: i,
|
|
469
469
|
valueType: 0
|
|
@@ -498,7 +498,7 @@ const e0 = "0x6080604052348015600e575f80fd5b5060156019565b607c565b63409feecd1980
|
|
|
498
498
|
* @returns {Hex} - Returns an encoded uint256
|
|
499
499
|
*/
|
|
500
500
|
buildClawbackData(f) {
|
|
501
|
-
return
|
|
501
|
+
return y([{ type: "uint256" }], [f]);
|
|
502
502
|
}
|
|
503
503
|
/**
|
|
504
504
|
* Builds the claim data for the ERC20PeggedVariableCriteriaIncentivePayload.
|
|
@@ -509,7 +509,7 @@ const e0 = "0x6080604052348015600e575f80fd5b5060156019565b607c565b63409feecd1980
|
|
|
509
509
|
* @description This function returns the encoded claim data for the ERC20PeggedVariableCriteriaIncentiveV2Payload.
|
|
510
510
|
*/
|
|
511
511
|
buildClaimData(f) {
|
|
512
|
-
return
|
|
512
|
+
return y(
|
|
513
513
|
[{ type: "uint256", name: "signedAmount" }],
|
|
514
514
|
[f]
|
|
515
515
|
);
|
|
@@ -579,12 +579,12 @@ const e0 = "0x6080604052348015600e575f80fd5b5060156019565b607c565b63409feecd1980
|
|
|
579
579
|
}
|
|
580
580
|
};
|
|
581
581
|
l.bases = {
|
|
582
|
-
...
|
|
582
|
+
...p != null && p.VITE_ERC20_PEGGED_VARIABLE_CRITERIA_INCENTIVE_V2_BASE ? {
|
|
583
583
|
31337: void 0
|
|
584
584
|
} : {},
|
|
585
|
-
...
|
|
585
|
+
...Q
|
|
586
586
|
}, l.registryType = f0.INCENTIVE;
|
|
587
|
-
let
|
|
587
|
+
let _ = l;
|
|
588
588
|
function I({
|
|
589
589
|
asset: V,
|
|
590
590
|
peg: f,
|
|
@@ -594,7 +594,7 @@ function I({
|
|
|
594
594
|
manager: t = i,
|
|
595
595
|
criteria: a
|
|
596
596
|
}) {
|
|
597
|
-
return
|
|
597
|
+
return y(
|
|
598
598
|
[
|
|
599
599
|
{
|
|
600
600
|
type: "tuple",
|
|
@@ -612,7 +612,7 @@ function I({
|
|
|
612
612
|
components: [
|
|
613
613
|
{ type: "uint8", name: "criteriaType" },
|
|
614
614
|
{ type: "bytes32", name: "signature" },
|
|
615
|
-
{ type: "
|
|
615
|
+
{ type: "uint32", name: "fieldIndex" },
|
|
616
616
|
{ type: "address", name: "targetContract" },
|
|
617
617
|
{ type: "uint8", name: "valueType" }
|
|
618
618
|
]
|
|
@@ -640,7 +640,7 @@ function I({
|
|
|
640
640
|
);
|
|
641
641
|
}
|
|
642
642
|
export {
|
|
643
|
-
|
|
643
|
+
_ as ERC20PeggedVariableCriteriaIncentiveV2,
|
|
644
644
|
w as erc20PeggedVariableCriteriaIncentiveV2Abi,
|
|
645
645
|
I as prepareERC20PeggedVariableCriteriaIncentiveV2Payload
|
|
646
646
|
};
|