@boostxyz/sdk 7.8.0 → 8.0.0-canary.1
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 +1 -1
- package/dist/Actions/EventAction.cjs +1 -1
- package/dist/Actions/EventAction.cjs.map +1 -1
- package/dist/Actions/EventAction.d.ts +4 -4
- package/dist/Actions/EventAction.js +97 -97
- package/dist/Actions/EventAction.js.map +1 -1
- package/dist/{AllowList-BJ9HQGFs.cjs → AllowList-BacG3oLt.cjs} +2 -2
- package/dist/{AllowList-BJ9HQGFs.cjs.map → AllowList-BacG3oLt.cjs.map} +1 -1
- package/dist/{AllowList-DiU7g4Hs.js → AllowList-NPDlllP6.js} +28 -28
- package/dist/{AllowList-DiU7g4Hs.js.map → AllowList-NPDlllP6.js.map} +1 -1
- package/dist/AllowLists/AllowList.cjs +1 -1
- package/dist/AllowLists/AllowList.js +3 -3
- package/dist/AllowLists/SimpleAllowList.cjs +1 -1
- package/dist/AllowLists/SimpleAllowList.js +8 -8
- 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 +1 -1
- package/dist/BoostCore.cjs +2 -2
- package/dist/BoostCore.cjs.map +1 -1
- package/dist/BoostCore.d.ts +106 -23
- package/dist/BoostCore.d.ts.map +1 -1
- package/dist/BoostCore.js +518 -451
- package/dist/BoostCore.js.map +1 -1
- package/dist/BoostRegistry.cjs +1 -1
- package/dist/BoostRegistry.js +46 -46
- package/dist/{Budget-YIhV65cc.js → Budget-Dq0K1LVM.js} +36 -36
- package/dist/{Budget-YIhV65cc.js.map → Budget-Dq0K1LVM.js.map} +1 -1
- package/dist/{Budget-D_zhh1rh.cjs → Budget-Gk2p5v0g.cjs} +2 -2
- package/dist/{Budget-D_zhh1rh.cjs.map → Budget-Gk2p5v0g.cjs.map} +1 -1
- package/dist/Budgets/Budget.cjs +1 -1
- package/dist/Budgets/Budget.js +2 -2
- package/dist/Budgets/ManagedBudget.cjs +1 -1
- package/dist/Budgets/ManagedBudget.js +24 -24
- package/dist/Deployable/Contract.cjs +1 -1
- package/dist/Deployable/Contract.cjs.map +1 -1
- package/dist/Deployable/Contract.d.ts +8 -0
- package/dist/Deployable/Contract.d.ts.map +1 -1
- package/dist/Deployable/Contract.js +14 -4
- package/dist/Deployable/Contract.js.map +1 -1
- package/dist/Deployable/Deployable.cjs +1 -1
- package/dist/Deployable/Deployable.cjs.map +1 -1
- package/dist/Deployable/Deployable.d.ts +7 -0
- package/dist/Deployable/Deployable.d.ts.map +1 -1
- package/dist/Deployable/Deployable.js +13 -4
- package/dist/Deployable/Deployable.js.map +1 -1
- package/dist/Deployable/DeployableTarget.cjs +1 -1
- package/dist/Deployable/DeployableTarget.js +7 -7
- package/dist/Deployable/DeployableTargetWithRBAC.cjs +1 -1
- package/dist/Deployable/DeployableTargetWithRBAC.js +16 -16
- package/dist/{Incentive-CeoEla-t.js → Incentive-DupDIsTS.js} +23 -23
- package/dist/{Incentive-CeoEla-t.js.map → Incentive-DupDIsTS.js.map} +1 -1
- package/dist/{Incentive-CrnbYN_a.cjs → Incentive-YiX6zKm1.cjs} +2 -2
- package/dist/{Incentive-CrnbYN_a.cjs.map → Incentive-YiX6zKm1.cjs.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 +38 -38
- 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.cjs.map +1 -1
- package/dist/Incentives/ERC20PeggedVariableCriteriaIncentive.d.ts +6 -6
- package/dist/Incentives/ERC20PeggedVariableCriteriaIncentive.js +22 -22
- package/dist/Incentives/ERC20PeggedVariableCriteriaIncentive.js.map +1 -1
- package/dist/Incentives/ERC20PeggedVariableCriteriaIncentiveV2.cjs +1 -1
- package/dist/Incentives/ERC20PeggedVariableCriteriaIncentiveV2.cjs.map +1 -1
- package/dist/Incentives/ERC20PeggedVariableCriteriaIncentiveV2.d.ts +6 -6
- package/dist/Incentives/ERC20PeggedVariableCriteriaIncentiveV2.js +91 -91
- package/dist/Incentives/ERC20PeggedVariableCriteriaIncentiveV2.js.map +1 -1
- package/dist/Incentives/ERC20VariableCriteriaIncentive.cjs +1 -1
- package/dist/Incentives/ERC20VariableCriteriaIncentive.cjs.map +1 -1
- package/dist/Incentives/ERC20VariableCriteriaIncentive.d.ts +6 -6
- package/dist/Incentives/ERC20VariableCriteriaIncentive.js +9 -9
- package/dist/Incentives/ERC20VariableCriteriaIncentive.js.map +1 -1
- package/dist/Incentives/ERC20VariableCriteriaIncentiveV2.cjs +1 -1
- package/dist/Incentives/ERC20VariableCriteriaIncentiveV2.cjs.map +1 -1
- package/dist/Incentives/ERC20VariableCriteriaIncentiveV2.d.ts +6 -6
- package/dist/Incentives/ERC20VariableCriteriaIncentiveV2.js +9 -9
- package/dist/Incentives/ERC20VariableCriteriaIncentiveV2.js.map +1 -1
- package/dist/Incentives/ERC20VariableIncentive.cjs +1 -1
- package/dist/Incentives/ERC20VariableIncentive.js +12 -12
- package/dist/Incentives/Incentive.cjs +1 -1
- package/dist/Incentives/Incentive.js +2 -2
- package/dist/Incentives/PointsIncentive.cjs +1 -1
- package/dist/Incentives/PointsIncentive.js +10 -10
- package/dist/{SimpleDenyList-7-VTqfsH.cjs → SimpleDenyList-DMdld3JN.cjs} +2 -2
- package/dist/{SimpleDenyList-7-VTqfsH.cjs.map → SimpleDenyList-DMdld3JN.cjs.map} +1 -1
- package/dist/{SimpleDenyList-Dr03aOeP.js → SimpleDenyList-DyKqIWYL.js} +14 -14
- package/dist/{SimpleDenyList-Dr03aOeP.js.map → SimpleDenyList-DyKqIWYL.js.map} +1 -1
- package/dist/{Validator-rYW7PMwW.cjs → Validator-BwPDBcxh.cjs} +2 -2
- package/dist/{Validator-rYW7PMwW.cjs.map → Validator-BwPDBcxh.cjs.map} +1 -1
- package/dist/{Validator-DgvB9wge.js → Validator-vn0kQ3Wu.js} +9 -9
- package/dist/{Validator-DgvB9wge.js.map → Validator-vn0kQ3Wu.js.map} +1 -1
- package/dist/Validators/LimitedSignerValidator.cjs +1 -1
- package/dist/Validators/LimitedSignerValidator.js +17 -17
- package/dist/Validators/SignerValidator.cjs +1 -1
- package/dist/Validators/SignerValidator.js +3 -3
- package/dist/Validators/Validator.cjs +1 -1
- package/dist/Validators/Validator.js +2 -2
- package/dist/deployments-DimWVnA4.cjs +2 -0
- package/dist/deployments-DimWVnA4.cjs.map +1 -0
- package/dist/deployments-Dw5Suk_D.js +158 -0
- package/dist/deployments-Dw5Suk_D.js.map +1 -0
- package/dist/deployments.json +115 -153
- package/dist/generated-BzLYuFx3.cjs +3 -0
- package/dist/generated-BzLYuFx3.cjs.map +1 -0
- package/dist/{generated-B6mEIx8i.js → generated-D6oDILUw.js} +250 -193
- package/dist/generated-D6oDILUw.js.map +1 -0
- package/dist/index.cjs +1 -1
- package/dist/index.js +16 -16
- package/dist/utils.cjs.map +1 -1
- package/dist/utils.d.ts.map +1 -1
- package/dist/utils.js.map +1 -1
- package/package.json +1 -1
- package/src/BoostCore.test.ts +34 -23
- package/src/BoostCore.ts +124 -26
- package/src/Deployable/Contract.ts +11 -0
- package/src/Deployable/Deployable.ts +10 -0
- package/src/utils.ts +0 -1
- package/dist/deployments-BjBgk03b.cjs +0 -2
- package/dist/deployments-BjBgk03b.cjs.map +0 -1
- package/dist/deployments-CHQ30INq.js +0 -194
- package/dist/deployments-CHQ30INq.js.map +0 -1
- package/dist/generated-B6mEIx8i.js.map +0 -1
- package/dist/generated-dd4FN0Fo.cjs +0 -3
- package/dist/generated-dd4FN0Fo.cjs.map +0 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ERC20VariableCriteriaIncentiveV2.js","sources":["../../src/Incentives/ERC20VariableCriteriaIncentiveV2.ts"],"sourcesContent":["import {\n erc20VariableCriteriaIncentiveV2Abi,\n readErc20VariableCriteriaIncentiveV2GetIncentiveCriteria,\n readErc20VariableCriteriaIncentiveV2GetMaxReward,\n} from '@boostxyz/evm';\nimport { bytecode } from '@boostxyz/evm/artifacts/contracts/incentives/ERC20VariableCriteriaIncentiveV2.sol/ERC20VariableCriteriaIncentiveV2.json';\nimport { getTransaction, getTransactionReceipt } from '@wagmi/core';\nimport {\n type AbiEvent,\n type AbiFunction,\n type Address,\n type GetLogsReturnType,\n type Hex,\n decodeAbiParameters,\n decodeFunctionData,\n encodeAbiParameters,\n parseEther,\n parseEventLogs,\n zeroAddress,\n zeroHash,\n} from 'viem';\nimport { ERC20VariableCriteriaIncentiveV2 as ERC20VariableCriteriaIncentiveV2Bases } from '../../dist/deployments.json';\nimport {\n SignatureType,\n ValueType,\n decodeAndReorderLogArgs,\n getScalarValueFromTuple,\n isCriteriaFieldIndexTuple,\n} from '../Actions/EventAction';\nimport type {\n DeployableOptions,\n GenericDeployableParams,\n} from '../Deployable/Deployable';\nimport {\n DecodedArgsError,\n IncentiveCriteriaNotFoundError,\n InvalidCriteriaTypeError,\n NoMatchingLogsError,\n} from '../errors';\nimport { CheatCodes, type ReadParams } from '../utils';\nimport { ERC20VariableIncentive } from './ERC20VariableIncentive';\n\nexport { erc20VariableCriteriaIncentiveV2Abi };\n\nexport interface ERC20VariableCriteriaIncentiveV2Payload {\n /**\n * The address of the incentivized asset.\n *\n * @type {Address}\n */\n asset: Address;\n /**\n * The amount of the asset to distribute as reward.\n *\n * @type {bigint}\n */\n reward: bigint;\n /**\n * The total spending limit of the asset that will be distributed.\n *\n * @type {bigint}\n */\n limit: bigint;\n /**\n * The total amount claimable in a single claim or maximum per-action reward.\n *\n * @type {bigint}\n * @optional\n */\n maxReward?: bigint;\n /**\n * The criteria for the incentive that determines how the reward is distributed.\n *\n * @type {IncentiveCriteria}\n */\n criteria: IncentiveCriteriaV2;\n}\n\nexport interface IncentiveCriteriaV2 {\n /**\n * The type of criteria used, either function signature or event signature.\n *\n * @type {SignatureType}\n */\n criteriaType: SignatureType;\n /**\n * The function or event signature used for criteria matching.\n *\n * @type {Hex}\n */\n signature: Hex;\n /**\n * The index of the field from where the scalar value is extracted.\n *\n * @type {number}\n */\n fieldIndex: number;\n /**\n * The address of the contract where the event/function is called/emitted.\n *\n * @type {Address}\n */\n targetContract: Address;\n /**\n * The type of value used for the scalar value (RAW or WAD).\n * - RAW: Raw integer value (e.g., NFT quantity)\n * - WAD: Value with 18 decimals (e.g., token amount)\n *\n * @type {ValueType}\n */\n valueType: ValueType;\n}\n\nexport interface ReadIncentiveCriteriaV2Params extends ReadParams {}\n\nexport interface GetIncentiveScalarV2Params {\n chainId: number;\n hash: Hex;\n knownSignatures: Record<Hex, AbiFunction | AbiEvent>;\n logs?: GetLogsReturnType<AbiEvent, AbiEvent[], true>;\n}\n\n/**\n * Extended ERC20 Variable Criteria Incentive class that fetches incentive criteria and scalar\n *\n * @export\n * @class ERC20VariableCriteriaIncentive\n * @typedef {ERC20VariableCriteriaIncentiveV2}\n * @extends {ERC20VariableIncentive<ERC20VariableCriteriaIncentiveV2Payload, typeof erc20VariableCriteriaIncentiveV2Abi>}\n */\nexport class ERC20VariableCriteriaIncentiveV2 extends ERC20VariableIncentive<\n ERC20VariableCriteriaIncentiveV2Payload,\n typeof erc20VariableCriteriaIncentiveV2Abi,\n Promise<bigint>\n> {\n //@ts-expect-error instantiated correctly\n public override readonly abi = erc20VariableCriteriaIncentiveV2Abi;\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_VARIABLE_CRITERIA_INCENTIVE_V2_BASE\n ? {\n 31337: import.meta.env.VITE_ERC20_VARIABLE_CRITERIA_INCENTIVE_V2_BASE,\n }\n : {}),\n ...(ERC20VariableCriteriaIncentiveV2Bases as Record<number, Address>),\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 readErc20VariableCriteriaIncentiveV2GetIncentiveCriteria(\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 * Decodes claim data for the ERC20VariableCriteriaIncentiveV2, 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 override 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 * 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 getMaxReward(params?: ReadParams): Promise<bigint> {\n const maxReward = await readErc20VariableCriteriaIncentiveV2GetMaxReward(\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 if (isCriteriaFieldIndexTuple(criteria.fieldIndex)) {\n return getScalarValueFromTuple(\n log.args as unknown[],\n criteria.fieldIndex,\n );\n }\n const scalarValue = log.args\n ? (log.args as string[])[criteria.fieldIndex]\n : undefined;\n if (scalarValue !== undefined) {\n return BigInt(scalarValue);\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 if (isCriteriaFieldIndexTuple(criteria.fieldIndex)) {\n return getScalarValueFromTuple(\n decodedEvents[0]?.args as unknown[],\n criteria.fieldIndex,\n );\n }\n\n const scalarValue =\n decodedEvents[0] && decodedEvents[0].args\n ? (decodedEvents[0].args as string[])[criteria.fieldIndex]\n : undefined;\n if (scalarValue === undefined) {\n throw new DecodedArgsError(\n `Decoded argument at index ${criteria.fieldIndex} is undefined`,\n );\n }\n return BigInt(scalarValue);\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 if (isCriteriaFieldIndexTuple(criteria.fieldIndex)) {\n return getScalarValueFromTuple(\n decodedFunction.args as unknown[],\n criteria.fieldIndex,\n );\n }\n\n const scalarValue = decodedFunction.args[criteria.fieldIndex] as string;\n if (scalarValue === undefined || scalarValue === null) {\n throw new DecodedArgsError(\n `Decoded argument at index ${criteria.fieldIndex} is undefined`,\n );\n }\n return BigInt(scalarValue);\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 * @inheritdoc\n *\n * @public\n * @param {?ERC20VariableCriteriaIncentiveV2Payload} [_payload]\n * @param {?DeployableOptions} [_options]\n * @returns {GenericDeployableParams}\n */\n public override buildParameters(\n _payload?: ERC20VariableCriteriaIncentiveV2Payload,\n _options?: DeployableOptions,\n ): GenericDeployableParams {\n const [payload, options] = this.validateDeploymentConfig(\n _payload,\n _options,\n );\n return {\n abi: erc20VariableCriteriaIncentiveV2Abi,\n bytecode: bytecode as Hex,\n args: [prepareERC20VariableCriteriaIncentiveV2Payload(payload)],\n ...this.optionallyAttachAccount(options.account),\n };\n }\n}\n\n/**\n * Creates an IncentiveCriteria object representing a gas rebate incentive.\n * This object defines a variable incentive criteria where the criteria will be the gas spent.\n *\n * The criteria uses a signatureType of EVENT, with a special `fieldIndex` of 255 (using CheatCodes enum), which indicates\n * that the entire gas cost of the transaction will be used as the scalar value. If you don't want to\n * rebate the entire gas cost, you can use a reward value on the incentive..\n *\n * - `criteriaType`: EVENT, indicating it's based on event logs.\n * - `signature`: A zeroed signature (0x0000...0000), matching any event.\n * - `fieldIndex`: 255, indicating the use of transaction gas cost using CheatCodes enum.\n * - `targetContract`: A zeroed address (0x0000...0000), applicable to any contract.\n *\n * @returns {IncentiveCriteria} Returns an IncentiveCriteria object for a gas rebate.\n *\n * @example\n * const incentive = gasRebateIncentiveCriteria();\n * const actionPayload = {\n * criteria: incentive,\n * asset: \"0xAssetAddress\",\n * reward: 0, // Set to zero to rebate the entire gas cost\n * limit: BigInt(1000) // This is the total spend limit for the incentive\n * };\n * deployIncentive(actionPayload);\n */\nexport function gasRebateIncentiveCriteriaV2(): IncentiveCriteriaV2 {\n return {\n criteriaType: SignatureType.EVENT,\n signature: zeroHash,\n fieldIndex: CheatCodes.GAS_REBATE_INCENTIVE,\n targetContract: zeroAddress,\n valueType: ValueType.WAD,\n };\n}\n\n/**\n *\n *\n * @param {InitPayloadExtended} param0\n * @param {Address} param0.asset - The address of the ERC20 asset to incentivize.\n * @param {bigint} param0.reward - The reward amount to distribute per action.\n * @param {bigint} param0.limit - The total limit of the asset distribution.\n * @param {bigint} param0.maxReward - The maximum value claimable from a single completion.\n * @param {IncentiveCriteria} param0.criteria - The incentive criteria for reward distribution.\n * @returns {Hex}\n */\nexport function prepareERC20VariableCriteriaIncentiveV2Payload({\n asset,\n reward,\n limit,\n maxReward = 0n,\n criteria,\n}: ERC20VariableCriteriaIncentiveV2Payload) {\n return encodeAbiParameters(\n [\n {\n type: 'tuple',\n name: 'initPayloadExtended',\n components: [\n { type: 'address', name: 'asset' },\n { type: 'uint256', name: 'reward' },\n { type: 'uint256', name: 'limit' },\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: asset,\n reward: reward,\n limit: limit,\n maxReward: 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":["_ERC20VariableCriteriaIncentiveV2","ERC20VariableIncentive","erc20VariableCriteriaIncentiveV2Abi","params","readErc20VariableCriteriaIncentiveV2GetIncentiveCriteria","e","IncentiveCriteriaNotFoundError","claimData","boostClaimData","decodeAbiParameters","signedAmount","claimAmount","reward","maxReward","parseEther","readErc20VariableCriteriaIncentiveV2GetMaxReward","chainId","hash","knownSignatures","logs","criteria","SignatureType","eventAbi","CheatCodes","transactionReceipt","getTransactionReceipt","signatureMatchingLogs","log","decodeAndReorderLogArgs","isCriteriaFieldIndexTuple","getScalarValueFromTuple","scalarValue","DecodedArgsError","receiptLogs","NoMatchingLogsError","decodedEvents","parseEventLogs","_a","transaction","getTransaction","func","decodedFunction","decodeFunctionData","InvalidCriteriaTypeError","_payload","_options","payload","options","bytecode","prepareERC20VariableCriteriaIncentiveV2Payload","__vite_import_meta_env__","ERC20VariableCriteriaIncentiveV2Bases","ERC20VariableCriteriaIncentiveV2","gasRebateIncentiveCriteriaV2","zeroHash","zeroAddress","ValueType","asset","limit","encodeAbiParameters"],"mappings":"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"}
|
|
1
|
+
{"version":3,"file":"ERC20VariableCriteriaIncentiveV2.js","sources":["../../src/Incentives/ERC20VariableCriteriaIncentiveV2.ts"],"sourcesContent":["import {\n erc20VariableCriteriaIncentiveV2Abi,\n readErc20VariableCriteriaIncentiveV2GetIncentiveCriteria,\n readErc20VariableCriteriaIncentiveV2GetMaxReward,\n} from '@boostxyz/evm';\nimport { bytecode } from '@boostxyz/evm/artifacts/contracts/incentives/ERC20VariableCriteriaIncentiveV2.sol/ERC20VariableCriteriaIncentiveV2.json';\nimport { getTransaction, getTransactionReceipt } from '@wagmi/core';\nimport {\n type AbiEvent,\n type AbiFunction,\n type Address,\n type GetLogsReturnType,\n type Hex,\n decodeAbiParameters,\n decodeFunctionData,\n encodeAbiParameters,\n parseEther,\n parseEventLogs,\n zeroAddress,\n zeroHash,\n} from 'viem';\nimport { ERC20VariableCriteriaIncentiveV2 as ERC20VariableCriteriaIncentiveV2Bases } from '../../dist/deployments.json';\nimport {\n SignatureType,\n ValueType,\n decodeAndReorderLogArgs,\n getScalarValueFromTuple,\n isCriteriaFieldIndexTuple,\n} from '../Actions/EventAction';\nimport type {\n DeployableOptions,\n GenericDeployableParams,\n} from '../Deployable/Deployable';\nimport {\n DecodedArgsError,\n IncentiveCriteriaNotFoundError,\n InvalidCriteriaTypeError,\n NoMatchingLogsError,\n} from '../errors';\nimport { CheatCodes, type ReadParams } from '../utils';\nimport { ERC20VariableIncentive } from './ERC20VariableIncentive';\n\nexport { erc20VariableCriteriaIncentiveV2Abi };\n\nexport interface ERC20VariableCriteriaIncentiveV2Payload {\n /**\n * The address of the incentivized asset.\n *\n * @type {Address}\n */\n asset: Address;\n /**\n * The amount of the asset to distribute as reward.\n *\n * @type {bigint}\n */\n reward: bigint;\n /**\n * The total spending limit of the asset that will be distributed.\n *\n * @type {bigint}\n */\n limit: bigint;\n /**\n * The total amount claimable in a single claim or maximum per-action reward.\n *\n * @type {bigint}\n * @optional\n */\n maxReward?: bigint;\n /**\n * The criteria for the incentive that determines how the reward is distributed.\n *\n * @type {IncentiveCriteria}\n */\n criteria: IncentiveCriteriaV2;\n}\n\nexport interface IncentiveCriteriaV2 {\n /**\n * The type of criteria used, either function signature or event signature.\n *\n * @type {SignatureType}\n */\n criteriaType: SignatureType;\n /**\n * The function or event signature used for criteria matching.\n *\n * @type {Hex}\n */\n signature: Hex;\n /**\n * The index of the field from where the scalar value is extracted.\n *\n * @type {number}\n */\n fieldIndex: number;\n /**\n * The address of the contract where the event/function is called/emitted.\n *\n * @type {Address}\n */\n targetContract: Address;\n /**\n * The type of value used for the scalar value (RAW or WAD).\n * - RAW: Raw integer value (e.g., NFT quantity)\n * - WAD: Value with 18 decimals (e.g., token amount)\n *\n * @type {ValueType}\n */\n valueType: ValueType;\n}\n\nexport interface ReadIncentiveCriteriaV2Params extends ReadParams {}\n\nexport interface GetIncentiveScalarV2Params {\n chainId: number;\n hash: Hex;\n knownSignatures: Record<Hex, AbiFunction | AbiEvent>;\n logs?: GetLogsReturnType<AbiEvent, AbiEvent[], true>;\n}\n\n/**\n * Extended ERC20 Variable Criteria Incentive class that fetches incentive criteria and scalar\n *\n * @export\n * @class ERC20VariableCriteriaIncentive\n * @typedef {ERC20VariableCriteriaIncentiveV2}\n * @extends {ERC20VariableIncentive<ERC20VariableCriteriaIncentiveV2Payload, typeof erc20VariableCriteriaIncentiveV2Abi>}\n */\nexport class ERC20VariableCriteriaIncentiveV2 extends ERC20VariableIncentive<\n ERC20VariableCriteriaIncentiveV2Payload,\n typeof erc20VariableCriteriaIncentiveV2Abi,\n Promise<bigint>\n> {\n //@ts-expect-error instantiated correctly\n public override readonly abi = erc20VariableCriteriaIncentiveV2Abi;\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_VARIABLE_CRITERIA_INCENTIVE_V2_BASE\n ? {\n 31337: import.meta.env.VITE_ERC20_VARIABLE_CRITERIA_INCENTIVE_V2_BASE,\n }\n : {}),\n ...(ERC20VariableCriteriaIncentiveV2Bases as Record<number, Address>),\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 readErc20VariableCriteriaIncentiveV2GetIncentiveCriteria(\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 * Decodes claim data for the ERC20VariableCriteriaIncentiveV2, 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 override 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 * 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 getMaxReward(params?: ReadParams): Promise<bigint> {\n const maxReward = await readErc20VariableCriteriaIncentiveV2GetMaxReward(\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 if (isCriteriaFieldIndexTuple(criteria.fieldIndex)) {\n return getScalarValueFromTuple(\n log.args as unknown[],\n criteria.fieldIndex,\n );\n }\n const scalarValue = log.args\n ? (log.args as string[])[criteria.fieldIndex]\n : undefined;\n if (scalarValue !== undefined) {\n return BigInt(scalarValue);\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 if (isCriteriaFieldIndexTuple(criteria.fieldIndex)) {\n return getScalarValueFromTuple(\n decodedEvents[0]?.args as unknown[],\n criteria.fieldIndex,\n );\n }\n\n const scalarValue =\n decodedEvents[0] && decodedEvents[0].args\n ? (decodedEvents[0].args as string[])[criteria.fieldIndex]\n : undefined;\n if (scalarValue === undefined) {\n throw new DecodedArgsError(\n `Decoded argument at index ${criteria.fieldIndex} is undefined`,\n );\n }\n return BigInt(scalarValue);\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 if (isCriteriaFieldIndexTuple(criteria.fieldIndex)) {\n return getScalarValueFromTuple(\n decodedFunction.args as unknown[],\n criteria.fieldIndex,\n );\n }\n\n const scalarValue = decodedFunction.args[criteria.fieldIndex] as string;\n if (scalarValue === undefined || scalarValue === null) {\n throw new DecodedArgsError(\n `Decoded argument at index ${criteria.fieldIndex} is undefined`,\n );\n }\n return BigInt(scalarValue);\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 * @inheritdoc\n *\n * @public\n * @param {?ERC20VariableCriteriaIncentiveV2Payload} [_payload]\n * @param {?DeployableOptions} [_options]\n * @returns {GenericDeployableParams}\n */\n public override buildParameters(\n _payload?: ERC20VariableCriteriaIncentiveV2Payload,\n _options?: DeployableOptions,\n ): GenericDeployableParams {\n const [payload, options] = this.validateDeploymentConfig(\n _payload,\n _options,\n );\n return {\n abi: erc20VariableCriteriaIncentiveV2Abi,\n bytecode: bytecode as Hex,\n args: [prepareERC20VariableCriteriaIncentiveV2Payload(payload)],\n ...this.optionallyAttachAccount(options.account),\n };\n }\n}\n\n/**\n * Creates an IncentiveCriteria object representing a gas rebate incentive.\n * This object defines a variable incentive criteria where the criteria will be the gas spent.\n *\n * The criteria uses a signatureType of EVENT, with a special `fieldIndex` of 255 (using CheatCodes enum), which indicates\n * that the entire gas cost of the transaction will be used as the scalar value. If you don't want to\n * rebate the entire gas cost, you can use a reward value on the incentive..\n *\n * - `criteriaType`: EVENT, indicating it's based on event logs.\n * - `signature`: A zeroed signature (0x0000...0000), matching any event.\n * - `fieldIndex`: 255, indicating the use of transaction gas cost using CheatCodes enum.\n * - `targetContract`: A zeroed address (0x0000...0000), applicable to any contract.\n *\n * @returns {IncentiveCriteria} Returns an IncentiveCriteria object for a gas rebate.\n *\n * @example\n * const incentive = gasRebateIncentiveCriteria();\n * const actionPayload = {\n * criteria: incentive,\n * asset: \"0xAssetAddress\",\n * reward: 0, // Set to zero to rebate the entire gas cost\n * limit: BigInt(1000) // This is the total spend limit for the incentive\n * };\n * deployIncentive(actionPayload);\n */\nexport function gasRebateIncentiveCriteriaV2(): IncentiveCriteriaV2 {\n return {\n criteriaType: SignatureType.EVENT,\n signature: zeroHash,\n fieldIndex: CheatCodes.GAS_REBATE_INCENTIVE,\n targetContract: zeroAddress,\n valueType: ValueType.WAD,\n };\n}\n\n/**\n *\n *\n * @param {InitPayloadExtended} param0\n * @param {Address} param0.asset - The address of the ERC20 asset to incentivize.\n * @param {bigint} param0.reward - The reward amount to distribute per action.\n * @param {bigint} param0.limit - The total limit of the asset distribution.\n * @param {bigint} param0.maxReward - The maximum value claimable from a single completion.\n * @param {IncentiveCriteria} param0.criteria - The incentive criteria for reward distribution.\n * @returns {Hex}\n */\nexport function prepareERC20VariableCriteriaIncentiveV2Payload({\n asset,\n reward,\n limit,\n maxReward = 0n,\n criteria,\n}: ERC20VariableCriteriaIncentiveV2Payload) {\n return encodeAbiParameters(\n [\n {\n type: 'tuple',\n name: 'initPayloadExtended',\n components: [\n { type: 'address', name: 'asset' },\n { type: 'uint256', name: 'reward' },\n { type: 'uint256', name: 'limit' },\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: asset,\n reward: reward,\n limit: limit,\n maxReward: 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":["_ERC20VariableCriteriaIncentiveV2","ERC20VariableIncentive","erc20VariableCriteriaIncentiveV2Abi","params","readErc20VariableCriteriaIncentiveV2GetIncentiveCriteria","e","IncentiveCriteriaNotFoundError","claimData","boostClaimData","decodeAbiParameters","signedAmount","claimAmount","reward","maxReward","parseEther","readErc20VariableCriteriaIncentiveV2GetMaxReward","chainId","hash","knownSignatures","logs","criteria","SignatureType","eventAbi","CheatCodes","transactionReceipt","getTransactionReceipt","signatureMatchingLogs","log","decodeAndReorderLogArgs","isCriteriaFieldIndexTuple","getScalarValueFromTuple","scalarValue","DecodedArgsError","receiptLogs","NoMatchingLogsError","decodedEvents","parseEventLogs","_a","transaction","getTransaction","func","decodedFunction","decodeFunctionData","InvalidCriteriaTypeError","_payload","_options","payload","options","bytecode","prepareERC20VariableCriteriaIncentiveV2Payload","__vite_import_meta_env__","ERC20VariableCriteriaIncentiveV2Bases","ERC20VariableCriteriaIncentiveV2","gasRebateIncentiveCriteriaV2","zeroHash","zeroAddress","ValueType","asset","limit","encodeAbiParameters"],"mappings":"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"}
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const a=require("../generated-dd4FN0Fo.cjs"),c=require("viem"),u=require("../deployments-BjBgk03b.cjs"),h=require("../Deployable/DeployableTarget.cjs"),n=require("../claiming.cjs"),y=require("../utils.cjs"),m="0x6080604052348015600e575f80fd5b5060156019565b607c565b63409feecd198054600181161560365763f92ee8a95f526004601cfd5b6001600160401b03808260011c146077578060011b8355806020527fc7f505b2f371ae2175ee4913f4499e1f2633a7b5936321eed1cdaeb6115181d2602080a15b505050565b611c81806100895f395ff3fe60806040526004361061020f575f3560e01c806354d1f13d11610117578063d54ad2a1116100ac578063ec87621c1161007c578063f2fde38b11610062578063f2fde38b146105ff578063fe9fbb8014610612578063fee81cf414610631575f80fd5b8063ec87621c146105d8578063f04e283e146105ec575f80fd5b8063d54ad2a114610570578063db09da1214610585578063dcc21361146105a4578063dcc59b6f146105c3575f80fd5b8063a4d66daf116100e7578063a4d66daf146104ef578063bb1757cf14610504578063be4994f814610523578063c884ef8314610542575f80fd5b806354d1f13d146104b3578063715018a6146104bb57806375b238fc146104c35780638da5cb5b146104d7575f80fd5b80632de94807116101a7578063439fab91116101775780634a4ee7b11161015d5780634a4ee7b11461043f5780634e7165a214610452578063514e62fc1461047e575f80fd5b8063439fab91146103d7578063474f5a44146103f6575f80fd5b80632de948071461031757806330db555f1461034857806338d52e0f146103675780634359d28a146103b8575f80fd5b80631cd64df4116101e25780631cd64df41461028c578063228cb733146102c157806325692962146102d557806328d6183b146102dd575f80fd5b806301ffc9a71461021357806307621eca14610247578063183a4f6e146102645780631c10893f14610279575b5f80fd5b34801561021e575f80fd5b5061023261022d36600461153b565b610662565b60405190151581526020015b60405180910390f35b348015610252575f80fd5b505f545b60405190815260200161023e565b610277610272366004611581565b6106bd565b005b6102776102873660046115b9565b6106ca565b348015610297575f80fd5b506102326102a63660046115b9565b638b78c6d8600c9081525f9290925260209091205481161490565b3480156102cc575f80fd5b506102565f5481565b6102776106e0565b3480156102e8575f80fd5b506040517f9031811100000000000000000000000000000000000000000000000000000000815260200161023e565b348015610322575f80fd5b506102566103313660046115e3565b638b78c6d8600c9081525f91909152602090205490565b348015610353575f80fd5b50610277610362366004611581565b61072d565b348015610372575f80fd5b506003546103939073ffffffffffffffffffffffffffffffffffffffff1681565b60405173ffffffffffffffffffffffffffffffffffffffff909116815260200161023e565b3480156103c3575f80fd5b506102776103d2366004611646565b6107e9565b3480156103e2575f80fd5b506102776103f13660046116f0565b6108e3565b348015610401575f80fd5b506104156104103660046116f0565b610b0d565b6040805192835273ffffffffffffffffffffffffffffffffffffffff90911660208301520161023e565b61027761044d3660046115b9565b610c6f565b34801561045d575f80fd5b5061047161046c3660046116f0565b610c81565b60405161023e919061177b565b348015610489575f80fd5b506102326104983660046115b9565b638b78c6d8600c9081525f9290925260209091205416151590565b610277610d6a565b610277610da3565b3480156104ce575f80fd5b50610256600281565b3480156104e2575f80fd5b50638b78c6d81954610393565b3480156104fa575f80fd5b5061025660025481565b34801561050f575f80fd5b5061023261051e36600461178d565b610db6565b34801561052e575f80fd5b5061027761053d366004611646565b610fcb565b34801561054d575f80fd5b5061023261055c3660046115e3565b60016020525f908152604090205460ff1681565b34801561057b575f80fd5b5061025660055481565b348015610590575f80fd5b5061023261059f36600461178d565b611069565b3480156105af575f80fd5b506102776105be366004611646565b61107f565b3480156105ce575f80fd5b5061025660045481565b3480156105e3575f80fd5b50610256600181565b6102776105fa3660046115e3565b61111d565b61027761060d3660046115e3565b611157565b34801561061d575f80fd5b5061023261062c3660046115e3565b61117d565b34801561063c575f80fd5b5061025661064b3660046115e3565b63389a75e1600c9081525f91909152602090205490565b5f7fffffffff0000000000000000000000000000000000000000000000000000000082167f903181110000000000000000000000000000000000000000000000000000000014806106b757506106b7826111dc565b92915050565b6106c73382611231565b50565b6106d261123c565b6106dc8282611256565b5050565b5f6202a30067ffffffffffffffff164201905063389a75e1600c52335f52806020600c2055337fdbf36a107da19e49527a7176a1babf963b4b0ff8cde35ee35d6cd8f1f9ac7e1d5f80a250565b600161073881611262565b815f03610771576040517ff92ee8a900000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b6003546107969073ffffffffffffffffffffffffffffffffffffffff16333085611293565b8160025f8282546107a7919061180b565b909155505060408051338152602081018490527fa64c2da41decbd538f8629e54c8fa0b7362c9102b691386a0fb6a1797454e9c6910160405180910390a15050565b60026107f481611262565b83821461082d576040517fff633a3800000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b5f5b848110156108db575f84848381811061084a5761084a61181e565b905060200201602081019061085f919061184b565b90508015156001036108a15761089c8787848181106108805761088061181e565b905060200201602081019061089591906115e3565b6001611256565b6108d2565b6108d28787848181106108b6576108b661181e565b90506020020160208101906108cb91906115e3565b6001611231565b5060010161082f565b505050505050565b7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffbf60113280546003825580156109345760018160011c14303b1061092b5763f92ee8a95f526004601cfd5b818160ff1b1b91505b505f610942838501856118c0565b80516020820151604083015192935090915f81900361098d576040517ff92ee8a900000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b5f6109ae73ffffffffffffffffffffffffffffffffffffffff8516306112f5565b905081811015610a175784516040517f5c54305e00000000000000000000000000000000000000000000000000000000815273ffffffffffffffffffffffffffffffffffffffff9091166004820152602481018290526044810183905260640160405180910390fd5b600380547fffffffffffffffffffffffff00000000000000000000000000000000000000001673ffffffffffffffffffffffffffffffffffffffff86161790555f8381556002839055600555610a6c33611328565b6060850151610a7c816001611370565b604080518581526020810185905273ffffffffffffffffffffffffffffffffffffffff8716917fac711f624f923566afa4d63e74d67927870a724791c9569f0143ddea22657a0d910160405180910390a25050505050508015610b08576002815560016020527fc7f505b2f371ae2175ee4913f4499e1f2633a7b5936321eed1cdaeb6115181d2602080a15b505050565b5f806001610b1a81611262565b5f610b27858701876119dc565b90505f8160200151806020019051810190610b429190611a5b565b90508060025f828254610b559190611a72565b90915550508151600354610b829173ffffffffffffffffffffffffffffffffffffffff90911690836113b1565b81516003546040517fffffffffffffffffffffffffffffffffffffffff000000000000000000000000606092831b811660208301529183901b90911660348201526048810183905273ffffffffffffffffffffffffffffffffffffffff909116907f9ad2e7a4af16dceda9cce4274b2f59c328d8c012eb0e15eb5e1e73b7d8f264d390606801604080517fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe081840301815290829052610c409161177b565b60405180910390a260035490945073ffffffffffffffffffffffffffffffffffffffff16925050509250929050565b610c7761123c565b6106dc8282611231565b60605f80610c9184860186611a85565b9250509150604051806080016040528060016002811115610cb457610cb4611ab7565b81526020018373ffffffffffffffffffffffffffffffffffffffff1681526020013073ffffffffffffffffffffffffffffffffffffffff168152602001604051806020016040528084815250604051602001610d139151815260200190565b604080517fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0818403018152918152915251610d519190602001611ae4565b6040516020818303038152906040529250505092915050565b63389a75e1600c52335f525f6020600c2055337ffa7b8eab7da67f412cc9575ed43464468f9bfbae89d1675917346ca6d8fe3c925f80a2565b610dab61123c565b610db45f611404565b565b5f610dbf61123c565b5f610dcc83850185611b7f565b90505f8160200151806020019051810190610de79190611a5b565b90505f610df76002546005541090565b610e2d576040517f6247a84e00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b5f545f03610e3c575080610e5f565b670de0b6b3a7640000825f54610e529190611bfc565b610e5c9190611c13565b90505b60025481600554610e70919061180b565b1115610ea8576040517f360e42e100000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b8060055f828254610eb9919061180b565b92505081905550600160045f828254610ed2919061180b565b9091555050600354610efb9073ffffffffffffffffffffffffffffffffffffffff1688836113b1565b6003546040517fffffffffffffffffffffffffffffffffffffffff000000000000000000000000606092831b811660208301529189901b90911660348201526048810182905273ffffffffffffffffffffffffffffffffffffffff8816907f9ad2e7a4af16dceda9cce4274b2f59c328d8c012eb0e15eb5e1e73b7d8f264d390606801604080517fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe081840301815290829052610fb69161177b565b60405180910390a25060019695505050505050565b6002610fd681611262565b83821461100f576040517fff633a3800000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b5f5b848110156108db5761106186868381811061102e5761102e61181e565b905060200201602081019061104391906115e3565b8585848181106110555761105561181e565b90506020020135611256565b600101611011565b5f6110776002546005541090565b949350505050565b600261108a81611262565b8382146110c3576040517fff633a3800000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b5f5b848110156108db576111158686838181106110e2576110e261181e565b90506020020160208101906110f791906115e3565b8585848181106111095761110961181e565b90506020020135611231565b6001016110c5565b61112561123c565b63389a75e1600c52805f526020600c20805442111561114b57636f5e88185f526004601cfd5b5f90556106c781611404565b61115f61123c565b8060601b61117457637448fbae5f526004601cfd5b6106c781611404565b5f8173ffffffffffffffffffffffffffffffffffffffff166111a2638b78c6d8195490565b73ffffffffffffffffffffffffffffffffffffffff1614806106b75750638b78c6d8600c9081525f839052602090205460031615156106b7565b5f7fffffffff0000000000000000000000000000000000000000000000000000000082167fa92167050000000000000000000000000000000000000000000000000000000014806106b757506106b78261144e565b6106dc82825f6114e4565b638b78c6d819543314610db4576382b429005f526004601cfd5b6106dc828260016114e4565b638b78c6d8195433146106c757638b78c6d8600c52335f52806020600c2054166106c7576382b429005f526004601cfd5b60405181606052826040528360601b602c526f23b872dd000000000000000000000000600c5260205f6064601c5f895af18060015f5114166112e757803d873b1517106112e757637939f4245f526004601cfd5b505f60605260405250505050565b5f816014526f70a082310000000000000000000000005f5260208060246010865afa601f3d111660205102905092915050565b73ffffffffffffffffffffffffffffffffffffffff16638b78c6d819819055805f7f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e08180a350565b638b78c6d8600c52815f52806020600c205580600c5160601c7f715ad5ce61fc9595c7b415289d59cf203f23a94fa06f04af7e489a0a76e1fe265f80a35050565b81601452806034526fa9059cbb0000000000000000000000005f5260205f604460105f875af18060015f5114166113fa57803d853b1517106113fa576390b8ec185f526004601cfd5b505f603452505050565b638b78c6d819805473ffffffffffffffffffffffffffffffffffffffff9092169182907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e05f80a355565b5f7fffffffff0000000000000000000000000000000000000000000000000000000082167f6ab67a0d0000000000000000000000000000000000000000000000000000000014806106b757507f01ffc9a7000000000000000000000000000000000000000000000000000000007fffffffff000000000000000000000000000000000000000000000000000000008316146106b7565b638b78c6d8600c52825f526020600c20805483811783611505575080841681185b80835580600c5160601c7f715ad5ce61fc9595c7b415289d59cf203f23a94fa06f04af7e489a0a76e1fe265f80a3505050505050565b5f6020828403121561154b575f80fd5b81357fffffffff000000000000000000000000000000000000000000000000000000008116811461157a575f80fd5b9392505050565b5f60208284031215611591575f80fd5b5035919050565b73ffffffffffffffffffffffffffffffffffffffff811681146106c7575f80fd5b5f80604083850312156115ca575f80fd5b82356115d581611598565b946020939093013593505050565b5f602082840312156115f3575f80fd5b813561157a81611598565b5f8083601f84011261160e575f80fd5b50813567ffffffffffffffff811115611625575f80fd5b6020830191508360208260051b850101111561163f575f80fd5b9250929050565b5f805f8060408587031215611659575f80fd5b843567ffffffffffffffff81111561166f575f80fd5b61167b878288016115fe565b909550935050602085013567ffffffffffffffff81111561169a575f80fd5b6116a6878288016115fe565b95989497509550505050565b5f8083601f8401126116c2575f80fd5b50813567ffffffffffffffff8111156116d9575f80fd5b60208301915083602082850101111561163f575f80fd5b5f8060208385031215611701575f80fd5b823567ffffffffffffffff811115611717575f80fd5b611723858286016116b2565b90969095509350505050565b5f81518084528060208401602086015e5f6020828601015260207fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0601f83011685010191505092915050565b602081525f61157a602083018461172f565b5f805f6040848603121561179f575f80fd5b83356117aa81611598565b9250602084013567ffffffffffffffff8111156117c5575f80fd5b6117d1868287016116b2565b9497909650939450505050565b7f4e487b71000000000000000000000000000000000000000000000000000000005f52601160045260245ffd5b808201808211156106b7576106b76117de565b7f4e487b71000000000000000000000000000000000000000000000000000000005f52603260045260245ffd5b5f6020828403121561185b575f80fd5b8135801515811461157a575f80fd5b7f4e487b71000000000000000000000000000000000000000000000000000000005f52604160045260245ffd5b6040805190810167ffffffffffffffff811182821017156118ba576118ba61186a565b60405290565b5f60808284031280156118d1575f80fd5b506040516080810167ffffffffffffffff811182821017156118f5576118f561186a565b604052823561190381611598565b81526020838101359082015260408084013590820152606083013561192781611598565b60608201529392505050565b5f82601f830112611942575f80fd5b813567ffffffffffffffff81111561195c5761195c61186a565b604051601f82017fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0908116603f0116810167ffffffffffffffff811182821017156119a9576119a961186a565b6040528181528382016020018510156119c0575f80fd5b816020850160208301375f918101602001919091529392505050565b5f602082840312156119ec575f80fd5b813567ffffffffffffffff811115611a02575f80fd5b820160408185031215611a13575f80fd5b611a1b611897565b8135611a2681611598565b8152602082013567ffffffffffffffff811115611a41575f80fd5b611a4d86828501611933565b602083015250949350505050565b5f60208284031215611a6b575f80fd5b5051919050565b818103818111156106b7576106b76117de565b5f805f60608486031215611a97575f80fd5b8335611aa281611598565b95602085013595506040909401359392505050565b7f4e487b71000000000000000000000000000000000000000000000000000000005f52602160045260245ffd5b602081525f825160038110611b20577f4e487b71000000000000000000000000000000000000000000000000000000005f52602160045260245ffd5b8060208401525073ffffffffffffffffffffffffffffffffffffffff602084015116604083015273ffffffffffffffffffffffffffffffffffffffff6040840151166060830152606083015160808084015261107760a084018261172f565b5f60208284031215611b8f575f80fd5b813567ffffffffffffffff811115611ba5575f80fd5b820160408185031215611bb6575f80fd5b611bbe611897565b813567ffffffffffffffff811115611bd4575f80fd5b611be086828501611933565b825250602082013567ffffffffffffffff811115611a41575f80fd5b80820281158282048414176106b7576106b76117de565b5f82611c46577f4e487b71000000000000000000000000000000000000000000000000000000005f52601260045260245ffd5b50049056fea26469706673582212205e41329b8669298aefff890a8927080492625f551d3bee91b84e42a63b00ed0664736f6c634300081a0033",s={BASE_URL:"/",DEV:!1,MODE:"production",PROD:!0,SSR:!1,VITE_BOOST_MAINNET_SIGNER_EOA:"0xCBD0C302040bC803B4B2EDaF21Be0e49Deff5480",VITE_BOOST_TESTNET_SIGNER_EOA:"0xd63167e9db11B108940b2E8236581F961f33f396"},t=class t extends h.DeployableTarget{constructor(){super(...arguments),this.abi=a.O}async owner(f){return await a.fH(this._config,{address:this.assertValidAddress(),args:[],...f})}async totalClaimed(f){return await a.hH(this._config,{address:this.assertValidAddress(),args:[],...f})}async currentReward(f){return await a.uH(this._config,{address:this.assertValidAddress(),args:[],...f})}async claims(f){return await a.pH(this._config,{address:this.assertValidAddress(),args:[],...f})}async claimed(f,b){return await a.oH(this._config,{address:this.assertValidAddress(),args:[f],...b})}async asset(f){return await a.rH(this._config,{address:this.assertValidAddress(),...f})}async reward(f){return await a.wH(this._config,{address:this.assertValidAddress(),...f})}async limit(f){return await a.bH(this._config,{address:this.assertValidAddress(),...f})}async claim(f,b){return await this.awaitResult(this.claimRaw(f,b))}async claimRaw(f,b){const{request:e,result:d}=await a.DH(this._config,{address:this.assertValidAddress(),args:[n.prepareClaimPayload(f)],...this.optionallyAttachAccount(),...b});return{hash:await a.MH(this._config,e),result:d}}async clawback(f,b){return await this.awaitResult(this.clawbackRaw(f,b))}async clawbackRaw(f,b){const{request:e,result:d}=await a.qH(this._config,{address:this.assertValidAddress(),args:[n.prepareClaimPayload(f)],...this.optionallyAttachAccount(),...b});return{hash:await a.RH(this._config,e),result:d}}async isClaimable(f,b){return await a.mH(this._config,{address:this.assertValidAddress(),args:[f.target,f.data],...b})}async getTotalBudget(f){var b;return((b=this.payload)==null?void 0:b.limit)!==void 0?this.payload.limit:await this.limit(f)}async canBeClaimed(f){return await this.getRemainingClaimPotential(f)>0n}async getRemainingClaimPotential(f){const[b,e]=await Promise.all([this.totalClaimed(f),this.limit(f)]);return e-b}async getTopupPayload(f){return r({asset:await this.asset(),reward:f,manager:c.zeroAddress,limit:1n})}buildClaimData(f){return c.encodeAbiParameters([{type:"uint256",name:"rewardAmount"}],[f])}decodeClaimData(f){return BigInt(c.decodeAbiParameters([{type:"uint256"}],f)[0])}buildClawbackData(f){return c.encodeAbiParameters([{type:"uint256"}],[f])}buildParameters(f,b){const[e,d]=this.validateDeploymentConfig(f,b);return{abi:a.O,bytecode:m,args:[r(e)],...this.optionallyAttachAccount(d.account)}}};t.bases={...s!=null&&s.VITE_ERC20_VARIABLE_INCENTIVE_BASE?{31337:void 0}:{},...u.ERC20VariableIncentive},t.registryType=y.RegistryType.INCENTIVE;let i=t;function r({asset:l,reward:f,limit:b,manager:e}){return c.encodeAbiParameters([{type:"address",name:"asset"},{type:"uint256",name:"reward"},{type:"uint256",name:"limit"},{type:"address",name:"manager"}],[l,f,b,e])}exports.erc20VariableIncentiveAbi=a.O;exports.ERC20VariableIncentive=i;exports.prepareERC20VariableIncentivePayload=r;
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const a=require("../generated-BzLYuFx3.cjs"),c=require("viem"),u=require("../deployments-DimWVnA4.cjs"),h=require("../Deployable/DeployableTarget.cjs"),n=require("../claiming.cjs"),y=require("../utils.cjs"),g="0x6080604052348015600e575f80fd5b5060156019565b607c565b63409feecd198054600181161560365763f92ee8a95f526004601cfd5b6001600160401b03808260011c146077578060011b8355806020527fc7f505b2f371ae2175ee4913f4499e1f2633a7b5936321eed1cdaeb6115181d2602080a15b505050565b611c81806100895f395ff3fe60806040526004361061020f575f3560e01c806354d1f13d11610117578063d54ad2a1116100ac578063ec87621c1161007c578063f2fde38b11610062578063f2fde38b146105ff578063fe9fbb8014610612578063fee81cf414610631575f80fd5b8063ec87621c146105d8578063f04e283e146105ec575f80fd5b8063d54ad2a114610570578063db09da1214610585578063dcc21361146105a4578063dcc59b6f146105c3575f80fd5b8063a4d66daf116100e7578063a4d66daf146104ef578063bb1757cf14610504578063be4994f814610523578063c884ef8314610542575f80fd5b806354d1f13d146104b3578063715018a6146104bb57806375b238fc146104c35780638da5cb5b146104d7575f80fd5b80632de94807116101a7578063439fab91116101775780634a4ee7b11161015d5780634a4ee7b11461043f5780634e7165a214610452578063514e62fc1461047e575f80fd5b8063439fab91146103d7578063474f5a44146103f6575f80fd5b80632de948071461031757806330db555f1461034857806338d52e0f146103675780634359d28a146103b8575f80fd5b80631cd64df4116101e25780631cd64df41461028c578063228cb733146102c157806325692962146102d557806328d6183b146102dd575f80fd5b806301ffc9a71461021357806307621eca14610247578063183a4f6e146102645780631c10893f14610279575b5f80fd5b34801561021e575f80fd5b5061023261022d36600461153b565b610662565b60405190151581526020015b60405180910390f35b348015610252575f80fd5b505f545b60405190815260200161023e565b610277610272366004611581565b6106bd565b005b6102776102873660046115b9565b6106ca565b348015610297575f80fd5b506102326102a63660046115b9565b638b78c6d8600c9081525f9290925260209091205481161490565b3480156102cc575f80fd5b506102565f5481565b6102776106e0565b3480156102e8575f80fd5b506040517f9031811100000000000000000000000000000000000000000000000000000000815260200161023e565b348015610322575f80fd5b506102566103313660046115e3565b638b78c6d8600c9081525f91909152602090205490565b348015610353575f80fd5b50610277610362366004611581565b61072d565b348015610372575f80fd5b506003546103939073ffffffffffffffffffffffffffffffffffffffff1681565b60405173ffffffffffffffffffffffffffffffffffffffff909116815260200161023e565b3480156103c3575f80fd5b506102776103d2366004611646565b6107e9565b3480156103e2575f80fd5b506102776103f13660046116f0565b6108e3565b348015610401575f80fd5b506104156104103660046116f0565b610b0d565b6040805192835273ffffffffffffffffffffffffffffffffffffffff90911660208301520161023e565b61027761044d3660046115b9565b610c6f565b34801561045d575f80fd5b5061047161046c3660046116f0565b610c81565b60405161023e919061177b565b348015610489575f80fd5b506102326104983660046115b9565b638b78c6d8600c9081525f9290925260209091205416151590565b610277610d6a565b610277610da3565b3480156104ce575f80fd5b50610256600281565b3480156104e2575f80fd5b50638b78c6d81954610393565b3480156104fa575f80fd5b5061025660025481565b34801561050f575f80fd5b5061023261051e36600461178d565b610db6565b34801561052e575f80fd5b5061027761053d366004611646565b610fcb565b34801561054d575f80fd5b5061023261055c3660046115e3565b60016020525f908152604090205460ff1681565b34801561057b575f80fd5b5061025660055481565b348015610590575f80fd5b5061023261059f36600461178d565b611069565b3480156105af575f80fd5b506102776105be366004611646565b61107f565b3480156105ce575f80fd5b5061025660045481565b3480156105e3575f80fd5b50610256600181565b6102776105fa3660046115e3565b61111d565b61027761060d3660046115e3565b611157565b34801561061d575f80fd5b5061023261062c3660046115e3565b61117d565b34801561063c575f80fd5b5061025661064b3660046115e3565b63389a75e1600c9081525f91909152602090205490565b5f7fffffffff0000000000000000000000000000000000000000000000000000000082167f903181110000000000000000000000000000000000000000000000000000000014806106b757506106b7826111dc565b92915050565b6106c73382611231565b50565b6106d261123c565b6106dc8282611256565b5050565b5f6202a30067ffffffffffffffff164201905063389a75e1600c52335f52806020600c2055337fdbf36a107da19e49527a7176a1babf963b4b0ff8cde35ee35d6cd8f1f9ac7e1d5f80a250565b600161073881611262565b815f03610771576040517ff92ee8a900000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b6003546107969073ffffffffffffffffffffffffffffffffffffffff16333085611293565b8160025f8282546107a7919061180b565b909155505060408051338152602081018490527fa64c2da41decbd538f8629e54c8fa0b7362c9102b691386a0fb6a1797454e9c6910160405180910390a15050565b60026107f481611262565b83821461082d576040517fff633a3800000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b5f5b848110156108db575f84848381811061084a5761084a61181e565b905060200201602081019061085f919061184b565b90508015156001036108a15761089c8787848181106108805761088061181e565b905060200201602081019061089591906115e3565b6001611256565b6108d2565b6108d28787848181106108b6576108b661181e565b90506020020160208101906108cb91906115e3565b6001611231565b5060010161082f565b505050505050565b7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffbf60113280546003825580156109345760018160011c14303b1061092b5763f92ee8a95f526004601cfd5b818160ff1b1b91505b505f610942838501856118c0565b80516020820151604083015192935090915f81900361098d576040517ff92ee8a900000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b5f6109ae73ffffffffffffffffffffffffffffffffffffffff8516306112f5565b905081811015610a175784516040517f5c54305e00000000000000000000000000000000000000000000000000000000815273ffffffffffffffffffffffffffffffffffffffff9091166004820152602481018290526044810183905260640160405180910390fd5b600380547fffffffffffffffffffffffff00000000000000000000000000000000000000001673ffffffffffffffffffffffffffffffffffffffff86161790555f8381556002839055600555610a6c33611328565b6060850151610a7c816001611370565b604080518581526020810185905273ffffffffffffffffffffffffffffffffffffffff8716917fac711f624f923566afa4d63e74d67927870a724791c9569f0143ddea22657a0d910160405180910390a25050505050508015610b08576002815560016020527fc7f505b2f371ae2175ee4913f4499e1f2633a7b5936321eed1cdaeb6115181d2602080a15b505050565b5f806001610b1a81611262565b5f610b27858701876119dc565b90505f8160200151806020019051810190610b429190611a5b565b90508060025f828254610b559190611a72565b90915550508151600354610b829173ffffffffffffffffffffffffffffffffffffffff90911690836113b1565b81516003546040517fffffffffffffffffffffffffffffffffffffffff000000000000000000000000606092831b811660208301529183901b90911660348201526048810183905273ffffffffffffffffffffffffffffffffffffffff909116907f9ad2e7a4af16dceda9cce4274b2f59c328d8c012eb0e15eb5e1e73b7d8f264d390606801604080517fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe081840301815290829052610c409161177b565b60405180910390a260035490945073ffffffffffffffffffffffffffffffffffffffff16925050509250929050565b610c7761123c565b6106dc8282611231565b60605f80610c9184860186611a85565b9250509150604051806080016040528060016002811115610cb457610cb4611ab7565b81526020018373ffffffffffffffffffffffffffffffffffffffff1681526020013073ffffffffffffffffffffffffffffffffffffffff168152602001604051806020016040528084815250604051602001610d139151815260200190565b604080517fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0818403018152918152915251610d519190602001611ae4565b6040516020818303038152906040529250505092915050565b63389a75e1600c52335f525f6020600c2055337ffa7b8eab7da67f412cc9575ed43464468f9bfbae89d1675917346ca6d8fe3c925f80a2565b610dab61123c565b610db45f611404565b565b5f610dbf61123c565b5f610dcc83850185611b7f565b90505f8160200151806020019051810190610de79190611a5b565b90505f610df76002546005541090565b610e2d576040517f6247a84e00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b5f545f03610e3c575080610e5f565b670de0b6b3a7640000825f54610e529190611bfc565b610e5c9190611c13565b90505b60025481600554610e70919061180b565b1115610ea8576040517f360e42e100000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b8060055f828254610eb9919061180b565b92505081905550600160045f828254610ed2919061180b565b9091555050600354610efb9073ffffffffffffffffffffffffffffffffffffffff1688836113b1565b6003546040517fffffffffffffffffffffffffffffffffffffffff000000000000000000000000606092831b811660208301529189901b90911660348201526048810182905273ffffffffffffffffffffffffffffffffffffffff8816907f9ad2e7a4af16dceda9cce4274b2f59c328d8c012eb0e15eb5e1e73b7d8f264d390606801604080517fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe081840301815290829052610fb69161177b565b60405180910390a25060019695505050505050565b6002610fd681611262565b83821461100f576040517fff633a3800000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b5f5b848110156108db5761106186868381811061102e5761102e61181e565b905060200201602081019061104391906115e3565b8585848181106110555761105561181e565b90506020020135611256565b600101611011565b5f6110776002546005541090565b949350505050565b600261108a81611262565b8382146110c3576040517fff633a3800000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b5f5b848110156108db576111158686838181106110e2576110e261181e565b90506020020160208101906110f791906115e3565b8585848181106111095761110961181e565b90506020020135611231565b6001016110c5565b61112561123c565b63389a75e1600c52805f526020600c20805442111561114b57636f5e88185f526004601cfd5b5f90556106c781611404565b61115f61123c565b8060601b61117457637448fbae5f526004601cfd5b6106c781611404565b5f8173ffffffffffffffffffffffffffffffffffffffff166111a2638b78c6d8195490565b73ffffffffffffffffffffffffffffffffffffffff1614806106b75750638b78c6d8600c9081525f839052602090205460031615156106b7565b5f7fffffffff0000000000000000000000000000000000000000000000000000000082167fa92167050000000000000000000000000000000000000000000000000000000014806106b757506106b78261144e565b6106dc82825f6114e4565b638b78c6d819543314610db4576382b429005f526004601cfd5b6106dc828260016114e4565b638b78c6d8195433146106c757638b78c6d8600c52335f52806020600c2054166106c7576382b429005f526004601cfd5b60405181606052826040528360601b602c526f23b872dd000000000000000000000000600c5260205f6064601c5f895af18060015f5114166112e757803d873b1517106112e757637939f4245f526004601cfd5b505f60605260405250505050565b5f816014526f70a082310000000000000000000000005f5260208060246010865afa601f3d111660205102905092915050565b73ffffffffffffffffffffffffffffffffffffffff16638b78c6d819819055805f7f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e08180a350565b638b78c6d8600c52815f52806020600c205580600c5160601c7f715ad5ce61fc9595c7b415289d59cf203f23a94fa06f04af7e489a0a76e1fe265f80a35050565b81601452806034526fa9059cbb0000000000000000000000005f5260205f604460105f875af18060015f5114166113fa57803d853b1517106113fa576390b8ec185f526004601cfd5b505f603452505050565b638b78c6d819805473ffffffffffffffffffffffffffffffffffffffff9092169182907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e05f80a355565b5f7fffffffff0000000000000000000000000000000000000000000000000000000082167f6ab67a0d0000000000000000000000000000000000000000000000000000000014806106b757507f01ffc9a7000000000000000000000000000000000000000000000000000000007fffffffff000000000000000000000000000000000000000000000000000000008316146106b7565b638b78c6d8600c52825f526020600c20805483811783611505575080841681185b80835580600c5160601c7f715ad5ce61fc9595c7b415289d59cf203f23a94fa06f04af7e489a0a76e1fe265f80a3505050505050565b5f6020828403121561154b575f80fd5b81357fffffffff000000000000000000000000000000000000000000000000000000008116811461157a575f80fd5b9392505050565b5f60208284031215611591575f80fd5b5035919050565b73ffffffffffffffffffffffffffffffffffffffff811681146106c7575f80fd5b5f80604083850312156115ca575f80fd5b82356115d581611598565b946020939093013593505050565b5f602082840312156115f3575f80fd5b813561157a81611598565b5f8083601f84011261160e575f80fd5b50813567ffffffffffffffff811115611625575f80fd5b6020830191508360208260051b850101111561163f575f80fd5b9250929050565b5f805f8060408587031215611659575f80fd5b843567ffffffffffffffff81111561166f575f80fd5b61167b878288016115fe565b909550935050602085013567ffffffffffffffff81111561169a575f80fd5b6116a6878288016115fe565b95989497509550505050565b5f8083601f8401126116c2575f80fd5b50813567ffffffffffffffff8111156116d9575f80fd5b60208301915083602082850101111561163f575f80fd5b5f8060208385031215611701575f80fd5b823567ffffffffffffffff811115611717575f80fd5b611723858286016116b2565b90969095509350505050565b5f81518084528060208401602086015e5f6020828601015260207fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0601f83011685010191505092915050565b602081525f61157a602083018461172f565b5f805f6040848603121561179f575f80fd5b83356117aa81611598565b9250602084013567ffffffffffffffff8111156117c5575f80fd5b6117d1868287016116b2565b9497909650939450505050565b7f4e487b71000000000000000000000000000000000000000000000000000000005f52601160045260245ffd5b808201808211156106b7576106b76117de565b7f4e487b71000000000000000000000000000000000000000000000000000000005f52603260045260245ffd5b5f6020828403121561185b575f80fd5b8135801515811461157a575f80fd5b7f4e487b71000000000000000000000000000000000000000000000000000000005f52604160045260245ffd5b6040805190810167ffffffffffffffff811182821017156118ba576118ba61186a565b60405290565b5f60808284031280156118d1575f80fd5b506040516080810167ffffffffffffffff811182821017156118f5576118f561186a565b604052823561190381611598565b81526020838101359082015260408084013590820152606083013561192781611598565b60608201529392505050565b5f82601f830112611942575f80fd5b813567ffffffffffffffff81111561195c5761195c61186a565b604051601f82017fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0908116603f0116810167ffffffffffffffff811182821017156119a9576119a961186a565b6040528181528382016020018510156119c0575f80fd5b816020850160208301375f918101602001919091529392505050565b5f602082840312156119ec575f80fd5b813567ffffffffffffffff811115611a02575f80fd5b820160408185031215611a13575f80fd5b611a1b611897565b8135611a2681611598565b8152602082013567ffffffffffffffff811115611a41575f80fd5b611a4d86828501611933565b602083015250949350505050565b5f60208284031215611a6b575f80fd5b5051919050565b818103818111156106b7576106b76117de565b5f805f60608486031215611a97575f80fd5b8335611aa281611598565b95602085013595506040909401359392505050565b7f4e487b71000000000000000000000000000000000000000000000000000000005f52602160045260245ffd5b602081525f825160038110611b20577f4e487b71000000000000000000000000000000000000000000000000000000005f52602160045260245ffd5b8060208401525073ffffffffffffffffffffffffffffffffffffffff602084015116604083015273ffffffffffffffffffffffffffffffffffffffff6040840151166060830152606083015160808084015261107760a084018261172f565b5f60208284031215611b8f575f80fd5b813567ffffffffffffffff811115611ba5575f80fd5b820160408185031215611bb6575f80fd5b611bbe611897565b813567ffffffffffffffff811115611bd4575f80fd5b611be086828501611933565b825250602082013567ffffffffffffffff811115611a41575f80fd5b80820281158282048414176106b7576106b76117de565b5f82611c46577f4e487b71000000000000000000000000000000000000000000000000000000005f52601260045260245ffd5b50049056fea264697066735822122010e92bb170bbded5a39d9e31e19c0f4d00c38e9b3db120b41bfca6a48a497d3364736f6c634300081a0033",s={BASE_URL:"/",DEV:!1,MODE:"production",PROD:!0,SSR:!1,VITE_BOOST_MAINNET_SIGNER_EOA:"0xCBD0C302040bC803B4B2EDaF21Be0e49Deff5480",VITE_BOOST_TESTNET_SIGNER_EOA:"0xd63167e9db11B108940b2E8236581F961f33f396"},t=class t extends h.DeployableTarget{constructor(){super(...arguments),this.abi=a.O}async owner(f){return await a.OH(this._config,{address:this.assertValidAddress(),args:[],...f})}async totalClaimed(f){return await a.HH(this._config,{address:this.assertValidAddress(),args:[],...f})}async currentReward(f){return await a.gH(this._config,{address:this.assertValidAddress(),args:[],...f})}async claims(f){return await a.wH(this._config,{address:this.assertValidAddress(),args:[],...f})}async claimed(f,b){return await a.TH(this._config,{address:this.assertValidAddress(),args:[f],...b})}async asset(f){return await a.vH(this._config,{address:this.assertValidAddress(),...f})}async reward(f){return await a.VH(this._config,{address:this.assertValidAddress(),...f})}async limit(f){return await a.RH(this._config,{address:this.assertValidAddress(),...f})}async claim(f,b){return await this.awaitResult(this.claimRaw(f,b))}async claimRaw(f,b){const{request:e,result:d}=await a.XH(this._config,{address:this.assertValidAddress(),args:[n.prepareClaimPayload(f)],...this.optionallyAttachAccount(),...b});return{hash:await a.LH(this._config,e),result:d}}async clawback(f,b){return await this.awaitResult(this.clawbackRaw(f,b))}async clawbackRaw(f,b){const{request:e,result:d}=await a.YH(this._config,{address:this.assertValidAddress(),args:[n.prepareClaimPayload(f)],...this.optionallyAttachAccount(),...b});return{hash:await a.SH(this._config,e),result:d}}async isClaimable(f,b){return await a.MH(this._config,{address:this.assertValidAddress(),args:[f.target,f.data],...b})}async getTotalBudget(f){var b;return((b=this.payload)==null?void 0:b.limit)!==void 0?this.payload.limit:await this.limit(f)}async canBeClaimed(f){return await this.getRemainingClaimPotential(f)>0n}async getRemainingClaimPotential(f){const[b,e]=await Promise.all([this.totalClaimed(f),this.limit(f)]);return e-b}async getTopupPayload(f){return r({asset:await this.asset(),reward:f,manager:c.zeroAddress,limit:1n})}buildClaimData(f){return c.encodeAbiParameters([{type:"uint256",name:"rewardAmount"}],[f])}decodeClaimData(f){return BigInt(c.decodeAbiParameters([{type:"uint256"}],f)[0])}buildClawbackData(f){return c.encodeAbiParameters([{type:"uint256"}],[f])}buildParameters(f,b){const[e,d]=this.validateDeploymentConfig(f,b);return{abi:a.O,bytecode:g,args:[r(e)],...this.optionallyAttachAccount(d.account)}}};t.bases={...s!=null&&s.VITE_ERC20_VARIABLE_INCENTIVE_BASE?{31337:void 0}:{},...u.ERC20VariableIncentive},t.registryType=y.RegistryType.INCENTIVE;let i=t;function r({asset:l,reward:f,limit:b,manager:e}){return c.encodeAbiParameters([{type:"address",name:"asset"},{type:"uint256",name:"reward"},{type:"uint256",name:"limit"},{type:"address",name:"manager"}],[l,f,b,e])}exports.erc20VariableIncentiveAbi=a.O;exports.ERC20VariableIncentive=i;exports.prepareERC20VariableIncentivePayload=r;
|
|
2
2
|
//# sourceMappingURL=ERC20VariableIncentive.cjs.map
|
|
@@ -1,10 +1,10 @@
|
|
|
1
|
-
import { O as t, b8 as h, b9 as u, ba as m, bb as g, bc as y, bd as w, be as p, bf as A, bg as E, bh as V, bi as C, bj as R, bk as
|
|
2
|
-
import { zeroAddress as
|
|
3
|
-
import { d as
|
|
4
|
-
import { DeployableTarget as
|
|
1
|
+
import { O as t, b8 as h, b9 as u, ba as m, bb as g, bc as y, bd as w, be as p, bf as A, bg as E, bh as V, bi as C, bj as R, bk as T } from "../generated-D6oDILUw.js";
|
|
2
|
+
import { zeroAddress as _, encodeAbiParameters as s, decodeAbiParameters as H } from "viem";
|
|
3
|
+
import { d as B } from "../deployments-Dw5Suk_D.js";
|
|
4
|
+
import { DeployableTarget as I } from "../Deployable/DeployableTarget.js";
|
|
5
5
|
import { prepareClaimPayload as i } from "../claiming.js";
|
|
6
|
-
import { RegistryType as
|
|
7
|
-
const P = "0x6080604052348015600e575f80fd5b5060156019565b607c565b63409feecd198054600181161560365763f92ee8a95f526004601cfd5b6001600160401b03808260011c146077578060011b8355806020527fc7f505b2f371ae2175ee4913f4499e1f2633a7b5936321eed1cdaeb6115181d2602080a15b505050565b611c81806100895f395ff3fe60806040526004361061020f575f3560e01c806354d1f13d11610117578063d54ad2a1116100ac578063ec87621c1161007c578063f2fde38b11610062578063f2fde38b146105ff578063fe9fbb8014610612578063fee81cf414610631575f80fd5b8063ec87621c146105d8578063f04e283e146105ec575f80fd5b8063d54ad2a114610570578063db09da1214610585578063dcc21361146105a4578063dcc59b6f146105c3575f80fd5b8063a4d66daf116100e7578063a4d66daf146104ef578063bb1757cf14610504578063be4994f814610523578063c884ef8314610542575f80fd5b806354d1f13d146104b3578063715018a6146104bb57806375b238fc146104c35780638da5cb5b146104d7575f80fd5b80632de94807116101a7578063439fab91116101775780634a4ee7b11161015d5780634a4ee7b11461043f5780634e7165a214610452578063514e62fc1461047e575f80fd5b8063439fab91146103d7578063474f5a44146103f6575f80fd5b80632de948071461031757806330db555f1461034857806338d52e0f146103675780634359d28a146103b8575f80fd5b80631cd64df4116101e25780631cd64df41461028c578063228cb733146102c157806325692962146102d557806328d6183b146102dd575f80fd5b806301ffc9a71461021357806307621eca14610247578063183a4f6e146102645780631c10893f14610279575b5f80fd5b34801561021e575f80fd5b5061023261022d36600461153b565b610662565b60405190151581526020015b60405180910390f35b348015610252575f80fd5b505f545b60405190815260200161023e565b610277610272366004611581565b6106bd565b005b6102776102873660046115b9565b6106ca565b348015610297575f80fd5b506102326102a63660046115b9565b638b78c6d8600c9081525f9290925260209091205481161490565b3480156102cc575f80fd5b506102565f5481565b6102776106e0565b3480156102e8575f80fd5b506040517f9031811100000000000000000000000000000000000000000000000000000000815260200161023e565b348015610322575f80fd5b506102566103313660046115e3565b638b78c6d8600c9081525f91909152602090205490565b348015610353575f80fd5b50610277610362366004611581565b61072d565b348015610372575f80fd5b506003546103939073ffffffffffffffffffffffffffffffffffffffff1681565b60405173ffffffffffffffffffffffffffffffffffffffff909116815260200161023e565b3480156103c3575f80fd5b506102776103d2366004611646565b6107e9565b3480156103e2575f80fd5b506102776103f13660046116f0565b6108e3565b348015610401575f80fd5b506104156104103660046116f0565b610b0d565b6040805192835273ffffffffffffffffffffffffffffffffffffffff90911660208301520161023e565b61027761044d3660046115b9565b610c6f565b34801561045d575f80fd5b5061047161046c3660046116f0565b610c81565b60405161023e919061177b565b348015610489575f80fd5b506102326104983660046115b9565b638b78c6d8600c9081525f9290925260209091205416151590565b610277610d6a565b610277610da3565b3480156104ce575f80fd5b50610256600281565b3480156104e2575f80fd5b50638b78c6d81954610393565b3480156104fa575f80fd5b5061025660025481565b34801561050f575f80fd5b5061023261051e36600461178d565b610db6565b34801561052e575f80fd5b5061027761053d366004611646565b610fcb565b34801561054d575f80fd5b5061023261055c3660046115e3565b60016020525f908152604090205460ff1681565b34801561057b575f80fd5b5061025660055481565b348015610590575f80fd5b5061023261059f36600461178d565b611069565b3480156105af575f80fd5b506102776105be366004611646565b61107f565b3480156105ce575f80fd5b5061025660045481565b3480156105e3575f80fd5b50610256600181565b6102776105fa3660046115e3565b61111d565b61027761060d3660046115e3565b611157565b34801561061d575f80fd5b5061023261062c3660046115e3565b61117d565b34801561063c575f80fd5b5061025661064b3660046115e3565b63389a75e1600c9081525f91909152602090205490565b5f7fffffffff0000000000000000000000000000000000000000000000000000000082167f903181110000000000000000000000000000000000000000000000000000000014806106b757506106b7826111dc565b92915050565b6106c73382611231565b50565b6106d261123c565b6106dc8282611256565b5050565b5f6202a30067ffffffffffffffff164201905063389a75e1600c52335f52806020600c2055337fdbf36a107da19e49527a7176a1babf963b4b0ff8cde35ee35d6cd8f1f9ac7e1d5f80a250565b600161073881611262565b815f03610771576040517ff92ee8a900000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b6003546107969073ffffffffffffffffffffffffffffffffffffffff16333085611293565b8160025f8282546107a7919061180b565b909155505060408051338152602081018490527fa64c2da41decbd538f8629e54c8fa0b7362c9102b691386a0fb6a1797454e9c6910160405180910390a15050565b60026107f481611262565b83821461082d576040517fff633a3800000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b5f5b848110156108db575f84848381811061084a5761084a61181e565b905060200201602081019061085f919061184b565b90508015156001036108a15761089c8787848181106108805761088061181e565b905060200201602081019061089591906115e3565b6001611256565b6108d2565b6108d28787848181106108b6576108b661181e565b90506020020160208101906108cb91906115e3565b6001611231565b5060010161082f565b505050505050565b7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffbf60113280546003825580156109345760018160011c14303b1061092b5763f92ee8a95f526004601cfd5b818160ff1b1b91505b505f610942838501856118c0565b80516020820151604083015192935090915f81900361098d576040517ff92ee8a900000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b5f6109ae73ffffffffffffffffffffffffffffffffffffffff8516306112f5565b905081811015610a175784516040517f5c54305e00000000000000000000000000000000000000000000000000000000815273ffffffffffffffffffffffffffffffffffffffff9091166004820152602481018290526044810183905260640160405180910390fd5b600380547fffffffffffffffffffffffff00000000000000000000000000000000000000001673ffffffffffffffffffffffffffffffffffffffff86161790555f8381556002839055600555610a6c33611328565b6060850151610a7c816001611370565b604080518581526020810185905273ffffffffffffffffffffffffffffffffffffffff8716917fac711f624f923566afa4d63e74d67927870a724791c9569f0143ddea22657a0d910160405180910390a25050505050508015610b08576002815560016020527fc7f505b2f371ae2175ee4913f4499e1f2633a7b5936321eed1cdaeb6115181d2602080a15b505050565b5f806001610b1a81611262565b5f610b27858701876119dc565b90505f8160200151806020019051810190610b429190611a5b565b90508060025f828254610b559190611a72565b90915550508151600354610b829173ffffffffffffffffffffffffffffffffffffffff90911690836113b1565b81516003546040517fffffffffffffffffffffffffffffffffffffffff000000000000000000000000606092831b811660208301529183901b90911660348201526048810183905273ffffffffffffffffffffffffffffffffffffffff909116907f9ad2e7a4af16dceda9cce4274b2f59c328d8c012eb0e15eb5e1e73b7d8f264d390606801604080517fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe081840301815290829052610c409161177b565b60405180910390a260035490945073ffffffffffffffffffffffffffffffffffffffff16925050509250929050565b610c7761123c565b6106dc8282611231565b60605f80610c9184860186611a85565b9250509150604051806080016040528060016002811115610cb457610cb4611ab7565b81526020018373ffffffffffffffffffffffffffffffffffffffff1681526020013073ffffffffffffffffffffffffffffffffffffffff168152602001604051806020016040528084815250604051602001610d139151815260200190565b604080517fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0818403018152918152915251610d519190602001611ae4565b6040516020818303038152906040529250505092915050565b63389a75e1600c52335f525f6020600c2055337ffa7b8eab7da67f412cc9575ed43464468f9bfbae89d1675917346ca6d8fe3c925f80a2565b610dab61123c565b610db45f611404565b565b5f610dbf61123c565b5f610dcc83850185611b7f565b90505f8160200151806020019051810190610de79190611a5b565b90505f610df76002546005541090565b610e2d576040517f6247a84e00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b5f545f03610e3c575080610e5f565b670de0b6b3a7640000825f54610e529190611bfc565b610e5c9190611c13565b90505b60025481600554610e70919061180b565b1115610ea8576040517f360e42e100000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b8060055f828254610eb9919061180b565b92505081905550600160045f828254610ed2919061180b565b9091555050600354610efb9073ffffffffffffffffffffffffffffffffffffffff1688836113b1565b6003546040517fffffffffffffffffffffffffffffffffffffffff000000000000000000000000606092831b811660208301529189901b90911660348201526048810182905273ffffffffffffffffffffffffffffffffffffffff8816907f9ad2e7a4af16dceda9cce4274b2f59c328d8c012eb0e15eb5e1e73b7d8f264d390606801604080517fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe081840301815290829052610fb69161177b565b60405180910390a25060019695505050505050565b6002610fd681611262565b83821461100f576040517fff633a3800000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b5f5b848110156108db5761106186868381811061102e5761102e61181e565b905060200201602081019061104391906115e3565b8585848181106110555761105561181e565b90506020020135611256565b600101611011565b5f6110776002546005541090565b949350505050565b600261108a81611262565b8382146110c3576040517fff633a3800000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b5f5b848110156108db576111158686838181106110e2576110e261181e565b90506020020160208101906110f791906115e3565b8585848181106111095761110961181e565b90506020020135611231565b6001016110c5565b61112561123c565b63389a75e1600c52805f526020600c20805442111561114b57636f5e88185f526004601cfd5b5f90556106c781611404565b61115f61123c565b8060601b61117457637448fbae5f526004601cfd5b6106c781611404565b5f8173ffffffffffffffffffffffffffffffffffffffff166111a2638b78c6d8195490565b73ffffffffffffffffffffffffffffffffffffffff1614806106b75750638b78c6d8600c9081525f839052602090205460031615156106b7565b5f7fffffffff0000000000000000000000000000000000000000000000000000000082167fa92167050000000000000000000000000000000000000000000000000000000014806106b757506106b78261144e565b6106dc82825f6114e4565b638b78c6d819543314610db4576382b429005f526004601cfd5b6106dc828260016114e4565b638b78c6d8195433146106c757638b78c6d8600c52335f52806020600c2054166106c7576382b429005f526004601cfd5b60405181606052826040528360601b602c526f23b872dd000000000000000000000000600c5260205f6064601c5f895af18060015f5114166112e757803d873b1517106112e757637939f4245f526004601cfd5b505f60605260405250505050565b5f816014526f70a082310000000000000000000000005f5260208060246010865afa601f3d111660205102905092915050565b73ffffffffffffffffffffffffffffffffffffffff16638b78c6d819819055805f7f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e08180a350565b638b78c6d8600c52815f52806020600c205580600c5160601c7f715ad5ce61fc9595c7b415289d59cf203f23a94fa06f04af7e489a0a76e1fe265f80a35050565b81601452806034526fa9059cbb0000000000000000000000005f5260205f604460105f875af18060015f5114166113fa57803d853b1517106113fa576390b8ec185f526004601cfd5b505f603452505050565b638b78c6d819805473ffffffffffffffffffffffffffffffffffffffff9092169182907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e05f80a355565b5f7fffffffff0000000000000000000000000000000000000000000000000000000082167f6ab67a0d0000000000000000000000000000000000000000000000000000000014806106b757507f01ffc9a7000000000000000000000000000000000000000000000000000000007fffffffff000000000000000000000000000000000000000000000000000000008316146106b7565b638b78c6d8600c52825f526020600c20805483811783611505575080841681185b80835580600c5160601c7f715ad5ce61fc9595c7b415289d59cf203f23a94fa06f04af7e489a0a76e1fe265f80a3505050505050565b5f6020828403121561154b575f80fd5b81357fffffffff000000000000000000000000000000000000000000000000000000008116811461157a575f80fd5b9392505050565b5f60208284031215611591575f80fd5b5035919050565b73ffffffffffffffffffffffffffffffffffffffff811681146106c7575f80fd5b5f80604083850312156115ca575f80fd5b82356115d581611598565b946020939093013593505050565b5f602082840312156115f3575f80fd5b813561157a81611598565b5f8083601f84011261160e575f80fd5b50813567ffffffffffffffff811115611625575f80fd5b6020830191508360208260051b850101111561163f575f80fd5b9250929050565b5f805f8060408587031215611659575f80fd5b843567ffffffffffffffff81111561166f575f80fd5b61167b878288016115fe565b909550935050602085013567ffffffffffffffff81111561169a575f80fd5b6116a6878288016115fe565b95989497509550505050565b5f8083601f8401126116c2575f80fd5b50813567ffffffffffffffff8111156116d9575f80fd5b60208301915083602082850101111561163f575f80fd5b5f8060208385031215611701575f80fd5b823567ffffffffffffffff811115611717575f80fd5b611723858286016116b2565b90969095509350505050565b5f81518084528060208401602086015e5f6020828601015260207fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0601f83011685010191505092915050565b602081525f61157a602083018461172f565b5f805f6040848603121561179f575f80fd5b83356117aa81611598565b9250602084013567ffffffffffffffff8111156117c5575f80fd5b6117d1868287016116b2565b9497909650939450505050565b7f4e487b71000000000000000000000000000000000000000000000000000000005f52601160045260245ffd5b808201808211156106b7576106b76117de565b7f4e487b71000000000000000000000000000000000000000000000000000000005f52603260045260245ffd5b5f6020828403121561185b575f80fd5b8135801515811461157a575f80fd5b7f4e487b71000000000000000000000000000000000000000000000000000000005f52604160045260245ffd5b6040805190810167ffffffffffffffff811182821017156118ba576118ba61186a565b60405290565b5f60808284031280156118d1575f80fd5b506040516080810167ffffffffffffffff811182821017156118f5576118f561186a565b604052823561190381611598565b81526020838101359082015260408084013590820152606083013561192781611598565b60608201529392505050565b5f82601f830112611942575f80fd5b813567ffffffffffffffff81111561195c5761195c61186a565b604051601f82017fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0908116603f0116810167ffffffffffffffff811182821017156119a9576119a961186a565b6040528181528382016020018510156119c0575f80fd5b816020850160208301375f918101602001919091529392505050565b5f602082840312156119ec575f80fd5b813567ffffffffffffffff811115611a02575f80fd5b820160408185031215611a13575f80fd5b611a1b611897565b8135611a2681611598565b8152602082013567ffffffffffffffff811115611a41575f80fd5b611a4d86828501611933565b602083015250949350505050565b5f60208284031215611a6b575f80fd5b5051919050565b818103818111156106b7576106b76117de565b5f805f60608486031215611a97575f80fd5b8335611aa281611598565b95602085013595506040909401359392505050565b7f4e487b71000000000000000000000000000000000000000000000000000000005f52602160045260245ffd5b602081525f825160038110611b20577f4e487b71000000000000000000000000000000000000000000000000000000005f52602160045260245ffd5b8060208401525073ffffffffffffffffffffffffffffffffffffffff602084015116604083015273ffffffffffffffffffffffffffffffffffffffff6040840151166060830152606083015160808084015261107760a084018261172f565b5f60208284031215611b8f575f80fd5b813567ffffffffffffffff811115611ba5575f80fd5b820160408185031215611bb6575f80fd5b611bbe611897565b813567ffffffffffffffff811115611bd4575f80fd5b611be086828501611933565b825250602082013567ffffffffffffffff811115611a41575f80fd5b80820281158282048414176106b7576106b76117de565b5f82611c46577f4e487b71000000000000000000000000000000000000000000000000000000005f52601260045260245ffd5b50049056fea26469706673582212205e41329b8669298aefff890a8927080492625f551d3bee91b84e42a63b00ed0664736f6c634300081a0033", c = { BASE_URL: "/", DEV: !1, MODE: "production", PROD: !0, SSR: !1, VITE_BOOST_MAINNET_SIGNER_EOA: "0xCBD0C302040bC803B4B2EDaF21Be0e49Deff5480", VITE_BOOST_TESTNET_SIGNER_EOA: "0xd63167e9db11B108940b2E8236581F961f33f396" }, e = class e extends D {
|
|
6
|
+
import { RegistryType as D } from "../utils.js";
|
|
7
|
+
const O = "0x6080604052348015600e575f80fd5b5060156019565b607c565b63409feecd198054600181161560365763f92ee8a95f526004601cfd5b6001600160401b03808260011c146077578060011b8355806020527fc7f505b2f371ae2175ee4913f4499e1f2633a7b5936321eed1cdaeb6115181d2602080a15b505050565b611c81806100895f395ff3fe60806040526004361061020f575f3560e01c806354d1f13d11610117578063d54ad2a1116100ac578063ec87621c1161007c578063f2fde38b11610062578063f2fde38b146105ff578063fe9fbb8014610612578063fee81cf414610631575f80fd5b8063ec87621c146105d8578063f04e283e146105ec575f80fd5b8063d54ad2a114610570578063db09da1214610585578063dcc21361146105a4578063dcc59b6f146105c3575f80fd5b8063a4d66daf116100e7578063a4d66daf146104ef578063bb1757cf14610504578063be4994f814610523578063c884ef8314610542575f80fd5b806354d1f13d146104b3578063715018a6146104bb57806375b238fc146104c35780638da5cb5b146104d7575f80fd5b80632de94807116101a7578063439fab91116101775780634a4ee7b11161015d5780634a4ee7b11461043f5780634e7165a214610452578063514e62fc1461047e575f80fd5b8063439fab91146103d7578063474f5a44146103f6575f80fd5b80632de948071461031757806330db555f1461034857806338d52e0f146103675780634359d28a146103b8575f80fd5b80631cd64df4116101e25780631cd64df41461028c578063228cb733146102c157806325692962146102d557806328d6183b146102dd575f80fd5b806301ffc9a71461021357806307621eca14610247578063183a4f6e146102645780631c10893f14610279575b5f80fd5b34801561021e575f80fd5b5061023261022d36600461153b565b610662565b60405190151581526020015b60405180910390f35b348015610252575f80fd5b505f545b60405190815260200161023e565b610277610272366004611581565b6106bd565b005b6102776102873660046115b9565b6106ca565b348015610297575f80fd5b506102326102a63660046115b9565b638b78c6d8600c9081525f9290925260209091205481161490565b3480156102cc575f80fd5b506102565f5481565b6102776106e0565b3480156102e8575f80fd5b506040517f9031811100000000000000000000000000000000000000000000000000000000815260200161023e565b348015610322575f80fd5b506102566103313660046115e3565b638b78c6d8600c9081525f91909152602090205490565b348015610353575f80fd5b50610277610362366004611581565b61072d565b348015610372575f80fd5b506003546103939073ffffffffffffffffffffffffffffffffffffffff1681565b60405173ffffffffffffffffffffffffffffffffffffffff909116815260200161023e565b3480156103c3575f80fd5b506102776103d2366004611646565b6107e9565b3480156103e2575f80fd5b506102776103f13660046116f0565b6108e3565b348015610401575f80fd5b506104156104103660046116f0565b610b0d565b6040805192835273ffffffffffffffffffffffffffffffffffffffff90911660208301520161023e565b61027761044d3660046115b9565b610c6f565b34801561045d575f80fd5b5061047161046c3660046116f0565b610c81565b60405161023e919061177b565b348015610489575f80fd5b506102326104983660046115b9565b638b78c6d8600c9081525f9290925260209091205416151590565b610277610d6a565b610277610da3565b3480156104ce575f80fd5b50610256600281565b3480156104e2575f80fd5b50638b78c6d81954610393565b3480156104fa575f80fd5b5061025660025481565b34801561050f575f80fd5b5061023261051e36600461178d565b610db6565b34801561052e575f80fd5b5061027761053d366004611646565b610fcb565b34801561054d575f80fd5b5061023261055c3660046115e3565b60016020525f908152604090205460ff1681565b34801561057b575f80fd5b5061025660055481565b348015610590575f80fd5b5061023261059f36600461178d565b611069565b3480156105af575f80fd5b506102776105be366004611646565b61107f565b3480156105ce575f80fd5b5061025660045481565b3480156105e3575f80fd5b50610256600181565b6102776105fa3660046115e3565b61111d565b61027761060d3660046115e3565b611157565b34801561061d575f80fd5b5061023261062c3660046115e3565b61117d565b34801561063c575f80fd5b5061025661064b3660046115e3565b63389a75e1600c9081525f91909152602090205490565b5f7fffffffff0000000000000000000000000000000000000000000000000000000082167f903181110000000000000000000000000000000000000000000000000000000014806106b757506106b7826111dc565b92915050565b6106c73382611231565b50565b6106d261123c565b6106dc8282611256565b5050565b5f6202a30067ffffffffffffffff164201905063389a75e1600c52335f52806020600c2055337fdbf36a107da19e49527a7176a1babf963b4b0ff8cde35ee35d6cd8f1f9ac7e1d5f80a250565b600161073881611262565b815f03610771576040517ff92ee8a900000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b6003546107969073ffffffffffffffffffffffffffffffffffffffff16333085611293565b8160025f8282546107a7919061180b565b909155505060408051338152602081018490527fa64c2da41decbd538f8629e54c8fa0b7362c9102b691386a0fb6a1797454e9c6910160405180910390a15050565b60026107f481611262565b83821461082d576040517fff633a3800000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b5f5b848110156108db575f84848381811061084a5761084a61181e565b905060200201602081019061085f919061184b565b90508015156001036108a15761089c8787848181106108805761088061181e565b905060200201602081019061089591906115e3565b6001611256565b6108d2565b6108d28787848181106108b6576108b661181e565b90506020020160208101906108cb91906115e3565b6001611231565b5060010161082f565b505050505050565b7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffbf60113280546003825580156109345760018160011c14303b1061092b5763f92ee8a95f526004601cfd5b818160ff1b1b91505b505f610942838501856118c0565b80516020820151604083015192935090915f81900361098d576040517ff92ee8a900000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b5f6109ae73ffffffffffffffffffffffffffffffffffffffff8516306112f5565b905081811015610a175784516040517f5c54305e00000000000000000000000000000000000000000000000000000000815273ffffffffffffffffffffffffffffffffffffffff9091166004820152602481018290526044810183905260640160405180910390fd5b600380547fffffffffffffffffffffffff00000000000000000000000000000000000000001673ffffffffffffffffffffffffffffffffffffffff86161790555f8381556002839055600555610a6c33611328565b6060850151610a7c816001611370565b604080518581526020810185905273ffffffffffffffffffffffffffffffffffffffff8716917fac711f624f923566afa4d63e74d67927870a724791c9569f0143ddea22657a0d910160405180910390a25050505050508015610b08576002815560016020527fc7f505b2f371ae2175ee4913f4499e1f2633a7b5936321eed1cdaeb6115181d2602080a15b505050565b5f806001610b1a81611262565b5f610b27858701876119dc565b90505f8160200151806020019051810190610b429190611a5b565b90508060025f828254610b559190611a72565b90915550508151600354610b829173ffffffffffffffffffffffffffffffffffffffff90911690836113b1565b81516003546040517fffffffffffffffffffffffffffffffffffffffff000000000000000000000000606092831b811660208301529183901b90911660348201526048810183905273ffffffffffffffffffffffffffffffffffffffff909116907f9ad2e7a4af16dceda9cce4274b2f59c328d8c012eb0e15eb5e1e73b7d8f264d390606801604080517fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe081840301815290829052610c409161177b565b60405180910390a260035490945073ffffffffffffffffffffffffffffffffffffffff16925050509250929050565b610c7761123c565b6106dc8282611231565b60605f80610c9184860186611a85565b9250509150604051806080016040528060016002811115610cb457610cb4611ab7565b81526020018373ffffffffffffffffffffffffffffffffffffffff1681526020013073ffffffffffffffffffffffffffffffffffffffff168152602001604051806020016040528084815250604051602001610d139151815260200190565b604080517fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0818403018152918152915251610d519190602001611ae4565b6040516020818303038152906040529250505092915050565b63389a75e1600c52335f525f6020600c2055337ffa7b8eab7da67f412cc9575ed43464468f9bfbae89d1675917346ca6d8fe3c925f80a2565b610dab61123c565b610db45f611404565b565b5f610dbf61123c565b5f610dcc83850185611b7f565b90505f8160200151806020019051810190610de79190611a5b565b90505f610df76002546005541090565b610e2d576040517f6247a84e00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b5f545f03610e3c575080610e5f565b670de0b6b3a7640000825f54610e529190611bfc565b610e5c9190611c13565b90505b60025481600554610e70919061180b565b1115610ea8576040517f360e42e100000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b8060055f828254610eb9919061180b565b92505081905550600160045f828254610ed2919061180b565b9091555050600354610efb9073ffffffffffffffffffffffffffffffffffffffff1688836113b1565b6003546040517fffffffffffffffffffffffffffffffffffffffff000000000000000000000000606092831b811660208301529189901b90911660348201526048810182905273ffffffffffffffffffffffffffffffffffffffff8816907f9ad2e7a4af16dceda9cce4274b2f59c328d8c012eb0e15eb5e1e73b7d8f264d390606801604080517fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe081840301815290829052610fb69161177b565b60405180910390a25060019695505050505050565b6002610fd681611262565b83821461100f576040517fff633a3800000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b5f5b848110156108db5761106186868381811061102e5761102e61181e565b905060200201602081019061104391906115e3565b8585848181106110555761105561181e565b90506020020135611256565b600101611011565b5f6110776002546005541090565b949350505050565b600261108a81611262565b8382146110c3576040517fff633a3800000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b5f5b848110156108db576111158686838181106110e2576110e261181e565b90506020020160208101906110f791906115e3565b8585848181106111095761110961181e565b90506020020135611231565b6001016110c5565b61112561123c565b63389a75e1600c52805f526020600c20805442111561114b57636f5e88185f526004601cfd5b5f90556106c781611404565b61115f61123c565b8060601b61117457637448fbae5f526004601cfd5b6106c781611404565b5f8173ffffffffffffffffffffffffffffffffffffffff166111a2638b78c6d8195490565b73ffffffffffffffffffffffffffffffffffffffff1614806106b75750638b78c6d8600c9081525f839052602090205460031615156106b7565b5f7fffffffff0000000000000000000000000000000000000000000000000000000082167fa92167050000000000000000000000000000000000000000000000000000000014806106b757506106b78261144e565b6106dc82825f6114e4565b638b78c6d819543314610db4576382b429005f526004601cfd5b6106dc828260016114e4565b638b78c6d8195433146106c757638b78c6d8600c52335f52806020600c2054166106c7576382b429005f526004601cfd5b60405181606052826040528360601b602c526f23b872dd000000000000000000000000600c5260205f6064601c5f895af18060015f5114166112e757803d873b1517106112e757637939f4245f526004601cfd5b505f60605260405250505050565b5f816014526f70a082310000000000000000000000005f5260208060246010865afa601f3d111660205102905092915050565b73ffffffffffffffffffffffffffffffffffffffff16638b78c6d819819055805f7f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e08180a350565b638b78c6d8600c52815f52806020600c205580600c5160601c7f715ad5ce61fc9595c7b415289d59cf203f23a94fa06f04af7e489a0a76e1fe265f80a35050565b81601452806034526fa9059cbb0000000000000000000000005f5260205f604460105f875af18060015f5114166113fa57803d853b1517106113fa576390b8ec185f526004601cfd5b505f603452505050565b638b78c6d819805473ffffffffffffffffffffffffffffffffffffffff9092169182907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e05f80a355565b5f7fffffffff0000000000000000000000000000000000000000000000000000000082167f6ab67a0d0000000000000000000000000000000000000000000000000000000014806106b757507f01ffc9a7000000000000000000000000000000000000000000000000000000007fffffffff000000000000000000000000000000000000000000000000000000008316146106b7565b638b78c6d8600c52825f526020600c20805483811783611505575080841681185b80835580600c5160601c7f715ad5ce61fc9595c7b415289d59cf203f23a94fa06f04af7e489a0a76e1fe265f80a3505050505050565b5f6020828403121561154b575f80fd5b81357fffffffff000000000000000000000000000000000000000000000000000000008116811461157a575f80fd5b9392505050565b5f60208284031215611591575f80fd5b5035919050565b73ffffffffffffffffffffffffffffffffffffffff811681146106c7575f80fd5b5f80604083850312156115ca575f80fd5b82356115d581611598565b946020939093013593505050565b5f602082840312156115f3575f80fd5b813561157a81611598565b5f8083601f84011261160e575f80fd5b50813567ffffffffffffffff811115611625575f80fd5b6020830191508360208260051b850101111561163f575f80fd5b9250929050565b5f805f8060408587031215611659575f80fd5b843567ffffffffffffffff81111561166f575f80fd5b61167b878288016115fe565b909550935050602085013567ffffffffffffffff81111561169a575f80fd5b6116a6878288016115fe565b95989497509550505050565b5f8083601f8401126116c2575f80fd5b50813567ffffffffffffffff8111156116d9575f80fd5b60208301915083602082850101111561163f575f80fd5b5f8060208385031215611701575f80fd5b823567ffffffffffffffff811115611717575f80fd5b611723858286016116b2565b90969095509350505050565b5f81518084528060208401602086015e5f6020828601015260207fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0601f83011685010191505092915050565b602081525f61157a602083018461172f565b5f805f6040848603121561179f575f80fd5b83356117aa81611598565b9250602084013567ffffffffffffffff8111156117c5575f80fd5b6117d1868287016116b2565b9497909650939450505050565b7f4e487b71000000000000000000000000000000000000000000000000000000005f52601160045260245ffd5b808201808211156106b7576106b76117de565b7f4e487b71000000000000000000000000000000000000000000000000000000005f52603260045260245ffd5b5f6020828403121561185b575f80fd5b8135801515811461157a575f80fd5b7f4e487b71000000000000000000000000000000000000000000000000000000005f52604160045260245ffd5b6040805190810167ffffffffffffffff811182821017156118ba576118ba61186a565b60405290565b5f60808284031280156118d1575f80fd5b506040516080810167ffffffffffffffff811182821017156118f5576118f561186a565b604052823561190381611598565b81526020838101359082015260408084013590820152606083013561192781611598565b60608201529392505050565b5f82601f830112611942575f80fd5b813567ffffffffffffffff81111561195c5761195c61186a565b604051601f82017fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0908116603f0116810167ffffffffffffffff811182821017156119a9576119a961186a565b6040528181528382016020018510156119c0575f80fd5b816020850160208301375f918101602001919091529392505050565b5f602082840312156119ec575f80fd5b813567ffffffffffffffff811115611a02575f80fd5b820160408185031215611a13575f80fd5b611a1b611897565b8135611a2681611598565b8152602082013567ffffffffffffffff811115611a41575f80fd5b611a4d86828501611933565b602083015250949350505050565b5f60208284031215611a6b575f80fd5b5051919050565b818103818111156106b7576106b76117de565b5f805f60608486031215611a97575f80fd5b8335611aa281611598565b95602085013595506040909401359392505050565b7f4e487b71000000000000000000000000000000000000000000000000000000005f52602160045260245ffd5b602081525f825160038110611b20577f4e487b71000000000000000000000000000000000000000000000000000000005f52602160045260245ffd5b8060208401525073ffffffffffffffffffffffffffffffffffffffff602084015116604083015273ffffffffffffffffffffffffffffffffffffffff6040840151166060830152606083015160808084015261107760a084018261172f565b5f60208284031215611b8f575f80fd5b813567ffffffffffffffff811115611ba5575f80fd5b820160408185031215611bb6575f80fd5b611bbe611897565b813567ffffffffffffffff811115611bd4575f80fd5b611be086828501611933565b825250602082013567ffffffffffffffff811115611a41575f80fd5b80820281158282048414176106b7576106b76117de565b5f82611c46577f4e487b71000000000000000000000000000000000000000000000000000000005f52601260045260245ffd5b50049056fea264697066735822122010e92bb170bbded5a39d9e31e19c0f4d00c38e9b3db120b41bfca6a48a497d3364736f6c634300081a0033", c = { BASE_URL: "/", DEV: !1, MODE: "production", PROD: !0, SSR: !1, VITE_BOOST_MAINNET_SIGNER_EOA: "0xCBD0C302040bC803B4B2EDaF21Be0e49Deff5480", VITE_BOOST_TESTNET_SIGNER_EOA: "0xd63167e9db11B108940b2E8236581F961f33f396" }, e = class e extends I {
|
|
8
8
|
constructor() {
|
|
9
9
|
super(...arguments), this.abi = t;
|
|
10
10
|
}
|
|
@@ -215,7 +215,7 @@ const P = "0x6080604052348015600e575f80fd5b5060156019565b607c565b63409feecd19805
|
|
|
215
215
|
* @returns {Promise<boolean>} = True if the incentive is claimable based on the data payload
|
|
216
216
|
*/
|
|
217
217
|
async isClaimable(f, b) {
|
|
218
|
-
return await
|
|
218
|
+
return await T(this._config, {
|
|
219
219
|
address: this.assertValidAddress(),
|
|
220
220
|
args: [f.target, f.data],
|
|
221
221
|
// biome-ignore lint/suspicious/noExplicitAny: Accept any shape of valid wagmi/viem parameters, wagmi does the same thing internally
|
|
@@ -273,7 +273,7 @@ const P = "0x6080604052348015600e575f80fd5b5060156019565b607c565b63409feecd19805
|
|
|
273
273
|
return n({
|
|
274
274
|
asset: await this.asset(),
|
|
275
275
|
reward: f,
|
|
276
|
-
manager:
|
|
276
|
+
manager: _,
|
|
277
277
|
limit: 1n
|
|
278
278
|
});
|
|
279
279
|
}
|
|
@@ -300,7 +300,7 @@ const P = "0x6080604052348015600e575f80fd5b5060156019565b607c565b63409feecd19805
|
|
|
300
300
|
* @returns {bigint} Returns the reward amount from a claim data payload
|
|
301
301
|
*/
|
|
302
302
|
decodeClaimData(f) {
|
|
303
|
-
return BigInt(
|
|
303
|
+
return BigInt(H([{ type: "uint256" }], f)[0]);
|
|
304
304
|
}
|
|
305
305
|
/**
|
|
306
306
|
* Encodes an amount to clawback from the incentive
|
|
@@ -327,7 +327,7 @@ const P = "0x6080604052348015600e575f80fd5b5060156019565b607c565b63409feecd19805
|
|
|
327
327
|
);
|
|
328
328
|
return {
|
|
329
329
|
abi: t,
|
|
330
|
-
bytecode:
|
|
330
|
+
bytecode: O,
|
|
331
331
|
args: [
|
|
332
332
|
n(
|
|
333
333
|
a
|
|
@@ -339,8 +339,8 @@ const P = "0x6080604052348015600e575f80fd5b5060156019565b607c565b63409feecd19805
|
|
|
339
339
|
};
|
|
340
340
|
e.bases = {
|
|
341
341
|
...c != null && c.VITE_ERC20_VARIABLE_INCENTIVE_BASE ? { 31337: void 0 } : {},
|
|
342
|
-
...
|
|
343
|
-
}, e.registryType =
|
|
342
|
+
...B
|
|
343
|
+
}, e.registryType = D.INCENTIVE;
|
|
344
344
|
let r = e;
|
|
345
345
|
function n({
|
|
346
346
|
asset: o,
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});require("../generated-
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});require("../generated-BzLYuFx3.cjs");require("../componentInterfaces-BZ3fSNkT.cjs");require("@wagmi/core");require("../errors.cjs");const i=require("./AllowListIncentive.cjs"),n=require("./CGDAIncentive.cjs"),r=require("./ERC20Incentive.cjs"),e=require("../Incentive-YiX6zKm1.cjs"),t=require("./ERC20PeggedVariableCriteriaIncentive.cjs"),c=require("./ERC20PeggedVariableCriteriaIncentiveV2.cjs"),a=require("./ERC20VariableCriteriaIncentive.cjs"),C=require("./ERC20VariableCriteriaIncentiveV2.cjs"),v=require("./ERC20VariableIncentive.cjs"),I=require("./PointsIncentive.cjs");exports.AllowListIncentive=i.AllowListIncentive;exports.CGDAIncentive=n.CGDAIncentive;exports.ERC20Incentive=r.ERC20Incentive;exports.ERC20PeggedIncentive=e.ERC20PeggedIncentive;exports.IncentiveByComponentInterface=e.IncentiveByComponentInterface;exports.incentiveFromAddress=e.incentiveFromAddress;exports.ERC20PeggedVariableCriteriaIncentive=t.ERC20PeggedVariableCriteriaIncentive;exports.ERC20PeggedVariableCriteriaIncentiveV2=c.ERC20PeggedVariableCriteriaIncentiveV2;exports.ERC20VariableCriteriaIncentive=a.ERC20VariableCriteriaIncentive;exports.ERC20VariableCriteriaIncentiveV2=C.ERC20VariableCriteriaIncentiveV2;exports.ERC20VariableIncentive=v.ERC20VariableIncentive;exports.PointsIncentive=I.PointsIncentive;
|
|
2
2
|
//# sourceMappingURL=Incentive.cjs.map
|
|
@@ -1,11 +1,11 @@
|
|
|
1
|
-
import "../generated-
|
|
1
|
+
import "../generated-D6oDILUw.js";
|
|
2
2
|
import "../componentInterfaces-D2s6AXlV.js";
|
|
3
3
|
import "@wagmi/core";
|
|
4
4
|
import "../errors.js";
|
|
5
5
|
import { AllowListIncentive as a } from "./AllowListIncentive.js";
|
|
6
6
|
import { CGDAIncentive as p } from "./CGDAIncentive.js";
|
|
7
7
|
import { ERC20Incentive as C } from "./ERC20Incentive.js";
|
|
8
|
-
import { E as v, I as f, i as x } from "../Incentive-
|
|
8
|
+
import { E as v, I as f, i as x } from "../Incentive-DupDIsTS.js";
|
|
9
9
|
import { ERC20PeggedVariableCriteriaIncentive as l } from "./ERC20PeggedVariableCriteriaIncentive.js";
|
|
10
10
|
import { ERC20PeggedVariableCriteriaIncentiveV2 as R } from "./ERC20PeggedVariableCriteriaIncentiveV2.js";
|
|
11
11
|
import { ERC20VariableCriteriaIncentive as g } from "./ERC20VariableCriteriaIncentive.js";
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const b=require("../generated-dd4FN0Fo.cjs"),d=require("viem"),o=require("../deployments-BjBgk03b.cjs"),l=require("../Deployable/DeployableTarget.cjs"),u=require("../claiming.cjs"),y=require("../utils.cjs"),h="0x6080604052348015600e575f80fd5b5060156019565b607c565b63409feecd198054600181161560365763f92ee8a95f526004601cfd5b6001600160401b03808260011c146077578060011b8355806020527fc7f505b2f371ae2175ee4913f4499e1f2633a7b5936321eed1cdaeb6115181d2602080a15b505050565b6113ca806100895f395ff3fe6080604052600436106101af575f3560e01c8063514e62fc116100e7578063c884ef8311610087578063ea3d508a11610062578063ea3d508a14610543578063f04e283e1461055c578063f2fde38b1461056f578063fee81cf414610582575f80fd5b8063c884ef83146104e1578063db09da121461050f578063dcc59b6f1461052e575f80fd5b80638da5cb5b116100c25780638da5cb5b1461044e578063a270a73714610481578063a4d66daf146104ad578063bb1757cf146104c2575f80fd5b8063514e62fc1461040957806354d1f13d1461043e578063715018a614610446575f80fd5b806328d6183b11610152578063439fab911161012d578063439fab9114610354578063474f5a44146103735780634a4ee7b1146103bc5780634e7165a2146103cf575f80fd5b806328d6183b1461027d5780632de94807146102dc57806338d52e0f1461030d575f80fd5b80631c10893f1161018d5780631c10893f146102195780631cd64df41461022c578063228cb733146102615780632569296214610275575f80fd5b806301ffc9a7146101b357806307621eca146101e7578063183a4f6e14610204575b5f80fd5b3480156101be575f80fd5b506101d26101cd36600461108b565b6105b3565b60405190151581526020015b60405180910390f35b3480156101f2575f80fd5b505f545b6040519081526020016101de565b6102176102123660046110ab565b61060e565b005b6102176102273660046110e3565b61061b565b348015610237575f80fd5b506101d26102463660046110e3565b638b78c6d8600c9081525f9290925260209091205481161490565b34801561026c575f80fd5b506101f65f5481565b610217610631565b348015610288575f80fd5b507f0d36a40d000000000000000000000000000000000000000000000000000000005b6040517fffffffff0000000000000000000000000000000000000000000000000000000090911681526020016101de565b3480156102e7575f80fd5b506101f66102f636600461110d565b638b78c6d8600c9081525f91909152602090205490565b348015610318575f80fd5b5073deaddeaddeaddeaddeaddeaddeaddeaddeaddead5b60405173ffffffffffffffffffffffffffffffffffffffff90911681526020016101de565b34801561035f575f80fd5b5061021761036e36600461116d565b61067e565b34801561037e575f80fd5b5061039261038d36600461116d565b610890565b6040805192835273ffffffffffffffffffffffffffffffffffffffff9091166020830152016101de565b6102176103ca3660046110e3565b6108c4565b3480156103da575f80fd5b506103fc6103e936600461116d565b5050604080515f81526020810190915290565b6040516101de91906111ac565b348015610414575f80fd5b506101d26104233660046110e3565b638b78c6d8600c9081525f9290925260209091205416151590565b6102176108d6565b61021761090f565b348015610459575f80fd5b507fffffffffffffffffffffffffffffffffffffffffffffffffffffffff748739275461032f565b34801561048c575f80fd5b5060025461032f9073ffffffffffffffffffffffffffffffffffffffff1681565b3480156104b8575f80fd5b506101f660035481565b3480156104cd575f80fd5b506101d26104dc3660046111ff565b610922565b3480156104ec575f80fd5b506101d26104fb36600461110d565b60016020525f908152604090205460ff1681565b34801561051a575f80fd5b506101d26105293660046111ff565b610d52565b348015610539575f80fd5b506101f660055481565b34801561054e575f80fd5b506004546102ab9060e01b81565b61021761056a36600461110d565b610d64565b61021761057d36600461110d565b610d9e565b34801561058d575f80fd5b506101f661059c36600461110d565b63389a75e1600c9081525f91909152602090205490565b5f7fffffffff0000000000000000000000000000000000000000000000000000000082167f0d36a40d000000000000000000000000000000000000000000000000000000001480610608575061060882610dc4565b92915050565b6106183382610e19565b50565b610623610e24565b61062d8282610e59565b5050565b5f6202a30067ffffffffffffffff164201905063389a75e1600c52335f52806020600c2055337fdbf36a107da19e49527a7176a1babf963b4b0ff8cde35ee35d6cd8f1f9ac7e1d5f80a250565b7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffbf60113280546003825580156106cf5760018160011c14303b106106c65763f92ee8a95f526004601cfd5b818160ff1b1b91505b505f6106dd83850185611250565b905080604001515f14806106f357506060810151155b1561072a576040517ff92ee8a900000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b8051600280547fffffffffffffffffffffffff00000000000000000000000000000000000000001673ffffffffffffffffffffffffffffffffffffffff9092169190911790556020810151600480547fffffffffffffffffffffffffffffffffffffffffffffffffffffffff000000001660e09290921c91909117905560408101515f5560608101516003556107bf33610e65565b805f015173ffffffffffffffffffffffffffffffffffffffff167fef49c8fd80435c15980f0f55660ffaac9417e5843768f7f21566cfad2d19bfe782602001518360400151846060015160405161084d939291907fffffffff000000000000000000000000000000000000000000000000000000009390931683526020830191909152604082015260600190565b60405180910390a250801561088b576002815560016020527fc7f505b2f371ae2175ee4913f4499e1f2633a7b5936321eed1cdaeb6115181d2602080a15b505050565b5f806040517fd623472500000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b6108cc610e24565b61062d8282610e19565b63389a75e1600c52335f525f6020600c2055337ffa7b8eab7da67f412cc9575ed43464468f9bfbae89d1675917346ca6d8fe3c925f80a2565b610917610e24565b6109205f610ec8565b565b5f61092b610e24565b600254604080517f8da5cb5b000000000000000000000000000000000000000000000000000000008152905173ffffffffffffffffffffffffffffffffffffffff9092169130918391638da5cb5b916004808201926020929091908290030181865afa15801561099d573d5f803e3d5ffd5b505050506040513d601f19601f820116820180604052508101906109c191906112e8565b73ffffffffffffffffffffffffffffffffffffffff1614158015610a7a57506040517f514e62fc0000000000000000000000000000000000000000000000000000000081523060048201526002602482015273ffffffffffffffffffffffffffffffffffffffff82169063514e62fc90604401602060405180830381865afa158015610a4f573d5f803e3d5ffd5b505050506040513d601f19601f82011682018060405250810190610a739190611303565b1515600114155b15610ab1576040517f82b4290000000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b610aba85610f2d565b610af0576040517f6247a84e00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b60058054905f610aff83611322565b909155505073ffffffffffffffffffffffffffffffffffffffff8581165f81815260016020819052604080832080547fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff001690921790915560025460045483549251602481019590955260448501929092529193919091169160e09190911b90606401604080517fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe08184030181529181526020820180517bffffffffffffffffffffffffffffffffffffffffffffffffffffffff167fffffffff00000000000000000000000000000000000000000000000000000000909416939093179092529051610c0a919061137e565b5f604051808303815f865af19150503d805f8114610c43576040519150601f19603f3d011682016040523d82523d5f602084013e610c48565b606091505b5050905080610c83576040517f360e42e100000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b6002545f546040517fffffffffffffffffffffffffffffffffffffffff000000000000000000000000606093841b811660208301529289901b9092166034830152604882015273ffffffffffffffffffffffffffffffffffffffff8716907f9ad2e7a4af16dceda9cce4274b2f59c328d8c012eb0e15eb5e1e73b7d8f264d390606801604080517fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe081840301815290829052610d3e916111ac565b60405180910390a250600195945050505050565b5f610d5c84610f2d565b949350505050565b610d6c610e24565b63389a75e1600c52805f526020600c208054421115610d9257636f5e88185f526004601cfd5b5f905561061881610ec8565b610da6610e24565b8060601b610dbb57637448fbae5f526004601cfd5b61061881610ec8565b5f7fffffffff0000000000000000000000000000000000000000000000000000000082167fa9216705000000000000000000000000000000000000000000000000000000001480610608575061060882610f6a565b61062d82825f611000565b7fffffffffffffffffffffffffffffffffffffffffffffffffffffffff74873927543314610920576382b429005f526004601cfd5b61062d82826001611000565b73ffffffffffffffffffffffffffffffffffffffff167fffffffffffffffffffffffffffffffffffffffffffffffffffffffff74873927819055805f7f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e08180a350565b7fffffffffffffffffffffffffffffffffffffffffffffffffffffffff74873927805473ffffffffffffffffffffffffffffffffffffffff9092169182907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e05f80a355565b73ffffffffffffffffffffffffffffffffffffffff81165f9081526001602052604081205460ff1615801561060857506003546005541092915050565b5f7fffffffff0000000000000000000000000000000000000000000000000000000082167f6ab67a0d00000000000000000000000000000000000000000000000000000000148061060857507f01ffc9a7000000000000000000000000000000000000000000000000000000007fffffffff00000000000000000000000000000000000000000000000000000000831614610608565b638b78c6d8600c52825f526020600c20805483811783611021575080841681185b80835580600c5160601c7f715ad5ce61fc9595c7b415289d59cf203f23a94fa06f04af7e489a0a76e1fe265f80a3505050505050565b80357fffffffff0000000000000000000000000000000000000000000000000000000081168114611086575f80fd5b919050565b5f6020828403121561109b575f80fd5b6110a482611057565b9392505050565b5f602082840312156110bb575f80fd5b5035919050565b73ffffffffffffffffffffffffffffffffffffffff81168114610618575f80fd5b5f80604083850312156110f4575f80fd5b82356110ff816110c2565b946020939093013593505050565b5f6020828403121561111d575f80fd5b81356110a4816110c2565b5f8083601f840112611138575f80fd5b50813567ffffffffffffffff81111561114f575f80fd5b602083019150836020828501011115611166575f80fd5b9250929050565b5f806020838503121561117e575f80fd5b823567ffffffffffffffff811115611194575f80fd5b6111a085828601611128565b90969095509350505050565b602081525f82518060208401528060208501604085015e5f6040828501015260407fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0601f83011684010191505092915050565b5f805f60408486031215611211575f80fd5b833561121c816110c2565b9250602084013567ffffffffffffffff811115611237575f80fd5b61124386828701611128565b9497909650939450505050565b5f6080828403128015611261575f80fd5b506040516080810167ffffffffffffffff811182821017156112aa577f4e487b71000000000000000000000000000000000000000000000000000000005f52604160045260245ffd5b60405282356112b8816110c2565b81526112c660208401611057565b6020820152604083810135908201526060928301359281019290925250919050565b5f602082840312156112f8575f80fd5b81516110a4816110c2565b5f60208284031215611313575f80fd5b815180151581146110a4575f80fd5b5f7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff8203611377577f4e487b71000000000000000000000000000000000000000000000000000000005f52601160045260245ffd5b5060010190565b5f82518060208501845e5f92019182525091905056fea2646970667358221220ffbdb425e855f60328c6ebf81b28965fc1d20a52c81e723566d80b77f491fc3964736f6c634300081a0033",t={BASE_URL:"/",DEV:!1,MODE:"production",PROD:!0,SSR:!1,VITE_BOOST_MAINNET_SIGNER_EOA:"0xCBD0C302040bC803B4B2EDaF21Be0e49Deff5480",VITE_BOOST_TESTNET_SIGNER_EOA:"0xd63167e9db11B108940b2E8236581F961f33f396"},c=class c extends l.DeployableTarget{constructor(){super(...arguments),this.abi=b.H}async claims(f){return await b.qG(this._config,{address:this.assertValidAddress(),args:[],...f})}async currentReward(f){return await b.GG(this._config,{address:this.assertValidAddress(),args:[],...f})}async reward(f){return await b.YG(this._config,{address:this.assertValidAddress(),args:[],...f})}async claimed(f,e){return await b.DG(this._config,{address:this.assertValidAddress(),args:[f],...e})}async venue(f){return await b.aU(this._config,{address:this.assertValidAddress(),...f})}async limit(f){return await b.QG(this._config,{address:this.assertValidAddress(),...f})}async selector(f){return await b.tU(this._config,{address:this.assertValidAddress(),...f})}async claim(f,e){return await this.awaitResult(this.claimRaw(f,e))}async claimRaw(f,e){const{request:a,result:s}=await b.vU(this._config,{address:this.assertValidAddress(),args:[u.prepareClaimPayload(f)],...this.optionallyAttachAccount(),...e});return{hash:await b.rU(this._config,a),result:s}}async isClaimable(f,e){return await b.$G(this._config,{address:this.assertValidAddress(),args:[f.target,f.data],...e})}async canBeClaimed(f){return await this.getRemainingClaimPotential(f)>0n}async getRemainingClaimPotential(f){const[e,a]=await Promise.all([this.claims(f),this.limit(f)]);return a-e}buildParameters(f,e){const[a,s]=this.validateDeploymentConfig(f,e);return{abi:b.H,bytecode:h,args:[r(a)],...this.optionallyAttachAccount(s.account)}}getTopupPayload(f){var e,a;return d.encodeAbiParameters([{type:"address",name:"venue"},{type:"bytes4",name:"selector"},{type:"uint256",name:"amount"}],[((e=this.payload)==null?void 0:e.venue)??d.zeroAddress,((a=this.payload)==null?void 0:a.selector)??"0x00000000",f])}buildClaimData(){return d.zeroHash}};c.bases={...t!=null&&t.VITE_POINTS_INCENTIVE_BASE?{31337:void 0}:{},...o.PointsIncentive},c.registryType=y.RegistryType.INCENTIVE;let i=c;const r=({venue:n,selector:f,reward:e,limit:a})=>d.encodeAbiParameters([{type:"address",name:"venue"},{type:"bytes4",name:"selector"},{type:"uint256",name:"reward"},{type:"uint256",name:"limit"}],[n,f,e,a]);exports.pointsIncentiveAbi=b.H;exports.PointsIncentive=i;exports.preparePointsIncentivePayload=r;
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const a=require("../generated-BzLYuFx3.cjs"),d=require("viem"),o=require("../deployments-DimWVnA4.cjs"),l=require("../Deployable/DeployableTarget.cjs"),u=require("../claiming.cjs"),y=require("../utils.cjs"),h="0x6080604052348015600e575f80fd5b5060156019565b607c565b63409feecd198054600181161560365763f92ee8a95f526004601cfd5b6001600160401b03808260011c146077578060011b8355806020527fc7f505b2f371ae2175ee4913f4499e1f2633a7b5936321eed1cdaeb6115181d2602080a15b505050565b6113ca806100895f395ff3fe6080604052600436106101af575f3560e01c8063514e62fc116100e7578063c884ef8311610087578063ea3d508a11610062578063ea3d508a14610543578063f04e283e1461055c578063f2fde38b1461056f578063fee81cf414610582575f80fd5b8063c884ef83146104e1578063db09da121461050f578063dcc59b6f1461052e575f80fd5b80638da5cb5b116100c25780638da5cb5b1461044e578063a270a73714610481578063a4d66daf146104ad578063bb1757cf146104c2575f80fd5b8063514e62fc1461040957806354d1f13d1461043e578063715018a614610446575f80fd5b806328d6183b11610152578063439fab911161012d578063439fab9114610354578063474f5a44146103735780634a4ee7b1146103bc5780634e7165a2146103cf575f80fd5b806328d6183b1461027d5780632de94807146102dc57806338d52e0f1461030d575f80fd5b80631c10893f1161018d5780631c10893f146102195780631cd64df41461022c578063228cb733146102615780632569296214610275575f80fd5b806301ffc9a7146101b357806307621eca146101e7578063183a4f6e14610204575b5f80fd5b3480156101be575f80fd5b506101d26101cd36600461108b565b6105b3565b60405190151581526020015b60405180910390f35b3480156101f2575f80fd5b505f545b6040519081526020016101de565b6102176102123660046110ab565b61060e565b005b6102176102273660046110e3565b61061b565b348015610237575f80fd5b506101d26102463660046110e3565b638b78c6d8600c9081525f9290925260209091205481161490565b34801561026c575f80fd5b506101f65f5481565b610217610631565b348015610288575f80fd5b507f0d36a40d000000000000000000000000000000000000000000000000000000005b6040517fffffffff0000000000000000000000000000000000000000000000000000000090911681526020016101de565b3480156102e7575f80fd5b506101f66102f636600461110d565b638b78c6d8600c9081525f91909152602090205490565b348015610318575f80fd5b5073deaddeaddeaddeaddeaddeaddeaddeaddeaddead5b60405173ffffffffffffffffffffffffffffffffffffffff90911681526020016101de565b34801561035f575f80fd5b5061021761036e36600461116d565b61067e565b34801561037e575f80fd5b5061039261038d36600461116d565b610890565b6040805192835273ffffffffffffffffffffffffffffffffffffffff9091166020830152016101de565b6102176103ca3660046110e3565b6108c4565b3480156103da575f80fd5b506103fc6103e936600461116d565b5050604080515f81526020810190915290565b6040516101de91906111ac565b348015610414575f80fd5b506101d26104233660046110e3565b638b78c6d8600c9081525f9290925260209091205416151590565b6102176108d6565b61021761090f565b348015610459575f80fd5b507fffffffffffffffffffffffffffffffffffffffffffffffffffffffff748739275461032f565b34801561048c575f80fd5b5060025461032f9073ffffffffffffffffffffffffffffffffffffffff1681565b3480156104b8575f80fd5b506101f660035481565b3480156104cd575f80fd5b506101d26104dc3660046111ff565b610922565b3480156104ec575f80fd5b506101d26104fb36600461110d565b60016020525f908152604090205460ff1681565b34801561051a575f80fd5b506101d26105293660046111ff565b610d52565b348015610539575f80fd5b506101f660055481565b34801561054e575f80fd5b506004546102ab9060e01b81565b61021761056a36600461110d565b610d64565b61021761057d36600461110d565b610d9e565b34801561058d575f80fd5b506101f661059c36600461110d565b63389a75e1600c9081525f91909152602090205490565b5f7fffffffff0000000000000000000000000000000000000000000000000000000082167f0d36a40d000000000000000000000000000000000000000000000000000000001480610608575061060882610dc4565b92915050565b6106183382610e19565b50565b610623610e24565b61062d8282610e59565b5050565b5f6202a30067ffffffffffffffff164201905063389a75e1600c52335f52806020600c2055337fdbf36a107da19e49527a7176a1babf963b4b0ff8cde35ee35d6cd8f1f9ac7e1d5f80a250565b7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffbf60113280546003825580156106cf5760018160011c14303b106106c65763f92ee8a95f526004601cfd5b818160ff1b1b91505b505f6106dd83850185611250565b905080604001515f14806106f357506060810151155b1561072a576040517ff92ee8a900000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b8051600280547fffffffffffffffffffffffff00000000000000000000000000000000000000001673ffffffffffffffffffffffffffffffffffffffff9092169190911790556020810151600480547fffffffffffffffffffffffffffffffffffffffffffffffffffffffff000000001660e09290921c91909117905560408101515f5560608101516003556107bf33610e65565b805f015173ffffffffffffffffffffffffffffffffffffffff167fef49c8fd80435c15980f0f55660ffaac9417e5843768f7f21566cfad2d19bfe782602001518360400151846060015160405161084d939291907fffffffff000000000000000000000000000000000000000000000000000000009390931683526020830191909152604082015260600190565b60405180910390a250801561088b576002815560016020527fc7f505b2f371ae2175ee4913f4499e1f2633a7b5936321eed1cdaeb6115181d2602080a15b505050565b5f806040517fd623472500000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b6108cc610e24565b61062d8282610e19565b63389a75e1600c52335f525f6020600c2055337ffa7b8eab7da67f412cc9575ed43464468f9bfbae89d1675917346ca6d8fe3c925f80a2565b610917610e24565b6109205f610ec8565b565b5f61092b610e24565b600254604080517f8da5cb5b000000000000000000000000000000000000000000000000000000008152905173ffffffffffffffffffffffffffffffffffffffff9092169130918391638da5cb5b916004808201926020929091908290030181865afa15801561099d573d5f803e3d5ffd5b505050506040513d601f19601f820116820180604052508101906109c191906112e8565b73ffffffffffffffffffffffffffffffffffffffff1614158015610a7a57506040517f514e62fc0000000000000000000000000000000000000000000000000000000081523060048201526002602482015273ffffffffffffffffffffffffffffffffffffffff82169063514e62fc90604401602060405180830381865afa158015610a4f573d5f803e3d5ffd5b505050506040513d601f19601f82011682018060405250810190610a739190611303565b1515600114155b15610ab1576040517f82b4290000000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b610aba85610f2d565b610af0576040517f6247a84e00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b60058054905f610aff83611322565b909155505073ffffffffffffffffffffffffffffffffffffffff8581165f81815260016020819052604080832080547fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff001690921790915560025460045483549251602481019590955260448501929092529193919091169160e09190911b90606401604080517fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe08184030181529181526020820180517bffffffffffffffffffffffffffffffffffffffffffffffffffffffff167fffffffff00000000000000000000000000000000000000000000000000000000909416939093179092529051610c0a919061137e565b5f604051808303815f865af19150503d805f8114610c43576040519150601f19603f3d011682016040523d82523d5f602084013e610c48565b606091505b5050905080610c83576040517f360e42e100000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b6002545f546040517fffffffffffffffffffffffffffffffffffffffff000000000000000000000000606093841b811660208301529289901b9092166034830152604882015273ffffffffffffffffffffffffffffffffffffffff8716907f9ad2e7a4af16dceda9cce4274b2f59c328d8c012eb0e15eb5e1e73b7d8f264d390606801604080517fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe081840301815290829052610d3e916111ac565b60405180910390a250600195945050505050565b5f610d5c84610f2d565b949350505050565b610d6c610e24565b63389a75e1600c52805f526020600c208054421115610d9257636f5e88185f526004601cfd5b5f905561061881610ec8565b610da6610e24565b8060601b610dbb57637448fbae5f526004601cfd5b61061881610ec8565b5f7fffffffff0000000000000000000000000000000000000000000000000000000082167fa9216705000000000000000000000000000000000000000000000000000000001480610608575061060882610f6a565b61062d82825f611000565b7fffffffffffffffffffffffffffffffffffffffffffffffffffffffff74873927543314610920576382b429005f526004601cfd5b61062d82826001611000565b73ffffffffffffffffffffffffffffffffffffffff167fffffffffffffffffffffffffffffffffffffffffffffffffffffffff74873927819055805f7f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e08180a350565b7fffffffffffffffffffffffffffffffffffffffffffffffffffffffff74873927805473ffffffffffffffffffffffffffffffffffffffff9092169182907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e05f80a355565b73ffffffffffffffffffffffffffffffffffffffff81165f9081526001602052604081205460ff1615801561060857506003546005541092915050565b5f7fffffffff0000000000000000000000000000000000000000000000000000000082167f6ab67a0d00000000000000000000000000000000000000000000000000000000148061060857507f01ffc9a7000000000000000000000000000000000000000000000000000000007fffffffff00000000000000000000000000000000000000000000000000000000831614610608565b638b78c6d8600c52825f526020600c20805483811783611021575080841681185b80835580600c5160601c7f715ad5ce61fc9595c7b415289d59cf203f23a94fa06f04af7e489a0a76e1fe265f80a3505050505050565b80357fffffffff0000000000000000000000000000000000000000000000000000000081168114611086575f80fd5b919050565b5f6020828403121561109b575f80fd5b6110a482611057565b9392505050565b5f602082840312156110bb575f80fd5b5035919050565b73ffffffffffffffffffffffffffffffffffffffff81168114610618575f80fd5b5f80604083850312156110f4575f80fd5b82356110ff816110c2565b946020939093013593505050565b5f6020828403121561111d575f80fd5b81356110a4816110c2565b5f8083601f840112611138575f80fd5b50813567ffffffffffffffff81111561114f575f80fd5b602083019150836020828501011115611166575f80fd5b9250929050565b5f806020838503121561117e575f80fd5b823567ffffffffffffffff811115611194575f80fd5b6111a085828601611128565b90969095509350505050565b602081525f82518060208401528060208501604085015e5f6040828501015260407fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0601f83011684010191505092915050565b5f805f60408486031215611211575f80fd5b833561121c816110c2565b9250602084013567ffffffffffffffff811115611237575f80fd5b61124386828701611128565b9497909650939450505050565b5f6080828403128015611261575f80fd5b506040516080810167ffffffffffffffff811182821017156112aa577f4e487b71000000000000000000000000000000000000000000000000000000005f52604160045260245ffd5b60405282356112b8816110c2565b81526112c660208401611057565b6020820152604083810135908201526060928301359281019290925250919050565b5f602082840312156112f8575f80fd5b81516110a4816110c2565b5f60208284031215611313575f80fd5b815180151581146110a4575f80fd5b5f7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff8203611377577f4e487b71000000000000000000000000000000000000000000000000000000005f52601160045260245ffd5b5060010190565b5f82518060208501845e5f92019182525091905056fea26469706673582212200bda90f158411392f8285d4968c6a3fb89d36d405e24c31ab345de224e70a4cd64736f6c634300081a0033",t={BASE_URL:"/",DEV:!1,MODE:"production",PROD:!0,SSR:!1,VITE_BOOST_MAINNET_SIGNER_EOA:"0xCBD0C302040bC803B4B2EDaF21Be0e49Deff5480",VITE_BOOST_TESTNET_SIGNER_EOA:"0xd63167e9db11B108940b2E8236581F961f33f396"},c=class c extends l.DeployableTarget{constructor(){super(...arguments),this.abi=a.H}async claims(f){return await a.YU(this._config,{address:this.assertValidAddress(),args:[],...f})}async currentReward(f){return await a.tG(this._config,{address:this.assertValidAddress(),args:[],...f})}async reward(f){return await a.lG(this._config,{address:this.assertValidAddress(),args:[],...f})}async claimed(f,e){return await a.XU(this._config,{address:this.assertValidAddress(),args:[f],...e})}async venue(f){return await a.mG(this._config,{address:this.assertValidAddress(),...f})}async limit(f){return await a.rG(this._config,{address:this.assertValidAddress(),...f})}async selector(f){return await a.dG(this._config,{address:this.assertValidAddress(),...f})}async claim(f,e){return await this.awaitResult(this.claimRaw(f,e))}async claimRaw(f,e){const{request:b,result:s}=await a.CG(this._config,{address:this.assertValidAddress(),args:[u.prepareClaimPayload(f)],...this.optionallyAttachAccount(),...e});return{hash:await a.vG(this._config,b),result:s}}async isClaimable(f,e){return await a.sG(this._config,{address:this.assertValidAddress(),args:[f.target,f.data],...e})}async canBeClaimed(f){return await this.getRemainingClaimPotential(f)>0n}async getRemainingClaimPotential(f){const[e,b]=await Promise.all([this.claims(f),this.limit(f)]);return b-e}buildParameters(f,e){const[b,s]=this.validateDeploymentConfig(f,e);return{abi:a.H,bytecode:h,args:[r(b)],...this.optionallyAttachAccount(s.account)}}getTopupPayload(f){var e,b;return d.encodeAbiParameters([{type:"address",name:"venue"},{type:"bytes4",name:"selector"},{type:"uint256",name:"amount"}],[((e=this.payload)==null?void 0:e.venue)??d.zeroAddress,((b=this.payload)==null?void 0:b.selector)??"0x00000000",f])}buildClaimData(){return d.zeroHash}};c.bases={...t!=null&&t.VITE_POINTS_INCENTIVE_BASE?{31337:void 0}:{},...o.PointsIncentive},c.registryType=y.RegistryType.INCENTIVE;let i=c;const r=({venue:n,selector:f,reward:e,limit:b})=>d.encodeAbiParameters([{type:"address",name:"venue"},{type:"bytes4",name:"selector"},{type:"uint256",name:"reward"},{type:"uint256",name:"limit"}],[n,f,e,b]);exports.pointsIncentiveAbi=a.H;exports.PointsIncentive=i;exports.preparePointsIncentivePayload=r;
|
|
2
2
|
//# sourceMappingURL=PointsIncentive.cjs.map
|
|
@@ -1,10 +1,10 @@
|
|
|
1
|
-
import { H as s, bT as n, bU as o, bV as l, bW as m, bX as u, bY as h, bZ as y, b_ as p, b$ as g, c0 as A } from "../generated-
|
|
1
|
+
import { H as s, bT as n, bU as o, bV as l, bW as m, bX as u, bY as h, bZ as y, b_ as p, b$ as g, c0 as A } from "../generated-D6oDILUw.js";
|
|
2
2
|
import { encodeAbiParameters as i, zeroAddress as E, zeroHash as w } from "viem";
|
|
3
|
-
import { P as T } from "../deployments-
|
|
3
|
+
import { P as T } from "../deployments-Dw5Suk_D.js";
|
|
4
4
|
import { DeployableTarget as V } from "../Deployable/DeployableTarget.js";
|
|
5
5
|
import { prepareClaimPayload as _ } from "../claiming.js";
|
|
6
6
|
import { RegistryType as C } from "../utils.js";
|
|
7
|
-
const R = "0x6080604052348015600e575f80fd5b5060156019565b607c565b63409feecd198054600181161560365763f92ee8a95f526004601cfd5b6001600160401b03808260011c146077578060011b8355806020527fc7f505b2f371ae2175ee4913f4499e1f2633a7b5936321eed1cdaeb6115181d2602080a15b505050565b6113ca806100895f395ff3fe6080604052600436106101af575f3560e01c8063514e62fc116100e7578063c884ef8311610087578063ea3d508a11610062578063ea3d508a14610543578063f04e283e1461055c578063f2fde38b1461056f578063fee81cf414610582575f80fd5b8063c884ef83146104e1578063db09da121461050f578063dcc59b6f1461052e575f80fd5b80638da5cb5b116100c25780638da5cb5b1461044e578063a270a73714610481578063a4d66daf146104ad578063bb1757cf146104c2575f80fd5b8063514e62fc1461040957806354d1f13d1461043e578063715018a614610446575f80fd5b806328d6183b11610152578063439fab911161012d578063439fab9114610354578063474f5a44146103735780634a4ee7b1146103bc5780634e7165a2146103cf575f80fd5b806328d6183b1461027d5780632de94807146102dc57806338d52e0f1461030d575f80fd5b80631c10893f1161018d5780631c10893f146102195780631cd64df41461022c578063228cb733146102615780632569296214610275575f80fd5b806301ffc9a7146101b357806307621eca146101e7578063183a4f6e14610204575b5f80fd5b3480156101be575f80fd5b506101d26101cd36600461108b565b6105b3565b60405190151581526020015b60405180910390f35b3480156101f2575f80fd5b505f545b6040519081526020016101de565b6102176102123660046110ab565b61060e565b005b6102176102273660046110e3565b61061b565b348015610237575f80fd5b506101d26102463660046110e3565b638b78c6d8600c9081525f9290925260209091205481161490565b34801561026c575f80fd5b506101f65f5481565b610217610631565b348015610288575f80fd5b507f0d36a40d000000000000000000000000000000000000000000000000000000005b6040517fffffffff0000000000000000000000000000000000000000000000000000000090911681526020016101de565b3480156102e7575f80fd5b506101f66102f636600461110d565b638b78c6d8600c9081525f91909152602090205490565b348015610318575f80fd5b5073deaddeaddeaddeaddeaddeaddeaddeaddeaddead5b60405173ffffffffffffffffffffffffffffffffffffffff90911681526020016101de565b34801561035f575f80fd5b5061021761036e36600461116d565b61067e565b34801561037e575f80fd5b5061039261038d36600461116d565b610890565b6040805192835273ffffffffffffffffffffffffffffffffffffffff9091166020830152016101de565b6102176103ca3660046110e3565b6108c4565b3480156103da575f80fd5b506103fc6103e936600461116d565b5050604080515f81526020810190915290565b6040516101de91906111ac565b348015610414575f80fd5b506101d26104233660046110e3565b638b78c6d8600c9081525f9290925260209091205416151590565b6102176108d6565b61021761090f565b348015610459575f80fd5b507fffffffffffffffffffffffffffffffffffffffffffffffffffffffff748739275461032f565b34801561048c575f80fd5b5060025461032f9073ffffffffffffffffffffffffffffffffffffffff1681565b3480156104b8575f80fd5b506101f660035481565b3480156104cd575f80fd5b506101d26104dc3660046111ff565b610922565b3480156104ec575f80fd5b506101d26104fb36600461110d565b60016020525f908152604090205460ff1681565b34801561051a575f80fd5b506101d26105293660046111ff565b610d52565b348015610539575f80fd5b506101f660055481565b34801561054e575f80fd5b506004546102ab9060e01b81565b61021761056a36600461110d565b610d64565b61021761057d36600461110d565b610d9e565b34801561058d575f80fd5b506101f661059c36600461110d565b63389a75e1600c9081525f91909152602090205490565b5f7fffffffff0000000000000000000000000000000000000000000000000000000082167f0d36a40d000000000000000000000000000000000000000000000000000000001480610608575061060882610dc4565b92915050565b6106183382610e19565b50565b610623610e24565b61062d8282610e59565b5050565b5f6202a30067ffffffffffffffff164201905063389a75e1600c52335f52806020600c2055337fdbf36a107da19e49527a7176a1babf963b4b0ff8cde35ee35d6cd8f1f9ac7e1d5f80a250565b7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffbf60113280546003825580156106cf5760018160011c14303b106106c65763f92ee8a95f526004601cfd5b818160ff1b1b91505b505f6106dd83850185611250565b905080604001515f14806106f357506060810151155b1561072a576040517ff92ee8a900000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b8051600280547fffffffffffffffffffffffff00000000000000000000000000000000000000001673ffffffffffffffffffffffffffffffffffffffff9092169190911790556020810151600480547fffffffffffffffffffffffffffffffffffffffffffffffffffffffff000000001660e09290921c91909117905560408101515f5560608101516003556107bf33610e65565b805f015173ffffffffffffffffffffffffffffffffffffffff167fef49c8fd80435c15980f0f55660ffaac9417e5843768f7f21566cfad2d19bfe782602001518360400151846060015160405161084d939291907fffffffff000000000000000000000000000000000000000000000000000000009390931683526020830191909152604082015260600190565b60405180910390a250801561088b576002815560016020527fc7f505b2f371ae2175ee4913f4499e1f2633a7b5936321eed1cdaeb6115181d2602080a15b505050565b5f806040517fd623472500000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b6108cc610e24565b61062d8282610e19565b63389a75e1600c52335f525f6020600c2055337ffa7b8eab7da67f412cc9575ed43464468f9bfbae89d1675917346ca6d8fe3c925f80a2565b610917610e24565b6109205f610ec8565b565b5f61092b610e24565b600254604080517f8da5cb5b000000000000000000000000000000000000000000000000000000008152905173ffffffffffffffffffffffffffffffffffffffff9092169130918391638da5cb5b916004808201926020929091908290030181865afa15801561099d573d5f803e3d5ffd5b505050506040513d601f19601f820116820180604052508101906109c191906112e8565b73ffffffffffffffffffffffffffffffffffffffff1614158015610a7a57506040517f514e62fc0000000000000000000000000000000000000000000000000000000081523060048201526002602482015273ffffffffffffffffffffffffffffffffffffffff82169063514e62fc90604401602060405180830381865afa158015610a4f573d5f803e3d5ffd5b505050506040513d601f19601f82011682018060405250810190610a739190611303565b1515600114155b15610ab1576040517f82b4290000000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b610aba85610f2d565b610af0576040517f6247a84e00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b60058054905f610aff83611322565b909155505073ffffffffffffffffffffffffffffffffffffffff8581165f81815260016020819052604080832080547fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff001690921790915560025460045483549251602481019590955260448501929092529193919091169160e09190911b90606401604080517fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe08184030181529181526020820180517bffffffffffffffffffffffffffffffffffffffffffffffffffffffff167fffffffff00000000000000000000000000000000000000000000000000000000909416939093179092529051610c0a919061137e565b5f604051808303815f865af19150503d805f8114610c43576040519150601f19603f3d011682016040523d82523d5f602084013e610c48565b606091505b5050905080610c83576040517f360e42e100000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b6002545f546040517fffffffffffffffffffffffffffffffffffffffff000000000000000000000000606093841b811660208301529289901b9092166034830152604882015273ffffffffffffffffffffffffffffffffffffffff8716907f9ad2e7a4af16dceda9cce4274b2f59c328d8c012eb0e15eb5e1e73b7d8f264d390606801604080517fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe081840301815290829052610d3e916111ac565b60405180910390a250600195945050505050565b5f610d5c84610f2d565b949350505050565b610d6c610e24565b63389a75e1600c52805f526020600c208054421115610d9257636f5e88185f526004601cfd5b5f905561061881610ec8565b610da6610e24565b8060601b610dbb57637448fbae5f526004601cfd5b61061881610ec8565b5f7fffffffff0000000000000000000000000000000000000000000000000000000082167fa9216705000000000000000000000000000000000000000000000000000000001480610608575061060882610f6a565b61062d82825f611000565b7fffffffffffffffffffffffffffffffffffffffffffffffffffffffff74873927543314610920576382b429005f526004601cfd5b61062d82826001611000565b73ffffffffffffffffffffffffffffffffffffffff167fffffffffffffffffffffffffffffffffffffffffffffffffffffffff74873927819055805f7f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e08180a350565b7fffffffffffffffffffffffffffffffffffffffffffffffffffffffff74873927805473ffffffffffffffffffffffffffffffffffffffff9092169182907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e05f80a355565b73ffffffffffffffffffffffffffffffffffffffff81165f9081526001602052604081205460ff1615801561060857506003546005541092915050565b5f7fffffffff0000000000000000000000000000000000000000000000000000000082167f6ab67a0d00000000000000000000000000000000000000000000000000000000148061060857507f01ffc9a7000000000000000000000000000000000000000000000000000000007fffffffff00000000000000000000000000000000000000000000000000000000831614610608565b638b78c6d8600c52825f526020600c20805483811783611021575080841681185b80835580600c5160601c7f715ad5ce61fc9595c7b415289d59cf203f23a94fa06f04af7e489a0a76e1fe265f80a3505050505050565b80357fffffffff0000000000000000000000000000000000000000000000000000000081168114611086575f80fd5b919050565b5f6020828403121561109b575f80fd5b6110a482611057565b9392505050565b5f602082840312156110bb575f80fd5b5035919050565b73ffffffffffffffffffffffffffffffffffffffff81168114610618575f80fd5b5f80604083850312156110f4575f80fd5b82356110ff816110c2565b946020939093013593505050565b5f6020828403121561111d575f80fd5b81356110a4816110c2565b5f8083601f840112611138575f80fd5b50813567ffffffffffffffff81111561114f575f80fd5b602083019150836020828501011115611166575f80fd5b9250929050565b5f806020838503121561117e575f80fd5b823567ffffffffffffffff811115611194575f80fd5b6111a085828601611128565b90969095509350505050565b602081525f82518060208401528060208501604085015e5f6040828501015260407fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0601f83011684010191505092915050565b5f805f60408486031215611211575f80fd5b833561121c816110c2565b9250602084013567ffffffffffffffff811115611237575f80fd5b61124386828701611128565b9497909650939450505050565b5f6080828403128015611261575f80fd5b506040516080810167ffffffffffffffff811182821017156112aa577f4e487b71000000000000000000000000000000000000000000000000000000005f52604160045260245ffd5b60405282356112b8816110c2565b81526112c660208401611057565b6020820152604083810135908201526060928301359281019290925250919050565b5f602082840312156112f8575f80fd5b81516110a4816110c2565b5f60208284031215611313575f80fd5b815180151581146110a4575f80fd5b5f7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff8203611377577f4e487b71000000000000000000000000000000000000000000000000000000005f52601160045260245ffd5b5060010190565b5f82518060208501845e5f92019182525091905056fea2646970667358221220ffbdb425e855f60328c6ebf81b28965fc1d20a52c81e723566d80b77f491fc3964736f6c634300081a0033", c = { BASE_URL: "/", DEV: !1, MODE: "production", PROD: !0, SSR: !1, VITE_BOOST_MAINNET_SIGNER_EOA: "0xCBD0C302040bC803B4B2EDaF21Be0e49Deff5480", VITE_BOOST_TESTNET_SIGNER_EOA: "0xd63167e9db11B108940b2E8236581F961f33f396" }, e = class e extends V {
|
|
7
|
+
const R = "0x6080604052348015600e575f80fd5b5060156019565b607c565b63409feecd198054600181161560365763f92ee8a95f526004601cfd5b6001600160401b03808260011c146077578060011b8355806020527fc7f505b2f371ae2175ee4913f4499e1f2633a7b5936321eed1cdaeb6115181d2602080a15b505050565b6113ca806100895f395ff3fe6080604052600436106101af575f3560e01c8063514e62fc116100e7578063c884ef8311610087578063ea3d508a11610062578063ea3d508a14610543578063f04e283e1461055c578063f2fde38b1461056f578063fee81cf414610582575f80fd5b8063c884ef83146104e1578063db09da121461050f578063dcc59b6f1461052e575f80fd5b80638da5cb5b116100c25780638da5cb5b1461044e578063a270a73714610481578063a4d66daf146104ad578063bb1757cf146104c2575f80fd5b8063514e62fc1461040957806354d1f13d1461043e578063715018a614610446575f80fd5b806328d6183b11610152578063439fab911161012d578063439fab9114610354578063474f5a44146103735780634a4ee7b1146103bc5780634e7165a2146103cf575f80fd5b806328d6183b1461027d5780632de94807146102dc57806338d52e0f1461030d575f80fd5b80631c10893f1161018d5780631c10893f146102195780631cd64df41461022c578063228cb733146102615780632569296214610275575f80fd5b806301ffc9a7146101b357806307621eca146101e7578063183a4f6e14610204575b5f80fd5b3480156101be575f80fd5b506101d26101cd36600461108b565b6105b3565b60405190151581526020015b60405180910390f35b3480156101f2575f80fd5b505f545b6040519081526020016101de565b6102176102123660046110ab565b61060e565b005b6102176102273660046110e3565b61061b565b348015610237575f80fd5b506101d26102463660046110e3565b638b78c6d8600c9081525f9290925260209091205481161490565b34801561026c575f80fd5b506101f65f5481565b610217610631565b348015610288575f80fd5b507f0d36a40d000000000000000000000000000000000000000000000000000000005b6040517fffffffff0000000000000000000000000000000000000000000000000000000090911681526020016101de565b3480156102e7575f80fd5b506101f66102f636600461110d565b638b78c6d8600c9081525f91909152602090205490565b348015610318575f80fd5b5073deaddeaddeaddeaddeaddeaddeaddeaddeaddead5b60405173ffffffffffffffffffffffffffffffffffffffff90911681526020016101de565b34801561035f575f80fd5b5061021761036e36600461116d565b61067e565b34801561037e575f80fd5b5061039261038d36600461116d565b610890565b6040805192835273ffffffffffffffffffffffffffffffffffffffff9091166020830152016101de565b6102176103ca3660046110e3565b6108c4565b3480156103da575f80fd5b506103fc6103e936600461116d565b5050604080515f81526020810190915290565b6040516101de91906111ac565b348015610414575f80fd5b506101d26104233660046110e3565b638b78c6d8600c9081525f9290925260209091205416151590565b6102176108d6565b61021761090f565b348015610459575f80fd5b507fffffffffffffffffffffffffffffffffffffffffffffffffffffffff748739275461032f565b34801561048c575f80fd5b5060025461032f9073ffffffffffffffffffffffffffffffffffffffff1681565b3480156104b8575f80fd5b506101f660035481565b3480156104cd575f80fd5b506101d26104dc3660046111ff565b610922565b3480156104ec575f80fd5b506101d26104fb36600461110d565b60016020525f908152604090205460ff1681565b34801561051a575f80fd5b506101d26105293660046111ff565b610d52565b348015610539575f80fd5b506101f660055481565b34801561054e575f80fd5b506004546102ab9060e01b81565b61021761056a36600461110d565b610d64565b61021761057d36600461110d565b610d9e565b34801561058d575f80fd5b506101f661059c36600461110d565b63389a75e1600c9081525f91909152602090205490565b5f7fffffffff0000000000000000000000000000000000000000000000000000000082167f0d36a40d000000000000000000000000000000000000000000000000000000001480610608575061060882610dc4565b92915050565b6106183382610e19565b50565b610623610e24565b61062d8282610e59565b5050565b5f6202a30067ffffffffffffffff164201905063389a75e1600c52335f52806020600c2055337fdbf36a107da19e49527a7176a1babf963b4b0ff8cde35ee35d6cd8f1f9ac7e1d5f80a250565b7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffbf60113280546003825580156106cf5760018160011c14303b106106c65763f92ee8a95f526004601cfd5b818160ff1b1b91505b505f6106dd83850185611250565b905080604001515f14806106f357506060810151155b1561072a576040517ff92ee8a900000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b8051600280547fffffffffffffffffffffffff00000000000000000000000000000000000000001673ffffffffffffffffffffffffffffffffffffffff9092169190911790556020810151600480547fffffffffffffffffffffffffffffffffffffffffffffffffffffffff000000001660e09290921c91909117905560408101515f5560608101516003556107bf33610e65565b805f015173ffffffffffffffffffffffffffffffffffffffff167fef49c8fd80435c15980f0f55660ffaac9417e5843768f7f21566cfad2d19bfe782602001518360400151846060015160405161084d939291907fffffffff000000000000000000000000000000000000000000000000000000009390931683526020830191909152604082015260600190565b60405180910390a250801561088b576002815560016020527fc7f505b2f371ae2175ee4913f4499e1f2633a7b5936321eed1cdaeb6115181d2602080a15b505050565b5f806040517fd623472500000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b6108cc610e24565b61062d8282610e19565b63389a75e1600c52335f525f6020600c2055337ffa7b8eab7da67f412cc9575ed43464468f9bfbae89d1675917346ca6d8fe3c925f80a2565b610917610e24565b6109205f610ec8565b565b5f61092b610e24565b600254604080517f8da5cb5b000000000000000000000000000000000000000000000000000000008152905173ffffffffffffffffffffffffffffffffffffffff9092169130918391638da5cb5b916004808201926020929091908290030181865afa15801561099d573d5f803e3d5ffd5b505050506040513d601f19601f820116820180604052508101906109c191906112e8565b73ffffffffffffffffffffffffffffffffffffffff1614158015610a7a57506040517f514e62fc0000000000000000000000000000000000000000000000000000000081523060048201526002602482015273ffffffffffffffffffffffffffffffffffffffff82169063514e62fc90604401602060405180830381865afa158015610a4f573d5f803e3d5ffd5b505050506040513d601f19601f82011682018060405250810190610a739190611303565b1515600114155b15610ab1576040517f82b4290000000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b610aba85610f2d565b610af0576040517f6247a84e00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b60058054905f610aff83611322565b909155505073ffffffffffffffffffffffffffffffffffffffff8581165f81815260016020819052604080832080547fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff001690921790915560025460045483549251602481019590955260448501929092529193919091169160e09190911b90606401604080517fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe08184030181529181526020820180517bffffffffffffffffffffffffffffffffffffffffffffffffffffffff167fffffffff00000000000000000000000000000000000000000000000000000000909416939093179092529051610c0a919061137e565b5f604051808303815f865af19150503d805f8114610c43576040519150601f19603f3d011682016040523d82523d5f602084013e610c48565b606091505b5050905080610c83576040517f360e42e100000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b6002545f546040517fffffffffffffffffffffffffffffffffffffffff000000000000000000000000606093841b811660208301529289901b9092166034830152604882015273ffffffffffffffffffffffffffffffffffffffff8716907f9ad2e7a4af16dceda9cce4274b2f59c328d8c012eb0e15eb5e1e73b7d8f264d390606801604080517fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe081840301815290829052610d3e916111ac565b60405180910390a250600195945050505050565b5f610d5c84610f2d565b949350505050565b610d6c610e24565b63389a75e1600c52805f526020600c208054421115610d9257636f5e88185f526004601cfd5b5f905561061881610ec8565b610da6610e24565b8060601b610dbb57637448fbae5f526004601cfd5b61061881610ec8565b5f7fffffffff0000000000000000000000000000000000000000000000000000000082167fa9216705000000000000000000000000000000000000000000000000000000001480610608575061060882610f6a565b61062d82825f611000565b7fffffffffffffffffffffffffffffffffffffffffffffffffffffffff74873927543314610920576382b429005f526004601cfd5b61062d82826001611000565b73ffffffffffffffffffffffffffffffffffffffff167fffffffffffffffffffffffffffffffffffffffffffffffffffffffff74873927819055805f7f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e08180a350565b7fffffffffffffffffffffffffffffffffffffffffffffffffffffffff74873927805473ffffffffffffffffffffffffffffffffffffffff9092169182907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e05f80a355565b73ffffffffffffffffffffffffffffffffffffffff81165f9081526001602052604081205460ff1615801561060857506003546005541092915050565b5f7fffffffff0000000000000000000000000000000000000000000000000000000082167f6ab67a0d00000000000000000000000000000000000000000000000000000000148061060857507f01ffc9a7000000000000000000000000000000000000000000000000000000007fffffffff00000000000000000000000000000000000000000000000000000000831614610608565b638b78c6d8600c52825f526020600c20805483811783611021575080841681185b80835580600c5160601c7f715ad5ce61fc9595c7b415289d59cf203f23a94fa06f04af7e489a0a76e1fe265f80a3505050505050565b80357fffffffff0000000000000000000000000000000000000000000000000000000081168114611086575f80fd5b919050565b5f6020828403121561109b575f80fd5b6110a482611057565b9392505050565b5f602082840312156110bb575f80fd5b5035919050565b73ffffffffffffffffffffffffffffffffffffffff81168114610618575f80fd5b5f80604083850312156110f4575f80fd5b82356110ff816110c2565b946020939093013593505050565b5f6020828403121561111d575f80fd5b81356110a4816110c2565b5f8083601f840112611138575f80fd5b50813567ffffffffffffffff81111561114f575f80fd5b602083019150836020828501011115611166575f80fd5b9250929050565b5f806020838503121561117e575f80fd5b823567ffffffffffffffff811115611194575f80fd5b6111a085828601611128565b90969095509350505050565b602081525f82518060208401528060208501604085015e5f6040828501015260407fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0601f83011684010191505092915050565b5f805f60408486031215611211575f80fd5b833561121c816110c2565b9250602084013567ffffffffffffffff811115611237575f80fd5b61124386828701611128565b9497909650939450505050565b5f6080828403128015611261575f80fd5b506040516080810167ffffffffffffffff811182821017156112aa577f4e487b71000000000000000000000000000000000000000000000000000000005f52604160045260245ffd5b60405282356112b8816110c2565b81526112c660208401611057565b6020820152604083810135908201526060928301359281019290925250919050565b5f602082840312156112f8575f80fd5b81516110a4816110c2565b5f60208284031215611313575f80fd5b815180151581146110a4575f80fd5b5f7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff8203611377577f4e487b71000000000000000000000000000000000000000000000000000000005f52601160045260245ffd5b5060010190565b5f82518060208501845e5f92019182525091905056fea26469706673582212200bda90f158411392f8285d4968c6a3fb89d36d405e24c31ab345de224e70a4cd64736f6c634300081a0033", c = { BASE_URL: "/", DEV: !1, MODE: "production", PROD: !0, SSR: !1, VITE_BOOST_MAINNET_SIGNER_EOA: "0xCBD0C302040bC803B4B2EDaF21Be0e49Deff5480", VITE_BOOST_TESTNET_SIGNER_EOA: "0xd63167e9db11B108940b2E8236581F961f33f396" }, d = class d extends V {
|
|
8
8
|
constructor() {
|
|
9
9
|
super(...arguments), this.abi = s;
|
|
10
10
|
}
|
|
@@ -140,7 +140,7 @@ const R = "0x6080604052348015600e575f80fd5b5060156019565b607c565b63409feecd19805
|
|
|
140
140
|
* @returns {Promise<{ hash: `0x${string}`; result: boolean; }>} - True if the incentive was successfully claimed
|
|
141
141
|
*/
|
|
142
142
|
async claimRaw(f, b) {
|
|
143
|
-
const { request: a, result:
|
|
143
|
+
const { request: a, result: e } = await p(
|
|
144
144
|
this._config,
|
|
145
145
|
{
|
|
146
146
|
address: this.assertValidAddress(),
|
|
@@ -150,7 +150,7 @@ const R = "0x6080604052348015600e575f80fd5b5060156019565b607c565b63409feecd19805
|
|
|
150
150
|
...b
|
|
151
151
|
}
|
|
152
152
|
);
|
|
153
|
-
return { hash: await g(this._config, a), result:
|
|
153
|
+
return { hash: await g(this._config, a), result: e };
|
|
154
154
|
}
|
|
155
155
|
/**
|
|
156
156
|
* Check if an incentive is claimable.
|
|
@@ -206,7 +206,7 @@ const R = "0x6080604052348015600e575f80fd5b5060156019565b607c565b63409feecd19805
|
|
|
206
206
|
* @returns {GenericDeployableParams}
|
|
207
207
|
*/
|
|
208
208
|
buildParameters(f, b) {
|
|
209
|
-
const [a,
|
|
209
|
+
const [a, e] = this.validateDeploymentConfig(
|
|
210
210
|
f,
|
|
211
211
|
b
|
|
212
212
|
);
|
|
@@ -214,7 +214,7 @@ const R = "0x6080604052348015600e575f80fd5b5060156019565b607c565b63409feecd19805
|
|
|
214
214
|
abi: s,
|
|
215
215
|
bytecode: R,
|
|
216
216
|
args: [I(a)],
|
|
217
|
-
...this.optionallyAttachAccount(
|
|
217
|
+
...this.optionallyAttachAccount(e.account)
|
|
218
218
|
};
|
|
219
219
|
}
|
|
220
220
|
/**
|
|
@@ -250,11 +250,11 @@ const R = "0x6080604052348015600e575f80fd5b5060156019565b607c565b63409feecd19805
|
|
|
250
250
|
return w;
|
|
251
251
|
}
|
|
252
252
|
};
|
|
253
|
-
|
|
253
|
+
d.bases = {
|
|
254
254
|
...c != null && c.VITE_POINTS_INCENTIVE_BASE ? { 31337: void 0 } : {},
|
|
255
255
|
...T
|
|
256
|
-
},
|
|
257
|
-
let t =
|
|
256
|
+
}, d.registryType = C.INCENTIVE;
|
|
257
|
+
let t = d;
|
|
258
258
|
const I = ({
|
|
259
259
|
venue: r,
|
|
260
260
|
selector: f,
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
"use strict";const a=require("./generated-dd4FN0Fo.cjs"),y=require("@wagmi/core"),n=require("viem"),A=require("./deployments-BjBgk03b.cjs"),p=require("./Deployable/DeployableTargetWithRBAC.cjs"),w=require("./errors.cjs"),E=require("./utils.cjs"),u="0x6080604052348015600e575f80fd5b5060156019565b607c565b63409feecd198054600181161560365763f92ee8a95f526004601cfd5b6001600160401b03808260011c146077578060011b8355806020527fc7f505b2f371ae2175ee4913f4499e1f2633a7b5936321eed1cdaeb6115181d2602080a15b505050565b611161806100895f395ff3fe608060405260043610610183575f3560e01c806354d1f13d116100d1578063e3f756de1161007c578063f2fde38b11610057578063f2fde38b14610446578063fe9fbb8014610459578063fee81cf414610478575f80fd5b8063e3f756de146103d8578063ec87621c1461041f578063f04e283e14610433575f80fd5b80638da5cb5b116100ac5780638da5cb5b14610362578063be4994f81461039a578063dcc21361146103b9575f80fd5b806354d1f13d1461033e578063715018a61461034657806375b238fc1461034e575f80fd5b806328d6183b11610131578063439fab911161010c578063439fab91146102d75780634a4ee7b1146102f6578063514e62fc14610309575f80fd5b806328d6183b1461023f5780632de94807146102795780634359d28a146102b8575f80fd5b80631c10893f116101615780631c10893f146101ef5780631cd64df4146102025780632569296214610237575f80fd5b806301ffc9a714610187578063141973b0146101bb578063183a4f6e146101dc575b5f80fd5b348015610192575f80fd5b506101a66101a1366004610d5f565b6104a9565b60405190151581526020015b60405180910390f35b3480156101c6575f80fd5b506101da6101d5366004610ded565b610504565b005b6101da6101ea366004610e59565b610637565b6101da6101fd366004610ea1565b610644565b34801561020d575f80fd5b506101a661021c366004610ea1565b638b78c6d8600c9081525f9290925260209091205481161490565b6101da61065a565b34801561024a575f80fd5b506040517f3d30a22c0000000000000000000000000000000000000000000000000000000081526020016101b2565b348015610284575f80fd5b506102aa610293366004610ecb565b638b78c6d8600c9081525f91909152602090205490565b6040519081526020016101b2565b3480156102c3575f80fd5b506101da6102d2366004610ded565b6106a7565b3480156102e2575f80fd5b506101da6102f1366004610f24565b6107a1565b6101da610304366004610ea1565b6108d0565b348015610314575f80fd5b506101a6610323366004610ea1565b638b78c6d8600c9081525f9290925260209091205416151590565b6101da6108e2565b6101da61091b565b348015610359575f80fd5b506102aa600281565b34801561036d575f80fd5b50638b78c6d8195460405173ffffffffffffffffffffffffffffffffffffffff90911681526020016101b2565b3480156103a5575f80fd5b506101da6103b4366004610ded565b61092e565b3480156103c4575f80fd5b506101da6103d3366004610ded565b6109cc565b3480156103e3575f80fd5b506101a66103f2366004610f63565b505073ffffffffffffffffffffffffffffffffffffffff165f9081526020819052604090205460ff161590565b34801561042a575f80fd5b506102aa600181565b6101da610441366004610ecb565b610a6a565b6101da610454366004610ecb565b610aa4565b348015610464575f80fd5b506101a6610473366004610ecb565b610aca565b348015610483575f80fd5b506102aa610492366004610ecb565b63389a75e1600c9081525f91909152602090205490565b5f7fffffffff0000000000000000000000000000000000000000000000000000000082167f3d30a22c0000000000000000000000000000000000000000000000000000000014806104fe57506104fe82610b29565b92915050565b61050d33610aca565b610543576040517f82b4290000000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b82811461057c576040517fff633a3800000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b5f5b838110156106305782828281811061059857610598610fb4565b90506020020160208101906105ad9190610fe1565b5f808787858181106105c1576105c1610fb4565b90506020020160208101906105d69190610ecb565b73ffffffffffffffffffffffffffffffffffffffff16815260208101919091526040015f2080547fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff001691151591909117905560010161057e565b5050505050565b6106413382610b7e565b50565b61064c610b89565b6106568282610ba3565b5050565b5f6202a30067ffffffffffffffff164201905063389a75e1600c52335f52806020600c2055337fdbf36a107da19e49527a7176a1babf963b4b0ff8cde35ee35d6cd8f1f9ac7e1d5f80a250565b60026106b281610baf565b8382146106eb576040517fff633a3800000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b5f5b84811015610799575f84848381811061070857610708610fb4565b905060200201602081019061071d9190610fe1565b905080151560010361075f5761075a87878481811061073e5761073e610fb4565b90506020020160208101906107539190610ecb565b6001610ba3565b610790565b61079087878481811061077457610774610fb4565b90506020020160208101906107899190610ecb565b6001610b7e565b506001016106ed565b505050505050565b7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffbf60113280546003825580156107f25760018160011c14303b106107e95763f92ee8a95f526004601cfd5b818160ff1b1b91505b505f806108018486018661102d565b9150915061080e82610be0565b5f5b81518110156108935760015f8084848151811061082f5761082f610fb4565b60209081029190910181015173ffffffffffffffffffffffffffffffffffffffff1682528101919091526040015f2080547fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff0016911515919091179055600101610810565b50505080156108cb576002815560016020527fc7f505b2f371ae2175ee4913f4499e1f2633a7b5936321eed1cdaeb6115181d2602080a15b505050565b6108d8610b89565b6106568282610b7e565b63389a75e1600c52335f525f6020600c2055337ffa7b8eab7da67f412cc9575ed43464468f9bfbae89d1675917346ca6d8fe3c925f80a2565b610923610b89565b61092c5f610c28565b565b600261093981610baf565b838214610972576040517fff633a3800000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b5f5b84811015610799576109c486868381811061099157610991610fb4565b90506020020160208101906109a69190610ecb565b8585848181106109b8576109b8610fb4565b90506020020135610ba3565b600101610974565b60026109d781610baf565b838214610a10576040517fff633a3800000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b5f5b8481101561079957610a62868683818110610a2f57610a2f610fb4565b9050602002016020810190610a449190610ecb565b858584818110610a5657610a56610fb4565b90506020020135610b7e565b600101610a12565b610a72610b89565b63389a75e1600c52805f526020600c208054421115610a9857636f5e88185f526004601cfd5b5f905561064181610c28565b610aac610b89565b8060601b610ac157637448fbae5f526004601cfd5b61064181610c28565b5f8173ffffffffffffffffffffffffffffffffffffffff16610aef638b78c6d8195490565b73ffffffffffffffffffffffffffffffffffffffff1614806104fe5750638b78c6d8600c9081525f839052602090205460031615156104fe565b5f7fffffffff0000000000000000000000000000000000000000000000000000000082167fe2089f790000000000000000000000000000000000000000000000000000000014806104fe57506104fe82610c72565b61065682825f610d08565b638b78c6d81954331461092c576382b429005f526004601cfd5b61065682826001610d08565b638b78c6d81954331461064157638b78c6d8600c52335f52806020600c205416610641576382b429005f526004601cfd5b73ffffffffffffffffffffffffffffffffffffffff16638b78c6d819819055805f7f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e08180a350565b638b78c6d819805473ffffffffffffffffffffffffffffffffffffffff9092169182907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e05f80a355565b5f7fffffffff0000000000000000000000000000000000000000000000000000000082167f6ab67a0d0000000000000000000000000000000000000000000000000000000014806104fe57507f01ffc9a7000000000000000000000000000000000000000000000000000000007fffffffff000000000000000000000000000000000000000000000000000000008316146104fe565b638b78c6d8600c52825f526020600c20805483811783610d29575080841681185b80835580600c5160601c7f715ad5ce61fc9595c7b415289d59cf203f23a94fa06f04af7e489a0a76e1fe265f80a3505050505050565b5f60208284031215610d6f575f80fd5b81357fffffffff0000000000000000000000000000000000000000000000000000000081168114610d9e575f80fd5b9392505050565b5f8083601f840112610db5575f80fd5b50813567ffffffffffffffff811115610dcc575f80fd5b6020830191508360208260051b8501011115610de6575f80fd5b9250929050565b5f805f8060408587031215610e00575f80fd5b843567ffffffffffffffff811115610e16575f80fd5b610e2287828801610da5565b909550935050602085013567ffffffffffffffff811115610e41575f80fd5b610e4d87828801610da5565b95989497509550505050565b5f60208284031215610e69575f80fd5b5035919050565b73ffffffffffffffffffffffffffffffffffffffff81168114610641575f80fd5b8035610e9c81610e70565b919050565b5f8060408385031215610eb2575f80fd5b8235610ebd81610e70565b946020939093013593505050565b5f60208284031215610edb575f80fd5b8135610d9e81610e70565b5f8083601f840112610ef6575f80fd5b50813567ffffffffffffffff811115610f0d575f80fd5b602083019150836020828501011115610de6575f80fd5b5f8060208385031215610f35575f80fd5b823567ffffffffffffffff811115610f4b575f80fd5b610f5785828601610ee6565b90969095509350505050565b5f805f60408486031215610f75575f80fd5b8335610f8081610e70565b9250602084013567ffffffffffffffff811115610f9b575f80fd5b610fa786828701610ee6565b9497909650939450505050565b7f4e487b71000000000000000000000000000000000000000000000000000000005f52603260045260245ffd5b5f60208284031215610ff1575f80fd5b81358015158114610d9e575f80fd5b7f4e487b71000000000000000000000000000000000000000000000000000000005f52604160045260245ffd5b5f806040838503121561103e575f80fd5b823561104981610e70565b9150602083013567ffffffffffffffff811115611064575f80fd5b8301601f81018513611074575f80fd5b803567ffffffffffffffff81111561108e5761108e611000565b8060051b6040517fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0603f830116810181811067ffffffffffffffff821117156110d9576110d9611000565b6040529182526020818401810192908101888411156110f6575f80fd5b6020850194505b8385101561111c5761110e85610e91565b8152602094850194016110fd565b5080945050505050925092905056fea26469706673582212204d69d936427ed13e47d0a46a2354492a587c169d0bded852cb9b8d6f720204b864736f6c634300081a0033",r={BASE_URL:"/",DEV:!1,MODE:"production",PROD:!0,SSR:!1,VITE_BOOST_MAINNET_SIGNER_EOA:"0xCBD0C302040bC803B4B2EDaF21Be0e49Deff5480",VITE_BOOST_TESTNET_SIGNER_EOA:"0xd63167e9db11B108940b2E8236581F961f33f396"},t=class t extends p.DeployableTargetWithRBAC{constructor(){super(...arguments),this.abi=a.P}async owner(f){return await a.r3(this._config,{...this.optionallyAttachAccount(),...f,address:this.assertValidAddress(),args:[]})}async isAllowed(f,b){return await a.J3(this._config,{address:this.assertValidAddress(),args:[f,n.zeroHash],...this.optionallyAttachAccount(),...b})}async setDenied(f,b,c){return await this.awaitResult(this.setDeniedRaw(f,b,c))}async setDeniedRaw(f,b,c){const{request:e,result:d}=await a.C7(this._config,{address:this.assertValidAddress(),args:[f,b],...this.optionallyAttachAccount(),...c});return{hash:await a.m7(this._config,e),result:d}}buildParameters(f,b){var s;const[c,e]=this.validateDeploymentConfig(f,b),d=c;if(!d.owner||d.owner===n.zeroAddress){const o=e.account?e.account.address:e.config?y.getAccount(e.config).address:(s=this._account)==null?void 0:s.address;if(o)d.owner=o;else throw new w.DeployableUnknownOwnerProvidedError}return{abi:a.P,bytecode:u,args:[l(d)],...this.optionallyAttachAccount(e.account)}}};t.bases={...r!=null&&r.VITE_SIMPLE_DENYLIST_BASE?{31337:void 0}:{},...A.SimpleDenyList},t.registryType=E.RegistryType.ALLOW_LIST;let i=t;function l({owner:h,denied:f}){return n.encodeAbiParameters([{type:"address",name:"owner"},{type:"address[]",name:"denied"}],[h,f])}exports.SimpleDenyList=i;exports.bytecode=u;exports.prepareSimpleDenyListPayload=l;
|
|
2
|
-
//# sourceMappingURL=SimpleDenyList-
|
|
1
|
+
"use strict";const a=require("./generated-BzLYuFx3.cjs"),y=require("@wagmi/core"),n=require("viem"),A=require("./deployments-DimWVnA4.cjs"),p=require("./Deployable/DeployableTargetWithRBAC.cjs"),w=require("./errors.cjs"),E=require("./utils.cjs"),u="0x6080604052348015600e575f80fd5b5060156019565b607c565b63409feecd198054600181161560365763f92ee8a95f526004601cfd5b6001600160401b03808260011c146077578060011b8355806020527fc7f505b2f371ae2175ee4913f4499e1f2633a7b5936321eed1cdaeb6115181d2602080a15b505050565b611161806100895f395ff3fe608060405260043610610183575f3560e01c806354d1f13d116100d1578063e3f756de1161007c578063f2fde38b11610057578063f2fde38b14610446578063fe9fbb8014610459578063fee81cf414610478575f80fd5b8063e3f756de146103d8578063ec87621c1461041f578063f04e283e14610433575f80fd5b80638da5cb5b116100ac5780638da5cb5b14610362578063be4994f81461039a578063dcc21361146103b9575f80fd5b806354d1f13d1461033e578063715018a61461034657806375b238fc1461034e575f80fd5b806328d6183b11610131578063439fab911161010c578063439fab91146102d75780634a4ee7b1146102f6578063514e62fc14610309575f80fd5b806328d6183b1461023f5780632de94807146102795780634359d28a146102b8575f80fd5b80631c10893f116101615780631c10893f146101ef5780631cd64df4146102025780632569296214610237575f80fd5b806301ffc9a714610187578063141973b0146101bb578063183a4f6e146101dc575b5f80fd5b348015610192575f80fd5b506101a66101a1366004610d5f565b6104a9565b60405190151581526020015b60405180910390f35b3480156101c6575f80fd5b506101da6101d5366004610ded565b610504565b005b6101da6101ea366004610e59565b610637565b6101da6101fd366004610ea1565b610644565b34801561020d575f80fd5b506101a661021c366004610ea1565b638b78c6d8600c9081525f9290925260209091205481161490565b6101da61065a565b34801561024a575f80fd5b506040517f3d30a22c0000000000000000000000000000000000000000000000000000000081526020016101b2565b348015610284575f80fd5b506102aa610293366004610ecb565b638b78c6d8600c9081525f91909152602090205490565b6040519081526020016101b2565b3480156102c3575f80fd5b506101da6102d2366004610ded565b6106a7565b3480156102e2575f80fd5b506101da6102f1366004610f24565b6107a1565b6101da610304366004610ea1565b6108d0565b348015610314575f80fd5b506101a6610323366004610ea1565b638b78c6d8600c9081525f9290925260209091205416151590565b6101da6108e2565b6101da61091b565b348015610359575f80fd5b506102aa600281565b34801561036d575f80fd5b50638b78c6d8195460405173ffffffffffffffffffffffffffffffffffffffff90911681526020016101b2565b3480156103a5575f80fd5b506101da6103b4366004610ded565b61092e565b3480156103c4575f80fd5b506101da6103d3366004610ded565b6109cc565b3480156103e3575f80fd5b506101a66103f2366004610f63565b505073ffffffffffffffffffffffffffffffffffffffff165f9081526020819052604090205460ff161590565b34801561042a575f80fd5b506102aa600181565b6101da610441366004610ecb565b610a6a565b6101da610454366004610ecb565b610aa4565b348015610464575f80fd5b506101a6610473366004610ecb565b610aca565b348015610483575f80fd5b506102aa610492366004610ecb565b63389a75e1600c9081525f91909152602090205490565b5f7fffffffff0000000000000000000000000000000000000000000000000000000082167f3d30a22c0000000000000000000000000000000000000000000000000000000014806104fe57506104fe82610b29565b92915050565b61050d33610aca565b610543576040517f82b4290000000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b82811461057c576040517fff633a3800000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b5f5b838110156106305782828281811061059857610598610fb4565b90506020020160208101906105ad9190610fe1565b5f808787858181106105c1576105c1610fb4565b90506020020160208101906105d69190610ecb565b73ffffffffffffffffffffffffffffffffffffffff16815260208101919091526040015f2080547fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff001691151591909117905560010161057e565b5050505050565b6106413382610b7e565b50565b61064c610b89565b6106568282610ba3565b5050565b5f6202a30067ffffffffffffffff164201905063389a75e1600c52335f52806020600c2055337fdbf36a107da19e49527a7176a1babf963b4b0ff8cde35ee35d6cd8f1f9ac7e1d5f80a250565b60026106b281610baf565b8382146106eb576040517fff633a3800000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b5f5b84811015610799575f84848381811061070857610708610fb4565b905060200201602081019061071d9190610fe1565b905080151560010361075f5761075a87878481811061073e5761073e610fb4565b90506020020160208101906107539190610ecb565b6001610ba3565b610790565b61079087878481811061077457610774610fb4565b90506020020160208101906107899190610ecb565b6001610b7e565b506001016106ed565b505050505050565b7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffbf60113280546003825580156107f25760018160011c14303b106107e95763f92ee8a95f526004601cfd5b818160ff1b1b91505b505f806108018486018661102d565b9150915061080e82610be0565b5f5b81518110156108935760015f8084848151811061082f5761082f610fb4565b60209081029190910181015173ffffffffffffffffffffffffffffffffffffffff1682528101919091526040015f2080547fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff0016911515919091179055600101610810565b50505080156108cb576002815560016020527fc7f505b2f371ae2175ee4913f4499e1f2633a7b5936321eed1cdaeb6115181d2602080a15b505050565b6108d8610b89565b6106568282610b7e565b63389a75e1600c52335f525f6020600c2055337ffa7b8eab7da67f412cc9575ed43464468f9bfbae89d1675917346ca6d8fe3c925f80a2565b610923610b89565b61092c5f610c28565b565b600261093981610baf565b838214610972576040517fff633a3800000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b5f5b84811015610799576109c486868381811061099157610991610fb4565b90506020020160208101906109a69190610ecb565b8585848181106109b8576109b8610fb4565b90506020020135610ba3565b600101610974565b60026109d781610baf565b838214610a10576040517fff633a3800000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b5f5b8481101561079957610a62868683818110610a2f57610a2f610fb4565b9050602002016020810190610a449190610ecb565b858584818110610a5657610a56610fb4565b90506020020135610b7e565b600101610a12565b610a72610b89565b63389a75e1600c52805f526020600c208054421115610a9857636f5e88185f526004601cfd5b5f905561064181610c28565b610aac610b89565b8060601b610ac157637448fbae5f526004601cfd5b61064181610c28565b5f8173ffffffffffffffffffffffffffffffffffffffff16610aef638b78c6d8195490565b73ffffffffffffffffffffffffffffffffffffffff1614806104fe5750638b78c6d8600c9081525f839052602090205460031615156104fe565b5f7fffffffff0000000000000000000000000000000000000000000000000000000082167fe2089f790000000000000000000000000000000000000000000000000000000014806104fe57506104fe82610c72565b61065682825f610d08565b638b78c6d81954331461092c576382b429005f526004601cfd5b61065682826001610d08565b638b78c6d81954331461064157638b78c6d8600c52335f52806020600c205416610641576382b429005f526004601cfd5b73ffffffffffffffffffffffffffffffffffffffff16638b78c6d819819055805f7f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e08180a350565b638b78c6d819805473ffffffffffffffffffffffffffffffffffffffff9092169182907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e05f80a355565b5f7fffffffff0000000000000000000000000000000000000000000000000000000082167f6ab67a0d0000000000000000000000000000000000000000000000000000000014806104fe57507f01ffc9a7000000000000000000000000000000000000000000000000000000007fffffffff000000000000000000000000000000000000000000000000000000008316146104fe565b638b78c6d8600c52825f526020600c20805483811783610d29575080841681185b80835580600c5160601c7f715ad5ce61fc9595c7b415289d59cf203f23a94fa06f04af7e489a0a76e1fe265f80a3505050505050565b5f60208284031215610d6f575f80fd5b81357fffffffff0000000000000000000000000000000000000000000000000000000081168114610d9e575f80fd5b9392505050565b5f8083601f840112610db5575f80fd5b50813567ffffffffffffffff811115610dcc575f80fd5b6020830191508360208260051b8501011115610de6575f80fd5b9250929050565b5f805f8060408587031215610e00575f80fd5b843567ffffffffffffffff811115610e16575f80fd5b610e2287828801610da5565b909550935050602085013567ffffffffffffffff811115610e41575f80fd5b610e4d87828801610da5565b95989497509550505050565b5f60208284031215610e69575f80fd5b5035919050565b73ffffffffffffffffffffffffffffffffffffffff81168114610641575f80fd5b8035610e9c81610e70565b919050565b5f8060408385031215610eb2575f80fd5b8235610ebd81610e70565b946020939093013593505050565b5f60208284031215610edb575f80fd5b8135610d9e81610e70565b5f8083601f840112610ef6575f80fd5b50813567ffffffffffffffff811115610f0d575f80fd5b602083019150836020828501011115610de6575f80fd5b5f8060208385031215610f35575f80fd5b823567ffffffffffffffff811115610f4b575f80fd5b610f5785828601610ee6565b90969095509350505050565b5f805f60408486031215610f75575f80fd5b8335610f8081610e70565b9250602084013567ffffffffffffffff811115610f9b575f80fd5b610fa786828701610ee6565b9497909650939450505050565b7f4e487b71000000000000000000000000000000000000000000000000000000005f52603260045260245ffd5b5f60208284031215610ff1575f80fd5b81358015158114610d9e575f80fd5b7f4e487b71000000000000000000000000000000000000000000000000000000005f52604160045260245ffd5b5f806040838503121561103e575f80fd5b823561104981610e70565b9150602083013567ffffffffffffffff811115611064575f80fd5b8301601f81018513611074575f80fd5b803567ffffffffffffffff81111561108e5761108e611000565b8060051b6040517fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0603f830116810181811067ffffffffffffffff821117156110d9576110d9611000565b6040529182526020818401810192908101888411156110f6575f80fd5b6020850194505b8385101561111c5761110e85610e91565b8152602094850194016110fd565b5080945050505050925092905056fea264697066735822122015cfed9cd5ae011a6d03e982e1a53f50c8d72ae9618ad4ab2f462cb30bf07f1464736f6c634300081a0033",r={BASE_URL:"/",DEV:!1,MODE:"production",PROD:!0,SSR:!1,VITE_BOOST_MAINNET_SIGNER_EOA:"0xCBD0C302040bC803B4B2EDaF21Be0e49Deff5480",VITE_BOOST_TESTNET_SIGNER_EOA:"0xd63167e9db11B108940b2E8236581F961f33f396"},t=class t extends p.DeployableTargetWithRBAC{constructor(){super(...arguments),this.abi=a.P}async owner(f){return await a.v7(this._config,{...this.optionallyAttachAccount(),...f,address:this.assertValidAddress(),args:[]})}async isAllowed(f,b){return await a.o8(this._config,{address:this.assertValidAddress(),args:[f,n.zeroHash],...this.optionallyAttachAccount(),...b})}async setDenied(f,b,c){return await this.awaitResult(this.setDeniedRaw(f,b,c))}async setDeniedRaw(f,b,c){const{request:e,result:d}=await a.k8(this._config,{address:this.assertValidAddress(),args:[f,b],...this.optionallyAttachAccount(),...c});return{hash:await a.M8(this._config,e),result:d}}buildParameters(f,b){var s;const[c,e]=this.validateDeploymentConfig(f,b),d=c;if(!d.owner||d.owner===n.zeroAddress){const o=e.account?e.account.address:e.config?y.getAccount(e.config).address:(s=this._account)==null?void 0:s.address;if(o)d.owner=o;else throw new w.DeployableUnknownOwnerProvidedError}return{abi:a.P,bytecode:u,args:[l(d)],...this.optionallyAttachAccount(e.account)}}};t.bases={...r!=null&&r.VITE_SIMPLE_DENYLIST_BASE?{31337:void 0}:{},...A.SimpleDenyList},t.registryType=E.RegistryType.ALLOW_LIST;let i=t;function l({owner:h,denied:f}){return n.encodeAbiParameters([{type:"address",name:"owner"},{type:"address[]",name:"denied"}],[h,f])}exports.SimpleDenyList=i;exports.bytecode=u;exports.prepareSimpleDenyListPayload=l;
|
|
2
|
+
//# sourceMappingURL=SimpleDenyList-DMdld3JN.cjs.map
|