@boostxyz/sdk 1.1.0-alpha.22 → 1.1.0-alpha.23
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/Actions/Action.cjs +1 -1
- package/dist/Actions/Action.cjs.map +1 -1
- package/dist/Actions/Action.js +6 -6
- package/dist/Actions/EventAction.cjs +1 -1
- package/dist/Actions/EventAction.cjs.map +1 -1
- package/dist/Actions/EventAction.d.ts +9 -6
- package/dist/Actions/EventAction.d.ts.map +1 -1
- package/dist/Actions/EventAction.js +820 -15
- package/dist/Actions/EventAction.js.map +1 -1
- package/dist/AllowLists/AllowList.cjs +1 -1
- package/dist/AllowLists/AllowList.js +2 -2
- package/dist/AllowLists/OpenAllowList.d.ts +28 -28
- package/dist/AllowLists/SimpleAllowList.cjs +1 -1
- package/dist/AllowLists/SimpleAllowList.cjs.map +1 -1
- package/dist/AllowLists/SimpleAllowList.d.ts +28 -28
- package/dist/AllowLists/SimpleAllowList.d.ts.map +1 -1
- package/dist/AllowLists/SimpleAllowList.js +11 -10
- package/dist/AllowLists/SimpleAllowList.js.map +1 -1
- package/dist/AllowLists/SimpleDenyList.cjs +1 -1
- package/dist/AllowLists/SimpleDenyList.d.ts +28 -28
- package/dist/AllowLists/SimpleDenyList.d.ts.map +1 -1
- package/dist/AllowLists/SimpleDenyList.js +3 -3
- package/dist/Auth/PassthroughAuth.cjs +1 -1
- package/dist/Auth/PassthroughAuth.js +1 -1
- package/dist/BoostCore-Btl5BdAs.cjs +3 -0
- package/dist/BoostCore-Btl5BdAs.cjs.map +1 -0
- package/dist/{BoostCore-BVZExPPu.js → BoostCore-CD56zbYX.js} +1678 -499
- package/dist/BoostCore-CD56zbYX.js.map +1 -0
- package/dist/BoostCore.cjs +1 -1
- package/dist/BoostCore.d.ts +7 -7
- 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 +6 -6
- package/dist/BoostRegistry.d.ts.map +1 -1
- package/dist/BoostRegistry.js +50 -50
- package/dist/BoostRegistry.js.map +1 -1
- package/dist/Budgets/Budget.cjs +1 -1
- package/dist/Budgets/Budget.js +1 -1
- package/dist/Budgets/ManagedBudget.cjs +1 -1
- package/dist/Budgets/ManagedBudget.cjs.map +1 -1
- package/dist/Budgets/ManagedBudget.d.ts +28 -28
- package/dist/Budgets/ManagedBudget.d.ts.map +1 -1
- package/dist/Budgets/ManagedBudget.js +30 -29
- package/dist/Budgets/ManagedBudget.js.map +1 -1
- package/dist/Budgets/VestingBudget.d.ts +28 -28
- 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.cjs.map +1 -1
- package/dist/Deployable/DeployableTargetWithRBAC.d.ts +92 -23
- package/dist/Deployable/DeployableTargetWithRBAC.d.ts.map +1 -1
- package/dist/Deployable/DeployableTargetWithRBAC.js +145 -47
- package/dist/Deployable/DeployableTargetWithRBAC.js.map +1 -1
- package/dist/{Incentive-BhHaK3PZ.cjs → Incentive-CcnOIc8L.cjs} +2 -2
- package/dist/{Incentive-BhHaK3PZ.cjs.map → Incentive-CcnOIc8L.cjs.map} +1 -1
- package/dist/{Incentive-Cqg1w6wD.js → Incentive-rM5nKznp.js} +30 -29
- package/dist/{Incentive-Cqg1w6wD.js.map → Incentive-rM5nKznp.js.map} +1 -1
- package/dist/Incentives/AllowListIncentive.cjs +1 -1
- package/dist/Incentives/AllowListIncentive.cjs.map +1 -1
- package/dist/Incentives/AllowListIncentive.d.ts.map +1 -1
- package/dist/Incentives/AllowListIncentive.js +11 -10
- 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 +28 -28
- package/dist/Incentives/CGDAIncentive.d.ts.map +1 -1
- package/dist/Incentives/CGDAIncentive.js +12 -11
- package/dist/Incentives/CGDAIncentive.js.map +1 -1
- package/dist/Incentives/ERC1155Incentive.d.ts +28 -28
- 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 +34 -31
- package/dist/Incentives/ERC20Incentive.d.ts.map +1 -1
- package/dist/Incentives/ERC20Incentive.js +30 -27
- package/dist/Incentives/ERC20Incentive.js.map +1 -1
- package/dist/Incentives/ERC20VariableCriteriaIncentive.d.ts +28 -28
- package/dist/Incentives/ERC20VariableCriteriaIncentive.d.ts.map +1 -1
- package/dist/Incentives/ERC20VariableIncentive.d.ts +28 -28
- package/dist/Incentives/ERC20VariableIncentive.d.ts.map +1 -1
- package/dist/Incentives/Incentive.cjs +1 -1
- package/dist/Incentives/Incentive.js +2 -2
- package/dist/Incentives/PointsIncentive.cjs +1 -1
- package/dist/Incentives/PointsIncentive.cjs.map +1 -1
- package/dist/Incentives/PointsIncentive.d.ts.map +1 -1
- package/dist/Incentives/PointsIncentive.js +12 -11
- package/dist/Incentives/PointsIncentive.js.map +1 -1
- package/dist/{SimpleDenyList-CGaWjuld.js → SimpleDenyList-BDXpY74P.js} +18 -17
- package/dist/SimpleDenyList-BDXpY74P.js.map +1 -0
- package/dist/{SimpleDenyList-BUR17Tt1.cjs → SimpleDenyList-DNj5qDWM.cjs} +2 -2
- package/dist/SimpleDenyList-DNj5qDWM.cjs.map +1 -0
- package/dist/Validators/SignerValidator.cjs +1 -1
- package/dist/Validators/SignerValidator.cjs.map +1 -1
- package/dist/Validators/SignerValidator.d.ts.map +1 -1
- package/dist/Validators/SignerValidator.js +13 -12
- package/dist/Validators/SignerValidator.js.map +1 -1
- package/dist/Validators/Validator.cjs +1 -1
- package/dist/Validators/Validator.js +1 -1
- package/dist/deployments-DF_6-7hH.cjs +2 -0
- package/dist/deployments-DF_6-7hH.cjs.map +1 -0
- package/dist/deployments-fJsWblwS.js +56 -0
- package/dist/deployments-fJsWblwS.js.map +1 -0
- package/dist/deployments.json +26 -12
- package/dist/{generated-CKt2yCQd.js → generated-CsNyWPKA.js} +458 -443
- package/dist/generated-CsNyWPKA.js.map +1 -0
- package/dist/generated-DHerxf1y.cjs +3 -0
- package/dist/generated-DHerxf1y.cjs.map +1 -0
- package/dist/index.cjs +1 -1
- package/dist/index.js +33 -33
- package/package.json +4 -4
- package/src/Actions/EventAction.test.ts +19 -13
- package/src/Actions/EventAction.ts +16 -35
- package/src/AllowLists/SimpleAllowList.ts +1 -0
- package/src/AllowLists/SimpleDenyList.ts +1 -0
- package/src/BoostCore.test.ts +78 -78
- package/src/BoostCore.ts +19 -13
- package/src/BoostRegistry.ts +10 -10
- package/src/Budgets/ManagedBudget.test.ts +41 -17
- package/src/Budgets/ManagedBudget.ts +1 -11
- package/src/Budgets/VestingBudget.ts +3 -1
- package/src/Deployable/DeployableTargetWithRBAC.test.ts +103 -0
- package/src/Deployable/DeployableTargetWithRBAC.ts +160 -36
- package/src/Incentives/AllowListIncentive.test.ts +7 -7
- package/src/Incentives/AllowListIncentive.ts +1 -0
- package/src/Incentives/CGDAIncentive.ts +1 -0
- package/src/Incentives/ERC1155Incentive.ts +3 -1
- package/src/Incentives/ERC20Incentive.ts +10 -3
- package/src/Incentives/ERC20VariableCriteriaIncentive.ts +1 -0
- package/src/Incentives/ERC20VariableIncentive.ts +1 -0
- package/src/Incentives/PointsIncentive.ts +1 -0
- package/src/Validators/SignerValidator.ts +1 -0
- package/dist/BoostCore-BVZExPPu.js.map +0 -1
- package/dist/BoostCore-D-E-cnGI.cjs +0 -3
- package/dist/BoostCore-D-E-cnGI.cjs.map +0 -1
- package/dist/EventAction-BZt5cjbe.cjs +0 -2
- package/dist/EventAction-BZt5cjbe.cjs.map +0 -1
- package/dist/EventAction-C_-hJXWm.js +0 -1541
- package/dist/EventAction-C_-hJXWm.js.map +0 -1
- package/dist/SimpleDenyList-BUR17Tt1.cjs.map +0 -1
- package/dist/SimpleDenyList-CGaWjuld.js.map +0 -1
- package/dist/deployments-DVXioW2i.cjs +0 -2
- package/dist/deployments-DVXioW2i.cjs.map +0 -1
- package/dist/deployments-oykLv3_Z.js +0 -43
- package/dist/deployments-oykLv3_Z.js.map +0 -1
- package/dist/generated-CKt2yCQd.js.map +0 -1
- package/dist/generated-CyTNlOwM.cjs +0 -3
- package/dist/generated-CyTNlOwM.cjs.map +0 -1
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"BoostCore-CD56zbYX.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 31337: import.meta.env.VITE_ERC20_VARIABLE_CRITERIA_INCENTIVE_BASE,\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 * Builds the claim data for the ERC20VariableCriteriaIncentive.\n *\n * @public\n * @param {bigint} rewardAmount\n * @returns {Hex} Returns the encoded claim data\n * @description This function returns the encoded claim data for the ERC20VariableCriteriaIncentive.\n */\n public buildClaimData(rewardAmount: bigint) {\n return encodeAbiParameters(\n [{ type: 'uint256', name: 'rewardAmount' }],\n [rewardAmount],\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 readBoostCoreCreateBoostAuth,\n readBoostCoreGetBoost,\n readBoostCoreGetBoostCount,\n readBoostCoreProtocolFee,\n readBoostCoreProtocolFeeReceiver,\n readIAuthIsAuthorized,\n simulateBoostCoreClaimIncentive,\n simulateBoostCoreClaimIncentiveFor,\n simulateBoostCoreCreateBoost,\n simulateBoostCoreSetCreateBoostAuth,\n simulateBoostCoreSetProtocolFeeReceiver,\n writeBoostCoreClaimIncentive,\n writeBoostCoreClaimIncentiveFor,\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 type { SimulateContractReturnType } from '@wagmi/core/actions';\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 RawBoost,\n type Target,\n prepareBoostPayload,\n} from './Boost';\nimport { type Budget, budgetFromAddress } from './Budgets/Budget';\nimport {\n ManagedBudget,\n type ManagedBudgetPayload,\n} from './Budgets/ManagedBudget';\nimport {\n 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 BoostNotFoundError,\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 fixed addresses for the deployed Boost Core.\n * By default, `new BoostCore` will use the address deployed to the currently connected chain, or `BOOST_CORE_ADDRESS` if not provided.\n *\n * @type {Record<number, Address>}\n */\nexport const BOOST_CORE_ADDRESSES: Record<number, Address> = {\n 31337: import.meta.env.VITE_BOOST_CORE_ADDRESS,\n ...(BoostCoreBases as Record<number, Address>),\n};\n\n/**\n * The address of the deployed BoostCore instance. In prerelease mode, this will be its sepolia address\n *\n * @type {Address}\n */\nexport const BOOST_CORE_ADDRESS =\n BOOST_CORE_ADDRESSES[__DEFAULT_CHAIN_ID__ as unknown as number] ||\n zeroAddress;\n\n/**\n * A generic `viem.Log` event with support for `BoostCore` event types.\n *\n * @export\n * @typedef {BoostCoreLog}\n * @template {ContractEventName<typeof boostCoreAbi>} [event=ContractEventName<\n * typeof boostCoreAbi\n * >]\n */\nexport type BoostCoreLog<\n event extends ContractEventName<typeof boostCoreAbi> = ContractEventName<\n typeof boostCoreAbi\n >,\n> = GenericLog<typeof boostCoreAbi, event>;\n\n/**\n * Boost Core instantiation options for a custom deployed instance.\n *\n * @export\n * @interface BoostCoreDeployedOptions\n * @typedef {BoostCoreDeployedOptions}\n * @extends {DeployableOptions}\n */\nexport interface BoostCoreDeployedOptions extends DeployableOptions {\n /**\n * The address of a deployed, custom Boost Core contract.\n *\n * @type {?Address}\n */\n address?: Address;\n}\n\n/**\n * Typeguard to determine if a user is supplying a custom address for a Boost Core contract.\n *\n * @param {*} opts\n * @returns {opts is BoostCoreDeployedOptions}\n */\n// biome-ignore lint/suspicious/noExplicitAny: type guard\nfunction isBoostCoreDeployed(opts: any): opts is BoostCoreDeployedOptions {\n return opts.address;\n}\n\n/**\n * Boost Core instantiation options when a user intends to deploy a new instance of Boost Core, setting their own registry address and protocol fee receiver.\n *\n * @export\n * @interface BoostCoreOptionsWithPayload\n * @typedef {BoostCoreOptionsWithPayload}\n * @extends {DeployableOptions}\n */\nexport interface BoostCoreOptionsWithPayload extends DeployableOptions {\n /**\n * The address of a deployed Boost Registry contract.\n *\n * @type {Address}\n */\n registryAddress: Address;\n /**\n * The address to send fees.\n *\n * @type {Address}\n */\n protocolFeeReceiver: Address;\n}\n\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 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 /**\n * Create a new Boost.\n *\n * @public\n * @async\n * @param {CreateBoostPayload} _boostPayload\n * @param {?DeployableOptions} [_params]\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 const boostFactory = createWriteContract({\n abi: boostCoreAbi,\n functionName: 'createBoost',\n address: coreAddress,\n });\n\n const onChainPayload = await this.prepareCreateBoostPayload(\n coreAddress,\n chainId,\n payload,\n options,\n );\n\n console.log(onChainPayload);\n\n const boostHash = await boostFactory(options.config, {\n ...this.optionallyAttachAccount(options.account),\n // biome-ignore lint/suspicious/noExplicitAny: Accept any shape of valid wagmi/viem parameters, wagmi does the same thing internally\n ...(_params as any),\n chainId,\n args: [prepareBoostPayload(onChainPayload)],\n });\n const receipt = await waitForTransactionReceipt(options.config, {\n hash: boostHash,\n });\n const boostCreatedLog = parseEventLogs({\n abi: boostCoreAbi,\n eventName: 'BoostCreated',\n logs: receipt.logs,\n }).at(0);\n let boostId = 0n;\n if (!boostCreatedLog) throw new BoostCoreNoIdentifierEmitted();\n boostId = boostCreatedLog?.args.boostId;\n const boost = await this.readBoost(boostId);\n return new Boost({\n id: boostId,\n budget: payload.budget.at(boost.budget),\n action: payload.action.at(boost.action),\n validator: payload.validator!.at(boost.validator),\n allowList: payload.allowList!.at(boost.allowList),\n incentives: payload.incentives.map((incentive, i) =>\n // biome-ignore lint/style/noNonNullAssertion: this will never be undefined\n incentive.at(boost.incentives.at(i)!),\n ),\n protocolFee: boost.protocolFee,\n maxParticipants: boost.maxParticipants,\n owner: boost.owner,\n });\n }\n\n /**\n * Returns a simulated Boost creation.\n *\n * @public\n * @async\n * @param {CreateBoostPayload} _boostPayload\n * @param {?DeployableOptions} [_params]\n * @returns {Promise<SimulateContractReturnType>}\n */\n public async simulateCreateBoost(\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 const onChainPayload = await this.prepareCreateBoostPayload(\n coreAddress,\n chainId,\n payload,\n options,\n );\n\n return await simulateBoostCoreCreateBoost(this._config, {\n ...this.optionallyAttachAccount(),\n // biome-ignore lint/suspicious/noExplicitAny: Accept any shape of valid wagmi/viem parameters, wagmi does the same thing internally\n ...(_params as any),\n address: coreAddress,\n chainId,\n args: [prepareBoostPayload(onChainPayload)],\n });\n }\n\n // This function mutates payload, which isn't awesome but it's fine\n private async prepareCreateBoostPayload(\n coreAddress: Address,\n chainId: number,\n payload: CreateBoostPayload,\n options: DeployableOptions,\n ): Promise<Required<BoostPayload>> {\n if (!payload.owner) {\n payload.owner =\n this._account?.address ||\n getAccount(options.config).address ||\n zeroAddress;\n if (payload.owner === zeroAddress) {\n throw new DeployableUnknownOwnerProvidedError();\n }\n }\n\n if (!payload.validator) {\n payload.validator = this.SignerValidator({\n signers: [payload.owner],\n validatorCaller: coreAddress,\n });\n }\n\n let budgetPayload: BoostPayload['budget'] = zeroAddress;\n if (payload.budget.address) {\n budgetPayload = payload.budget.address;\n if (!(await payload.budget.isAuthorized(coreAddress))) {\n throw new BudgetMustAuthorizeBoostCore(coreAddress);\n }\n } else {\n throw new MustInitializeBudgetError();\n }\n\n // if we're supplying an address, it could be a pre-initialized target\n // if base is explicitly set to false, then it will not be initialized, and it will be referenced as is if it implements interface correctly\n let actionPayload: BoostPayload['action'] = {\n instance: zeroAddress,\n isBase: true,\n parameters: zeroHash,\n };\n if (payload.action.address) {\n const isBase = payload.action.isBase;\n actionPayload = {\n isBase: isBase,\n instance: payload.action.address,\n parameters: isBase\n ? payload.action.buildParameters(undefined, options).args.at(0) ||\n zeroHash\n : zeroHash,\n };\n } else {\n actionPayload.parameters =\n payload.action.buildParameters(undefined, options).args.at(0) ||\n zeroHash;\n actionPayload.instance = assertValidAddressByChainId(\n options.config,\n payload.action.bases,\n chainId,\n ).address;\n }\n\n let validatorPayload: BoostPayload['validator'] = {\n instance: zeroAddress,\n isBase: true,\n parameters: zeroHash,\n };\n if (payload.validator.address) {\n const isBase = payload.validator.isBase;\n validatorPayload = {\n isBase: isBase,\n instance: payload.validator.address,\n parameters: isBase\n ? payload.validator.buildParameters(undefined, options).args.at(0) ||\n zeroHash\n : zeroHash,\n };\n } else {\n validatorPayload.parameters =\n payload.validator.buildParameters(undefined, options).args.at(0) ||\n zeroHash;\n validatorPayload.instance = assertValidAddressByChainId(\n options.config,\n payload.validator.bases,\n chainId,\n ).address;\n }\n\n let allowListPayload: BoostPayload['allowList'] = {\n instance: zeroAddress,\n isBase: true,\n parameters: zeroHash,\n };\n // if allowlist not provided, assume open allowlist\n if (!payload.allowList) {\n payload.allowList = this.OpenAllowList();\n }\n if (payload.allowList.address) {\n const isBase = payload.allowList.isBase;\n allowListPayload = {\n isBase: isBase,\n instance: payload.allowList.address,\n parameters: isBase\n ? zeroHash // allowList.buildParameters(undefined, options).args.at(0) || zeroHash\n : zeroHash,\n };\n } else {\n allowListPayload.parameters =\n payload.allowList.buildParameters(undefined, options).args.at(0) ||\n zeroHash;\n allowListPayload.instance = assertValidAddressByChainId(\n options.config,\n payload.allowList.bases,\n chainId,\n ).address;\n }\n\n const incentivesPayloads: Array<Target> = payload.incentives.map(() => ({\n instance: zeroAddress,\n isBase: true,\n parameters: zeroHash,\n }));\n for (let i = 0; i < payload.incentives.length; i++) {\n // biome-ignore lint/style/noNonNullAssertion: this will never be undefined\n const incentive = payload.incentives.at(i)!;\n if (incentive.address) {\n const isBase = incentive.isBase;\n if (!isBase) throw new IncentiveNotCloneableError(incentive);\n incentivesPayloads[i] = {\n isBase: isBase,\n instance: incentive.address,\n parameters: isBase\n ? incentive.buildParameters(undefined, options).args.at(0) ||\n zeroHash\n : zeroHash,\n };\n } else {\n // biome-ignore lint/style/noNonNullAssertion: this will never be undefined\n incentivesPayloads[i]!.parameters =\n incentive.buildParameters(undefined, options).args.at(0) || zeroHash;\n // biome-ignore lint/style/noNonNullAssertion: this will never be undefined\n incentivesPayloads[i]!.instance = assertValidAddressByChainId(\n options.config,\n incentive.bases,\n chainId,\n ).address;\n }\n }\n\n const onChainPayload = {\n budget: budgetPayload,\n action: actionPayload,\n validator: validatorPayload,\n allowList: allowListPayload,\n incentives: incentivesPayloads,\n protocolFee: payload.protocolFee || 0n,\n maxParticipants: payload.maxParticipants || 0n,\n owner: payload.owner,\n };\n\n return onChainPayload;\n }\n\n /**\n * Claims one incentive from a given `Boost` by `boostId` and `incentiveId`\n *\n * @public\n * @async\n * @param {bigint} boostId\n * @param {bigint} incentiveId\n * @param {Address} address\n * @param {Hex} data\n * @param {?WriteParams} [params]\n * @returns {Promise<void>}\n */\n public async claimIncentive(\n boostId: bigint,\n incentiveId: bigint,\n address: Address,\n data: Hex,\n params?: WriteParams<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 | string} id\n * @param {?ReadParams} [params]\n * @returns {Promise<RawBoost>}\n * @throws {@link BoostNotFoundError}\n */\n public async readBoost(\n _id: string | bigint,\n params?: ReadParams<typeof boostCoreAbi, 'getBoost'>,\n ): Promise<RawBoost> {\n try {\n let id: bigint;\n if (typeof _id === 'string') {\n id = BigInt(_id);\n } else id = _id;\n return await readBoostCoreGetBoost(this._config, {\n ...assertValidAddressByChainId(\n this._config,\n this.addresses,\n params?.chainId,\n ),\n args: [id],\n ...this.optionallyAttachAccount(),\n // biome-ignore lint/suspicious/noExplicitAny: Accept any shape of valid wagmi/viem parameters, wagmi does the same thing internally\n ...(params as any),\n });\n // biome-ignore lint/suspicious/noExplicitAny: unknown error\n } catch (e: any) {\n if (e?.message?.includes('bounds'))\n throw new BoostNotFoundError(String(_id));\n throw e;\n }\n }\n\n /**\n * Get a Boost by index, will return a new {@link Boost} with correct target implementations instantiated, ie `(await core.getBoost(0n)).allowList instanceof SimpleAllowList` vs `SimpleDenyList`\n *\n * @public\n * @async\n * @param {(string | bigint)} _id\n * @param {?ReadParams} [params]\n * @returns {Promise<Boost>}\n * @throws {@link BoostNotFoundError}\n */\n public async getBoost(\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 { protocolFee, maxParticipants, owner, ...boostPayload } =\n await this.readBoost(id, params);\n const options: DeployableOptions = {\n config: this._config,\n account: this._account,\n };\n const [action, budget, validator, allowList, incentives] =\n await Promise.all([\n actionFromAddress(options, boostPayload.action),\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 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 * 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","IncentiveCriteriaNotFoundError","hash","criteria","transaction","getTransaction","SignatureType","logs","getTransactionReceipt","NoMatchingLogsError","eventAbi","events","decodedEvents","parseEventLogs","scalarValue","DecodedArgsError","e","func","functions","decodeFunctionData","InvalidCriteriaTypeError","_payload","_options","payload","bytecode","prepareERC20VariableCriteriaIncentivePayload","rewardAmount","encodeAbiParameters","ERC20VariableCriteriaIncentiveBases","ERC20VariableCriteriaIncentive","asset","reward","limit","BOOST_CORE_CLAIM_FEE","parseEther","BOOST_CORE_ADDRESSES","BoostCoreBases","BOOST_CORE_ADDRESS","zeroAddress","isBoostCoreDeployed","isBoostCoreDeployable","_BoostCore","Deployable","assertValidAddressByChainId","boostCoreAbi","_boostPayload","_params","desiredChainId","coreAddress","boostFactory","onChainPayload","boostHash","prepareBoostPayload","receipt","waitForTransactionReceipt","boostCreatedLog","boostId","BoostCoreNoIdentifierEmitted","boost","Boost","incentive","i","simulateBoostCoreCreateBoost","DeployableUnknownOwnerProvidedError","budgetPayload","BudgetMustAuthorizeBoostCore","MustInitializeBudgetError","actionPayload","zeroHash","isBase","validatorPayload","allowListPayload","incentivesPayloads","IncentiveNotCloneableError","incentiveId","data","referrer","simulateBoostCoreClaimIncentive","writeBoostCoreClaimIncentive","claimant","simulateBoostCoreClaimIncentiveFor","writeBoostCoreClaimIncentiveFor","_id","id","readBoostCoreGetBoost","BoostNotFoundError","protocolFee","maxParticipants","owner","boostPayload","budget","validator","allowList","incentives","actionFromAddress","budgetFromAddress","validatorFromAddress","allowListFromAddress","incentiveAddress","incentiveFromAddress","readBoostCoreGetBoostCount","auth","readIAuthIsAuthorized","readBoostCoreCreateBoostAuth","simulateBoostCoreSetCreateBoostAuth","writeBoostCoreSetCreateBoostAuth","readBoostCoreProtocolFee","readBoostCoreProtocolFeeReceiver","simulateBoostCoreSetProtocolFeeReceiver","writeBoostCoreSetProtocolFeeReceiver","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,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AAQ,KAAK,SAAS,SAAS,KAAK,SAAS;AAAA,MAC/CnK;AAAA,MACAgH;AAAA,IAAA;AAAA,EAEJ;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,EAcA,+BACEhH,GACAgH,GACA;AACA,WAAO,IAAIxC;AAAA,MACT,EAAE,QAAQ,KAAK,SAAS,SAAS,KAAK,SAAS;AAAA,MAC/CxE;AAAA,MACAgH;AAAA,IAAA;AAAA,EAEJ;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,EAcA,uBACEhH,GACAgH,GACA;AACA,WAAO,IAAIoD;AAAA,MACT,EAAE,QAAQ,KAAK,SAAS,SAAS,KAAK,SAAS;AAAA,MAC/CpK;AAAA,MACAgH;AAAA,IAAA;AAAA,EAEJ;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,EAUgB,gBACdhD,GACAC,GACyB;AACzB,UAAM,CAACC,GAASlE,CAAO,IAAI,KAAK;AAAA,MAC9BgE;AAAA,MACAC;AAAA,IAAA;AAEK,WAAA;AAAA,MACL,KAAKsB;AAAAA,MAAA,UACLpB;AAAAA,MACA,MAAMD;AAAA,MACN,GAAG,KAAK,wBAAwBlE,EAAQ,OAAO;AAAA,IAAA;AAAA,EAEnD;AACF;AAnpCEoF,EAAgB,YAAqCN;AAXhD,IAAMuF,IAANjF;","x_google_ignoreList":[0,1,2,3,4,5,6,7,8,9,10]}
|
package/dist/BoostCore.cjs
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const r=require("./generated-
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const r=require("./generated-DHerxf1y.cjs"),e=require("./BoostCore-Btl5BdAs.cjs");require("@wagmi/core");require("viem");require("./deployments-DF_6-7hH.cjs");require("./Actions/Action.cjs");require("./Actions/EventAction.cjs");require("./AllowLists/AllowList.cjs");require("./AllowLists/SimpleAllowList.cjs");require("./SimpleDenyList-DNj5qDWM.cjs");require("./Auth/PassthroughAuth.cjs");require("./Boost.cjs");require("./Budgets/Budget.cjs");require("./Budgets/ManagedBudget.cjs");require("./Deployable/Deployable.cjs");require("./Incentives/AllowListIncentive.cjs");require("./Incentives/CGDAIncentive.cjs");require("./Incentives/ERC20Incentive.cjs");require("./Incentive-CcnOIc8L.cjs");require("./Incentives/PointsIncentive.cjs");require("./Validators/SignerValidator.cjs");require("./Validators/Validator.cjs");require("./errors.cjs");require("./utils.cjs");exports.boostCoreAbi=r.T;exports.BOOST_CORE_ADDRESS=e.BOOST_CORE_ADDRESS;exports.BOOST_CORE_ADDRESSES=e.BOOST_CORE_ADDRESSES;exports.BOOST_CORE_CLAIM_FEE=e.BOOST_CORE_CLAIM_FEE;exports.BoostCore=e.BoostCore;
|
|
2
2
|
//# sourceMappingURL=BoostCore.cjs.map
|
package/dist/BoostCore.d.ts
CHANGED
|
@@ -34,12 +34,6 @@ export { boostCoreAbi };
|
|
|
34
34
|
* @type {bigint}
|
|
35
35
|
*/
|
|
36
36
|
export declare const BOOST_CORE_CLAIM_FEE: bigint;
|
|
37
|
-
/**
|
|
38
|
-
* The address of the deployed BoostCore instance. In prerelease mode, this will be its sepolia address
|
|
39
|
-
*
|
|
40
|
-
* @type {Address}
|
|
41
|
-
*/
|
|
42
|
-
export declare const BOOST_CORE_ADDRESS: `0x${string}`;
|
|
43
37
|
/**
|
|
44
38
|
* The fixed addresses for the deployed Boost Core.
|
|
45
39
|
* By default, `new BoostCore` will use the address deployed to the currently connected chain, or `BOOST_CORE_ADDRESS` if not provided.
|
|
@@ -47,6 +41,12 @@ export declare const BOOST_CORE_ADDRESS: `0x${string}`;
|
|
|
47
41
|
* @type {Record<number, Address>}
|
|
48
42
|
*/
|
|
49
43
|
export declare const BOOST_CORE_ADDRESSES: Record<number, Address>;
|
|
44
|
+
/**
|
|
45
|
+
* The address of the deployed BoostCore instance. In prerelease mode, this will be its sepolia address
|
|
46
|
+
*
|
|
47
|
+
* @type {Address}
|
|
48
|
+
*/
|
|
49
|
+
export declare const BOOST_CORE_ADDRESS: `0x${string}`;
|
|
50
50
|
/**
|
|
51
51
|
* A generic `viem.Log` event with support for `BoostCore` event types.
|
|
52
52
|
*
|
|
@@ -112,7 +112,7 @@ export type CreateBoostPayload = {
|
|
|
112
112
|
budget: Budget;
|
|
113
113
|
action: Action;
|
|
114
114
|
validator?: Validator;
|
|
115
|
-
allowList
|
|
115
|
+
allowList?: AllowList;
|
|
116
116
|
incentives: Array<Incentive>;
|
|
117
117
|
protocolFee?: bigint;
|
|
118
118
|
maxParticipants?: bigint;
|
package/dist/BoostCore.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"BoostCore.d.ts","sourceRoot":"","sources":["../src/BoostCore.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,YAAY,EACZ,KAAK,QAAQ,EAgBd,MAAM,eAAe,CAAC;AAEvB,OAAO,EACL,KAAK,+BAA+B,EAIrC,MAAM,aAAa,CAAC;AAGrB,OAAO,EACL,KAAK,OAAO,EACZ,KAAK,iBAAiB,EACtB,KAAK,GAAG,EAKT,MAAM,MAAM,CAAC;AAEd,OAAO,EAAE,KAAK,MAAM,EAAqB,MAAM,kBAAkB,CAAC;AAClE,OAAO,EAAE,WAAW,EAAE,KAAK,kBAAkB,EAAE,MAAM,uBAAuB,CAAC;AAC7E,OAAO,EAAE,KAAK,SAAS,EAAwB,MAAM,wBAAwB,CAAC;AAC9E,OAAO,EAAE,aAAa,EAAE,MAAM,4BAA4B,CAAC;AAC3D,OAAO,EACL,eAAe,EACf,KAAK,sBAAsB,EAC5B,MAAM,8BAA8B,CAAC;AACtC,OAAO,EACL,cAAc,EACd,KAAK,qBAAqB,EAC3B,MAAM,6BAA6B,CAAC;AACrC,OAAO,EAAE,KAAK,IAAI,EA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B;IAM/C;;;;;;;;;;;OAWG;IACH,eAAe,CACb,OAAO,EAAE,0BAA0B,CAAC,sBAAsB,CAAC,EAC3D,MAAM,CAAC,EAAE,OAAO;IASlB;;;;;;;;;;;SAWK;IACL,8BAA8B,CAC5B,OAAO,EAAE,0BAA0B,CAAC,qCAAqC,CAAC,EAC1E,MAAM,CAAC,EAAE,OAAO;IASlB;;;;;;;;;;;OAWG;IACH,sBAAsB,CACpB,OAAO,EAAE,0BAA0B,CAAC,6BAA6B,CAAC,EAClE,MAAM,CAAC,EAAE,OAAO;IASlB;;;;;;;OAOG;IACa,eAAe,CAC7B,QAAQ,CAAC,EAAE,CAAC,OAAO,EAAE,OAAO,CAAC,EAC7B,QAAQ,CAAC,EAAE,iBAAiB,GAC3B,uBAAuB;CAY3B"}
|
package/dist/BoostCore.js
CHANGED
|
@@ -1,13 +1,13 @@
|
|
|
1
|
-
import { T as I } from "./generated-
|
|
2
|
-
import {
|
|
1
|
+
import { T as I } from "./generated-CsNyWPKA.js";
|
|
2
|
+
import { b as M, a as d, B as g, c as h } from "./BoostCore-CD56zbYX.js";
|
|
3
3
|
import "@wagmi/core";
|
|
4
4
|
import "viem";
|
|
5
|
-
import "./deployments-
|
|
5
|
+
import "./deployments-fJsWblwS.js";
|
|
6
6
|
import "./Actions/Action.js";
|
|
7
|
-
import "./EventAction
|
|
7
|
+
import "./Actions/EventAction.js";
|
|
8
8
|
import "./AllowLists/AllowList.js";
|
|
9
9
|
import "./AllowLists/SimpleAllowList.js";
|
|
10
|
-
import "./SimpleDenyList-
|
|
10
|
+
import "./SimpleDenyList-BDXpY74P.js";
|
|
11
11
|
import "./Auth/PassthroughAuth.js";
|
|
12
12
|
import "./Boost.js";
|
|
13
13
|
import "./Budgets/Budget.js";
|
|
@@ -16,7 +16,7 @@ import "./Deployable/Deployable.js";
|
|
|
16
16
|
import "./Incentives/AllowListIncentive.js";
|
|
17
17
|
import "./Incentives/CGDAIncentive.js";
|
|
18
18
|
import "./Incentives/ERC20Incentive.js";
|
|
19
|
-
import "./Incentive-
|
|
19
|
+
import "./Incentive-rM5nKznp.js";
|
|
20
20
|
import "./Incentives/PointsIncentive.js";
|
|
21
21
|
import "./Validators/SignerValidator.js";
|
|
22
22
|
import "./Validators/Validator.js";
|
package/dist/BoostRegistry.cjs
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const t=require("./generated-CyTNlOwM.cjs"),A=require("viem"),g=require("./deployments-DVXioW2i.cjs"),_=require("./Deployable/Deployable.cjs"),a=require("./utils.cjs"),I="0x6080604052348015600e575f80fd5b50611bc78061001c5f395ff3fe608060405234801561000f575f80fd5b5060043610610086575f3560e01c8063acc83fc811610059578063acc83fc81461014a578063d12dd4811461017a578063f166879214610196578063fd97064b146101c657610086565b806301ffc9a71461008a5780633aaf1626146100ba578063792aa01c146100ea57806383f388591461011a575b5f80fd5b6100a4600480360381019061009f9190610e87565b6101f6565b6040516100b19190610ecc565b60405180910390f35b6100d460048036038101906100cf9190610f18565b61026f565b6040516100e19190611120565b60405180910390f35b61010460048036038101906100ff919061116a565b610481565b604051610111919061124c565b60405180910390f35b610134600480360381019061012f9190610f18565b610514565b604051610141919061127b565b60405180910390f35b610164600480360381019061015f9190611318565b6105bc565b60405161017191906113ab565b60405180910390f35b610194600480360381019061018f91906113c4565b6105fe565b005b6101b060048036038101906101ab9190611435565b610828565b6040516101bd91906113ab565b60405180910390f35b6101e060048036038101906101db91906114e7565b610864565b6040516101ed919061127b565b60405180910390f35b5f7fb09d9d54000000000000000000000000000000000000000000000000000000007bffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916827bffffffffffffffffffffffffffffffffffffffffffffffffffffffff19161480610268575061026782610c2c565b5b9050919050565b610277610dc7565b60015f8381526020019081526020015f206040518060800160405290815f82015f9054906101000a900460ff1660048111156102b6576102b5610f43565b5b60048111156102c8576102c7610f43565b5b81526020015f820160019054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001600182015f9054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001600282018054610386906115b7565b80601f01602080910402602001604051908101604052809291908181526020018280546103b2906115b7565b80156103fd5780601f106103d4576101008083540402835291602001916103fd565b820191905f5260205f20905b8154815290600101906020018083116103e057829003601f168201915b50505050508152505090505f73ffffffffffffffffffffffffffffffffffffffff16816020015173ffffffffffffffffffffffffffffffffffffffff160361047c57816040517f8cc00d1600000000000000000000000000000000000000000000000000000000815260040161047391906113ab565b60405180910390fd5b919050565b606060025f8373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020015f2080548060200260200160405190810160405280929190818152602001828054801561050857602002820191905f5260205f20905b8154815260200190600101908083116104f4575b50505050509050919050565b5f805f8381526020019081526020015f205f9054906101000a900473ffffffffffffffffffffffffffffffffffffffff1690505f73ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff16036105b757816040517f8cc00d160000000000000000000000000000000000000000000000000000000081526004016105ae91906113ab565b60405180910390fd5b919050565b5f6105f386868686866040516020016105d89493929190611668565b60405160208183030381529060405280519060200120610c95565b905095945050505050565b808073ffffffffffffffffffffffffffffffffffffffff166301ffc9a77f6ab67a0d000000000000000000000000000000000000000000000000000000006040518263ffffffff1660e01b815260040161065891906116b1565b602060405180830381865afa158015610673573d5f803e3d5ffd5b505050506040513d601f19601f8201168201806040525081019061069791906116f4565b6106d857806040517f903b13fd0000000000000000000000000000000000000000000000000000000081526004016106cf919061172e565b60405180910390fd5b5f6106e4868686610828565b90505f73ffffffffffffffffffffffffffffffffffffffff165f808381526020019081526020015f205f9054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16146107875785816040517f96b5684c00000000000000000000000000000000000000000000000000000000815260040161077e929190611756565b60405180910390fd5b825f808381526020019081526020015f205f6101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff160217905550808660048111156107e9576107e8610f43565b5b7f660d31df25c96b8a337fcf12a56b7363e5a997639db853d5dbaec7c01f31bd8085604051610818919061172e565b60405180910390a3505050505050565b5f61085b84848460405160200161084092919061177d565b60405160208183030381529060405280519060200120610c95565b90509392505050565b5f3068929eee149b4bd2126854036108835763ab143c065f526004601cfd5b3068929eee149b4bd212685561092b87878787336040516020016108ab9594939291906117c9565b6040516020818303038152906040528051906020012084848080601f0160208091040260200160405190810160405280939291908181526020018383808284375f81840152601f19601f820116905080830192505050505050508873ffffffffffffffffffffffffffffffffffffffff16610cc79092919063ffffffff16565b90505f61093b88883389896105bc565b90505f73ffffffffffffffffffffffffffffffffffffffff1660015f8381526020019081526020015f205f0160019054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16146109e25787816040517f96b5684c0000000000000000000000000000000000000000000000000000000081526004016109d9929190611756565b60405180910390fd5b60025f3373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020015f2081908060018154018082558091505060019003905f5260205f20015f90919091909150556040518060800160405280896004811115610a6157610a60610f43565b5b81526020018373ffffffffffffffffffffffffffffffffffffffff1681526020013373ffffffffffffffffffffffffffffffffffffffff16815260200187878080601f0160208091040260200160405190810160405280939291908181526020018383808284375f81840152601f19601f8201169050808301925050505050505081525060015f8381526020019081526020015f205f820151815f015f6101000a81548160ff02191690836004811115610b1e57610b1d610f43565b5b02179055506020820151815f0160016101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff1602179055506040820151816001015f6101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff1602179055506060820151816002019081610bc491906119de565b5090505080886004811115610bdc57610bdb610f43565b5b7f2348fcdb9847b17a183e53aa32c0c5c76afdef8fcb14bb51f216c6611701ab1a8985604051610c0d929190611aad565b60405180910390a3503868929eee149b4bd21268559695505050505050565b5f7f01ffc9a7000000000000000000000000000000000000000000000000000000007bffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916827bffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916149050919050565b5f8282604051602001610ca9929190611af4565b60405160208183030381529060405280519060200120905092915050565b5f610cf1838573ffffffffffffffffffffffffffffffffffffffff16610d6090919063ffffffff16565b90508073ffffffffffffffffffffffffffffffffffffffff1663439fab91836040518263ffffffff1660e01b8152600401610d2c9190611b71565b5f604051808303815f87803b158015610d43575f80fd5b505af1158015610d55573d5f803e3d5ffd5b505050509392505050565b5f610d6c5f8484610d74565b905092915050565b5f6c5af43d3d93803e602a57fd5bf36021528260145273602c3d8160093d39f33d3d3d3d363d3d37363d735f52816035600c86f5905080610dbc5763301164255f526004601cfd5b5f6021529392505050565b60405180608001604052805f6004811115610de557610de4610f43565b5b81526020015f73ffffffffffffffffffffffffffffffffffffffff1681526020015f73ffffffffffffffffffffffffffffffffffffffff168152602001606081525090565b5f80fd5b5f80fd5b5f7fffffffff0000000000000000000000000000000000000000000000000000000082169050919050565b610e6681610e32565b8114610e70575f80fd5b50565b5f81359050610e8181610e5d565b92915050565b5f60208284031215610e9c57610e9b610e2a565b5b5f610ea984828501610e73565b91505092915050565b5f8115159050919050565b610ec681610eb2565b82525050565b5f602082019050610edf5f830184610ebd565b92915050565b5f819050919050565b610ef781610ee5565b8114610f01575f80fd5b50565b5f81359050610f1281610eee565b92915050565b5f60208284031215610f2d57610f2c610e2a565b5b5f610f3a84828501610f04565b91505092915050565b7f4e487b71000000000000000000000000000000000000000000000000000000005f52602160045260245ffd5b60058110610f8157610f80610f43565b5b50565b5f819050610f9182610f70565b919050565b5f610fa082610f84565b9050919050565b610fb081610f96565b82525050565b5f73ffffffffffffffffffffffffffffffffffffffff82169050919050565b5f819050919050565b5f610ff8610ff3610fee84610fb6565b610fd5565b610fb6565b9050919050565b5f61100982610fde565b9050919050565b5f61101a82610fff565b9050919050565b61102a81611010565b82525050565b5f61103a82610fb6565b9050919050565b61104a81611030565b82525050565b5f81519050919050565b5f82825260208201905092915050565b8281835e5f83830152505050565b5f601f19601f8301169050919050565b5f61109282611050565b61109c818561105a565b93506110ac81856020860161106a565b6110b581611078565b840191505092915050565b5f608083015f8301516110d55f860182610fa7565b5060208301516110e86020860182611021565b5060408301516110fb6040860182611041565b50606083015184820360608601526111138282611088565b9150508091505092915050565b5f6020820190508181035f83015261113881846110c0565b905092915050565b61114981611030565b8114611153575f80fd5b50565b5f8135905061116481611140565b92915050565b5f6020828403121561117f5761117e610e2a565b5b5f61118c84828501611156565b91505092915050565b5f81519050919050565b5f82825260208201905092915050565b5f819050602082019050919050565b6111c781610ee5565b82525050565b5f6111d883836111be565b60208301905092915050565b5f602082019050919050565b5f6111fa82611195565b611204818561119f565b935061120f836111af565b805f5b8381101561123f57815161122688826111cd565b9750611231836111e4565b925050600181019050611212565b5085935050505092915050565b5f6020820190508181035f83015261126481846111f0565b905092915050565b61127581611010565b82525050565b5f60208201905061128e5f83018461126c565b92915050565b600581106112a0575f80fd5b50565b5f813590506112b181611294565b92915050565b5f80fd5b5f80fd5b5f80fd5b5f8083601f8401126112d8576112d76112b7565b5b8235905067ffffffffffffffff8111156112f5576112f46112bb565b5b602083019150836001820283011115611311576113106112bf565b5b9250929050565b5f805f805f6080868803121561133157611330610e2a565b5b5f61133e888289016112a3565b955050602061134f88828901611156565b945050604061136088828901611156565b935050606086013567ffffffffffffffff81111561138157611380610e2e565b5b61138d888289016112c3565b92509250509295509295909350565b6113a581610ee5565b82525050565b5f6020820190506113be5f83018461139c565b92915050565b5f805f80606085870312156113dc576113db610e2a565b5b5f6113e9878288016112a3565b945050602085013567ffffffffffffffff81111561140a57611409610e2e565b5b611416878288016112c3565b9350935050604061142987828801611156565b91505092959194509250565b5f805f6040848603121561144c5761144b610e2a565b5b5f611459868287016112a3565b935050602084013567ffffffffffffffff81111561147a57611479610e2e565b5b611486868287016112c3565b92509250509250925092565b5f8083601f8401126114a7576114a66112b7565b5b8235905067ffffffffffffffff8111156114c4576114c36112bb565b5b6020830191508360018202830111156114e0576114df6112bf565b5b9250929050565b5f805f805f806080878903121561150157611500610e2a565b5b5f61150e89828a016112a3565b965050602061151f89828a01611156565b955050604087013567ffffffffffffffff8111156115405761153f610e2e565b5b61154c89828a016112c3565b9450945050606087013567ffffffffffffffff81111561156f5761156e610e2e565b5b61157b89828a01611492565b92509250509295509295509295565b7f4e487b71000000000000000000000000000000000000000000000000000000005f52602260045260245ffd5b5f60028204905060018216806115ce57607f821691505b6020821081036115e1576115e061158a565b5b50919050565b5f8160601b9050919050565b5f6115fd826115e7565b9050919050565b5f61160e826115f3565b9050919050565b61162661162182611030565b611604565b82525050565b5f81905092915050565b828183375f83830152505050565b5f61164f838561162c565b935061165c838584611636565b82840190509392505050565b5f6116738287611615565b6014820191506116838286611615565b601482019150611694828486611644565b915081905095945050505050565b6116ab81610e32565b82525050565b5f6020820190506116c45f8301846116a2565b92915050565b6116d381610eb2565b81146116dd575f80fd5b50565b5f815190506116ee816116ca565b92915050565b5f6020828403121561170957611708610e2a565b5b5f611716848285016116e0565b91505092915050565b61172881611030565b82525050565b5f6020820190506117415f83018461171f565b92915050565b61175081610f96565b82525050565b5f6040820190506117695f830185611747565b611776602083018461139c565b9392505050565b5f611789828486611644565b91508190509392505050565b5f8160f81b9050919050565b5f6117ab82611795565b9050919050565b6117c36117be82610f96565b6117a1565b82525050565b5f6117d482886117b2565b6001820191506117e48287611615565b6014820191506117f5828587611644565b91506118018284611615565b6014820191508190509695505050505050565b7f4e487b71000000000000000000000000000000000000000000000000000000005f52604160045260245ffd5b5f819050815f5260205f209050919050565b5f6020601f8301049050919050565b5f82821b905092915050565b5f6008830261189d7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff82611862565b6118a78683611862565b95508019841693508086168417925050509392505050565b5f819050919050565b5f6118e26118dd6118d8846118bf565b610fd5565b6118bf565b9050919050565b5f819050919050565b6118fb836118c8565b61190f611907826118e9565b84845461186e565b825550505050565b5f90565b611923611917565b61192e8184846118f2565b505050565b5b81811015611951576119465f8261191b565b600181019050611934565b5050565b601f8211156119965761196781611841565b61197084611853565b8101602085101561197f578190505b61199361198b85611853565b830182611933565b50505b505050565b5f82821c905092915050565b5f6119b65f198460080261199b565b1980831691505092915050565b5f6119ce83836119a7565b9150826002028217905092915050565b6119e782611050565b67ffffffffffffffff811115611a00576119ff611814565b5b611a0a82546115b7565b611a15828285611955565b5f60209050601f831160018114611a46575f8415611a34578287015190505b611a3e85826119c3565b865550611aa5565b601f198416611a5486611841565b5f5b82811015611a7b57848901518255600182019150602085019450602081019050611a56565b86831015611a985784890151611a94601f8916826119a7565b8355505b6001600288020188555050505b505050505050565b5f604082019050611ac05f83018561171f565b611acd602083018461126c565b9392505050565b5f819050919050565b611aee611ae982610ee5565b611ad4565b82525050565b5f611aff82856117b2565b600182019150611b0f8284611add565b6020820191508190509392505050565b5f81519050919050565b5f82825260208201905092915050565b5f611b4382611b1f565b611b4d8185611b29565b9350611b5d81856020860161106a565b611b6681611078565b840191505092915050565b5f6020820190508181035f830152611b898184611b39565b90509291505056fea26469706673582212204daf6f75f116e42e1398ed46c96f8a904f8674e8ecc760dd4700af150affefe664736f6c634300081a0033",R=g.BoostRegistry[11155111],o={...g.BoostRegistry,31337:void 0};function w(i){return i.address&&A.isAddress(i.address)}function S(i){return i.address===null}const l=class l extends _.Deployable{get addresses(){return this.constructor.addresses}constructor({config:e,account:f,...b}){if(w(b)&&b.address)super({account:f,config:e},b.address);else if(S(b))super({account:f,config:e},[]);else{const{address:d}=a.assertValidAddressByChainId(e,o);super({account:f,config:e},d)}}async register(e,f,b,d){return await this.awaitResult(this.registerRaw(e,f,b,d))}async registerRaw(e,f,b,d){var n;const{request:c,result:s}=await t.em(this._config,{...a.assertValidAddressByChainId(this._config,this.addresses,((n=d==null?void 0:d.chain)==null?void 0:n.id)||(d==null?void 0:d.chainId)),args:[e,f,b],...this.optionallyAttachAccount(),...d});return{hash:await t.Kc(this._config,c),result:s}}initialize(e,f,b){return this.clone(e,f,b)}async initializeRaw(e,f,b){const{hash:d,result:c}=await this.deployCloneRaw(e,f,b);return{hash:d,result:c,target:f.at(c)}}async clone(e,f,b){const d=await this.deployClone(e,f,b);return f.at(d)}async deployClone(e,f,b){return await this.awaitResult(this.deployCloneRaw(e,f,b))}async deployCloneRaw(e,f,b){var u,y;const d=f.buildParameters(void 0,{config:this._config,account:this._account}),{address:c}=a.assertValidAddressByChainId(this._config,f.bases,((u=b==null?void 0:b.chain)==null?void 0:u.id)||(b==null?void 0:b.chainId)),{request:s,result:r}=await t.Yc(this._config,{...a.assertValidAddressByChainId(this._config,this.addresses,((y=b==null?void 0:b.chain)==null?void 0:y.id)||(b==null?void 0:b.chainId)),args:[f.registryType,c,e,d.args[0]],...this.optionallyAttachAccount(),...b});return{hash:await t.Jc(this._config,s),result:r}}async getBaseImplementation(e,f){return await t.Uc(this._config,{...a.assertValidAddressByChainId(this._config,this.addresses,f==null?void 0:f.chainId),args:[e],...this.optionallyAttachAccount(),...f})}async getClone(e,f){return await t.Gc(this._config,{...a.assertValidAddressByChainId(this._config,this.addresses,f==null?void 0:f.chainId),args:[e],...this.optionallyAttachAccount(),...f})}async getClones(e,f){return await t.jc(this._config,{...a.assertValidAddressByChainId(this._config,this.addresses,f==null?void 0:f.chainId),args:[e],...this.optionallyAttachAccount(),...f})}async getCloneIdentifier(e,f,b,d,c){return await t.Zc(this._config,{...a.assertValidAddressByChainId(this._config,this.addresses,c==null?void 0:c.chainId),args:[e,f,b,d],...this.optionallyAttachAccount(),...c})}async getIdentifier(e,f,b){return await t.Zc(this._config,{...a.assertValidAddressByChainId(this._config,this.addresses,b==null?void 0:b.chainId),args:[e,f],...this.optionallyAttachAccount(),...b})}buildParameters(e,f){const[,b]=this.validateDeploymentConfig([],f);return{abi:t.ie,bytecode:I,args:[],...this.optionallyAttachAccount(b.account)}}};l.addresses=o;let h=l;exports.boostRegistryAbi=t.ie;exports.BOOST_REGISTRY_ADDRESS=R;exports.BOOST_REGISTRY_ADDRESSES=o;exports.BoostRegistry=h;
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const a=require("./generated-DHerxf1y.cjs"),g=require("viem"),A=require("./deployments-DF_6-7hH.cjs"),_=require("./Deployable/Deployable.cjs"),t=require("./utils.cjs"),I="0x6080604052348015600e575f80fd5b50611bc78061001c5f395ff3fe608060405234801561000f575f80fd5b5060043610610086575f3560e01c8063acc83fc811610059578063acc83fc81461014a578063d12dd4811461017a578063f166879214610196578063fd97064b146101c657610086565b806301ffc9a71461008a5780633aaf1626146100ba578063792aa01c146100ea57806383f388591461011a575b5f80fd5b6100a4600480360381019061009f9190610e87565b6101f6565b6040516100b19190610ecc565b60405180910390f35b6100d460048036038101906100cf9190610f18565b61026f565b6040516100e19190611120565b60405180910390f35b61010460048036038101906100ff919061116a565b610481565b604051610111919061124c565b60405180910390f35b610134600480360381019061012f9190610f18565b610514565b604051610141919061127b565b60405180910390f35b610164600480360381019061015f9190611318565b6105bc565b60405161017191906113ab565b60405180910390f35b610194600480360381019061018f91906113c4565b6105fe565b005b6101b060048036038101906101ab9190611435565b610828565b6040516101bd91906113ab565b60405180910390f35b6101e060048036038101906101db91906114e7565b610864565b6040516101ed919061127b565b60405180910390f35b5f7fb09d9d54000000000000000000000000000000000000000000000000000000007bffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916827bffffffffffffffffffffffffffffffffffffffffffffffffffffffff19161480610268575061026782610c2c565b5b9050919050565b610277610dc7565b60015f8381526020019081526020015f206040518060800160405290815f82015f9054906101000a900460ff1660048111156102b6576102b5610f43565b5b60048111156102c8576102c7610f43565b5b81526020015f820160019054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001600182015f9054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001600282018054610386906115b7565b80601f01602080910402602001604051908101604052809291908181526020018280546103b2906115b7565b80156103fd5780601f106103d4576101008083540402835291602001916103fd565b820191905f5260205f20905b8154815290600101906020018083116103e057829003601f168201915b50505050508152505090505f73ffffffffffffffffffffffffffffffffffffffff16816020015173ffffffffffffffffffffffffffffffffffffffff160361047c57816040517f8cc00d1600000000000000000000000000000000000000000000000000000000815260040161047391906113ab565b60405180910390fd5b919050565b606060025f8373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020015f2080548060200260200160405190810160405280929190818152602001828054801561050857602002820191905f5260205f20905b8154815260200190600101908083116104f4575b50505050509050919050565b5f805f8381526020019081526020015f205f9054906101000a900473ffffffffffffffffffffffffffffffffffffffff1690505f73ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff16036105b757816040517f8cc00d160000000000000000000000000000000000000000000000000000000081526004016105ae91906113ab565b60405180910390fd5b919050565b5f6105f386868686866040516020016105d89493929190611668565b60405160208183030381529060405280519060200120610c95565b905095945050505050565b808073ffffffffffffffffffffffffffffffffffffffff166301ffc9a77f6ab67a0d000000000000000000000000000000000000000000000000000000006040518263ffffffff1660e01b815260040161065891906116b1565b602060405180830381865afa158015610673573d5f803e3d5ffd5b505050506040513d601f19601f8201168201806040525081019061069791906116f4565b6106d857806040517f903b13fd0000000000000000000000000000000000000000000000000000000081526004016106cf919061172e565b60405180910390fd5b5f6106e4868686610828565b90505f73ffffffffffffffffffffffffffffffffffffffff165f808381526020019081526020015f205f9054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16146107875785816040517f96b5684c00000000000000000000000000000000000000000000000000000000815260040161077e929190611756565b60405180910390fd5b825f808381526020019081526020015f205f6101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff160217905550808660048111156107e9576107e8610f43565b5b7f660d31df25c96b8a337fcf12a56b7363e5a997639db853d5dbaec7c01f31bd8085604051610818919061172e565b60405180910390a3505050505050565b5f61085b84848460405160200161084092919061177d565b60405160208183030381529060405280519060200120610c95565b90509392505050565b5f3068929eee149b4bd2126854036108835763ab143c065f526004601cfd5b3068929eee149b4bd212685561092b87878787336040516020016108ab9594939291906117c9565b6040516020818303038152906040528051906020012084848080601f0160208091040260200160405190810160405280939291908181526020018383808284375f81840152601f19601f820116905080830192505050505050508873ffffffffffffffffffffffffffffffffffffffff16610cc79092919063ffffffff16565b90505f61093b88883389896105bc565b90505f73ffffffffffffffffffffffffffffffffffffffff1660015f8381526020019081526020015f205f0160019054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16146109e25787816040517f96b5684c0000000000000000000000000000000000000000000000000000000081526004016109d9929190611756565b60405180910390fd5b60025f3373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020015f2081908060018154018082558091505060019003905f5260205f20015f90919091909150556040518060800160405280896004811115610a6157610a60610f43565b5b81526020018373ffffffffffffffffffffffffffffffffffffffff1681526020013373ffffffffffffffffffffffffffffffffffffffff16815260200187878080601f0160208091040260200160405190810160405280939291908181526020018383808284375f81840152601f19601f8201169050808301925050505050505081525060015f8381526020019081526020015f205f820151815f015f6101000a81548160ff02191690836004811115610b1e57610b1d610f43565b5b02179055506020820151815f0160016101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff1602179055506040820151816001015f6101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff1602179055506060820151816002019081610bc491906119de565b5090505080886004811115610bdc57610bdb610f43565b5b7f2348fcdb9847b17a183e53aa32c0c5c76afdef8fcb14bb51f216c6611701ab1a8985604051610c0d929190611aad565b60405180910390a3503868929eee149b4bd21268559695505050505050565b5f7f01ffc9a7000000000000000000000000000000000000000000000000000000007bffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916827bffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916149050919050565b5f8282604051602001610ca9929190611af4565b60405160208183030381529060405280519060200120905092915050565b5f610cf1838573ffffffffffffffffffffffffffffffffffffffff16610d6090919063ffffffff16565b90508073ffffffffffffffffffffffffffffffffffffffff1663439fab91836040518263ffffffff1660e01b8152600401610d2c9190611b71565b5f604051808303815f87803b158015610d43575f80fd5b505af1158015610d55573d5f803e3d5ffd5b505050509392505050565b5f610d6c5f8484610d74565b905092915050565b5f6c5af43d3d93803e602a57fd5bf36021528260145273602c3d8160093d39f33d3d3d3d363d3d37363d735f52816035600c86f5905080610dbc5763301164255f526004601cfd5b5f6021529392505050565b60405180608001604052805f6004811115610de557610de4610f43565b5b81526020015f73ffffffffffffffffffffffffffffffffffffffff1681526020015f73ffffffffffffffffffffffffffffffffffffffff168152602001606081525090565b5f80fd5b5f80fd5b5f7fffffffff0000000000000000000000000000000000000000000000000000000082169050919050565b610e6681610e32565b8114610e70575f80fd5b50565b5f81359050610e8181610e5d565b92915050565b5f60208284031215610e9c57610e9b610e2a565b5b5f610ea984828501610e73565b91505092915050565b5f8115159050919050565b610ec681610eb2565b82525050565b5f602082019050610edf5f830184610ebd565b92915050565b5f819050919050565b610ef781610ee5565b8114610f01575f80fd5b50565b5f81359050610f1281610eee565b92915050565b5f60208284031215610f2d57610f2c610e2a565b5b5f610f3a84828501610f04565b91505092915050565b7f4e487b71000000000000000000000000000000000000000000000000000000005f52602160045260245ffd5b60058110610f8157610f80610f43565b5b50565b5f819050610f9182610f70565b919050565b5f610fa082610f84565b9050919050565b610fb081610f96565b82525050565b5f73ffffffffffffffffffffffffffffffffffffffff82169050919050565b5f819050919050565b5f610ff8610ff3610fee84610fb6565b610fd5565b610fb6565b9050919050565b5f61100982610fde565b9050919050565b5f61101a82610fff565b9050919050565b61102a81611010565b82525050565b5f61103a82610fb6565b9050919050565b61104a81611030565b82525050565b5f81519050919050565b5f82825260208201905092915050565b8281835e5f83830152505050565b5f601f19601f8301169050919050565b5f61109282611050565b61109c818561105a565b93506110ac81856020860161106a565b6110b581611078565b840191505092915050565b5f608083015f8301516110d55f860182610fa7565b5060208301516110e86020860182611021565b5060408301516110fb6040860182611041565b50606083015184820360608601526111138282611088565b9150508091505092915050565b5f6020820190508181035f83015261113881846110c0565b905092915050565b61114981611030565b8114611153575f80fd5b50565b5f8135905061116481611140565b92915050565b5f6020828403121561117f5761117e610e2a565b5b5f61118c84828501611156565b91505092915050565b5f81519050919050565b5f82825260208201905092915050565b5f819050602082019050919050565b6111c781610ee5565b82525050565b5f6111d883836111be565b60208301905092915050565b5f602082019050919050565b5f6111fa82611195565b611204818561119f565b935061120f836111af565b805f5b8381101561123f57815161122688826111cd565b9750611231836111e4565b925050600181019050611212565b5085935050505092915050565b5f6020820190508181035f83015261126481846111f0565b905092915050565b61127581611010565b82525050565b5f60208201905061128e5f83018461126c565b92915050565b600581106112a0575f80fd5b50565b5f813590506112b181611294565b92915050565b5f80fd5b5f80fd5b5f80fd5b5f8083601f8401126112d8576112d76112b7565b5b8235905067ffffffffffffffff8111156112f5576112f46112bb565b5b602083019150836001820283011115611311576113106112bf565b5b9250929050565b5f805f805f6080868803121561133157611330610e2a565b5b5f61133e888289016112a3565b955050602061134f88828901611156565b945050604061136088828901611156565b935050606086013567ffffffffffffffff81111561138157611380610e2e565b5b61138d888289016112c3565b92509250509295509295909350565b6113a581610ee5565b82525050565b5f6020820190506113be5f83018461139c565b92915050565b5f805f80606085870312156113dc576113db610e2a565b5b5f6113e9878288016112a3565b945050602085013567ffffffffffffffff81111561140a57611409610e2e565b5b611416878288016112c3565b9350935050604061142987828801611156565b91505092959194509250565b5f805f6040848603121561144c5761144b610e2a565b5b5f611459868287016112a3565b935050602084013567ffffffffffffffff81111561147a57611479610e2e565b5b611486868287016112c3565b92509250509250925092565b5f8083601f8401126114a7576114a66112b7565b5b8235905067ffffffffffffffff8111156114c4576114c36112bb565b5b6020830191508360018202830111156114e0576114df6112bf565b5b9250929050565b5f805f805f806080878903121561150157611500610e2a565b5b5f61150e89828a016112a3565b965050602061151f89828a01611156565b955050604087013567ffffffffffffffff8111156115405761153f610e2e565b5b61154c89828a016112c3565b9450945050606087013567ffffffffffffffff81111561156f5761156e610e2e565b5b61157b89828a01611492565b92509250509295509295509295565b7f4e487b71000000000000000000000000000000000000000000000000000000005f52602260045260245ffd5b5f60028204905060018216806115ce57607f821691505b6020821081036115e1576115e061158a565b5b50919050565b5f8160601b9050919050565b5f6115fd826115e7565b9050919050565b5f61160e826115f3565b9050919050565b61162661162182611030565b611604565b82525050565b5f81905092915050565b828183375f83830152505050565b5f61164f838561162c565b935061165c838584611636565b82840190509392505050565b5f6116738287611615565b6014820191506116838286611615565b601482019150611694828486611644565b915081905095945050505050565b6116ab81610e32565b82525050565b5f6020820190506116c45f8301846116a2565b92915050565b6116d381610eb2565b81146116dd575f80fd5b50565b5f815190506116ee816116ca565b92915050565b5f6020828403121561170957611708610e2a565b5b5f611716848285016116e0565b91505092915050565b61172881611030565b82525050565b5f6020820190506117415f83018461171f565b92915050565b61175081610f96565b82525050565b5f6040820190506117695f830185611747565b611776602083018461139c565b9392505050565b5f611789828486611644565b91508190509392505050565b5f8160f81b9050919050565b5f6117ab82611795565b9050919050565b6117c36117be82610f96565b6117a1565b82525050565b5f6117d482886117b2565b6001820191506117e48287611615565b6014820191506117f5828587611644565b91506118018284611615565b6014820191508190509695505050505050565b7f4e487b71000000000000000000000000000000000000000000000000000000005f52604160045260245ffd5b5f819050815f5260205f209050919050565b5f6020601f8301049050919050565b5f82821b905092915050565b5f6008830261189d7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff82611862565b6118a78683611862565b95508019841693508086168417925050509392505050565b5f819050919050565b5f6118e26118dd6118d8846118bf565b610fd5565b6118bf565b9050919050565b5f819050919050565b6118fb836118c8565b61190f611907826118e9565b84845461186e565b825550505050565b5f90565b611923611917565b61192e8184846118f2565b505050565b5b81811015611951576119465f8261191b565b600181019050611934565b5050565b601f8211156119965761196781611841565b61197084611853565b8101602085101561197f578190505b61199361198b85611853565b830182611933565b50505b505050565b5f82821c905092915050565b5f6119b65f198460080261199b565b1980831691505092915050565b5f6119ce83836119a7565b9150826002028217905092915050565b6119e782611050565b67ffffffffffffffff811115611a00576119ff611814565b5b611a0a82546115b7565b611a15828285611955565b5f60209050601f831160018114611a46575f8415611a34578287015190505b611a3e85826119c3565b865550611aa5565b601f198416611a5486611841565b5f5b82811015611a7b57848901518255600182019150602085019450602081019050611a56565b86831015611a985784890151611a94601f8916826119a7565b8355505b6001600288020188555050505b505050505050565b5f604082019050611ac05f83018561171f565b611acd602083018461126c565b9392505050565b5f819050919050565b611aee611ae982610ee5565b611ad4565b82525050565b5f611aff82856117b2565b600182019150611b0f8284611add565b6020820191508190509392505050565b5f81519050919050565b5f82825260208201905092915050565b5f611b4382611b1f565b611b4d8185611b29565b9350611b5d81856020860161106a565b611b6681611078565b840191505092915050565b5f6020820190508181035f830152611b898184611b39565b90509291505056fea2646970667358221220b2de069f2d889833fc72f6fdf42330a5120b2bd0aaab674abd26b62dcc3b749c64736f6c634300081a0033",s={31337:void 0,...A.BoostRegistry},R=s[11155111]||g.zeroAddress;function w(i){return i.address&&g.isAddress(i.address)}function S(i){return i.address===null}const l=class l extends _.Deployable{get addresses(){return this.constructor.addresses}constructor({config:e,account:f,...b}){if(w(b)&&b.address)super({account:f,config:e},b.address);else if(S(b))super({account:f,config:e},[]);else{const{address:d}=t.assertValidAddressByChainId(e,s);super({account:f,config:e},d)}}async register(e,f,b,d){return await this.awaitResult(this.registerRaw(e,f,b,d))}async registerRaw(e,f,b,d){var o;const{request:c,result:n}=await a.gm(this._config,{...t.assertValidAddressByChainId(this._config,this.addresses,((o=d==null?void 0:d.chain)==null?void 0:o.id)||(d==null?void 0:d.chainId)),args:[e,f,b],...this.optionallyAttachAccount(),...d});return{hash:await a.Im(this._config,c),result:n}}initialize(e,f,b){return this.clone(e,f,b)}async initializeRaw(e,f,b){const{hash:d,result:c}=await this.deployCloneRaw(e,f,b);return{hash:d,result:c,target:f.at(c)}}async clone(e,f,b){const d=await this.deployClone(e,f,b);return f.at(d)}async deployClone(e,f,b){return await this.awaitResult(this.deployCloneRaw(e,f,b))}async deployCloneRaw(e,f,b){var u,y;const d=f.buildParameters(void 0,{config:this._config,account:this._account}),{address:c}=t.assertValidAddressByChainId(this._config,f.bases,((u=b==null?void 0:b.chain)==null?void 0:u.id)||(b==null?void 0:b.chainId)),{request:n,result:r}=await a.hm(this._config,{...t.assertValidAddressByChainId(this._config,this.addresses,((y=b==null?void 0:b.chain)==null?void 0:y.id)||(b==null?void 0:b.chainId)),args:[f.registryType,c,e,d.args[0]],...this.optionallyAttachAccount(),...b});return{hash:await a.Am(this._config,n),result:r}}async getBaseImplementation(e,f){return await a.cm(this._config,{...t.assertValidAddressByChainId(this._config,this.addresses,f==null?void 0:f.chainId),args:[e],...this.optionallyAttachAccount(),...f})}async getClone(e,f){return await a.mm(this._config,{...t.assertValidAddressByChainId(this._config,this.addresses,f==null?void 0:f.chainId),args:[e],...this.optionallyAttachAccount(),...f})}async getClones(e,f){return await a.fm(this._config,{...t.assertValidAddressByChainId(this._config,this.addresses,f==null?void 0:f.chainId),args:[e],...this.optionallyAttachAccount(),...f})}async getCloneIdentifier(e,f,b,d,c){return await a.bm(this._config,{...t.assertValidAddressByChainId(this._config,this.addresses,c==null?void 0:c.chainId),args:[e,f,b,d],...this.optionallyAttachAccount(),...c})}async getIdentifier(e,f,b){return await a.bm(this._config,{...t.assertValidAddressByChainId(this._config,this.addresses,b==null?void 0:b.chainId),args:[e,f],...this.optionallyAttachAccount(),...b})}buildParameters(e,f){const[,b]=this.validateDeploymentConfig([],f);return{abi:a.ie,bytecode:I,args:[],...this.optionallyAttachAccount(b.account)}}};l.addresses=s;let h=l;exports.boostRegistryAbi=a.ie;exports.BOOST_REGISTRY_ADDRESS=R;exports.BOOST_REGISTRY_ADDRESSES=s;exports.BoostRegistry=h;
|
|
2
2
|
//# sourceMappingURL=BoostRegistry.cjs.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"BoostRegistry.cjs","sources":["../src/BoostRegistry.ts"],"sourcesContent":["import {\n boostRegistryAbi,\n readBoostRegistryGetBaseImplementation,\n readBoostRegistryGetClone,\n readBoostRegistryGetCloneIdentifier,\n readBoostRegistryGetClones,\n simulateBoostRegistryDeployClone,\n simulateBoostRegistryRegister,\n writeBoostRegistryDeployClone,\n writeBoostRegistryRegister,\n} from '@boostxyz/evm';\nimport { bytecode } from '@boostxyz/evm/artifacts/contracts/BoostRegistry.sol/BoostRegistry.json';\nimport {\n type Abi,\n type Address,\n type ContractEventName,\n type Hex,\n isAddress,\n zeroAddress,\n} from 'viem';\nimport { BoostRegistry as BoostRegistryBases } from '../dist/deployments.json';\nimport {\n Deployable,\n type DeployableOptions,\n type GenericDeployableParams,\n} from './Deployable/Deployable';\nimport type { DeployableTarget } from './Deployable/DeployableTarget';\nimport {\n type GenericLog,\n type HashAndSimulatedResult,\n type ReadParams,\n type RegistryType,\n type WriteParams,\n assertValidAddressByChainId,\n} from './utils';\n\n/**\n * The ABI of the BoostRegistry contract, if needed for low level operations\n *\n * @type {typeof boostRegistryAbi}\n */\nexport { boostRegistryAbi };\n\n/**\n * The address of the deployed `BoostRegistry` instance. In prerelease mode, this will be its sepolia address\n *\n * @type {Address}\n */\nexport const BOOST_REGISTRY_ADDRESS =\n (BoostRegistryBases as Record<string, Address>)[__DEFAULT_CHAIN_ID__] ||\n zeroAddress;\n\n/**\n * The fixed addresses for the deployed Boost Registry.\n * By default, `new BoostRegistry` will use the address deployed to the currently connected chain, or `BOOST_REGISTRY_ADDRESS` if not provided.\n *\n * @type {Record<number, Address>}\n */\nexport const BOOST_REGISTRY_ADDRESSES: Record<number, Address> = {\n ...(BoostRegistryBases as Record<number, Address>),\n 31337: import.meta.env.VITE_BOOST_REGISTRY_ADDRESS,\n};\n\n/**\n * A record of `BoostRegistry` event names to `AbiEvent` objects for use with `getLogs`\n *\n * @export\n * @typedef {BoostRegistryLog}\n * @template {ContractEventName<typeof boostRegistryAbi>} [event=ContractEventName<\n * typeof boostRegistryAbi\n * >]\n */\nexport type BoostRegistryLog<\n event extends ContractEventName<typeof boostRegistryAbi> = ContractEventName<\n typeof boostRegistryAbi\n >,\n> = GenericLog<typeof boostRegistryAbi, event>;\n\n/**\n * An interface representing an on-chain Clone\n *\n * @export\n * @interface Clone\n * @typedef {Clone}\n */\nexport interface Clone {\n // The clone's component type'\n baseType: RegistryType;\n // The address of the initialized clone.\n instance: Address;\n // The deployer of the clone.\n deployer: Address;\n // The display name of the clone\n name: string;\n}\n\n/**\n * Instantiation options for a previously deployed Boost Registry\n *\n * @export\n * @interface BoostRegistryDeployedOptions\n * @typedef {BoostRegistryDeployedOptions}\n * @extends {DeployableOptions}\n */\nexport interface BoostRegistryDeployedOptions extends DeployableOptions {\n /**\n * The address for a Boost Registry, if different than `BOOST_REGISTRY_ADDRESS`\n *\n * @type {?Address}\n */\n address?: Address;\n}\n\n/**\n * A typeguard to determine if instantiation is using a custom address.\n *\n * @param {*} opts\n * @returns {opts is BoostRegistryDeployedOptions}\n */\nfunction isBoostRegistryDeployed(\n // biome-ignore lint/suspicious/noExplicitAny: type guard\n opts: any,\n): opts is BoostRegistryDeployedOptions {\n return opts.address && isAddress(opts.address);\n}\n\n/**\n * The Boost Registry does not take any construction arguments, so if you'd like to deploy a new Boost Registry, pass an explicit null to the `address` field.\n *\n * @export\n * @interface BoostRegistryOptionsWithPayload\n * @typedef {BoostRegistryOptionsWithPayload}\n * @extends {DeployableOptions}\n */\nexport interface BoostRegistryOptionsWithPayload extends DeployableOptions {\n /**\n *\n * @type {null}\n */\n address: null;\n}\n\n/**\n * A typeguard to determine if the user is intending to deploy a new Boost Registry before usage\n *\n * @param {*} opts\n * @returns {opts is BoostRegistryOptionsWithPayload}\n */\nfunction isBoostRegistryDeployable(\n // biome-ignore lint/suspicious/noExplicitAny: type guard\n opts: any,\n): opts is BoostRegistryOptionsWithPayload {\n return opts.address === null;\n}\n\n/**\n * Instantiation options for a Boost Registry.\n *\n * @example\n * To target Boost's Registry, omit the address field.\n * Otherwise, supply a custom address to a previously deployed custom Boost Registry.\n * You can also pass `{ address: null }` if you are intending to deploy a new Boost Registry.\n * ```ts\n * let registry = new BoostRegistry({ config, account })\n * // or\n * registry = new BoostRegistry({ config, account, address: CUSTOM_ADDRESS })\n * // or\n * registry = new BoostRegistry({ config, account, address: null })\n * await registry.deploy()\n * ```\n *\n * @export\n * @typedef {BoostRegistryConfig}\n */\nexport type BoostRegistryConfig =\n | BoostRegistryDeployedOptions\n | BoostRegistryOptionsWithPayload;\n\n/**\n * Constructs a new Boost Registry. A registry for base implementations and cloned instances.\n * This contract is used to register base implementations and deploy new instances of those implementations for use within the Boost protocol.\n *\n * @see {@link BoostRegistryConfig}\n * @export\n * @class BoostRegistry\n * @typedef {BoostRegistry}\n * @extends {Deployable<never[]>}\n */\nexport class BoostRegistry extends Deployable<\n never[],\n typeof boostRegistryAbi\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_REGISTRY_ADDRESSES;\n\n /**\n * A getter that will return Boost registry'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 BoostRegistry).addresses;\n }\n\n /**\n * Creates an instance of BoostRegistry.\n *\n * @see {@link BoostRegistryConfig}\n * @constructor\n * @param {BoostRegistryConfig} param0\n * @param {Config} param0.config - [Wagmi Configuration](https://wagmi.sh/core/api/createConfig)\n * @param {?Account} [param0.account] - [Viem Local Account](https://viem.sh/docs/accounts/local)\n * @param {({ address?: Address; } | {})} param0....options\n */\n constructor({ config, account, ...options }: BoostRegistryConfig) {\n if (isBoostRegistryDeployed(options) && options.address) {\n super({ account, config }, options.address);\n } else if (isBoostRegistryDeployable(options)) {\n super({ account, config }, []);\n } else {\n const { address } = assertValidAddressByChainId(\n config,\n BOOST_REGISTRY_ADDRESSES,\n );\n super({ account, config }, address);\n }\n }\n\n /**\n * Register a new base implementation of a given type\n *\n * @public\n * @async\n * @param {RegistryType} registryType - The base type for the implementation\n * @param {string} name - A name for the implementation (must be unique within the given type)\n * @param {Address} implementation - The address of the implementation contract\n * @param {?WriteParams} [params] - Optional params to provide the underlying Viem contract call\n * @returns {Promise<void>}\n * @example\n * ```ts\n * await registry.register(ContractAction.registryType, 'ContractAction', ContractAction.base)\n * ```\n */\n public async register(\n registryType: RegistryType,\n name: string,\n implementation: Address,\n params?: WriteParams<typeof boostRegistryAbi, 'register'>,\n ) {\n return await this.awaitResult(\n this.registerRaw(registryType, name, implementation, params),\n );\n }\n\n /**\n * @see {@link register}\n * @public\n * @async\n * @param {RegistryType} registryType\n * @param {string} name\n * @param {Address} implementation\n * @param {?WriteParams} [params]\n * @returns {Promise<{ hash: `0x${string}`; result: void; }>}\n */\n public async registerRaw(\n registryType: RegistryType,\n name: string,\n implementation: Address,\n params?: WriteParams<typeof boostRegistryAbi, 'register'>,\n ) {\n const { request, result } = await simulateBoostRegistryRegister(\n this._config,\n {\n ...assertValidAddressByChainId(\n this._config,\n this.addresses,\n params?.chain?.id || params?.chainId,\n ),\n args: [registryType, name, implementation],\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 writeBoostRegistryRegister(this._config, request);\n return { hash, result };\n }\n\n /**\n * Initialize a new instance of a registered base implementation, returning the provided target with a new address set on it.\n * This method is the same as `clone`, but serves to make its function more obvious as to why you'd need to use it.\n *\n * @public\n * @async\n * @template {DeployableTarget} Target\n * @param {string} displayName - The display name for the clone\n * @param {Target} target - An instance of a target contract to clone and initialize\n * @param {?WriteParams} [params]\n * @returns {Promise<Target>} - The provided instance, but with a new address attached.\n * biome-ignore lint/suspicious/noExplicitAny: any deployable target will suffice\n */\n public initialize<Target extends DeployableTarget<any, any>>(\n displayName: string,\n target: Target,\n params?: WriteParams<typeof boostRegistryAbi, 'deployClone'>,\n ): Promise<Target> {\n return this.clone(displayName, target, params);\n }\n\n /**\n * Initialize a new instance of a registered base implementation, returning a transaction hash, resulting address from simulated transaction, and the given target bound to the resulting address.\n * This method is the same as `deployCloneRaw`, but serves to make its function more obvious as to why you'd need to use it.\n *\n * @public\n * @async\n * @template {DeployableTarget} Target\n * @param {string} displayName - The display name for the clone\n * @param {Target} target - An instance of a target contract to clone and initialize\n * @param {?WriteParams} [params]\n * @returns {Promise<HashAndSimulatedResult<Address> & { target: Target } >} - The transaction hash, simulated return address, and given target bound to simulated return address\n */\n public async initializeRaw<Target extends DeployableTarget<unknown, Abi>>(\n displayName: string,\n target: Target,\n params?: WriteParams<typeof boostRegistryAbi, 'deployClone'>,\n ): Promise<HashAndSimulatedResult<Address> & { target: Target }> {\n const { hash, result } = await this.deployCloneRaw(\n displayName,\n target,\n params,\n );\n return { hash, result, target: target.at(result) };\n }\n\n /**\n * Deploy a new instance of a registered base implementation, returning the provided target with a new address set on it.\n *\n * @public\n * @async\n * @template {DeployableTarget} Target\n * @param {string} displayName - The display name for the clone\n * @param {Target} target - An instance of a target contract to clone and initialize\n * @param {?WriteParams} [params]\n * @returns {Promise<Target>} - The provided instance, but with a new address attached.\n * biome-ignore lint/suspicious/noExplicitAny: any deployable target will suffice\n */\n public async clone<Target extends DeployableTarget<any, any>>(\n displayName: string,\n target: Target,\n params?: WriteParams<typeof boostRegistryAbi, 'deployClone'>,\n ): Promise<Target> {\n const instance = await this.deployClone(displayName, target, params);\n return target.at(instance);\n }\n\n /**\n *\n * @see {@link clone}\n * @public\n * @async\n * @template {DeployableTarget} Target\n * @param {string} displayName\n * @param {Target} target\n * @param {?WriteParams} [params]\n * @returns {Promise<Address>}\n * biome-ignore lint/suspicious/noExplicitAny: any deployable target will suffice\n */\n public async deployClone<Target extends DeployableTarget<any, any>>(\n displayName: string,\n target: Target,\n params?: WriteParams<typeof boostRegistryAbi, 'deployClone'>,\n ): Promise<Address> {\n return await this.awaitResult(\n this.deployCloneRaw(displayName, target, params),\n );\n }\n\n /**\n * @see {@link clone}\n * @public\n * @async\n * @param {string} displayName\n * @param {DeployableTarget} target\n * @param {?WriteParams} [params]\n * @returns {Promise<{ hash: Hex, result: Address }>} - The transaction hash\n * biome-ignore lint/suspicious/noExplicitAny: any deployable target will suffice\n */\n public async deployCloneRaw<Target extends DeployableTarget<any, any>>(\n displayName: string,\n target: Target,\n params?: WriteParams<typeof boostRegistryAbi, 'deployClone'>,\n ): Promise<HashAndSimulatedResult<Address>> {\n const payload = target.buildParameters(undefined, {\n config: this._config,\n account: this._account,\n });\n const { address: baseAddress } = assertValidAddressByChainId(\n this._config,\n target.bases,\n params?.chain?.id || params?.chainId,\n );\n const { request, result } = await simulateBoostRegistryDeployClone(\n this._config,\n {\n ...assertValidAddressByChainId(\n this._config,\n this.addresses,\n params?.chain?.id || params?.chainId,\n ),\n args: [target.registryType, baseAddress, displayName, payload.args[0]],\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 writeBoostRegistryDeployClone(this._config, request);\n return { hash, result };\n }\n\n /**\n * Get the address of a registered base implementation.\n * This function will revert if the implementation is not registered\n *\n * @public\n * @async\n * @param {Hex} identifier - The unique identifier for the implementation (see {getIdentifier})\n * @param {?ReadParams} [params]\n * @returns {Promise<Address>} - The address of the implementation\n */\n public async getBaseImplementation(\n identifier: Hex,\n params?: ReadParams<typeof boostRegistryAbi, 'getBaseImplementation'>,\n ) {\n return await readBoostRegistryGetBaseImplementation(this._config, {\n ...assertValidAddressByChainId(\n this._config,\n this.addresses,\n params?.chainId,\n ),\n args: [identifier],\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 address of a deployed clone by its identifier\n *\n * @public\n * @async\n * @param {Hex} identifier - The unique identifier for the deployed clone (see {getCloneIdentifier})\n * @param {?ReadParams} [params]\n * @returns {Promise<Clone>} - The on-chain representation of the clone\n */\n public async getClone(\n identifier: Hex,\n params?: ReadParams<typeof boostRegistryAbi, 'getClone'>,\n ): Promise<Clone> {\n return await readBoostRegistryGetClone(this._config, {\n ...assertValidAddressByChainId(\n this._config,\n this.addresses,\n params?.chainId,\n ),\n args: [identifier],\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 list of identifiers of deployed clones for a given deployer\n *\n * @public\n * @async\n * @param {Address} deployer - The address of the deployer\n * @param {?ReadParams} [params]\n * @returns {Promise<Hex[]>} - The list of deployed clones for the given deployer\n */\n public async getClones(\n deployer: Address,\n params?: ReadParams<typeof boostRegistryAbi, 'getClones'>,\n ) {\n return await readBoostRegistryGetClones(this._config, {\n ...assertValidAddressByChainId(\n this._config,\n this.addresses,\n params?.chainId,\n ),\n args: [deployer],\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 * Build the identifier for a clone of a base implementation\n *\n * @public\n * @async\n * @param {RegistryType} registryType - The base type for the implementation\n * @param {Address} base - The address of the base implementation\n * @param {Address} deployer - The address of the deployer\n * @param {string} displayName - The display name of the clone\n * @param {?ReadParams} [params]\n * @returns {Promise<Hex>} - The unique identifier for the clone\n */\n public async getCloneIdentifier(\n registryType: RegistryType,\n base: Address,\n deployer: Address,\n displayName: string,\n params?: ReadParams<typeof boostRegistryAbi, 'getCloneIdentifier'>,\n ) {\n return await readBoostRegistryGetCloneIdentifier(this._config, {\n ...assertValidAddressByChainId(\n this._config,\n this.addresses,\n params?.chainId,\n ),\n args: [registryType, base, deployer, displayName],\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 * Build the identifier for a base implementation\n *\n * @public\n * @async\n * @param {RegistryType} registryType - The base type for the implementation\n * @param {string} displayName - The name of the implementation\n * @param {?ReadParams} [params]\n * @returns {Promise<Hex>} - The unique identifier for the implementation\n */\n public async getIdentifier(\n registryType: RegistryType,\n displayName: string,\n params?: ReadParams<typeof boostRegistryAbi, 'getIdentifier'>,\n ) {\n return await readBoostRegistryGetCloneIdentifier(this._config, {\n ...assertValidAddressByChainId(\n this._config,\n this.addresses,\n params?.chainId,\n ),\n args: [registryType, displayName],\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 * @inheritdoc\n *\n * @public\n * @param {?never[]} [_payload]\n * @param {?DeployableOptions} [_options]\n * @returns {GenericDeployableParams}\n */\n public override buildParameters(\n _payload?: never[],\n _options?: DeployableOptions,\n ): GenericDeployableParams {\n const [, options] = this.validateDeploymentConfig([], _options);\n return {\n abi: boostRegistryAbi,\n bytecode: bytecode as Hex,\n // biome-ignore lint/suspicious/noExplicitAny: Registry doesn't construct or initialize\n args: [] as any,\n ...this.optionallyAttachAccount(options.account),\n };\n }\n}\n"],"names":["BOOST_REGISTRY_ADDRESS","BoostRegistryBases","BOOST_REGISTRY_ADDRESSES","isBoostRegistryDeployed","opts","isAddress","isBoostRegistryDeployable","_BoostRegistry","Deployable","config","account","options","address","assertValidAddressByChainId","registryType","name","implementation","params","request","result","simulateBoostRegistryRegister","_a","writeBoostRegistryRegister","displayName","target","hash","instance","payload","baseAddress","simulateBoostRegistryDeployClone","_b","writeBoostRegistryDeployClone","identifier","readBoostRegistryGetBaseImplementation","readBoostRegistryGetClone","deployer","readBoostRegistryGetClones","base","readBoostRegistryGetCloneIdentifier","_payload","_options","boostRegistryAbi","bytecode","BoostRegistry"],"mappings":"qscAgDaA,EACVC,EAA+C,cAAA,QAAoB,EASzDC,EAAoD,CAC/D,GAAID,EAAA,cACJ,MAAO,MACT,EA0DA,SAASE,EAEPC,EACsC,CACtC,OAAOA,EAAK,SAAWC,EAAU,UAAAD,EAAK,OAAO,CAC/C,CAwBA,SAASE,EAEPF,EACyC,CACzC,OAAOA,EAAK,UAAY,IAC1B,CAmCO,MAAMG,EAAN,MAAMA,UAAsBC,EAAAA,UAGjC,CAiBA,IAAW,WAAqC,CAC9C,OAAQ,KAAK,YAAqC,SACpD,CAYA,YAAY,CAAE,OAAAC,EAAQ,QAAAC,EAAS,GAAGC,GAAgC,CAChE,GAAIR,EAAwBQ,CAAO,GAAKA,EAAQ,QAC9C,MAAM,CAAE,QAAAD,EAAS,OAAAD,CAAO,EAAGE,EAAQ,OAAO,UACjCL,EAA0BK,CAAO,EAC1C,MAAM,CAAE,QAAAD,EAAS,OAAAD,CAAO,EAAG,CAAE,CAAA,MACxB,CACC,KAAA,CAAE,QAAAG,GAAYC,EAAA,4BAClBJ,EACAP,CAAA,EAEF,MAAM,CAAE,QAAAQ,EAAS,OAAAD,CAAO,EAAGG,CAAO,CACpC,CACF,CAiBA,MAAa,SACXE,EACAC,EACAC,EACAC,EACA,CACA,OAAO,MAAM,KAAK,YAChB,KAAK,YAAYH,EAAcC,EAAMC,EAAgBC,CAAM,CAAA,CAE/D,CAYA,MAAa,YACXH,EACAC,EACAC,EACAC,EACA,OACA,KAAM,CAAE,QAAAC,EAAS,OAAAC,CAAO,EAAI,MAAMC,EAAA,GAChC,KAAK,QACL,CACE,GAAGP,EAAA,4BACD,KAAK,QACL,KAAK,YACLQ,EAAAJ,GAAA,YAAAA,EAAQ,QAAR,YAAAI,EAAe,MAAMJ,GAAA,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AC7D,GAAGzB,EAAA,4BACD,KAAK,QACL,KAAK,UACLI,GAAA,YAAAA,EAAQ,OACV,EACA,KAAM,CAACH,EAAcS,CAAW,EAChC,GAAG,KAAK,wBAAwB,EAEhC,GAAIN,CAAA,CACL,CACH,CAUgB,gBACdsB,EACAC,EACyB,CACnB,KAAA,CAAA,CAAG7B,CAAO,EAAI,KAAK,yBAAyB,CAAA,EAAI6B,CAAQ,EACvD,MAAA,CACL,IAAKC,EAAA,GACL,SAAAC,EAEA,KAAM,CAAC,EACP,GAAG,KAAK,wBAAwB/B,EAAQ,OAAO,CAAA,CAEnD,CACF,EApYEJ,EAAgB,UAAqCL,EAXhD,IAAMyC,EAANpC"}
|
|
1
|
+
{"version":3,"file":"BoostRegistry.cjs","sources":["../src/BoostRegistry.ts"],"sourcesContent":["import {\n boostRegistryAbi,\n readBoostRegistryGetBaseImplementation,\n readBoostRegistryGetClone,\n readBoostRegistryGetCloneIdentifier,\n readBoostRegistryGetClones,\n simulateBoostRegistryDeployClone,\n simulateBoostRegistryRegister,\n writeBoostRegistryDeployClone,\n writeBoostRegistryRegister,\n} from '@boostxyz/evm';\nimport { bytecode } from '@boostxyz/evm/artifacts/contracts/BoostRegistry.sol/BoostRegistry.json';\nimport {\n type Abi,\n type Address,\n type ContractEventName,\n type Hex,\n isAddress,\n zeroAddress,\n} from 'viem';\nimport { BoostRegistry as BoostRegistryBases } from '../dist/deployments.json';\nimport {\n Deployable,\n type DeployableOptions,\n type GenericDeployableParams,\n} from './Deployable/Deployable';\nimport type { DeployableTarget } from './Deployable/DeployableTarget';\nimport {\n type GenericLog,\n type HashAndSimulatedResult,\n type ReadParams,\n type RegistryType,\n type WriteParams,\n assertValidAddressByChainId,\n} from './utils';\n\n/**\n * The ABI of the BoostRegistry contract, if needed for low level operations\n *\n * @type {typeof boostRegistryAbi}\n */\nexport { boostRegistryAbi };\n\n/**\n * The fixed addresses for the deployed Boost Registry.\n * By default, `new BoostRegistry` will use the address deployed to the currently connected chain, or `BOOST_REGISTRY_ADDRESS` if not provided.\n *\n * @type {Record<number, Address>}\n */\nexport const BOOST_REGISTRY_ADDRESSES: Record<number, Address> = {\n 31337: import.meta.env.VITE_BOOST_REGISTRY_ADDRESS,\n ...(BoostRegistryBases as Record<number, Address>),\n};\n\n/**\n * The address of the deployed `BoostRegistry` instance. In prerelease mode, this will be its sepolia address\n *\n * @type {Address}\n */\nexport const BOOST_REGISTRY_ADDRESS =\n BOOST_REGISTRY_ADDRESSES[__DEFAULT_CHAIN_ID__ as unknown as number] ||\n zeroAddress;\n\n/**\n * A record of `BoostRegistry` event names to `AbiEvent` objects for use with `getLogs`\n *\n * @export\n * @typedef {BoostRegistryLog}\n * @template {ContractEventName<typeof boostRegistryAbi>} [event=ContractEventName<\n * typeof boostRegistryAbi\n * >]\n */\nexport type BoostRegistryLog<\n event extends ContractEventName<typeof boostRegistryAbi> = ContractEventName<\n typeof boostRegistryAbi\n >,\n> = GenericLog<typeof boostRegistryAbi, event>;\n\n/**\n * An interface representing an on-chain Clone\n *\n * @export\n * @interface Clone\n * @typedef {Clone}\n */\nexport interface Clone {\n // The clone's component type'\n baseType: RegistryType;\n // The address of the initialized clone.\n instance: Address;\n // The deployer of the clone.\n deployer: Address;\n // The display name of the clone\n name: string;\n}\n\n/**\n * Instantiation options for a previously deployed Boost Registry\n *\n * @export\n * @interface BoostRegistryDeployedOptions\n * @typedef {BoostRegistryDeployedOptions}\n * @extends {DeployableOptions}\n */\nexport interface BoostRegistryDeployedOptions extends DeployableOptions {\n /**\n * The address for a Boost Registry, if different than `BOOST_REGISTRY_ADDRESS`\n *\n * @type {?Address}\n */\n address?: Address;\n}\n\n/**\n * A typeguard to determine if instantiation is using a custom address.\n *\n * @param {*} opts\n * @returns {opts is BoostRegistryDeployedOptions}\n */\nfunction isBoostRegistryDeployed(\n // biome-ignore lint/suspicious/noExplicitAny: type guard\n opts: any,\n): opts is BoostRegistryDeployedOptions {\n return opts.address && isAddress(opts.address);\n}\n\n/**\n * The Boost Registry does not take any construction arguments, so if you'd like to deploy a new Boost Registry, pass an explicit null to the `address` field.\n *\n * @export\n * @interface BoostRegistryOptionsWithPayload\n * @typedef {BoostRegistryOptionsWithPayload}\n * @extends {DeployableOptions}\n */\nexport interface BoostRegistryOptionsWithPayload extends DeployableOptions {\n /**\n *\n * @type {null}\n */\n address: null;\n}\n\n/**\n * A typeguard to determine if the user is intending to deploy a new Boost Registry before usage\n *\n * @param {*} opts\n * @returns {opts is BoostRegistryOptionsWithPayload}\n */\nfunction isBoostRegistryDeployable(\n // biome-ignore lint/suspicious/noExplicitAny: type guard\n opts: any,\n): opts is BoostRegistryOptionsWithPayload {\n return opts.address === null;\n}\n\n/**\n * Instantiation options for a Boost Registry.\n *\n * @example\n * To target Boost's Registry, omit the address field.\n * Otherwise, supply a custom address to a previously deployed custom Boost Registry.\n * You can also pass `{ address: null }` if you are intending to deploy a new Boost Registry.\n * ```ts\n * let registry = new BoostRegistry({ config, account })\n * // or\n * registry = new BoostRegistry({ config, account, address: CUSTOM_ADDRESS })\n * // or\n * registry = new BoostRegistry({ config, account, address: null })\n * await registry.deploy()\n * ```\n *\n * @export\n * @typedef {BoostRegistryConfig}\n */\nexport type BoostRegistryConfig =\n | BoostRegistryDeployedOptions\n | BoostRegistryOptionsWithPayload;\n\n/**\n * Constructs a new Boost Registry. A registry for base implementations and cloned instances.\n * This contract is used to register base implementations and deploy new instances of those implementations for use within the Boost protocol.\n *\n * @see {@link BoostRegistryConfig}\n * @export\n * @class BoostRegistry\n * @typedef {BoostRegistry}\n * @extends {Deployable<never[]>}\n */\nexport class BoostRegistry extends Deployable<\n never[],\n typeof boostRegistryAbi\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_REGISTRY_ADDRESSES;\n\n /**\n * A getter that will return Boost registry'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 BoostRegistry).addresses;\n }\n\n /**\n * Creates an instance of BoostRegistry.\n *\n * @see {@link BoostRegistryConfig}\n * @constructor\n * @param {BoostRegistryConfig} param0\n * @param {Config} param0.config - [Wagmi Configuration](https://wagmi.sh/core/api/createConfig)\n * @param {?Account} [param0.account] - [Viem Local Account](https://viem.sh/docs/accounts/local)\n * @param {({ address?: Address; } | {})} param0....options\n */\n constructor({ config, account, ...options }: BoostRegistryConfig) {\n if (isBoostRegistryDeployed(options) && options.address) {\n super({ account, config }, options.address);\n } else if (isBoostRegistryDeployable(options)) {\n super({ account, config }, []);\n } else {\n const { address } = assertValidAddressByChainId(\n config,\n BOOST_REGISTRY_ADDRESSES,\n );\n super({ account, config }, address);\n }\n }\n\n /**\n * Register a new base implementation of a given type\n *\n * @public\n * @async\n * @param {RegistryType} registryType - The base type for the implementation\n * @param {string} name - A name for the implementation (must be unique within the given type)\n * @param {Address} implementation - The address of the implementation contract\n * @param {?WriteParams} [params] - Optional params to provide the underlying Viem contract call\n * @returns {Promise<void>}\n * @example\n * ```ts\n * await registry.register(ContractAction.registryType, 'ContractAction', ContractAction.base)\n * ```\n */\n public async register(\n registryType: RegistryType,\n name: string,\n implementation: Address,\n params?: WriteParams<typeof boostRegistryAbi, 'register'>,\n ) {\n return await this.awaitResult(\n this.registerRaw(registryType, name, implementation, params),\n );\n }\n\n /**\n * @see {@link register}\n * @public\n * @async\n * @param {RegistryType} registryType\n * @param {string} name\n * @param {Address} implementation\n * @param {?WriteParams} [params]\n * @returns {Promise<{ hash: `0x${string}`; result: void; }>}\n */\n public async registerRaw(\n registryType: RegistryType,\n name: string,\n implementation: Address,\n params?: WriteParams<typeof boostRegistryAbi, 'register'>,\n ) {\n const { request, result } = await simulateBoostRegistryRegister(\n this._config,\n {\n ...assertValidAddressByChainId(\n this._config,\n this.addresses,\n params?.chain?.id || params?.chainId,\n ),\n args: [registryType, name, implementation],\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 writeBoostRegistryRegister(this._config, request);\n return { hash, result };\n }\n\n /**\n * Initialize a new instance of a registered base implementation, returning the provided target with a new address set on it.\n * This method is the same as `clone`, but serves to make its function more obvious as to why you'd need to use it.\n *\n * @public\n * @async\n * @template {DeployableTarget} Target\n * @param {string} displayName - The display name for the clone\n * @param {Target} target - An instance of a target contract to clone and initialize\n * @param {?WriteParams} [params]\n * @returns {Promise<Target>} - The provided instance, but with a new address attached.\n * biome-ignore lint/suspicious/noExplicitAny: any deployable target will suffice\n */\n public initialize<Target extends DeployableTarget<any, any>>(\n displayName: string,\n target: Target,\n params?: WriteParams<typeof boostRegistryAbi, 'deployClone'>,\n ): Promise<Target> {\n return this.clone(displayName, target, params);\n }\n\n /**\n * Initialize a new instance of a registered base implementation, returning a transaction hash, resulting address from simulated transaction, and the given target bound to the resulting address.\n * This method is the same as `deployCloneRaw`, but serves to make its function more obvious as to why you'd need to use it.\n *\n * @public\n * @async\n * @template {DeployableTarget} Target\n * @param {string} displayName - The display name for the clone\n * @param {Target} target - An instance of a target contract to clone and initialize\n * @param {?WriteParams} [params]\n * @returns {Promise<HashAndSimulatedResult<Address> & { target: Target } >} - The transaction hash, simulated return address, and given target bound to simulated return address\n */\n public async initializeRaw<Target extends DeployableTarget<unknown, Abi>>(\n displayName: string,\n target: Target,\n params?: WriteParams<typeof boostRegistryAbi, 'deployClone'>,\n ): Promise<HashAndSimulatedResult<Address> & { target: Target }> {\n const { hash, result } = await this.deployCloneRaw(\n displayName,\n target,\n params,\n );\n return { hash, result, target: target.at(result) };\n }\n\n /**\n * Deploy a new instance of a registered base implementation, returning the provided target with a new address set on it.\n *\n * @public\n * @async\n * @template {DeployableTarget} Target\n * @param {string} displayName - The display name for the clone\n * @param {Target} target - An instance of a target contract to clone and initialize\n * @param {?WriteParams} [params]\n * @returns {Promise<Target>} - The provided instance, but with a new address attached.\n * biome-ignore lint/suspicious/noExplicitAny: any deployable target will suffice\n */\n public async clone<Target extends DeployableTarget<any, any>>(\n displayName: string,\n target: Target,\n params?: WriteParams<typeof boostRegistryAbi, 'deployClone'>,\n ): Promise<Target> {\n const instance = await this.deployClone(displayName, target, params);\n return target.at(instance);\n }\n\n /**\n *\n * @see {@link clone}\n * @public\n * @async\n * @template {DeployableTarget} Target\n * @param {string} displayName\n * @param {Target} target\n * @param {?WriteParams} [params]\n * @returns {Promise<Address>}\n * biome-ignore lint/suspicious/noExplicitAny: any deployable target will suffice\n */\n public async deployClone<Target extends DeployableTarget<any, any>>(\n displayName: string,\n target: Target,\n params?: WriteParams<typeof boostRegistryAbi, 'deployClone'>,\n ): Promise<Address> {\n return await this.awaitResult(\n this.deployCloneRaw(displayName, target, params),\n );\n }\n\n /**\n * @see {@link clone}\n * @public\n * @async\n * @param {string} displayName\n * @param {DeployableTarget} target\n * @param {?WriteParams} [params]\n * @returns {Promise<{ hash: Hex, result: Address }>} - The transaction hash\n * biome-ignore lint/suspicious/noExplicitAny: any deployable target will suffice\n */\n public async deployCloneRaw<Target extends DeployableTarget<any, any>>(\n displayName: string,\n target: Target,\n params?: WriteParams<typeof boostRegistryAbi, 'deployClone'>,\n ): Promise<HashAndSimulatedResult<Address>> {\n const payload = target.buildParameters(undefined, {\n config: this._config,\n account: this._account,\n });\n const { address: baseAddress } = assertValidAddressByChainId(\n this._config,\n target.bases,\n params?.chain?.id || params?.chainId,\n );\n const { request, result } = await simulateBoostRegistryDeployClone(\n this._config,\n {\n ...assertValidAddressByChainId(\n this._config,\n this.addresses,\n params?.chain?.id || params?.chainId,\n ),\n args: [target.registryType, baseAddress, displayName, payload.args[0]],\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 writeBoostRegistryDeployClone(this._config, request);\n return { hash, result };\n }\n\n /**\n * Get the address of a registered base implementation.\n * This function will revert if the implementation is not registered\n *\n * @public\n * @async\n * @param {Hex} identifier - The unique identifier for the implementation (see {getIdentifier})\n * @param {?ReadParams} [params]\n * @returns {Promise<Address>} - The address of the implementation\n */\n public async getBaseImplementation(\n identifier: Hex,\n params?: ReadParams<typeof boostRegistryAbi, 'getBaseImplementation'>,\n ) {\n return await readBoostRegistryGetBaseImplementation(this._config, {\n ...assertValidAddressByChainId(\n this._config,\n this.addresses,\n params?.chainId,\n ),\n args: [identifier],\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 address of a deployed clone by its identifier\n *\n * @public\n * @async\n * @param {Hex} identifier - The unique identifier for the deployed clone (see {getCloneIdentifier})\n * @param {?ReadParams} [params]\n * @returns {Promise<Clone>} - The on-chain representation of the clone\n */\n public async getClone(\n identifier: Hex,\n params?: ReadParams<typeof boostRegistryAbi, 'getClone'>,\n ): Promise<Clone> {\n return await readBoostRegistryGetClone(this._config, {\n ...assertValidAddressByChainId(\n this._config,\n this.addresses,\n params?.chainId,\n ),\n args: [identifier],\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 list of identifiers of deployed clones for a given deployer\n *\n * @public\n * @async\n * @param {Address} deployer - The address of the deployer\n * @param {?ReadParams} [params]\n * @returns {Promise<Hex[]>} - The list of deployed clones for the given deployer\n */\n public async getClones(\n deployer: Address,\n params?: ReadParams<typeof boostRegistryAbi, 'getClones'>,\n ) {\n return await readBoostRegistryGetClones(this._config, {\n ...assertValidAddressByChainId(\n this._config,\n this.addresses,\n params?.chainId,\n ),\n args: [deployer],\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 * Build the identifier for a clone of a base implementation\n *\n * @public\n * @async\n * @param {RegistryType} registryType - The base type for the implementation\n * @param {Address} base - The address of the base implementation\n * @param {Address} deployer - The address of the deployer\n * @param {string} displayName - The display name of the clone\n * @param {?ReadParams} [params]\n * @returns {Promise<Hex>} - The unique identifier for the clone\n */\n public async getCloneIdentifier(\n registryType: RegistryType,\n base: Address,\n deployer: Address,\n displayName: string,\n params?: ReadParams<typeof boostRegistryAbi, 'getCloneIdentifier'>,\n ) {\n return await readBoostRegistryGetCloneIdentifier(this._config, {\n ...assertValidAddressByChainId(\n this._config,\n this.addresses,\n params?.chainId,\n ),\n args: [registryType, base, deployer, displayName],\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 * Build the identifier for a base implementation\n *\n * @public\n * @async\n * @param {RegistryType} registryType - The base type for the implementation\n * @param {string} displayName - The name of the implementation\n * @param {?ReadParams} [params]\n * @returns {Promise<Hex>} - The unique identifier for the implementation\n */\n public async getIdentifier(\n registryType: RegistryType,\n displayName: string,\n params?: ReadParams<typeof boostRegistryAbi, 'getIdentifier'>,\n ) {\n return await readBoostRegistryGetCloneIdentifier(this._config, {\n ...assertValidAddressByChainId(\n this._config,\n this.addresses,\n params?.chainId,\n ),\n args: [registryType, displayName],\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 * @inheritdoc\n *\n * @public\n * @param {?never[]} [_payload]\n * @param {?DeployableOptions} [_options]\n * @returns {GenericDeployableParams}\n */\n public override buildParameters(\n _payload?: never[],\n _options?: DeployableOptions,\n ): GenericDeployableParams {\n const [, options] = this.validateDeploymentConfig([], _options);\n return {\n abi: boostRegistryAbi,\n bytecode: bytecode as Hex,\n // biome-ignore lint/suspicious/noExplicitAny: Registry doesn't construct or initialize\n args: [] as any,\n ...this.optionallyAttachAccount(options.account),\n };\n }\n}\n"],"names":["BOOST_REGISTRY_ADDRESSES","BoostRegistryBases","BOOST_REGISTRY_ADDRESS","zeroAddress","isBoostRegistryDeployed","opts","isAddress","isBoostRegistryDeployable","_BoostRegistry","Deployable","config","account","options","address","assertValidAddressByChainId","registryType","name","implementation","params","request","result","simulateBoostRegistryRegister","_a","writeBoostRegistryRegister","displayName","target","hash","instance","payload","baseAddress","simulateBoostRegistryDeployClone","_b","writeBoostRegistryDeployClone","identifier","readBoostRegistryGetBaseImplementation","readBoostRegistryGetClone","deployer","readBoostRegistryGetClones","base","readBoostRegistryGetCloneIdentifier","_payload","_options","boostRegistryAbi","bytecode","BoostRegistry"],"mappings":"qscAiDaA,EAAoD,CAC/D,MAAO,OACP,GAAIC,EAAA,aACN,EAOaC,EACXF,EAAyB,QAAyC,GAClEG,EAAA,YA0DF,SAASC,EAEPC,EACsC,CACtC,OAAOA,EAAK,SAAWC,EAAU,UAAAD,EAAK,OAAO,CAC/C,CAwBA,SAASE,EAEPF,EACyC,CACzC,OAAOA,EAAK,UAAY,IAC1B,CAmCO,MAAMG,EAAN,MAAMA,UAAsBC,EAAAA,UAGjC,CAiBA,IAAW,WAAqC,CAC9C,OAAQ,KAAK,YAAqC,SACpD,CAYA,YAAY,CAAE,OAAAC,EAAQ,QAAAC,EAAS,GAAGC,GAAgC,CAChE,GAAIR,EAAwBQ,CAAO,GAAKA,EAAQ,QAC9C,MAAM,CAAE,QAAAD,EAAS,OAAAD,CAAO,EAAGE,EAAQ,OAAO,UACjCL,EAA0BK,CAAO,EAC1C,MAAM,CAAE,QAAAD,EAAS,OAAAD,CAAO,EAAG,CAAE,CAAA,MACxB,CACC,KAAA,CAAE,QAAAG,GAAYC,EAAA,4BAClBJ,EACAV,CAAA,EAEF,MAAM,CAAE,QAAAW,EAAS,OAAAD,CAAO,EAAGG,CAAO,CACpC,CACF,CAiBA,MAAa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