@boostxyz/sdk 6.0.2 → 6.0.3

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.
@@ -1 +1 @@
1
- {"version":3,"file":"BoostCore.js","sources":["../../../node_modules/.pnpm/@wagmi+core@2.13.8_@tanstack+query-core@5.32.0_@types+react@18.3.0_immer@10.0.2_react@18.3.0__fkpglrrrnd23klx5cgogpwpbbq/node_modules/@wagmi/core/dist/esm/actions/getAccount.js","../../../node_modules/.pnpm/@wagmi+core@2.13.8_@tanstack+query-core@5.32.0_@types+react@18.3.0_immer@10.0.2_react@18.3.0__fkpglrrrnd23klx5cgogpwpbbq/node_modules/@wagmi/core/dist/esm/actions/getChainId.js","../../../node_modules/.pnpm/@wagmi+core@2.13.8_@tanstack+query-core@5.32.0_@types+react@18.3.0_immer@10.0.2_react@18.3.0__fkpglrrrnd23klx5cgogpwpbbq/node_modules/@wagmi/core/dist/esm/utils/getAction.js","../../../node_modules/.pnpm/@wagmi+core@2.13.8_@tanstack+query-core@5.32.0_@types+react@18.3.0_immer@10.0.2_react@18.3.0__fkpglrrrnd23klx5cgogpwpbbq/node_modules/@wagmi/core/dist/esm/version.js","../../../node_modules/.pnpm/@wagmi+core@2.13.8_@tanstack+query-core@5.32.0_@types+react@18.3.0_immer@10.0.2_react@18.3.0__fkpglrrrnd23klx5cgogpwpbbq/node_modules/@wagmi/core/dist/esm/utils/getVersion.js","../../../node_modules/.pnpm/@wagmi+core@2.13.8_@tanstack+query-core@5.32.0_@types+react@18.3.0_immer@10.0.2_react@18.3.0__fkpglrrrnd23klx5cgogpwpbbq/node_modules/@wagmi/core/dist/esm/errors/base.js","../../../node_modules/.pnpm/@wagmi+core@2.13.8_@tanstack+query-core@5.32.0_@types+react@18.3.0_immer@10.0.2_react@18.3.0__fkpglrrrnd23klx5cgogpwpbbq/node_modules/@wagmi/core/dist/esm/errors/config.js","../../../node_modules/.pnpm/@wagmi+core@2.13.8_@tanstack+query-core@5.32.0_@types+react@18.3.0_immer@10.0.2_react@18.3.0__fkpglrrrnd23klx5cgogpwpbbq/node_modules/@wagmi/core/dist/esm/actions/getConnectorClient.js","../../../node_modules/.pnpm/@wagmi+core@2.13.8_@tanstack+query-core@5.32.0_@types+react@18.3.0_immer@10.0.2_react@18.3.0__fkpglrrrnd23klx5cgogpwpbbq/node_modules/@wagmi/core/dist/esm/actions/simulateContract.js","../../../node_modules/.pnpm/@wagmi+core@2.13.8_@tanstack+query-core@5.32.0_@types+react@18.3.0_immer@10.0.2_react@18.3.0__fkpglrrrnd23klx5cgogpwpbbq/node_modules/@wagmi/core/dist/esm/actions/writeContract.js","../../../node_modules/.pnpm/@wagmi+core@2.13.8_@tanstack+query-core@5.32.0_@types+react@18.3.0_immer@10.0.2_react@18.3.0__fkpglrrrnd23klx5cgogpwpbbq/node_modules/@wagmi/core/dist/esm/actions/codegen/createWriteContract.js","../src/BoostCore.ts"],"sourcesContent":["/** https://wagmi.sh/core/api/actions/getAccount */\nexport function getAccount(config) {\n const uid = config.state.current;\n const connection = config.state.connections.get(uid);\n const addresses = connection?.accounts;\n const address = addresses?.[0];\n const chain = config.chains.find((chain) => chain.id === connection?.chainId);\n const status = config.state.status;\n switch (status) {\n case 'connected':\n return {\n address: address,\n addresses: addresses,\n chain,\n chainId: connection?.chainId,\n connector: connection?.connector,\n isConnected: true,\n isConnecting: false,\n isDisconnected: false,\n isReconnecting: false,\n status,\n };\n case 'reconnecting':\n return {\n address,\n addresses,\n chain,\n chainId: connection?.chainId,\n connector: connection?.connector,\n isConnected: !!address,\n isConnecting: false,\n isDisconnected: false,\n isReconnecting: true,\n status,\n };\n case 'connecting':\n return {\n address,\n addresses,\n chain,\n chainId: connection?.chainId,\n connector: connection?.connector,\n isConnected: false,\n isConnecting: true,\n isDisconnected: false,\n isReconnecting: false,\n status,\n };\n case 'disconnected':\n return {\n address: undefined,\n addresses: undefined,\n chain: undefined,\n chainId: undefined,\n connector: undefined,\n isConnected: false,\n isConnecting: false,\n isDisconnected: true,\n isReconnecting: false,\n status,\n };\n }\n}\n//# sourceMappingURL=getAccount.js.map","/** https://wagmi.sh/core/api/actions/getChainId */\nexport function getChainId(config) {\n return config.state.chainId;\n}\n//# sourceMappingURL=getChainId.js.map","/**\n * Retrieves and returns an action from the client (if exists), and falls\n * back to the tree-shakable action.\n *\n * Useful for extracting overridden actions from a client (ie. if a consumer\n * wants to override the `sendTransaction` implementation).\n */\nexport function getAction(client, actionFn, \n// Some minifiers drop `Function.prototype.name`, or replace it with short letters,\n// meaning that `actionFn.name` will not always work. For that case, the consumer\n// needs to pass the name explicitly.\nname) {\n const action_implicit = client[actionFn.name];\n if (typeof action_implicit === 'function')\n return action_implicit;\n const action_explicit = client[name];\n if (typeof action_explicit === 'function')\n return action_explicit;\n return (params) => actionFn(client, params);\n}\n//# sourceMappingURL=getAction.js.map","export const version = '2.13.8';\n//# sourceMappingURL=version.js.map","import { version } from '../version.js';\nexport const getVersion = () => `@wagmi/core@${version}`;\n//# sourceMappingURL=getVersion.js.map","var __classPrivateFieldGet = (this && this.__classPrivateFieldGet) || function (receiver, state, kind, f) {\n if (kind === \"a\" && !f) throw new TypeError(\"Private accessor was defined without a getter\");\n if (typeof state === \"function\" ? receiver !== state || !f : !state.has(receiver)) throw new TypeError(\"Cannot read private member from an object whose class did not declare it\");\n return kind === \"m\" ? f : kind === \"a\" ? f.call(receiver) : f ? f.value : state.get(receiver);\n};\nvar _BaseError_instances, _BaseError_walk;\nimport { getVersion } from '../utils/getVersion.js';\nexport class BaseError extends Error {\n get docsBaseUrl() {\n return 'https://wagmi.sh/core';\n }\n get version() {\n return getVersion();\n }\n constructor(shortMessage, options = {}) {\n super();\n _BaseError_instances.add(this);\n Object.defineProperty(this, \"details\", {\n enumerable: true,\n configurable: true,\n writable: true,\n value: void 0\n });\n Object.defineProperty(this, \"docsPath\", {\n enumerable: true,\n configurable: true,\n writable: true,\n value: void 0\n });\n Object.defineProperty(this, \"metaMessages\", {\n enumerable: true,\n configurable: true,\n writable: true,\n value: void 0\n });\n Object.defineProperty(this, \"shortMessage\", {\n enumerable: true,\n configurable: true,\n writable: true,\n value: void 0\n });\n Object.defineProperty(this, \"name\", {\n enumerable: true,\n configurable: true,\n writable: true,\n value: 'WagmiCoreError'\n });\n const details = options.cause instanceof BaseError\n ? options.cause.details\n : options.cause?.message\n ? options.cause.message\n : options.details;\n const docsPath = options.cause instanceof BaseError\n ? options.cause.docsPath || options.docsPath\n : options.docsPath;\n this.message = [\n shortMessage || 'An error occurred.',\n '',\n ...(options.metaMessages ? [...options.metaMessages, ''] : []),\n ...(docsPath\n ? [\n `Docs: ${this.docsBaseUrl}${docsPath}.html${options.docsSlug ? `#${options.docsSlug}` : ''}`,\n ]\n : []),\n ...(details ? [`Details: ${details}`] : []),\n `Version: ${this.version}`,\n ].join('\\n');\n if (options.cause)\n this.cause = options.cause;\n this.details = details;\n this.docsPath = docsPath;\n this.metaMessages = options.metaMessages;\n this.shortMessage = shortMessage;\n }\n walk(fn) {\n return __classPrivateFieldGet(this, _BaseError_instances, \"m\", _BaseError_walk).call(this, this, fn);\n }\n}\n_BaseError_instances = new WeakSet(), _BaseError_walk = function _BaseError_walk(err, fn) {\n if (fn?.(err))\n return err;\n if (err.cause)\n return __classPrivateFieldGet(this, _BaseError_instances, \"m\", _BaseError_walk).call(this, err.cause, fn);\n return err;\n};\n//# sourceMappingURL=base.js.map","import { BaseError } from './base.js';\nexport class ChainNotConfiguredError extends BaseError {\n constructor() {\n super('Chain not configured.');\n Object.defineProperty(this, \"name\", {\n enumerable: true,\n configurable: true,\n writable: true,\n value: 'ChainNotConfiguredError'\n });\n }\n}\nexport class ConnectorAlreadyConnectedError extends BaseError {\n constructor() {\n super('Connector already connected.');\n Object.defineProperty(this, \"name\", {\n enumerable: true,\n configurable: true,\n writable: true,\n value: 'ConnectorAlreadyConnectedError'\n });\n }\n}\nexport class ConnectorNotConnectedError extends BaseError {\n constructor() {\n super('Connector not connected.');\n Object.defineProperty(this, \"name\", {\n enumerable: true,\n configurable: true,\n writable: true,\n value: 'ConnectorNotConnectedError'\n });\n }\n}\nexport class ConnectorNotFoundError extends BaseError {\n constructor() {\n super('Connector not found.');\n Object.defineProperty(this, \"name\", {\n enumerable: true,\n configurable: true,\n writable: true,\n value: 'ConnectorNotFoundError'\n });\n }\n}\nexport class ConnectorAccountNotFoundError extends BaseError {\n constructor({ address, connector, }) {\n super(`Account \"${address}\" not found for connector \"${connector.name}\".`);\n Object.defineProperty(this, \"name\", {\n enumerable: true,\n configurable: true,\n writable: true,\n value: 'ConnectorAccountNotFoundError'\n });\n }\n}\nexport class ConnectorChainMismatchError extends BaseError {\n constructor({ connectionChainId, connectorChainId, }) {\n super(`The current chain of the connector (id: ${connectorChainId}) does not match the connection's chain (id: ${connectionChainId}).`, {\n metaMessages: [\n `Current Chain ID: ${connectorChainId}`,\n `Expected Chain ID: ${connectionChainId}`,\n ],\n });\n Object.defineProperty(this, \"name\", {\n enumerable: true,\n configurable: true,\n writable: true,\n value: 'ConnectorChainMismatchError'\n });\n }\n}\nexport class ConnectorUnavailableReconnectingError extends BaseError {\n constructor({ connector }) {\n super(`Connector \"${connector.name}\" unavailable while reconnecting.`, {\n details: [\n 'During the reconnection step, the only connector methods guaranteed to be available are: `id`, `name`, `type`, `uuid`.',\n 'All other methods are not guaranteed to be available until reconnection completes and connectors are fully restored.',\n 'This error commonly occurs for connectors that asynchronously inject after reconnection has already started.',\n ].join(' '),\n });\n Object.defineProperty(this, \"name\", {\n enumerable: true,\n configurable: true,\n writable: true,\n value: 'ConnectorUnavailableReconnectingError'\n });\n }\n}\n//# sourceMappingURL=config.js.map","import { createClient, custom, } from 'viem';\nimport { getAddress, parseAccount } from 'viem/utils';\nimport { ConnectorAccountNotFoundError, ConnectorChainMismatchError, ConnectorNotConnectedError, ConnectorUnavailableReconnectingError, } from '../errors/config.js';\n/** https://wagmi.sh/core/api/actions/getConnectorClient */\nexport async function getConnectorClient(config, parameters = {}) {\n // Get connection\n let connection;\n if (parameters.connector) {\n const { connector } = parameters;\n if (config.state.status === 'reconnecting' &&\n !connector.getAccounts &&\n !connector.getChainId)\n throw new ConnectorUnavailableReconnectingError({ connector });\n const [accounts, chainId] = await Promise.all([\n connector.getAccounts(),\n connector.getChainId(),\n ]);\n connection = {\n accounts: accounts,\n chainId,\n connector,\n };\n }\n else\n connection = config.state.connections.get(config.state.current);\n if (!connection)\n throw new ConnectorNotConnectedError();\n const chainId = parameters.chainId ?? connection.chainId;\n // Check connector using same chainId as connection\n const connectorChainId = await connection.connector.getChainId();\n if (connectorChainId !== connection.chainId)\n throw new ConnectorChainMismatchError({\n connectionChainId: connection.chainId,\n connectorChainId,\n });\n const connector = connection.connector;\n if (connector.getClient)\n return connector.getClient({ chainId });\n // Default using `custom` transport\n const account = parseAccount(parameters.account ?? connection.accounts[0]);\n account.address = getAddress(account.address); // TODO: Checksum address as part of `parseAccount`?\n // If account was provided, check that it exists on the connector\n if (parameters.account &&\n !connection.accounts.some((x) => x.toLowerCase() === account.address.toLowerCase()))\n throw new ConnectorAccountNotFoundError({\n address: account.address,\n connector,\n });\n const chain = config.chains.find((chain) => chain.id === chainId);\n const provider = (await connection.connector.getProvider({ chainId }));\n return createClient({\n account,\n chain,\n name: 'Connector Client',\n transport: (opts) => custom(provider)({ ...opts, retryCount: 0 }),\n });\n}\n//# sourceMappingURL=getConnectorClient.js.map","import { simulateContract as viem_simulateContract, } from 'viem/actions';\nimport { getAction } from '../utils/getAction.js';\nimport { getConnectorClient, } from './getConnectorClient.js';\n/** https://wagmi.sh/core/api/actions/simulateContract */\nexport async function simulateContract(config, parameters) {\n const { abi, chainId, connector, ...rest } = parameters;\n let account;\n if (parameters.account)\n account = parameters.account;\n else {\n const connectorClient = await getConnectorClient(config, {\n chainId,\n connector,\n });\n account = connectorClient.account;\n }\n const client = config.getClient({ chainId });\n const action = getAction(client, viem_simulateContract, 'simulateContract');\n const { result, request } = await action({ ...rest, abi, account });\n return {\n chainId: client.chain.id,\n result,\n request: { __mode: 'prepared', ...request, chainId },\n };\n}\n//# sourceMappingURL=simulateContract.js.map","import { writeContract as viem_writeContract, } from 'viem/actions';\nimport { getAction } from '../utils/getAction.js';\nimport { getAccount } from './getAccount.js';\nimport { getConnectorClient, } from './getConnectorClient.js';\nimport { simulateContract, } from './simulateContract.js';\n/** https://wagmi.sh/core/api/actions/writeContract */\nexport async function writeContract(config, parameters) {\n const { account, chainId, connector, __mode, ...rest } = parameters;\n let client;\n if (typeof account === 'object' && account.type === 'local')\n client = config.getClient({ chainId });\n else\n client = await getConnectorClient(config, { account, chainId, connector });\n const { connector: activeConnector } = getAccount(config);\n let request;\n if (__mode === 'prepared' || activeConnector?.supportsSimulation)\n request = rest;\n else {\n const { request: simulateRequest } = await simulateContract(config, {\n ...rest,\n account,\n chainId,\n });\n request = simulateRequest;\n }\n const action = getAction(client, viem_writeContract, 'writeContract');\n const hash = await action({\n ...request,\n ...(account ? { account } : {}),\n chain: chainId ? { id: chainId } : null,\n });\n return hash;\n}\n//# sourceMappingURL=writeContract.js.map","import { getAccount } from '../getAccount.js';\nimport { getChainId } from '../getChainId.js';\nimport { writeContract, } from '../writeContract.js';\nexport function createWriteContract(c) {\n if (c.address !== undefined && typeof c.address === 'object')\n return (config, parameters) => {\n const configChainId = getChainId(config);\n const account = getAccount(config);\n let chainId;\n if (parameters.chainId)\n chainId = parameters.chainId;\n else if (parameters\n .account &&\n parameters\n .account === account.address)\n chainId = account.chainId;\n else if (parameters\n .account === undefined)\n chainId = account.chainId;\n else\n chainId = configChainId;\n return writeContract(config, {\n ...parameters,\n ...(c.functionName ? { functionName: c.functionName } : {}),\n address: chainId ? c.address?.[chainId] : undefined,\n abi: c.abi,\n });\n };\n return (config, parameters) => {\n return writeContract(config, {\n ...parameters,\n ...(c.address ? { address: c.address } : {}),\n ...(c.functionName ? { functionName: c.functionName } : {}),\n abi: c.abi,\n });\n };\n}\n//# sourceMappingURL=createWriteContract.js.map","import {\n boostCoreAbi,\n readBoostCoreCreateBoostAuth,\n readBoostCoreGetBoost,\n readBoostCoreGetBoostCount,\n readBoostCoreGetIncentiveFeesInfo,\n readBoostCoreProtocolFee,\n readBoostCoreProtocolFeeReceiver,\n readIAuthIsAuthorized,\n simulateBoostCoreClaimIncentive,\n simulateBoostCoreClaimIncentiveFor,\n simulateBoostCoreCreateBoost,\n simulateBoostCoreSetCreateBoostAuth,\n simulateBoostCoreSetProtocolFeeReceiver,\n simulateBoostCoreTopupIncentiveFromBudget,\n simulateBoostCoreTopupIncentiveFromSender,\n writeBoostCoreClaimIncentive,\n writeBoostCoreClaimIncentiveFor,\n writeBoostCoreCreateBoost,\n writeBoostCoreSetCreateBoostAuth,\n writeBoostCoreSetProtocolFeeReceiver,\n writeBoostCoreTopupIncentiveFromBudget,\n writeBoostCoreTopupIncentiveFromSender,\n} from '@boostxyz/evm';\nimport { bytecode } from '@boostxyz/evm/artifacts/contracts/BoostCore.sol/BoostCore.json';\nimport {\n type GetTransactionReceiptParameters,\n getAccount,\n getChains,\n getTransactionReceipt,\n readContract,\n waitForTransactionReceipt,\n} from '@wagmi/core';\nimport { createWriteContract } from '@wagmi/core/codegen';\nimport {\n type Address,\n type ContractEventName,\n type Hex,\n decodeAbiParameters,\n encodeAbiParameters,\n encodePacked,\n keccak256,\n parseEventLogs,\n zeroAddress,\n zeroHash,\n} from 'viem';\nimport { BoostCore as BoostCoreBases } from '../dist/deployments.json';\nimport { type Action, actionFromAddress } from './Actions/Action';\nimport { EventAction, type EventActionPayload } from './Actions/EventAction';\nimport { type AllowList, allowListFromAddress } from './AllowLists/AllowList';\nimport { OpenAllowList } from './AllowLists/OpenAllowList';\nimport {\n SimpleAllowList,\n type SimpleAllowListPayload,\n} from './AllowLists/SimpleAllowList';\nimport {\n SimpleDenyList,\n type SimpleDenyListPayload,\n} from './AllowLists/SimpleDenyList';\nimport { type Auth, PassthroughAuth } from './Auth/Auth';\nimport {\n Boost,\n type BoostPayload,\n type RawBoost,\n type Target,\n prepareBoostPayload,\n} from './Boost';\nimport { type Budget, budgetFromAddress } from './Budgets/Budget';\nimport {\n ManagedBudget,\n type ManagedBudgetPayload,\n} from './Budgets/ManagedBudget';\nimport {\n ManagedBudgetWithFees,\n type ManagedBudgetWithFeesPayload,\n} from './Budgets/ManagedBudgetWithFees';\nimport {\n ManagedBudgetWithFeesV2,\n type ManagedBudgetWithFeesV2Payload,\n} from './Budgets/ManagedBudgetWithFeesV2';\nimport {\n Deployable,\n type DeployableOptions,\n type DeployablePayloadOrAddress,\n type GenericDeployableParams,\n} from './Deployable/Deployable';\nimport { Roles } from './Deployable/DeployableTargetWithRBAC';\nimport {\n AllowListIncentive,\n type AllowListIncentivePayload,\n} from './Incentives/AllowListIncentive';\nimport {\n CGDAIncentive,\n type CGDAIncentivePayload,\n} from './Incentives/CGDAIncentive';\nimport {\n ERC20Incentive,\n type ERC20IncentivePayload,\n} from './Incentives/ERC20Incentive';\nimport {\n ERC20PeggedIncentive,\n type ERC20PeggedIncentivePayload,\n} from './Incentives/ERC20PeggedIncentive';\nimport {\n ERC20PeggedVariableCriteriaIncentive,\n type ERC20PeggedVariableCriteriaIncentivePayload,\n} from './Incentives/ERC20PeggedVariableCriteriaIncentive';\nimport {\n ERC20VariableCriteriaIncentive,\n type ERC20VariableCriteriaIncentivePayload,\n} from './Incentives/ERC20VariableCriteriaIncentive';\nimport type { ERC20VariableIncentivePayload } from './Incentives/ERC20VariableIncentive';\nimport {\n ERC20VariableIncentive,\n type Incentive,\n incentiveFromAddress,\n} from './Incentives/Incentive';\nimport {\n PointsIncentive,\n type PointsIncentivePayload,\n} from './Incentives/PointsIncentive';\nimport {\n LimitedSignerValidator,\n type LimitedSignerValidatorPayload,\n} from './Validators/LimitedSignerValidator';\nimport {\n SignerValidator,\n type SignerValidatorPayload,\n} from './Validators/SignerValidator';\nimport {\n BoostValidatorEOA,\n type Validator,\n validatorFromAddress,\n} from './Validators/Validator';\nimport {\n BoostCoreNoIdentifierEmitted,\n BoostNotFoundError,\n BudgetMustAuthorizeBoostCore,\n DeployableUnknownOwnerProvidedError,\n IncentiveNotCloneableError,\n InvalidProtocolChainIdError,\n MustInitializeBudgetError,\n} from './errors';\nimport type { AssetType } from './transfers';\nimport {\n type GenericLog,\n type HashAndSimulatedResult,\n type ReadParams,\n type WriteParams,\n assertValidAddressByChainId,\n} from './utils';\n\n/**\n * The ABI of the BoostCore contract, if needed for low level operations\n *\n * @type {typeof boostCoreAbi}\n */\nexport { boostCoreAbi };\n\n/**\n * The fee denominator (basis points, i.e. 10000 == 100%)\n *\n * @type {bigint}\n */\nexport const FEE_DENOMINATOR = 10000n;\n\n/**\n * The fixed addresses for the deployed Boost Core.\n * By default, `new BoostCore` will use the address deployed to the currently connected chain, or `BOOST_CORE_ADDRESS` if not provided.\n *\n * @type {Record<number, Address>}\n */\nexport const BOOST_CORE_ADDRESSES: Record<number, Address> = {\n 31337: import.meta.env.VITE_BOOST_CORE_ADDRESS,\n ...(BoostCoreBases as Record<number, Address>),\n};\n\n/**\n * The address of the deployed BoostCore instance. In prerelease mode, this will be its sepolia address\n *\n * @type {Address}\n */\nexport const BOOST_CORE_ADDRESS =\n BOOST_CORE_ADDRESSES[__DEFAULT_CHAIN_ID__ as unknown as number] ||\n zeroAddress;\n\n/**\n * A generic `viem.Log` event with support for `BoostCore` event types.\n *\n * @export\n * @typedef {BoostCoreLog}\n * @template {ContractEventName<typeof boostCoreAbi>} [event=ContractEventName<\n * typeof boostCoreAbi\n * >]\n */\nexport type BoostCoreLog<\n event extends ContractEventName<typeof boostCoreAbi> = ContractEventName<\n typeof boostCoreAbi\n >,\n> = GenericLog<typeof boostCoreAbi, event>;\n\n/**\n * Boost Core instantiation options for a custom deployed instance.\n *\n * @export\n * @interface BoostCoreDeployedOptions\n * @typedef {BoostCoreDeployedOptions}\n * @extends {DeployableOptions}\n */\nexport interface BoostCoreDeployedOptions extends DeployableOptions {\n /**\n * The address of a deployed, custom Boost Core contract.\n *\n * @type {Address}\n */\n address: Address;\n /**\n * The mapping of chain ID to address of deployed custom Boost Core contracts.\n *\n * @type {?Record<number, Address>}\n */\n addresses?: Record<number, Address>;\n}\n\n/**\n * Typeguard to determine if a user is supplying a custom address for a Boost Core contract.\n *\n * @param {*} opts\n * @returns {opts is BoostCoreDeployedOptions}\n */\n// biome-ignore lint/suspicious/noExplicitAny: type guard\nfunction isBoostCoreDeployed(opts: any): opts is BoostCoreDeployedOptions {\n return opts.address;\n}\n\n/**\n * Boost Core instantiation options when a user intends to deploy a new instance of Boost Core, setting their own registry address and protocol fee receiver.\n *\n * @export\n * @interface BoostCoreOptionsWithPayload\n * @typedef {BoostCoreOptionsWithPayload}\n * @extends {DeployableOptions}\n */\nexport interface BoostCoreOptionsWithPayload extends DeployableOptions {\n /**\n * The address of a deployed Boost Registry contract.\n *\n * @type {Address}\n */\n registryAddress: Address;\n /**\n * The address to send fees.\n *\n * @type {Address}\n */\n protocolFeeReceiver: Address;\n /**\n * The address that will be defined as the BoostCore owner.\n */\n owner: Address;\n}\n\n/**\n * Typeguard to determine if a user is intending to deploy a new instance of the Boost Core contracts with {@link BoostCoreOptionsWithPayload}.\n *\n * @param {*} opts\n * @returns {opts is BoostCoreOptionsWithPayload}\n */\n// biome-ignore lint/suspicious/noExplicitAny: type guard\nfunction isBoostCoreDeployable(opts: any): opts is BoostCoreOptionsWithPayload {\n return opts.registryAddress && opts.protocolFeeReceiver && opts.owner;\n}\n\n/**\n * A union representing both of the valid Boost Core instantiation parameters.\n *\n * @export\n * @typedef {BoostCoreConfig}\n */\nexport type BoostCoreConfig =\n | BoostCoreDeployedOptions\n | BoostCoreOptionsWithPayload;\n\n/**\n * The interface required to create a new Boost.\n *\n * @export\n * @typedef {CreateBoostPayload}\n */\nexport type CreateBoostPayload = {\n budget: Budget;\n action: Action;\n validator?: Validator;\n allowList?: AllowList;\n incentives: Array<Incentive>;\n protocolFee?: bigint;\n maxParticipants?: bigint;\n owner?: Address;\n};\n\n/**\n * Represents the information about the disbursal of an incentive.\n *\n * @export\n * @typedef {IncentiveDisbursalInfo}\n */\nexport type IncentiveDisbursalInfo = {\n assetType: AssetType;\n asset: Address;\n protocolFeesRemaining: bigint;\n protocolFee: bigint;\n tokenId: bigint;\n};\n\n/**\n * The core contract for the Boost protocol. Used to create and retrieve deployed Boosts.\n *\n * @export\n * @class BoostCore\n * @typedef {BoostCore}\n * @extends {Deployable<[Address, Address, Address]>}\n */\nexport class BoostCore extends Deployable<\n [Address, Address, Address],\n typeof boostCoreAbi\n> {\n /**\n * A static property representing a map of stringified chain ID's to the address of the deployed implementation on chain\n *\n * @static\n * @readonly\n * @type {Record<string, Address>}\n */\n static addresses: Record<number, Address> = BOOST_CORE_ADDRESSES;\n\n /**\n * A getter that will return Boost core's static addresses by numerical chain ID\n *\n * @public\n * @readonly\n * @type {Record<number, Address>}\n */\n public get addresses(): Record<number, Address> {\n return (this.constructor as typeof BoostCore).addresses;\n }\n\n /**\n * Creates an instance of BoostCore.\n *\n * @constructor\n * @param {BoostCoreConfig} param0\n * @param {Config} param0.config\n * @param {?Account} [param0.account]\n * @param {({ address?: Address; } | { registryAddress: Address; protocolFeeReceiver: Address; owner: Address; })} param0....options\n */\n constructor({ config, account, ...options }: BoostCoreConfig) {\n if (isBoostCoreDeployed(options) && options.address) {\n super({ account, config }, options.address);\n if (options.addresses) {\n this.updateAddresses(options.addresses);\n }\n } else if (isBoostCoreDeployable(options)) {\n super({ account, config }, [\n options.registryAddress,\n options.protocolFeeReceiver,\n options.owner,\n ]);\n } else {\n const { address } = assertValidAddressByChainId(\n config,\n BOOST_CORE_ADDRESSES,\n );\n super({ account, config }, address);\n }\n //@ts-expect-error I can't set this property on the class because for some reason it takes super out of constructor scope?\n this.abi = boostCoreAbi;\n }\n\n /**\n * Create a new Boost.\n *\n *\n * @public\n * @async\n * @param {CreateBoostPayload} _boostPayload\n * @param {?WriteParams} [params]\n * @returns {Promise<Boost>}\n */\n public async createBoost(\n _boostPayload: CreateBoostPayload,\n _params?: WriteParams,\n ) {\n const [payload, options] =\n this.validateDeploymentConfig<CreateBoostPayload>(_boostPayload);\n const desiredChainId = _params?.chainId;\n const { chainId, address: coreAddress } = assertValidAddressByChainId(\n options.config,\n this.addresses,\n desiredChainId,\n );\n\n const boostFactory = createWriteContract({\n abi: boostCoreAbi,\n functionName: 'createBoost',\n address: coreAddress,\n });\n\n const onChainPayload = await this.prepareCreateBoostPayload(\n coreAddress,\n chainId,\n payload,\n options,\n );\n\n const boostHash = await boostFactory(options.config, {\n ...this.optionallyAttachAccount(options.account),\n // biome-ignore lint/suspicious/noExplicitAny: Accept any shape of valid wagmi/viem parameters, wagmi does the same thing internally\n ...(_params as any),\n chainId,\n args: [prepareBoostPayload(onChainPayload)],\n });\n const receipt = await waitForTransactionReceipt(options.config, {\n hash: boostHash,\n });\n const boostCreatedLog = parseEventLogs({\n abi: boostCoreAbi,\n eventName: 'BoostCreated',\n logs: receipt.logs,\n }).at(0);\n let boostId = 0n;\n if (!boostCreatedLog) throw new BoostCoreNoIdentifierEmitted();\n boostId = boostCreatedLog?.args.boostId;\n const boost = await this.readBoost(boostId);\n return new Boost({\n id: boostId,\n budget: payload.budget.at(boost.budget),\n action: payload.action.at(boost.action),\n validator: payload.validator!.at(boost.validator),\n allowList: payload.allowList!.at(boost.allowList),\n incentives: payload.incentives.map((incentive, i) =>\n // biome-ignore lint/style/noNonNullAssertion: this will never be undefined\n incentive.at(boost.incentives.at(i)!),\n ),\n protocolFee: boost.protocolFee,\n maxParticipants: boost.maxParticipants,\n owner: boost.owner,\n });\n }\n\n /**\n * Create a new Boost.\n *\n * @public\n * @async\n * @param {CreateBoostPayload} _boostPayload\n * @param {?WriteParams} [params]\n * @returns {Promise<HashAndSimulatedResult>}\n */\n public async createBoostRaw(\n _boostPayload: CreateBoostPayload,\n _params?: WriteParams,\n ): Promise<HashAndSimulatedResult> {\n const { request, result } = await this.simulateCreateBoost(\n _boostPayload,\n _params,\n );\n const hash = await writeBoostCoreCreateBoost(this._config, request);\n return { hash, result };\n }\n\n /**\n * Returns a simulated Boost creation.\n *\n * @public\n * @async\n * @param {CreateBoostPayload} _boostPayload\n * @param {?WriteParams} [params]\n * @returns {Promise<SimulateContractReturnType>}\n */\n public async simulateCreateBoost(\n _boostPayload: CreateBoostPayload,\n _params?: WriteParams,\n ) {\n const [payload, options] =\n this.validateDeploymentConfig<CreateBoostPayload>(_boostPayload);\n const desiredChainId = _params?.chainId;\n const { chainId, address: coreAddress } = assertValidAddressByChainId(\n options.config,\n this.addresses,\n desiredChainId,\n );\n\n const onChainPayload = await this.prepareCreateBoostPayload(\n coreAddress,\n chainId,\n payload,\n options,\n );\n\n return await simulateBoostCoreCreateBoost(this._config, {\n ...this.optionallyAttachAccount(),\n // biome-ignore lint/suspicious/noExplicitAny: Accept any shape of valid wagmi/viem parameters, wagmi does the same thing internally\n ...(_params as any),\n address: coreAddress,\n chainId,\n args: [prepareBoostPayload(onChainPayload)],\n });\n }\n\n /**\n * Updates the addresses for specific chain IDs. This is used when using a custom deployed instance\n *\n * @static\n * @param {Record<number, Address>} newAddresses - New addresses to add/update\n */\n private updateAddresses(addresses: Record<number, Address>) {\n BoostCore.addresses = addresses;\n }\n\n // This function mutates payload, which isn't awesome but it's fine\n private async prepareCreateBoostPayload(\n coreAddress: Address,\n chainId: number,\n payload: CreateBoostPayload,\n options: DeployableOptions,\n ): Promise<Required<BoostPayload>> {\n if (!payload.owner) {\n payload.owner =\n this._account?.address ||\n getAccount(options.config).address ||\n zeroAddress;\n if (payload.owner === zeroAddress) {\n throw new DeployableUnknownOwnerProvidedError();\n }\n }\n\n // If not providing a custom validator, use either Boost's mainnet or testnet EOA, depending on provided chain id and given chain configurations\n if (!payload.validator) {\n const chains = getChains(options.config).filter(\n (chain) => !!this.addresses[chain.id] && chain.id === chainId,\n );\n const chain = chains.at(0);\n if (!chain)\n throw new InvalidProtocolChainIdError(\n chainId,\n Object.keys(this.addresses).map(Number),\n );\n const testnet = chain.testnet || chain.id === 31337;\n payload.validator = this.SignerValidator({\n signers: [\n (testnet\n ? BoostValidatorEOA.TESTNET\n : BoostValidatorEOA.MAINNET) as unknown as Address,\n ],\n validatorCaller: coreAddress,\n });\n }\n\n let budgetPayload: BoostPayload['budget'] = zeroAddress;\n if (payload.budget.address) {\n budgetPayload = payload.budget.address;\n if (!(await payload.budget.isAuthorized(coreAddress))) {\n throw new BudgetMustAuthorizeBoostCore(coreAddress);\n }\n } else {\n throw new MustInitializeBudgetError();\n }\n\n // if we're supplying an address, it could be a pre-initialized target\n // if base is explicitly set to false, then it will not be initialized, and it will be referenced as is if it implements interface correctly\n let actionPayload: BoostPayload['action'] = {\n instance: zeroAddress,\n isBase: true,\n parameters: zeroHash,\n };\n if (payload.action.address) {\n const isBase = payload.action.isBase;\n actionPayload = {\n isBase: isBase,\n instance: payload.action.address,\n parameters: isBase\n ? payload.action.buildParameters(undefined, options).args.at(0) ||\n zeroHash\n : zeroHash,\n };\n } else {\n actionPayload.parameters =\n payload.action.buildParameters(undefined, options).args.at(0) ||\n zeroHash;\n actionPayload.instance = assertValidAddressByChainId(\n options.config,\n payload.action.bases,\n chainId,\n ).address;\n }\n\n let validatorPayload: BoostPayload['validator'] = {\n instance: zeroAddress,\n isBase: true,\n parameters: zeroHash,\n };\n if (payload.validator.address) {\n const isBase = payload.validator.isBase;\n validatorPayload = {\n isBase: isBase,\n instance: payload.validator.address,\n parameters: isBase\n ? payload.validator.buildParameters(undefined, options).args.at(0) ||\n zeroHash\n : zeroHash,\n };\n } else {\n validatorPayload.parameters =\n payload.validator.buildParameters(undefined, options).args.at(0) ||\n zeroHash;\n validatorPayload.instance = assertValidAddressByChainId(\n options.config,\n payload.validator.bases,\n chainId,\n ).address;\n }\n\n let allowListPayload: BoostPayload['allowList'] = {\n instance: zeroAddress,\n isBase: true,\n parameters: zeroHash,\n };\n // if allowlist not provided, assume open allowlist\n if (!payload.allowList) {\n payload.allowList = this.OpenAllowList();\n }\n if (payload.allowList.address) {\n const isBase = payload.allowList.isBase;\n allowListPayload = {\n isBase: isBase,\n instance: payload.allowList.address,\n parameters: isBase\n ? zeroHash // allowList.buildParameters(undefined, options).args.at(0) || zeroHash\n : zeroHash,\n };\n } else {\n allowListPayload.parameters =\n payload.allowList.buildParameters(undefined, options).args.at(0) ||\n zeroHash;\n allowListPayload.instance = assertValidAddressByChainId(\n options.config,\n payload.allowList.bases,\n chainId,\n ).address;\n }\n\n const incentivesPayloads: Array<Target> = payload.incentives.map(() => ({\n instance: zeroAddress,\n isBase: true,\n parameters: zeroHash,\n }));\n for (let i = 0; i < payload.incentives.length; i++) {\n // biome-ignore lint/style/noNonNullAssertion: this will never be undefined\n const incentive = payload.incentives.at(i)!;\n if (incentive.address) {\n const isBase = incentive.isBase;\n if (!isBase) throw new IncentiveNotCloneableError(incentive);\n incentivesPayloads[i] = {\n isBase: isBase,\n instance: incentive.address,\n parameters: isBase\n ? incentive.buildParameters(undefined, options).args.at(0) ||\n zeroHash\n : zeroHash,\n };\n } else {\n // biome-ignore lint/style/noNonNullAssertion: this will never be undefined\n incentivesPayloads[i]!.parameters =\n incentive.buildParameters(undefined, options).args.at(0) || zeroHash;\n // biome-ignore lint/style/noNonNullAssertion: this will never be undefined\n incentivesPayloads[i]!.instance = assertValidAddressByChainId(\n options.config,\n incentive.bases,\n chainId,\n ).address;\n }\n }\n\n const onChainPayload = {\n budget: budgetPayload,\n action: actionPayload,\n validator: validatorPayload,\n allowList: allowListPayload,\n incentives: incentivesPayloads,\n protocolFee: payload.protocolFee || 0n,\n maxParticipants: payload.maxParticipants || 0n,\n owner: payload.owner,\n };\n\n return onChainPayload;\n }\n\n /**\n * Claims one incentive from a given `Boost` by `boostId` and `incentiveId`\n *\n * @public\n * @async\n * @param {bigint} boostId\n * @param {bigint} incentiveId\n * @param {Address} address\n * @param {Hex} data\n * @param {?WriteParams} [params]\n * @returns {Promise<void>}\n */\n public async claimIncentive(\n boostId: bigint,\n incentiveId: bigint,\n address: Address,\n data: Hex,\n params?: WriteParams,\n ) {\n return await this.awaitResult(\n this.claimIncentiveRaw(boostId, incentiveId, address, data, params),\n );\n }\n\n /**\n * Claim an incentive for a Boost\n *\n * @public\n * @async\n * @param {bigint} boostId - The ID of the Boost\n * @param {bigint} incentiveId - The ID of the Incentive\n * @param {Address} referrer - The address of the referrer (if any)\n * @param {Hex} data- The data for the claim\n * @param {?WriteParams} [params]\n * @returns {Promise<{ hash: `0x${string}`; result: void; }>}\n */\n public async claimIncentiveRaw(\n boostId: bigint,\n incentiveId: bigint,\n referrer: Address,\n data: Hex,\n params?: WriteParams,\n ) {\n const { request, result } = await simulateBoostCoreClaimIncentive(\n this._config,\n {\n ...assertValidAddressByChainId(\n this._config,\n this.addresses,\n params?.chainId,\n ),\n args: [boostId, incentiveId, referrer, data],\n ...this.optionallyAttachAccount(),\n // biome-ignore lint/suspicious/noExplicitAny: Accept any shape of valid wagmi/viem parameters, wagmi does the same thing internally\n ...(params as any),\n },\n );\n const hash = await writeBoostCoreClaimIncentive(this._config, request);\n return { hash, result };\n }\n\n /**\n * Claims one incentive for a given `Boost` on behalf of another user by `boostId` and `incentiveId`\n *\n * @public\n * @async\n * @param {bigint} boostId\n * @param {bigint} incentiveId\n * @param {Address} referrer\n * @param {Hex} data\n * @param {Address} claimant\n * @param {?WriteParams} [params]\n * @returns {Promise<void>}\n */\n public async claimIncentiveFor(\n boostId: bigint,\n incentiveId: bigint,\n referrer: Address,\n data: Hex,\n claimant: Address,\n params?: WriteParams,\n ) {\n return await this.awaitResult(\n this.claimIncentiveForRaw(\n boostId,\n incentiveId,\n referrer,\n data,\n claimant,\n params,\n ),\n );\n }\n\n /**\n * Claim an incentive for a Boost on behalf of another user\n *\n * @public\n * @async\n * @param {bigint} boostId - The ID of the Boost\n * @param {bigint} incentiveId - The ID of the Incentive\n * @param {Address} referrer - The address of the referrer (if any)\n * @param {Hex} data - The data for the claim\n * @param {Address} claimant - The address of the user eligible for the incentive payout\n * @param {?WriteParams} [params]\n * @returns {Promise<{ hash: Hex; result: void; }>}\n */\n public async claimIncentiveForRaw(\n boostId: bigint,\n incentiveId: bigint,\n referrer: Address,\n data: Hex,\n claimant: Address,\n params?: WriteParams,\n ) {\n const { request, result } = await simulateBoostCoreClaimIncentiveFor(\n this._config,\n {\n ...assertValidAddressByChainId(\n this._config,\n this.addresses,\n params?.chainId,\n ),\n args: [boostId, incentiveId, referrer, data, claimant],\n ...this.optionallyAttachAccount(),\n // biome-ignore lint/suspicious/noExplicitAny: Accept any shape of valid wagmi/viem parameters, wagmi does the same thing internally\n ...(params as any),\n },\n );\n const hash = await writeBoostCoreClaimIncentiveFor(this._config, request);\n return { hash, result };\n }\n\n /**\n * Get a Boost by index, will return the raw on chain representation of a Boost.\n *\n * @public\n * @async\n * @param {bigint | string} id\n * @param {?ReadParams} [params]\n * @returns {Promise<RawBoost>}\n * @throws {@link BoostNotFoundError}\n */\n public async readBoost(\n _id: string | bigint,\n params?: ReadParams,\n ): Promise<RawBoost> {\n try {\n let id: bigint;\n if (typeof _id === 'string') {\n id = BigInt(_id);\n } else id = _id;\n return await readBoostCoreGetBoost(this._config, {\n ...assertValidAddressByChainId(\n this._config,\n this.addresses,\n params?.chainId,\n ),\n args: [id],\n ...this.optionallyAttachAccount(),\n // biome-ignore lint/suspicious/noExplicitAny: Accept any shape of valid wagmi/viem parameters, wagmi does the same thing internally\n ...(params as any),\n });\n // biome-ignore lint/suspicious/noExplicitAny: unknown error\n } catch (e: any) {\n if (e?.message?.includes('bounds'))\n throw new BoostNotFoundError(String(_id));\n throw e;\n }\n }\n\n /**\n * Get a Boost by index, will return a new {@link Boost} with correct target implementations instantiated, ie `(await core.getBoost(0n)).allowList instanceof SimpleAllowList` vs `SimpleDenyList`\n *\n * @public\n * @async\n * @param {(string | bigint)} _id\n * @param {?ReadParams} [params]\n * @returns {Promise<Boost>}\n * @throws {@link BoostNotFoundError}\n */\n public async getBoost(_id: string | bigint, params?: ReadParams) {\n let id: bigint;\n if (typeof _id === 'string') {\n id = BigInt(_id);\n } else id = _id;\n const { protocolFee, maxParticipants, owner, ...boostPayload } =\n await this.readBoost(id, params);\n const options: DeployableOptions = {\n config: this._config,\n account: this._account,\n };\n const [action, budget, validator, allowList, incentives] =\n await Promise.all([\n actionFromAddress(options, boostPayload.action, params),\n budgetFromAddress(options, boostPayload.budget, params),\n validatorFromAddress(options, boostPayload.validator, params),\n allowListFromAddress(options, boostPayload.allowList, params),\n Promise.all(\n boostPayload.incentives.map((incentiveAddress) =>\n incentiveFromAddress(options, incentiveAddress, params),\n ),\n ),\n ]);\n return new Boost({\n id,\n action,\n budget,\n validator,\n allowList,\n incentives: incentives as Incentive[],\n protocolFee,\n maxParticipants,\n owner,\n });\n }\n\n /**\n * Retrieve the total number of deployed Boosts\n *\n * @public\n * @async\n * @param {?ReadParams} [params]\n * @returns {Promise<bigint>}\n */\n public async getBoostCount(params?: ReadParams) {\n return await readBoostCoreGetBoostCount(this._config, {\n ...assertValidAddressByChainId(\n this._config,\n this.addresses,\n params?.chainId,\n ),\n args: [],\n ...this.optionallyAttachAccount(),\n // biome-ignore lint/suspicious/noExplicitAny: Accept any shape of valid wagmi/viem parameters, wagmi does the same thing internally\n ...(params as any),\n });\n }\n\n /**\n * Checks if an address is authorized\n *\n * @public\n * @async\n * @param {Address} address\n * @param {?ReadParams &\n * ReadParams} [params]\n * @returns {Promise<boolean>}\n */\n public async isAuthorized(\n address: Address,\n params?: ReadParams & ReadParams,\n ) {\n const auth = await this.createBoostAuth(params);\n return readIAuthIsAuthorized(this._config, {\n address: auth,\n args: [address],\n ...this.optionallyAttachAccount(),\n // biome-ignore lint/suspicious/noExplicitAny: Accept any shape of valid wagmi/viem parameters, wagmi does the same thing internally\n ...(params as any),\n });\n }\n\n /**\n * Retrieve the address of the current creation auth provider.\n *\n * @public\n * @async\n * @param {?ReadParams} [params]\n * @returns {Promise<Address>}\n */\n public async createBoostAuth(params?: ReadParams) {\n return await readBoostCoreCreateBoostAuth(this._config, {\n ...assertValidAddressByChainId(\n this._config,\n this.addresses,\n params?.chainId,\n ),\n args: [],\n ...this.optionallyAttachAccount(),\n // biome-ignore lint/suspicious/noExplicitAny: Accept any shape of valid wagmi/viem parameters, wagmi does the same thing internally\n ...(params as any),\n });\n }\n\n /**\n * Replace the current auth scheme.\n *\n * @public\n * @async\n * @param {Auth} auth\n * @param {?WriteParams} [params]\n * @returns {Promise<void>}\n */\n public async setCreateBoostAuth(auth: Auth, params?: WriteParams) {\n return await this.awaitResult(\n this.setCreateBoostAuthRaw(auth.assertValidAddress(), {\n ...params,\n }),\n );\n }\n\n /**\n * Set the createBoostAuth address\n *\n * @public\n * @async\n * @param {Address} address\n * @param {?WriteParams} [params]\n * @returns {Promise<{ hash: `0x${string}`; result: void; }>}\n */\n public async setCreateBoostAuthRaw(address: Address, params?: WriteParams) {\n const { request, result } = await simulateBoostCoreSetCreateBoostAuth(\n this._config,\n {\n ...assertValidAddressByChainId(\n this._config,\n this.addresses,\n params?.chainId,\n ),\n args: [address],\n ...this.optionallyAttachAccount(),\n // biome-ignore lint/suspicious/noExplicitAny: Accept any shape of valid wagmi/viem parameters, wagmi does the same thing internally\n ...(params as any),\n },\n );\n const hash = await writeBoostCoreSetCreateBoostAuth(this._config, request);\n return { hash, result };\n }\n\n /**\n * Get the protocol fee.\n *\n * @public\n * @async\n * @param {?ReadParams} [params]\n * @returns {unknown}\n */\n public async protocolFee(params?: ReadParams) {\n return await readBoostCoreProtocolFee(this._config, {\n ...assertValidAddressByChainId(\n this._config,\n this.addresses,\n params?.chainId,\n ),\n args: [],\n ...this.optionallyAttachAccount(),\n // biome-ignore lint/suspicious/noExplicitAny: Accept any shape of valid wagmi/viem parameters, wagmi does the same thing internally\n ...(params as any),\n });\n }\n\n /**\n * Get the protocol fee receiver.\n *\n * @public\n * @async\n * @param {?ReadParams} [params]\n * @returns {Promise<Address>}\n */\n public async protocolFeeReceiver(params?: ReadParams) {\n return await readBoostCoreProtocolFeeReceiver(this._config, {\n ...assertValidAddressByChainId(\n this._config,\n this.addresses,\n params?.chainId,\n ),\n args: [],\n ...this.optionallyAttachAccount(),\n // biome-ignore lint/suspicious/noExplicitAny: Accept any shape of valid wagmi/viem parameters, wagmi does the same thing internally\n ...(params as any),\n });\n }\n\n /**\n * Set the protocol fee receiver address. This function is only callable by the owner.\n *\n * @public\n * @async\n * @param {Address} address\n * @param {?WriteParams} [params]\n * @returns {Promise<void>}\n */\n public async setProcolFeeReceiver(address: Address, params?: WriteParams) {\n return await this.awaitResult(\n this.setProcolFeeReceiverRaw(address, {\n ...params,\n }),\n );\n }\n\n /**\n * Set the protocol fee receiver address. This function is only callable by the owner.\n *\n * @public\n * @async\n * @param {Address} address\n * @param {?WriteParams} [params]\n * @returns {Promise<{ hash: `0x${string}`; result: void; }>}\n */\n public async setProcolFeeReceiverRaw(address: Address, params?: WriteParams) {\n const { request, result } = await simulateBoostCoreSetProtocolFeeReceiver(\n this._config,\n {\n ...assertValidAddressByChainId(\n this._config,\n this.addresses,\n params?.chainId,\n ),\n args: [address],\n ...this.optionallyAttachAccount(),\n // biome-ignore lint/suspicious/noExplicitAny: Accept any shape of valid wagmi/viem parameters, wagmi does the same thing internally\n ...(params as any),\n },\n );\n const hash = await writeBoostCoreSetProtocolFeeReceiver(\n this._config,\n request,\n );\n return { hash, result };\n }\n\n /**\n * Get the incentives fees information for a given Boost ID and Incentive ID.\n *\n * @public\n * @async\n * @param {bigint} boostId - The ID of the Boost\n * @param {bigint} incentiveId - The ID of the Incentive\n * @param {?ReadParams} [params]\n * @returns {Promise<IncentiveDisbursalInfo>}\n */\n public async getIncentiveFeesInfo(\n boostId: bigint,\n incentiveId: bigint,\n params?: ReadParams,\n ) {\n const key = keccak256(\n encodePacked(['uint256', 'uint256'], [boostId, incentiveId]),\n );\n\n return await readBoostCoreGetIncentiveFeesInfo(this._config, {\n ...assertValidAddressByChainId(\n this._config,\n this.addresses,\n params?.chainId,\n ),\n args: [key],\n ...this.optionallyAttachAccount(),\n // biome-ignore lint/suspicious/noExplicitAny: Accept any shape of valid wagmi/viem parameters, wagmi does the same thing internally\n ...(params as any),\n });\n }\n\n /**\n * Retrieves the claim information from a transaction receipt.\n *\n * @param {GetTransactionReceiptParameters} params - The parameters required to get the transaction receipt.\n * @returns {Promise<{ boostId: bigint, incentiveId: bigint, claimer: Address, amount: bigint } | undefined>} The claim information if found, undefined otherwise.\n *\n * @description\n * This method retrieves the transaction receipt using the provided parameters,\n * then parses the logs to find the 'BoostClaimed' event.\n * If found, it returns the arguments of the event, which include the boost ID,\n * incentive ID, claimer address, and claimed amount.\n *\n * @example\n * ```ts\n * const claimInfo = await boostCore.getClaimFromTransaction({\n * hash: '0x...',\n * chainId: 1\n * });\n * if (claimInfo) {\n * console.log(`Boost ${claimInfo.boostId} claimed by ${claimInfo.claimer}`);\n * }\n * ```\n */\n public async getClaimFromTransaction(\n params: GetTransactionReceiptParameters,\n ) {\n const receipt = await getTransactionReceipt(this._config, params);\n const logs = parseEventLogs({\n abi: boostCoreAbi,\n eventName: 'BoostClaimed',\n logs: receipt.logs,\n });\n return logs.at(0)?.args;\n }\n\n /**\n * Calculate the protocol fee for ERC20 or ETH assets for a given amount. Fees are collected when initializing new incentives, or clawing back from incentives.\n *\n * @example\n * ```ts\n * const fee = await core.calculateProtocolFee(\n * await incentive.getTotalBudget()\n * )\n * const totalIncentiveFundAmount = desiredAmount + fee\n * await erc20.approve(budget.assertValidAddress(), totalIncentiveFundAmount);\n * await budget.allocate({\n * amount: totalIncentiveFundAmount,\n * asset: erc20.assertValidAddress(),\n * target: '0xME',\n * });\n *\n * ```\n * @public\n * @async\n * @param {bigint} [amount]\n * @param {?ReadParams} [params]\n * @returns {Promise<void>}\n */\n public async calculateProtocolFee(amount: bigint, params?: ReadParams) {\n const protocolFee = await this.protocolFee(params);\n return (amount * protocolFee) / FEE_DENOMINATOR;\n }\n\n /**\n * Bound {@link PassthroughAuth} constructor that reuses the same configuration as the Boost Core instance.\n *\n * @example\n * ```ts\n * const auth = core.PassthroughAuth('0x') // is roughly equivalent to\n * const auth = new PassthroughAuth({ config: core._config, account: core._account }, '0x')\n * ```\n * @param {Address} address\n * @returns {PassthroughAuth}\n */\n PassthroughAuth(address?: Address) {\n return new PassthroughAuth(\n { config: this._config, account: this._account },\n address,\n );\n }\n\n // /**\n // * Bound {@link ContractAction} constructor that reuses the same configuration as the Boost Core instance.\n // *\n // * @example\n // * ```ts\n // * const action = core.ContractAction('0x') // is roughly equivalent to\n // * const action = new ContractAction({ config: core._config, account: core._account }, '0x')\n // * ```\n // * @param {DeployablePayloadOrAddress<ContractActionPayload>} options\n // * @param {?boolean} [isBase]\n // * @returns {ContractAction}\n // */\n // ContractAction(\n // options: DeployablePayloadOrAddress<ContractActionPayload>,\n // isBase?: boolean,\n // ) {\n // return new ContractAction(\n // { config: this._config, account: this._account },\n // options,\n // isBase,\n // );\n // }\n\n /**\n * Bound {@link EventAction} constructor that reuses the same configuration as the Boost Core instance.\n *\n * @example\n * ```ts\n * const action = core.EventAction('0x') // is roughly equivalent to\n * const action = new EventAction({ config: core._config, account: core._account }, '0x')\n */\n EventAction(\n options: DeployablePayloadOrAddress<EventActionPayload>,\n isBase?: boolean,\n ) {\n return new EventAction(\n { config: this._config, account: this._account },\n options,\n isBase,\n );\n }\n // /**\n // * Bound {@link ERC721MintAction} constructor that reuses the same configuration as the Boost Core instance.\n // *\n // * @example\n // * ```ts\n // * const action = core.ERC721MintAction('0x') // is roughly equivalent to\n // * const action = new ERC721MintAction({ config: core._config, account: core._account }, '0x')\n // * ```\n // * @param {DeployablePayloadOrAddress<ERC721MintActionPayload>} options\n // * @param {?boolean} [isBase]\n // * @returns {ERC721MintAction}\n // */\n // ERC721MintAction(\n // options: DeployablePayloadOrAddress<ERC721MintActionPayload>,\n // isBase?: boolean,\n // ) {\n // return new ERC721MintAction(\n // { config: this._config, account: this._account },\n // options,\n // isBase,\n // );\n // }\n /**\n * Bound {@link OpenAllowList} constructor that reuses the same configuration as the Boost Core instance.\n *\n * @example\n * ```ts\n * const list = core.OpenAllowList('0x') // is roughly equivalent to\n * const list = new OpenAllowList({ config: core._config, account: core._account }, '0x')\n * ```\n * @param {?boolean} [isBase]\n * @returns {OpenAllowList}\n */\n OpenAllowList(isBase?: boolean) {\n return new OpenAllowList(\n { config: this._config, account: this._account },\n undefined,\n isBase,\n );\n }\n /**\n * Bound {@link SimpleAllowList} constructor that reuses the same configuration as the Boost Core instance.\n *\n * @example\n * ```ts\n * const list = core.SimpleAllowList('0x') // is roughly equivalent to\n * const list = new SimpleAllowList({ config: core._config, account: core._account }, '0x')\n * ```\n * @param {DeployablePayloadOrAddress<SimpleAllowListPayload>} options\n * @param {?boolean} [isBase]\n * @returns {SimpleAllowList}\n */\n SimpleAllowList(\n options: DeployablePayloadOrAddress<SimpleAllowListPayload>,\n isBase?: boolean,\n ) {\n return new SimpleAllowList(\n { config: this._config, account: this._account },\n options,\n isBase,\n );\n }\n /**\n * Bound {@link SimpleDenyList} constructor that reuses the same configuration as the Boost Core instance.\n *\n * @example\n * ```ts\n * const list = core.SimpleDenyList('0x') // is roughly equivalent to\n * const list = new SimpleDenyList({ config: core._config, account: core._account }, '0x')\n * ```\n * @param {DeployablePayloadOrAddress<SimpleDenyListPayload>} options\n * @param {?boolean} [isBase]\n * @returns {SimpleDenyList}\n */\n SimpleDenyList(\n options: DeployablePayloadOrAddress<SimpleDenyListPayload>,\n isBase?: boolean,\n ) {\n return new SimpleDenyList(\n { config: this._config, account: this._account },\n options,\n isBase,\n );\n }\n // /**\n // * Bound {@link SimpleBudget} constructor that reuses the same configuration as the Boost Core instance.\n // *\n // * @example\n // * ```ts\n // * const budget = core.SimpleBudget('0x') // is roughly equivalent to\n // * const budget = new SimpleBudget({ config: core._config, account: core._account }, '0x')\n // * ```\n // * @param {DeployablePayloadOrAddress<SimpleBudgetPayload>} options\n // * @returns {SimpleBudget}\n // */\n // SimpleBudget(options: DeployablePayloadOrAddress<SimpleBudgetPayload>) {\n // return new SimpleBudget(\n // { config: this._config, account: this._account },\n // options,\n // );\n // }\n /**\n * Bound {@link ManagedBudget} constructor that reuses the same configuration as the Boost Core instance.\n *\n * @example\n * ```ts\n * const budget = core.ManagedBudget('0x') // is roughly equivalent to\n * const budget = new ManagedBudget({ config: core._config, account: core._account }, '0x')\n * ```\n * @param {DeployablePayloadOrAddress<ManagedBudgetPayload>} options\n * @returns {ManagedBudget}\n */\n ManagedBudget(options: DeployablePayloadOrAddress<ManagedBudgetPayload>) {\n if (\n typeof options !== 'string' &&\n !options.authorized.includes(this.assertValidAddress())\n ) {\n options.authorized = [this.assertValidAddress(), ...options.authorized];\n options.roles = [Roles.MANAGER, ...options.roles];\n }\n return new ManagedBudget(\n { config: this._config, account: this._account },\n options,\n );\n }\n /**\n * Bound {@link ManagedBudgetWithFees} constructor that reuses the same configuration as the Boost Core instance.\n * Prepends the BoostCore address to the authorized list because it's structurally critical to calculating payouts.\n *\n * @example\n * ```ts\n * const budget = core.ManagedBudgetWithFees('0x') // is roughly equivalent to\n * const budget = new ManagedBudgetWithFees({ config: core._config, account: core._account }, '0x')\n * ```\n * @param {DeployablePayloadOrAddress<ManagedBudgetWithFeesPayload>} options\n * @returns {ManagedBudgetWithFees}\n */\n ManagedBudgetWithFees(\n options: DeployablePayloadOrAddress<ManagedBudgetWithFeesPayload>,\n ) {\n if (\n typeof options !== 'string' &&\n !options.authorized.includes(this.assertValidAddress())\n ) {\n options.authorized = [this.assertValidAddress(), ...options.authorized];\n options.roles = [Roles.MANAGER, ...options.roles];\n }\n\n return new ManagedBudgetWithFees(\n { config: this._config, account: this._account },\n options,\n );\n }\n /**\n * Bound {@link ManagedBudgetWithFeesV2} constructor that reuses the same configuration as the Boost Core instance.\n * Prepends the BoostCore address to the authorized list because it's structurally critical to calculating payouts.\n *\n * @example\n * ```ts\n * const budget = core.ManagedBudgetWithFeesV2('0x') // is roughly equivalent to\n * const budget = new ManagedBudgetWithFeesV2({ config: core._config, account: core._account }, '0x')\n * ```\n * @param {DeployablePayloadOrAddress<ManagedBudgetWithFeesV2Payload>} options\n * @returns {ManagedBudgetWithFeesV2}\n */\n ManagedBudgetWithFeesV2(\n options: DeployablePayloadOrAddress<ManagedBudgetWithFeesV2Payload>,\n ) {\n if (\n typeof options !== 'string' &&\n !options.authorized.includes(this.assertValidAddress())\n ) {\n options.authorized = [this.assertValidAddress(), ...options.authorized];\n options.roles = [Roles.MANAGER, ...options.roles];\n }\n\n return new ManagedBudgetWithFeesV2(\n { config: this._config, account: this._account },\n options,\n );\n }\n // /**\n // * Bound {@link VestingBudget} constructor that reuses the same configuration as the Boost Core instance.\n // *\n // * @example\n // * ```ts\n // * const budget = core.VestingBudget('0x') // is roughly equivalent to\n // * const budget = new VestingBudget({ config: core._config, account: core._account }, '0x')\n // * ```\n // * @param {DeployablePayloadOrAddress<VestingBudgetPayload>} options\n // * @returns {VestingBudget}\n // */\n // VestingBudget(options: DeployablePayloadOrAddress<VestingBudgetPayload>) {\n // return new VestingBudget(\n // { config: this._config, account: this._account },\n // options,\n // );\n // }\n /**\n * Bound {@link AllowListIncentive} constructor that reuses the same configuration as the Boost Core instance.\n *\n * @example\n * ```ts\n * const incentive = core.AllowListIncentive({ ... }) // is roughly equivalent to\n * const incentive = new AllowListIncentive({ config: core._config, account: core._account }, { ... })\n * ```\n * @param {DeployablePayloadOrAddress<VestingBudgetPayload>} options\n * @returns {VestingBudget}\n */\n AllowListIncentive(options: AllowListIncentivePayload) {\n return new AllowListIncentive(\n { config: this._config, account: this._account },\n options,\n );\n }\n /**\n * Bound {@link CGDAIncentive} constructor that reuses the same configuration as the Boost Core instance.\n *\n * @example\n * ```ts\n * const incentive = core.CGDAIncentive({ ... }) // is roughly equivalent to\n * const incentive = new CGDAIncentive({ config: core._config, account: core._account }, { ... })\n * ```\n * @param {CGDAIncentivePayload} options\n * @returns {CGDAIncentive}\n */\n CGDAIncentive(options: CGDAIncentivePayload) {\n return new CGDAIncentive(\n { config: this._config, account: this._account },\n options,\n );\n }\n /**\n * Bound {@link ERC20Incentive} constructor that reuses the same configuration as the Boost Core instance.\n *\n * @example\n * ```ts\n * const incentive = core.ERC20Incentive({ ... }) // is roughly equivalent to\n * const incentive = new ERC20Incentive({ config: core._config, account: core._account }, { ... })\n * ```\n * @param {ERC20IncentivePayload} options\n * @returns {ERC20Incentive}\n */\n ERC20Incentive(options: ERC20IncentivePayload) {\n return new ERC20Incentive(\n { config: this._config, account: this._account },\n options,\n );\n }\n\n /**\n * Bound {@link ERC20PeggedIncentive} constructor that reuses the same configuration as the Boost Core instance.\n *\n * @example\n * ```ts\n * const incentive = core.ERC20PeggedIncentive({ ... }) // is roughly equivalent to\n * const incentive = new ERC20PeggedIncentive({ config: core._config, account: core._account }, { ... })\n * ```\n * @param {ERC20PeggedIncentivePayload} options\n * @returns {ERC20PeggedIncentive}\n */\n ERC20PeggedIncentive(options: ERC20PeggedIncentivePayload) {\n return new ERC20PeggedIncentive(\n { config: this._config, account: this._account },\n options,\n );\n }\n // /**\n // * Temporarily disabled until low level ABI encoding bugs are resolved\n // * Bound {@link ERC1155Incentive} constructor that reuses the same configuration as the Boost Core instance.\n // *\n // * @experimental\n // * @example\n // * ```ts\n // * const incentive = core.ERC1155Incentive({ ... }) // is roughly equivalent to\n // * const incentive = new ERC1155Incentive({ config: core._config, account: core._account }, { ... })\n // * ```\n // * @param {ERC1155IncentivePayload} options\n // * @returns {ERC1155Incentive}\n // */\n // ERC1155Incentive(options: ERC1155IncentivePayload) {\n // return new ERC1155Incentive(\n // { config: this._config, account: this._account },\n // options,\n // );\n // }\n /**\n * Bound {@link PointsIncentive} constructor that reuses the same configuration as the Boost Core instance.\n *\n * @example\n * ```ts\n * const incentive = core.PointsIncentive({ ... }) // is roughly equivalent to\n * const incentive = new PointsIncentive({ config: core._config, account: core._account }, { ... })\n * ```\n * @param {PointsIncentivePayload} options\n * @returns {PointsIncentive}\n */\n PointsIncentive(options: PointsIncentivePayload) {\n return new PointsIncentive(\n { config: this._config, account: this._account },\n options,\n );\n }\n /**\n * Bound {@link SignerValidator} constructor that reuses the same configuration as the Boost Core instance.\n *\n * @example\n * ```ts\n * const validator = core.SignerValidator({ ... }) // is roughly equivalent to\n * const validator = new SignerValidator({ config: core._config, account: core._account }, { ... })\n * ```\n * @param {DeployablePayloadOrAddress<SignerValidatorPayload>} options\n * @param {?boolean} [isBase]\n * @returns {SignerValidator}\n */\n SignerValidator(\n options: DeployablePayloadOrAddress<SignerValidatorPayload>,\n isBase?: boolean,\n ) {\n return new SignerValidator(\n { config: this._config, account: this._account },\n options,\n isBase,\n );\n }\n\n /**\n * Bound {@link LimitedSignerValidator} constructor that reuses the same configuration as the Boost Core instance.\n *\n * @example\n * ```ts\n * const validator = core.LimitedSignerValidator({ ... }) // is roughly equivalent to\n * const validator = new LimitedSignerValidator({ config: core._config, account: core._account }, { ... })\n * ```\n * @param {DeployablePayloadOrAddress<LimitedSignerValidatorPayload>} options\n * @param {?boolean} [isBase]\n * @returns {LimitedSignerValidator}\n */\n LimitedSignerValidator(\n options: DeployablePayloadOrAddress<LimitedSignerValidatorPayload>,\n isBase?: boolean,\n ) {\n return new LimitedSignerValidator(\n { config: this._config, account: this._account },\n options,\n isBase,\n );\n }\n\n /**\n * Bound {@link ERC20VariableCriteriaIncentive} constructor that reuses the same configuration as the Boost Core instance.\n *\n * @example\n * ```ts\n * const validator = core.ERC20VariableCrtieriaIncentive({ ... }) // is roughly equivalent to\n * const validator = new ERC20VariableCrtieriaIncentive({ config: core._config, account: core._account }, { ... })\n * ```\n * @param {DeployablePayloadOrAddress<ERC20VariableCrtieriaIncentivePayload>} options\n * @param {?boolean} [isBase]\n * @returns {ERC20VariableCrtieriaIncentive}\n * */\n ERC20VariableCriteriaIncentive(\n options: DeployablePayloadOrAddress<ERC20VariableCriteriaIncentivePayload>,\n isBase?: boolean,\n ) {\n return new ERC20VariableCriteriaIncentive(\n { config: this._config, account: this._account },\n options,\n isBase,\n );\n }\n\n /**\n * Bound {@link ERC20PeggedVariableCriteriaIncentive} constructor that reuses the same configuration as the Boost Core instance.\n *\n * @example\n * ```ts\n * const validator = core.ERC20PeggedVariableCriteriaIncentive({ ... }) // is roughly equivalent to\n * const validator = new ERC20PeggedVariableCriteriaIncentive({ config: core._config, account: core._account }, { ... })\n * ```\n * @param {DeployablePayloadOrAddress<ERC20PeggedVariableCriteriaIncentive>} options\n * @param {?boolean} [isBase]\n * @returns {ERC20PeggedVariableCriteriaIncentive}\n * */\n ERC20PeggedVariableCriteriaIncentive(\n options: DeployablePayloadOrAddress<ERC20PeggedVariableCriteriaIncentivePayload>,\n isBase?: boolean,\n ) {\n return new ERC20PeggedVariableCriteriaIncentive(\n { config: this._config, account: this._account },\n options,\n isBase,\n );\n }\n\n /**\n * Bound {@link ERC20VariableIncentive} constructor that reuses the same configuration as the Boost Core instance.\n *\n * @example\n * ```ts\n * const validator = core.ERC20VariableIncentive({ ... }) // is roughly equivalent to\n * const validator = new ERC20VariableIncentive({ config: core._config, account: core._account }, { ... })\n * ```\n * @param {DeployablePayloadOrAddress<ERC20VariableIncentivePayload>} options\n * @param {?boolean} [isBase]\n * @returns {ERC20VariableIncentive}\n */\n ERC20VariableIncentive(\n options: DeployablePayloadOrAddress<ERC20VariableIncentivePayload>,\n isBase?: boolean,\n ) {\n return new ERC20VariableIncentive(\n { config: this._config, account: this._account },\n options,\n isBase,\n );\n }\n\n /**\n * @inheritdoc\n *\n * @public\n * @param {?[Address, Address, Address]} [_payload]\n * @param {?DeployableOptions} [_options]\n * @returns {GenericDeployableParams}\n */\n public override buildParameters(\n _payload?: [Address, Address, Address],\n _options?: DeployableOptions,\n ): GenericDeployableParams {\n const [payload, options] = this.validateDeploymentConfig(\n _payload,\n _options,\n );\n return {\n abi: boostCoreAbi,\n bytecode: bytecode as Hex,\n args: payload,\n ...this.optionallyAttachAccount(options.account),\n };\n }\n /**\n * Prepares and executes a top-up from a Budget, specifying the net top-up amount\n * that should land in the incentive (the protocol fee is added automatically).\n *\n * @public\n * @async\n * @param {bigint} boostId The ID of the Boost\n * @param {bigint} incentiveId The ID of the incentive within that Boost\n * @param {any} topupPayload A typed struct for the incentive’s top-up parameters\n * @param {Address} [budget] Optional override budget address (otherwise uses the Boost’s budget)\n * @param {?WriteParams} [params] Additional transaction overrides\n * @returns {Promise<{ hash: Hex; result: void }>} The transaction hash and simulation result\n */\n public async topupIncentiveFromBudgetPreFee(\n boostId: bigint,\n incentiveId: bigint,\n topupAmount: bigint,\n budget?: Address,\n params?: WriteParams,\n ) {\n const boost = await this.getBoost(boostId, params as ReadParams);\n if (incentiveId >= boost.incentives.length) {\n throw new Error(`Incentive ID ${incentiveId} out of range`);\n }\n const incentive = boost.incentives[Number(incentiveId)];\n if (!incentive) {\n throw new Error(`Incentive with ID ${incentiveId} not found`);\n }\n\n const incentiveData = await incentive.getTopupPayload(topupAmount);\n\n if (!(topupAmount > 0)) {\n throw new Error('Top-up amount must be greater than zero');\n }\n\n return await this.topupIncentiveFromBudgetRaw(\n boostId,\n incentiveId,\n incentiveData,\n budget,\n params,\n );\n }\n\n /**\n * Prepares and executes a top-up from a Budget, specifying the entire total tokens\n * (incentive + fee) you want to disburse. We'll back-calculate how many tokens land\n * in the incentive.\n *\n * @public\n * @async\n * @param {bigint} boostId The ID of the Boost\n * @param {bigint} incentiveId The ID of the incentive within that Boost\n * @param {any} topupPayload A typed struct for the incentive’s top-up parameters\n * @param {bigint} totalAmount The total tokens to disburse\n * @param {Address} [budget] Optional override budget address\n * @param {?WriteParams} [params] Additional transaction overrides\n * @returns {Promise<{ hash: Hex; result: void }>}\n */\n public async topupIncentiveFromBudgetPostFee(\n boostId: bigint,\n incentiveId: bigint,\n totalAmount: bigint,\n budget?: Address,\n params?: WriteParams,\n ) {\n const feeBps = await this.protocolFee(params as ReadParams);\n const topupAmount =\n (totalAmount * FEE_DENOMINATOR) / (FEE_DENOMINATOR + feeBps);\n return this.topupIncentiveFromBudgetPreFee(\n boostId,\n incentiveId,\n topupAmount,\n budget,\n params,\n );\n }\n\n /**\n * Prepares and executes a top-up from the caller (msg.sender), specifying the net top-up\n * to land in the incentive. We'll add the protocol fee on top automatically.\n *\n * @public\n * @async\n * @param {bigint} boostId The ID of the Boost\n * @param {bigint} incentiveId The ID of the incentive within that Boost\n * @param {any} topupPayload A typed struct for the incentive’s top-up parameters\n * @param {?WriteParams} [params]\n * @returns {Promise<{ hash: Hex; result: void }>}\n */\n public async topupIncentiveFromSenderPreFee(\n boostId: bigint,\n incentiveId: bigint,\n topupAmount: bigint,\n params?: WriteParams,\n ) {\n const boost = await this.getBoost(boostId, params as ReadParams);\n if (incentiveId >= boost.incentives.length) {\n throw new Error(`Incentive ID ${incentiveId} out of range`);\n }\n const incentive = boost.incentives[Number(incentiveId)];\n if (!incentive) {\n throw new Error(`Incentive with ID ${incentiveId} not found`);\n }\n\n if (!(topupAmount > 0)) {\n throw new Error('Top-up amount must be greater than zero');\n }\n\n const incentiveData = await incentive.getTopupPayload(topupAmount);\n\n return await this.topupIncentiveFromSenderRaw(\n boostId,\n incentiveId,\n incentiveData,\n params,\n );\n }\n\n /**\n * Prepares and executes a top-up from the caller (msg.sender), specifying the total\n * tokens you’re willing to provide (including fee). We'll back-calculate the net\n * top-up for the incentive.\n *\n * @public\n * @async\n * @param {bigint} boostId The ID of the Boost\n * @param {bigint} incentiveId The ID of the incentive within that Boost\n * @param {any} topupPayload A typed struct for the incentive’s top-up parameters\n * @param {bigint} totalAmount The entire tokens (top-up + fee)\n * @param {?WriteParams} [params]\n * @returns {Promise<{ hash: Hex; result: void }>}\n */\n public async topupIncentiveFromSenderPostFee(\n boostId: bigint,\n incentiveId: bigint,\n totalAmount: bigint,\n params?: WriteParams,\n ) {\n const feeBps = await this.protocolFee(params as ReadParams);\n const topupAmount =\n (totalAmount * FEE_DENOMINATOR) / (FEE_DENOMINATOR + feeBps);\n\n return this.topupIncentiveFromSenderPreFee(\n boostId,\n incentiveId,\n topupAmount,\n params,\n );\n }\n\n /**\n * A lower-level function that actually calls `topupIncentiveFromSender` on-chain,\n * passing the final total. The contract modifies its internal logic to split net top-up vs. fee.\n *\n * @private\n * @param {bigint} boostId\n * @param {bigint} incentiveId\n * @param {Hex} preflightData The raw ABudget.Transfer data from preflight\n * @param {?WriteParams} [params]\n * @returns {Promise<{ hash: Hex; result: void }>}\n */\n private async topupIncentiveFromSenderRaw(\n boostId: bigint,\n incentiveId: bigint,\n preflightData: Hex,\n params?: WriteParams,\n ) {\n const { request, result } = await simulateBoostCoreTopupIncentiveFromSender(\n this._config,\n {\n ...this.optionallyAttachAccount(),\n ...(params as object),\n address: this.assertValidAddress(),\n args: [boostId, incentiveId, preflightData],\n },\n );\n const hash = await writeBoostCoreTopupIncentiveFromSender(\n this._config,\n request,\n );\n return { hash, result };\n }\n\n /**\n * A lower-level function that actually calls `topupIncentiveFromBudget` on-chain,\n * passing the preflight data plus the final total. The contract itself modifies\n * the amount to (topup + fee).\n *\n * @private\n * @param {bigint} boostId\n * @param {bigint} incentiveId\n * @param {Hex} preflightData The raw ABudget.Transfer (encoded) from preflight\n * @param {Address} [budget] Optional override for the budget\n * @param {?WriteParams} [params]\n * @returns {Promise<{ hash: Hex; result: void }>}\n */\n private async topupIncentiveFromBudgetRaw(\n boostId: bigint,\n incentiveId: bigint,\n preflightData: Hex,\n budget?: Address,\n params?: WriteParams,\n ) {\n // e.g. run \"simulate + write\" pattern\n const { request, result } = await simulateBoostCoreTopupIncentiveFromBudget(\n this._config,\n {\n ...this.optionallyAttachAccount(),\n ...(params as object),\n address: this.assertValidAddress(),\n args: [boostId, incentiveId, preflightData, budget ?? zeroAddress],\n },\n );\n const hash = await writeBoostCoreTopupIncentiveFromBudget(\n this._config,\n request,\n );\n return { hash, result };\n }\n}\n"],"names":["getAccount","config","uid","connection","addresses","address","chain","status","getChainId","getAction","client","actionFn","name","action_implicit","action_explicit","params","version","getVersion","__classPrivateFieldGet","receiver","state","kind","f","_BaseError_instances","_BaseError_walk","BaseError","shortMessage","options","details","_a","docsPath","fn","err","ConnectorNotConnectedError","ConnectorAccountNotFoundError","connector","ConnectorChainMismatchError","connectionChainId","connectorChainId","ConnectorUnavailableReconnectingError","getConnectorClient","parameters","accounts","chainId","account","parseAccount","getAddress","x","provider","createClient","opts","custom","simulateContract","abi","rest","action","viem_simulateContract","result","request","writeContract","__mode","activeConnector","simulateRequest","viem_writeContract","createWriteContract","c","configChainId","FEE_DENOMINATOR","BOOST_CORE_ADDRESSES","BoostCoreBases","BOOST_CORE_ADDRESS","zeroAddress","isBoostCoreDeployed","isBoostCoreDeployable","_BoostCore","Deployable","assertValidAddressByChainId","boostCoreAbi","_boostPayload","_params","payload","desiredChainId","coreAddress","boostFactory","onChainPayload","boostHash","prepareBoostPayload","receipt","waitForTransactionReceipt","boostCreatedLog","parseEventLogs","boostId","BoostCoreNoIdentifierEmitted","boost","Boost","incentive","i","writeBoostCoreCreateBoost","simulateBoostCoreCreateBoost","DeployableUnknownOwnerProvidedError","getChains","InvalidProtocolChainIdError","testnet","BoostValidatorEOA","budgetPayload","BudgetMustAuthorizeBoostCore","MustInitializeBudgetError","actionPayload","zeroHash","isBase","validatorPayload","allowListPayload","incentivesPayloads","IncentiveNotCloneableError","incentiveId","data","referrer","simulateBoostCoreClaimIncentive","writeBoostCoreClaimIncentive","claimant","simulateBoostCoreClaimIncentiveFor","writeBoostCoreClaimIncentiveFor","_id","id","readBoostCoreGetBoost","e","BoostNotFoundError","protocolFee","maxParticipants","owner","boostPayload","budget","validator","allowList","incentives","actionFromAddress","budgetFromAddress","validatorFromAddress","allowListFromAddress","incentiveAddress","incentiveFromAddress","readBoostCoreGetBoostCount","auth","readIAuthIsAuthorized","readBoostCoreCreateBoostAuth","simulateBoostCoreSetCreateBoostAuth","writeBoostCoreSetCreateBoostAuth","readBoostCoreProtocolFee","readBoostCoreProtocolFeeReceiver","simulateBoostCoreSetProtocolFeeReceiver","writeBoostCoreSetProtocolFeeReceiver","key","keccak256","encodePacked","readBoostCoreGetIncentiveFeesInfo","getTransactionReceipt","amount","PassthroughAuth","EventAction","OpenAllowList","SimpleAllowList","SimpleDenyList","Roles","ManagedBudget","ManagedBudgetWithFees","ManagedBudgetWithFeesV2","AllowListIncentive","CGDAIncentive","ERC20Incentive","ERC20PeggedIncentive","PointsIncentive","SignerValidator","LimitedSignerValidator","ERC20VariableCriteriaIncentive","ERC20PeggedVariableCriteriaIncentive","ERC20VariableIncentive","_payload","_options","bytecode","topupAmount","incentiveData","totalAmount","feeBps","preflightData","simulateBoostCoreTopupIncentiveFromSender","writeBoostCoreTopupIncentiveFromSender","simulateBoostCoreTopupIncentiveFromBudget","writeBoostCoreTopupIncentiveFromBudget","BoostCore"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AACO,SAASA,EAAWC,GAAQ;AAC/B,QAAMC,IAAMD,EAAO,MAAM,SACnBE,IAAaF,EAAO,MAAM,YAAY,IAAIC,CAAG,GAC7CE,IAAYD,KAAA,gBAAAA,EAAY,UACxBE,IAAUD,KAAA,gBAAAA,EAAY,IACtBE,IAAQL,EAAO,OAAO,KAAK,CAACK,MAAUA,EAAM,QAAOH,KAAA,gBAAAA,EAAY,QAAO,GACtEI,IAASN,EAAO,MAAM;AAC5B,UAAQM,GAAM;AAAA,IACV,KAAK;AACD,aAAO;AAAA,QACH,SAASF;AAAA,QACT,WAAWD;AAAA,QACX,OAAAE;AAAA,QACA,SAASH,KAAA,gBAAAA,EAAY;AAAA,QACrB,WAAWA,KAAA,gBAAAA,EAAY;AAAA,QACvB,aAAa;AAAA,QACb,cAAc;AAAA,QACd,gBAAgB;AAAA,QAChB,gBAAgB;AAAA,QAChB,QAAAI;AAAA,MAChB;AAAA,IACQ,KAAK;AACD,aAAO;AAAA,QACH,SAAAF;AAAA,QACA,WAAAD;AAAA,QACA,OAAAE;AAAA,QACA,SAASH,KAAA,gBAAAA,EAAY;AAAA,QACrB,WAAWA,KAAA,gBAAAA,EAAY;AAAA,QACvB,aAAa,CAAC,CAACE;AAAA,QACf,cAAc;AAAA,QACd,gBAAgB;AAAA,QAChB,gBAAgB;AAAA,QAChB,QAAAE;AAAA,MAChB;AAAA,IACQ,KAAK;AACD,aAAO;AAAA,QACH,SA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AAXvC,IAAMwH,IAANlH;","x_google_ignoreList":[0,1,2,3,4,5,6,7,8,9,10]}
1
+ {"version":3,"file":"BoostCore.js","sources":["../../../node_modules/.pnpm/@wagmi+core@2.13.8_@tanstack+query-core@5.32.0_@types+react@18.3.0_immer@10.0.2_react@18.3.0__fkpglrrrnd23klx5cgogpwpbbq/node_modules/@wagmi/core/dist/esm/actions/getAccount.js","../../../node_modules/.pnpm/@wagmi+core@2.13.8_@tanstack+query-core@5.32.0_@types+react@18.3.0_immer@10.0.2_react@18.3.0__fkpglrrrnd23klx5cgogpwpbbq/node_modules/@wagmi/core/dist/esm/actions/getChainId.js","../../../node_modules/.pnpm/@wagmi+core@2.13.8_@tanstack+query-core@5.32.0_@types+react@18.3.0_immer@10.0.2_react@18.3.0__fkpglrrrnd23klx5cgogpwpbbq/node_modules/@wagmi/core/dist/esm/utils/getAction.js","../../../node_modules/.pnpm/@wagmi+core@2.13.8_@tanstack+query-core@5.32.0_@types+react@18.3.0_immer@10.0.2_react@18.3.0__fkpglrrrnd23klx5cgogpwpbbq/node_modules/@wagmi/core/dist/esm/version.js","../../../node_modules/.pnpm/@wagmi+core@2.13.8_@tanstack+query-core@5.32.0_@types+react@18.3.0_immer@10.0.2_react@18.3.0__fkpglrrrnd23klx5cgogpwpbbq/node_modules/@wagmi/core/dist/esm/utils/getVersion.js","../../../node_modules/.pnpm/@wagmi+core@2.13.8_@tanstack+query-core@5.32.0_@types+react@18.3.0_immer@10.0.2_react@18.3.0__fkpglrrrnd23klx5cgogpwpbbq/node_modules/@wagmi/core/dist/esm/errors/base.js","../../../node_modules/.pnpm/@wagmi+core@2.13.8_@tanstack+query-core@5.32.0_@types+react@18.3.0_immer@10.0.2_react@18.3.0__fkpglrrrnd23klx5cgogpwpbbq/node_modules/@wagmi/core/dist/esm/errors/config.js","../../../node_modules/.pnpm/@wagmi+core@2.13.8_@tanstack+query-core@5.32.0_@types+react@18.3.0_immer@10.0.2_react@18.3.0__fkpglrrrnd23klx5cgogpwpbbq/node_modules/@wagmi/core/dist/esm/actions/getConnectorClient.js","../../../node_modules/.pnpm/@wagmi+core@2.13.8_@tanstack+query-core@5.32.0_@types+react@18.3.0_immer@10.0.2_react@18.3.0__fkpglrrrnd23klx5cgogpwpbbq/node_modules/@wagmi/core/dist/esm/actions/simulateContract.js","../../../node_modules/.pnpm/@wagmi+core@2.13.8_@tanstack+query-core@5.32.0_@types+react@18.3.0_immer@10.0.2_react@18.3.0__fkpglrrrnd23klx5cgogpwpbbq/node_modules/@wagmi/core/dist/esm/actions/writeContract.js","../../../node_modules/.pnpm/@wagmi+core@2.13.8_@tanstack+query-core@5.32.0_@types+react@18.3.0_immer@10.0.2_react@18.3.0__fkpglrrrnd23klx5cgogpwpbbq/node_modules/@wagmi/core/dist/esm/actions/codegen/createWriteContract.js","../src/BoostCore.ts"],"sourcesContent":["/** https://wagmi.sh/core/api/actions/getAccount */\nexport function getAccount(config) {\n const uid = config.state.current;\n const connection = config.state.connections.get(uid);\n const addresses = connection?.accounts;\n const address = addresses?.[0];\n const chain = config.chains.find((chain) => chain.id === connection?.chainId);\n const status = config.state.status;\n switch (status) {\n case 'connected':\n return {\n address: address,\n addresses: addresses,\n chain,\n chainId: connection?.chainId,\n connector: connection?.connector,\n isConnected: true,\n isConnecting: false,\n isDisconnected: false,\n isReconnecting: false,\n status,\n };\n case 'reconnecting':\n return {\n address,\n addresses,\n chain,\n chainId: connection?.chainId,\n connector: connection?.connector,\n isConnected: !!address,\n isConnecting: false,\n isDisconnected: false,\n isReconnecting: true,\n status,\n };\n case 'connecting':\n return {\n address,\n addresses,\n chain,\n chainId: connection?.chainId,\n connector: connection?.connector,\n isConnected: false,\n isConnecting: true,\n isDisconnected: false,\n isReconnecting: false,\n status,\n };\n case 'disconnected':\n return {\n address: undefined,\n addresses: undefined,\n chain: undefined,\n chainId: undefined,\n connector: undefined,\n isConnected: false,\n isConnecting: false,\n isDisconnected: true,\n isReconnecting: false,\n status,\n };\n }\n}\n//# sourceMappingURL=getAccount.js.map","/** https://wagmi.sh/core/api/actions/getChainId */\nexport function getChainId(config) {\n return config.state.chainId;\n}\n//# sourceMappingURL=getChainId.js.map","/**\n * Retrieves and returns an action from the client (if exists), and falls\n * back to the tree-shakable action.\n *\n * Useful for extracting overridden actions from a client (ie. if a consumer\n * wants to override the `sendTransaction` implementation).\n */\nexport function getAction(client, actionFn, \n// Some minifiers drop `Function.prototype.name`, or replace it with short letters,\n// meaning that `actionFn.name` will not always work. For that case, the consumer\n// needs to pass the name explicitly.\nname) {\n const action_implicit = client[actionFn.name];\n if (typeof action_implicit === 'function')\n return action_implicit;\n const action_explicit = client[name];\n if (typeof action_explicit === 'function')\n return action_explicit;\n return (params) => actionFn(client, params);\n}\n//# sourceMappingURL=getAction.js.map","export const version = '2.13.8';\n//# sourceMappingURL=version.js.map","import { version } from '../version.js';\nexport const getVersion = () => `@wagmi/core@${version}`;\n//# sourceMappingURL=getVersion.js.map","var __classPrivateFieldGet = (this && this.__classPrivateFieldGet) || function (receiver, state, kind, f) {\n if (kind === \"a\" && !f) throw new TypeError(\"Private accessor was defined without a getter\");\n if (typeof state === \"function\" ? receiver !== state || !f : !state.has(receiver)) throw new TypeError(\"Cannot read private member from an object whose class did not declare it\");\n return kind === \"m\" ? f : kind === \"a\" ? f.call(receiver) : f ? f.value : state.get(receiver);\n};\nvar _BaseError_instances, _BaseError_walk;\nimport { getVersion } from '../utils/getVersion.js';\nexport class BaseError extends Error {\n get docsBaseUrl() {\n return 'https://wagmi.sh/core';\n }\n get version() {\n return getVersion();\n }\n constructor(shortMessage, options = {}) {\n super();\n _BaseError_instances.add(this);\n Object.defineProperty(this, \"details\", {\n enumerable: true,\n configurable: true,\n writable: true,\n value: void 0\n });\n Object.defineProperty(this, \"docsPath\", {\n enumerable: true,\n configurable: true,\n writable: true,\n value: void 0\n });\n Object.defineProperty(this, \"metaMessages\", {\n enumerable: true,\n configurable: true,\n writable: true,\n value: void 0\n });\n Object.defineProperty(this, \"shortMessage\", {\n enumerable: true,\n configurable: true,\n writable: true,\n value: void 0\n });\n Object.defineProperty(this, \"name\", {\n enumerable: true,\n configurable: true,\n writable: true,\n value: 'WagmiCoreError'\n });\n const details = options.cause instanceof BaseError\n ? options.cause.details\n : options.cause?.message\n ? options.cause.message\n : options.details;\n const docsPath = options.cause instanceof BaseError\n ? options.cause.docsPath || options.docsPath\n : options.docsPath;\n this.message = [\n shortMessage || 'An error occurred.',\n '',\n ...(options.metaMessages ? [...options.metaMessages, ''] : []),\n ...(docsPath\n ? [\n `Docs: ${this.docsBaseUrl}${docsPath}.html${options.docsSlug ? `#${options.docsSlug}` : ''}`,\n ]\n : []),\n ...(details ? [`Details: ${details}`] : []),\n `Version: ${this.version}`,\n ].join('\\n');\n if (options.cause)\n this.cause = options.cause;\n this.details = details;\n this.docsPath = docsPath;\n this.metaMessages = options.metaMessages;\n this.shortMessage = shortMessage;\n }\n walk(fn) {\n return __classPrivateFieldGet(this, _BaseError_instances, \"m\", _BaseError_walk).call(this, this, fn);\n }\n}\n_BaseError_instances = new WeakSet(), _BaseError_walk = function _BaseError_walk(err, fn) {\n if (fn?.(err))\n return err;\n if (err.cause)\n return __classPrivateFieldGet(this, _BaseError_instances, \"m\", _BaseError_walk).call(this, err.cause, fn);\n return err;\n};\n//# sourceMappingURL=base.js.map","import { BaseError } from './base.js';\nexport class ChainNotConfiguredError extends BaseError {\n constructor() {\n super('Chain not configured.');\n Object.defineProperty(this, \"name\", {\n enumerable: true,\n configurable: true,\n writable: true,\n value: 'ChainNotConfiguredError'\n });\n }\n}\nexport class ConnectorAlreadyConnectedError extends BaseError {\n constructor() {\n super('Connector already connected.');\n Object.defineProperty(this, \"name\", {\n enumerable: true,\n configurable: true,\n writable: true,\n value: 'ConnectorAlreadyConnectedError'\n });\n }\n}\nexport class ConnectorNotConnectedError extends BaseError {\n constructor() {\n super('Connector not connected.');\n Object.defineProperty(this, \"name\", {\n enumerable: true,\n configurable: true,\n writable: true,\n value: 'ConnectorNotConnectedError'\n });\n }\n}\nexport class ConnectorNotFoundError extends BaseError {\n constructor() {\n super('Connector not found.');\n Object.defineProperty(this, \"name\", {\n enumerable: true,\n configurable: true,\n writable: true,\n value: 'ConnectorNotFoundError'\n });\n }\n}\nexport class ConnectorAccountNotFoundError extends BaseError {\n constructor({ address, connector, }) {\n super(`Account \"${address}\" not found for connector \"${connector.name}\".`);\n Object.defineProperty(this, \"name\", {\n enumerable: true,\n configurable: true,\n writable: true,\n value: 'ConnectorAccountNotFoundError'\n });\n }\n}\nexport class ConnectorChainMismatchError extends BaseError {\n constructor({ connectionChainId, connectorChainId, }) {\n super(`The current chain of the connector (id: ${connectorChainId}) does not match the connection's chain (id: ${connectionChainId}).`, {\n metaMessages: [\n `Current Chain ID: ${connectorChainId}`,\n `Expected Chain ID: ${connectionChainId}`,\n ],\n });\n Object.defineProperty(this, \"name\", {\n enumerable: true,\n configurable: true,\n writable: true,\n value: 'ConnectorChainMismatchError'\n });\n }\n}\nexport class ConnectorUnavailableReconnectingError extends BaseError {\n constructor({ connector }) {\n super(`Connector \"${connector.name}\" unavailable while reconnecting.`, {\n details: [\n 'During the reconnection step, the only connector methods guaranteed to be available are: `id`, `name`, `type`, `uuid`.',\n 'All other methods are not guaranteed to be available until reconnection completes and connectors are fully restored.',\n 'This error commonly occurs for connectors that asynchronously inject after reconnection has already started.',\n ].join(' '),\n });\n Object.defineProperty(this, \"name\", {\n enumerable: true,\n configurable: true,\n writable: true,\n value: 'ConnectorUnavailableReconnectingError'\n });\n }\n}\n//# sourceMappingURL=config.js.map","import { createClient, custom, } from 'viem';\nimport { getAddress, parseAccount } from 'viem/utils';\nimport { ConnectorAccountNotFoundError, ConnectorChainMismatchError, ConnectorNotConnectedError, ConnectorUnavailableReconnectingError, } from '../errors/config.js';\n/** https://wagmi.sh/core/api/actions/getConnectorClient */\nexport async function getConnectorClient(config, parameters = {}) {\n // Get connection\n let connection;\n if (parameters.connector) {\n const { connector } = parameters;\n if (config.state.status === 'reconnecting' &&\n !connector.getAccounts &&\n !connector.getChainId)\n throw new ConnectorUnavailableReconnectingError({ connector });\n const [accounts, chainId] = await Promise.all([\n connector.getAccounts(),\n connector.getChainId(),\n ]);\n connection = {\n accounts: accounts,\n chainId,\n connector,\n };\n }\n else\n connection = config.state.connections.get(config.state.current);\n if (!connection)\n throw new ConnectorNotConnectedError();\n const chainId = parameters.chainId ?? connection.chainId;\n // Check connector using same chainId as connection\n const connectorChainId = await connection.connector.getChainId();\n if (connectorChainId !== connection.chainId)\n throw new ConnectorChainMismatchError({\n connectionChainId: connection.chainId,\n connectorChainId,\n });\n const connector = connection.connector;\n if (connector.getClient)\n return connector.getClient({ chainId });\n // Default using `custom` transport\n const account = parseAccount(parameters.account ?? connection.accounts[0]);\n account.address = getAddress(account.address); // TODO: Checksum address as part of `parseAccount`?\n // If account was provided, check that it exists on the connector\n if (parameters.account &&\n !connection.accounts.some((x) => x.toLowerCase() === account.address.toLowerCase()))\n throw new ConnectorAccountNotFoundError({\n address: account.address,\n connector,\n });\n const chain = config.chains.find((chain) => chain.id === chainId);\n const provider = (await connection.connector.getProvider({ chainId }));\n return createClient({\n account,\n chain,\n name: 'Connector Client',\n transport: (opts) => custom(provider)({ ...opts, retryCount: 0 }),\n });\n}\n//# sourceMappingURL=getConnectorClient.js.map","import { simulateContract as viem_simulateContract, } from 'viem/actions';\nimport { getAction } from '../utils/getAction.js';\nimport { getConnectorClient, } from './getConnectorClient.js';\n/** https://wagmi.sh/core/api/actions/simulateContract */\nexport async function simulateContract(config, parameters) {\n const { abi, chainId, connector, ...rest } = parameters;\n let account;\n if (parameters.account)\n account = parameters.account;\n else {\n const connectorClient = await getConnectorClient(config, {\n chainId,\n connector,\n });\n account = connectorClient.account;\n }\n const client = config.getClient({ chainId });\n const action = getAction(client, viem_simulateContract, 'simulateContract');\n const { result, request } = await action({ ...rest, abi, account });\n return {\n chainId: client.chain.id,\n result,\n request: { __mode: 'prepared', ...request, chainId },\n };\n}\n//# sourceMappingURL=simulateContract.js.map","import { writeContract as viem_writeContract, } from 'viem/actions';\nimport { getAction } from '../utils/getAction.js';\nimport { getAccount } from './getAccount.js';\nimport { getConnectorClient, } from './getConnectorClient.js';\nimport { simulateContract, } from './simulateContract.js';\n/** https://wagmi.sh/core/api/actions/writeContract */\nexport async function writeContract(config, parameters) {\n const { account, chainId, connector, __mode, ...rest } = parameters;\n let client;\n if (typeof account === 'object' && account.type === 'local')\n client = config.getClient({ chainId });\n else\n client = await getConnectorClient(config, { account, chainId, connector });\n const { connector: activeConnector } = getAccount(config);\n let request;\n if (__mode === 'prepared' || activeConnector?.supportsSimulation)\n request = rest;\n else {\n const { request: simulateRequest } = await simulateContract(config, {\n ...rest,\n account,\n chainId,\n });\n request = simulateRequest;\n }\n const action = getAction(client, viem_writeContract, 'writeContract');\n const hash = await action({\n ...request,\n ...(account ? { account } : {}),\n chain: chainId ? { id: chainId } : null,\n });\n return hash;\n}\n//# sourceMappingURL=writeContract.js.map","import { getAccount } from '../getAccount.js';\nimport { getChainId } from '../getChainId.js';\nimport { writeContract, } from '../writeContract.js';\nexport function createWriteContract(c) {\n if (c.address !== undefined && typeof c.address === 'object')\n return (config, parameters) => {\n const configChainId = getChainId(config);\n const account = getAccount(config);\n let chainId;\n if (parameters.chainId)\n chainId = parameters.chainId;\n else if (parameters\n .account &&\n parameters\n .account === account.address)\n chainId = account.chainId;\n else if (parameters\n .account === undefined)\n chainId = account.chainId;\n else\n chainId = configChainId;\n return writeContract(config, {\n ...parameters,\n ...(c.functionName ? { functionName: c.functionName } : {}),\n address: chainId ? c.address?.[chainId] : undefined,\n abi: c.abi,\n });\n };\n return (config, parameters) => {\n return writeContract(config, {\n ...parameters,\n ...(c.address ? { address: c.address } : {}),\n ...(c.functionName ? { functionName: c.functionName } : {}),\n abi: c.abi,\n });\n };\n}\n//# sourceMappingURL=createWriteContract.js.map","import {\n boostCoreAbi,\n readBoostCoreCreateBoostAuth,\n readBoostCoreGetBoost,\n readBoostCoreGetBoostCount,\n readBoostCoreGetIncentiveFeesInfo,\n readBoostCoreProtocolFee,\n readBoostCoreProtocolFeeReceiver,\n readIAuthIsAuthorized,\n simulateBoostCoreClaimIncentive,\n simulateBoostCoreClaimIncentiveFor,\n simulateBoostCoreCreateBoost,\n simulateBoostCoreSetCreateBoostAuth,\n simulateBoostCoreSetProtocolFeeReceiver,\n simulateBoostCoreTopupIncentiveFromBudget,\n simulateBoostCoreTopupIncentiveFromSender,\n writeBoostCoreClaimIncentive,\n writeBoostCoreClaimIncentiveFor,\n writeBoostCoreCreateBoost,\n writeBoostCoreSetCreateBoostAuth,\n writeBoostCoreSetProtocolFeeReceiver,\n writeBoostCoreTopupIncentiveFromBudget,\n writeBoostCoreTopupIncentiveFromSender,\n} from '@boostxyz/evm';\nimport { bytecode } from '@boostxyz/evm/artifacts/contracts/BoostCore.sol/BoostCore.json';\nimport {\n type GetTransactionReceiptParameters,\n getAccount,\n getChains,\n getTransactionReceipt,\n readContract,\n waitForTransactionReceipt,\n} from '@wagmi/core';\nimport { createWriteContract } from '@wagmi/core/codegen';\nimport {\n type Address,\n type ContractEventName,\n type Hex,\n decodeAbiParameters,\n encodeAbiParameters,\n encodePacked,\n keccak256,\n parseEventLogs,\n zeroAddress,\n zeroHash,\n} from 'viem';\nimport { BoostCore as BoostCoreBases } from '../dist/deployments.json';\nimport { type Action, actionFromAddress } from './Actions/Action';\nimport { EventAction, type EventActionPayload } from './Actions/EventAction';\nimport { type AllowList, allowListFromAddress } from './AllowLists/AllowList';\nimport { OpenAllowList } from './AllowLists/OpenAllowList';\nimport {\n SimpleAllowList,\n type SimpleAllowListPayload,\n} from './AllowLists/SimpleAllowList';\nimport {\n SimpleDenyList,\n type SimpleDenyListPayload,\n} from './AllowLists/SimpleDenyList';\nimport { type Auth, PassthroughAuth } from './Auth/Auth';\nimport {\n Boost,\n type BoostPayload,\n type RawBoost,\n type Target,\n prepareBoostPayload,\n} from './Boost';\nimport { type Budget, budgetFromAddress } from './Budgets/Budget';\nimport {\n ManagedBudget,\n type ManagedBudgetPayload,\n} from './Budgets/ManagedBudget';\nimport {\n ManagedBudgetWithFees,\n type ManagedBudgetWithFeesPayload,\n} from './Budgets/ManagedBudgetWithFees';\nimport {\n ManagedBudgetWithFeesV2,\n type ManagedBudgetWithFeesV2Payload,\n} from './Budgets/ManagedBudgetWithFeesV2';\nimport {\n Deployable,\n type DeployableOptions,\n type DeployablePayloadOrAddress,\n type GenericDeployableParams,\n} from './Deployable/Deployable';\nimport { Roles } from './Deployable/DeployableTargetWithRBAC';\nimport {\n AllowListIncentive,\n type AllowListIncentivePayload,\n} from './Incentives/AllowListIncentive';\nimport {\n CGDAIncentive,\n type CGDAIncentivePayload,\n} from './Incentives/CGDAIncentive';\nimport {\n ERC20Incentive,\n type ERC20IncentivePayload,\n} from './Incentives/ERC20Incentive';\nimport {\n ERC20PeggedIncentive,\n type ERC20PeggedIncentivePayload,\n} from './Incentives/ERC20PeggedIncentive';\nimport {\n ERC20PeggedVariableCriteriaIncentive,\n type ERC20PeggedVariableCriteriaIncentivePayload,\n} from './Incentives/ERC20PeggedVariableCriteriaIncentive';\nimport {\n ERC20VariableCriteriaIncentive,\n type ERC20VariableCriteriaIncentivePayload,\n} from './Incentives/ERC20VariableCriteriaIncentive';\nimport type { ERC20VariableIncentivePayload } from './Incentives/ERC20VariableIncentive';\nimport {\n ERC20VariableIncentive,\n type Incentive,\n incentiveFromAddress,\n} from './Incentives/Incentive';\nimport {\n PointsIncentive,\n type PointsIncentivePayload,\n} from './Incentives/PointsIncentive';\nimport {\n LimitedSignerValidator,\n type LimitedSignerValidatorPayload,\n} from './Validators/LimitedSignerValidator';\nimport {\n SignerValidator,\n type SignerValidatorPayload,\n} from './Validators/SignerValidator';\nimport {\n BoostValidatorEOA,\n type Validator,\n validatorFromAddress,\n} from './Validators/Validator';\nimport {\n BoostCoreNoIdentifierEmitted,\n BoostNotFoundError,\n BudgetMustAuthorizeBoostCore,\n DeployableUnknownOwnerProvidedError,\n IncentiveNotCloneableError,\n InvalidProtocolChainIdError,\n MustInitializeBudgetError,\n} from './errors';\nimport type { AssetType } from './transfers';\nimport {\n type GenericLog,\n type HashAndSimulatedResult,\n type ReadParams,\n type WriteParams,\n assertValidAddressByChainId,\n} from './utils';\n\n/**\n * The ABI of the BoostCore contract, if needed for low level operations\n *\n * @type {typeof boostCoreAbi}\n */\nexport { boostCoreAbi };\n\n/**\n * The fee denominator (basis points, i.e. 10000 == 100%)\n *\n * @type {bigint}\n */\nexport const FEE_DENOMINATOR = 10000n;\n\n/**\n * The fixed addresses for the deployed Boost Core.\n * By default, `new BoostCore` will use the address deployed to the currently connected chain, or `BOOST_CORE_ADDRESS` if not provided.\n *\n * @type {Record<number, Address>}\n */\nexport const BOOST_CORE_ADDRESSES: Record<number, Address> = {\n 31337: import.meta.env.VITE_BOOST_CORE_ADDRESS,\n ...(BoostCoreBases as Record<number, Address>),\n};\n\n/**\n * The address of the deployed BoostCore instance. In prerelease mode, this will be its sepolia address\n *\n * @type {Address}\n */\nexport const BOOST_CORE_ADDRESS =\n BOOST_CORE_ADDRESSES[__DEFAULT_CHAIN_ID__ as unknown as number] ||\n zeroAddress;\n\n/**\n * A generic `viem.Log` event with support for `BoostCore` event types.\n *\n * @export\n * @typedef {BoostCoreLog}\n * @template {ContractEventName<typeof boostCoreAbi>} [event=ContractEventName<\n * typeof boostCoreAbi\n * >]\n */\nexport type BoostCoreLog<\n event extends ContractEventName<typeof boostCoreAbi> = ContractEventName<\n typeof boostCoreAbi\n >,\n> = GenericLog<typeof boostCoreAbi, event>;\n\n/**\n * Boost Core instantiation options for a custom deployed instance.\n *\n * @export\n * @interface BoostCoreDeployedOptions\n * @typedef {BoostCoreDeployedOptions}\n * @extends {DeployableOptions}\n */\nexport interface BoostCoreDeployedOptions extends DeployableOptions {\n /**\n * The address of a deployed, custom Boost Core contract.\n *\n * @type {?Address}\n */\n address?: Address;\n}\n\n/**\n * Typeguard to determine if a user is supplying a custom address for a Boost Core contract.\n *\n * @param {*} opts\n * @returns {opts is BoostCoreDeployedOptions}\n */\n// biome-ignore lint/suspicious/noExplicitAny: type guard\nfunction isBoostCoreDeployed(opts: any): opts is BoostCoreDeployedOptions {\n return opts.address;\n}\n\n/**\n * Boost Core instantiation options when a user intends to deploy a new instance of Boost Core, setting their own registry address and protocol fee receiver.\n *\n * @export\n * @interface BoostCoreOptionsWithPayload\n * @typedef {BoostCoreOptionsWithPayload}\n * @extends {DeployableOptions}\n */\nexport interface BoostCoreOptionsWithPayload extends DeployableOptions {\n /**\n * The address of a deployed Boost Registry contract.\n *\n * @type {Address}\n */\n registryAddress: Address;\n /**\n * The address to send fees.\n *\n * @type {Address}\n */\n protocolFeeReceiver: Address;\n /**\n * The address that will be defined as the BoostCore owner.\n */\n owner: Address;\n}\n\n/**\n * Typeguard to determine if a user is intending to deploy a new instance of the Boost Core contracts with {@link BoostCoreOptionsWithPayload}.\n *\n * @param {*} opts\n * @returns {opts is BoostCoreOptionsWithPayload}\n */\n// biome-ignore lint/suspicious/noExplicitAny: type guard\nfunction isBoostCoreDeployable(opts: any): opts is BoostCoreOptionsWithPayload {\n return opts.registryAddress && opts.protocolFeeReceiver && opts.owner;\n}\n\n/**\n * A union representing both of the valid Boost Core instantiation parameters.\n *\n * @export\n * @typedef {BoostCoreConfig}\n */\nexport type BoostCoreConfig =\n | BoostCoreDeployedOptions\n | BoostCoreOptionsWithPayload;\n\n/**\n * The interface required to create a new Boost.\n *\n * @export\n * @typedef {CreateBoostPayload}\n */\nexport type CreateBoostPayload = {\n budget: Budget;\n action: Action;\n validator?: Validator;\n allowList?: AllowList;\n incentives: Array<Incentive>;\n protocolFee?: bigint;\n maxParticipants?: bigint;\n owner?: Address;\n};\n\n/**\n * Represents the information about the disbursal of an incentive.\n *\n * @export\n * @typedef {IncentiveDisbursalInfo}\n */\nexport type IncentiveDisbursalInfo = {\n assetType: AssetType;\n asset: Address;\n protocolFeesRemaining: bigint;\n protocolFee: bigint;\n tokenId: bigint;\n};\n\n/**\n * The core contract for the Boost protocol. Used to create and retrieve deployed Boosts.\n *\n * @export\n * @class BoostCore\n * @typedef {BoostCore}\n * @extends {Deployable<[Address, Address, Address]>}\n */\nexport class BoostCore extends Deployable<\n [Address, Address, Address],\n typeof boostCoreAbi\n> {\n /**\n * A static property representing a map of stringified chain ID's to the address of the deployed implementation on chain\n *\n * @static\n * @readonly\n * @type {Record<string, Address>}\n */\n static readonly addresses: Record<number, Address> = BOOST_CORE_ADDRESSES;\n\n /**\n * A getter that will return Boost core's static addresses by numerical chain ID\n *\n * @public\n * @readonly\n * @type {Record<number, Address>}\n */\n public get addresses(): Record<number, Address> {\n return (this.constructor as typeof BoostCore).addresses;\n }\n\n /**\n * Creates an instance of BoostCore.\n *\n * @constructor\n * @param {BoostCoreConfig} param0\n * @param {Config} param0.config\n * @param {?Account} [param0.account]\n * @param {({ address?: Address; } | { registryAddress: Address; protocolFeeReceiver: Address; owner: Address; })} param0....options\n */\n constructor({ config, account, ...options }: BoostCoreConfig) {\n if (isBoostCoreDeployed(options) && options.address) {\n super({ account, config }, options.address);\n } else if (isBoostCoreDeployable(options)) {\n super({ account, config }, [\n options.registryAddress,\n options.protocolFeeReceiver,\n options.owner,\n ]);\n } else {\n const { address } = assertValidAddressByChainId(\n config,\n BOOST_CORE_ADDRESSES,\n );\n super({ account, config }, address);\n }\n //@ts-expect-error I can't set this property on the class because for some reason it takes super out of constructor scope?\n this.abi = boostCoreAbi;\n }\n\n /**\n * Create a new Boost.\n *\n *\n * @public\n * @async\n * @param {CreateBoostPayload} _boostPayload\n * @param {?WriteParams} [params]\n * @returns {Promise<Boost>}\n */\n public async createBoost(\n _boostPayload: CreateBoostPayload,\n _params?: WriteParams,\n ) {\n const [payload, options] =\n this.validateDeploymentConfig<CreateBoostPayload>(_boostPayload);\n const desiredChainId = _params?.chainId;\n const { chainId, address: coreAddress } = assertValidAddressByChainId(\n options.config,\n this.addresses,\n desiredChainId,\n );\n\n const boostFactory = createWriteContract({\n abi: boostCoreAbi,\n functionName: 'createBoost',\n address: coreAddress,\n });\n\n const onChainPayload = await this.prepareCreateBoostPayload(\n coreAddress,\n chainId,\n payload,\n options,\n );\n\n const boostHash = await boostFactory(options.config, {\n ...this.optionallyAttachAccount(options.account),\n // biome-ignore lint/suspicious/noExplicitAny: Accept any shape of valid wagmi/viem parameters, wagmi does the same thing internally\n ...(_params as any),\n chainId,\n args: [prepareBoostPayload(onChainPayload)],\n });\n const receipt = await waitForTransactionReceipt(options.config, {\n hash: boostHash,\n });\n const boostCreatedLog = parseEventLogs({\n abi: boostCoreAbi,\n eventName: 'BoostCreated',\n logs: receipt.logs,\n }).at(0);\n let boostId = 0n;\n if (!boostCreatedLog) throw new BoostCoreNoIdentifierEmitted();\n boostId = boostCreatedLog?.args.boostId;\n const boost = await this.readBoost(boostId);\n return new Boost({\n id: boostId,\n budget: payload.budget.at(boost.budget),\n action: payload.action.at(boost.action),\n validator: payload.validator!.at(boost.validator),\n allowList: payload.allowList!.at(boost.allowList),\n incentives: payload.incentives.map((incentive, i) =>\n // biome-ignore lint/style/noNonNullAssertion: this will never be undefined\n incentive.at(boost.incentives.at(i)!),\n ),\n protocolFee: boost.protocolFee,\n maxParticipants: boost.maxParticipants,\n owner: boost.owner,\n });\n }\n\n /**\n * Create a new Boost.\n *\n * @public\n * @async\n * @param {CreateBoostPayload} _boostPayload\n * @param {?WriteParams} [params]\n * @returns {Promise<HashAndSimulatedResult>}\n */\n public async createBoostRaw(\n _boostPayload: CreateBoostPayload,\n _params?: WriteParams,\n ): Promise<HashAndSimulatedResult> {\n const { request, result } = await this.simulateCreateBoost(\n _boostPayload,\n _params,\n );\n const hash = await writeBoostCoreCreateBoost(this._config, request);\n return { hash, result };\n }\n\n /**\n * Returns a simulated Boost creation.\n *\n * @public\n * @async\n * @param {CreateBoostPayload} _boostPayload\n * @param {?WriteParams} [params]\n * @returns {Promise<SimulateContractReturnType>}\n */\n public async simulateCreateBoost(\n _boostPayload: CreateBoostPayload,\n _params?: WriteParams,\n ) {\n const [payload, options] =\n this.validateDeploymentConfig<CreateBoostPayload>(_boostPayload);\n const desiredChainId = _params?.chainId;\n const { chainId, address: coreAddress } = assertValidAddressByChainId(\n options.config,\n this.addresses,\n desiredChainId,\n );\n\n const onChainPayload = await this.prepareCreateBoostPayload(\n coreAddress,\n chainId,\n payload,\n options,\n );\n\n return await simulateBoostCoreCreateBoost(this._config, {\n ...this.optionallyAttachAccount(),\n // biome-ignore lint/suspicious/noExplicitAny: Accept any shape of valid wagmi/viem parameters, wagmi does the same thing internally\n ...(_params as any),\n address: coreAddress,\n chainId,\n args: [prepareBoostPayload(onChainPayload)],\n });\n }\n\n // This function mutates payload, which isn't awesome but it's fine\n private async prepareCreateBoostPayload(\n coreAddress: Address,\n chainId: number,\n payload: CreateBoostPayload,\n options: DeployableOptions,\n ): Promise<Required<BoostPayload>> {\n if (!payload.owner) {\n payload.owner =\n this._account?.address ||\n getAccount(options.config).address ||\n zeroAddress;\n if (payload.owner === zeroAddress) {\n throw new DeployableUnknownOwnerProvidedError();\n }\n }\n\n // If not providing a custom validator, use either Boost's mainnet or testnet EOA, depending on provided chain id and given chain configurations\n if (!payload.validator) {\n const chains = getChains(options.config).filter(\n (chain) => !!this.addresses[chain.id] && chain.id === chainId,\n );\n const chain = chains.at(0);\n if (!chain)\n throw new InvalidProtocolChainIdError(\n chainId,\n Object.keys(this.addresses).map(Number),\n );\n const testnet = chain.testnet || chain.id === 31337;\n payload.validator = this.SignerValidator({\n signers: [\n (testnet\n ? BoostValidatorEOA.TESTNET\n : BoostValidatorEOA.MAINNET) as unknown as Address,\n ],\n validatorCaller: coreAddress,\n });\n }\n\n let budgetPayload: BoostPayload['budget'] = zeroAddress;\n if (payload.budget.address) {\n budgetPayload = payload.budget.address;\n if (!(await payload.budget.isAuthorized(coreAddress))) {\n throw new BudgetMustAuthorizeBoostCore(coreAddress);\n }\n } else {\n throw new MustInitializeBudgetError();\n }\n\n // if we're supplying an address, it could be a pre-initialized target\n // if base is explicitly set to false, then it will not be initialized, and it will be referenced as is if it implements interface correctly\n let actionPayload: BoostPayload['action'] = {\n instance: zeroAddress,\n isBase: true,\n parameters: zeroHash,\n };\n if (payload.action.address) {\n const isBase = payload.action.isBase;\n actionPayload = {\n isBase: isBase,\n instance: payload.action.address,\n parameters: isBase\n ? payload.action.buildParameters(undefined, options).args.at(0) ||\n zeroHash\n : zeroHash,\n };\n } else {\n actionPayload.parameters =\n payload.action.buildParameters(undefined, options).args.at(0) ||\n zeroHash;\n actionPayload.instance = assertValidAddressByChainId(\n options.config,\n payload.action.bases,\n chainId,\n ).address;\n }\n\n let validatorPayload: BoostPayload['validator'] = {\n instance: zeroAddress,\n isBase: true,\n parameters: zeroHash,\n };\n if (payload.validator.address) {\n const isBase = payload.validator.isBase;\n validatorPayload = {\n isBase: isBase,\n instance: payload.validator.address,\n parameters: isBase\n ? payload.validator.buildParameters(undefined, options).args.at(0) ||\n zeroHash\n : zeroHash,\n };\n } else {\n validatorPayload.parameters =\n payload.validator.buildParameters(undefined, options).args.at(0) ||\n zeroHash;\n validatorPayload.instance = assertValidAddressByChainId(\n options.config,\n payload.validator.bases,\n chainId,\n ).address;\n }\n\n let allowListPayload: BoostPayload['allowList'] = {\n instance: zeroAddress,\n isBase: true,\n parameters: zeroHash,\n };\n // if allowlist not provided, assume open allowlist\n if (!payload.allowList) {\n payload.allowList = this.OpenAllowList();\n }\n if (payload.allowList.address) {\n const isBase = payload.allowList.isBase;\n allowListPayload = {\n isBase: isBase,\n instance: payload.allowList.address,\n parameters: isBase\n ? zeroHash // allowList.buildParameters(undefined, options).args.at(0) || zeroHash\n : zeroHash,\n };\n } else {\n allowListPayload.parameters =\n payload.allowList.buildParameters(undefined, options).args.at(0) ||\n zeroHash;\n allowListPayload.instance = assertValidAddressByChainId(\n options.config,\n payload.allowList.bases,\n chainId,\n ).address;\n }\n\n const incentivesPayloads: Array<Target> = payload.incentives.map(() => ({\n instance: zeroAddress,\n isBase: true,\n parameters: zeroHash,\n }));\n for (let i = 0; i < payload.incentives.length; i++) {\n // biome-ignore lint/style/noNonNullAssertion: this will never be undefined\n const incentive = payload.incentives.at(i)!;\n if (incentive.address) {\n const isBase = incentive.isBase;\n if (!isBase) throw new IncentiveNotCloneableError(incentive);\n incentivesPayloads[i] = {\n isBase: isBase,\n instance: incentive.address,\n parameters: isBase\n ? incentive.buildParameters(undefined, options).args.at(0) ||\n zeroHash\n : zeroHash,\n };\n } else {\n // biome-ignore lint/style/noNonNullAssertion: this will never be undefined\n incentivesPayloads[i]!.parameters =\n incentive.buildParameters(undefined, options).args.at(0) || zeroHash;\n // biome-ignore lint/style/noNonNullAssertion: this will never be undefined\n incentivesPayloads[i]!.instance = assertValidAddressByChainId(\n options.config,\n incentive.bases,\n chainId,\n ).address;\n }\n }\n\n const onChainPayload = {\n budget: budgetPayload,\n action: actionPayload,\n validator: validatorPayload,\n allowList: allowListPayload,\n incentives: incentivesPayloads,\n protocolFee: payload.protocolFee || 0n,\n maxParticipants: payload.maxParticipants || 0n,\n owner: payload.owner,\n };\n\n return onChainPayload;\n }\n\n /**\n * Claims one incentive from a given `Boost` by `boostId` and `incentiveId`\n *\n * @public\n * @async\n * @param {bigint} boostId\n * @param {bigint} incentiveId\n * @param {Address} address\n * @param {Hex} data\n * @param {?WriteParams} [params]\n * @returns {Promise<void>}\n */\n public async claimIncentive(\n boostId: bigint,\n incentiveId: bigint,\n address: Address,\n data: Hex,\n params?: WriteParams,\n ) {\n return await this.awaitResult(\n this.claimIncentiveRaw(boostId, incentiveId, address, data, params),\n );\n }\n\n /**\n * Claim an incentive for a Boost\n *\n * @public\n * @async\n * @param {bigint} boostId - The ID of the Boost\n * @param {bigint} incentiveId - The ID of the Incentive\n * @param {Address} referrer - The address of the referrer (if any)\n * @param {Hex} data- The data for the claim\n * @param {?WriteParams} [params]\n * @returns {Promise<{ hash: `0x${string}`; result: void; }>}\n */\n public async claimIncentiveRaw(\n boostId: bigint,\n incentiveId: bigint,\n referrer: Address,\n data: Hex,\n params?: WriteParams,\n ) {\n const { request, result } = await simulateBoostCoreClaimIncentive(\n this._config,\n {\n ...assertValidAddressByChainId(\n this._config,\n this.addresses,\n params?.chainId,\n ),\n args: [boostId, incentiveId, referrer, data],\n ...this.optionallyAttachAccount(),\n // biome-ignore lint/suspicious/noExplicitAny: Accept any shape of valid wagmi/viem parameters, wagmi does the same thing internally\n ...(params as any),\n },\n );\n const hash = await writeBoostCoreClaimIncentive(this._config, request);\n return { hash, result };\n }\n\n /**\n * Claims one incentive for a given `Boost` on behalf of another user by `boostId` and `incentiveId`\n *\n * @public\n * @async\n * @param {bigint} boostId\n * @param {bigint} incentiveId\n * @param {Address} referrer\n * @param {Hex} data\n * @param {Address} claimant\n * @param {?WriteParams} [params]\n * @returns {Promise<void>}\n */\n public async claimIncentiveFor(\n boostId: bigint,\n incentiveId: bigint,\n referrer: Address,\n data: Hex,\n claimant: Address,\n params?: WriteParams,\n ) {\n return await this.awaitResult(\n this.claimIncentiveForRaw(\n boostId,\n incentiveId,\n referrer,\n data,\n claimant,\n params,\n ),\n );\n }\n\n /**\n * Claim an incentive for a Boost on behalf of another user\n *\n * @public\n * @async\n * @param {bigint} boostId - The ID of the Boost\n * @param {bigint} incentiveId - The ID of the Incentive\n * @param {Address} referrer - The address of the referrer (if any)\n * @param {Hex} data - The data for the claim\n * @param {Address} claimant - The address of the user eligible for the incentive payout\n * @param {?WriteParams} [params]\n * @returns {Promise<{ hash: Hex; result: void; }>}\n */\n public async claimIncentiveForRaw(\n boostId: bigint,\n incentiveId: bigint,\n referrer: Address,\n data: Hex,\n claimant: Address,\n params?: WriteParams,\n ) {\n const { request, result } = await simulateBoostCoreClaimIncentiveFor(\n this._config,\n {\n ...assertValidAddressByChainId(\n this._config,\n this.addresses,\n params?.chainId,\n ),\n args: [boostId, incentiveId, referrer, data, claimant],\n ...this.optionallyAttachAccount(),\n // biome-ignore lint/suspicious/noExplicitAny: Accept any shape of valid wagmi/viem parameters, wagmi does the same thing internally\n ...(params as any),\n },\n );\n const hash = await writeBoostCoreClaimIncentiveFor(this._config, request);\n return { hash, result };\n }\n\n /**\n * Get a Boost by index, will return the raw on chain representation of a Boost.\n *\n * @public\n * @async\n * @param {bigint | string} id\n * @param {?ReadParams} [params]\n * @returns {Promise<RawBoost>}\n * @throws {@link BoostNotFoundError}\n */\n public async readBoost(\n _id: string | bigint,\n params?: ReadParams,\n ): Promise<RawBoost> {\n try {\n let id: bigint;\n if (typeof _id === 'string') {\n id = BigInt(_id);\n } else id = _id;\n return await readBoostCoreGetBoost(this._config, {\n ...assertValidAddressByChainId(\n this._config,\n this.addresses,\n params?.chainId,\n ),\n args: [id],\n ...this.optionallyAttachAccount(),\n // biome-ignore lint/suspicious/noExplicitAny: Accept any shape of valid wagmi/viem parameters, wagmi does the same thing internally\n ...(params as any),\n });\n // biome-ignore lint/suspicious/noExplicitAny: unknown error\n } catch (e: any) {\n if (e?.message?.includes('bounds'))\n throw new BoostNotFoundError(String(_id));\n throw e;\n }\n }\n\n /**\n * Get a Boost by index, will return a new {@link Boost} with correct target implementations instantiated, ie `(await core.getBoost(0n)).allowList instanceof SimpleAllowList` vs `SimpleDenyList`\n *\n * @public\n * @async\n * @param {(string | bigint)} _id\n * @param {?ReadParams} [params]\n * @returns {Promise<Boost>}\n * @throws {@link BoostNotFoundError}\n */\n public async getBoost(_id: string | bigint, params?: ReadParams) {\n let id: bigint;\n if (typeof _id === 'string') {\n id = BigInt(_id);\n } else id = _id;\n const { protocolFee, maxParticipants, owner, ...boostPayload } =\n await this.readBoost(id, params);\n const options: DeployableOptions = {\n config: this._config,\n account: this._account,\n };\n const [action, budget, validator, allowList, incentives] =\n await Promise.all([\n actionFromAddress(options, boostPayload.action, params),\n budgetFromAddress(options, boostPayload.budget, params),\n validatorFromAddress(options, boostPayload.validator, params),\n allowListFromAddress(options, boostPayload.allowList, params),\n Promise.all(\n boostPayload.incentives.map((incentiveAddress) =>\n incentiveFromAddress(options, incentiveAddress, params),\n ),\n ),\n ]);\n return new Boost({\n id,\n action,\n budget,\n validator,\n allowList,\n incentives: incentives as Incentive[],\n protocolFee,\n maxParticipants,\n owner,\n });\n }\n\n /**\n * Retrieve the total number of deployed Boosts\n *\n * @public\n * @async\n * @param {?ReadParams} [params]\n * @returns {Promise<bigint>}\n */\n public async getBoostCount(params?: ReadParams) {\n return await readBoostCoreGetBoostCount(this._config, {\n ...assertValidAddressByChainId(\n this._config,\n this.addresses,\n params?.chainId,\n ),\n args: [],\n ...this.optionallyAttachAccount(),\n // biome-ignore lint/suspicious/noExplicitAny: Accept any shape of valid wagmi/viem parameters, wagmi does the same thing internally\n ...(params as any),\n });\n }\n\n /**\n * Checks if an address is authorized\n *\n * @public\n * @async\n * @param {Address} address\n * @param {?ReadParams &\n * ReadParams} [params]\n * @returns {Promise<boolean>}\n */\n public async isAuthorized(\n address: Address,\n params?: ReadParams & ReadParams,\n ) {\n const auth = await this.createBoostAuth(params);\n return readIAuthIsAuthorized(this._config, {\n address: auth,\n args: [address],\n ...this.optionallyAttachAccount(),\n // biome-ignore lint/suspicious/noExplicitAny: Accept any shape of valid wagmi/viem parameters, wagmi does the same thing internally\n ...(params as any),\n });\n }\n\n /**\n * Retrieve the address of the current creation auth provider.\n *\n * @public\n * @async\n * @param {?ReadParams} [params]\n * @returns {Promise<Address>}\n */\n public async createBoostAuth(params?: ReadParams) {\n return await readBoostCoreCreateBoostAuth(this._config, {\n ...assertValidAddressByChainId(\n this._config,\n this.addresses,\n params?.chainId,\n ),\n args: [],\n ...this.optionallyAttachAccount(),\n // biome-ignore lint/suspicious/noExplicitAny: Accept any shape of valid wagmi/viem parameters, wagmi does the same thing internally\n ...(params as any),\n });\n }\n\n /**\n * Replace the current auth scheme.\n *\n * @public\n * @async\n * @param {Auth} auth\n * @param {?WriteParams} [params]\n * @returns {Promise<void>}\n */\n public async setCreateBoostAuth(auth: Auth, params?: WriteParams) {\n return await this.awaitResult(\n this.setCreateBoostAuthRaw(auth.assertValidAddress(), {\n ...params,\n }),\n );\n }\n\n /**\n * Set the createBoostAuth address\n *\n * @public\n * @async\n * @param {Address} address\n * @param {?WriteParams} [params]\n * @returns {Promise<{ hash: `0x${string}`; result: void; }>}\n */\n public async setCreateBoostAuthRaw(address: Address, params?: WriteParams) {\n const { request, result } = await simulateBoostCoreSetCreateBoostAuth(\n this._config,\n {\n ...assertValidAddressByChainId(\n this._config,\n this.addresses,\n params?.chainId,\n ),\n args: [address],\n ...this.optionallyAttachAccount(),\n // biome-ignore lint/suspicious/noExplicitAny: Accept any shape of valid wagmi/viem parameters, wagmi does the same thing internally\n ...(params as any),\n },\n );\n const hash = await writeBoostCoreSetCreateBoostAuth(this._config, request);\n return { hash, result };\n }\n\n /**\n * Get the protocol fee.\n *\n * @public\n * @async\n * @param {?ReadParams} [params]\n * @returns {unknown}\n */\n public async protocolFee(params?: ReadParams) {\n return await readBoostCoreProtocolFee(this._config, {\n ...assertValidAddressByChainId(\n this._config,\n this.addresses,\n params?.chainId,\n ),\n args: [],\n ...this.optionallyAttachAccount(),\n // biome-ignore lint/suspicious/noExplicitAny: Accept any shape of valid wagmi/viem parameters, wagmi does the same thing internally\n ...(params as any),\n });\n }\n\n /**\n * Get the protocol fee receiver.\n *\n * @public\n * @async\n * @param {?ReadParams} [params]\n * @returns {Promise<Address>}\n */\n public async protocolFeeReceiver(params?: ReadParams) {\n return await readBoostCoreProtocolFeeReceiver(this._config, {\n ...assertValidAddressByChainId(\n this._config,\n this.addresses,\n params?.chainId,\n ),\n args: [],\n ...this.optionallyAttachAccount(),\n // biome-ignore lint/suspicious/noExplicitAny: Accept any shape of valid wagmi/viem parameters, wagmi does the same thing internally\n ...(params as any),\n });\n }\n\n /**\n * Set the protocol fee receiver address. This function is only callable by the owner.\n *\n * @public\n * @async\n * @param {Address} address\n * @param {?WriteParams} [params]\n * @returns {Promise<void>}\n */\n public async setProcolFeeReceiver(address: Address, params?: WriteParams) {\n return await this.awaitResult(\n this.setProcolFeeReceiverRaw(address, {\n ...params,\n }),\n );\n }\n\n /**\n * Set the protocol fee receiver address. This function is only callable by the owner.\n *\n * @public\n * @async\n * @param {Address} address\n * @param {?WriteParams} [params]\n * @returns {Promise<{ hash: `0x${string}`; result: void; }>}\n */\n public async setProcolFeeReceiverRaw(address: Address, params?: WriteParams) {\n const { request, result } = await simulateBoostCoreSetProtocolFeeReceiver(\n this._config,\n {\n ...assertValidAddressByChainId(\n this._config,\n this.addresses,\n params?.chainId,\n ),\n args: [address],\n ...this.optionallyAttachAccount(),\n // biome-ignore lint/suspicious/noExplicitAny: Accept any shape of valid wagmi/viem parameters, wagmi does the same thing internally\n ...(params as any),\n },\n );\n const hash = await writeBoostCoreSetProtocolFeeReceiver(\n this._config,\n request,\n );\n return { hash, result };\n }\n\n /**\n * Get the incentives fees information for a given Boost ID and Incentive ID.\n *\n * @public\n * @async\n * @param {bigint} boostId - The ID of the Boost\n * @param {bigint} incentiveId - The ID of the Incentive\n * @param {?ReadParams} [params]\n * @returns {Promise<IncentiveDisbursalInfo>}\n */\n public async getIncentiveFeesInfo(\n boostId: bigint,\n incentiveId: bigint,\n params?: ReadParams,\n ) {\n const key = keccak256(\n encodePacked(['uint256', 'uint256'], [boostId, incentiveId]),\n );\n\n return await readBoostCoreGetIncentiveFeesInfo(this._config, {\n ...assertValidAddressByChainId(\n this._config,\n this.addresses,\n params?.chainId,\n ),\n args: [key],\n ...this.optionallyAttachAccount(),\n // biome-ignore lint/suspicious/noExplicitAny: Accept any shape of valid wagmi/viem parameters, wagmi does the same thing internally\n ...(params as any),\n });\n }\n\n /**\n * Retrieves the claim information from a transaction receipt.\n *\n * @param {GetTransactionReceiptParameters} params - The parameters required to get the transaction receipt.\n * @returns {Promise<{ boostId: bigint, incentiveId: bigint, claimer: Address, amount: bigint } | undefined>} The claim information if found, undefined otherwise.\n *\n * @description\n * This method retrieves the transaction receipt using the provided parameters,\n * then parses the logs to find the 'BoostClaimed' event.\n * If found, it returns the arguments of the event, which include the boost ID,\n * incentive ID, claimer address, and claimed amount.\n *\n * @example\n * ```ts\n * const claimInfo = await boostCore.getClaimFromTransaction({\n * hash: '0x...',\n * chainId: 1\n * });\n * if (claimInfo) {\n * console.log(`Boost ${claimInfo.boostId} claimed by ${claimInfo.claimer}`);\n * }\n * ```\n */\n public async getClaimFromTransaction(\n params: GetTransactionReceiptParameters,\n ) {\n const receipt = await getTransactionReceipt(this._config, params);\n const logs = parseEventLogs({\n abi: boostCoreAbi,\n eventName: 'BoostClaimed',\n logs: receipt.logs,\n });\n return logs.at(0)?.args;\n }\n\n /**\n * Calculate the protocol fee for ERC20 or ETH assets for a given amount. Fees are collected when initializing new incentives, or clawing back from incentives.\n *\n * @example\n * ```ts\n * const fee = await core.calculateProtocolFee(\n * await incentive.getTotalBudget()\n * )\n * const totalIncentiveFundAmount = desiredAmount + fee\n * await erc20.approve(budget.assertValidAddress(), totalIncentiveFundAmount);\n * await budget.allocate({\n * amount: totalIncentiveFundAmount,\n * asset: erc20.assertValidAddress(),\n * target: '0xME',\n * });\n *\n * ```\n * @public\n * @async\n * @param {bigint} [amount]\n * @param {?ReadParams} [params]\n * @returns {Promise<void>}\n */\n public async calculateProtocolFee(amount: bigint, params?: ReadParams) {\n const protocolFee = await this.protocolFee(params);\n return (amount * protocolFee) / FEE_DENOMINATOR;\n }\n\n /**\n * Bound {@link PassthroughAuth} constructor that reuses the same configuration as the Boost Core instance.\n *\n * @example\n * ```ts\n * const auth = core.PassthroughAuth('0x') // is roughly equivalent to\n * const auth = new PassthroughAuth({ config: core._config, account: core._account }, '0x')\n * ```\n * @param {Address} address\n * @returns {PassthroughAuth}\n */\n PassthroughAuth(address?: Address) {\n return new PassthroughAuth(\n { config: this._config, account: this._account },\n address,\n );\n }\n\n // /**\n // * Bound {@link ContractAction} constructor that reuses the same configuration as the Boost Core instance.\n // *\n // * @example\n // * ```ts\n // * const action = core.ContractAction('0x') // is roughly equivalent to\n // * const action = new ContractAction({ config: core._config, account: core._account }, '0x')\n // * ```\n // * @param {DeployablePayloadOrAddress<ContractActionPayload>} options\n // * @param {?boolean} [isBase]\n // * @returns {ContractAction}\n // */\n // ContractAction(\n // options: DeployablePayloadOrAddress<ContractActionPayload>,\n // isBase?: boolean,\n // ) {\n // return new ContractAction(\n // { config: this._config, account: this._account },\n // options,\n // isBase,\n // );\n // }\n\n /**\n * Bound {@link EventAction} constructor that reuses the same configuration as the Boost Core instance.\n *\n * @example\n * ```ts\n * const action = core.EventAction('0x') // is roughly equivalent to\n * const action = new EventAction({ config: core._config, account: core._account }, '0x')\n */\n EventAction(\n options: DeployablePayloadOrAddress<EventActionPayload>,\n isBase?: boolean,\n ) {\n return new EventAction(\n { config: this._config, account: this._account },\n options,\n isBase,\n );\n }\n // /**\n // * Bound {@link ERC721MintAction} constructor that reuses the same configuration as the Boost Core instance.\n // *\n // * @example\n // * ```ts\n // * const action = core.ERC721MintAction('0x') // is roughly equivalent to\n // * const action = new ERC721MintAction({ config: core._config, account: core._account }, '0x')\n // * ```\n // * @param {DeployablePayloadOrAddress<ERC721MintActionPayload>} options\n // * @param {?boolean} [isBase]\n // * @returns {ERC721MintAction}\n // */\n // ERC721MintAction(\n // options: DeployablePayloadOrAddress<ERC721MintActionPayload>,\n // isBase?: boolean,\n // ) {\n // return new ERC721MintAction(\n // { config: this._config, account: this._account },\n // options,\n // isBase,\n // );\n // }\n /**\n * Bound {@link OpenAllowList} constructor that reuses the same configuration as the Boost Core instance.\n *\n * @example\n * ```ts\n * const list = core.OpenAllowList('0x') // is roughly equivalent to\n * const list = new OpenAllowList({ config: core._config, account: core._account }, '0x')\n * ```\n * @param {?boolean} [isBase]\n * @returns {OpenAllowList}\n */\n OpenAllowList(isBase?: boolean) {\n return new OpenAllowList(\n { config: this._config, account: this._account },\n undefined,\n isBase,\n );\n }\n /**\n * Bound {@link SimpleAllowList} constructor that reuses the same configuration as the Boost Core instance.\n *\n * @example\n * ```ts\n * const list = core.SimpleAllowList('0x') // is roughly equivalent to\n * const list = new SimpleAllowList({ config: core._config, account: core._account }, '0x')\n * ```\n * @param {DeployablePayloadOrAddress<SimpleAllowListPayload>} options\n * @param {?boolean} [isBase]\n * @returns {SimpleAllowList}\n */\n SimpleAllowList(\n options: DeployablePayloadOrAddress<SimpleAllowListPayload>,\n isBase?: boolean,\n ) {\n return new SimpleAllowList(\n { config: this._config, account: this._account },\n options,\n isBase,\n );\n }\n /**\n * Bound {@link SimpleDenyList} constructor that reuses the same configuration as the Boost Core instance.\n *\n * @example\n * ```ts\n * const list = core.SimpleDenyList('0x') // is roughly equivalent to\n * const list = new SimpleDenyList({ config: core._config, account: core._account }, '0x')\n * ```\n * @param {DeployablePayloadOrAddress<SimpleDenyListPayload>} options\n * @param {?boolean} [isBase]\n * @returns {SimpleDenyList}\n */\n SimpleDenyList(\n options: DeployablePayloadOrAddress<SimpleDenyListPayload>,\n isBase?: boolean,\n ) {\n return new SimpleDenyList(\n { config: this._config, account: this._account },\n options,\n isBase,\n );\n }\n // /**\n // * Bound {@link SimpleBudget} constructor that reuses the same configuration as the Boost Core instance.\n // *\n // * @example\n // * ```ts\n // * const budget = core.SimpleBudget('0x') // is roughly equivalent to\n // * const budget = new SimpleBudget({ config: core._config, account: core._account }, '0x')\n // * ```\n // * @param {DeployablePayloadOrAddress<SimpleBudgetPayload>} options\n // * @returns {SimpleBudget}\n // */\n // SimpleBudget(options: DeployablePayloadOrAddress<SimpleBudgetPayload>) {\n // return new SimpleBudget(\n // { config: this._config, account: this._account },\n // options,\n // );\n // }\n /**\n * Bound {@link ManagedBudget} constructor that reuses the same configuration as the Boost Core instance.\n *\n * @example\n * ```ts\n * const budget = core.ManagedBudget('0x') // is roughly equivalent to\n * const budget = new ManagedBudget({ config: core._config, account: core._account }, '0x')\n * ```\n * @param {DeployablePayloadOrAddress<ManagedBudgetPayload>} options\n * @returns {ManagedBudget}\n */\n ManagedBudget(options: DeployablePayloadOrAddress<ManagedBudgetPayload>) {\n if (\n typeof options !== 'string' &&\n !options.authorized.includes(this.assertValidAddress())\n ) {\n options.authorized = [this.assertValidAddress(), ...options.authorized];\n options.roles = [Roles.MANAGER, ...options.roles];\n }\n return new ManagedBudget(\n { config: this._config, account: this._account },\n options,\n );\n }\n /**\n * Bound {@link ManagedBudgetWithFees} constructor that reuses the same configuration as the Boost Core instance.\n * Prepends the BoostCore address to the authorized list because it's structurally critical to calculating payouts.\n *\n * @example\n * ```ts\n * const budget = core.ManagedBudgetWithFees('0x') // is roughly equivalent to\n * const budget = new ManagedBudgetWithFees({ config: core._config, account: core._account }, '0x')\n * ```\n * @param {DeployablePayloadOrAddress<ManagedBudgetWithFeesPayload>} options\n * @returns {ManagedBudgetWithFees}\n */\n ManagedBudgetWithFees(\n options: DeployablePayloadOrAddress<ManagedBudgetWithFeesPayload>,\n ) {\n if (\n typeof options !== 'string' &&\n !options.authorized.includes(this.assertValidAddress())\n ) {\n options.authorized = [this.assertValidAddress(), ...options.authorized];\n options.roles = [Roles.MANAGER, ...options.roles];\n }\n\n return new ManagedBudgetWithFees(\n { config: this._config, account: this._account },\n options,\n );\n }\n /**\n * Bound {@link ManagedBudgetWithFeesV2} constructor that reuses the same configuration as the Boost Core instance.\n * Prepends the BoostCore address to the authorized list because it's structurally critical to calculating payouts.\n *\n * @example\n * ```ts\n * const budget = core.ManagedBudgetWithFeesV2('0x') // is roughly equivalent to\n * const budget = new ManagedBudgetWithFeesV2({ config: core._config, account: core._account }, '0x')\n * ```\n * @param {DeployablePayloadOrAddress<ManagedBudgetWithFeesV2Payload>} options\n * @returns {ManagedBudgetWithFeesV2}\n */\n ManagedBudgetWithFeesV2(\n options: DeployablePayloadOrAddress<ManagedBudgetWithFeesV2Payload>,\n ) {\n if (\n typeof options !== 'string' &&\n !options.authorized.includes(this.assertValidAddress())\n ) {\n options.authorized = [this.assertValidAddress(), ...options.authorized];\n options.roles = [Roles.MANAGER, ...options.roles];\n }\n\n return new ManagedBudgetWithFeesV2(\n { config: this._config, account: this._account },\n options,\n );\n }\n // /**\n // * Bound {@link VestingBudget} constructor that reuses the same configuration as the Boost Core instance.\n // *\n // * @example\n // * ```ts\n // * const budget = core.VestingBudget('0x') // is roughly equivalent to\n // * const budget = new VestingBudget({ config: core._config, account: core._account }, '0x')\n // * ```\n // * @param {DeployablePayloadOrAddress<VestingBudgetPayload>} options\n // * @returns {VestingBudget}\n // */\n // VestingBudget(options: DeployablePayloadOrAddress<VestingBudgetPayload>) {\n // return new VestingBudget(\n // { config: this._config, account: this._account },\n // options,\n // );\n // }\n /**\n * Bound {@link AllowListIncentive} constructor that reuses the same configuration as the Boost Core instance.\n *\n * @example\n * ```ts\n * const incentive = core.AllowListIncentive({ ... }) // is roughly equivalent to\n * const incentive = new AllowListIncentive({ config: core._config, account: core._account }, { ... })\n * ```\n * @param {DeployablePayloadOrAddress<VestingBudgetPayload>} options\n * @returns {VestingBudget}\n */\n AllowListIncentive(options: AllowListIncentivePayload) {\n return new AllowListIncentive(\n { config: this._config, account: this._account },\n options,\n );\n }\n /**\n * Bound {@link CGDAIncentive} constructor that reuses the same configuration as the Boost Core instance.\n *\n * @example\n * ```ts\n * const incentive = core.CGDAIncentive({ ... }) // is roughly equivalent to\n * const incentive = new CGDAIncentive({ config: core._config, account: core._account }, { ... })\n * ```\n * @param {CGDAIncentivePayload} options\n * @returns {CGDAIncentive}\n */\n CGDAIncentive(options: CGDAIncentivePayload) {\n return new CGDAIncentive(\n { config: this._config, account: this._account },\n options,\n );\n }\n /**\n * Bound {@link ERC20Incentive} constructor that reuses the same configuration as the Boost Core instance.\n *\n * @example\n * ```ts\n * const incentive = core.ERC20Incentive({ ... }) // is roughly equivalent to\n * const incentive = new ERC20Incentive({ config: core._config, account: core._account }, { ... })\n * ```\n * @param {ERC20IncentivePayload} options\n * @returns {ERC20Incentive}\n */\n ERC20Incentive(options: ERC20IncentivePayload) {\n return new ERC20Incentive(\n { config: this._config, account: this._account },\n options,\n );\n }\n\n /**\n * Bound {@link ERC20PeggedIncentive} constructor that reuses the same configuration as the Boost Core instance.\n *\n * @example\n * ```ts\n * const incentive = core.ERC20PeggedIncentive({ ... }) // is roughly equivalent to\n * const incentive = new ERC20PeggedIncentive({ config: core._config, account: core._account }, { ... })\n * ```\n * @param {ERC20PeggedIncentivePayload} options\n * @returns {ERC20PeggedIncentive}\n */\n ERC20PeggedIncentive(options: ERC20PeggedIncentivePayload) {\n return new ERC20PeggedIncentive(\n { config: this._config, account: this._account },\n options,\n );\n }\n // /**\n // * Temporarily disabled until low level ABI encoding bugs are resolved\n // * Bound {@link ERC1155Incentive} constructor that reuses the same configuration as the Boost Core instance.\n // *\n // * @experimental\n // * @example\n // * ```ts\n // * const incentive = core.ERC1155Incentive({ ... }) // is roughly equivalent to\n // * const incentive = new ERC1155Incentive({ config: core._config, account: core._account }, { ... })\n // * ```\n // * @param {ERC1155IncentivePayload} options\n // * @returns {ERC1155Incentive}\n // */\n // ERC1155Incentive(options: ERC1155IncentivePayload) {\n // return new ERC1155Incentive(\n // { config: this._config, account: this._account },\n // options,\n // );\n // }\n /**\n * Bound {@link PointsIncentive} constructor that reuses the same configuration as the Boost Core instance.\n *\n * @example\n * ```ts\n * const incentive = core.PointsIncentive({ ... }) // is roughly equivalent to\n * const incentive = new PointsIncentive({ config: core._config, account: core._account }, { ... })\n * ```\n * @param {PointsIncentivePayload} options\n * @returns {PointsIncentive}\n */\n PointsIncentive(options: PointsIncentivePayload) {\n return new PointsIncentive(\n { config: this._config, account: this._account },\n options,\n );\n }\n /**\n * Bound {@link SignerValidator} constructor that reuses the same configuration as the Boost Core instance.\n *\n * @example\n * ```ts\n * const validator = core.SignerValidator({ ... }) // is roughly equivalent to\n * const validator = new SignerValidator({ config: core._config, account: core._account }, { ... })\n * ```\n * @param {DeployablePayloadOrAddress<SignerValidatorPayload>} options\n * @param {?boolean} [isBase]\n * @returns {SignerValidator}\n */\n SignerValidator(\n options: DeployablePayloadOrAddress<SignerValidatorPayload>,\n isBase?: boolean,\n ) {\n return new SignerValidator(\n { config: this._config, account: this._account },\n options,\n isBase,\n );\n }\n\n /**\n * Bound {@link LimitedSignerValidator} constructor that reuses the same configuration as the Boost Core instance.\n *\n * @example\n * ```ts\n * const validator = core.LimitedSignerValidator({ ... }) // is roughly equivalent to\n * const validator = new LimitedSignerValidator({ config: core._config, account: core._account }, { ... })\n * ```\n * @param {DeployablePayloadOrAddress<LimitedSignerValidatorPayload>} options\n * @param {?boolean} [isBase]\n * @returns {LimitedSignerValidator}\n */\n LimitedSignerValidator(\n options: DeployablePayloadOrAddress<LimitedSignerValidatorPayload>,\n isBase?: boolean,\n ) {\n return new LimitedSignerValidator(\n { config: this._config, account: this._account },\n options,\n isBase,\n );\n }\n\n /**\n * Bound {@link ERC20VariableCriteriaIncentive} constructor that reuses the same configuration as the Boost Core instance.\n *\n * @example\n * ```ts\n * const validator = core.ERC20VariableCrtieriaIncentive({ ... }) // is roughly equivalent to\n * const validator = new ERC20VariableCrtieriaIncentive({ config: core._config, account: core._account }, { ... })\n * ```\n * @param {DeployablePayloadOrAddress<ERC20VariableCrtieriaIncentivePayload>} options\n * @param {?boolean} [isBase]\n * @returns {ERC20VariableCrtieriaIncentive}\n * */\n ERC20VariableCriteriaIncentive(\n options: DeployablePayloadOrAddress<ERC20VariableCriteriaIncentivePayload>,\n isBase?: boolean,\n ) {\n return new ERC20VariableCriteriaIncentive(\n { config: this._config, account: this._account },\n options,\n isBase,\n );\n }\n\n /**\n * Bound {@link ERC20PeggedVariableCriteriaIncentive} constructor that reuses the same configuration as the Boost Core instance.\n *\n * @example\n * ```ts\n * const validator = core.ERC20PeggedVariableCriteriaIncentive({ ... }) // is roughly equivalent to\n * const validator = new ERC20PeggedVariableCriteriaIncentive({ config: core._config, account: core._account }, { ... })\n * ```\n * @param {DeployablePayloadOrAddress<ERC20PeggedVariableCriteriaIncentive>} options\n * @param {?boolean} [isBase]\n * @returns {ERC20PeggedVariableCriteriaIncentive}\n * */\n ERC20PeggedVariableCriteriaIncentive(\n options: DeployablePayloadOrAddress<ERC20PeggedVariableCriteriaIncentivePayload>,\n isBase?: boolean,\n ) {\n return new ERC20PeggedVariableCriteriaIncentive(\n { config: this._config, account: this._account },\n options,\n isBase,\n );\n }\n\n /**\n * Bound {@link ERC20VariableIncentive} constructor that reuses the same configuration as the Boost Core instance.\n *\n * @example\n * ```ts\n * const validator = core.ERC20VariableIncentive({ ... }) // is roughly equivalent to\n * const validator = new ERC20VariableIncentive({ config: core._config, account: core._account }, { ... })\n * ```\n * @param {DeployablePayloadOrAddress<ERC20VariableIncentivePayload>} options\n * @param {?boolean} [isBase]\n * @returns {ERC20VariableIncentive}\n */\n ERC20VariableIncentive(\n options: DeployablePayloadOrAddress<ERC20VariableIncentivePayload>,\n isBase?: boolean,\n ) {\n return new ERC20VariableIncentive(\n { config: this._config, account: this._account },\n options,\n isBase,\n );\n }\n\n /**\n * @inheritdoc\n *\n * @public\n * @param {?[Address, Address, Address]} [_payload]\n * @param {?DeployableOptions} [_options]\n * @returns {GenericDeployableParams}\n */\n public override buildParameters(\n _payload?: [Address, Address, Address],\n _options?: DeployableOptions,\n ): GenericDeployableParams {\n const [payload, options] = this.validateDeploymentConfig(\n _payload,\n _options,\n );\n return {\n abi: boostCoreAbi,\n bytecode: bytecode as Hex,\n args: payload,\n ...this.optionallyAttachAccount(options.account),\n };\n }\n /**\n * Prepares and executes a top-up from a Budget, specifying the net top-up amount\n * that should land in the incentive (the protocol fee is added automatically).\n *\n * @public\n * @async\n * @param {bigint} boostId The ID of the Boost\n * @param {bigint} incentiveId The ID of the incentive within that Boost\n * @param {any} topupPayload A typed struct for the incentive’s top-up parameters\n * @param {Address} [budget] Optional override budget address (otherwise uses the Boost’s budget)\n * @param {?WriteParams} [params] Additional transaction overrides\n * @returns {Promise<{ hash: Hex; result: void }>} The transaction hash and simulation result\n */\n public async topupIncentiveFromBudgetPreFee(\n boostId: bigint,\n incentiveId: bigint,\n topupAmount: bigint,\n budget?: Address,\n params?: WriteParams,\n ) {\n const boost = await this.getBoost(boostId, params as ReadParams);\n if (incentiveId >= boost.incentives.length) {\n throw new Error(`Incentive ID ${incentiveId} out of range`);\n }\n const incentive = boost.incentives[Number(incentiveId)];\n if (!incentive) {\n throw new Error(`Incentive with ID ${incentiveId} not found`);\n }\n\n const incentiveData = await incentive.getTopupPayload(topupAmount);\n\n if (!(topupAmount > 0)) {\n throw new Error('Top-up amount must be greater than zero');\n }\n\n return await this.topupIncentiveFromBudgetRaw(\n boostId,\n incentiveId,\n incentiveData,\n budget,\n params,\n );\n }\n\n /**\n * Prepares and executes a top-up from a Budget, specifying the entire total tokens\n * (incentive + fee) you want to disburse. We'll back-calculate how many tokens land\n * in the incentive.\n *\n * @public\n * @async\n * @param {bigint} boostId The ID of the Boost\n * @param {bigint} incentiveId The ID of the incentive within that Boost\n * @param {any} topupPayload A typed struct for the incentive’s top-up parameters\n * @param {bigint} totalAmount The total tokens to disburse\n * @param {Address} [budget] Optional override budget address\n * @param {?WriteParams} [params] Additional transaction overrides\n * @returns {Promise<{ hash: Hex; result: void }>}\n */\n public async topupIncentiveFromBudgetPostFee(\n boostId: bigint,\n incentiveId: bigint,\n totalAmount: bigint,\n budget?: Address,\n params?: WriteParams,\n ) {\n const feeBps = await this.protocolFee(params as ReadParams);\n const topupAmount =\n (totalAmount * FEE_DENOMINATOR) / (FEE_DENOMINATOR + feeBps);\n return this.topupIncentiveFromBudgetPreFee(\n boostId,\n incentiveId,\n topupAmount,\n budget,\n params,\n );\n }\n\n /**\n * Prepares and executes a top-up from the caller (msg.sender), specifying the net top-up\n * to land in the incentive. We'll add the protocol fee on top automatically.\n *\n * @public\n * @async\n * @param {bigint} boostId The ID of the Boost\n * @param {bigint} incentiveId The ID of the incentive within that Boost\n * @param {any} topupPayload A typed struct for the incentive’s top-up parameters\n * @param {?WriteParams} [params]\n * @returns {Promise<{ hash: Hex; result: void }>}\n */\n public async topupIncentiveFromSenderPreFee(\n boostId: bigint,\n incentiveId: bigint,\n topupAmount: bigint,\n params?: WriteParams,\n ) {\n const boost = await this.getBoost(boostId, params as ReadParams);\n if (incentiveId >= boost.incentives.length) {\n throw new Error(`Incentive ID ${incentiveId} out of range`);\n }\n const incentive = boost.incentives[Number(incentiveId)];\n if (!incentive) {\n throw new Error(`Incentive with ID ${incentiveId} not found`);\n }\n\n if (!(topupAmount > 0)) {\n throw new Error('Top-up amount must be greater than zero');\n }\n\n const incentiveData = await incentive.getTopupPayload(topupAmount);\n\n return await this.topupIncentiveFromSenderRaw(\n boostId,\n incentiveId,\n incentiveData,\n params,\n );\n }\n\n /**\n * Prepares and executes a top-up from the caller (msg.sender), specifying the total\n * tokens you’re willing to provide (including fee). We'll back-calculate the net\n * top-up for the incentive.\n *\n * @public\n * @async\n * @param {bigint} boostId The ID of the Boost\n * @param {bigint} incentiveId The ID of the incentive within that Boost\n * @param {any} topupPayload A typed struct for the incentive’s top-up parameters\n * @param {bigint} totalAmount The entire tokens (top-up + fee)\n * @param {?WriteParams} [params]\n * @returns {Promise<{ hash: Hex; result: void }>}\n */\n public async topupIncentiveFromSenderPostFee(\n boostId: bigint,\n incentiveId: bigint,\n totalAmount: bigint,\n params?: WriteParams,\n ) {\n const feeBps = await this.protocolFee(params as ReadParams);\n const topupAmount =\n (totalAmount * FEE_DENOMINATOR) / (FEE_DENOMINATOR + feeBps);\n\n return this.topupIncentiveFromSenderPreFee(\n boostId,\n incentiveId,\n topupAmount,\n params,\n );\n }\n\n /**\n * A lower-level function that actually calls `topupIncentiveFromSender` on-chain,\n * passing the final total. The contract modifies its internal logic to split net top-up vs. fee.\n *\n * @private\n * @param {bigint} boostId\n * @param {bigint} incentiveId\n * @param {Hex} preflightData The raw ABudget.Transfer data from preflight\n * @param {?WriteParams} [params]\n * @returns {Promise<{ hash: Hex; result: void }>}\n */\n private async topupIncentiveFromSenderRaw(\n boostId: bigint,\n incentiveId: bigint,\n preflightData: Hex,\n params?: WriteParams,\n ) {\n const { request, result } = await simulateBoostCoreTopupIncentiveFromSender(\n this._config,\n {\n ...this.optionallyAttachAccount(),\n ...(params as object),\n address: this.assertValidAddress(),\n args: [boostId, incentiveId, preflightData],\n },\n );\n const hash = await writeBoostCoreTopupIncentiveFromSender(\n this._config,\n request,\n );\n return { hash, result };\n }\n\n /**\n * A lower-level function that actually calls `topupIncentiveFromBudget` on-chain,\n * passing the preflight data plus the final total. The contract itself modifies\n * the amount to (topup + fee).\n *\n * @private\n * @param {bigint} boostId\n * @param {bigint} incentiveId\n * @param {Hex} preflightData The raw ABudget.Transfer (encoded) from preflight\n * @param {Address} [budget] Optional override for the budget\n * @param {?WriteParams} [params]\n * @returns {Promise<{ hash: Hex; result: void }>}\n */\n private async topupIncentiveFromBudgetRaw(\n boostId: bigint,\n incentiveId: bigint,\n preflightData: Hex,\n budget?: Address,\n params?: WriteParams,\n ) {\n // e.g. run \"simulate + write\" pattern\n const { request, result } = await simulateBoostCoreTopupIncentiveFromBudget(\n this._config,\n {\n ...this.optionallyAttachAccount(),\n ...(params as object),\n address: this.assertValidAddress(),\n args: [boostId, incentiveId, preflightData, budget ?? zeroAddress],\n },\n );\n const hash = await writeBoostCoreTopupIncentiveFromBudget(\n this._config,\n request,\n );\n return { hash, result };\n }\n}\n"],"names":["getAccount","config","uid","connection","addresses","address","chain","status","getChainId","getAction","client","actionFn","name","action_implicit","action_explicit","params","version","getVersion","__classPrivateFieldGet","receiver","state","kind","f","_BaseError_instances","_BaseError_walk","BaseError","shortMessage","options","details","_a","docsPath","fn","err","ConnectorNotConnectedError","ConnectorAccountNotFoundError","connector","ConnectorChainMismatchError","connectionChainId","connectorChainId","ConnectorUnavailableReconnectingError","getConnectorClient","parameters","accounts","chainId","account","parseAccount","getAddress","x","provider","createClient","opts","custom","simulateContract","abi","rest","action","viem_simulateContract","result","request","writeContract","__mode","activeConnector","simulateRequest","viem_writeContract","createWriteContract","c","configChainId","FEE_DENOMINATOR","BOOST_CORE_ADDRESSES","BoostCoreBases","BOOST_CORE_ADDRESS","zeroAddress","isBoostCoreDeployed","isBoostCoreDeployable","_BoostCore","Deployable","assertValidAddressByChainId","boostCoreAbi","_boostPayload","_params","payload","desiredChainId","coreAddress","boostFactory","onChainPayload","boostHash","prepareBoostPayload","receipt","waitForTransactionReceipt","boostCreatedLog","parseEventLogs","boostId","BoostCoreNoIdentifierEmitted","boost","Boost","incentive","i","writeBoostCoreCreateBoost","simulateBoostCoreCreateBoost","DeployableUnknownOwnerProvidedError","getChains","InvalidProtocolChainIdError","testnet","BoostValidatorEOA","budgetPayload","BudgetMustAuthorizeBoostCore","MustInitializeBudgetError","actionPayload","zeroHash","isBase","validatorPayload","allowListPayload","incentivesPayloads","IncentiveNotCloneableError","incentiveId","data","referrer","simulateBoostCoreClaimIncentive","writeBoostCoreClaimIncentive","claimant","simulateBoostCoreClaimIncentiveFor","writeBoostCoreClaimIncentiveFor","_id","id","readBoostCoreGetBoost","e","BoostNotFoundError","protocolFee","maxParticipants","owner","boostPayload","budget","validator","allowList","incentives","actionFromAddress","budgetFromAddress","validatorFromAddress","allowListFromAddress","incentiveAddress","incentiveFromAddress","readBoostCoreGetBoostCount","auth","readIAuthIsAuthorized","readBoostCoreCreateBoostAuth","simulateBoostCoreSetCreateBoostAuth","writeBoostCoreSetCreateBoostAuth","readBoostCoreProtocolFee","readBoostCoreProtocolFeeReceiver","simulateBoostCoreSetProtocolFeeReceiver","writeBoostCoreSetProtocolFeeReceiver","key","keccak256","encodePacked","readBoostCoreGetIncentiveFeesInfo","getTransactionReceipt","amount","PassthroughAuth","EventAction","OpenAllowList","SimpleAllowList","SimpleDenyList","Roles","ManagedBudget","ManagedBudgetWithFees","ManagedBudgetWithFeesV2","AllowListIncentive","CGDAIncentive","ERC20Incentive","ERC20PeggedIncentive","PointsIncentive","SignerValidator","LimitedSignerValidator","ERC20VariableCriteriaIncentive","ERC20PeggedVariableCriteriaIncentive","ERC20VariableIncentive","_payload","_options","bytecode","topupAmount","incentiveData","totalAmount","feeBps","preflightData","simulateBoostCoreTopupIncentiveFromSender","writeBoostCoreTopupIncentiveFromSender","simulateBoostCoreTopupIncentiveFromBudget","writeBoostCoreTopupIncentiveFromBudget","BoostCore"],"mappings":";;;;;;;;;;;;;;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