@boostxyz/sdk 0.0.0-alpha.18 → 0.0.0-alpha.19
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.js +2 -2
- package/dist/Actions/EventAction.js +2 -2
- package/dist/AllowLists/AllowList.js +2 -2
- package/dist/AllowLists/SimpleAllowList.js +1 -1
- package/dist/AllowLists/SimpleDenyList.js +2 -2
- package/dist/Auth/PassthroughAuth.js +1 -1
- package/dist/BoostCore-BiPwp6SR.cjs.map +1 -1
- package/dist/{BoostCore-C00iqvks.js → BoostCore-kwoUw7YE.js} +5 -5
- package/dist/BoostCore-kwoUw7YE.js.map +1 -0
- package/dist/BoostCore.d.ts +6 -1
- package/dist/BoostCore.d.ts.map +1 -1
- package/dist/BoostCore.js +5 -5
- package/dist/BoostRegistry.cjs +1 -1
- package/dist/BoostRegistry.cjs.map +1 -1
- package/dist/BoostRegistry.d.ts +7 -1
- package/dist/BoostRegistry.d.ts.map +1 -1
- package/dist/BoostRegistry.js +3 -2
- package/dist/BoostRegistry.js.map +1 -1
- package/dist/Budgets/Budget.js +1 -1
- package/dist/Budgets/ManagedBudget.js +1 -1
- package/dist/Deployable/DeployableTarget.js +5 -5
- package/dist/Deployable/DeployableTargetWithRBAC.js +5 -5
- package/dist/{EventAction-BO5WI_5s.js → EventAction-D5tnm00s.js} +2 -2
- package/dist/{EventAction-BO5WI_5s.js.map → EventAction-D5tnm00s.js.map} +1 -1
- package/dist/{Incentive-CF7kaz_9.js → Incentive-Bp8Sez7M.js} +2 -2
- package/dist/{Incentive-CF7kaz_9.js.map → Incentive-Bp8Sez7M.js.map} +1 -1
- package/dist/Incentives/AllowListIncentive.js +2 -2
- package/dist/Incentives/CGDAIncentive.js +1 -1
- package/dist/Incentives/ERC20Incentive.js +1 -1
- package/dist/Incentives/Incentive.js +2 -2
- package/dist/Incentives/PointsIncentive.js +1 -1
- package/dist/{SimpleDenyList-D9i4rw_F.js → SimpleDenyList-Cn5WpNn0.js} +2 -2
- package/dist/{SimpleDenyList-D9i4rw_F.js.map → SimpleDenyList-Cn5WpNn0.js.map} +1 -1
- package/dist/Validators/SignerValidator.js +1 -1
- package/dist/Validators/Validator.js +1 -1
- package/dist/{generated-B8VWObPa.js → generated-B7VaSah4.js} +19 -19
- package/dist/{generated-B8VWObPa.js.map → generated-B7VaSah4.js.map} +1 -1
- package/dist/index.cjs +1 -1
- package/dist/index.js +23 -22
- package/package.json +1 -1
- package/src/BoostCore.ts +8 -3
- package/src/BoostRegistry.ts +11 -3
- package/src/index.test.ts +117 -33
- package/dist/BoostCore-C00iqvks.js.map +0 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"BoostRegistry.js","sources":["../src/BoostRegistry.ts"],"sourcesContent":["import {\n boostRegistryAbi,\n readBoostRegistryGetBaseImplementation,\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 Address,\n type ContractEventName,\n type Hex,\n isAddress,\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 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>\n)[__DEFAULT_CHAIN_ID__];\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 * 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 * 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<Address>} - The address of the deployed clone\n */\n public async getClone(\n identifier: Hex,\n params?: ReadParams<typeof boostRegistryAbi, 'getClone'>,\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 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","instance","payload","baseAddress","simulateBoostRegistryDeployClone","_b","writeBoostRegistryDeployClone","identifier","readBoostRegistryGetBaseImplementation","deployer","readBoostRegistryGetClones","base","readBoostRegistryGetCloneIdentifier","_payload","_options","boostRegistryAbi","bytecode","BoostRegistry"],"mappings":";;;;;oubAsCaA,IACXC,EACA,QAAoB,GAQTC,IAAoD;AAAA,EAC/D,GAAID;AAAAA,EACJ,OAAO;AACT;AAwCA,SAASE,EAEPC,GACsC;AACtC,SAAOA,EAAK,WAAWC,EAAUD,EAAK,OAAO;AAC/C;AAwBA,SAASE,EAEPF,GACyC;AACzC,SAAOA,EAAK,YAAY;AAC1B;AAmCO,MAAMG,IAAN,MAAMA,UAAsBC,EAGjC;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,EAiBA,IAAW,YAAqC;AAC9C,WAAQ,KAAK,YAAqC;AAAA,EACpD;AAAA;AAAA;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oostRegistry.js","sources":["../src/BoostRegistry.ts"],"sourcesContent":["import {\n boostRegistryAbi,\n readBoostRegistryGetBaseImplementation,\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 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 * 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 * 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<Address>} - The address of the deployed clone\n */\n public async getClone(\n identifier: Hex,\n params?: ReadParams<typeof boostRegistryAbi, 'getClone'>,\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 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","instance","payload","baseAddress","simulateBoostRegistryDeployClone","_b","writeBoostRegistryDeployClone","identifier","readBoostRegistryGetBaseImplementation","deployer","readBoostRegistryGetClones","base","readBoostRegistryGetCloneIdentifier","_payload","_options","boostRegistryAbi","bytecode","BoostRegistry"],"mappings":";;;;;oubA8CaA,IACVC,EAA+C,QAAoB,GASzDC,IAAoD;AAAA,EAC/D,GAAID;AAAAA,EACJ,OAAO;AACT;AAwCA,SAASE,EAEPC,GACsC;AACtC,SAAOA,EAAK,WAAWC,EAAUD,EAAK,OAAO;AAC/C;AAwBA,SAASE,EAEPF,GACyC;AACzC,SAAOA,EAAK,YAAY;AAC1B;AAmCO,MAAMG,IAAN,MAAMA,UAAsBC,EAGjC;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,EAiBA,IAAW,YAAqC;AAC9C,WAAQ,KAAK,YAAqC;AAAA,EACpD;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,EAYA,YAAY,EAAE,QAAAC,GAAQ,SAAAC,GAAS,GAAGC,KAAgC;AAChE,QAAIR,EAAwBQ,CAAO,KAAKA,EAAQ;AAC9C,YAAM,EAAE,SAAAD,GAAS,QAAAD,EAAO,GAAGE,EAAQ,OAAO;AAAA,aACjCL,EAA0BK,CAAO;AAC1C,YAAM,EAAE,SAAAD,GAAS,QAAAD,EAAO,GAAG,CAAE,CAAA;AAAA,SACxB;AACC,YAAA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MACV;AAAA,MACA,MAAM,CAACH,GAAcqB,GAAMF,GAAUV,CAAW;AAAA,MAChD,GAAG,KAAK,wBAAwB;AAAA;AAAA,MAEhC,GAAIN;AAAA,IAAA,CACL;AAAA,EACH;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,EAYA,MAAa,cACXH,GACAS,GACAN,GACA;AACO,WAAA,MAAMmB,EAAoC,KAAK,SAAS;AAAA,MAC7D,GAAGvB;AAAA,QACD,KAAK;AAAA,QACL,KAAK;AAAA,QACLI,KAAA,gBAAAA,EAAQ;AAAA,MACV;AAAA,MACA,MAAM,CAACH,GAAcS,CAAW;AAAA,MAChC,GAAG,KAAK,wBAAwB;AAAA;AAAA,MAEhC,GAAIN;AAAA,IAAA,CACL;AAAA,EACH;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,EAUgB,gBACdoB,GACAC,GACyB;AACnB,UAAA,CAAA,EAAG3B,CAAO,IAAI,KAAK,yBAAyB,CAAA,GAAI2B,CAAQ;AACvD,WAAA;AAAA,MACL,KAAKC;AAAAA,MACL,UAAAC;AAAA;AAAA,MAEA,MAAM,CAAC;AAAA,MACP,GAAG,KAAK,wBAAwB7B,EAAQ,OAAO;AAAA,IAAA;AAAA,EAEnD;AACF;AA3WEJ,EAAgB,YAAqCL;AAXhD,IAAMuC,IAANlC;"}
|
package/dist/Budgets/Budget.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { y as a } from "../generated-
|
|
1
|
+
import { y as a } from "../generated-B7VaSah4.js";
|
|
2
2
|
import { a as m } from "../componentInterfaces-RXBMI5yH.js";
|
|
3
3
|
import { readContract as c } from "@wagmi/core";
|
|
4
4
|
import { InvalidComponentInterfaceError as f } from "../errors.js";
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { l as n, G as h, H as u, J as l, K as w, L as p, N as g, Z as A, P as y, Q as m, S as R, U as I, V as _ } from "../generated-
|
|
1
|
+
import { l as n, G as h, H as u, J as l, K as w, L as p, N as g, Z as A, P as y, Q as m, S as R, U as I, V as _ } from "../generated-B7VaSah4.js";
|
|
2
2
|
import { getAccount as P } from "@wagmi/core";
|
|
3
3
|
import { zeroAddress as s, encodeAbiParameters as T, parseAbiParameters as V } from "viem";
|
|
4
4
|
import { M as E } from "../deployments-BM42vImE.js";
|
|
@@ -1,10 +1,10 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { q as d, r as c } from "../generated-B7VaSah4.js";
|
|
2
2
|
import { deployContract as h } from "@wagmi/core";
|
|
3
3
|
import { isAddress as u, zeroAddress as l, isAddressEqual as a } from "viem";
|
|
4
4
|
import { DeployableAlreadyDeployedError as y, DeployableMissingPayloadError as f } from "../errors.js";
|
|
5
|
-
import { RegistryType as
|
|
6
|
-
import { Deployable as
|
|
7
|
-
const i = class i extends
|
|
5
|
+
import { RegistryType as m } from "../utils.js";
|
|
6
|
+
import { Deployable as p } from "./Deployable.js";
|
|
7
|
+
const i = class i extends p {
|
|
8
8
|
/**
|
|
9
9
|
* Creates an instance of DeployableTarget.
|
|
10
10
|
*
|
|
@@ -127,7 +127,7 @@ const i = class i extends m {
|
|
|
127
127
|
return super.validateDeploymentConfig(r, s);
|
|
128
128
|
}
|
|
129
129
|
};
|
|
130
|
-
i.bases = {}, i.registryType =
|
|
130
|
+
i.bases = {}, i.registryType = m.ACTION;
|
|
131
131
|
let o = i;
|
|
132
132
|
export {
|
|
133
133
|
o as DeployableTarget
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { M as h, f as c,
|
|
2
|
-
import { z as
|
|
1
|
+
import { M as h, f as c, e as l, h as d, i as A, j as g, o as u, k as w, n as y, m as R } from "../generated-B7VaSah4.js";
|
|
2
|
+
import { z as N } from "../generated-B7VaSah4.js";
|
|
3
3
|
import { DeployableTarget as f } from "./DeployableTarget.js";
|
|
4
4
|
var o = /* @__PURE__ */ ((r) => (r[r.MANAGER = 1n] = "MANAGER", r[r.ADMIN = 2n] = "ADMIN", r))(o || {});
|
|
5
5
|
class M extends f {
|
|
@@ -72,14 +72,14 @@ class M extends f {
|
|
|
72
72
|
* @returns {Promise<{ hash: `0x${string}`; result: void; }>}
|
|
73
73
|
*/
|
|
74
74
|
async grantRolesRaw(s, t, a) {
|
|
75
|
-
const { request: i, result: e } = await
|
|
75
|
+
const { request: i, result: e } = await l(this._config, {
|
|
76
76
|
address: this.assertValidAddress(),
|
|
77
77
|
args: [s, t],
|
|
78
78
|
...this.optionallyAttachAccount(),
|
|
79
79
|
// biome-ignore lint/suspicious/noExplicitAny: Accept any shape of valid wagmi/viem parameters, wagmi does the same thing internally
|
|
80
80
|
...a
|
|
81
81
|
});
|
|
82
|
-
return { hash: await
|
|
82
|
+
return { hash: await d(
|
|
83
83
|
this._config,
|
|
84
84
|
// biome-ignore lint/suspicious/noExplicitAny: negligible low level lack of type intersection
|
|
85
85
|
i
|
|
@@ -217,6 +217,6 @@ class M extends f {
|
|
|
217
217
|
export {
|
|
218
218
|
M as DeployableTargetWithRBAC,
|
|
219
219
|
o as Roles,
|
|
220
|
-
|
|
220
|
+
N as rbacAbi
|
|
221
221
|
};
|
|
222
222
|
//# sourceMappingURL=DeployableTargetWithRBAC.js.map
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { b8 as M, b9 as K, ba as H, bb as W, bc as $ } from "./generated-
|
|
1
|
+
import { b8 as M, b9 as K, ba as H, bb as W, bc as $ } from "./generated-B7VaSah4.js";
|
|
2
2
|
import { decodeEventLog as Q, decodeFunctionData as X, fromHex as I, isAddressEqual as B, encodeAbiParameters as q } from "viem";
|
|
3
3
|
import { d as z } from "./deployments-BM42vImE.js";
|
|
4
4
|
import { DeployableTarget as J } from "./Deployable/DeployableTarget.js";
|
|
@@ -1352,4 +1352,4 @@ export {
|
|
|
1352
1352
|
w0 as i,
|
|
1353
1353
|
A0 as p
|
|
1354
1354
|
};
|
|
1355
|
-
//# sourceMappingURL=EventAction-
|
|
1355
|
+
//# sourceMappingURL=EventAction-D5tnm00s.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"EventAction-BO5WI_5s.js","sources":["../../../node_modules/.pnpm/ts-pattern@5.4.0/node_modules/ts-pattern/dist/index.js","../src/Actions/EventAction.ts"],"sourcesContent":["const t=Symbol.for(\"@ts-pattern/matcher\"),e=Symbol.for(\"@ts-pattern/isVariadic\"),n=\"@ts-pattern/anonymous-select-key\",r=t=>Boolean(t&&\"object\"==typeof t),i=e=>e&&!!e[t],s=(n,o,c)=>{if(i(n)){const e=n[t](),{matched:r,selections:i}=e.match(o);return r&&i&&Object.keys(i).forEach(t=>c(t,i[t])),r}if(r(n)){if(!r(o))return!1;if(Array.isArray(n)){if(!Array.isArray(o))return!1;let t=[],r=[],a=[];for(const s of n.keys()){const o=n[s];i(o)&&o[e]?a.push(o):a.length?r.push(o):t.push(o)}if(a.length){if(a.length>1)throw new Error(\"Pattern error: Using `...P.array(...)` several times in a single pattern is not allowed.\");if(o.length<t.length+r.length)return!1;const e=o.slice(0,t.length),n=0===r.length?[]:o.slice(-r.length),i=o.slice(t.length,0===r.length?Infinity:-r.length);return t.every((t,n)=>s(t,e[n],c))&&r.every((t,e)=>s(t,n[e],c))&&(0===a.length||s(a[0],i,c))}return n.length===o.length&&n.every((t,e)=>s(t,o[e],c))}return Reflect.ownKeys(n).every(e=>{const r=n[e];return(e in o||i(a=r)&&\"optional\"===a[t]().matcherType)&&s(r,o[e],c);var a})}return Object.is(o,n)},o=e=>{var n,s,a;return r(e)?i(e)?null!=(n=null==(s=(a=e[t]()).getSelectionKeys)?void 0:s.call(a))?n:[]:Array.isArray(e)?c(e,o):c(Object.values(e),o):[]},c=(t,e)=>t.reduce((t,n)=>t.concat(e(n)),[]);function a(...t){if(1===t.length){const[e]=t;return t=>s(e,t,()=>{})}if(2===t.length){const[e,n]=t;return s(e,n,()=>{})}throw new Error(`isMatching wasn't given the right number of arguments: expected 1 or 2, received ${t.length}.`)}function u(t){return Object.assign(t,{optional:()=>h(t),and:e=>m(t,e),or:e=>d(t,e),select:e=>void 0===e?y(t):y(e,t)})}function l(t){return Object.assign((t=>Object.assign(t,{[Symbol.iterator](){let n=0;const r=[{value:Object.assign(t,{[e]:!0}),done:!1},{done:!0,value:void 0}];return{next:()=>{var t;return null!=(t=r[n++])?t:r.at(-1)}}}}))(t),{optional:()=>l(h(t)),select:e=>l(void 0===e?y(t):y(e,t))})}function h(e){return u({[t]:()=>({match:t=>{let n={};const r=(t,e)=>{n[t]=e};return void 0===t?(o(e).forEach(t=>r(t,void 0)),{matched:!0,selections:n}):{matched:s(e,t,r),selections:n}},getSelectionKeys:()=>o(e),matcherType:\"optional\"})})}const f=(t,e)=>{for(const n of t)if(!e(n))return!1;return!0},g=(t,e)=>{for(const[n,r]of t.entries())if(!e(r,n))return!1;return!0};function m(...e){return u({[t]:()=>({match:t=>{let n={};const r=(t,e)=>{n[t]=e};return{matched:e.every(e=>s(e,t,r)),selections:n}},getSelectionKeys:()=>c(e,o),matcherType:\"and\"})})}function d(...e){return u({[t]:()=>({match:t=>{let n={};const r=(t,e)=>{n[t]=e};return c(e,o).forEach(t=>r(t,void 0)),{matched:e.some(e=>s(e,t,r)),selections:n}},getSelectionKeys:()=>c(e,o),matcherType:\"or\"})})}function p(e){return{[t]:()=>({match:t=>({matched:Boolean(e(t))})})}}function y(...e){const r=\"string\"==typeof e[0]?e[0]:void 0,i=2===e.length?e[1]:\"string\"==typeof e[0]?void 0:e[0];return u({[t]:()=>({match:t=>{let e={[null!=r?r:n]:t};return{matched:void 0===i||s(i,t,(t,n)=>{e[t]=n}),selections:e}},getSelectionKeys:()=>[null!=r?r:n].concat(void 0===i?[]:o(i))})})}function v(t){return\"number\"==typeof t}function b(t){return\"string\"==typeof t}function w(t){return\"bigint\"==typeof t}const S=u(p(function(t){return!0})),O=S,j=t=>Object.assign(u(t),{startsWith:e=>{return j(m(t,(n=e,p(t=>b(t)&&t.startsWith(n)))));var n},endsWith:e=>{return j(m(t,(n=e,p(t=>b(t)&&t.endsWith(n)))));var n},minLength:e=>j(m(t,(t=>p(e=>b(e)&&e.length>=t))(e))),length:e=>j(m(t,(t=>p(e=>b(e)&&e.length===t))(e))),maxLength:e=>j(m(t,(t=>p(e=>b(e)&&e.length<=t))(e))),includes:e=>{return j(m(t,(n=e,p(t=>b(t)&&t.includes(n)))));var n},regex:e=>{return j(m(t,(n=e,p(t=>b(t)&&Boolean(t.match(n))))));var n}}),K=j(p(b)),x=t=>Object.assign(u(t),{between:(e,n)=>x(m(t,((t,e)=>p(n=>v(n)&&t<=n&&e>=n))(e,n))),lt:e=>x(m(t,(t=>p(e=>v(e)&&e<t))(e))),gt:e=>x(m(t,(t=>p(e=>v(e)&&e>t))(e))),lte:e=>x(m(t,(t=>p(e=>v(e)&&e<=t))(e))),gte:e=>x(m(t,(t=>p(e=>v(e)&&e>=t))(e))),int:()=>x(m(t,p(t=>v(t)&&Number.isInteger(t)))),finite:()=>x(m(t,p(t=>v(t)&&Number.isFinite(t)))),positive:()=>x(m(t,p(t=>v(t)&&t>0))),negative:()=>x(m(t,p(t=>v(t)&&t<0)))}),E=x(p(v)),A=t=>Object.assign(u(t),{between:(e,n)=>A(m(t,((t,e)=>p(n=>w(n)&&t<=n&&e>=n))(e,n))),lt:e=>A(m(t,(t=>p(e=>w(e)&&e<t))(e))),gt:e=>A(m(t,(t=>p(e=>w(e)&&e>t))(e))),lte:e=>A(m(t,(t=>p(e=>w(e)&&e<=t))(e))),gte:e=>A(m(t,(t=>p(e=>w(e)&&e>=t))(e))),positive:()=>A(m(t,p(t=>w(t)&&t>0))),negative:()=>A(m(t,p(t=>w(t)&&t<0)))}),P=A(p(w)),T=u(p(function(t){return\"boolean\"==typeof t})),B=u(p(function(t){return\"symbol\"==typeof t})),_=u(p(function(t){return null==t})),k=u(p(function(t){return null!=t}));var N={__proto__:null,matcher:t,optional:h,array:function(...e){return l({[t]:()=>({match:t=>{if(!Array.isArray(t))return{matched:!1};if(0===e.length)return{matched:!0};const n=e[0];let r={};if(0===t.length)return o(n).forEach(t=>{r[t]=[]}),{matched:!0,selections:r};const i=(t,e)=>{r[t]=(r[t]||[]).concat([e])};return{matched:t.every(t=>s(n,t,i)),selections:r}},getSelectionKeys:()=>0===e.length?[]:o(e[0])})})},set:function(...e){return u({[t]:()=>({match:t=>{if(!(t instanceof Set))return{matched:!1};let n={};if(0===t.size)return{matched:!0,selections:n};if(0===e.length)return{matched:!0};const r=(t,e)=>{n[t]=(n[t]||[]).concat([e])},i=e[0];return{matched:f(t,t=>s(i,t,r)),selections:n}},getSelectionKeys:()=>0===e.length?[]:o(e[0])})})},map:function(...e){return u({[t]:()=>({match:t=>{if(!(t instanceof Map))return{matched:!1};let n={};if(0===t.size)return{matched:!0,selections:n};const r=(t,e)=>{n[t]=(n[t]||[]).concat([e])};if(0===e.length)return{matched:!0};var i;if(1===e.length)throw new Error(`\\`P.map\\` wasn't given enough arguments. Expected (key, value), received ${null==(i=e[0])?void 0:i.toString()}`);const[o,c]=e;return{matched:g(t,(t,e)=>{const n=s(o,e,r),i=s(c,t,r);return n&&i}),selections:n}},getSelectionKeys:()=>0===e.length?[]:[...o(e[0]),...o(e[1])]})})},intersection:m,union:d,not:function(e){return u({[t]:()=>({match:t=>({matched:!s(e,t,()=>{})}),getSelectionKeys:()=>[],matcherType:\"not\"})})},when:p,select:y,any:S,_:O,string:K,number:E,bigint:P,boolean:T,symbol:B,nullish:_,nonNullable:k,instanceOf:function(t){return u(p(function(t){return e=>e instanceof t}(t)))},shape:function(t){return u(p(a(t)))}};class W extends Error{constructor(t){let e;try{e=JSON.stringify(t)}catch(n){e=t}super(`Pattern matching error: no pattern matches value ${e}`),this.input=void 0,this.input=t}}const $={matched:!1,value:void 0};function z(t){return new I(t,$)}class I{constructor(t,e){this.input=void 0,this.state=void 0,this.input=t,this.state=e}with(...t){if(this.state.matched)return this;const e=t[t.length-1],r=[t[0]];let i;3===t.length&&\"function\"==typeof t[1]?i=t[1]:t.length>2&&r.push(...t.slice(1,t.length-1));let o=!1,c={};const a=(t,e)=>{o=!0,c[t]=e},u=!r.some(t=>s(t,this.input,a))||i&&!Boolean(i(this.input))?$:{matched:!0,value:e(o?n in c?c[n]:c:this.input,this.input)};return new I(this.input,u)}when(t,e){if(this.state.matched)return this;const n=Boolean(t(this.input));return new I(this.input,n?{matched:!0,value:e(this.input,this.input)}:$)}otherwise(t){return this.state.matched?this.state.value:t(this.input)}exhaustive(){if(this.state.matched)return this.state.value;throw new W(this.input)}run(){return this.exhaustive()}returnType(){return this}}export{W as NonExhaustiveError,N as P,N as Pattern,a as isMatching,z as match};\n//# sourceMappingURL=index.js.map\n","import {\n eventActionAbi,\n readEventActionGetActionClaimant,\n readEventActionGetActionSteps,\n simulateEventActionExecute,\n writeEventActionExecute,\n} from '@boostxyz/evm';\nimport { bytecode } from '@boostxyz/evm/artifacts/contracts/actions/EventAction.sol/EventAction.json';\nimport events from '@boostxyz/signatures/events';\nimport functions from '@boostxyz/signatures/functions';\nimport { match } from 'ts-pattern';\nimport {\n type Abi,\n type AbiEvent,\n type AbiFunction,\n type Address,\n type ContractEventName,\n type ContractFunctionName,\n type GetLogsReturnType,\n type GetTransactionParameters,\n type Hex,\n type Log,\n type PublicClient,\n type Transaction,\n decodeEventLog,\n decodeFunctionData,\n encodeAbiParameters,\n fromHex,\n isAddressEqual,\n} from 'viem';\nimport { EventAction as EventActionBases } from '../../dist/deployments.json';\nimport type {\n DeployableOptions,\n GenericDeployableParams,\n} from '../Deployable/Deployable';\nimport { DeployableTarget } from '../Deployable/DeployableTarget';\nimport {\n DecodedArgsMalformedError,\n FieldValueNotComparableError,\n FieldValueUndefinedError,\n FunctionDataDecodeError,\n InvalidNumericalCriteriaError,\n NoEventActionStepsProvidedError,\n TooManyEventActionStepsProvidedError,\n UnparseableAbiParamError,\n UnrecognizedFilterTypeError,\n ValidationAbiMissingError,\n ValidationLogsMissingError,\n} from '../errors';\nimport {\n type GetLogsParams,\n type Overwrite,\n type ReadParams,\n RegistryType,\n type WriteParams,\n} from '../utils';\n\n/*\n * Action Event Payloads\n */\n\n/**\n * Filter types used to determine how criteria are evaluated.\n *\n * @export\n * @enum {number}\n */\nexport enum FilterType {\n EQUAL = 0,\n NOT_EQUAL = 1,\n GREATER_THAN = 2,\n LESS_THAN = 3,\n CONTAINS = 4,\n REGEX = 5,\n}\n\n/**\n * The primitive types supported for filtering.\n *\n * @export\n * @enum {number}\n */\nexport enum PrimitiveType {\n UINT = 0,\n ADDRESS = 1,\n BYTES = 2,\n STRING = 3,\n}\n\n/**\n * Object representation of a `Criteria` struct used in event actions.\n *\n * @export\n * @interface Criteria\n * @typedef {Criteria}\n */\nexport interface Criteria {\n /**\n * The filter type used in this criteria.\n *\n * @type {FilterType}\n */\n filterType: FilterType;\n /**\n * The primitive type of the field being filtered.\n *\n * @type {PrimitiveType}\n */\n fieldType: PrimitiveType;\n /**\n * The index in the logs argument array where the field is located.\n *\n * @type {number}\n */\n fieldIndex: number;\n /**\n * The filter data used for complex filtering.\n *\n * @type {Hex}\n */\n filterData: Hex;\n}\n\n/**\n * Whether a given signature is an event or function\n *\n * @export\n * @enum {number}\n */\nexport enum SignatureType {\n EVENT = 0,\n FUNC = 1,\n}\n\n/**\n * The payload describing how claimants are identified\n *\n * @export\n * @interface ActionClaimant\n * @typedef {ActionClaimant}\n */\nexport interface ActionClaimant {\n /**\n * Whether claimaint is inferred from event or function\n *\n * @type {SignatureType}\n */\n signatureType: SignatureType;\n /**\n * The 4 byte signature of the event or function\n *\n * @type {Hex}\n */\n signature: Hex;\n /**\n * The index corresponding to claimant.\n *\n * @type {number}\n */\n fieldIndex: number;\n /**\n * The address of the target contract\n *\n * @type {Address}\n */\n targetContract: Address;\n /**\n * The chain id of the target contract.\n * @type {number}\n */\n chainid: number;\n}\n\n/**\n * Object representation of an `ActionStep` struct used in event actions.\n *\n * @export\n * @interface ActionStep\n * @typedef {ActionStep}\n */\nexport interface ActionStep {\n /**\n * The signature of the event.\n *\n * @type {Hex}\n */\n signature: Hex;\n /**\n * Whether claimaint is inferred from event or function\n *\n * @type {SignatureType}\n */\n signatureType: SignatureType;\n /**\n * The type of action being performed.\n *\n * @type {number}\n */\n actionType?: number;\n /**\n * The address of the target contract.\n *\n * @type {Address}\n */\n targetContract: Address;\n /**\n * The chain id of the target contract.\n * @type {number}\n */\n chainid: number;\n /**\n * The criteria used for this action step.\n *\n * @type {Criteria}\n */\n actionParameter: Criteria;\n}\n\n/**\n * Parameters for validating an action step.\n *\n * @typedef {Object} ValidateActionStepParams\n * @property {Record<Hex, AbiEvent>} [knownEvents] - Optional record of known events, keyed by their hex signature.\n * @property {AbiEvent} [event] - Optional ABI event definition.\n * @property {EventLogs} [logs] - Event logs to validate against. Required if 'hash' is not provided.\n * @property {Hex} [hash] - Transaction hash to validate against. Required if 'logs' is not provided.\n * @property {number} [chainId] - Chain ID for the transaction. Required if 'hash' is provided.\n */\nexport type ValidateActionStepParams = {\n knownEvents?: Record<Hex, AbiEvent>;\n event?: AbiEvent;\n} & ({ logs: EventLogs } | { hash: Hex; chainId: number });\n\n/**\n * You can either supply a simplified version of the payload, or one that explicitly declares action steps.\n *\n * @export\n * @typedef {EventActionPayload}\n */\nexport type EventActionPayload =\n | EventActionPayloadSimple\n | EventActionPayloadRaw;\n\nexport interface EventActionPayloadSimple {\n /**\n * The payload describing how claimants are identified\n *\n * @type {ActionClaimant}\n */\n actionClaimant: ActionClaimant;\n\n /**\n * Up to 4 action steps.\n * If you supply less than 4, then the last step will be reused to satisfy the EventAction.InitPayload\n * Any more than 4 will throw an error.\n *\n * @type {ActionStep[]}\n */\n actionSteps: ActionStep[];\n}\n\nexport type ActionStepTuple = [ActionStep, ActionStep, ActionStep, ActionStep];\n\n/**\n * Typeguard to determine if a user is supplying a simple or raw EventActionPayload\n *\n * @param {*} opts\n * @returns {opts is EventActionPayloadSimple}\n */\nexport function isEventActionPayloadSimple(\n opts: EventActionPayload,\n): opts is EventActionPayloadSimple {\n return Array.isArray((opts as EventActionPayloadSimple).actionSteps);\n}\n\n/**\n * Object representation of an `InitPayload` struct used to initialize event actions.\n *\n * @export\n * @interface EventActionPayloadRaw\n * @typedef {EventActionPayloadRaw}\n */\nexport interface EventActionPayloadRaw {\n /**\n * The payload describing how claimants are identified\n *\n * @type {ActionClaimant}\n */\n actionClaimant: ActionClaimant;\n /**\n * The first action step.\n *\n * @type {ActionStep}\n */\n actionStepOne: ActionStep;\n /**\n * The second action step.\n *\n * @type {ActionStep}\n */\n actionStepTwo: ActionStep;\n /**\n * The third action step.\n *\n * @type {ActionStep}\n */\n actionStepThree: ActionStep;\n /**\n * The fourth action step.\n *\n * @type {ActionStep}\n */\n actionStepFour: ActionStep;\n}\n\n/**\n * Array of event logs to pass into TxParams\n * @export\n * @typedef {EventLogs}\n */\nexport type EventLogs = GetLogsReturnType<AbiEvent, AbiEvent[], true>;\n\n/**\n * Getter params from the event action contract\n *\n * @export\n * @typedef {ReadEventActionParams}\n * @param {fnName} fnName - The getter function name\n */\nexport type ReadEventActionParams<\n fnName extends ContractFunctionName<typeof eventActionAbi, 'pure' | 'view'>,\n> = ReadParams<typeof eventActionAbi, fnName>;\n\n/**\n * A generic event action\n *\n * @export\n * @class EventAction\n * @typedef {EventAction}\n * @extends {DeployableTarget<EventActionPayload>}\n */\nexport class EventAction extends DeployableTarget<\n EventActionPayload,\n typeof eventActionAbi\n> {\n /**\n * @inheritdoc\n *\n * @public\n * @readonly\n * @type {*}\n */\n public override readonly abi = eventActionAbi;\n /**\n * @inheritdoc\n *\n * @public\n * @static\n * @type {Record<number, Address>}\n */\n public static override bases: Record<number, Address> = {\n ...(EventActionBases as Record<number, Address>),\n };\n /**\n * @inheritdoc\n *\n * @public\n * @static\n * @type {RegistryType}\n */\n public static override registryType: RegistryType = RegistryType.ACTION;\n\n /**\n * Gets a specific action event by index\n *\n * @public\n * @async\n * @param {number} index The index of the action event to retrieve\n * @param {?ReadEventActionParams<'getActionStep'>} [params]\n * @returns {Promise<ActionStep>}\n */\n public async getActionStep(\n index: number,\n params?: ReadEventActionParams<'getActionStep'>,\n ) {\n const steps = await this.getActionSteps(params);\n return steps.at(index);\n }\n\n /**\n * Gets all action events\n *\n * @public\n * @async\n * @param {?ReadEventActionParams<'getActionSteps'>} [params]\n * @returns {Promise<ActionStep[]>}\n */\n public async getActionSteps(\n params?: ReadEventActionParams<'getActionSteps'>,\n ) {\n const steps = (await readEventActionGetActionSteps(this._config, {\n address: this.assertValidAddress(),\n ...this.optionallyAttachAccount(),\n // biome-ignore lint/suspicious/noExplicitAny: Accept any shape of valid wagmi/viem parameters, wagmi does the same thing internally\n ...(params as any),\n })) as RawActionStep[];\n return _dedupeActionSteps(steps.map(_fromRawActionStep));\n }\n\n /**\n * Gets the count of action events\n *\n * @public\n * @async\n * @param {?ReadEventActionParams<'getActionStepsCount'>} [params]\n * @returns {Promise<bigint>}\n */\n public async getActionStepsCount(\n params?: ReadEventActionParams<'getActionStepsCount'>,\n ) {\n const steps = await this.getActionSteps(params);\n return steps.length;\n }\n\n /**\n * Retrieves the payload describing how claimants can be identified from logs or function calls.\n *\n * @public\n * @async\n * @param {?ReadEventActionParams<'getActionClaimant'>} [params]\n * @returns {Promise<ActionClaimant>}\n */\n public async getActionClaimant(\n params?: ReadEventActionParams<'getActionClaimant'>,\n ) {\n const result = (await readEventActionGetActionClaimant(this._config, {\n address: this.assertValidAddress(),\n ...this.optionallyAttachAccount(),\n ...params,\n })) as RawActionClaimant;\n return _fromRawActionStep(result);\n }\n\n /**\n * Executes a prepared event action\n *\n * @public\n * @async\n * @param {Hex} data\n * @param {?WriteParams} [params]\n * @returns {Promise<readonly [boolean, `0x${string}`]>}\n */\n public async execute(\n data: Hex,\n params?: WriteParams<typeof eventActionAbi, 'execute'>,\n ) {\n return await this.awaitResult(this.executeRaw(data, params));\n }\n\n /**\n * Executes a prepared event action\n *\n * @public\n * @async\n * @param {Hex} data\n * @param {?WriteParams} [params]\n * @returns {Promise<{ hash: `0x${string}`; result: readonly [boolean, `0x${string}`]; }>}\n */\n public async executeRaw(\n data: Hex,\n params?: WriteParams<typeof eventActionAbi, 'execute'>,\n ) {\n const { request, result } = await simulateEventActionExecute(this._config, {\n address: this.assertValidAddress(),\n ...this.optionallyAttachAccount(),\n // biome-ignore lint/suspicious/noExplicitAny: Accept any shape of valid wagmi/viem parameters, wagmi does the same thing internally\n ...(params as any),\n args: [data],\n });\n const hash = await writeEventActionExecute(this._config, request);\n return { hash, result };\n }\n\n /**\n * Retrieves action steps, and uses them to validate against, and optionally fetch logs that match the step's signature.\n * If logs are provided in the optional `params` argument, then those logs will be used instead of fetched with the configured client.\n *\n * @public\n * @async\n * @param ValidateActionStepParams params\n * @returns {Promise<boolean>}\n */\n public async validateActionSteps(params: ValidateActionStepParams) {\n const actionSteps = await this.getActionSteps();\n for (const actionStep of actionSteps) {\n if (!(await this.isActionStepValid(actionStep, params))) {\n return false;\n }\n }\n return true;\n }\n\n /**\n * Validates a single action step with a given criteria against logs or function calls.\n * If logs are provided in the optional `params` argument, then those logs will be used instead of being fetched with the configured client.\n * For functions a hash is required.\n *\n * @public\n * @async\n * @param {ActionStep} actionStep - The action step to validate. Can be a function of event step.\n * @param {ValidateActionStepParams} params - Additional parameters for validation, including hash, known events, logs, and chain ID.\n * @returns {Promise<boolean>}\n */\n public async isActionStepValid(\n actionStep: ActionStep,\n params: ValidateActionStepParams,\n ) {\n if (actionStep.signatureType === SignatureType.EVENT) {\n const signature = actionStep.signature;\n let event: AbiEvent;\n // Lookup ABI based on event signature\n if (params.knownEvents) {\n event = params.knownEvents?.[signature] as AbiEvent;\n } else {\n event = (events.abi as Record<Hex, AbiEvent>)[signature] as AbiEvent;\n }\n\n if (!event) {\n throw new ValidationAbiMissingError(signature);\n }\n\n if (this.isArraylikeIndexed(actionStep, event)) {\n // If the field is indexed, we can't filter on it\n throw new UnparseableAbiParamError(\n actionStep.actionParameter.fieldIndex,\n event,\n );\n }\n\n params.event = event;\n\n // Use the provided logs, no need to fetch receipt\n if ('logs' in params) {\n return this.isActionEventValid(actionStep, {\n ...params,\n });\n }\n\n const client = this._config.getClient({\n chainId: params.chainId,\n }) as PublicClient;\n const receipt = await client.getTransactionReceipt({\n hash: params.hash,\n });\n const decodedLogs = receipt.logs.map((log) => {\n const { eventName, args } = decodeEventLog({\n abi: [event],\n data: log.data,\n topics: log.topics,\n });\n\n return { ...log, eventName, args };\n });\n\n return this.isActionEventValid(actionStep, {\n logs: decodedLogs,\n ...params,\n });\n }\n if (actionStep.signatureType === SignatureType.FUNC) {\n if ('hash' in params && 'chainId' in params) {\n const client = this._config.getClient({\n chainId: params.chainId,\n }) as PublicClient;\n const transaction = await client.getTransaction({\n hash: params.hash,\n });\n return this.isActionFunctionValid(actionStep, transaction);\n }\n }\n return false;\n }\n\n /**\n * Validates a single action event with a given criteria against logs.\n * If logs are provided in the optional `params` argument, then those logs will be used instead of being fetched with the configured client.\n *\n * @public\n * @async\n * @param {ActionStep} actionStep - The action step containing the event to validate.\n * @param {ValidateActionStepParams} params - Additional parameters for validation, including known events and logs\n * @returns {Promise<boolean>} Resolves to true if the action event is valid, throws if input is invalid, otherwise false.\n */\n public isActionEventValid(\n actionStep: ActionStep,\n params: ValidateActionStepParams,\n ) {\n if (!('logs' in params)) {\n throw new ValidationLogsMissingError();\n }\n const criteria = actionStep.actionParameter;\n const logs = params.logs;\n if (!logs.length) return false;\n for (let log of logs) {\n if (this.validateLogAgainstCriteria(criteria, log)) {\n return true;\n }\n }\n return false;\n }\n /**\n * Validates a single action function with a given criteria against the transaction input.\n *\n * @public\n * @async\n * @param {ActionStep} actionStep - The action step containing the function to validate.\n * @param {Transaction} transaction - The transaction that will be validated against.\n * @returns {Promise<boolean>} Resolves to true if the action function is valid, throws if the inputs are invalid, otherwise false.\n */\n public isActionFunctionValid(\n actionStep: ActionStep,\n transaction: Transaction,\n ) {\n const criteria = actionStep.actionParameter;\n let signature = actionStep.signature;\n\n const func = (functions.abi as Record<Hex, AbiFunction>)[\n signature\n ] as AbiFunction;\n if (!func) {\n throw new ValidationAbiMissingError(signature);\n }\n\n let decodedData;\n try {\n decodedData = decodeFunctionData({\n abi: [func],\n data: transaction.input,\n });\n } catch (e) {\n throw new FunctionDataDecodeError([func], e as Error);\n }\n\n // Validate the criteria against decoded arguments using fieldIndex\n const decodedArgs = decodedData.args;\n\n if (!decodedArgs || !decodedData) return false;\n\n if (\n !this.validateFunctionAgainstCriteria(\n criteria,\n decodedArgs as (string | bigint)[],\n )\n ) {\n return false;\n }\n\n return true;\n }\n /**\n * Validates a field against a given criteria.\n *\n * @param {Criteria} criteria - The criteria to validate against.\n * @param {string | bigint | Hex} fieldValue - The field value to validate.\n * @param {Object} input - Additional context for validation.\n * @param {EventLogs[0]} [input.log] - The event log, if validating an event.\n * @param {readonly (string | bigint)[]} [input.decodedArgs] - The decoded function arguments, if validating a function call.\n * @returns {Promise<boolean>} - Returns true if the field passes the criteria, false otherwise.\n */\n public validateFieldAgainstCriteria(\n criteria: Criteria,\n fieldValue: string | bigint | Hex,\n input:\n | { log: EventLogs[0] }\n | { decodedArgs: readonly (string | bigint)[] },\n ): boolean {\n // Type narrow based on criteria.filterType\n switch (criteria.filterType) {\n case FilterType.EQUAL:\n return match(criteria.fieldType)\n .with(PrimitiveType.ADDRESS, () =>\n isAddressEqual(criteria.filterData, fieldValue as Address),\n )\n .with(\n PrimitiveType.UINT,\n () => BigInt(fieldValue) === BigInt(criteria.filterData),\n )\n .with(\n PrimitiveType.STRING,\n () => fieldValue === fromHex(criteria.filterData, 'string'),\n )\n .otherwise(() => fieldValue === criteria.filterData);\n\n case FilterType.NOT_EQUAL:\n return match(criteria.fieldType)\n .with(\n PrimitiveType.ADDRESS,\n () => !isAddressEqual(criteria.filterData, fieldValue as Address),\n )\n .with(\n PrimitiveType.UINT,\n () => BigInt(fieldValue) !== BigInt(criteria.filterData),\n )\n .with(\n PrimitiveType.STRING,\n () => fieldValue !== fromHex(criteria.filterData, 'string'),\n )\n .otherwise(() => fieldValue !== criteria.filterData);\n\n case FilterType.GREATER_THAN:\n if (criteria.fieldType === PrimitiveType.UINT) {\n return BigInt(fieldValue) > BigInt(criteria.filterData);\n }\n throw new InvalidNumericalCriteriaError({\n ...input,\n criteria,\n fieldValue,\n });\n\n case FilterType.LESS_THAN:\n if (criteria.fieldType === PrimitiveType.UINT) {\n return BigInt(fieldValue) < BigInt(criteria.filterData);\n }\n throw new InvalidNumericalCriteriaError({\n ...input,\n criteria,\n fieldValue,\n });\n\n case FilterType.CONTAINS:\n if (\n criteria.fieldType === PrimitiveType.BYTES ||\n criteria.fieldType === PrimitiveType.STRING\n ) {\n let substring;\n if (criteria.fieldType === PrimitiveType.STRING) {\n substring = fromHex(criteria.filterData, 'string');\n } else {\n // truncate the `0x` prefix\n substring = criteria.filterData.slice(2);\n }\n return (fieldValue as string).includes(substring);\n }\n throw new FieldValueNotComparableError({\n ...input,\n criteria,\n fieldValue,\n });\n\n case FilterType.REGEX:\n if (typeof fieldValue !== 'string') {\n throw new FieldValueNotComparableError({\n ...input,\n criteria,\n fieldValue,\n });\n }\n\n if (criteria.fieldType === PrimitiveType.STRING) {\n // fieldValue is decoded by the ABI\n const regexString = fromHex(criteria.filterData, 'string');\n return new RegExp(regexString).test(fieldValue);\n }\n\n default:\n throw new UnrecognizedFilterTypeError({\n ...input,\n criteria,\n fieldValue,\n });\n }\n }\n\n /**\n * Validates a {@link Log} against a given criteria.\n *\n * @param {Criteria} criteria - The criteria to validate against.\n * @param {Log} log - The Viem event log.\n * @returns {Promise<boolean>} - Returns true if the log passes the criteria, false otherwise.\n */\n public validateLogAgainstCriteria(\n criteria: Criteria,\n log: EventLogs[0],\n ): boolean {\n if (!Array.isArray(log.args) || log.args.length <= criteria.fieldIndex) {\n throw new DecodedArgsMalformedError({\n log,\n criteria,\n fieldValue: undefined,\n });\n }\n\n const fieldValue = log.args.at(criteria.fieldIndex);\n if (fieldValue === undefined) {\n throw new FieldValueUndefinedError({ log, criteria, fieldValue });\n }\n return this.validateFieldAgainstCriteria(criteria, fieldValue, { log });\n }\n\n /**\n * Validates a function's decoded arguments against a given criteria.\n *\n * @param {Criteria} criteria - The criteria to validate against.\n * @param {unknown[]} decodedArgs - The decoded arguments of the function call.\n * @returns {Promise<boolean>} - Returns true if the decoded argument passes the criteria, false otherwise.\n */\n public validateFunctionAgainstCriteria(\n criteria: Criteria,\n decodedArgs: readonly (string | bigint)[],\n ): boolean {\n const fieldValue = decodedArgs[criteria.fieldIndex];\n if (fieldValue === undefined) {\n throw new FieldValueUndefinedError({\n criteria,\n fieldValue,\n });\n }\n return this.validateFieldAgainstCriteria(criteria, fieldValue, {\n decodedArgs,\n });\n }\n\n /**\n * @inheritdoc\n *\n * @public\n * @param {?EventActionPayload} [_payload]\n * @param {?DeployableOptions} [_options]\n * @returns {GenericDeployableParams}\n */\n public override buildParameters(\n _payload?: EventActionPayload,\n _options?: DeployableOptions,\n ): GenericDeployableParams {\n const [payload, options] = this.validateDeploymentConfig(\n _payload,\n _options,\n );\n let rawPayload: EventActionPayloadRaw;\n if (isEventActionPayloadSimple(payload)) {\n // filter out any falsy potential values\n let tmpSteps: ActionStep[] = payload.actionSteps.filter((step) => !!step);\n if (tmpSteps.length === 0) {\n throw new NoEventActionStepsProvidedError();\n }\n if (tmpSteps.length > 4) {\n throw new TooManyEventActionStepsProvidedError();\n }\n let steps: ActionStepTuple = Array.from({ length: 4 }, (_, i) => {\n // use either the provided step at the given index, or reuse the previous step\n // should aways exist\n return tmpSteps.at(i) || tmpSteps.at(-1);\n }) as ActionStepTuple;\n rawPayload = {\n actionClaimant: payload.actionClaimant,\n actionStepOne: steps[0],\n actionStepTwo: steps[1],\n actionStepThree: steps[2],\n actionStepFour: steps[3],\n };\n } else {\n rawPayload = payload;\n }\n return {\n abi: eventActionAbi,\n bytecode: bytecode as Hex,\n args: [prepareEventActionPayload(rawPayload)],\n ...this.optionallyAttachAccount(options.account),\n };\n }\n\n public isArraylikeIndexed(step: ActionStep, event: AbiEvent) {\n if (\n (step.actionParameter.fieldType === PrimitiveType.STRING ||\n step.actionParameter.fieldType === PrimitiveType.BYTES) &&\n event.inputs[step.actionParameter.fieldIndex]?.indexed\n ) {\n return true;\n }\n return false;\n }\n}\n\nfunction _dedupeActionSteps(_steps: ActionStep[]): ActionStep[] {\n const steps: ActionStep[] = [],\n signatures: Record<string, boolean> = {};\n for (let step of _steps) {\n const signature = JSON.stringify(step);\n if (signatures[signature]) continue;\n steps.push(step);\n signatures[signature] = true;\n }\n return steps;\n}\ntype RawActionStep = Overwrite<ActionStep, { chainid: bigint }>;\ntype RawActionClaimant = Overwrite<ActionClaimant, { chainid: bigint }>;\n\nfunction _toRawActionStep<T extends ActionStep | ActionClaimant>(obj: T) {\n return {\n ...obj,\n chainid: BigInt(obj.chainid),\n };\n}\n\nfunction _fromRawActionStep<T extends RawActionStep | RawActionClaimant>(\n obj: T,\n) {\n if (obj.chainid > BigInt(Number.MAX_SAFE_INTEGER)) {\n throw new Error('Chain ID exceeds max safe integer');\n }\n\n return {\n ...obj,\n chainid: Number(obj.chainid),\n };\n}\n\n/**\n * Typeguard to determine if a user is supplying a simple or raw EventActionPayload\n *\n * @param {*} opts\n * @returns {opts is EventActionPayloadSimple}\n */\nfunction _isEventActionPayloadSimple(\n opts: EventActionPayload,\n): opts is EventActionPayloadSimple {\n return Array.isArray((opts as EventActionPayloadSimple).actionSteps);\n}\n\n/**\n * Function to properly encode an event action payload.\n *\n * @param {InitPayload} param0\n * @param {ActionStep} param0.actionStepOne - The first action step to initialize.\n * @param {ActionStep} param0.actionStepTwo - The second action step to initialize.\n * @param {ActionStep} param0.actionStepThree - The third action step to initialize.\n * @param {ActionStep} param0.actionStepFour - The fourth action step to initialize.\n * @returns {Hex}\n */\nexport function prepareEventActionPayload({\n actionClaimant,\n actionStepOne,\n actionStepTwo,\n actionStepThree,\n actionStepFour,\n}: EventActionPayloadRaw) {\n // note chainIds are technically uint256 but viem treats them (safely) as numbers,\n // so we encode them as uint32 here to avoid downcast issues\n return encodeAbiParameters(\n [\n {\n type: 'tuple',\n name: 'initPayload',\n components: [\n {\n type: 'tuple',\n name: 'actionClaimant',\n components: [\n { type: 'uint8', name: 'signatureType' },\n { type: 'bytes32', name: 'signature' },\n { type: 'uint8', name: 'fieldIndex' },\n { type: 'address', name: 'targetContract' },\n { type: 'uint256', name: 'chainid' },\n ],\n },\n {\n type: 'tuple',\n name: 'actionStepOne',\n components: [\n { type: 'bytes32', name: 'signature' },\n { type: 'uint8', name: 'signatureType' },\n { type: 'uint8', name: 'actionType' },\n { type: 'address', name: 'targetContract' },\n { type: 'uint256', name: 'chainid' },\n {\n type: 'tuple',\n name: 'actionParameter',\n components: [\n { type: 'uint8', name: 'filterType' },\n { type: 'uint8', name: 'fieldType' },\n { type: 'uint8', name: 'fieldIndex' },\n { type: 'bytes', name: 'filterData' },\n ],\n },\n ],\n },\n {\n type: 'tuple',\n name: 'actionStepTwo',\n components: [\n { type: 'bytes32', name: 'signature' },\n { type: 'uint8', name: 'signatureType' },\n { type: 'uint8', name: 'actionType' },\n { type: 'address', name: 'targetContract' },\n { type: 'uint256', name: 'chainid' },\n {\n type: 'tuple',\n name: 'actionParameter',\n components: [\n { type: 'uint8', name: 'filterType' },\n { type: 'uint8', name: 'fieldType' },\n { type: 'uint8', name: 'fieldIndex' },\n { type: 'bytes', name: 'filterData' },\n ],\n },\n ],\n },\n {\n type: 'tuple',\n name: 'actionStepThree',\n components: [\n { type: 'bytes32', name: 'signature' },\n { type: 'uint8', name: 'signatureType' },\n { type: 'uint8', name: 'actionType' },\n { type: 'address', name: 'targetContract' },\n { type: 'uint256', name: 'chainid' },\n {\n type: 'tuple',\n name: 'actionParameter',\n components: [\n { type: 'uint8', name: 'filterType' },\n { type: 'uint8', name: 'fieldType' },\n { type: 'uint8', name: 'fieldIndex' },\n { type: 'bytes', name: 'filterData' },\n ],\n },\n ],\n },\n {\n type: 'tuple',\n name: 'actionStepFour',\n components: [\n { type: 'bytes32', name: 'signature' },\n { type: 'uint8', name: 'signatureType' },\n { type: 'uint8', name: 'actionType' },\n { type: 'address', name: 'targetContract' },\n { type: 'uint256', name: 'chainid' },\n {\n type: 'tuple',\n name: 'actionParameter',\n components: [\n { type: 'uint8', name: 'filterType' },\n { type: 'uint8', name: 'fieldType' },\n { type: 'uint8', name: 'fieldIndex' },\n { type: 'bytes', name: 'filterData' },\n ],\n },\n ],\n },\n ],\n },\n ],\n [\n {\n actionClaimant: _toRawActionStep(actionClaimant),\n actionStepOne: {\n ..._toRawActionStep(actionStepOne),\n actionType: actionStepOne.actionType || 0,\n },\n actionStepTwo: {\n ..._toRawActionStep(actionStepTwo),\n actionType: actionStepTwo.actionType || 0,\n },\n actionStepThree: {\n ..._toRawActionStep(actionStepThree),\n actionType: actionStepThree.actionType || 0,\n },\n actionStepFour: {\n ..._toRawActionStep(actionStepFour),\n actionType: actionStepFour.actionType || 0,\n },\n },\n ],\n );\n}\n"],"names":["t","e","n","r","i","s","o","c","a","u","h","m","d","y","p","v","b","w","j","x","A","W","$","z","I","FilterType","PrimitiveType","SignatureType","isEventActionPayloadSimple","opts","_EventAction","DeployableTarget","eventActionAbi","index","params","steps","readEventActionGetActionSteps","_dedupeActionSteps","_fromRawActionStep","result","readEventActionGetActionClaimant","data","request","simulateEventActionExecute","writeEventActionExecute","actionSteps","actionStep","signature","event","_a","events","ValidationAbiMissingError","UnparseableAbiParamError","decodedLogs","log","eventName","args","decodeEventLog","transaction","ValidationLogsMissingError","criteria","logs","func","functions","decodedData","decodeFunctionData","FunctionDataDecodeError","decodedArgs","fieldValue","input","match","isAddressEqual","fromHex","InvalidNumericalCriteriaError","substring","FieldValueNotComparableError","regexString","UnrecognizedFilterTypeError","DecodedArgsMalformedError","FieldValueUndefinedError","_payload","_options","payload","options","rawPayload","tmpSteps","step","NoEventActionStepsProvidedError","TooManyEventActionStepsProvidedError","_","bytecode","prepareEventActionPayload","EventActionBases","RegistryType","EventAction","_steps","signatures","_toRawActionStep","obj","actionClaimant","actionStepOne","actionStepTwo","actionStepThree","actionStepFour","encode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AAAA,kBACpC,EAAE,MAAM,SAAS,MAAM,aAAa;AAAA,gBACtC;AAAA,cACF;AAAA,YACF;AAAA,UACF;AAAA,QACF;AAAA,MACF;AAAA,IACF;AAAA,IACA;AAAA,MACE;AAAA,QACE,gBAAgBP,EAAiBE,CAAc;AAAA,QAC/C,eAAe;AAAA,UACb,GAAGF,EAAiBG,CAAa;AAAA,UACjC,YAAYA,EAAc,cAAc;AAAA,QAC1C;AAAA,QACA,eAAe;AAAA,UACb,GAAGH,EAAiBI,CAAa;AAAA,UACjC,YAAYA,EAAc,cAAc;AAAA,QAC1C;AAAA,QACA,iBAAiB;AAAA,UACf,GAAGJ,EAAiBK,CAAe;AAAA,UACnC,YAAYA,EAAgB,cAAc;AAAA,QAC5C;AAAA,QACA,gBAAgB;AAAA,UACd,GAAGL,EAAiBM,CAAc;AAAA,UAClC,YAAYA,EAAe,cAAc;AAAA,QAC3C;AAAA,MACF;AAAA,IACF;AAAA,EAAA;AAEJ;","x_google_ignoreList":[0]}
|
|
1
|
+
{"version":3,"file":"EventAction-D5tnm00s.js","sources":["../../../node_modules/.pnpm/ts-pattern@5.4.0/node_modules/ts-pattern/dist/index.js","../src/Actions/EventAction.ts"],"sourcesContent":["const t=Symbol.for(\"@ts-pattern/matcher\"),e=Symbol.for(\"@ts-pattern/isVariadic\"),n=\"@ts-pattern/anonymous-select-key\",r=t=>Boolean(t&&\"object\"==typeof t),i=e=>e&&!!e[t],s=(n,o,c)=>{if(i(n)){const e=n[t](),{matched:r,selections:i}=e.match(o);return r&&i&&Object.keys(i).forEach(t=>c(t,i[t])),r}if(r(n)){if(!r(o))return!1;if(Array.isArray(n)){if(!Array.isArray(o))return!1;let t=[],r=[],a=[];for(const s of n.keys()){const o=n[s];i(o)&&o[e]?a.push(o):a.length?r.push(o):t.push(o)}if(a.length){if(a.length>1)throw new Error(\"Pattern error: Using `...P.array(...)` several times in a single pattern is not allowed.\");if(o.length<t.length+r.length)return!1;const e=o.slice(0,t.length),n=0===r.length?[]:o.slice(-r.length),i=o.slice(t.length,0===r.length?Infinity:-r.length);return t.every((t,n)=>s(t,e[n],c))&&r.every((t,e)=>s(t,n[e],c))&&(0===a.length||s(a[0],i,c))}return n.length===o.length&&n.every((t,e)=>s(t,o[e],c))}return Reflect.ownKeys(n).every(e=>{const r=n[e];return(e in o||i(a=r)&&\"optional\"===a[t]().matcherType)&&s(r,o[e],c);var a})}return Object.is(o,n)},o=e=>{var n,s,a;return r(e)?i(e)?null!=(n=null==(s=(a=e[t]()).getSelectionKeys)?void 0:s.call(a))?n:[]:Array.isArray(e)?c(e,o):c(Object.values(e),o):[]},c=(t,e)=>t.reduce((t,n)=>t.concat(e(n)),[]);function a(...t){if(1===t.length){const[e]=t;return t=>s(e,t,()=>{})}if(2===t.length){const[e,n]=t;return s(e,n,()=>{})}throw new Error(`isMatching wasn't given the right number of arguments: expected 1 or 2, received ${t.length}.`)}function u(t){return Object.assign(t,{optional:()=>h(t),and:e=>m(t,e),or:e=>d(t,e),select:e=>void 0===e?y(t):y(e,t)})}function l(t){return Object.assign((t=>Object.assign(t,{[Symbol.iterator](){let n=0;const r=[{value:Object.assign(t,{[e]:!0}),done:!1},{done:!0,value:void 0}];return{next:()=>{var t;return null!=(t=r[n++])?t:r.at(-1)}}}}))(t),{optional:()=>l(h(t)),select:e=>l(void 0===e?y(t):y(e,t))})}function h(e){return u({[t]:()=>({match:t=>{let n={};const r=(t,e)=>{n[t]=e};return void 0===t?(o(e).forEach(t=>r(t,void 0)),{matched:!0,selections:n}):{matched:s(e,t,r),selections:n}},getSelectionKeys:()=>o(e),matcherType:\"optional\"})})}const f=(t,e)=>{for(const n of t)if(!e(n))return!1;return!0},g=(t,e)=>{for(const[n,r]of t.entries())if(!e(r,n))return!1;return!0};function m(...e){return u({[t]:()=>({match:t=>{let n={};const r=(t,e)=>{n[t]=e};return{matched:e.every(e=>s(e,t,r)),selections:n}},getSelectionKeys:()=>c(e,o),matcherType:\"and\"})})}function d(...e){return u({[t]:()=>({match:t=>{let n={};const r=(t,e)=>{n[t]=e};return c(e,o).forEach(t=>r(t,void 0)),{matched:e.some(e=>s(e,t,r)),selections:n}},getSelectionKeys:()=>c(e,o),matcherType:\"or\"})})}function p(e){return{[t]:()=>({match:t=>({matched:Boolean(e(t))})})}}function y(...e){const r=\"string\"==typeof e[0]?e[0]:void 0,i=2===e.length?e[1]:\"string\"==typeof e[0]?void 0:e[0];return u({[t]:()=>({match:t=>{let e={[null!=r?r:n]:t};return{matched:void 0===i||s(i,t,(t,n)=>{e[t]=n}),selections:e}},getSelectionKeys:()=>[null!=r?r:n].concat(void 0===i?[]:o(i))})})}function v(t){return\"number\"==typeof t}function b(t){return\"string\"==typeof t}function w(t){return\"bigint\"==typeof t}const S=u(p(function(t){return!0})),O=S,j=t=>Object.assign(u(t),{startsWith:e=>{return j(m(t,(n=e,p(t=>b(t)&&t.startsWith(n)))));var n},endsWith:e=>{return j(m(t,(n=e,p(t=>b(t)&&t.endsWith(n)))));var n},minLength:e=>j(m(t,(t=>p(e=>b(e)&&e.length>=t))(e))),length:e=>j(m(t,(t=>p(e=>b(e)&&e.length===t))(e))),maxLength:e=>j(m(t,(t=>p(e=>b(e)&&e.length<=t))(e))),includes:e=>{return j(m(t,(n=e,p(t=>b(t)&&t.includes(n)))));var n},regex:e=>{return j(m(t,(n=e,p(t=>b(t)&&Boolean(t.match(n))))));var n}}),K=j(p(b)),x=t=>Object.assign(u(t),{between:(e,n)=>x(m(t,((t,e)=>p(n=>v(n)&&t<=n&&e>=n))(e,n))),lt:e=>x(m(t,(t=>p(e=>v(e)&&e<t))(e))),gt:e=>x(m(t,(t=>p(e=>v(e)&&e>t))(e))),lte:e=>x(m(t,(t=>p(e=>v(e)&&e<=t))(e))),gte:e=>x(m(t,(t=>p(e=>v(e)&&e>=t))(e))),int:()=>x(m(t,p(t=>v(t)&&Number.isInteger(t)))),finite:()=>x(m(t,p(t=>v(t)&&Number.isFinite(t)))),positive:()=>x(m(t,p(t=>v(t)&&t>0))),negative:()=>x(m(t,p(t=>v(t)&&t<0)))}),E=x(p(v)),A=t=>Object.assign(u(t),{between:(e,n)=>A(m(t,((t,e)=>p(n=>w(n)&&t<=n&&e>=n))(e,n))),lt:e=>A(m(t,(t=>p(e=>w(e)&&e<t))(e))),gt:e=>A(m(t,(t=>p(e=>w(e)&&e>t))(e))),lte:e=>A(m(t,(t=>p(e=>w(e)&&e<=t))(e))),gte:e=>A(m(t,(t=>p(e=>w(e)&&e>=t))(e))),positive:()=>A(m(t,p(t=>w(t)&&t>0))),negative:()=>A(m(t,p(t=>w(t)&&t<0)))}),P=A(p(w)),T=u(p(function(t){return\"boolean\"==typeof t})),B=u(p(function(t){return\"symbol\"==typeof t})),_=u(p(function(t){return null==t})),k=u(p(function(t){return null!=t}));var N={__proto__:null,matcher:t,optional:h,array:function(...e){return l({[t]:()=>({match:t=>{if(!Array.isArray(t))return{matched:!1};if(0===e.length)return{matched:!0};const n=e[0];let r={};if(0===t.length)return o(n).forEach(t=>{r[t]=[]}),{matched:!0,selections:r};const i=(t,e)=>{r[t]=(r[t]||[]).concat([e])};return{matched:t.every(t=>s(n,t,i)),selections:r}},getSelectionKeys:()=>0===e.length?[]:o(e[0])})})},set:function(...e){return u({[t]:()=>({match:t=>{if(!(t instanceof Set))return{matched:!1};let n={};if(0===t.size)return{matched:!0,selections:n};if(0===e.length)return{matched:!0};const r=(t,e)=>{n[t]=(n[t]||[]).concat([e])},i=e[0];return{matched:f(t,t=>s(i,t,r)),selections:n}},getSelectionKeys:()=>0===e.length?[]:o(e[0])})})},map:function(...e){return u({[t]:()=>({match:t=>{if(!(t instanceof Map))return{matched:!1};let n={};if(0===t.size)return{matched:!0,selections:n};const r=(t,e)=>{n[t]=(n[t]||[]).concat([e])};if(0===e.length)return{matched:!0};var i;if(1===e.length)throw new Error(`\\`P.map\\` wasn't given enough arguments. Expected (key, value), received ${null==(i=e[0])?void 0:i.toString()}`);const[o,c]=e;return{matched:g(t,(t,e)=>{const n=s(o,e,r),i=s(c,t,r);return n&&i}),selections:n}},getSelectionKeys:()=>0===e.length?[]:[...o(e[0]),...o(e[1])]})})},intersection:m,union:d,not:function(e){return u({[t]:()=>({match:t=>({matched:!s(e,t,()=>{})}),getSelectionKeys:()=>[],matcherType:\"not\"})})},when:p,select:y,any:S,_:O,string:K,number:E,bigint:P,boolean:T,symbol:B,nullish:_,nonNullable:k,instanceOf:function(t){return u(p(function(t){return e=>e instanceof t}(t)))},shape:function(t){return u(p(a(t)))}};class W extends Error{constructor(t){let e;try{e=JSON.stringify(t)}catch(n){e=t}super(`Pattern matching error: no pattern matches value ${e}`),this.input=void 0,this.input=t}}const $={matched:!1,value:void 0};function z(t){return new I(t,$)}class I{constructor(t,e){this.input=void 0,this.state=void 0,this.input=t,this.state=e}with(...t){if(this.state.matched)return this;const e=t[t.length-1],r=[t[0]];let i;3===t.length&&\"function\"==typeof t[1]?i=t[1]:t.length>2&&r.push(...t.slice(1,t.length-1));let o=!1,c={};const a=(t,e)=>{o=!0,c[t]=e},u=!r.some(t=>s(t,this.input,a))||i&&!Boolean(i(this.input))?$:{matched:!0,value:e(o?n in c?c[n]:c:this.input,this.input)};return new I(this.input,u)}when(t,e){if(this.state.matched)return this;const n=Boolean(t(this.input));return new I(this.input,n?{matched:!0,value:e(this.input,this.input)}:$)}otherwise(t){return this.state.matched?this.state.value:t(this.input)}exhaustive(){if(this.state.matched)return this.state.value;throw new W(this.input)}run(){return this.exhaustive()}returnType(){return this}}export{W as NonExhaustiveError,N as P,N as Pattern,a as isMatching,z as match};\n//# sourceMappingURL=index.js.map\n","import {\n eventActionAbi,\n readEventActionGetActionClaimant,\n readEventActionGetActionSteps,\n simulateEventActionExecute,\n writeEventActionExecute,\n} from '@boostxyz/evm';\nimport { bytecode } from '@boostxyz/evm/artifacts/contracts/actions/EventAction.sol/EventAction.json';\nimport events from '@boostxyz/signatures/events';\nimport functions from '@boostxyz/signatures/functions';\nimport { match } from 'ts-pattern';\nimport {\n type Abi,\n type AbiEvent,\n type AbiFunction,\n type Address,\n type ContractEventName,\n type ContractFunctionName,\n type GetLogsReturnType,\n type GetTransactionParameters,\n type Hex,\n type Log,\n type PublicClient,\n type Transaction,\n decodeEventLog,\n decodeFunctionData,\n encodeAbiParameters,\n fromHex,\n isAddressEqual,\n} from 'viem';\nimport { EventAction as EventActionBases } from '../../dist/deployments.json';\nimport type {\n DeployableOptions,\n GenericDeployableParams,\n} from '../Deployable/Deployable';\nimport { DeployableTarget } from '../Deployable/DeployableTarget';\nimport {\n DecodedArgsMalformedError,\n FieldValueNotComparableError,\n FieldValueUndefinedError,\n FunctionDataDecodeError,\n InvalidNumericalCriteriaError,\n NoEventActionStepsProvidedError,\n TooManyEventActionStepsProvidedError,\n UnparseableAbiParamError,\n UnrecognizedFilterTypeError,\n ValidationAbiMissingError,\n ValidationLogsMissingError,\n} from '../errors';\nimport {\n type GetLogsParams,\n type Overwrite,\n type ReadParams,\n RegistryType,\n type WriteParams,\n} from '../utils';\n\n/*\n * Action Event Payloads\n */\n\n/**\n * Filter types used to determine how criteria are evaluated.\n *\n * @export\n * @enum {number}\n */\nexport enum FilterType {\n EQUAL = 0,\n NOT_EQUAL = 1,\n GREATER_THAN = 2,\n LESS_THAN = 3,\n CONTAINS = 4,\n REGEX = 5,\n}\n\n/**\n * The primitive types supported for filtering.\n *\n * @export\n * @enum {number}\n */\nexport enum PrimitiveType {\n UINT = 0,\n ADDRESS = 1,\n BYTES = 2,\n STRING = 3,\n}\n\n/**\n * Object representation of a `Criteria` struct used in event actions.\n *\n * @export\n * @interface Criteria\n * @typedef {Criteria}\n */\nexport interface Criteria {\n /**\n * The filter type used in this criteria.\n *\n * @type {FilterType}\n */\n filterType: FilterType;\n /**\n * The primitive type of the field being filtered.\n *\n * @type {PrimitiveType}\n */\n fieldType: PrimitiveType;\n /**\n * The index in the logs argument array where the field is located.\n *\n * @type {number}\n */\n fieldIndex: number;\n /**\n * The filter data used for complex filtering.\n *\n * @type {Hex}\n */\n filterData: Hex;\n}\n\n/**\n * Whether a given signature is an event or function\n *\n * @export\n * @enum {number}\n */\nexport enum SignatureType {\n EVENT = 0,\n FUNC = 1,\n}\n\n/**\n * The payload describing how claimants are identified\n *\n * @export\n * @interface ActionClaimant\n * @typedef {ActionClaimant}\n */\nexport interface ActionClaimant {\n /**\n * Whether claimaint is inferred from event or function\n *\n * @type {SignatureType}\n */\n signatureType: SignatureType;\n /**\n * The 4 byte signature of the event or function\n *\n * @type {Hex}\n */\n signature: Hex;\n /**\n * The index corresponding to claimant.\n *\n * @type {number}\n */\n fieldIndex: number;\n /**\n * The address of the target contract\n *\n * @type {Address}\n */\n targetContract: Address;\n /**\n * The chain id of the target contract.\n * @type {number}\n */\n chainid: number;\n}\n\n/**\n * Object representation of an `ActionStep` struct used in event actions.\n *\n * @export\n * @interface ActionStep\n * @typedef {ActionStep}\n */\nexport interface ActionStep {\n /**\n * The signature of the event.\n *\n * @type {Hex}\n */\n signature: Hex;\n /**\n * Whether claimaint is inferred from event or function\n *\n * @type {SignatureType}\n */\n signatureType: SignatureType;\n /**\n * The type of action being performed.\n *\n * @type {number}\n */\n actionType?: number;\n /**\n * The address of the target contract.\n *\n * @type {Address}\n */\n targetContract: Address;\n /**\n * The chain id of the target contract.\n * @type {number}\n */\n chainid: number;\n /**\n * The criteria used for this action step.\n *\n * @type {Criteria}\n */\n actionParameter: Criteria;\n}\n\n/**\n * Parameters for validating an action step.\n *\n * @typedef {Object} ValidateActionStepParams\n * @property {Record<Hex, AbiEvent>} [knownEvents] - Optional record of known events, keyed by their hex signature.\n * @property {AbiEvent} [event] - Optional ABI event definition.\n * @property {EventLogs} [logs] - Event logs to validate against. Required if 'hash' is not provided.\n * @property {Hex} [hash] - Transaction hash to validate against. Required if 'logs' is not provided.\n * @property {number} [chainId] - Chain ID for the transaction. Required if 'hash' is provided.\n */\nexport type ValidateActionStepParams = {\n knownEvents?: Record<Hex, AbiEvent>;\n event?: AbiEvent;\n} & ({ logs: EventLogs } | { hash: Hex; chainId: number });\n\n/**\n * You can either supply a simplified version of the payload, or one that explicitly declares action steps.\n *\n * @export\n * @typedef {EventActionPayload}\n */\nexport type EventActionPayload =\n | EventActionPayloadSimple\n | EventActionPayloadRaw;\n\nexport interface EventActionPayloadSimple {\n /**\n * The payload describing how claimants are identified\n *\n * @type {ActionClaimant}\n */\n actionClaimant: ActionClaimant;\n\n /**\n * Up to 4 action steps.\n * If you supply less than 4, then the last step will be reused to satisfy the EventAction.InitPayload\n * Any more than 4 will throw an error.\n *\n * @type {ActionStep[]}\n */\n actionSteps: ActionStep[];\n}\n\nexport type ActionStepTuple = [ActionStep, ActionStep, ActionStep, ActionStep];\n\n/**\n * Typeguard to determine if a user is supplying a simple or raw EventActionPayload\n *\n * @param {*} opts\n * @returns {opts is EventActionPayloadSimple}\n */\nexport function isEventActionPayloadSimple(\n opts: EventActionPayload,\n): opts is EventActionPayloadSimple {\n return Array.isArray((opts as EventActionPayloadSimple).actionSteps);\n}\n\n/**\n * Object representation of an `InitPayload` struct used to initialize event actions.\n *\n * @export\n * @interface EventActionPayloadRaw\n * @typedef {EventActionPayloadRaw}\n */\nexport interface EventActionPayloadRaw {\n /**\n * The payload describing how claimants are identified\n *\n * @type {ActionClaimant}\n */\n actionClaimant: ActionClaimant;\n /**\n * The first action step.\n *\n * @type {ActionStep}\n */\n actionStepOne: ActionStep;\n /**\n * The second action step.\n *\n * @type {ActionStep}\n */\n actionStepTwo: ActionStep;\n /**\n * The third action step.\n *\n * @type {ActionStep}\n */\n actionStepThree: ActionStep;\n /**\n * The fourth action step.\n *\n * @type {ActionStep}\n */\n actionStepFour: ActionStep;\n}\n\n/**\n * Array of event logs to pass into TxParams\n * @export\n * @typedef {EventLogs}\n */\nexport type EventLogs = GetLogsReturnType<AbiEvent, AbiEvent[], true>;\n\n/**\n * Getter params from the event action contract\n *\n * @export\n * @typedef {ReadEventActionParams}\n * @param {fnName} fnName - The getter function name\n */\nexport type ReadEventActionParams<\n fnName extends ContractFunctionName<typeof eventActionAbi, 'pure' | 'view'>,\n> = ReadParams<typeof eventActionAbi, fnName>;\n\n/**\n * A generic event action\n *\n * @export\n * @class EventAction\n * @typedef {EventAction}\n * @extends {DeployableTarget<EventActionPayload>}\n */\nexport class EventAction extends DeployableTarget<\n EventActionPayload,\n typeof eventActionAbi\n> {\n /**\n * @inheritdoc\n *\n * @public\n * @readonly\n * @type {*}\n */\n public override readonly abi = eventActionAbi;\n /**\n * @inheritdoc\n *\n * @public\n * @static\n * @type {Record<number, Address>}\n */\n public static override bases: Record<number, Address> = {\n ...(EventActionBases as Record<number, Address>),\n };\n /**\n * @inheritdoc\n *\n * @public\n * @static\n * @type {RegistryType}\n */\n public static override registryType: RegistryType = RegistryType.ACTION;\n\n /**\n * Gets a specific action event by index\n *\n * @public\n * @async\n * @param {number} index The index of the action event to retrieve\n * @param {?ReadEventActionParams<'getActionStep'>} [params]\n * @returns {Promise<ActionStep>}\n */\n public async getActionStep(\n index: number,\n params?: ReadEventActionParams<'getActionStep'>,\n ) {\n const steps = await this.getActionSteps(params);\n return steps.at(index);\n }\n\n /**\n * Gets all action events\n *\n * @public\n * @async\n * @param {?ReadEventActionParams<'getActionSteps'>} [params]\n * @returns {Promise<ActionStep[]>}\n */\n public async getActionSteps(\n params?: ReadEventActionParams<'getActionSteps'>,\n ) {\n const steps = (await readEventActionGetActionSteps(this._config, {\n address: this.assertValidAddress(),\n ...this.optionallyAttachAccount(),\n // biome-ignore lint/suspicious/noExplicitAny: Accept any shape of valid wagmi/viem parameters, wagmi does the same thing internally\n ...(params as any),\n })) as RawActionStep[];\n return _dedupeActionSteps(steps.map(_fromRawActionStep));\n }\n\n /**\n * Gets the count of action events\n *\n * @public\n * @async\n * @param {?ReadEventActionParams<'getActionStepsCount'>} [params]\n * @returns {Promise<bigint>}\n */\n public async getActionStepsCount(\n params?: ReadEventActionParams<'getActionStepsCount'>,\n ) {\n const steps = await this.getActionSteps(params);\n return steps.length;\n }\n\n /**\n * Retrieves the payload describing how claimants can be identified from logs or function calls.\n *\n * @public\n * @async\n * @param {?ReadEventActionParams<'getActionClaimant'>} [params]\n * @returns {Promise<ActionClaimant>}\n */\n public async getActionClaimant(\n params?: ReadEventActionParams<'getActionClaimant'>,\n ) {\n const result = (await readEventActionGetActionClaimant(this._config, {\n address: this.assertValidAddress(),\n ...this.optionallyAttachAccount(),\n ...params,\n })) as RawActionClaimant;\n return _fromRawActionStep(result);\n }\n\n /**\n * Executes a prepared event action\n *\n * @public\n * @async\n * @param {Hex} data\n * @param {?WriteParams} [params]\n * @returns {Promise<readonly [boolean, `0x${string}`]>}\n */\n public async execute(\n data: Hex,\n params?: WriteParams<typeof eventActionAbi, 'execute'>,\n ) {\n return await this.awaitResult(this.executeRaw(data, params));\n }\n\n /**\n * Executes a prepared event action\n *\n * @public\n * @async\n * @param {Hex} data\n * @param {?WriteParams} [params]\n * @returns {Promise<{ hash: `0x${string}`; result: readonly [boolean, `0x${string}`]; }>}\n */\n public async executeRaw(\n data: Hex,\n params?: WriteParams<typeof eventActionAbi, 'execute'>,\n ) {\n const { request, result } = await simulateEventActionExecute(this._config, {\n address: this.assertValidAddress(),\n ...this.optionallyAttachAccount(),\n // biome-ignore lint/suspicious/noExplicitAny: Accept any shape of valid wagmi/viem parameters, wagmi does the same thing internally\n ...(params as any),\n args: [data],\n });\n const hash = await writeEventActionExecute(this._config, request);\n return { hash, result };\n }\n\n /**\n * Retrieves action steps, and uses them to validate against, and optionally fetch logs that match the step's signature.\n * If logs are provided in the optional `params` argument, then those logs will be used instead of fetched with the configured client.\n *\n * @public\n * @async\n * @param ValidateActionStepParams params\n * @returns {Promise<boolean>}\n */\n public async validateActionSteps(params: ValidateActionStepParams) {\n const actionSteps = await this.getActionSteps();\n for (const actionStep of actionSteps) {\n if (!(await this.isActionStepValid(actionStep, params))) {\n return false;\n }\n }\n return true;\n }\n\n /**\n * Validates a single action step with a given criteria against logs or function calls.\n * If logs are provided in the optional `params` argument, then those logs will be used instead of being fetched with the configured client.\n * For functions a hash is required.\n *\n * @public\n * @async\n * @param {ActionStep} actionStep - The action step to validate. Can be a function of event step.\n * @param {ValidateActionStepParams} params - Additional parameters for validation, including hash, known events, logs, and chain ID.\n * @returns {Promise<boolean>}\n */\n public async isActionStepValid(\n actionStep: ActionStep,\n params: ValidateActionStepParams,\n ) {\n if (actionStep.signatureType === SignatureType.EVENT) {\n const signature = actionStep.signature;\n let event: AbiEvent;\n // Lookup ABI based on event signature\n if (params.knownEvents) {\n event = params.knownEvents?.[signature] as AbiEvent;\n } else {\n event = (events.abi as Record<Hex, AbiEvent>)[signature] as AbiEvent;\n }\n\n if (!event) {\n throw new ValidationAbiMissingError(signature);\n }\n\n if (this.isArraylikeIndexed(actionStep, event)) {\n // If the field is indexed, we can't filter on it\n throw new UnparseableAbiParamError(\n actionStep.actionParameter.fieldIndex,\n event,\n );\n }\n\n params.event = event;\n\n // Use the provided logs, no need to fetch receipt\n if ('logs' in params) {\n return this.isActionEventValid(actionStep, {\n ...params,\n });\n }\n\n const client = this._config.getClient({\n chainId: params.chainId,\n }) as PublicClient;\n const receipt = await client.getTransactionReceipt({\n hash: params.hash,\n });\n const decodedLogs = receipt.logs.map((log) => {\n const { eventName, args } = decodeEventLog({\n abi: [event],\n data: log.data,\n topics: log.topics,\n });\n\n return { ...log, eventName, args };\n });\n\n return this.isActionEventValid(actionStep, {\n logs: decodedLogs,\n ...params,\n });\n }\n if (actionStep.signatureType === SignatureType.FUNC) {\n if ('hash' in params && 'chainId' in params) {\n const client = this._config.getClient({\n chainId: params.chainId,\n }) as PublicClient;\n const transaction = await client.getTransaction({\n hash: params.hash,\n });\n return this.isActionFunctionValid(actionStep, transaction);\n }\n }\n return false;\n }\n\n /**\n * Validates a single action event with a given criteria against logs.\n * If logs are provided in the optional `params` argument, then those logs will be used instead of being fetched with the configured client.\n *\n * @public\n * @async\n * @param {ActionStep} actionStep - The action step containing the event to validate.\n * @param {ValidateActionStepParams} params - Additional parameters for validation, including known events and logs\n * @returns {Promise<boolean>} Resolves to true if the action event is valid, throws if input is invalid, otherwise false.\n */\n public isActionEventValid(\n actionStep: ActionStep,\n params: ValidateActionStepParams,\n ) {\n if (!('logs' in params)) {\n throw new ValidationLogsMissingError();\n }\n const criteria = actionStep.actionParameter;\n const logs = params.logs;\n if (!logs.length) return false;\n for (let log of logs) {\n if (this.validateLogAgainstCriteria(criteria, log)) {\n return true;\n }\n }\n return false;\n }\n /**\n * Validates a single action function with a given criteria against the transaction input.\n *\n * @public\n * @async\n * @param {ActionStep} actionStep - The action step containing the function to validate.\n * @param {Transaction} transaction - The transaction that will be validated against.\n * @returns {Promise<boolean>} Resolves to true if the action function is valid, throws if the inputs are invalid, otherwise false.\n */\n public isActionFunctionValid(\n actionStep: ActionStep,\n transaction: Transaction,\n ) {\n const criteria = actionStep.actionParameter;\n let signature = actionStep.signature;\n\n const func = (functions.abi as Record<Hex, AbiFunction>)[\n signature\n ] as AbiFunction;\n if (!func) {\n throw new ValidationAbiMissingError(signature);\n }\n\n let decodedData;\n try {\n decodedData = decodeFunctionData({\n abi: [func],\n data: transaction.input,\n });\n } catch (e) {\n throw new FunctionDataDecodeError([func], e as Error);\n }\n\n // Validate the criteria against decoded arguments using fieldIndex\n const decodedArgs = decodedData.args;\n\n if (!decodedArgs || !decodedData) return false;\n\n if (\n !this.validateFunctionAgainstCriteria(\n criteria,\n decodedArgs as (string | bigint)[],\n )\n ) {\n return false;\n }\n\n return true;\n }\n /**\n * Validates a field against a given criteria.\n *\n * @param {Criteria} criteria - The criteria to validate against.\n * @param {string | bigint | Hex} fieldValue - The field value to validate.\n * @param {Object} input - Additional context for validation.\n * @param {EventLogs[0]} [input.log] - The event log, if validating an event.\n * @param {readonly (string | bigint)[]} [input.decodedArgs] - The decoded function arguments, if validating a function call.\n * @returns {Promise<boolean>} - Returns true if the field passes the criteria, false otherwise.\n */\n public validateFieldAgainstCriteria(\n criteria: Criteria,\n fieldValue: string | bigint | Hex,\n input:\n | { log: EventLogs[0] }\n | { decodedArgs: readonly (string | bigint)[] },\n ): boolean {\n // Type narrow based on criteria.filterType\n switch (criteria.filterType) {\n case FilterType.EQUAL:\n return match(criteria.fieldType)\n .with(PrimitiveType.ADDRESS, () =>\n isAddressEqual(criteria.filterData, fieldValue as Address),\n )\n .with(\n PrimitiveType.UINT,\n () => BigInt(fieldValue) === BigInt(criteria.filterData),\n )\n .with(\n PrimitiveType.STRING,\n () => fieldValue === fromHex(criteria.filterData, 'string'),\n )\n .otherwise(() => fieldValue === criteria.filterData);\n\n case FilterType.NOT_EQUAL:\n return match(criteria.fieldType)\n .with(\n PrimitiveType.ADDRESS,\n () => !isAddressEqual(criteria.filterData, fieldValue as Address),\n )\n .with(\n PrimitiveType.UINT,\n () => BigInt(fieldValue) !== BigInt(criteria.filterData),\n )\n .with(\n PrimitiveType.STRING,\n () => fieldValue !== fromHex(criteria.filterData, 'string'),\n )\n .otherwise(() => fieldValue !== criteria.filterData);\n\n case FilterType.GREATER_THAN:\n if (criteria.fieldType === PrimitiveType.UINT) {\n return BigInt(fieldValue) > BigInt(criteria.filterData);\n }\n throw new InvalidNumericalCriteriaError({\n ...input,\n criteria,\n fieldValue,\n });\n\n case FilterType.LESS_THAN:\n if (criteria.fieldType === PrimitiveType.UINT) {\n return BigInt(fieldValue) < BigInt(criteria.filterData);\n }\n throw new InvalidNumericalCriteriaError({\n ...input,\n criteria,\n fieldValue,\n });\n\n case FilterType.CONTAINS:\n if (\n criteria.fieldType === PrimitiveType.BYTES ||\n criteria.fieldType === PrimitiveType.STRING\n ) {\n let substring;\n if (criteria.fieldType === PrimitiveType.STRING) {\n substring = fromHex(criteria.filterData, 'string');\n } else {\n // truncate the `0x` prefix\n substring = criteria.filterData.slice(2);\n }\n return (fieldValue as string).includes(substring);\n }\n throw new FieldValueNotComparableError({\n ...input,\n criteria,\n fieldValue,\n });\n\n case FilterType.REGEX:\n if (typeof fieldValue !== 'string') {\n throw new FieldValueNotComparableError({\n ...input,\n criteria,\n fieldValue,\n });\n }\n\n if (criteria.fieldType === PrimitiveType.STRING) {\n // fieldValue is decoded by the ABI\n const regexString = fromHex(criteria.filterData, 'string');\n return new RegExp(regexString).test(fieldValue);\n }\n\n default:\n throw new UnrecognizedFilterTypeError({\n ...input,\n criteria,\n fieldValue,\n });\n }\n }\n\n /**\n * Validates a {@link Log} against a given criteria.\n *\n * @param {Criteria} criteria - The criteria to validate against.\n * @param {Log} log - The Viem event log.\n * @returns {Promise<boolean>} - Returns true if the log passes the criteria, false otherwise.\n */\n public validateLogAgainstCriteria(\n criteria: Criteria,\n log: EventLogs[0],\n ): boolean {\n if (!Array.isArray(log.args) || log.args.length <= criteria.fieldIndex) {\n throw new DecodedArgsMalformedError({\n log,\n criteria,\n fieldValue: undefined,\n });\n }\n\n const fieldValue = log.args.at(criteria.fieldIndex);\n if (fieldValue === undefined) {\n throw new FieldValueUndefinedError({ log, criteria, fieldValue });\n }\n return this.validateFieldAgainstCriteria(criteria, fieldValue, { log });\n }\n\n /**\n * Validates a function's decoded arguments against a given criteria.\n *\n * @param {Criteria} criteria - The criteria to validate against.\n * @param {unknown[]} decodedArgs - The decoded arguments of the function call.\n * @returns {Promise<boolean>} - Returns true if the decoded argument passes the criteria, false otherwise.\n */\n public validateFunctionAgainstCriteria(\n criteria: Criteria,\n decodedArgs: readonly (string | bigint)[],\n ): boolean {\n const fieldValue = decodedArgs[criteria.fieldIndex];\n if (fieldValue === undefined) {\n throw new FieldValueUndefinedError({\n criteria,\n fieldValue,\n });\n }\n return this.validateFieldAgainstCriteria(criteria, fieldValue, {\n decodedArgs,\n });\n }\n\n /**\n * @inheritdoc\n *\n * @public\n * @param {?EventActionPayload} [_payload]\n * @param {?DeployableOptions} [_options]\n * @returns {GenericDeployableParams}\n */\n public override buildParameters(\n _payload?: EventActionPayload,\n _options?: DeployableOptions,\n ): GenericDeployableParams {\n const [payload, options] = this.validateDeploymentConfig(\n _payload,\n _options,\n );\n let rawPayload: EventActionPayloadRaw;\n if (isEventActionPayloadSimple(payload)) {\n // filter out any falsy potential values\n let tmpSteps: ActionStep[] = payload.actionSteps.filter((step) => !!step);\n if (tmpSteps.length === 0) {\n throw new NoEventActionStepsProvidedError();\n }\n if (tmpSteps.length > 4) {\n throw new TooManyEventActionStepsProvidedError();\n }\n let steps: ActionStepTuple = Array.from({ length: 4 }, (_, i) => {\n // use either the provided step at the given index, or reuse the previous step\n // should aways exist\n return tmpSteps.at(i) || tmpSteps.at(-1);\n }) as ActionStepTuple;\n rawPayload = {\n actionClaimant: payload.actionClaimant,\n actionStepOne: steps[0],\n actionStepTwo: steps[1],\n actionStepThree: steps[2],\n actionStepFour: steps[3],\n };\n } else {\n rawPayload = payload;\n }\n return {\n abi: eventActionAbi,\n bytecode: bytecode as Hex,\n args: [prepareEventActionPayload(rawPayload)],\n ...this.optionallyAttachAccount(options.account),\n };\n }\n\n public isArraylikeIndexed(step: ActionStep, event: AbiEvent) {\n if (\n (step.actionParameter.fieldType === PrimitiveType.STRING ||\n step.actionParameter.fieldType === PrimitiveType.BYTES) &&\n event.inputs[step.actionParameter.fieldIndex]?.indexed\n ) {\n return true;\n }\n return false;\n }\n}\n\nfunction _dedupeActionSteps(_steps: ActionStep[]): ActionStep[] {\n const steps: ActionStep[] = [],\n signatures: Record<string, boolean> = {};\n for (let step of _steps) {\n const signature = JSON.stringify(step);\n if (signatures[signature]) continue;\n steps.push(step);\n signatures[signature] = true;\n }\n return steps;\n}\ntype RawActionStep = Overwrite<ActionStep, { chainid: bigint }>;\ntype RawActionClaimant = Overwrite<ActionClaimant, { chainid: bigint }>;\n\nfunction _toRawActionStep<T extends ActionStep | ActionClaimant>(obj: T) {\n return {\n ...obj,\n chainid: BigInt(obj.chainid),\n };\n}\n\nfunction _fromRawActionStep<T extends RawActionStep | RawActionClaimant>(\n obj: T,\n) {\n if (obj.chainid > BigInt(Number.MAX_SAFE_INTEGER)) {\n throw new Error('Chain ID exceeds max safe integer');\n }\n\n return {\n ...obj,\n chainid: Number(obj.chainid),\n };\n}\n\n/**\n * Typeguard to determine if a user is supplying a simple or raw EventActionPayload\n *\n * @param {*} opts\n * @returns {opts is EventActionPayloadSimple}\n */\nfunction _isEventActionPayloadSimple(\n opts: EventActionPayload,\n): opts is EventActionPayloadSimple {\n return Array.isArray((opts as EventActionPayloadSimple).actionSteps);\n}\n\n/**\n * Function to properly encode an event action payload.\n *\n * @param {InitPayload} param0\n * @param {ActionStep} param0.actionStepOne - The first action step to initialize.\n * @param {ActionStep} param0.actionStepTwo - The second action step to initialize.\n * @param {ActionStep} param0.actionStepThree - The third action step to initialize.\n * @param {ActionStep} param0.actionStepFour - The fourth action step to initialize.\n * @returns {Hex}\n */\nexport function prepareEventActionPayload({\n actionClaimant,\n actionStepOne,\n actionStepTwo,\n actionStepThree,\n actionStepFour,\n}: EventActionPayloadRaw) {\n // note chainIds are technically uint256 but viem treats them (safely) as numbers,\n // so we encode them as uint32 here to avoid downcast issues\n return encodeAbiParameters(\n [\n {\n type: 'tuple',\n name: 'initPayload',\n components: [\n {\n type: 'tuple',\n name: 'actionClaimant',\n components: [\n { type: 'uint8', name: 'signatureType' },\n { type: 'bytes32', name: 'signature' },\n { type: 'uint8', name: 'fieldIndex' },\n { type: 'address', name: 'targetContract' },\n { type: 'uint256', name: 'chainid' },\n ],\n },\n {\n type: 'tuple',\n name: 'actionStepOne',\n components: [\n { type: 'bytes32', name: 'signature' },\n { type: 'uint8', name: 'signatureType' },\n { type: 'uint8', name: 'actionType' },\n { type: 'address', name: 'targetContract' },\n { type: 'uint256', name: 'chainid' },\n {\n type: 'tuple',\n name: 'actionParameter',\n components: [\n { type: 'uint8', name: 'filterType' },\n { type: 'uint8', name: 'fieldType' },\n { type: 'uint8', name: 'fieldIndex' },\n { type: 'bytes', name: 'filterData' },\n ],\n },\n ],\n },\n {\n type: 'tuple',\n name: 'actionStepTwo',\n components: [\n { type: 'bytes32', name: 'signature' },\n { type: 'uint8', name: 'signatureType' },\n { type: 'uint8', name: 'actionType' },\n { type: 'address', name: 'targetContract' },\n { type: 'uint256', name: 'chainid' },\n {\n type: 'tuple',\n name: 'actionParameter',\n components: [\n { type: 'uint8', name: 'filterType' },\n { type: 'uint8', name: 'fieldType' },\n { type: 'uint8', name: 'fieldIndex' },\n { type: 'bytes', name: 'filterData' },\n ],\n },\n ],\n },\n {\n type: 'tuple',\n name: 'actionStepThree',\n components: [\n { type: 'bytes32', name: 'signature' },\n { type: 'uint8', name: 'signatureType' },\n { type: 'uint8', name: 'actionType' },\n { type: 'address', name: 'targetContract' },\n { type: 'uint256', name: 'chainid' },\n {\n type: 'tuple',\n name: 'actionParameter',\n components: [\n { type: 'uint8', name: 'filterType' },\n { type: 'uint8', name: 'fieldType' },\n { type: 'uint8', name: 'fieldIndex' },\n { type: 'bytes', name: 'filterData' },\n ],\n },\n ],\n },\n {\n type: 'tuple',\n name: 'actionStepFour',\n components: [\n { type: 'bytes32', name: 'signature' },\n { type: 'uint8', name: 'signatureType' },\n { type: 'uint8', name: 'actionType' },\n { type: 'address', name: 'targetContract' },\n { type: 'uint256', name: 'chainid' },\n {\n type: 'tuple',\n name: 'actionParameter',\n components: [\n { type: 'uint8', name: 'filterType' },\n { type: 'uint8', name: 'fieldType' },\n { type: 'uint8', name: 'fieldIndex' },\n { type: 'bytes', name: 'filterData' },\n ],\n },\n ],\n },\n ],\n },\n ],\n [\n {\n actionClaimant: _toRawActionStep(actionClaimant),\n actionStepOne: {\n ..._toRawActionStep(actionStepOne),\n actionType: actionStepOne.actionType || 0,\n },\n actionStepTwo: {\n ..._toRawActionStep(actionStepTwo),\n actionType: actionStepTwo.actionType || 0,\n },\n actionStepThree: {\n ..._toRawActionStep(actionStepThree),\n actionType: actionStepThree.actionType || 0,\n },\n actionStepFour: {\n ..._toRawActionStep(actionStepFour),\n actionType: actionStepFour.actionType || 0,\n },\n },\n ],\n );\n}\n"],"names":["t","e","n","r","i","s","o","c","a","u","h","m","d","y","p","v","b","w","j","x","A","W","$","z","I","FilterType","PrimitiveType","SignatureType","isEventActionPayloadSimple","opts","_EventAction","DeployableTarget","eventActionAbi","index","params","steps","readEventActionGetActionSteps","_dedupeActionSteps","_fromRawActionStep","result","readEventActionGetActionClaimant","data","request","simulateEventActionExecute","writeEventActionExecute","actionSteps","actionStep","signature","event","_a","events","ValidationAbiMissingError","UnparseableAbiParamError","decodedLogs","log","eventName","args","decodeEventLog","transaction","ValidationLogsMissingError","criteria","logs","func","functions","decodedData","decodeFunctionData","FunctionDataDecodeError","decodedArgs","fieldValue","input","match","isAddressEqual","fromHex","InvalidNumericalCriteriaError","substring","FieldValueNotComparableError","regexString","UnrecognizedFilterTypeError","DecodedArgsMalformedError","FieldValueUndefinedError","_payload","_options","payload","options","rawPayload","tmpSteps","step","NoEventActionStepsProvidedError","TooManyEventActionStepsProvidedError","_","bytecode","prepareEventActionPayload","EventActionBases","RegistryType","EventAction","_steps","signatures","_toRawActionStep","obj","actionClaimant","actionStepOne","actionStepTwo","actionStepThree","actionStepFour","encodeAbiParameters"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;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, aW as o, aX as l, aY as h, aZ as m, a_ as w, a$ as u, b0 as p, b1 as y, b2 as g, b3 as A, b4 as v, b5 as I, b6 as C, b7 as V } from "./generated-
|
|
1
|
+
import { O as i, aW as o, aX as l, aY as h, aZ as m, a_ as w, a$ as u, b0 as p, b1 as y, b2 as g, b3 as A, b4 as v, b5 as I, b6 as C, b7 as V } from "./generated-B7VaSah4.js";
|
|
2
2
|
import { e as _, f as R, g as P, h as E, i as k } from "./componentInterfaces-RXBMI5yH.js";
|
|
3
3
|
import { readContract as D } from "@wagmi/core";
|
|
4
4
|
import { InvalidComponentInterfaceError as T } from "./errors.js";
|
|
@@ -295,4 +295,4 @@ export {
|
|
|
295
295
|
b0 as i,
|
|
296
296
|
Y as p
|
|
297
297
|
};
|
|
298
|
-
//# sourceMappingURL=Incentive-
|
|
298
|
+
//# sourceMappingURL=Incentive-Bp8Sez7M.js.map
|