@boostxyz/sdk 0.0.0-alpha.20 → 0.0.0-alpha.21
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/Actions/Action.cjs +1 -1
- package/dist/Actions/Action.js +3 -3
- package/dist/Actions/EventAction.cjs +1 -1
- package/dist/Actions/EventAction.d.ts.map +1 -1
- package/dist/Actions/EventAction.js +3 -3
- package/dist/AllowLists/AllowList.cjs +1 -1
- package/dist/AllowLists/AllowList.js +3 -3
- package/dist/AllowLists/SimpleAllowList.cjs +1 -1
- package/dist/AllowLists/SimpleAllowList.js +13 -13
- package/dist/AllowLists/SimpleDenyList.cjs +1 -1
- package/dist/AllowLists/SimpleDenyList.js +3 -3
- package/dist/Auth/PassthroughAuth.cjs +1 -1
- package/dist/Auth/PassthroughAuth.js +1 -1
- package/dist/Boost.cjs +1 -1
- package/dist/Boost.cjs.map +1 -1
- package/dist/Boost.d.ts +5 -24
- package/dist/Boost.d.ts.map +1 -1
- package/dist/Boost.js +42 -44
- package/dist/Boost.js.map +1 -1
- package/dist/BoostCore-DolmDuXW.cjs +3 -0
- package/dist/BoostCore-DolmDuXW.cjs.map +1 -0
- package/dist/BoostCore-Z97KVu4V.js +1448 -0
- package/dist/BoostCore-Z97KVu4V.js.map +1 -0
- package/dist/BoostCore.cjs +1 -1
- package/dist/BoostCore.d.ts +633 -47
- package/dist/BoostCore.d.ts.map +1 -1
- package/dist/BoostCore.js +6 -6
- package/dist/BoostRegistry.cjs +1 -1
- package/dist/BoostRegistry.cjs.map +1 -1
- package/dist/BoostRegistry.d.ts +31 -3
- package/dist/BoostRegistry.d.ts.map +1 -1
- package/dist/BoostRegistry.js +68 -48
- package/dist/BoostRegistry.js.map +1 -1
- package/dist/Budgets/Budget.cjs +1 -1
- package/dist/Budgets/Budget.js +2 -2
- package/dist/Budgets/ManagedBudget.cjs +1 -1
- package/dist/Budgets/ManagedBudget.cjs.map +1 -1
- package/dist/Budgets/ManagedBudget.d.ts +34 -4
- package/dist/Budgets/ManagedBudget.d.ts.map +1 -1
- package/dist/Budgets/ManagedBudget.js +45 -45
- package/dist/Budgets/VestingBudget.d.ts +34 -4
- package/dist/Budgets/VestingBudget.d.ts.map +1 -1
- package/dist/Deployable/DeployableTarget.cjs +1 -1
- package/dist/Deployable/DeployableTarget.js +1 -1
- package/dist/Deployable/DeployableTargetWithRBAC.cjs +1 -1
- package/dist/Deployable/DeployableTargetWithRBAC.js +17 -17
- package/dist/EventAction-CBKzuNoN.cjs +2 -0
- package/dist/EventAction-CBKzuNoN.cjs.map +1 -0
- package/dist/{EventAction-CIPqmAoP.js → EventAction-DWuuc_Qy.js} +295 -217
- package/dist/EventAction-DWuuc_Qy.js.map +1 -0
- package/dist/Incentive-BxzEtN26.js +298 -0
- package/dist/Incentive-BxzEtN26.js.map +1 -0
- package/dist/Incentive-CrF3-ayL.cjs +2 -0
- package/dist/Incentive-CrF3-ayL.cjs.map +1 -0
- package/dist/Incentives/AllowListIncentive.cjs +1 -1
- package/dist/Incentives/AllowListIncentive.cjs.map +1 -1
- package/dist/Incentives/AllowListIncentive.d.ts +16 -2
- package/dist/Incentives/AllowListIncentive.d.ts.map +1 -1
- package/dist/Incentives/AllowListIncentive.js +13 -13
- package/dist/Incentives/AllowListIncentive.js.map +1 -1
- package/dist/Incentives/CGDAIncentive.cjs +1 -1
- package/dist/Incentives/CGDAIncentive.cjs.map +1 -1
- package/dist/Incentives/CGDAIncentive.d.ts +197 -4
- package/dist/Incentives/CGDAIncentive.d.ts.map +1 -1
- package/dist/Incentives/CGDAIncentive.js +31 -31
- package/dist/Incentives/CGDAIncentive.js.map +1 -1
- package/dist/Incentives/ERC1155Incentive.d.ts +192 -5
- package/dist/Incentives/ERC1155Incentive.d.ts.map +1 -1
- package/dist/Incentives/ERC20Incentive.cjs +1 -1
- package/dist/Incentives/ERC20Incentive.cjs.map +1 -1
- package/dist/Incentives/ERC20Incentive.d.ts +197 -4
- package/dist/Incentives/ERC20Incentive.d.ts.map +1 -1
- package/dist/Incentives/ERC20Incentive.js +17 -17
- package/dist/Incentives/ERC20Incentive.js.map +1 -1
- package/dist/Incentives/ERC20VariableCriteriaIncentive.d.ts +189 -2
- package/dist/Incentives/ERC20VariableCriteriaIncentive.d.ts.map +1 -1
- package/dist/Incentives/ERC20VariableIncentive.d.ts +197 -4
- package/dist/Incentives/ERC20VariableIncentive.d.ts.map +1 -1
- package/dist/Incentives/Incentive.cjs +1 -1
- package/dist/Incentives/Incentive.d.ts +1 -1
- package/dist/Incentives/Incentive.js +3 -3
- package/dist/Incentives/PointsIncentive.cjs +1 -1
- package/dist/Incentives/PointsIncentive.cjs.map +1 -1
- package/dist/Incentives/PointsIncentive.d.ts +16 -2
- package/dist/Incentives/PointsIncentive.d.ts.map +1 -1
- package/dist/Incentives/PointsIncentive.js +8 -8
- package/dist/Incentives/PointsIncentive.js.map +1 -1
- package/dist/{SimpleDenyList-BwfNjRsg.cjs → SimpleDenyList-BUR17Tt1.cjs} +2 -2
- package/dist/{SimpleDenyList-BwfNjRsg.cjs.map → SimpleDenyList-BUR17Tt1.cjs.map} +1 -1
- package/dist/{SimpleDenyList-Cn5WpNn0.js → SimpleDenyList-CGaWjuld.js} +15 -15
- package/dist/{SimpleDenyList-Cn5WpNn0.js.map → SimpleDenyList-CGaWjuld.js.map} +1 -1
- package/dist/Validators/SignerValidator.cjs +1 -1
- package/dist/Validators/SignerValidator.js +3 -3
- package/dist/Validators/Validator.cjs +1 -1
- package/dist/Validators/Validator.js +6 -6
- package/dist/componentInterfaces-BBCFkrZv.js +14 -0
- package/dist/componentInterfaces-BBCFkrZv.js.map +1 -0
- package/dist/componentInterfaces-DRI_dQ-P.cjs +2 -0
- package/dist/componentInterfaces-DRI_dQ-P.cjs.map +1 -0
- package/dist/deployments-DVXioW2i.cjs +2 -0
- package/dist/deployments-DVXioW2i.cjs.map +1 -0
- package/dist/deployments-oykLv3_Z.js +43 -0
- package/dist/deployments-oykLv3_Z.js.map +1 -0
- package/dist/deployments.json +16 -13
- package/dist/errors.cjs +1 -1
- package/dist/errors.cjs.map +1 -1
- package/dist/errors.d.ts +18 -0
- package/dist/errors.d.ts.map +1 -1
- package/dist/errors.js +16 -4
- package/dist/errors.js.map +1 -1
- package/dist/{generated-B7VaSah4.js → generated-CKt2yCQd.js} +1071 -447
- package/dist/generated-CKt2yCQd.js.map +1 -0
- package/dist/generated-CyTNlOwM.cjs +3 -0
- package/dist/generated-CyTNlOwM.cjs.map +1 -0
- package/dist/index.cjs +1 -1
- package/dist/index.js +79 -78
- package/package.json +4 -4
- package/src/Actions/EventAction.ts +24 -20
- package/src/Boost.ts +5 -27
- package/src/BoostCore.test.ts +113 -46
- package/src/BoostCore.ts +162 -171
- package/src/BoostRegistry.test.ts +53 -0
- package/src/BoostRegistry.ts +48 -3
- package/src/Budgets/ManagedBudget.test.ts +7 -7
- package/src/Incentives/CGDAIncentive.test.ts +4 -1
- package/src/Incentives/CGDAIncentive.ts +6 -0
- package/src/Incentives/ERC20Incentive.test.ts +3 -0
- package/src/Incentives/ERC20Incentive.ts +6 -0
- package/src/Incentives/ERC20VariableIncentive.test.ts +3 -0
- package/src/Incentives/ERC20VariableIncentive.ts +6 -0
- package/src/Incentives/Incentive.test.ts +3 -0
- package/src/Incentives/Incentive.ts +1 -1
- package/src/Incentives/PointsIncentive.test.ts +1 -2
- package/src/errors.ts +22 -0
- package/dist/BoostCore-3-U1xTQN.cjs +0 -3
- package/dist/BoostCore-3-U1xTQN.cjs.map +0 -1
- package/dist/BoostCore-DVGBUr2y.js +0 -1477
- package/dist/BoostCore-DVGBUr2y.js.map +0 -1
- package/dist/EventAction-CIPqmAoP.js.map +0 -1
- package/dist/EventAction-d-oeqZQs.cjs +0 -2
- package/dist/EventAction-d-oeqZQs.cjs.map +0 -1
- package/dist/Incentive-Bp8Sez7M.js +0 -298
- package/dist/Incentive-Bp8Sez7M.js.map +0 -1
- package/dist/Incentive-Djnzseoj.cjs +0 -2
- package/dist/Incentive-Djnzseoj.cjs.map +0 -1
- package/dist/componentInterfaces-D09mhzxO.cjs +0 -2
- package/dist/componentInterfaces-D09mhzxO.cjs.map +0 -1
- package/dist/componentInterfaces-RXBMI5yH.js +0 -14
- package/dist/componentInterfaces-RXBMI5yH.js.map +0 -1
- package/dist/deployments-BM42vImE.js +0 -43
- package/dist/deployments-BM42vImE.js.map +0 -1
- package/dist/deployments-CMdF5uEC.cjs +0 -2
- package/dist/deployments-CMdF5uEC.cjs.map +0 -1
- package/dist/generated-B0tk-c9b.cjs +0 -3
- package/dist/generated-B0tk-c9b.cjs.map +0 -1
- package/dist/generated-B7VaSah4.js.map +0 -1
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"BoostCore-DVGBUr2y.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__rf4knvbttxkigkqzlfrm4rcvsi/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__rf4knvbttxkigkqzlfrm4rcvsi/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__rf4knvbttxkigkqzlfrm4rcvsi/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__rf4knvbttxkigkqzlfrm4rcvsi/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__rf4knvbttxkigkqzlfrm4rcvsi/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__rf4knvbttxkigkqzlfrm4rcvsi/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__rf4knvbttxkigkqzlfrm4rcvsi/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__rf4knvbttxkigkqzlfrm4rcvsi/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__rf4knvbttxkigkqzlfrm4rcvsi/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__rf4knvbttxkigkqzlfrm4rcvsi/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__rf4knvbttxkigkqzlfrm4rcvsi/node_modules/@wagmi/core/dist/esm/actions/codegen/createWriteContract.js","../src/Incentives/ERC20VariableCriteriaIncentive.ts","../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 erc20VariableCriteriaIncentiveAbi,\n readErc20VariableCriteriaIncentiveGetIncentiveCriteria,\n} from '@boostxyz/evm';\nimport { bytecode } from '@boostxyz/evm/artifacts/contracts/incentives/ERC20VariableCriteriaIncentive.sol/ERC20VariableCriteriaIncentive.json';\nimport events from '@boostxyz/signatures/events';\nimport functions from '@boostxyz/signatures/functions';\nimport { getTransaction, getTransactionReceipt } from '@wagmi/core';\nimport {\n type AbiEvent,\n type AbiFunction,\n type Address,\n type Hex,\n type Log,\n decodeFunctionData,\n encodeAbiParameters,\n parseEventLogs,\n} from 'viem';\nimport { ERC20VariableCriteriaIncentive as ERC20VariableCriteriaIncentiveBases } from '../../dist/deployments.json';\nimport { SignatureType } from '../Actions/EventAction';\nimport type {\n DeployableOptions,\n GenericDeployableParams,\n} from '../Deployable/Deployable';\nimport { DeployableTarget } from '../Deployable/DeployableTarget';\nimport {\n DecodedArgsError,\n FieldActionValidationError,\n IncentiveCriteriaNotFoundError,\n InvalidCriteriaTypeError,\n NoMatchingLogsError,\n} from '../errors';\nimport type { ReadParams } from '../utils';\nimport { ERC20VariableIncentive } from './ERC20VariableIncentive';\n\nexport interface ERC20VariableCriteriaIncentivePayload {\n /**\n * The address of the incentivized asset.\n *\n * @type {Address}\n */\n asset: Address;\n /**\n * The amount of the asset to distribute as reward.\n *\n * @type {bigint}\n */\n reward: bigint;\n /**\n * The total spending limit of the asset that will be distributed.\n *\n * @type {bigint}\n */\n limit: bigint;\n /**\n * The criteria for the incentive that determines how the reward is distributed.\n *\n * @type {IncentiveCriteria}\n */\n criteria: IncentiveCriteria;\n}\n\nexport interface IncentiveCriteria {\n /**\n * The type of criteria used, either function signature or event signature.\n *\n * @type {SignatureType}\n */\n criteriaType: SignatureType;\n /**\n * The function or event signature used for criteria matching.\n *\n * @type {Hex}\n */\n signature: Hex;\n /**\n * The index of the field from where the scalar value is extracted.\n *\n * @type {number}\n */\n fieldIndex: number;\n /**\n * The address of the contract where the event/function is called/emitted.\n *\n * @type {Address}\n */\n targetContract: Address;\n}\n\nexport interface ReadIncentiveCriteriaParams\n extends ReadParams<\n typeof erc20VariableCriteriaIncentiveAbi,\n 'getIncentiveCriteria'\n > {}\n\nexport interface GetIncentiveScalarParams {\n hash: Hex;\n}\n\n/**\n * Extended ERC20 Variable Criteria Incentive class that fetches incentive criteria and scalar\n */\nexport class ERC20VariableCriteriaIncentive extends DeployableTarget<\n ERC20VariableCriteriaIncentivePayload,\n typeof erc20VariableCriteriaIncentiveAbi\n> {\n public override readonly abi = erc20VariableCriteriaIncentiveAbi;\n /**\n * @inheritdoc\n *\n * @public\n * @static\n * @type {Record<number, Address>}\n */\n public static override bases: Record<number, Address> = {\n ...(ERC20VariableCriteriaIncentiveBases as Record<number, Address>),\n };\n\n /**\n *Functions from the ERC20VariableIncentive contract\n */\n\n /**\n * Fetches the IncentiveCriteria struct from the contract\n *\n * @returns {Promise<IncentiveCriteria>} Incentive criteria structure\n * @throws {IncentiveCriteriaNotFoundError}\n */\n public async getIncentiveCriteria(): Promise<IncentiveCriteria> {\n try {\n const criteria =\n await readErc20VariableCriteriaIncentiveGetIncentiveCriteria(\n this._config,\n {\n address: this.assertValidAddress(),\n },\n );\n\n return criteria;\n } catch (e) {\n throw new IncentiveCriteriaNotFoundError(e as Error);\n }\n }\n\n /**\n * Fetches the incentive scalar from a transaction hash\n *\n * @param {GetIncentiveScalarParams} params\n * @returns {Promise<bigint>}\n * @throws {InvalidCriteriaTypeError | NoMatchingLogsError | DecodedArgsError}\n */\n public async getIncentiveScalar({\n hash,\n }: GetIncentiveScalarParams): Promise<bigint> {\n const criteria = await this.getIncentiveCriteria();\n const transaction = await getTransaction(this._config, {\n hash,\n });\n if (criteria.criteriaType === SignatureType.EVENT) {\n const transactionReceipt = await getTransactionReceipt(this._config, {\n hash,\n });\n\n const logs = transactionReceipt.logs;\n\n if (logs.length === 0) {\n throw new NoMatchingLogsError(\n `No logs found for event signature ${criteria.signature}`,\n );\n }\n\n // Decode the event log\n try {\n // Decode function data\n const eventAbi = (events.abi as Record<Hex, AbiEvent>)[\n criteria.signature\n ] as AbiEvent;\n const decodedEvents = parseEventLogs({\n abi: [eventAbi],\n logs,\n });\n if (decodedEvents == undefined || decodedEvents.length === 0) {\n throw new NoMatchingLogsError(\n `No logs found for event signature ${criteria.signature}`,\n );\n }\n const scalarValue = (decodedEvents[0]?.args as string[])[\n criteria.fieldIndex\n ];\n\n if (scalarValue === undefined) {\n throw new DecodedArgsError(\n `Decoded argument at index ${criteria.fieldIndex} is undefined`,\n );\n }\n return BigInt(scalarValue);\n } catch (e) {\n throw new DecodedArgsError(\n `Failed to decode event log for signature ${criteria.signature}: ${(e as Error).message}`,\n );\n }\n } else if (criteria.criteriaType === SignatureType.FUNC) {\n // Fetch the transaction data\n try {\n // Decode function data\n const func = (functions.abi as Record<Hex, AbiFunction>)[\n criteria.signature\n ] as AbiFunction;\n\n const decodedFunction = decodeFunctionData({\n abi: [func],\n data: transaction.input,\n });\n const scalarValue = decodedFunction.args[criteria.fieldIndex] as string;\n if (scalarValue === undefined || scalarValue === null) {\n throw new DecodedArgsError(\n `Decoded argument at index ${criteria.fieldIndex} is undefined`,\n );\n }\n return BigInt(scalarValue);\n } catch (e) {\n throw new DecodedArgsError(\n `Failed to decode function data for signature ${criteria.signature}: ${(e as Error).message}`,\n );\n }\n } else {\n throw new InvalidCriteriaTypeError(\n `Invalid criteria type ${criteria.criteriaType}`,\n );\n }\n }\n /**\n * @inheritdoc\n *\n * @public\n * @param {?ERC20VariableCriteriaIncentivePayload} [_payload]\n * @param {?DeployableOptions} [_options]\n * @returns {GenericDeployableParams}\n */\n public override buildParameters(\n _payload?: ERC20VariableCriteriaIncentivePayload,\n _options?: DeployableOptions,\n ): GenericDeployableParams {\n const [payload, options] = this.validateDeploymentConfig(\n _payload,\n _options,\n );\n return {\n abi: erc20VariableCriteriaIncentiveAbi,\n bytecode: bytecode as Hex,\n args: [prepareERC20VariableCriteriaIncentivePayload(payload)],\n ...this.optionallyAttachAccount(options.account),\n };\n }\n}\n\n/**\n *\n *\n * @param {InitPayloadExtended} param0\n * @param {Address} param0.asset - The address of the ERC20 asset to incentivize.\n * @param {bigint} param0.reward - The reward amount to distribute per action.\n * @param {bigint} param0.limit - The total limit of the asset distribution.\n * @param {IncentiveCriteria} param0.criteria - The incentive criteria for reward distribution.\n * @returns {Hex}\n */\nexport function prepareERC20VariableCriteriaIncentivePayload({\n asset,\n reward,\n limit,\n criteria,\n}: ERC20VariableCriteriaIncentivePayload) {\n return encodeAbiParameters(\n [\n {\n type: 'tuple',\n name: 'initPayloadExtended',\n components: [\n { type: 'address', name: 'asset' },\n { type: 'uint256', name: 'reward' },\n { type: 'uint256', name: 'limit' },\n {\n type: 'tuple',\n name: 'criteria',\n components: [\n { type: 'uint8', name: 'criteriaType' },\n { type: 'bytes32', name: 'signature' },\n { type: 'uint8', name: 'fieldIndex' },\n { type: 'address', name: 'targetContract' },\n ],\n },\n ],\n },\n ],\n [\n {\n asset: asset,\n reward: reward,\n limit: limit,\n criteria: {\n criteriaType: criteria.criteriaType,\n signature: criteria.signature,\n fieldIndex: criteria.fieldIndex,\n targetContract: criteria.targetContract,\n },\n },\n ],\n );\n}\n","import {\n boostCoreAbi,\n type iAuthAbi,\n readBoostCoreClaimFee,\n readBoostCoreCreateBoostAuth,\n readBoostCoreGetBoost,\n readBoostCoreGetBoostCount,\n readBoostCoreProtocolFee,\n readBoostCoreProtocolFeeReceiver,\n readIAuthIsAuthorized,\n simulateBoostCoreClaimIncentive,\n simulateBoostCoreClaimIncentiveFor,\n simulateBoostCoreSetClaimFee,\n simulateBoostCoreSetCreateBoostAuth,\n simulateBoostCoreSetProtocolFeeReceiver,\n writeBoostCoreClaimIncentive,\n writeBoostCoreClaimIncentiveFor,\n writeBoostCoreSetClaimFee,\n writeBoostCoreSetCreateBoostAuth,\n writeBoostCoreSetProtocolFeeReceiver,\n} from '@boostxyz/evm';\nimport { bytecode } from '@boostxyz/evm/artifacts/contracts/BoostCore.sol/BoostCore.json';\nimport {\n type GetTransactionReceiptParameters,\n getAccount,\n getTransactionReceipt,\n waitForTransactionReceipt,\n} from '@wagmi/core';\nimport { createWriteContract } from '@wagmi/core/codegen';\nimport {\n type Address,\n type ContractEventName,\n type Hex,\n parseEther,\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 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 Deployable,\n type DeployableOptions,\n type DeployablePayloadOrAddress,\n type GenericDeployableParams,\n} from './Deployable/Deployable';\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 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 SignerValidator,\n type SignerValidatorPayload,\n} from './Validators/SignerValidator';\nimport { type Validator, validatorFromAddress } from './Validators/Validator';\nimport {\n BoostCoreNoIdentifierEmitted,\n BudgetMustAuthorizeBoostCore,\n DeployableUnknownOwnerProvidedError,\n IncentiveNotCloneableError,\n MustInitializeBudgetError,\n} from './errors';\nimport {\n type GenericLog,\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 (in wei) required to claim each incentive, must be provided for the `claimIncentive` transaction\n *\n * @type {bigint}\n */\nexport const BOOST_CORE_CLAIM_FEE = parseEther('0.000075');\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 (BoostCoreBases as Record<string, Address>)[__DEFAULT_CHAIN_ID__] ||\n zeroAddress;\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 ...(BoostCoreBases as Record<number, Address>),\n 31337: import.meta.env.VITE_BOOST_CORE_ADDRESS,\n};\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\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;\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 referralFee?: bigint;\n maxParticipants?: bigint;\n owner?: Address;\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]>}\n */\nexport class BoostCore extends Deployable<\n [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; })} 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 ]);\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 * Create a new Boost.\n *\n * @public\n * @async\n * @param {CreateBoostPayload} _boostPayload\n * @param {?DeployableOptions} [_options]\n * @returns {Promise<Boost>}\n */\n public async createBoost(\n _boostPayload: CreateBoostPayload,\n _params?: DeployableOptions &\n WriteParams<typeof boostCoreAbi, 'createBoost'>,\n ) {\n const [payload, options] =\n this.validateDeploymentConfig<CreateBoostPayload>(_boostPayload, _params);\n const desiredChainId = _params?.chain?.id || _params?.chainId;\n const { chainId, address: coreAddress } = assertValidAddressByChainId(\n options.config,\n this.addresses,\n desiredChainId,\n );\n\n let {\n budget,\n action,\n validator,\n allowList,\n incentives,\n protocolFee = 0n,\n referralFee = 0n,\n maxParticipants = 0n,\n owner,\n } = payload;\n\n const boostFactory = createWriteContract({\n abi: boostCoreAbi,\n functionName: 'createBoost',\n address: coreAddress,\n });\n\n if (!owner) {\n owner =\n this._account?.address ||\n getAccount(options.config).address ||\n zeroAddress;\n if (owner === zeroAddress) {\n throw new DeployableUnknownOwnerProvidedError();\n }\n }\n\n if (!validator) {\n validator = this.SignerValidator({\n signers: [owner],\n validatorCaller: coreAddress,\n });\n }\n\n let budgetPayload: BoostPayload['budget'] = zeroAddress;\n if (budget.address) {\n budgetPayload = budget.address;\n if (!(await 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 (action.address) {\n const isBase = action.isBase;\n actionPayload = {\n isBase: isBase,\n instance: action.address,\n parameters: isBase\n ? action.buildParameters(undefined, options).args.at(0) || zeroHash\n : zeroHash,\n };\n } else {\n actionPayload.parameters =\n action.buildParameters(undefined, options).args.at(0) || zeroHash;\n actionPayload.instance = assertValidAddressByChainId(\n options.config,\n 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 (validator.address) {\n const isBase = validator.isBase;\n validatorPayload = {\n isBase: isBase,\n instance: validator.address,\n parameters: isBase\n ? validator.buildParameters(undefined, options).args.at(0) || zeroHash\n : zeroHash,\n };\n } else {\n validatorPayload.parameters =\n validator.buildParameters(undefined, options).args.at(0) || zeroHash;\n validatorPayload.instance = assertValidAddressByChainId(\n options.config,\n 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.address) {\n const isBase = allowList.isBase;\n allowListPayload = {\n isBase: isBase,\n instance: allowList.address,\n parameters: isBase\n ? zeroHash // allowList.buildParameters(undefined, options).args.at(0) || zeroHash\n : zeroHash,\n };\n } else {\n allowListPayload.parameters =\n allowList.buildParameters(undefined, options).args.at(0) || zeroHash;\n allowListPayload.instance = assertValidAddressByChainId(\n options.config,\n allowList.bases,\n chainId,\n ).address;\n }\n\n const incentivesPayloads: Array<Target> = incentives.map(() => ({\n instance: zeroAddress,\n isBase: true,\n parameters: zeroHash,\n }));\n for (let i = 0; i < incentives.length; i++) {\n // biome-ignore lint/style/noNonNullAssertion: this will never be undefined\n const incentive = 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,\n referralFee,\n maxParticipants,\n owner,\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.boostIndex;\n const boost = await this.readBoost(boostId);\n return new Boost({\n id: boostId,\n budget: budget.at(boost.budget),\n action: action.at(boost.action),\n validator: validator.at(boost.validator),\n allowList: allowList.at(boost.allowList),\n incentives: 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 referralFee: boost.referralFee,\n maxParticipants: boost.maxParticipants,\n owner: boost.owner,\n });\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<typeof boostCoreAbi, 'claimIncentive'>,\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<typeof boostCoreAbi, 'claimIncentive'>,\n ) {\n const { request, result } = await simulateBoostCoreClaimIncentive(\n this._config,\n {\n ...assertValidAddressByChainId(\n this._config,\n this.addresses,\n params?.chain?.id || 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<typeof boostCoreAbi, 'claimIncentiveFor'>,\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<typeof boostCoreAbi, 'claimIncentiveFor'>,\n ) {\n const { request, result } = await simulateBoostCoreClaimIncentiveFor(\n this._config,\n {\n ...assertValidAddressByChainId(\n this._config,\n this.addresses,\n params?.chain?.id || 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} id\n * @param {?ReadParams} [params]\n * @returns {Promise<RawBoost>}\n */\n public async readBoost(\n id: bigint,\n params?: ReadParams<typeof boostCoreAbi, 'getBoost'>,\n ) {\n return await readBoostCoreGetBoost(this._config, {\n address: this.assertValidAddress(),\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 }\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 */\n public async getBoost(\n _id: string | bigint,\n params?: ReadParams<typeof boostCoreAbi, 'getBoost'>,\n ) {\n let id: bigint;\n if (typeof _id === 'string') {\n id = BigInt(_id);\n } else id = _id;\n const {\n protocolFee,\n referralFee,\n maxParticipants,\n owner,\n ...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),\n budgetFromAddress(options, boostPayload.budget),\n validatorFromAddress(options, boostPayload.validator),\n allowListFromAddress(options, boostPayload.allowList),\n Promise.all(\n boostPayload.incentives.map((incentiveAddress) =>\n incentiveFromAddress(options, incentiveAddress),\n ),\n ),\n ]);\n return new Boost({\n id,\n action,\n budget,\n validator,\n allowList,\n incentives,\n protocolFee,\n referralFee,\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(\n params?: ReadParams<typeof boostCoreAbi, 'getBoostCount'>,\n ) {\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<typeof iAuthAbi, 'isAuthorized'>} [params]\n * @returns {Promise<boolean>}\n */\n public async isAuthorized(\n address: Address,\n params?: ReadParams<typeof boostCoreAbi, 'createBoostAuth'> &\n ReadParams<typeof iAuthAbi, 'isAuthorized'>,\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(\n params?: ReadParams<typeof boostCoreAbi, 'createBoostAuth'>,\n ) {\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(\n auth: Auth,\n params?: WriteParams<typeof boostCoreAbi, 'setCreateBoostAuth'>,\n ) {\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(\n address: Address,\n params?: WriteParams<typeof boostCoreAbi, 'setCreateBoostAuth'>,\n ) {\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(\n params?: ReadParams<typeof boostCoreAbi, 'protocolFee'>,\n ) {\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(\n params?: ReadParams<typeof boostCoreAbi, 'protocolFeeReceiver'>,\n ) {\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(\n address: Address,\n params?: WriteParams<typeof boostCoreAbi, 'setProtocolFeeReceiver'>,\n ) {\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(\n address: Address,\n params?: WriteParams<typeof boostCoreAbi, 'setProtocolFeeReceiver'>,\n ) {\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 claim fee.\n *\n * @public\n * @async\n * @param {?ReadParams} [params]\n * @returns {Promise<bigint>}\n */\n public async claimFee(params?: ReadParams<typeof boostCoreAbi, 'claimFee'>) {\n return await readBoostCoreClaimFee(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 * Sets the claim fee.\n *\n * @public\n * @async\n * @param {bigint} claimFee\n * @param {?WriteParams} [params]\n * @returns {Promise<void>}\n */\n public async setClaimFee(\n claimFee: bigint,\n params?: WriteParams<typeof boostCoreAbi, 'setClaimFee'>,\n ) {\n return await this.awaitResult(this.setClaimFeeRaw(claimFee, params));\n }\n\n /**\n * Sets the claim fee.\n *\n * @public\n * @async\n * @param {bigint} claimFee\n * @param {?WriteParams} [params]\n * @returns {Promise<{ hash: `0x${string}`; result: void; }>}\n */\n public async setClaimFeeRaw(\n claimFee: bigint,\n params?: WriteParams<typeof boostCoreAbi, 'setClaimFee'>,\n ) {\n const { request, result } = await simulateBoostCoreSetClaimFee(\n this._config,\n {\n ...assertValidAddressByChainId(\n this._config,\n this.addresses,\n params?.chainId,\n ),\n args: [claimFee],\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 writeBoostCoreSetClaimFee(this._config, request);\n return { hash, result };\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 * 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 return new ManagedBudget(\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 // * 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 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 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]} [_payload]\n * @param {?DeployableOptions} [_options]\n * @returns {GenericDeployableParams}\n */\n public override buildParameters(\n _payload?: [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"],"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","_ERC20VariableCriteriaIncentive","DeployableTarget","erc20VariableCriteriaIncentiveAbi","readErc20VariableCriteriaIncentiveGetIncentiveCriteria","e","IncentiveCriteriaNotFoundError","hash","criteria","transaction","getTransaction","SignatureType","logs","getTransactionReceipt","NoMatchingLogsError","eventAbi","events","decodedEvents","parseEventLogs","scalarValue","DecodedArgsError","func","functions","decodeFunctionData","InvalidCriteriaTypeError","_payload","_options","payload","bytecode","prepareERC20VariableCriteriaIncentivePayload","ERC20VariableCriteriaIncentiveBases","ERC20VariableCriteriaIncentive","asset","reward","limit","encodeAbiParameters","BOOST_CORE_CLAIM_FEE","parseEther","BOOST_CORE_ADDRESS","BoostCoreBases","BOOST_CORE_ADDRESSES","isBoostCoreDeployed","isBoostCoreDeployable","_BoostCore","Deployable","assertValidAddressByChainId","boostCoreAbi","_boostPayload","_params","desiredChainId","coreAddress","budget","validator","allowList","incentives","protocolFee","referralFee","maxParticipants","owner","boostFactory","_b","zeroAddress","DeployableUnknownOwnerProvidedError","budgetPayload","BudgetMustAuthorizeBoostCore","MustInitializeBudgetError","actionPayload","zeroHash","isBase","validatorPayload","allowListPayload","incentivesPayloads","i","incentive","IncentiveNotCloneableError","onChainPayload","boostHash","prepareBoostPayload","receipt","waitForTransactionReceipt","boostCreatedLog","boostId","BoostCoreNoIdentifierEmitted","boost","Boost","incentiveId","data","referrer","simulateBoostCoreClaimIncentive","writeBoostCoreClaimIncentive","claimant","simulateBoostCoreClaimIncentiveFor","writeBoostCoreClaimIncentiveFor","id","readBoostCoreGetBoost","_id","boostPayload","actionFromAddress","budgetFromAddress","validatorFromAddress","allowListFromAddress","incentiveAddress","incentiveFromAddress","readBoostCoreGetBoostCount","auth","readIAuthIsAuthorized","readBoostCoreCreateBoostAuth","simulateBoostCoreSetCreateBoostAuth","writeBoostCoreSetCreateBoostAuth","readBoostCoreProtocolFee","readBoostCoreProtocolFeeReceiver","simulateBoostCoreSetProtocolFeeReceiver","writeBoostCoreSetProtocolFeeReceiver","readBoostCoreClaimFee","claimFee","simulateBoostCoreSetClaimFee","writeBoostCoreSetClaimFee","PassthroughAuth","EventAction","OpenAllowList","SimpleAllowList","SimpleDenyList","ManagedBudget","AllowListIncentive","CGDAIncentive","ERC20Incentive","PointsIncentive","SignerValidator","ERC20VariableIncentive","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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AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,EAaA,gBACEA,GACA2G,GACA;AACA,WAAO,IAAI2D;AAAA,MACT,EAAE,QAAQ,KAAK,SAAS,SAAS,KAAK,SAAS;AAAA,MAC/CtK;AAAA,MACA2G;AAAA,IAAA;AAAA,EAEJ;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,EAcA,+BACE3G,GACA2G,GACA;AACA,WAAO,IAAIrC;AAAA,MACT,EAAE,QAAQ,KAAK,SAAS,SAAS,KAAK,SAAS;AAAA,MAC/CtE;AAAA,MACA2G;AAAA,IAAA;AAAA,EAEJ;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,EAcA,uBACE3G,GACA2G,GACA;AACA,WAAO,IAAI4D;AAAA,MACT,EAAE,QAAQ,KAAK,SAAS,SAAS,KAAK,SAAS;AAAA,MAC/CvK;AAAA,MACA2G;AAAA,IAAA;AAAA,EAEJ;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,EAUgB,gBACd3C,GACAC,GACyB;AACzB,UAAM,CAACC,GAASlE,CAAO,IAAI,KAAK;AAAA,MAC9BgE;AAAA,MACAC;AAAA,IAAA;AAEK,WAAA;AAAA,MACL,KAAKoB;AAAAA,MAAA,UACLlB;AAAAA,MACA,MAAMD;AAAA,MACN,GAAG,KAAK,wBAAwBlE,EAAQ,OAAO;AAAA,IAAA;AAAA,EAEnD;AACF;AAtpCEkF,EAAgB,YAAqCH;AAXhD,IAAMyF,IAANtF;","x_google_ignoreList":[0,1,2,3,4,5,6,7,8,9,10]}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"EventAction-CIPqmAoP.js","sources":["../../../node_modules/.pnpm/ts-pattern@5.4.0/node_modules/ts-pattern/dist/index.js","../src/Actions/EventAction.ts"],"sourcesContent":["const t=Symbol.for(\"@ts-pattern/matcher\"),e=Symbol.for(\"@ts-pattern/isVariadic\"),n=\"@ts-pattern/anonymous-select-key\",r=t=>Boolean(t&&\"object\"==typeof t),i=e=>e&&!!e[t],s=(n,o,c)=>{if(i(n)){const e=n[t](),{matched:r,selections:i}=e.match(o);return r&&i&&Object.keys(i).forEach(t=>c(t,i[t])),r}if(r(n)){if(!r(o))return!1;if(Array.isArray(n)){if(!Array.isArray(o))return!1;let t=[],r=[],a=[];for(const s of n.keys()){const o=n[s];i(o)&&o[e]?a.push(o):a.length?r.push(o):t.push(o)}if(a.length){if(a.length>1)throw new Error(\"Pattern error: Using `...P.array(...)` several times in a single pattern is not allowed.\");if(o.length<t.length+r.length)return!1;const e=o.slice(0,t.length),n=0===r.length?[]:o.slice(-r.length),i=o.slice(t.length,0===r.length?Infinity:-r.length);return t.every((t,n)=>s(t,e[n],c))&&r.every((t,e)=>s(t,n[e],c))&&(0===a.length||s(a[0],i,c))}return n.length===o.length&&n.every((t,e)=>s(t,o[e],c))}return Reflect.ownKeys(n).every(e=>{const r=n[e];return(e in o||i(a=r)&&\"optional\"===a[t]().matcherType)&&s(r,o[e],c);var a})}return Object.is(o,n)},o=e=>{var n,s,a;return r(e)?i(e)?null!=(n=null==(s=(a=e[t]()).getSelectionKeys)?void 0:s.call(a))?n:[]:Array.isArray(e)?c(e,o):c(Object.values(e),o):[]},c=(t,e)=>t.reduce((t,n)=>t.concat(e(n)),[]);function a(...t){if(1===t.length){const[e]=t;return t=>s(e,t,()=>{})}if(2===t.length){const[e,n]=t;return s(e,n,()=>{})}throw new Error(`isMatching wasn't given the right number of arguments: expected 1 or 2, received ${t.length}.`)}function u(t){return Object.assign(t,{optional:()=>h(t),and:e=>m(t,e),or:e=>d(t,e),select:e=>void 0===e?y(t):y(e,t)})}function l(t){return Object.assign((t=>Object.assign(t,{[Symbol.iterator](){let n=0;const r=[{value:Object.assign(t,{[e]:!0}),done:!1},{done:!0,value:void 0}];return{next:()=>{var t;return null!=(t=r[n++])?t:r.at(-1)}}}}))(t),{optional:()=>l(h(t)),select:e=>l(void 0===e?y(t):y(e,t))})}function h(e){return u({[t]:()=>({match:t=>{let n={};const r=(t,e)=>{n[t]=e};return void 0===t?(o(e).forEach(t=>r(t,void 0)),{matched:!0,selections:n}):{matched:s(e,t,r),selections:n}},getSelectionKeys:()=>o(e),matcherType:\"optional\"})})}const f=(t,e)=>{for(const n of t)if(!e(n))return!1;return!0},g=(t,e)=>{for(const[n,r]of t.entries())if(!e(r,n))return!1;return!0};function m(...e){return u({[t]:()=>({match:t=>{let n={};const r=(t,e)=>{n[t]=e};return{matched:e.every(e=>s(e,t,r)),selections:n}},getSelectionKeys:()=>c(e,o),matcherType:\"and\"})})}function d(...e){return u({[t]:()=>({match:t=>{let n={};const r=(t,e)=>{n[t]=e};return c(e,o).forEach(t=>r(t,void 0)),{matched:e.some(e=>s(e,t,r)),selections:n}},getSelectionKeys:()=>c(e,o),matcherType:\"or\"})})}function p(e){return{[t]:()=>({match:t=>({matched:Boolean(e(t))})})}}function y(...e){const r=\"string\"==typeof e[0]?e[0]:void 0,i=2===e.length?e[1]:\"string\"==typeof e[0]?void 0:e[0];return u({[t]:()=>({match:t=>{let e={[null!=r?r:n]:t};return{matched:void 0===i||s(i,t,(t,n)=>{e[t]=n}),selections:e}},getSelectionKeys:()=>[null!=r?r:n].concat(void 0===i?[]:o(i))})})}function v(t){return\"number\"==typeof t}function b(t){return\"string\"==typeof t}function w(t){return\"bigint\"==typeof t}const S=u(p(function(t){return!0})),O=S,j=t=>Object.assign(u(t),{startsWith:e=>{return j(m(t,(n=e,p(t=>b(t)&&t.startsWith(n)))));var n},endsWith:e=>{return j(m(t,(n=e,p(t=>b(t)&&t.endsWith(n)))));var n},minLength:e=>j(m(t,(t=>p(e=>b(e)&&e.length>=t))(e))),length:e=>j(m(t,(t=>p(e=>b(e)&&e.length===t))(e))),maxLength:e=>j(m(t,(t=>p(e=>b(e)&&e.length<=t))(e))),includes:e=>{return j(m(t,(n=e,p(t=>b(t)&&t.includes(n)))));var n},regex:e=>{return j(m(t,(n=e,p(t=>b(t)&&Boolean(t.match(n))))));var n}}),K=j(p(b)),x=t=>Object.assign(u(t),{between:(e,n)=>x(m(t,((t,e)=>p(n=>v(n)&&t<=n&&e>=n))(e,n))),lt:e=>x(m(t,(t=>p(e=>v(e)&&e<t))(e))),gt:e=>x(m(t,(t=>p(e=>v(e)&&e>t))(e))),lte:e=>x(m(t,(t=>p(e=>v(e)&&e<=t))(e))),gte:e=>x(m(t,(t=>p(e=>v(e)&&e>=t))(e))),int:()=>x(m(t,p(t=>v(t)&&Number.isInteger(t)))),finite:()=>x(m(t,p(t=>v(t)&&Number.isFinite(t)))),positive:()=>x(m(t,p(t=>v(t)&&t>0))),negative:()=>x(m(t,p(t=>v(t)&&t<0)))}),E=x(p(v)),A=t=>Object.assign(u(t),{between:(e,n)=>A(m(t,((t,e)=>p(n=>w(n)&&t<=n&&e>=n))(e,n))),lt:e=>A(m(t,(t=>p(e=>w(e)&&e<t))(e))),gt:e=>A(m(t,(t=>p(e=>w(e)&&e>t))(e))),lte:e=>A(m(t,(t=>p(e=>w(e)&&e<=t))(e))),gte:e=>A(m(t,(t=>p(e=>w(e)&&e>=t))(e))),positive:()=>A(m(t,p(t=>w(t)&&t>0))),negative:()=>A(m(t,p(t=>w(t)&&t<0)))}),P=A(p(w)),T=u(p(function(t){return\"boolean\"==typeof t})),B=u(p(function(t){return\"symbol\"==typeof t})),_=u(p(function(t){return null==t})),k=u(p(function(t){return null!=t}));var N={__proto__:null,matcher:t,optional:h,array:function(...e){return l({[t]:()=>({match:t=>{if(!Array.isArray(t))return{matched:!1};if(0===e.length)return{matched:!0};const n=e[0];let r={};if(0===t.length)return o(n).forEach(t=>{r[t]=[]}),{matched:!0,selections:r};const i=(t,e)=>{r[t]=(r[t]||[]).concat([e])};return{matched:t.every(t=>s(n,t,i)),selections:r}},getSelectionKeys:()=>0===e.length?[]:o(e[0])})})},set:function(...e){return u({[t]:()=>({match:t=>{if(!(t instanceof Set))return{matched:!1};let n={};if(0===t.size)return{matched:!0,selections:n};if(0===e.length)return{matched:!0};const r=(t,e)=>{n[t]=(n[t]||[]).concat([e])},i=e[0];return{matched:f(t,t=>s(i,t,r)),selections:n}},getSelectionKeys:()=>0===e.length?[]:o(e[0])})})},map:function(...e){return u({[t]:()=>({match:t=>{if(!(t instanceof Map))return{matched:!1};let n={};if(0===t.size)return{matched:!0,selections:n};const r=(t,e)=>{n[t]=(n[t]||[]).concat([e])};if(0===e.length)return{matched:!0};var i;if(1===e.length)throw new Error(`\\`P.map\\` wasn't given enough arguments. Expected (key, value), received ${null==(i=e[0])?void 0:i.toString()}`);const[o,c]=e;return{matched:g(t,(t,e)=>{const n=s(o,e,r),i=s(c,t,r);return n&&i}),selections:n}},getSelectionKeys:()=>0===e.length?[]:[...o(e[0]),...o(e[1])]})})},intersection:m,union:d,not:function(e){return u({[t]:()=>({match:t=>({matched:!s(e,t,()=>{})}),getSelectionKeys:()=>[],matcherType:\"not\"})})},when:p,select:y,any:S,_:O,string:K,number:E,bigint:P,boolean:T,symbol:B,nullish:_,nonNullable:k,instanceOf:function(t){return u(p(function(t){return e=>e instanceof t}(t)))},shape:function(t){return u(p(a(t)))}};class W extends Error{constructor(t){let e;try{e=JSON.stringify(t)}catch(n){e=t}super(`Pattern matching error: no pattern matches value ${e}`),this.input=void 0,this.input=t}}const $={matched:!1,value:void 0};function z(t){return new I(t,$)}class I{constructor(t,e){this.input=void 0,this.state=void 0,this.input=t,this.state=e}with(...t){if(this.state.matched)return this;const e=t[t.length-1],r=[t[0]];let i;3===t.length&&\"function\"==typeof t[1]?i=t[1]:t.length>2&&r.push(...t.slice(1,t.length-1));let o=!1,c={};const a=(t,e)=>{o=!0,c[t]=e},u=!r.some(t=>s(t,this.input,a))||i&&!Boolean(i(this.input))?$:{matched:!0,value:e(o?n in c?c[n]:c:this.input,this.input)};return new I(this.input,u)}when(t,e){if(this.state.matched)return this;const n=Boolean(t(this.input));return new I(this.input,n?{matched:!0,value:e(this.input,this.input)}:$)}otherwise(t){return this.state.matched?this.state.value:t(this.input)}exhaustive(){if(this.state.matched)return this.state.value;throw new W(this.input)}run(){return this.exhaustive()}returnType(){return this}}export{W as NonExhaustiveError,N as P,N as Pattern,a as isMatching,z as match};\n//# sourceMappingURL=index.js.map\n","import {\n eventActionAbi,\n readEventActionGetActionClaimant,\n readEventActionGetActionSteps,\n simulateEventActionExecute,\n writeEventActionExecute,\n} from '@boostxyz/evm';\nimport { bytecode } from '@boostxyz/evm/artifacts/contracts/actions/EventAction.sol/EventAction.json';\nimport events from '@boostxyz/signatures/events';\nimport functions from '@boostxyz/signatures/functions';\nimport {\n GetTransactionReceiptParameters,\n getTransaction,\n getTransactionReceipt,\n} from '@wagmi/core';\nimport { match } from 'ts-pattern';\nimport {\n type Abi,\n type AbiEvent,\n type AbiFunction,\n AbiItem,\n type Address,\n type ContractEventName,\n type ContractFunctionName,\n type GetLogsReturnType,\n type GetTransactionParameters,\n type Hex,\n type Log,\n type PublicClient,\n type Transaction,\n decodeEventLog,\n decodeFunctionData,\n encodeAbiParameters,\n fromHex,\n isAddress,\n isAddressEqual,\n} from 'viem';\nimport { EventAction as EventActionBases } from '../../dist/deployments.json';\nimport type {\n DeployableOptions,\n GenericDeployableParams,\n} from '../Deployable/Deployable';\nimport { DeployableTarget } from '../Deployable/DeployableTarget';\nimport {\n DecodedArgsMalformedError,\n FieldValueNotComparableError,\n FieldValueUndefinedError,\n FunctionDataDecodeError,\n InvalidNumericalCriteriaError,\n NoEventActionStepsProvidedError,\n TooManyEventActionStepsProvidedError,\n UnparseableAbiParamError,\n UnrecognizedFilterTypeError,\n ValidationAbiMissingError,\n} from '../errors';\nimport {\n type GetLogsParams,\n type Overwrite,\n type ReadParams,\n RegistryType,\n type WriteParams,\n} from '../utils';\n\n/*\n * Action Event Payloads\n */\n\n/**\n * Filter types used to determine how criteria are evaluated.\n *\n * @export\n * @enum {number}\n */\nexport enum FilterType {\n EQUAL = 0,\n NOT_EQUAL = 1,\n GREATER_THAN = 2,\n LESS_THAN = 3,\n CONTAINS = 4,\n REGEX = 5,\n}\n\n/**\n * The primitive types supported for filtering.\n *\n * @export\n * @enum {number}\n */\nexport enum PrimitiveType {\n UINT = 0,\n ADDRESS = 1,\n BYTES = 2,\n STRING = 3,\n}\n\n/**\n * Object representation of a `Criteria` struct used in event actions.\n *\n * @export\n * @interface Criteria\n * @typedef {Criteria}\n */\nexport interface Criteria {\n /**\n * The filter type used in this criteria.\n *\n * @type {FilterType}\n */\n filterType: FilterType;\n /**\n * The primitive type of the field being filtered.\n *\n * @type {PrimitiveType}\n */\n fieldType: PrimitiveType;\n /**\n * The index in the logs argument array where the field is located.\n *\n * @type {number}\n */\n fieldIndex: number;\n /**\n * The filter data used for complex filtering.\n *\n * @type {Hex}\n */\n filterData: Hex;\n}\n\n/**\n * Whether a given signature is an event or function\n *\n * @export\n * @enum {number}\n */\nexport enum SignatureType {\n EVENT = 0,\n FUNC = 1,\n}\n\n/**\n * The payload describing how claimants are identified\n *\n * @export\n * @interface ActionClaimant\n * @typedef {ActionClaimant}\n */\nexport interface ActionClaimant {\n /**\n * Whether claimaint is inferred from event or function\n *\n * @type {SignatureType}\n */\n signatureType: SignatureType;\n /**\n * The 4 byte signature of the event or function\n *\n * @type {Hex}\n */\n signature: Hex;\n /**\n * The index corresponding to claimant.\n *\n * @type {number}\n */\n fieldIndex: number;\n /**\n * The address of the target contract\n *\n * @type {Address}\n */\n targetContract: Address;\n /**\n * The chain id of the target contract.\n * @type {number}\n */\n chainid: number;\n}\n\n/**\n * Object representation of an `ActionStep` struct used in event actions.\n *\n * @export\n * @interface ActionStep\n * @typedef {ActionStep}\n */\nexport interface ActionStep {\n /**\n * The signature of the event.\n *\n * @type {Hex}\n */\n signature: Hex;\n /**\n * Whether claimaint is inferred from event or function\n *\n * @type {SignatureType}\n */\n signatureType: SignatureType;\n /**\n * The type of action being performed.\n *\n * @type {number}\n */\n actionType?: number;\n /**\n * The address of the target contract.\n *\n * @type {Address}\n */\n targetContract: Address;\n /**\n * The chain id of the target contract.\n * @type {number}\n */\n chainid: number;\n /**\n * The criteria used for this action step.\n *\n * @type {Criteria}\n */\n actionParameter: Criteria;\n}\n\n/**\n * Parameters for validating an action step.\n *\n * @typedef {Object} ValidateActionStepParams\n * @property {Record<Hex, AbiEvent | AbiFunction>} [knownSignatures] - Optional record of known events, keyed by 32 byte selectors.\n * @property {AbiEvent | AbiFunction} [abiItem] - Optional ABI item definition.\n * @property {EventLogs} [logs] - Event logs to validate against. Required if 'hash' is not provided.\n * @property {Hex} [hash] - Transaction hash to validate against. Required if 'logs' is not provided.\n * @property {number} [chainId] - Chain ID for the transaction. Required if 'hash' is provided.\n */\nexport type ValidateActionStepParams = {\n knownSignatures?: Record<Hex, AbiEvent | AbiFunction>;\n abiItem?: AbiEvent | AbiFunction;\n} & ({ logs: EventLogs } | { hash: Hex; chainId: number });\n\n/**\n * You can either supply a simplified version of the payload, or one that explicitly declares action steps.\n *\n * @export\n * @typedef {EventActionPayload}\n */\nexport type EventActionPayload =\n | EventActionPayloadSimple\n | EventActionPayloadRaw;\n\nexport interface EventActionPayloadSimple {\n /**\n * The payload describing how claimants are identified\n *\n * @type {ActionClaimant}\n */\n actionClaimant: ActionClaimant;\n\n /**\n * Up to 4 action steps.\n * If you supply less than 4, then the last step will be reused to satisfy the EventAction.InitPayload\n * Any more than 4 will throw an error.\n *\n * @type {ActionStep[]}\n */\n actionSteps: ActionStep[];\n}\n\nexport type ActionStepTuple = [ActionStep, ActionStep, ActionStep, ActionStep];\n\n/**\n * Typeguard to determine if a user is supplying a simple or raw EventActionPayload\n *\n * @param {*} opts\n * @returns {opts is EventActionPayloadSimple}\n */\nexport function isEventActionPayloadSimple(\n opts: EventActionPayload,\n): opts is EventActionPayloadSimple {\n return Array.isArray((opts as EventActionPayloadSimple).actionSteps);\n}\n\n/**\n * Object representation of an `InitPayload` struct used to initialize event actions.\n *\n * @export\n * @interface EventActionPayloadRaw\n * @typedef {EventActionPayloadRaw}\n */\nexport interface EventActionPayloadRaw {\n /**\n * The payload describing how claimants are identified\n *\n * @type {ActionClaimant}\n */\n actionClaimant: ActionClaimant;\n /**\n * The first action step.\n *\n * @type {ActionStep}\n */\n actionStepOne: ActionStep;\n /**\n * The second action step.\n *\n * @type {ActionStep}\n */\n actionStepTwo: ActionStep;\n /**\n * The third action step.\n *\n * @type {ActionStep}\n */\n actionStepThree: ActionStep;\n /**\n * The fourth action step.\n *\n * @type {ActionStep}\n */\n actionStepFour: ActionStep;\n}\n\n/**\n * Array of event logs to pass into TxParams\n * @export\n * @typedef {EventLogs}\n */\nexport type EventLogs = GetLogsReturnType<AbiEvent, AbiEvent[], true>;\n\n/**\n * Getter params from the event action contract\n *\n * @export\n * @typedef {ReadEventActionParams}\n * @param {fnName} fnName - The getter function name\n */\nexport type ReadEventActionParams<\n fnName extends ContractFunctionName<typeof eventActionAbi, 'pure' | 'view'>,\n> = ReadParams<typeof eventActionAbi, fnName>;\n\n/**\n * A generic event action\n *\n * @export\n * @class EventAction\n * @typedef {EventAction}\n * @extends {DeployableTarget<EventActionPayload>}\n */\nexport class EventAction extends DeployableTarget<\n EventActionPayload,\n typeof eventActionAbi\n> {\n /**\n * @inheritdoc\n *\n * @public\n * @readonly\n * @type {*}\n */\n public override readonly abi = eventActionAbi;\n /**\n * @inheritdoc\n *\n * @public\n * @static\n * @type {Record<number, Address>}\n */\n public static override bases: Record<number, Address> = {\n ...(EventActionBases as Record<number, Address>),\n };\n /**\n * @inheritdoc\n *\n * @public\n * @static\n * @type {RegistryType}\n */\n public static override registryType: RegistryType = RegistryType.ACTION;\n\n /**\n * Gets a specific action event by index\n *\n * @public\n * @async\n * @param {number} index The index of the action event to retrieve\n * @param {?ReadEventActionParams<'getActionStep'>} [params]\n * @returns {Promise<ActionStep>}\n */\n public async getActionStep(\n index: number,\n params?: ReadEventActionParams<'getActionStep'>,\n ) {\n const steps = await this.getActionSteps(params);\n return steps.at(index);\n }\n\n /**\n * Gets all action events\n *\n * @public\n * @async\n * @param {?ReadEventActionParams<'getActionSteps'>} [params]\n * @returns {Promise<ActionStep[]>}\n */\n public async getActionSteps(\n params?: ReadEventActionParams<'getActionSteps'>,\n ) {\n const steps = (await readEventActionGetActionSteps(this._config, {\n address: this.assertValidAddress(),\n ...this.optionallyAttachAccount(),\n // biome-ignore lint/suspicious/noExplicitAny: Accept any shape of valid wagmi/viem parameters, wagmi does the same thing internally\n ...(params as any),\n })) as RawActionStep[];\n return _dedupeActionSteps(steps.map(_fromRawActionStep));\n }\n\n /**\n * Gets the count of action events\n *\n * @public\n * @async\n * @param {?ReadEventActionParams<'getActionStepsCount'>} [params]\n * @returns {Promise<bigint>}\n */\n public async getActionStepsCount(\n params?: ReadEventActionParams<'getActionStepsCount'>,\n ) {\n const steps = await this.getActionSteps(params);\n return steps.length;\n }\n\n /**\n * Retrieves the payload describing how claimants can be identified from logs or function calls.\n *\n * @public\n * @async\n * @param {?ReadEventActionParams<'getActionClaimant'>} [params]\n * @returns {Promise<ActionClaimant>}\n */\n public async getActionClaimant(\n params?: ReadEventActionParams<'getActionClaimant'>,\n ): Promise<ActionClaimant> {\n const result = (await readEventActionGetActionClaimant(this._config, {\n address: this.assertValidAddress(),\n ...this.optionallyAttachAccount(),\n ...params,\n })) as RawActionClaimant;\n return _fromRawActionStep(result);\n }\n\n /**\n * Executes a prepared event action\n *\n * @public\n * @async\n * @param {Hex} data\n * @param {?WriteParams} [params]\n * @returns {Promise<readonly [boolean, `0x${string}`]>}\n */\n public async execute(\n data: Hex,\n params?: WriteParams<typeof eventActionAbi, 'execute'>,\n ) {\n return await this.awaitResult(this.executeRaw(data, params));\n }\n\n /**\n * Executes a prepared event action\n *\n * @public\n * @async\n * @param {Hex} data\n * @param {?WriteParams} [params]\n * @returns {Promise<{ hash: `0x${string}`; result: readonly [boolean, `0x${string}`]; }>}\n */\n public async executeRaw(\n data: Hex,\n params?: WriteParams<typeof eventActionAbi, 'execute'>,\n ) {\n const { request, result } = await simulateEventActionExecute(this._config, {\n address: this.assertValidAddress(),\n ...this.optionallyAttachAccount(),\n // biome-ignore lint/suspicious/noExplicitAny: Accept any shape of valid wagmi/viem parameters, wagmi does the same thing internally\n ...(params as any),\n args: [data],\n });\n const hash = await writeEventActionExecute(this._config, request);\n return { hash, result };\n }\n\n /**\n * Derives the action claimant address from a transaction based on the provided ActionClaimant configuration.\n * This method supports both event-based and function-based claimant derivation.\n *\n ** @example\n * // Example usage\n * const eventAction = boost.action as EventAction\n * const claimant = await eventAction.getActionClaimant() // {\n * signatureType: SignatureType.EVENT,\n * signature: '0x1234...',\n * fieldIndex: 2,\n * targetContract: '0xabcd...',\n * chainid: 1\n * };\n * const params: ValidateActionStepParams = {\n * hash: '0x5678...',\n * chainId: 1,\n * knownSignatures?: {\n * '0x1234...': {}\n * }\n * };\n * const claimantAddress = await eventAction.deriveActionClaimantFromTransaction(claimant, params);\n *\n * @param {ActionClaimant} claimant - The configuration specifying how to derive the claimant.\n * @param {ValidateActionStepParams} params - Parameters for validation, including transaction hash, known signatures, logs, and chain ID.\n * @returns {Promise<Address | undefined>} The derived claimant address if found, undefined otherwise.\n * @throws {ValidationAbiMissingError} If the ABI for the specified signature is not found.\n * @throws {FunctionDataDecodeError} If there's an error decoding function data (for function-based derivation).\n */\n public async deriveActionClaimantFromTransaction(\n claimant: ActionClaimant,\n params: ValidateActionStepParams,\n ): Promise<Address | undefined> {\n const signature = claimant.signature;\n if (claimant.signatureType === SignatureType.EVENT) {\n let event: AbiEvent;\n if (params.abiItem) event = params.abiItem as AbiEvent;\n if (params.knownSignatures) {\n event = params.knownSignatures?.[signature] as AbiEvent;\n } else {\n event = (events.abi as Record<Hex, AbiEvent>)[signature] as AbiEvent;\n }\n\n if (!event) {\n throw new ValidationAbiMissingError(signature);\n }\n\n let address: Address | undefined;\n if ('logs' in params) {\n for (let log of params.logs) {\n if (!isAddressEqual(log.address, claimant.targetContract)) continue;\n let addressCandidate = this.validateClaimantAgainstArgs(\n claimant,\n log,\n );\n if (addressCandidate) address = addressCandidate;\n }\n return address;\n }\n const receipt = await getTransactionReceipt(this._config, params);\n const decodedLogs = receipt.logs.map((log) => {\n const { eventName, args } = decodeEventLog({\n abi: [event],\n data: log.data,\n topics: log.topics,\n });\n return { ...log, eventName, args };\n });\n\n for (let log of decodedLogs) {\n if (!isAddressEqual(log.address, claimant.targetContract)) continue;\n let addressCandidate = this.validateClaimantAgainstArgs(claimant, log);\n if (addressCandidate) address = addressCandidate;\n }\n return address;\n }\n if (\n claimant.signatureType === SignatureType.FUNC &&\n 'hash' in params &&\n 'chainId' in params\n ) {\n const transaction = await getTransaction(this._config, {\n hash: params.hash,\n });\n if (!isAddressEqual(transaction.to!, claimant.targetContract)) return;\n let func: AbiFunction;\n if (params.abiItem) func = params.abiItem as AbiFunction;\n if (params.knownSignatures) {\n func = params.knownSignatures?.[signature] as AbiFunction;\n } else {\n func = (functions.abi as Record<Hex, AbiFunction>)[\n signature\n ] as AbiFunction;\n }\n if (!func) {\n throw new ValidationAbiMissingError(claimant.signature);\n }\n let decodedData;\n try {\n decodedData = decodeFunctionData({\n abi: [func],\n data: transaction.input,\n });\n } catch (e) {\n throw new FunctionDataDecodeError([func], e as Error);\n }\n return this.validateClaimantAgainstArgs(claimant, decodedData);\n }\n }\n\n /**\n * Validates the action claimant against the arguments of a log or function data.\n *\n * @param {ActionClaimant} claimant - The action claimant to validate.\n * @param {Object} [logOrFnData] - Optional object containing the arguments to validate against.\n * @param {Array<any> | readonly unknown[] | Record<string, unknown>} [logOrFnData.args] - The arguments from the log or function data.\n * @returns {Address | undefined} The validated address if found and valid, otherwise undefined.\n */\n public validateClaimantAgainstArgs(\n claimant: ActionClaimant,\n logOrFnData?: {\n args: Array<unknown> | readonly unknown[] | Record<string, unknown>;\n },\n ): Address | undefined {\n if (\n !logOrFnData ||\n !Array.isArray(logOrFnData?.args) ||\n logOrFnData?.args.length <= claimant.fieldIndex\n ) {\n return;\n }\n const maybeAddress = logOrFnData.args.at(claimant.fieldIndex);\n if (isAddress(maybeAddress)) return maybeAddress;\n }\n\n /**\n * Retrieves action steps, and uses them to validate against, and optionally fetch logs that match the step's signature.\n * If logs are provided in the optional `params` argument, then those logs will be used instead of fetched with the configured client.\n *\n * @public\n * @async\n * @param ValidateActionStepParams params\n * @returns {Promise<boolean>}\n */\n public async validateActionSteps(params: ValidateActionStepParams) {\n const actionSteps = await this.getActionSteps();\n for (const actionStep of actionSteps) {\n if (!(await this.isActionStepValid(actionStep, params))) {\n return false;\n }\n }\n return true;\n }\n\n /**\n * Validates a single action step with a given criteria against logs or function calls.\n * If logs are provided in the optional `params` argument, then those logs will be used instead of being fetched with the configured client.\n * For functions a hash is required.\n *\n * @public\n * @async\n * @param {ActionStep} actionStep - The action step to validate. Can be a function of event step.\n * @param {ValidateActionStepParams} params - Additional parameters for validation, including hash, known events, logs, and chain ID.\n * @returns {Promise<boolean>}\n */\n public async isActionStepValid(\n actionStep: ActionStep,\n params: ValidateActionStepParams,\n ) {\n if (actionStep.signatureType === SignatureType.EVENT) {\n const signature = actionStep.signature;\n let event: AbiEvent;\n if (params.abiItem) event = params.abiItem as AbiEvent;\n if (params.knownSignatures) {\n event = params.knownSignatures?.[signature] as AbiEvent;\n } else {\n event = (events.abi as Record<Hex, AbiEvent>)[signature] as AbiEvent;\n }\n\n if (!event) {\n throw new ValidationAbiMissingError(signature);\n }\n\n if (this.isArraylikeIndexed(actionStep, event)) {\n // If the field is indexed, we can't filter on it\n throw new UnparseableAbiParamError(\n actionStep.actionParameter.fieldIndex,\n event,\n );\n }\n\n // Use the provided logs, no need to fetch receipt\n if ('logs' in params) {\n return this.isActionEventValid(actionStep, params.logs);\n }\n\n const client = this._config.getClient({\n chainId: params.chainId,\n }) as PublicClient;\n const receipt = await client.getTransactionReceipt({\n hash: params.hash,\n });\n const decodedLogs = receipt.logs.map((log) => {\n const { eventName, args } = decodeEventLog({\n abi: [event],\n data: log.data,\n topics: log.topics,\n });\n\n return { ...log, eventName, args };\n });\n\n return this.isActionEventValid(actionStep, decodedLogs);\n }\n if (actionStep.signatureType === SignatureType.FUNC) {\n if ('hash' in params && 'chainId' in params) {\n const client = this._config.getClient({\n chainId: params.chainId,\n }) as PublicClient;\n const transaction = await client.getTransaction({\n hash: params.hash,\n });\n return this.isActionFunctionValid(actionStep, transaction, params);\n }\n }\n return false;\n }\n\n /**\n * Validates a single action event with a given criteria against logs.\n * If logs are provided in the optional `params` argument, then those logs will be used instead of being fetched with the configured client.\n *\n * @public\n * @async\n * @param {ActionStep} actionStep - The action step containing the event to validate.\n * @param {EventLogs} logs - Event logs to validate the given step against\n * @returns {Promise<boolean>} Resolves to true if the action event is valid, throws if input is invalid, otherwise false.\n */\n public isActionEventValid(actionStep: ActionStep, logs: EventLogs) {\n const criteria = actionStep.actionParameter;\n if (!logs.length) return false;\n for (let log of logs) {\n if (this.validateLogAgainstCriteria(criteria, log)) {\n return true;\n }\n }\n return false;\n }\n\n /**\n * Validates a single action function with a given criteria against the transaction input.\n *\n * @public\n * @param {ActionStep} actionStep - The action step containing the function to validate.\n * @param {Transaction} transaction - The transaction that will be validated against.\n * @param {Object} [params] - Optional parameters for validation.\n * @param {AbiItem} [params.abiItem] - The ABI item for the function, if known.\n * @param {Record<Hex, AbiEvent | AbiFunction>} [params.knownSignatures] - A record of known signatures.\n * @returns {boolean} Returns true if the action function is valid, false otherwise.\n * @throws {ValidationAbiMissingError} Throws if the ABI for the function signature is not found.\n * @throws {FunctionDataDecodeError} Throws if there's an error decoding the function data.\n */\n public isActionFunctionValid(\n actionStep: ActionStep,\n transaction: Transaction,\n params?: Pick<ValidateActionStepParams, 'abiItem' | 'knownSignatures'>,\n ) {\n const criteria = actionStep.actionParameter;\n let signature = actionStep.signature;\n\n let func: AbiFunction;\n if (params?.abiItem) func = params?.abiItem as AbiFunction;\n if (params?.knownSignatures) {\n func = params?.knownSignatures?.[signature] as AbiFunction;\n } else {\n func = (functions.abi as Record<Hex, AbiFunction>)[\n signature\n ] as AbiFunction;\n }\n if (!func) {\n throw new ValidationAbiMissingError(signature);\n }\n\n let decodedData;\n try {\n decodedData = decodeFunctionData({\n abi: [func],\n data: transaction.input,\n });\n } catch (e) {\n throw new FunctionDataDecodeError([func], e as Error);\n }\n\n // Validate the criteria against decoded arguments using fieldIndex\n const decodedArgs = decodedData.args;\n\n if (!decodedArgs || !decodedData) return false;\n\n if (\n !this.validateFunctionAgainstCriteria(\n criteria,\n decodedArgs as (string | bigint)[],\n )\n ) {\n return false;\n }\n\n return true;\n }\n /**\n * Validates a field against a given criteria.\n *\n * @param {Criteria} criteria - The criteria to validate against.\n * @param {string | bigint | Hex} fieldValue - The field value to validate.\n * @param {Object} input - Additional context for validation.\n * @param {EventLogs[0]} [input.log] - The event log, if validating an event.\n * @param {readonly (string | bigint)[]} [input.decodedArgs] - The decoded function arguments, if validating a function call.\n * @returns {Promise<boolean>} - Returns true if the field passes the criteria, false otherwise.\n */\n public validateFieldAgainstCriteria(\n criteria: Criteria,\n fieldValue: string | bigint | Hex,\n input:\n | { log: EventLogs[0] }\n | { decodedArgs: readonly (string | bigint)[] },\n ): boolean {\n // Type narrow based on criteria.filterType\n switch (criteria.filterType) {\n case FilterType.EQUAL:\n return match(criteria.fieldType)\n .with(PrimitiveType.ADDRESS, () =>\n isAddressEqual(criteria.filterData, fieldValue as Address),\n )\n .with(\n PrimitiveType.UINT,\n () => BigInt(fieldValue) === BigInt(criteria.filterData),\n )\n .with(\n PrimitiveType.STRING,\n () => fieldValue === fromHex(criteria.filterData, 'string'),\n )\n .otherwise(() => fieldValue === criteria.filterData);\n\n case FilterType.NOT_EQUAL:\n return match(criteria.fieldType)\n .with(\n PrimitiveType.ADDRESS,\n () => !isAddressEqual(criteria.filterData, fieldValue as Address),\n )\n .with(\n PrimitiveType.UINT,\n () => BigInt(fieldValue) !== BigInt(criteria.filterData),\n )\n .with(\n PrimitiveType.STRING,\n () => fieldValue !== fromHex(criteria.filterData, 'string'),\n )\n .otherwise(() => fieldValue !== criteria.filterData);\n\n case FilterType.GREATER_THAN:\n if (criteria.fieldType === PrimitiveType.UINT) {\n return BigInt(fieldValue) > BigInt(criteria.filterData);\n }\n throw new InvalidNumericalCriteriaError({\n ...input,\n criteria,\n fieldValue,\n });\n\n case FilterType.LESS_THAN:\n if (criteria.fieldType === PrimitiveType.UINT) {\n return BigInt(fieldValue) < BigInt(criteria.filterData);\n }\n throw new InvalidNumericalCriteriaError({\n ...input,\n criteria,\n fieldValue,\n });\n\n case FilterType.CONTAINS:\n if (\n criteria.fieldType === PrimitiveType.BYTES ||\n criteria.fieldType === PrimitiveType.STRING\n ) {\n let substring;\n if (criteria.fieldType === PrimitiveType.STRING) {\n substring = fromHex(criteria.filterData, 'string');\n } else {\n // truncate the `0x` prefix\n substring = criteria.filterData.slice(2);\n }\n return (fieldValue as string).includes(substring);\n }\n throw new FieldValueNotComparableError({\n ...input,\n criteria,\n fieldValue,\n });\n\n case FilterType.REGEX:\n if (typeof fieldValue !== 'string') {\n throw new FieldValueNotComparableError({\n ...input,\n criteria,\n fieldValue,\n });\n }\n\n if (criteria.fieldType === PrimitiveType.STRING) {\n // fieldValue is decoded by the ABI\n const regexString = fromHex(criteria.filterData, 'string');\n return new RegExp(regexString).test(fieldValue);\n }\n\n default:\n throw new UnrecognizedFilterTypeError({\n ...input,\n criteria,\n fieldValue,\n });\n }\n }\n\n /**\n * Validates a {@link Log} against a given criteria.\n *\n * @param {Criteria} criteria - The criteria to validate against.\n * @param {Log} log - The Viem event log.\n * @returns {boolean} - Returns true if the log passes the criteria, false otherwise.\n */\n public validateLogAgainstCriteria(\n criteria: Criteria,\n log: EventLogs[0],\n ): boolean {\n if (!Array.isArray(log.args) || log.args.length <= criteria.fieldIndex) {\n throw new DecodedArgsMalformedError({\n log,\n criteria,\n fieldValue: undefined,\n });\n }\n\n const fieldValue = log.args.at(criteria.fieldIndex);\n if (fieldValue === undefined) {\n throw new FieldValueUndefinedError({ log, criteria, fieldValue });\n }\n return this.validateFieldAgainstCriteria(criteria, fieldValue, { log });\n }\n\n /**\n * Validates a function's decoded arguments against a given criteria.\n *\n * @param {Criteria} criteria - The criteria to validate against.\n * @param {unknown[]} decodedArgs - The decoded arguments of the function call.\n * @returns {Promise<boolean>} - Returns true if the decoded argument passes the criteria, false otherwise.\n */\n public validateFunctionAgainstCriteria(\n criteria: Criteria,\n decodedArgs: readonly (string | bigint)[],\n ): boolean {\n const fieldValue = decodedArgs[criteria.fieldIndex];\n if (fieldValue === undefined) {\n throw new FieldValueUndefinedError({\n criteria,\n fieldValue,\n });\n }\n return this.validateFieldAgainstCriteria(criteria, fieldValue, {\n decodedArgs,\n });\n }\n\n /**\n * @inheritdoc\n *\n * @public\n * @param {?EventActionPayload} [_payload]\n * @param {?DeployableOptions} [_options]\n * @returns {GenericDeployableParams}\n */\n public override buildParameters(\n _payload?: EventActionPayload,\n _options?: DeployableOptions,\n ): GenericDeployableParams {\n const [payload, options] = this.validateDeploymentConfig(\n _payload,\n _options,\n );\n let rawPayload: EventActionPayloadRaw;\n if (isEventActionPayloadSimple(payload)) {\n // filter out any falsy potential values\n let tmpSteps: ActionStep[] = payload.actionSteps.filter((step) => !!step);\n if (tmpSteps.length === 0) {\n throw new NoEventActionStepsProvidedError();\n }\n if (tmpSteps.length > 4) {\n throw new TooManyEventActionStepsProvidedError();\n }\n let steps: ActionStepTuple = Array.from({ length: 4 }, (_, i) => {\n // use either the provided step at the given index, or reuse the previous step\n // should aways exist\n return tmpSteps.at(i) || tmpSteps.at(-1);\n }) as ActionStepTuple;\n rawPayload = {\n actionClaimant: payload.actionClaimant,\n actionStepOne: steps[0],\n actionStepTwo: steps[1],\n actionStepThree: steps[2],\n actionStepFour: steps[3],\n };\n } else {\n rawPayload = payload;\n }\n return {\n abi: eventActionAbi,\n bytecode: bytecode as Hex,\n args: [prepareEventActionPayload(rawPayload)],\n ...this.optionallyAttachAccount(options.account),\n };\n }\n\n public isArraylikeIndexed(step: ActionStep, event: AbiEvent) {\n if (\n (step.actionParameter.fieldType === PrimitiveType.STRING ||\n step.actionParameter.fieldType === PrimitiveType.BYTES) &&\n event.inputs[step.actionParameter.fieldIndex]?.indexed\n ) {\n return true;\n }\n return false;\n }\n}\n\nfunction _dedupeActionSteps(_steps: ActionStep[]): ActionStep[] {\n const steps: ActionStep[] = [],\n signatures: Record<string, boolean> = {};\n for (let step of _steps) {\n const signature = JSON.stringify(step);\n if (signatures[signature]) continue;\n steps.push(step);\n signatures[signature] = true;\n }\n return steps;\n}\ntype RawActionStep = Overwrite<ActionStep, { chainid: bigint }>;\ntype RawActionClaimant = Overwrite<ActionClaimant, { chainid: bigint }>;\n\nfunction _toRawActionStep<T extends ActionStep | ActionClaimant>(obj: T) {\n return {\n ...obj,\n chainid: BigInt(obj.chainid),\n };\n}\n\nfunction _fromRawActionStep<T extends RawActionStep | RawActionClaimant>(\n obj: T,\n) {\n if (obj.chainid > BigInt(Number.MAX_SAFE_INTEGER)) {\n throw new Error('Chain ID exceeds max safe integer');\n }\n\n return {\n ...obj,\n chainid: Number(obj.chainid),\n };\n}\n\n/**\n * Typeguard to determine if a user is supplying a simple or raw EventActionPayload\n *\n * @param {*} opts\n * @returns {opts is EventActionPayloadSimple}\n */\nfunction _isEventActionPayloadSimple(\n opts: EventActionPayload,\n): opts is EventActionPayloadSimple {\n return Array.isArray((opts as EventActionPayloadSimple).actionSteps);\n}\n\n/**\n * Function to properly encode an event action payload.\n *\n * @param {InitPayload} param0\n * @param {ActionStep} param0.actionStepOne - The first action step to initialize.\n * @param {ActionStep} param0.actionStepTwo - The second action step to initialize.\n * @param {ActionStep} param0.actionStepThree - The third action step to initialize.\n * @param {ActionStep} param0.actionStepFour - The fourth action step to initialize.\n * @returns {Hex}\n */\nexport function prepareEventActionPayload({\n actionClaimant,\n actionStepOne,\n actionStepTwo,\n actionStepThree,\n actionStepFour,\n}: EventActionPayloadRaw) {\n // note chainIds are technically uint256 but viem treats them (safely) as numbers,\n // so we encode them as uint32 here to avoid downcast issues\n return encodeAbiParameters(\n [\n {\n type: 'tuple',\n name: 'initPayload',\n components: [\n {\n type: 'tuple',\n name: 'actionClaimant',\n components: [\n { type: 'uint8', name: 'signatureType' },\n { type: 'bytes32', name: 'signature' },\n { type: 'uint8', name: 'fieldIndex' },\n { type: 'address', name: 'targetContract' },\n { type: 'uint256', name: 'chainid' },\n ],\n },\n {\n type: 'tuple',\n name: 'actionStepOne',\n components: [\n { type: 'bytes32', name: 'signature' },\n { type: 'uint8', name: 'signatureType' },\n { type: 'uint8', name: 'actionType' },\n { type: 'address', name: 'targetContract' },\n { type: 'uint256', name: 'chainid' },\n {\n type: 'tuple',\n name: 'actionParameter',\n components: [\n { type: 'uint8', name: 'filterType' },\n { type: 'uint8', name: 'fieldType' },\n { type: 'uint8', name: 'fieldIndex' },\n { type: 'bytes', name: 'filterData' },\n ],\n },\n ],\n },\n {\n type: 'tuple',\n name: 'actionStepTwo',\n components: [\n { type: 'bytes32', name: 'signature' },\n { type: 'uint8', name: 'signatureType' },\n { type: 'uint8', name: 'actionType' },\n { type: 'address', name: 'targetContract' },\n { type: 'uint256', name: 'chainid' },\n {\n type: 'tuple',\n name: 'actionParameter',\n components: [\n { type: 'uint8', name: 'filterType' },\n { type: 'uint8', name: 'fieldType' },\n { type: 'uint8', name: 'fieldIndex' },\n { type: 'bytes', name: 'filterData' },\n ],\n },\n ],\n },\n {\n type: 'tuple',\n name: 'actionStepThree',\n components: [\n { type: 'bytes32', name: 'signature' },\n { type: 'uint8', name: 'signatureType' },\n { type: 'uint8', name: 'actionType' },\n { type: 'address', name: 'targetContract' },\n { type: 'uint256', name: 'chainid' },\n {\n type: 'tuple',\n name: 'actionParameter',\n components: [\n { type: 'uint8', name: 'filterType' },\n { type: 'uint8', name: 'fieldType' },\n { type: 'uint8', name: 'fieldIndex' },\n { type: 'bytes', name: 'filterData' },\n ],\n },\n ],\n },\n {\n type: 'tuple',\n name: 'actionStepFour',\n components: [\n { type: 'bytes32', name: 'signature' },\n { type: 'uint8', name: 'signatureType' },\n { type: 'uint8', name: 'actionType' },\n { type: 'address', name: 'targetContract' },\n { type: 'uint256', name: 'chainid' },\n {\n type: 'tuple',\n name: 'actionParameter',\n components: [\n { type: 'uint8', name: 'filterType' },\n { type: 'uint8', name: 'fieldType' },\n { type: 'uint8', name: 'fieldIndex' },\n { type: 'bytes', name: 'filterData' },\n ],\n },\n ],\n },\n ],\n },\n ],\n [\n {\n actionClaimant: _toRawActionStep(actionClaimant),\n actionStepOne: {\n ..._toRawActionStep(actionStepOne),\n actionType: actionStepOne.actionType || 0,\n },\n actionStepTwo: {\n ..._toRawActionStep(actionStepTwo),\n actionType: actionStepTwo.actionType || 0,\n },\n actionStepThree: {\n ..._toRawActionStep(actionStepThree),\n actionType: actionStepThree.actionType || 0,\n },\n actionStepFour: {\n ..._toRawActionStep(actionStepFour),\n actionType: actionStepFour.actionType || 0,\n },\n },\n ],\n );\n}\n"],"names":["t","e","n","r","i","s","o","c","a","u","h","m","d","y","p","v","b","j","x","W","$","z","I","FilterType","PrimitiveType","SignatureType","isEventActionPayloadSimple","opts","_EventAction","DeployableTarget","eventActionAbi","index","params","steps","readEventActionGetActionSteps","_dedupeActionSteps","_fromRawActionStep","result","readEventActionGetActionClaimant","data","request","simulateEventActionExecute","writeEventActionExecute","claimant","signature","event","_a","events","ValidationAbiMissingError","address","log","isAddressEqual","addressCandidate","decodedLogs","getTransactionReceipt","eventName","args","decodeEventLog","transaction","getTransaction","func","_b","functions","decodedData","decodeFunctionData","FunctionDataDecodeError","logOrFnData","maybeAddress","isAddress","actionSteps","actionStep","UnparseableAbiParamError","logs","criteria","decodedArgs","fieldValue","input","match","fromHex","InvalidNumericalCriteriaError","substring","FieldValueNotComparableError","regexString","UnrecognizedFilterTypeError","DecodedArgsMalformedError","FieldValueUndefinedError","_payload","_options","payload","options","rawPayload","tmpSteps","step","NoEventActionStepsProvidedError","TooManyEventActionStepsProvidedError","_","bytecode","prepareEventActionPayload","EventActionBases","RegistryType","EventAction","_steps","signatures","_toRaw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AA,UACF;AAAA,QACF;AAAA,MACF;AAAA,IACF;AAAA,IACA;AAAA,MACE;AAAA,QACE,gBAAgBP,EAAiBE,CAAc;AAAA,QAC/C,eAAe;AAAA,UACb,GAAGF,EAAiBG,CAAa;AAAA,UACjC,YAAYA,EAAc,cAAc;AAAA,QAC1C;AAAA,QACA,eAAe;AAAA,UACb,GAAGH,EAAiBI,CAAa;AAAA,UACjC,YAAYA,EAAc,cAAc;AAAA,QAC1C;AAAA,QACA,iBAAiB;AAAA,UACf,GAAGJ,EAAiBK,CAAe;AAAA,UACnC,YAAYA,EAAgB,cAAc;AAAA,QAC5C;AAAA,QACA,gBAAgB;AAAA,UACd,GAAGL,EAAiBM,CAAc;AAAA,UAClC,YAAYA,EAAe,cAAc;AAAA,QAC3C;AAAA,MACF;AAAA,IACF;AAAA,EAAA;AAEJ;","x_google_ignoreList":[0]}
|
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
"use strict";const S=require("./generated-B0tk-c9b.cjs"),U=require("@wagmi/core"),y=require("viem"),Q=require("./deployments-CMdF5uEC.cjs"),$=require("./Deployable/DeployableTarget.cjs"),u=require("./errors.cjs"),z=require("./utils.cjs"),J="0x60a0604052348015600e575f80fd5b50601b601f60201b60201c565b60b0565b5f602c608760201b60201c565b90508054600181161560455763f92ee8a95f526004601cfd5b8160c01c808260011c146082578060011b8355806020527fc7f505b2f371ae2175ee4913f4499e1f2633a7b5936321eed1cdaeb6115181d2602080a15b505050565b5f7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffbf6011325f1b905090565b60805161231a6100c85f395f61034a015261231a5ff3fe608060405260043610610090575f3560e01c80639bc1cf81116100585780639bc1cf811461017d578063c26624e8146101a7578063d7768c47146101e3578063dbdf21101461021f578063ddd6ab081461024957610090565b806301ffc9a71461009457806309c5eabe146100d057806328d6183b14610101578063393df8cb1461012b578063439fab9114610155575b5f80fd5b34801561009f575f80fd5b506100ba60048036038101906100b59190611333565b610273565b6040516100c79190611378565b60405180910390f35b6100ea60048036038101906100e591906113f2565b6102ec565b6040516100f89291906114ad565b60405180910390f35b34801561010c575f80fd5b50610115610321565b60405161012291906114ea565b60405180910390f35b348015610136575f80fd5b5061013f610348565b60405161014c919061157d565b60405180910390f35b348015610160575f80fd5b5061017b600480360381019061017691906113f2565b61036c565b005b348015610188575f80fd5b506101916103f9565b60405161019e91906118e9565b60405180910390f35b3480156101b2575f80fd5b506101cd60048036038101906101c89190611933565b610648565b6040516101da91906119e4565b60405180910390f35b3480156101ee575f80fd5b50610209600480360381019061020491906113f2565b610875565b6040516102169190611a04565b60405180910390f35b34801561022a575f80fd5b506102336108a9565b6040516102409190611a8a565b60405180910390f35b348015610254575f80fd5b5061025d610981565b60405161026a9190611ab2565b60405180910390f35b5f7f7687b0ed000000000000000000000000000000000000000000000000000000007bffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916827bffffffffffffffffffffffffffffffffffffffffffffffffffffffff191614806102e557506102e48261098d565b5b9050919050565b5f60606040517fd623472500000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b5f7f7687b0ed00000000000000000000000000000000000000000000000000000000905090565b7f000000000000000000000000000000000000000000000000000000000000000081565b5f610375610a06565b905080546003825580156103a75760018160011c14303b1061039e5763f92ee8a95f526004601cfd5b818160ff1b1b91505b506103bf83838101906103ba9190611fb0565b610a2f565b80156103f4576002815560016020527fc7f505b2f371ae2175ee4913f4499e1f2633a7b5936321eed1cdaeb6115181d2602080a15b505050565b60606004805480602002602001604051908101604052809291908181526020015f905b8282101561063f578382905f5260205f2090600502016040518060c00160405290815f8201548152602001600182015f9054906101000a900460ff16600181111561046a576104696115d7565b5b600181111561047c5761047b6115d7565b5b81526020016001820160019054906101000a900460ff1660ff1660ff1681526020016001820160029054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200160028201548152602001600382016040518060800160405290815f82015f9054906101000a900460ff1660058111156105305761052f6115d7565b5b6005811115610542576105416115d7565b5b81526020015f820160019054906101000a900460ff16600381111561056a576105696115d7565b5b600381111561057c5761057b6115d7565b5b81526020015f820160029054906101000a900460ff1660ff1660ff1681526020016001820180546105ac90612024565b80601f01602080910402602001604051908101604052809291908181526020018280546105d890612024565b80156106235780601f106105fa57610100808354040283529160200191610623565b820191905f5260205f20905b81548152906001019060200180831161060657829003601f168201915b505050505081525050815250508152602001906001019061041c565b50505050905090565b6106506111c4565b6004828154811061066457610663612054565b5b905f5260205f2090600502016040518060c00160405290815f8201548152602001600182015f9054906101000a900460ff1660018111156106a8576106a76115d7565b5b60018111156106ba576106b96115d7565b5b81526020016001820160019054906101000a900460ff1660ff1660ff1681526020016001820160029054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200160028201548152602001600382016040518060800160405290815f82015f9054906101000a900460ff16600581111561076e5761076d6115d7565b5b60058111156107805761077f6115d7565b5b81526020015f820160019054906101000a900460ff1660038111156107a8576107a76115d7565b5b60038111156107ba576107b96115d7565b5b81526020015f820160029054906101000a900460ff1660ff1660ff1681526020016001820180546107ea90612024565b80601f016020809104026020016040519081016040528092919081815260200182805461081690612024565b80156108615780601f1061083857610100808354040283529160200191610861565b820191905f5260205f20905b81548152906001019060200180831161084457829003601f168201915b505050505081525050815250509050919050565b60606040517fd623472500000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b6108b1611229565b5f6040518060a00160405290815f82015f9054906101000a900460ff1660018111156108e0576108df6115d7565b5b60018111156108f2576108f16115d7565b5b815260200160018201548152602001600282015f9054906101000a900460ff1660ff1660ff1681526020016002820160019054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001600382015481525050905090565b5f600480549050905090565b5f7fe6715795000000000000000000000000000000000000000000000000000000007bffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916827bffffffffffffffffffffffffffffffffffffffffffffffffffffffff191614806109ff57506109fe826110be565b5b9050919050565b5f7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffbf6011325f1b905090565b610a37611137565b805f01515f80820151815f015f6101000a81548160ff02191690836001811115610a6457610a636115d7565b5b0217905550602082015181600101556040820151816002015f6101000a81548160ff021916908360ff16021790555060608201518160020160016101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff1602179055506080820151816003015590505060048160200151908060018154018082558091505060019003905f5260205f2090600502015f909190919091505f820151815f01556020820151816001015f6101000a81548160ff02191690836001811115610b4657610b456115d7565b5b021790555060408201518160010160016101000a81548160ff021916908360ff16021790555060608201518160010160026101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff1602179055506080820151816002015560a0820151816003015f820151815f015f6101000a81548160ff02191690836005811115610bee57610bed6115d7565b5b02179055506020820151815f0160016101000a81548160ff02191690836003811115610c1d57610c1c6115d7565b5b02179055506040820151815f0160026101000a81548160ff021916908360ff1602179055506060820151816001019081610c579190612215565b505050505060048160400151908060018154018082558091505060019003905f5260205f2090600502015f909190919091505f820151815f01556020820151816001015f6101000a81548160ff02191690836001811115610cbb57610cba6115d7565b5b021790555060408201518160010160016101000a81548160ff021916908360ff16021790555060608201518160010160026101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff1602179055506080820151816002015560a0820151816003015f820151815f015f6101000a81548160ff02191690836005811115610d6357610d626115d7565b5b02179055506020820151815f0160016101000a81548160ff02191690836003811115610d9257610d916115d7565b5b02179055506040820151815f0160026101000a81548160ff021916908360ff1602179055506060820151816001019081610dcc9190612215565b505050505060048160600151908060018154018082558091505060019003905f5260205f2090600502015f909190919091505f820151815f01556020820151816001015f6101000a81548160ff02191690836001811115610e3057610e2f6115d7565b5b021790555060408201518160010160016101000a81548160ff021916908360ff16021790555060608201518160010160026101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff1602179055506080820151816002015560a0820151816003015f820151815f015f6101000a81548160ff02191690836005811115610ed857610ed76115d7565b5b02179055506020820151815f0160016101000a81548160ff02191690836003811115610f0757610f066115d7565b5b02179055506040820151815f0160026101000a81548160ff021916908360ff1602179055506060820151816001019081610f419190612215565b505050505060048160800151908060018154018082558091505060019003905f5260205f2090600502015f909190919091505f820151815f01556020820151816001015f6101000a81548160ff02191690836001811115610fa557610fa46115d7565b5b021790555060408201518160010160016101000a81548160ff021916908360ff16021790555060608201518160010160026101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff1602179055506080820151816002015560a0820151816003015f820151815f015f6101000a81548160ff0219169083600581111561104d5761104c6115d7565b5b02179055506020820151815f0160016101000a81548160ff0219169083600381111561107c5761107b6115d7565b5b02179055506040820151815f0160026101000a81548160ff021916908360ff16021790555060608201518160010190816110b69190612215565b505050505050565b5f7f6ab67a0d000000000000000000000000000000000000000000000000000000007bffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916827bffffffffffffffffffffffffffffffffffffffffffffffffffffffff19161480611130575061112f8261115b565b5b9050919050565b5f611140610a06565b905080546001166111585763d7e6bcf85f526004601cfd5b50565b5f7f01ffc9a7000000000000000000000000000000000000000000000000000000007bffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916827bffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916149050919050565b6040518060c001604052805f80191681526020015f60018111156111eb576111ea6115d7565b5b81526020015f60ff1681526020015f73ffffffffffffffffffffffffffffffffffffffff1681526020015f8152602001611223611281565b81525090565b6040518060a001604052805f6001811115611247576112466115d7565b5b81526020015f80191681526020015f60ff1681526020015f73ffffffffffffffffffffffffffffffffffffffff1681526020015f81525090565b60405180608001604052805f600581111561129f5761129e6115d7565b5b81526020015f60038111156112b7576112b66115d7565b5b81526020015f60ff168152602001606081525090565b5f604051905090565b5f80fd5b5f80fd5b5f7fffffffff0000000000000000000000000000000000000000000000000000000082169050919050565b611312816112de565b811461131c575f80fd5b50565b5f8135905061132d81611309565b92915050565b5f60208284031215611348576113476112d6565b5b5f6113558482850161131f565b91505092915050565b5f8115159050919050565b6113728161135e565b82525050565b5f60208201905061138b5f830184611369565b92915050565b5f80fd5b5f80fd5b5f80fd5b5f8083601f8401126113b2576113b1611391565b5b8235905067ffffffffffffffff8111156113cf576113ce611395565b5b6020830191508360018202830111156113eb576113ea611399565b5b9250929050565b5f8060208385031215611408576114076112d6565b5b5f83013567ffffffffffffffff811115611425576114246112da565b5b6114318582860161139d565b92509250509250929050565b5f81519050919050565b5f82825260208201905092915050565b8281835e5f83830152505050565b5f601f19601f8301169050919050565b5f61147f8261143d565b6114898185611447565b9350611499818560208601611457565b6114a281611465565b840191505092915050565b5f6040820190506114c05f830185611369565b81810360208301526114d28184611475565b90509392505050565b6114e4816112de565b82525050565b5f6020820190506114fd5f8301846114db565b92915050565b5f73ffffffffffffffffffffffffffffffffffffffff82169050919050565b5f819050919050565b5f61154561154061153b84611503565b611522565b611503565b9050919050565b5f6115568261152b565b9050919050565b5f6115678261154c565b9050919050565b6115778161155d565b82525050565b5f6020820190506115905f83018461156e565b92915050565b5f81519050919050565b5f82825260208201905092915050565b5f819050602082019050919050565b5f819050919050565b6115d1816115bf565b82525050565b7f4e487b71000000000000000000000000000000000000000000000000000000005f52602160045260245ffd5b60028110611615576116146115d7565b5b50565b5f81905061162582611604565b919050565b5f61163482611618565b9050919050565b6116448161162a565b82525050565b5f60ff82169050919050565b61165f8161164a565b82525050565b5f61166f82611503565b9050919050565b61167f81611665565b82525050565b5f819050919050565b61169781611685565b82525050565b600681106116ae576116ad6115d7565b5b50565b5f8190506116be8261169d565b919050565b5f6116cd826116b1565b9050919050565b6116dd816116c3565b82525050565b600481106116f4576116f36115d7565b5b50565b5f819050611704826116e3565b919050565b5f611713826116f7565b9050919050565b61172381611709565b82525050565b5f82825260208201905092915050565b5f6117438261143d565b61174d8185611729565b935061175d818560208601611457565b61176681611465565b840191505092915050565b5f608083015f8301516117865f8601826116d4565b506020830151611799602086018261171a565b5060408301516117ac6040860182611656565b50606083015184820360608601526117c48282611739565b9150508091505092915050565b5f60c083015f8301516117e65f8601826115c8565b5060208301516117f9602086018261163b565b50604083015161180c6040860182611656565b50606083015161181f6060860182611676565b506080830151611832608086018261168e565b5060a083015184820360a086015261184a8282611771565b9150508091505092915050565b5f61186283836117d1565b905092915050565b5f602082019050919050565b5f61188082611596565b61188a81856115a0565b93508360208202850161189c856115b0565b805f5b858110156118d757848403895281516118b88582611857565b94506118c38361186a565b925060208a0199505060018101905061189f565b50829750879550505050505092915050565b5f6020820190508181035f8301526119018184611876565b905092915050565b61191281611685565b811461191c575f80fd5b50565b5f8135905061192d81611909565b92915050565b5f60208284031215611948576119476112d6565b5b5f6119558482850161191f565b91505092915050565b5f60c083015f8301516119735f8601826115c8565b506020830151611986602086018261163b565b5060408301516119996040860182611656565b5060608301516119ac6060860182611676565b5060808301516119bf608086018261168e565b5060a083015184820360a08601526119d78282611771565b9150508091505092915050565b5f6020820190508181035f8301526119fc818461195e565b905092915050565b5f6020820190508181035f830152611a1c8184611475565b905092915050565b60a082015f820151611a385f85018261163b565b506020820151611a4b60208501826115c8565b506040820151611a5e6040850182611656565b506060820151611a716060850182611676565b506080820151611a84608085018261168e565b50505050565b5f60a082019050611a9d5f830184611a24565b92915050565b611aac81611685565b82525050565b5f602082019050611ac55f830184611aa3565b92915050565b5f80fd5b7f4e487b71000000000000000000000000000000000000000000000000000000005f52604160045260245ffd5b611b0582611465565b810181811067ffffffffffffffff82111715611b2457611b23611acf565b5b80604052505050565b5f611b366112cd565b9050611b428282611afc565b919050565b5f80fd5b60028110611b57575f80fd5b50565b5f81359050611b6881611b4b565b92915050565b611b77816115bf565b8114611b81575f80fd5b50565b5f81359050611b9281611b6e565b92915050565b611ba18161164a565b8114611bab575f80fd5b50565b5f81359050611bbc81611b98565b92915050565b611bcb81611665565b8114611bd5575f80fd5b50565b5f81359050611be681611bc2565b92915050565b5f60a08284031215611c0157611c00611acb565b5b611c0b60a0611b2d565b90505f611c1a84828501611b5a565b5f830152506020611c2d84828501611b84565b6020830152506040611c4184828501611bae565b6040830152506060611c5584828501611bd8565b6060830152506080611c698482850161191f565b60808301525092915050565b60068110611c81575f80fd5b50565b5f81359050611c9281611c75565b92915050565b60048110611ca4575f80fd5b50565b5f81359050611cb581611c98565b92915050565b5f80fd5b5f67ffffffffffffffff821115611cd957611cd8611acf565b5b611ce282611465565b9050602081019050919050565b828183375f83830152505050565b5f611d0f611d0a84611cbf565b611b2d565b905082815260208101848484011115611d2b57611d2a611cbb565b5b611d36848285611cef565b509392505050565b5f82601f830112611d5257611d51611391565b5b8135611d62848260208601611cfd565b91505092915050565b5f60808284031215611d8057611d7f611acb565b5b611d8a6080611b2d565b90505f611d9984828501611c84565b5f830152506020611dac84828501611ca7565b6020830152506040611dc084828501611bae565b604083015250606082013567ffffffffffffffff811115611de457611de3611b47565b5b611df084828501611d3e565b60608301525092915050565b5f60c08284031215611e1157611e10611acb565b5b611e1b60c0611b2d565b90505f611e2a84828501611b84565b5f830152506020611e3d84828501611b5a565b6020830152506040611e5184828501611bae565b6040830152506060611e6584828501611bd8565b6060830152506080611e798482850161191f565b60808301525060a082013567ffffffffffffffff811115611e9d57611e9c611b47565b5b611ea984828501611d6b565b60a08301525092915050565b5f6101208284031215611ecb57611eca611acb565b5b611ed560a0611b2d565b90505f611ee484828501611bec565b5f8301525060a082013567ffffffffffffffff811115611f0757611f06611b47565b5b611f1384828501611dfc565b60208301525060c082013567ffffffffffffffff811115611f3757611f36611b47565b5b611f4384828501611dfc565b60408301525060e082013567ffffffffffffffff811115611f6757611f66611b47565b5b611f7384828501611dfc565b60608301525061010082013567ffffffffffffffff811115611f9857611f97611b47565b5b611fa484828501611dfc565b60808301525092915050565b5f60208284031215611fc557611fc46112d6565b5b5f82013567ffffffffffffffff811115611fe257611fe16112da565b5b611fee84828501611eb5565b91505092915050565b7f4e487b71000000000000000000000000000000000000000000000000000000005f52602260045260245ffd5b5f600282049050600182168061203b57607f821691505b60208210810361204e5761204d611ff7565b5b50919050565b7f4e487b71000000000000000000000000000000000000000000000000000000005f52603260045260245ffd5b5f819050815f5260205f209050919050565b5f6020601f8301049050919050565b5f82821b905092915050565b5f600883026120dd7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff826120a2565b6120e786836120a2565b95508019841693508086168417925050509392505050565b5f61211961211461210f84611685565b611522565b611685565b9050919050565b5f819050919050565b612132836120ff565b61214661213e82612120565b8484546120ae565b825550505050565b5f90565b61215a61214e565b612165818484612129565b505050565b5b818110156121885761217d5f82612152565b60018101905061216b565b5050565b601f8211156121cd5761219e81612081565b6121a784612093565b810160208510156121b6578190505b6121ca6121c285612093565b83018261216a565b50505b505050565b5f82821c905092915050565b5f6121ed5f19846008026121d2565b1980831691505092915050565b5f61220583836121de565b9150826002028217905092915050565b61221e8261143d565b67ffffffffffffffff81111561223757612236611acf565b5b6122418254612024565b61224c82828561218c565b5f60209050601f83116001811461227d575f841561226b578287015190505b61227585826121fa565b8655506122dc565b601f19841661228b86612081565b5f5b828110156122b25784890151825560018201915060208501945060208101905061228d565b868310156122cf57848901516122cb601f8916826121de565b8355505b6001600288020188555050505b50505050505056fea2646970667358221220c0fb13f888b0a69e33db3d7586e65062d85bac26cd33b0773ccbf5249746b2b264736f6c634300081a0033",Y={"0xddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef":{name:"Transfer",type:"event",inputs:[{type:"address",indexed:!0},{type:"address",indexed:!0},{type:"uint256",indexed:!0}]},"Transfer(address indexed,address indexed,uint256 indexed)":{name:"Transfer",type:"event",inputs:[{type:"address",indexed:!0},{type:"address",indexed:!0},{type:"uint256",indexed:!0}]},"0xb362243af1e2070d7d5bf8d713f2e0fab64203f1b71462afbe20572909788c5e":{name:"Purchased",type:"event",inputs:[{type:"address",indexed:!0},{type:"address",indexed:!0},{type:"uint256",indexed:!0},{type:"uint256"},{type:"uint256"}]},"Purchased(address indexed,address indexed,uint256 indexed,uint256,uint256)":{name:"Purchased",type:"event",inputs:[{type:"address",indexed:!0},{type:"address",indexed:!0},{type:"uint256",indexed:!0},{type:"uint256"},{type:"uint256"}]},"0x69e37f151eb98a09618ddaa80c8cfaf1ce5996867c489f45b555b412271ebf27":{name:"NameRegistered",type:"event",inputs:[{type:"string"},{type:"bytes32"},{type:"address"},{type:"uint256"},{type:"uint256"},{type:"uint256"}]},"NameRegistered(string,bytes32,address,uint256,uint256,uint256)":{name:"NameRegistered",type:"event",inputs:[{type:"string"},{type:"bytes32"},{type:"address"},{type:"uint256"},{type:"uint256"},{type:"uint256"}]},"0x3134e8a2e6d97e929a7e54011ea5485d7d196dd5f0ba4d4ef95803e8e3fc257f":{name:"DelegateChanged",type:"event",inputs:[{type:"address",indexed:!0},{type:"address",indexed:!0},{type:"address",indexed:!0}]},"DelegateChanged(address indexed,address indexed,address indexed)":{name:"DelegateChanged",type:"event",inputs:[{type:"address",indexed:!0},{type:"address",indexed:!0},{type:"address",indexed:!0}]},"0xe00361d207b252a464323eb23d45d42583e391f2031acdd2e9fa36efddd43cb0":{name:"SwappedV3",type:"event",inputs:[{type:"bytes16"},{type:"address"},{type:"uint256"},{type:"address"},{type:"address",indexed:!0},{type:"address",indexed:!0},{type:"address",indexed:!0},{type:"uint256"},{type:"uint256"},{type:"uint256"}]},"SwappedV3(bytes16,address,uint256,address,address indexed,address indexed,address indexed,uint256,uint256,uint256)":{name:"SwappedV3",type:"event",inputs:[{type:"bytes16"},{type:"address"},{type:"uint256"},{type:"address"},{type:"address",indexed:!0},{type:"address",indexed:!0},{type:"address",indexed:!0},{type:"uint256"},{type:"uint256"},{type:"uint256"}]},"0xb8e138887d0aa13bab447e82de9d5c1777041ecd21ca36ba824ff1e6c07ddda4":{name:"VoteCast",type:"event",inputs:[{type:"address",indexed:!0},{type:"uint256"},{type:"uint8"},{type:"uint256"},{type:"string"}]},"VoteCast(address indexed,uint256,uint8,uint256,string)":{name:"VoteCast",type:"event",inputs:[{type:"address",indexed:!0},{type:"uint256"},{type:"uint8"},{type:"uint256"},{type:"string"}]},"0x883a883a9ea847654d33471b1e5fb2dea76a2cfc86a6cc7da6c14102800e4d0b":{name:"InfoIndexed",type:"event",inputs:[{type:"address",indexed:!0},{type:"string",indexed:!0}]},"InfoIndexed(address indexed,string indexed)":{name:"InfoIndexed",type:"event",inputs:[{type:"address",indexed:!0},{type:"string",indexed:!0}]},"0xe46343e36b0721f173bdc76b8f25c08b04f417df09c27e1e83ba1980007fef8c":{name:"Info",type:"event",inputs:[{type:"address"},{type:"string"}]},"Info(address,string)":{name:"Info",type:"event",inputs:[{type:"address"},{type:"string"}]}},Z={"Transfer(address indexed,address indexed,uint256 indexed)":"0xddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef","Purchased(address indexed,address indexed,uint256 indexed,uint256,uint256)":"0xb362243af1e2070d7d5bf8d713f2e0fab64203f1b71462afbe20572909788c5e","NameRegistered(string,bytes32,address,uint256,uint256,uint256)":"0x69e37f151eb98a09618ddaa80c8cfaf1ce5996867c489f45b555b412271ebf27","DelegateChanged(address indexed,address indexed,address indexed)":"0x3134e8a2e6d97e929a7e54011ea5485d7d196dd5f0ba4d4ef95803e8e3fc257f","SwappedV3(bytes16,address,uint256,address,address indexed,address indexed,address indexed,uint256,uint256,uint256)":"0xe00361d207b252a464323eb23d45d42583e391f2031acdd2e9fa36efddd43cb0","VoteCast(address indexed,uint256,uint8,uint256,string)":"0xb8e138887d0aa13bab447e82de9d5c1777041ecd21ca36ba824ff1e6c07ddda4","InfoIndexed(address indexed,string indexed)":"0x883a883a9ea847654d33471b1e5fb2dea76a2cfc86a6cc7da6c14102800e4d0b","Info(address,string)":"0xe46343e36b0721f173bdc76b8f25c08b04f417df09c27e1e83ba1980007fef8c"},V={abi:Y,selectors:Z},f0={"0x0000000000000000000000000000000000000000000000000000000040c10f19":{name:"mint",type:"function",stateMutability:"nonpayable",inputs:[{type:"address",name:"to"},{type:"uint256",name:"amount"}],outputs:[]},"mint(address to, uint256 amount)":{name:"mint",type:"function",stateMutability:"nonpayable",inputs:[{type:"address",name:"to"},{type:"uint256",name:"amount"}],outputs:[]},"0x0000000000000000000000000000000000000000000000000000000017d304b0":{name:"mintPayable",type:"function",stateMutability:"nonpayable",inputs:[{type:"address",name:"to"},{type:"uint256",name:"amount"}],outputs:[]},"mintPayable(address to, uint256 amount)":{name:"mintPayable",type:"function",stateMutability:"nonpayable",inputs:[{type:"address",name:"to"},{type:"uint256",name:"amount"}],outputs:[]},"0x0000000000000000000000000000000000000000000000000000000024856bc3":{name:"execute",type:"function",stateMutability:"nonpayable",inputs:[{type:"bytes",name:"commands"},{type:"bytes[]",name:"inputs"}],outputs:[]},"execute(bytes commands,bytes[] inputs)":{name:"execute",type:"function",stateMutability:"nonpayable",inputs:[{type:"bytes",name:"commands"},{type:"bytes[]",name:"inputs"}],outputs:[]},"0x0000000000000000000000000000000000000000000000000000000074694a2b":{name:"register",type:"function",stateMutability:"nonpayable",inputs:[{type:"string",name:"name"},{type:"address",name:"owner"},{type:"uint256",name:"duration"},{type:"bytes32",name:"secret"},{type:"address",name:"resolver"},{type:"bytes[]",name:"data"},{type:"bool",name:"reverseRecord"},{type:"uint16",name:"ownerControlledFuses"}],outputs:[]},"register(string name,address owner,uint256 duration,bytes32 secret,address resolver,bytes[] data,bool reverseRecord,uint16 ownerControlledFuses)":{name:"register",type:"function",stateMutability:"nonpayable",inputs:[{type:"string",name:"name"},{type:"address",name:"owner"},{type:"uint256",name:"duration"},{type:"bytes32",name:"secret"},{type:"address",name:"resolver"},{type:"bytes[]",name:"data"},{type:"bool",name:"reverseRecord"},{type:"uint16",name:"ownerControlledFuses"}],outputs:[]},"0x00000000000000000000000000000000000000000000000000000000eb9019d4":{name:"getVotes",type:"function",stateMutability:"view",inputs:[{type:"address",name:"account"},{type:"uint256",name:"blockNumber"}],outputs:[{type:"uint256"}]},"getVotes(address account, uint256 blockNumber) view returns (uint256)":{name:"getVotes",type:"function",stateMutability:"view",inputs:[{type:"address",name:"account"},{type:"uint256",name:"blockNumber"}],outputs:[{type:"uint256"}]},"0x0000000000000000000000000000000000000000000000000000000023b872dd":{name:"transferFrom",type:"function",stateMutability:"nonpayable",inputs:[{type:"address"},{type:"address"},{type:"uint256"}],outputs:[]},"transferFrom(address,address,uint256)":{name:"transferFrom",type:"function",stateMutability:"nonpayable",inputs:[{type:"address"},{type:"address"},{type:"uint256"}],outputs:[]},"0x000000000000000000000000000000000000000000000000000000006a627842":{name:"mint",type:"function",stateMutability:"nonpayable",inputs:[{type:"address"}],outputs:[]},"mint(address)":{name:"mint",type:"function",stateMutability:"nonpayable",inputs:[{type:"address"}],outputs:[]}},e0={"mint(address to, uint256 amount)":"0x0000000000000000000000000000000000000000000000000000000040c10f19","mintPayable(address to, uint256 amount)":"0x0000000000000000000000000000000000000000000000000000000017d304b0","execute(bytes commands,bytes[] inputs)":"0x0000000000000000000000000000000000000000000000000000000024856bc3","register(string name,address owner,uint256 duration,bytes32 secret,address resolver,bytes[] data,bool reverseRecord,uint16 ownerControlledFuses)":"0x0000000000000000000000000000000000000000000000000000000074694a2b","getVotes(address account, uint256 blockNumber) view returns (uint256)":"0x00000000000000000000000000000000000000000000000000000000eb9019d4","transferFrom(address,address,uint256)":"0x0000000000000000000000000000000000000000000000000000000023b872dd","mint(address)":"0x000000000000000000000000000000000000000000000000000000006a627842"},k={abi:f0,selectors:e0},w=Symbol.for("@ts-pattern/matcher"),t0=Symbol.for("@ts-pattern/isVariadic"),D="@ts-pattern/anonymous-select-key",B=t=>!!(t&&typeof t=="object"),R=t=>t&&!!t[w],m=(t,f,e)=>{if(R(t)){const n=t[w](),{matched:a,selections:b}=n.match(f);return a&&b&&Object.keys(b).forEach(d=>e(d,b[d])),a}if(B(t)){if(!B(f))return!1;if(Array.isArray(t)){if(!Array.isArray(f))return!1;let n=[],a=[],b=[];for(const d of t.keys()){const i=t[d];R(i)&&i[t0]?b.push(i):b.length?a.push(i):n.push(i)}if(b.length){if(b.length>1)throw new Error("Pattern error: Using `...P.array(...)` several times in a single pattern is not allowed.");if(f.length<n.length+a.length)return!1;const d=f.slice(0,n.length),i=a.length===0?[]:f.slice(-a.length),p=f.slice(n.length,a.length===0?1/0:-a.length);return n.every((c,o)=>m(c,d[o],e))&&a.every((c,o)=>m(c,i[o],e))&&(b.length===0||m(b[0],p,e))}return t.length===f.length&&t.every((d,i)=>m(d,f[i],e))}return Reflect.ownKeys(t).every(n=>{const a=t[n];return(n in f||R(b=a)&&b[w]().matcherType==="optional")&&m(a,f[n],e);var b})}return Object.is(f,t)},I=t=>{var f,e,n;return B(t)?R(t)?(f=(e=(n=t[w]()).getSelectionKeys)==null?void 0:e.call(n))!=null?f:[]:Array.isArray(t)?N(t,I):N(Object.values(t),I):[]},N=(t,f)=>t.reduce((e,n)=>e.concat(f(n)),[]);function l(t){return Object.assign(t,{optional:()=>n0(t),and:f=>r(t,f),or:f=>a0(t,f),select:f=>f===void 0?q(t):q(f,t)})}function n0(t){return l({[w]:()=>({match:f=>{let e={};const n=(a,b)=>{e[a]=b};return f===void 0?(I(t).forEach(a=>n(a,void 0)),{matched:!0,selections:e}):{matched:m(t,f,n),selections:e}},getSelectionKeys:()=>I(t),matcherType:"optional"})})}function r(...t){return l({[w]:()=>({match:f=>{let e={};const n=(a,b)=>{e[a]=b};return{matched:t.every(a=>m(a,f,n)),selections:e}},getSelectionKeys:()=>N(t,I),matcherType:"and"})})}function a0(...t){return l({[w]:()=>({match:f=>{let e={};const n=(a,b)=>{e[a]=b};return N(t,I).forEach(a=>n(a,void 0)),{matched:t.some(a=>m(a,f,n)),selections:e}},getSelectionKeys:()=>N(t,I),matcherType:"or"})})}function s(t){return{[w]:()=>({match:f=>({matched:!!t(f)})})}}function q(...t){const f=typeof t[0]=="string"?t[0]:void 0,e=t.length===2?t[1]:typeof t[0]=="string"?void 0:t[0];return l({[w]:()=>({match:n=>{let a={[f??D]:n};return{matched:e===void 0||m(e,n,(b,d)=>{a[b]=d}),selections:a}},getSelectionKeys:()=>[f??D].concat(e===void 0?[]:I(e))})})}function h(t){return typeof t=="number"}function v(t){return typeof t=="string"}function A(t){return typeof t=="bigint"}l(s(function(t){return!0}));const T=t=>Object.assign(l(t),{startsWith:f=>{return T(r(t,(e=f,s(n=>v(n)&&n.startsWith(e)))));var e},endsWith:f=>{return T(r(t,(e=f,s(n=>v(n)&&n.endsWith(e)))));var e},minLength:f=>T(r(t,(e=>s(n=>v(n)&&n.length>=e))(f))),length:f=>T(r(t,(e=>s(n=>v(n)&&n.length===e))(f))),maxLength:f=>T(r(t,(e=>s(n=>v(n)&&n.length<=e))(f))),includes:f=>{return T(r(t,(e=f,s(n=>v(n)&&n.includes(e)))));var e},regex:f=>{return T(r(t,(e=f,s(n=>v(n)&&!!n.match(e)))));var e}});T(s(v));const g=t=>Object.assign(l(t),{between:(f,e)=>g(r(t,((n,a)=>s(b=>h(b)&&n<=b&&a>=b))(f,e))),lt:f=>g(r(t,(e=>s(n=>h(n)&&n<e))(f))),gt:f=>g(r(t,(e=>s(n=>h(n)&&n>e))(f))),lte:f=>g(r(t,(e=>s(n=>h(n)&&n<=e))(f))),gte:f=>g(r(t,(e=>s(n=>h(n)&&n>=e))(f))),int:()=>g(r(t,s(f=>h(f)&&Number.isInteger(f)))),finite:()=>g(r(t,s(f=>h(f)&&Number.isFinite(f)))),positive:()=>g(r(t,s(f=>h(f)&&f>0))),negative:()=>g(r(t,s(f=>h(f)&&f<0)))});g(s(h));const E=t=>Object.assign(l(t),{between:(f,e)=>E(r(t,((n,a)=>s(b=>A(b)&&n<=b&&a>=b))(f,e))),lt:f=>E(r(t,(e=>s(n=>A(n)&&n<e))(f))),gt:f=>E(r(t,(e=>s(n=>A(n)&&n>e))(f))),lte:f=>E(r(t,(e=>s(n=>A(n)&&n<=e))(f))),gte:f=>E(r(t,(e=>s(n=>A(n)&&n>=e))(f))),positive:()=>E(r(t,s(f=>A(f)&&f>0))),negative:()=>E(r(t,s(f=>A(f)&&f<0)))});E(s(A));l(s(function(t){return typeof t=="boolean"}));l(s(function(t){return typeof t=="symbol"}));l(s(function(t){return t==null}));l(s(function(t){return t!=null}));class b0 extends Error{constructor(f){let e;try{e=JSON.stringify(f)}catch{e=f}super(`Pattern matching error: no pattern matches value ${e}`),this.input=void 0,this.input=f}}const _={matched:!1,value:void 0};function F(t){return new P(t,_)}class P{constructor(f,e){this.input=void 0,this.state=void 0,this.input=f,this.state=e}with(...f){if(this.state.matched)return this;const e=f[f.length-1],n=[f[0]];let a;f.length===3&&typeof f[1]=="function"?a=f[1]:f.length>2&&n.push(...f.slice(1,f.length-1));let b=!1,d={};const i=(c,o)=>{b=!0,d[c]=o},p=!n.some(c=>m(c,this.input,i))||a&&!a(this.input)?_:{matched:!0,value:e(b?D in d?d[D]:d:this.input,this.input)};return new P(this.input,p)}when(f,e){if(this.state.matched)return this;const n=!!f(this.input);return new P(this.input,n?{matched:!0,value:e(this.input,this.input)}:_)}otherwise(f){return this.state.matched?this.state.value:f(this.input)}exhaustive(){if(this.state.matched)return this.state.value;throw new b0(this.input)}run(){return this.exhaustive()}returnType(){return this}}var G=(t=>(t[t.EQUAL=0]="EQUAL",t[t.NOT_EQUAL=1]="NOT_EQUAL",t[t.GREATER_THAN=2]="GREATER_THAN",t[t.LESS_THAN=3]="LESS_THAN",t[t.CONTAINS=4]="CONTAINS",t[t.REGEX=5]="REGEX",t))(G||{}),j=(t=>(t[t.UINT=0]="UINT",t[t.ADDRESS=1]="ADDRESS",t[t.BYTES=2]="BYTES",t[t.STRING=3]="STRING",t))(j||{}),K=(t=>(t[t.EVENT=0]="EVENT",t[t.FUNC=1]="FUNC",t))(K||{});function O(t){return Array.isArray(t.actionSteps)}const M=class M extends $.DeployableTarget{constructor(){super(...arguments),this.abi=S.X}async getActionStep(f,e){return(await this.getActionSteps(e)).at(f)}async getActionSteps(f){const e=await S.ST(this._config,{address:this.assertValidAddress(),...this.optionallyAttachAccount(),...f});return d0(e.map(H))}async getActionStepsCount(f){return(await this.getActionSteps(f)).length}async getActionClaimant(f){const e=await S.xT(this._config,{address:this.assertValidAddress(),...this.optionallyAttachAccount(),...f});return H(e)}async execute(f,e){return await this.awaitResult(this.executeRaw(f,e))}async executeRaw(f,e){const{request:n,result:a}=await S.UT(this._config,{address:this.assertValidAddress(),...this.optionallyAttachAccount(),...e,args:[f]});return{hash:await S.FT(this._config,n),result:a}}async deriveActionClaimantFromTransaction(f,e){var a,b;const n=f.signature;if(f.signatureType===0){let d;if(e.abiItem&&(d=e.abiItem),e.knownSignatures?d=(a=e.knownSignatures)==null?void 0:a[n]:d=V.abi[n],!d)throw new u.ValidationAbiMissingError(n);let i;if("logs"in e){for(let o of e.logs){if(!y.isAddressEqual(o.address,f.targetContract))continue;let x=this.validateClaimantAgainstArgs(f,o);x&&(i=x)}return i}const c=(await U.getTransactionReceipt(this._config,e)).logs.map(o=>{const{eventName:x,args:X}=y.decodeEventLog({abi:[d],data:o.data,topics:o.topics});return{...o,eventName:x,args:X}});for(let o of c){if(!y.isAddressEqual(o.address,f.targetContract))continue;let x=this.validateClaimantAgainstArgs(f,o);x&&(i=x)}return i}if(f.signatureType===1&&"hash"in e&&"chainId"in e){const d=await U.getTransaction(this._config,{hash:e.hash});if(!y.isAddressEqual(d.to,f.targetContract))return;let i;if(e.abiItem&&(i=e.abiItem),e.knownSignatures?i=(b=e.knownSignatures)==null?void 0:b[n]:i=k.abi[n],!i)throw new u.ValidationAbiMissingError(f.signature);let p;try{p=y.decodeFunctionData({abi:[i],data:d.input})}catch(c){throw new u.FunctionDataDecodeError([i],c)}return this.validateClaimantAgainstArgs(f,p)}}validateClaimantAgainstArgs(f,e){if(!e||!Array.isArray(e==null?void 0:e.args)||(e==null?void 0:e.args.length)<=f.fieldIndex)return;const n=e.args.at(f.fieldIndex);if(y.isAddress(n))return n}async validateActionSteps(f){const e=await this.getActionSteps();for(const n of e)if(!await this.isActionStepValid(n,f))return!1;return!0}async isActionStepValid(f,e){var n;if(f.signatureType===0){const a=f.signature;let b;if(e.abiItem&&(b=e.abiItem),e.knownSignatures?b=(n=e.knownSignatures)==null?void 0:n[a]:b=V.abi[a],!b)throw new u.ValidationAbiMissingError(a);if(this.isArraylikeIndexed(f,b))throw new u.UnparseableAbiParamError(f.actionParameter.fieldIndex,b);if("logs"in e)return this.isActionEventValid(f,e.logs);const p=(await this._config.getClient({chainId:e.chainId}).getTransactionReceipt({hash:e.hash})).logs.map(c=>{const{eventName:o,args:x}=y.decodeEventLog({abi:[b],data:c.data,topics:c.topics});return{...c,eventName:o,args:x}});return this.isActionEventValid(f,p)}if(f.signatureType===1&&"hash"in e&&"chainId"in e){const b=await this._config.getClient({chainId:e.chainId}).getTransaction({hash:e.hash});return this.isActionFunctionValid(f,b,e)}return!1}isActionEventValid(f,e){const n=f.actionParameter;if(!e.length)return!1;for(let a of e)if(this.validateLogAgainstCriteria(n,a))return!0;return!1}isActionFunctionValid(f,e,n){var c;const a=f.actionParameter;let b=f.signature,d;if(n!=null&&n.abiItem&&(d=n==null?void 0:n.abiItem),n!=null&&n.knownSignatures?d=(c=n==null?void 0:n.knownSignatures)==null?void 0:c[b]:d=k.abi[b],!d)throw new u.ValidationAbiMissingError(b);let i;try{i=y.decodeFunctionData({abi:[d],data:e.input})}catch(o){throw new u.FunctionDataDecodeError([d],o)}const p=i.args;return!(!p||!i||!this.validateFunctionAgainstCriteria(a,p))}validateFieldAgainstCriteria(f,e,n){switch(f.filterType){case 0:return F(f.fieldType).with(1,()=>y.isAddressEqual(f.filterData,e)).with(0,()=>BigInt(e)===BigInt(f.filterData)).with(3,()=>e===y.fromHex(f.filterData,"string")).otherwise(()=>e===f.filterData);case 1:return F(f.fieldType).with(1,()=>!y.isAddressEqual(f.filterData,e)).with(0,()=>BigInt(e)!==BigInt(f.filterData)).with(3,()=>e!==y.fromHex(f.filterData,"string")).otherwise(()=>e!==f.filterData);case 2:if(f.fieldType===0)return BigInt(e)>BigInt(f.filterData);throw new u.InvalidNumericalCriteriaError({...n,criteria:f,fieldValue:e});case 3:if(f.fieldType===0)return BigInt(e)<BigInt(f.filterData);throw new u.InvalidNumericalCriteriaError({...n,criteria:f,fieldValue:e});case 4:if(f.fieldType===2||f.fieldType===3){let a;return f.fieldType===3?a=y.fromHex(f.filterData,"string"):a=f.filterData.slice(2),e.includes(a)}throw new u.FieldValueNotComparableError({...n,criteria:f,fieldValue:e});case 5:if(typeof e!="string")throw new u.FieldValueNotComparableError({...n,criteria:f,fieldValue:e});if(f.fieldType===3){const a=y.fromHex(f.filterData,"string");return new RegExp(a).test(e)}default:throw new u.UnrecognizedFilterTypeError({...n,criteria:f,fieldValue:e})}}validateLogAgainstCriteria(f,e){if(!Array.isArray(e.args)||e.args.length<=f.fieldIndex)throw new u.DecodedArgsMalformedError({log:e,criteria:f,fieldValue:void 0});const n=e.args.at(f.fieldIndex);if(n===void 0)throw new u.FieldValueUndefinedError({log:e,criteria:f,fieldValue:n});return this.validateFieldAgainstCriteria(f,n,{log:e})}validateFunctionAgainstCriteria(f,e){const n=e[f.fieldIndex];if(n===void 0)throw new u.FieldValueUndefinedError({criteria:f,fieldValue:n});return this.validateFieldAgainstCriteria(f,n,{decodedArgs:e})}buildParameters(f,e){const[n,a]=this.validateDeploymentConfig(f,e);let b;if(O(n)){let d=n.actionSteps.filter(p=>!!p);if(d.length===0)throw new u.NoEventActionStepsProvidedError;if(d.length>4)throw new u.TooManyEventActionStepsProvidedError;let i=Array.from({length:4},(p,c)=>d.at(c)||d.at(-1));b={actionClaimant:n.actionClaimant,actionStepOne:i[0],actionStepTwo:i[1],actionStepThree:i[2],actionStepFour:i[3]}}else b=n;return{abi:S.X,bytecode:J,args:[W(b)],...this.optionallyAttachAccount(a.account)}}isArraylikeIndexed(f,e){var n;return!!((f.actionParameter.fieldType===3||f.actionParameter.fieldType===2)&&((n=e.inputs[f.actionParameter.fieldIndex])!=null&&n.indexed))}};M.bases={...Q.EventAction},M.registryType=z.RegistryType.ACTION;let L=M;function d0(t){const f=[],e={};for(let n of t){const a=JSON.stringify(n);e[a]||(f.push(n),e[a]=!0)}return f}function C(t){return{...t,chainid:BigInt(t.chainid)}}function H(t){if(t.chainid>BigInt(Number.MAX_SAFE_INTEGER))throw new Error("Chain ID exceeds max safe integer");return{...t,chainid:Number(t.chainid)}}function W({actionClaimant:t,actionStepOne:f,actionStepTwo:e,actionStepThree:n,actionStepFour:a}){return y.encodeAbiParameters([{type:"tuple",name:"initPayload",components:[{type:"tuple",name:"actionClaimant",components:[{type:"uint8",name:"signatureType"},{type:"bytes32",name:"signature"},{type:"uint8",name:"fieldIndex"},{type:"address",name:"targetContract"},{type:"uint256",name:"chainid"}]},{type:"tuple",name:"actionStepOne",components:[{type:"bytes32",name:"signature"},{type:"uint8",name:"signatureType"},{type:"uint8",name:"actionType"},{type:"address",name:"targetContract"},{type:"uint256",name:"chainid"},{type:"tuple",name:"actionParameter",components:[{type:"uint8",name:"filterType"},{type:"uint8",name:"fieldType"},{type:"uint8",name:"fieldIndex"},{type:"bytes",name:"filterData"}]}]},{type:"tuple",name:"actionStepTwo",components:[{type:"bytes32",name:"signature"},{type:"uint8",name:"signatureType"},{type:"uint8",name:"actionType"},{type:"address",name:"targetContract"},{type:"uint256",name:"chainid"},{type:"tuple",name:"actionParameter",components:[{type:"uint8",name:"filterType"},{type:"uint8",name:"fieldType"},{type:"uint8",name:"fieldIndex"},{type:"bytes",name:"filterData"}]}]},{type:"tuple",name:"actionStepThree",components:[{type:"bytes32",name:"signature"},{type:"uint8",name:"signatureType"},{type:"uint8",name:"actionType"},{type:"address",name:"targetContract"},{type:"uint256",name:"chainid"},{type:"tuple",name:"actionParameter",components:[{type:"uint8",name:"filterType"},{type:"uint8",name:"fieldType"},{type:"uint8",name:"fieldIndex"},{type:"bytes",name:"filterData"}]}]},{type:"tuple",name:"actionStepFour",components:[{type:"bytes32",name:"signature"},{type:"uint8",name:"signatureType"},{type:"uint8",name:"actionType"},{type:"address",name:"targetContract"},{type:"uint256",name:"chainid"},{type:"tuple",name:"actionParameter",components:[{type:"uint8",name:"filterType"},{type:"uint8",name:"fieldType"},{type:"uint8",name:"fieldIndex"},{type:"bytes",name:"filterData"}]}]}]}],[{actionClaimant:C(t),actionStepOne:{...C(f),actionType:f.actionType||0},actionStepTwo:{...C(e),actionType:e.actionType||0},actionStepThree:{...C(n),actionType:n.actionType||0},actionStepFour:{...C(a),actionType:a.actionType||0}}])}exports.EventAction=L;exports.FilterType=G;exports.PrimitiveType=j;exports.SignatureType=K;exports.events=V;exports.functions=k;exports.isEventActionPayloadSimple=O;exports.prepareEventActionPayload=W;
|
|
2
|
-
//# sourceMappingURL=EventAction-d-oeqZQs.cjs.map
|