@boostxyz/sdk 5.3.1 → 6.0.0

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.
Files changed (143) hide show
  1. package/dist/Actions/Action.cjs +1 -1
  2. package/dist/Actions/Action.js +3 -3
  3. package/dist/Actions/EventAction.cjs +1 -1
  4. package/dist/Actions/EventAction.cjs.map +1 -1
  5. package/dist/Actions/EventAction.d.ts +13 -3
  6. package/dist/Actions/EventAction.d.ts.map +1 -1
  7. package/dist/Actions/EventAction.js +216 -193
  8. package/dist/Actions/EventAction.js.map +1 -1
  9. package/dist/AllowLists/AllowList.cjs +1 -1
  10. package/dist/AllowLists/AllowList.js +2 -2
  11. package/dist/AllowLists/SimpleAllowList.cjs +1 -1
  12. package/dist/AllowLists/SimpleAllowList.cjs.map +1 -1
  13. package/dist/AllowLists/SimpleAllowList.js +24 -24
  14. package/dist/AllowLists/SimpleAllowList.js.map +1 -1
  15. package/dist/AllowLists/SimpleDenyList.cjs +1 -1
  16. package/dist/AllowLists/SimpleDenyList.js +3 -3
  17. package/dist/Auth/PassthroughAuth.cjs +1 -1
  18. package/dist/Auth/PassthroughAuth.cjs.map +1 -1
  19. package/dist/Auth/PassthroughAuth.js +14 -14
  20. package/dist/Boost.cjs.map +1 -1
  21. package/dist/Boost.js.map +1 -1
  22. package/dist/BoostCore.cjs +2 -2
  23. package/dist/BoostCore.cjs.map +1 -1
  24. package/dist/BoostCore.d.ts +247 -0
  25. package/dist/BoostCore.d.ts.map +1 -1
  26. package/dist/BoostCore.js +421 -259
  27. package/dist/BoostCore.js.map +1 -1
  28. package/dist/BoostRegistry.cjs +1 -1
  29. package/dist/BoostRegistry.cjs.map +1 -1
  30. package/dist/BoostRegistry.js +43 -43
  31. package/dist/BoostRegistry.js.map +1 -1
  32. package/dist/Budget-DMbfdTom.cjs +2 -0
  33. package/dist/{Budget-AoNx7uFd.cjs.map → Budget-DMbfdTom.cjs.map} +1 -1
  34. package/dist/Budget-DO6sGTIR.js +463 -0
  35. package/dist/{Budget-DYIV9iNK.js.map → Budget-DO6sGTIR.js.map} +1 -1
  36. package/dist/Budgets/Budget.cjs +1 -1
  37. package/dist/Budgets/Budget.js +2 -2
  38. package/dist/Budgets/ManagedBudget.cjs +1 -1
  39. package/dist/Budgets/ManagedBudget.cjs.map +1 -1
  40. package/dist/Budgets/ManagedBudget.js +53 -53
  41. package/dist/Budgets/ManagedBudgetWithFees.d.ts +26 -0
  42. package/dist/Budgets/ManagedBudgetWithFees.d.ts.map +1 -1
  43. package/dist/Deployable/DeployableTarget.cjs +1 -1
  44. package/dist/Deployable/DeployableTarget.js +1 -1
  45. package/dist/Deployable/DeployableTargetWithRBAC.cjs +1 -1
  46. package/dist/Deployable/DeployableTargetWithRBAC.js +15 -15
  47. package/dist/Incentive-Boviez4z.js +1036 -0
  48. package/dist/Incentive-Boviez4z.js.map +1 -0
  49. package/dist/Incentive-wM4zizTH.cjs +2 -0
  50. package/dist/Incentive-wM4zizTH.cjs.map +1 -0
  51. package/dist/Incentives/AllowListIncentive.cjs +1 -1
  52. package/dist/Incentives/AllowListIncentive.cjs.map +1 -1
  53. package/dist/Incentives/AllowListIncentive.d.ts +9 -1
  54. package/dist/Incentives/AllowListIncentive.d.ts.map +1 -1
  55. package/dist/Incentives/AllowListIncentive.js +64 -47
  56. package/dist/Incentives/AllowListIncentive.js.map +1 -1
  57. package/dist/Incentives/CGDAIncentive.cjs +1 -1
  58. package/dist/Incentives/CGDAIncentive.cjs.map +1 -1
  59. package/dist/Incentives/CGDAIncentive.d.ts +12 -1
  60. package/dist/Incentives/CGDAIncentive.d.ts.map +1 -1
  61. package/dist/Incentives/CGDAIncentive.js +64 -33
  62. package/dist/Incentives/CGDAIncentive.js.map +1 -1
  63. package/dist/Incentives/ERC20Incentive.cjs +1 -1
  64. package/dist/Incentives/ERC20Incentive.cjs.map +1 -1
  65. package/dist/Incentives/ERC20Incentive.d.ts +37 -1
  66. package/dist/Incentives/ERC20Incentive.d.ts.map +1 -1
  67. package/dist/Incentives/ERC20Incentive.js +73 -49
  68. package/dist/Incentives/ERC20Incentive.js.map +1 -1
  69. package/dist/Incentives/ERC20PeggedIncentive.d.ts +35 -0
  70. package/dist/Incentives/ERC20PeggedIncentive.d.ts.map +1 -1
  71. package/dist/Incentives/ERC20PeggedVariableCriteriaIncentive.d.ts +35 -0
  72. package/dist/Incentives/ERC20PeggedVariableCriteriaIncentive.d.ts.map +1 -1
  73. package/dist/Incentives/ERC20VariableCriteriaIncentive.cjs +1 -1
  74. package/dist/Incentives/ERC20VariableCriteriaIncentive.cjs.map +1 -1
  75. package/dist/Incentives/ERC20VariableCriteriaIncentive.d.ts +25 -0
  76. package/dist/Incentives/ERC20VariableCriteriaIncentive.d.ts.map +1 -1
  77. package/dist/Incentives/ERC20VariableCriteriaIncentive.js +24 -24
  78. package/dist/Incentives/ERC20VariableCriteriaIncentive.js.map +1 -1
  79. package/dist/Incentives/ERC20VariableIncentive.cjs +1 -1
  80. package/dist/Incentives/ERC20VariableIncentive.cjs.map +1 -1
  81. package/dist/Incentives/ERC20VariableIncentive.d.ts +35 -0
  82. package/dist/Incentives/ERC20VariableIncentive.d.ts.map +1 -1
  83. package/dist/Incentives/ERC20VariableIncentive.js +55 -38
  84. package/dist/Incentives/ERC20VariableIncentive.js.map +1 -1
  85. package/dist/Incentives/Incentive.cjs +1 -1
  86. package/dist/Incentives/Incentive.d.ts +25 -0
  87. package/dist/Incentives/Incentive.d.ts.map +1 -1
  88. package/dist/Incentives/Incentive.js +2 -2
  89. package/dist/Incentives/PointsIncentive.cjs +1 -1
  90. package/dist/Incentives/PointsIncentive.cjs.map +1 -1
  91. package/dist/Incentives/PointsIncentive.d.ts +8 -0
  92. package/dist/Incentives/PointsIncentive.d.ts.map +1 -1
  93. package/dist/Incentives/PointsIncentive.js +50 -28
  94. package/dist/Incentives/PointsIncentive.js.map +1 -1
  95. package/dist/SimpleDenyList-CW4RwwRw.js +133 -0
  96. package/dist/{SimpleDenyList-ByAr4X1r.js.map → SimpleDenyList-CW4RwwRw.js.map} +1 -1
  97. package/dist/SimpleDenyList-Cybtz7AK.cjs +2 -0
  98. package/dist/{SimpleDenyList-CsRXJPwm.cjs.map → SimpleDenyList-Cybtz7AK.cjs.map} +1 -1
  99. package/dist/Validators/LimitedSignerValidator.cjs +1 -1
  100. package/dist/Validators/LimitedSignerValidator.cjs.map +1 -1
  101. package/dist/Validators/LimitedSignerValidator.js +33 -33
  102. package/dist/Validators/LimitedSignerValidator.js.map +1 -1
  103. package/dist/Validators/SignerValidator.cjs +1 -1
  104. package/dist/Validators/SignerValidator.cjs.map +1 -1
  105. package/dist/Validators/SignerValidator.js +26 -26
  106. package/dist/Validators/SignerValidator.js.map +1 -1
  107. package/dist/Validators/Validator.cjs +1 -1
  108. package/dist/Validators/Validator.js +3 -3
  109. package/dist/deployments-CIXw_WKk.cjs +2 -0
  110. package/dist/deployments-CIXw_WKk.cjs.map +1 -0
  111. package/dist/{deployments-D0fs26TV.js → deployments-DqjtOTUr.js} +47 -47
  112. package/dist/{deployments-D0fs26TV.js.map → deployments-DqjtOTUr.js.map} +1 -1
  113. package/dist/deployments.json +24 -24
  114. package/dist/generated-DgXPUgXl.cjs +3 -0
  115. package/dist/generated-DgXPUgXl.cjs.map +1 -0
  116. package/dist/{generated-Cyvr_Tjx.js → generated-pJZHmRCK.js} +728 -459
  117. package/dist/generated-pJZHmRCK.js.map +1 -0
  118. package/dist/index.cjs +1 -1
  119. package/dist/index.js +137 -136
  120. package/package.json +1 -1
  121. package/src/Actions/EventAction.ts +108 -27
  122. package/src/BoostCore.test.ts +124 -2
  123. package/src/BoostCore.ts +227 -0
  124. package/src/Incentives/AllowListIncentive.ts +17 -0
  125. package/src/Incentives/CGDAIncentive.ts +31 -0
  126. package/src/Incentives/ERC20Incentive.ts +27 -0
  127. package/src/Incentives/ERC20PeggedIncentive.ts +18 -0
  128. package/src/Incentives/ERC20PeggedVariableCriteriaIncentive.ts +26 -0
  129. package/src/Incentives/ERC20VariableIncentive.ts +18 -0
  130. package/src/Incentives/PointsIncentive.ts +22 -0
  131. package/dist/Budget-AoNx7uFd.cjs +0 -2
  132. package/dist/Budget-DYIV9iNK.js +0 -463
  133. package/dist/Incentive-BbkfwGOb.cjs +0 -2
  134. package/dist/Incentive-BbkfwGOb.cjs.map +0 -1
  135. package/dist/Incentive-qlnv5kQB.js +0 -991
  136. package/dist/Incentive-qlnv5kQB.js.map +0 -1
  137. package/dist/SimpleDenyList-ByAr4X1r.js +0 -133
  138. package/dist/SimpleDenyList-CsRXJPwm.cjs +0 -2
  139. package/dist/deployments-DoIOqxco.cjs +0 -2
  140. package/dist/deployments-DoIOqxco.cjs.map +0 -1
  141. package/dist/generated-Cyvr_Tjx.js.map +0 -1
  142. package/dist/generated-DtYPHhtX.cjs +0 -3
  143. package/dist/generated-DtYPHhtX.cjs.map +0 -1
@@ -1 +1 @@
1
- {"version":3,"file":"BoostRegistry.cjs","sources":["../src/BoostRegistry.ts"],"sourcesContent":["import {\n boostRegistryAbi,\n readBoostRegistryGetBaseImplementation,\n readBoostRegistryGetClone,\n readBoostRegistryGetCloneIdentifier,\n readBoostRegistryGetClones,\n simulateBoostRegistryDeployClone,\n simulateBoostRegistryRegister,\n writeBoostRegistryDeployClone,\n writeBoostRegistryRegister,\n} from '@boostxyz/evm';\nimport { bytecode } from '@boostxyz/evm/artifacts/contracts/BoostRegistry.sol/BoostRegistry.json';\nimport {\n type Abi,\n type Address,\n type ContractEventName,\n type Hex,\n isAddress,\n zeroAddress,\n} from 'viem';\nimport { BoostRegistry as BoostRegistryBases } from '../dist/deployments.json';\nimport {\n Deployable,\n type DeployableOptions,\n type GenericDeployableParams,\n} from './Deployable/Deployable';\nimport type { DeployableTarget } from './Deployable/DeployableTarget';\nimport {\n type GenericLog,\n type HashAndSimulatedResult,\n type ReadParams,\n type RegistryType,\n type WriteParams,\n assertValidAddressByChainId,\n} from './utils';\n\n/**\n * The ABI of the BoostRegistry contract, if needed for low level operations\n *\n * @type {typeof boostRegistryAbi}\n */\nexport { boostRegistryAbi };\n\n/**\n * The fixed addresses for the deployed Boost Registry.\n * By default, `new BoostRegistry` will use the address deployed to the currently connected chain, or `BOOST_REGISTRY_ADDRESS` if not provided.\n *\n * @type {Record<number, Address>}\n */\nexport const BOOST_REGISTRY_ADDRESSES: Record<number, Address> = {\n 31337: import.meta.env.VITE_BOOST_REGISTRY_ADDRESS,\n ...(BoostRegistryBases as Record<number, Address>),\n};\n\n/**\n * The address of the deployed `BoostRegistry` instance. In prerelease mode, this will be its sepolia address\n *\n * @type {Address}\n */\nexport const BOOST_REGISTRY_ADDRESS =\n BOOST_REGISTRY_ADDRESSES[__DEFAULT_CHAIN_ID__ as unknown as number] ||\n zeroAddress;\n\n/**\n * A record of `BoostRegistry` event names to `AbiEvent` objects for use with `getLogs`\n *\n * @export\n * @typedef {BoostRegistryLog}\n * @template {ContractEventName<typeof boostRegistryAbi>} [event=ContractEventName<\n * typeof boostRegistryAbi\n * >]\n */\nexport type BoostRegistryLog<\n event extends ContractEventName<typeof boostRegistryAbi> = ContractEventName<\n typeof boostRegistryAbi\n >,\n> = GenericLog<typeof boostRegistryAbi, event>;\n\n/**\n * An interface representing an on-chain Clone\n *\n * @export\n * @interface Clone\n * @typedef {Clone}\n */\nexport interface Clone {\n // The clone's component type'\n baseType: RegistryType;\n // The address of the initialized clone.\n instance: Address;\n // The deployer of the clone.\n deployer: Address;\n // The display name of the clone\n name: string;\n}\n\n/**\n * Instantiation options for a previously deployed Boost Registry\n *\n * @export\n * @interface BoostRegistryDeployedOptions\n * @typedef {BoostRegistryDeployedOptions}\n * @extends {DeployableOptions}\n */\nexport interface BoostRegistryDeployedOptions extends DeployableOptions {\n /**\n * The address for a Boost Registry, if different than `BOOST_REGISTRY_ADDRESS`\n *\n * @type {?Address}\n */\n address?: Address;\n}\n\n/**\n * A typeguard to determine if instantiation is using a custom address.\n *\n * @param {*} opts\n * @returns {opts is BoostRegistryDeployedOptions}\n */\nfunction isBoostRegistryDeployed(\n // biome-ignore lint/suspicious/noExplicitAny: type guard\n opts: any,\n): opts is BoostRegistryDeployedOptions {\n return opts.address && isAddress(opts.address);\n}\n\n/**\n * The Boost Registry does not take any construction arguments, so if you'd like to deploy a new Boost Registry, pass an explicit null to the `address` field.\n *\n * @export\n * @interface BoostRegistryOptionsWithPayload\n * @typedef {BoostRegistryOptionsWithPayload}\n * @extends {DeployableOptions}\n */\nexport interface BoostRegistryOptionsWithPayload extends DeployableOptions {\n /**\n *\n * @type {null}\n */\n address: null;\n}\n\n/**\n * A typeguard to determine if the user is intending to deploy a new Boost Registry before usage\n *\n * @param {*} opts\n * @returns {opts is BoostRegistryOptionsWithPayload}\n */\nfunction isBoostRegistryDeployable(\n // biome-ignore lint/suspicious/noExplicitAny: type guard\n opts: any,\n): opts is BoostRegistryOptionsWithPayload {\n return opts.address === null;\n}\n\n/**\n * Instantiation options for a Boost Registry.\n *\n * @example\n * To target Boost's Registry, omit the address field.\n * Otherwise, supply a custom address to a previously deployed custom Boost Registry.\n * You can also pass `{ address: null }` if you are intending to deploy a new Boost Registry.\n * ```ts\n * let registry = new BoostRegistry({ config, account })\n * // or\n * registry = new BoostRegistry({ config, account, address: CUSTOM_ADDRESS })\n * // or\n * registry = new BoostRegistry({ config, account, address: null })\n * await registry.deploy()\n * ```\n *\n * @export\n * @typedef {BoostRegistryConfig}\n */\nexport type BoostRegistryConfig =\n | BoostRegistryDeployedOptions\n | BoostRegistryOptionsWithPayload;\n\n/**\n * Constructs a new Boost Registry. A registry for base implementations and cloned instances.\n * This contract is used to register base implementations and deploy new instances of those implementations for use within the Boost protocol.\n *\n * @see {@link BoostRegistryConfig}\n * @export\n * @class BoostRegistry\n * @typedef {BoostRegistry}\n * @extends {Deployable<never[]>}\n */\nexport class BoostRegistry extends Deployable<\n never[],\n typeof boostRegistryAbi\n> {\n /**\n * A static property representing a map of stringified chain ID's to the address of the deployed implementation on chain\n *\n * @static\n * @readonly\n * @type {Record<string, Address>}\n */\n static readonly addresses: Record<number, Address> = BOOST_REGISTRY_ADDRESSES;\n\n /**\n * A getter that will return Boost registry's static addresses by numerical chain ID\n *\n * @public\n * @readonly\n * @type {Record<number, Address>}\n */\n public get addresses(): Record<number, Address> {\n return (this.constructor as typeof BoostRegistry).addresses;\n }\n\n /**\n * Creates an instance of BoostRegistry.\n *\n * @see {@link BoostRegistryConfig}\n * @constructor\n * @param {BoostRegistryConfig} param0\n * @param {Config} param0.config - [Wagmi Configuration](https://wagmi.sh/core/api/createConfig)\n * @param {?Account} [param0.account] - [Viem Local Account](https://viem.sh/docs/accounts/local)\n * @param {({ address?: Address; } | {})} param0....options\n */\n constructor({ config, account, ...options }: BoostRegistryConfig) {\n if (isBoostRegistryDeployed(options) && options.address) {\n super({ account, config }, options.address);\n } else if (isBoostRegistryDeployable(options)) {\n super({ account, config }, []);\n } else {\n const { address } = assertValidAddressByChainId(\n config,\n BOOST_REGISTRY_ADDRESSES,\n );\n super({ account, config }, address);\n }\n }\n\n /**\n * Register a new base implementation of a given type\n *\n * @public\n * @async\n * @param {RegistryType} registryType - The base type for the implementation\n * @param {string} name - A name for the implementation (must be unique within the given type)\n * @param {Address} implementation - The address of the implementation contract\n * @param {?WriteParams} [params] - Optional params to provide the underlying Viem contract call\n * @returns {Promise<void>}\n * @example\n * ```ts\n * await registry.register(ContractAction.registryType, 'ContractAction', ContractAction.base)\n * ```\n */\n public async register(\n registryType: RegistryType,\n name: string,\n implementation: Address,\n params?: WriteParams,\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,\n ) {\n const { request, result } = await simulateBoostRegistryRegister(\n this._config,\n {\n ...assertValidAddressByChainId(\n this._config,\n this.addresses,\n 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,\n ): Promise<Target> {\n return this.clone(displayName, target, params);\n }\n\n /**\n * Initialize a new instance of a registered base implementation, returning a transaction hash, resulting address from simulated transaction, and the given target bound to the resulting address.\n * This method is the same as `deployCloneRaw`, but serves to make its function more obvious as to why you'd need to use it.\n *\n * @public\n * @async\n * @template {DeployableTarget} Target\n * @param {string} displayName - The display name for the clone\n * @param {Target} target - An instance of a target contract to clone and initialize\n * @param {?WriteParams} [params]\n * @returns {Promise<HashAndSimulatedResult<Address> & { target: Target } >} - The transaction hash, simulated return address, and given target bound to simulated return address\n */\n public async initializeRaw<Target extends DeployableTarget<unknown, Abi>>(\n displayName: string,\n target: Target,\n params?: WriteParams,\n ): Promise<HashAndSimulatedResult<Address> & { target: Target }> {\n const { hash, result } = await this.deployCloneRaw(\n displayName,\n target,\n params,\n );\n return { hash, result, target: target.at(result) };\n }\n\n /**\n * Deploy a new instance of a registered base implementation, returning the provided target with a new address set on it.\n *\n * @public\n * @async\n * @template {DeployableTarget} Target\n * @param {string} displayName - The display name for the clone\n * @param {Target} target - An instance of a target contract to clone and initialize\n * @param {?WriteParams} [params]\n * @returns {Promise<Target>} - The provided instance, but with a new address attached.\n * biome-ignore lint/suspicious/noExplicitAny: any deployable target will suffice\n */\n public async clone<Target extends DeployableTarget<any, any>>(\n displayName: string,\n target: Target,\n params?: WriteParams,\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,\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,\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?.chainId,\n );\n const { request, result } = await simulateBoostRegistryDeployClone(\n this._config,\n {\n ...assertValidAddressByChainId(\n this._config,\n this.addresses,\n 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(identifier: Hex, params?: ReadParams) {\n return await readBoostRegistryGetBaseImplementation(this._config, {\n ...assertValidAddressByChainId(\n this._config,\n this.addresses,\n params?.chainId,\n ),\n args: [identifier],\n ...this.optionallyAttachAccount(),\n // biome-ignore lint/suspicious/noExplicitAny: Accept any shape of valid wagmi/viem parameters, wagmi does the same thing internally\n ...(params as any),\n });\n }\n\n /**\n * Get the address of a deployed clone by its identifier\n *\n * @public\n * @async\n * @param {Hex} identifier - The unique identifier for the deployed clone (see {getCloneIdentifier})\n * @param {?ReadParams} [params]\n * @returns {Promise<Clone>} - The on-chain representation of the clone\n */\n public async getClone(identifier: Hex, params?: ReadParams): Promise<Clone> {\n return await readBoostRegistryGetClone(this._config, {\n ...assertValidAddressByChainId(\n this._config,\n this.addresses,\n params?.chainId,\n ),\n args: [identifier],\n ...this.optionallyAttachAccount(),\n // biome-ignore lint/suspicious/noExplicitAny: Accept any shape of valid wagmi/viem parameters, wagmi does the same thing internally\n ...(params as any),\n });\n }\n\n /**\n * Get the list of identifiers of deployed clones for a given deployer\n *\n * @public\n * @async\n * @param {Address} deployer - The address of the deployer\n * @param {?ReadParams} [params]\n * @returns {Promise<Hex[]>} - The list of deployed clones for the given deployer\n */\n public async getClones(deployer: Address, params?: ReadParams) {\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,\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,\n ) {\n return await readBoostRegistryGetCloneIdentifier(this._config, {\n ...assertValidAddressByChainId(\n this._config,\n this.addresses,\n params?.chainId,\n ),\n args: [registryType, displayName],\n ...this.optionallyAttachAccount(),\n // biome-ignore lint/suspicious/noExplicitAny: Accept any shape of valid wagmi/viem parameters, wagmi does the same thing internally\n ...(params as any),\n });\n }\n\n /**\n * @inheritdoc\n *\n * @public\n * @param {?never[]} [_payload]\n * @param {?DeployableOptions} [_options]\n * @returns {GenericDeployableParams}\n */\n public override buildParameters(\n _payload?: never[],\n _options?: DeployableOptions,\n ): GenericDeployableParams {\n const [, options] = this.validateDeploymentConfig([], _options);\n return {\n abi: boostRegistryAbi,\n bytecode: bytecode as Hex,\n // biome-ignore lint/suspicious/noExplicitAny: Registry doesn't construct or initialize\n args: [] as any,\n ...this.optionallyAttachAccount(options.account),\n };\n }\n}\n"],"names":["BOOST_REGISTRY_ADDRESSES","BoostRegistryBases","BOOST_REGISTRY_ADDRESS","zeroAddress","isBoostRegistryDeployed","opts","isAddress","isBoostRegistryDeployable","_BoostRegistry","Deployable","config","account","options","address","assertValidAddressByChainId","registryType","name","implementation","params","request","result","simulateBoostRegistryRegister","writeBoostRegistryRegister","displayName","target","hash","instance","payload","baseAddress","simulateBoostRegistryDeployClone","writeBoostRegistryDeployClone","identifier","readBoostRegistryGetBaseImplementation","readBoostRegistryGetClone","deployer","readBoostRegistryGetClones","base","readBoostRegistryGetCloneIdentifier","_payload","_options","boostRegistryAbi","bytecode","BoostRegistry"],"mappings":"qscAiDaA,EAAoD,CAC/D,MAAO,OACP,GAAIC,EAAA,aACN,EAOaC,EACXF,EAAyB,QAAyC,GAClEG,EAAA,YA0DF,SAASC,EAEPC,EACsC,CACtC,OAAOA,EAAK,SAAWC,EAAU,UAAAD,EAAK,OAAO,CAC/C,CAwBA,SAASE,EAEPF,EACyC,CACzC,OAAOA,EAAK,UAAY,IAC1B,CAmCO,MAAMG,EAAN,MAAMA,UAAsBC,EAAAA,UAGjC,CAiBA,IAAW,WAAqC,CAC9C,OAAQ,KAAK,YAAqC,SACpD,CAYA,YAAY,CAAE,OAAAC,EAAQ,QAAAC,EAAS,GAAGC,GAAgC,CAChE,GAAIR,EAAwBQ,CAAO,GAAKA,EAAQ,QAC9C,MAAM,CAAE,QAAAD,EAAS,OAAAD,CAAO,EAAGE,EAAQ,OAAO,UACjCL,EAA0BK,CAAO,EAC1C,MAAM,CAAE,QAAAD,EAAS,OAAAD,CAAO,EAAG,CAAE,CAAA,MACxB,CACC,KAAA,CAAE,QAAAG,GAAYC,EAAA,4BAClBJ,EACAV,CAAA,EAEF,MAAM,CAAE,QAAAW,EAAS,OAAAD,CAAO,EAAGG,CAAO,CACpC,CACF,CAiBA,MAAa,SACXE,EACAC,EACAC,EACAC,EACA,CACA,OAAO,MAAM,KAAK,YAChB,KAAK,YAAYH,EAAcC,EAAMC,EAAgBC,CAAM,CAAA,CAE/D,CAYA,MAAa,YACXH,EACAC,EACAC,EACAC,EACA,CACA,KAAM,CAAE,QAAAC,EAAS,OAAAC,CAAO,EAAI,MAAMC,EAAA,GAChC,KAAK,QACL,CACE,GAAGP,EAAA,4BACD,KAAK,QACL,K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CAACH,EAAcQ,CAAW,EAChC,GAAG,KAAK,wBAAwB,EAEhC,GAAIL,CAAA,CACL,CACH,CAUgB,gBACdoB,EACAC,EACyB,CACnB,KAAA,CAAA,CAAG3B,CAAO,EAAI,KAAK,yBAAyB,CAAA,EAAI2B,CAAQ,EACvD,MAAA,CACL,IAAKC,EAAA,GACL,SAAAC,EAEA,KAAM,CAAC,EACP,GAAG,KAAK,wBAAwB7B,EAAQ,OAAO,CAAA,CAEnD,CACF,EA3XEJ,EAAgB,UAAqCR,EAXhD,IAAM0C,EAANlC"}
1
+ {"version":3,"file":"BoostRegistry.cjs","sources":["../src/BoostRegistry.ts"],"sourcesContent":["import {\n boostRegistryAbi,\n readBoostRegistryGetBaseImplementation,\n readBoostRegistryGetClone,\n readBoostRegistryGetCloneIdentifier,\n readBoostRegistryGetClones,\n simulateBoostRegistryDeployClone,\n simulateBoostRegistryRegister,\n writeBoostRegistryDeployClone,\n writeBoostRegistryRegister,\n} from '@boostxyz/evm';\nimport { bytecode } from '@boostxyz/evm/artifacts/contracts/BoostRegistry.sol/BoostRegistry.json';\nimport {\n type Abi,\n type Address,\n type ContractEventName,\n type Hex,\n isAddress,\n zeroAddress,\n} from 'viem';\nimport { BoostRegistry as BoostRegistryBases } from '../dist/deployments.json';\nimport {\n Deployable,\n type DeployableOptions,\n type GenericDeployableParams,\n} from './Deployable/Deployable';\nimport type { DeployableTarget } from './Deployable/DeployableTarget';\nimport {\n type GenericLog,\n type HashAndSimulatedResult,\n type ReadParams,\n type RegistryType,\n type WriteParams,\n assertValidAddressByChainId,\n} from './utils';\n\n/**\n * The ABI of the BoostRegistry contract, if needed for low level operations\n *\n * @type {typeof boostRegistryAbi}\n */\nexport { boostRegistryAbi };\n\n/**\n * The fixed addresses for the deployed Boost Registry.\n * By default, `new BoostRegistry` will use the address deployed to the currently connected chain, or `BOOST_REGISTRY_ADDRESS` if not provided.\n *\n * @type {Record<number, Address>}\n */\nexport const BOOST_REGISTRY_ADDRESSES: Record<number, Address> = {\n 31337: import.meta.env.VITE_BOOST_REGISTRY_ADDRESS,\n ...(BoostRegistryBases as Record<number, Address>),\n};\n\n/**\n * The address of the deployed `BoostRegistry` instance. In prerelease mode, this will be its sepolia address\n *\n * @type {Address}\n */\nexport const BOOST_REGISTRY_ADDRESS =\n BOOST_REGISTRY_ADDRESSES[__DEFAULT_CHAIN_ID__ as unknown as number] ||\n zeroAddress;\n\n/**\n * A record of `BoostRegistry` event names to `AbiEvent` objects for use with `getLogs`\n *\n * @export\n * @typedef {BoostRegistryLog}\n * @template {ContractEventName<typeof boostRegistryAbi>} [event=ContractEventName<\n * typeof boostRegistryAbi\n * >]\n */\nexport type BoostRegistryLog<\n event extends ContractEventName<typeof boostRegistryAbi> = ContractEventName<\n typeof boostRegistryAbi\n >,\n> = GenericLog<typeof boostRegistryAbi, event>;\n\n/**\n * An interface representing an on-chain Clone\n *\n * @export\n * @interface Clone\n * @typedef {Clone}\n */\nexport interface Clone {\n // The clone's component type'\n baseType: RegistryType;\n // The address of the initialized clone.\n instance: Address;\n // The deployer of the clone.\n deployer: Address;\n // The display name of the clone\n name: string;\n}\n\n/**\n * Instantiation options for a previously deployed Boost Registry\n *\n * @export\n * @interface BoostRegistryDeployedOptions\n * @typedef {BoostRegistryDeployedOptions}\n * @extends {DeployableOptions}\n */\nexport interface BoostRegistryDeployedOptions extends DeployableOptions {\n /**\n * The address for a Boost Registry, if different than `BOOST_REGISTRY_ADDRESS`\n *\n * @type {?Address}\n */\n address?: Address;\n}\n\n/**\n * A typeguard to determine if instantiation is using a custom address.\n *\n * @param {*} opts\n * @returns {opts is BoostRegistryDeployedOptions}\n */\nfunction isBoostRegistryDeployed(\n // biome-ignore lint/suspicious/noExplicitAny: type guard\n opts: any,\n): opts is BoostRegistryDeployedOptions {\n return opts.address && isAddress(opts.address);\n}\n\n/**\n * The Boost Registry does not take any construction arguments, so if you'd like to deploy a new Boost Registry, pass an explicit null to the `address` field.\n *\n * @export\n * @interface BoostRegistryOptionsWithPayload\n * @typedef {BoostRegistryOptionsWithPayload}\n * @extends {DeployableOptions}\n */\nexport interface BoostRegistryOptionsWithPayload extends DeployableOptions {\n /**\n *\n * @type {null}\n */\n address: null;\n}\n\n/**\n * A typeguard to determine if the user is intending to deploy a new Boost Registry before usage\n *\n * @param {*} opts\n * @returns {opts is BoostRegistryOptionsWithPayload}\n */\nfunction isBoostRegistryDeployable(\n // biome-ignore lint/suspicious/noExplicitAny: type guard\n opts: any,\n): opts is BoostRegistryOptionsWithPayload {\n return opts.address === null;\n}\n\n/**\n * Instantiation options for a Boost Registry.\n *\n * @example\n * To target Boost's Registry, omit the address field.\n * Otherwise, supply a custom address to a previously deployed custom Boost Registry.\n * You can also pass `{ address: null }` if you are intending to deploy a new Boost Registry.\n * ```ts\n * let registry = new BoostRegistry({ config, account })\n * // or\n * registry = new BoostRegistry({ config, account, address: CUSTOM_ADDRESS })\n * // or\n * registry = new BoostRegistry({ config, account, address: null })\n * await registry.deploy()\n * ```\n *\n * @export\n * @typedef {BoostRegistryConfig}\n */\nexport type BoostRegistryConfig =\n | BoostRegistryDeployedOptions\n | BoostRegistryOptionsWithPayload;\n\n/**\n * Constructs a new Boost Registry. A registry for base implementations and cloned instances.\n * This contract is used to register base implementations and deploy new instances of those implementations for use within the Boost protocol.\n *\n * @see {@link BoostRegistryConfig}\n * @export\n * @class BoostRegistry\n * @typedef {BoostRegistry}\n * @extends {Deployable<never[]>}\n */\nexport class BoostRegistry extends Deployable<\n never[],\n typeof boostRegistryAbi\n> {\n /**\n * A static property representing a map of stringified chain ID's to the address of the deployed implementation on chain\n *\n * @static\n * @readonly\n * @type {Record<string, Address>}\n */\n static readonly addresses: Record<number, Address> = BOOST_REGISTRY_ADDRESSES;\n\n /**\n * A getter that will return Boost registry's static addresses by numerical chain ID\n *\n * @public\n * @readonly\n * @type {Record<number, Address>}\n */\n public get addresses(): Record<number, Address> {\n return (this.constructor as typeof BoostRegistry).addresses;\n }\n\n /**\n * Creates an instance of BoostRegistry.\n *\n * @see {@link BoostRegistryConfig}\n * @constructor\n * @param {BoostRegistryConfig} param0\n * @param {Config} param0.config - [Wagmi Configuration](https://wagmi.sh/core/api/createConfig)\n * @param {?Account} [param0.account] - [Viem Local Account](https://viem.sh/docs/accounts/local)\n * @param {({ address?: Address; } | {})} param0....options\n */\n constructor({ config, account, ...options }: BoostRegistryConfig) {\n if (isBoostRegistryDeployed(options) && options.address) {\n super({ account, config }, options.address);\n } else if (isBoostRegistryDeployable(options)) {\n super({ account, config }, []);\n } else {\n const { address } = assertValidAddressByChainId(\n config,\n BOOST_REGISTRY_ADDRESSES,\n );\n super({ account, config }, address);\n }\n }\n\n /**\n * Register a new base implementation of a given type\n *\n * @public\n * @async\n * @param {RegistryType} registryType - The base type for the implementation\n * @param {string} name - A name for the implementation (must be unique within the given type)\n * @param {Address} implementation - The address of the implementation contract\n * @param {?WriteParams} [params] - Optional params to provide the underlying Viem contract call\n * @returns {Promise<void>}\n * @example\n * ```ts\n * await registry.register(ContractAction.registryType, 'ContractAction', ContractAction.base)\n * ```\n */\n public async register(\n registryType: RegistryType,\n name: string,\n implementation: Address,\n params?: WriteParams,\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,\n ) {\n const { request, result } = await simulateBoostRegistryRegister(\n this._config,\n {\n ...assertValidAddressByChainId(\n this._config,\n this.addresses,\n 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,\n ): Promise<Target> {\n return this.clone(displayName, target, params);\n }\n\n /**\n * Initialize a new instance of a registered base implementation, returning a transaction hash, resulting address from simulated transaction, and the given target bound to the resulting address.\n * This method is the same as `deployCloneRaw`, but serves to make its function more obvious as to why you'd need to use it.\n *\n * @public\n * @async\n * @template {DeployableTarget} Target\n * @param {string} displayName - The display name for the clone\n * @param {Target} target - An instance of a target contract to clone and initialize\n * @param {?WriteParams} [params]\n * @returns {Promise<HashAndSimulatedResult<Address> & { target: Target } >} - The transaction hash, simulated return address, and given target bound to simulated return address\n */\n public async initializeRaw<Target extends DeployableTarget<unknown, Abi>>(\n displayName: string,\n target: Target,\n params?: WriteParams,\n ): Promise<HashAndSimulatedResult<Address> & { target: Target }> {\n const { hash, result } = await this.deployCloneRaw(\n displayName,\n target,\n params,\n );\n return { hash, result, target: target.at(result) };\n }\n\n /**\n * Deploy a new instance of a registered base implementation, returning the provided target with a new address set on it.\n *\n * @public\n * @async\n * @template {DeployableTarget} Target\n * @param {string} displayName - The display name for the clone\n * @param {Target} target - An instance of a target contract to clone and initialize\n * @param {?WriteParams} [params]\n * @returns {Promise<Target>} - The provided instance, but with a new address attached.\n * biome-ignore lint/suspicious/noExplicitAny: any deployable target will suffice\n */\n public async clone<Target extends DeployableTarget<any, any>>(\n displayName: string,\n target: Target,\n params?: WriteParams,\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,\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,\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?.chainId,\n );\n const { request, result } = await simulateBoostRegistryDeployClone(\n this._config,\n {\n ...assertValidAddressByChainId(\n this._config,\n this.addresses,\n 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(identifier: Hex, params?: ReadParams) {\n return await readBoostRegistryGetBaseImplementation(this._config, {\n ...assertValidAddressByChainId(\n this._config,\n this.addresses,\n params?.chainId,\n ),\n args: [identifier],\n ...this.optionallyAttachAccount(),\n // biome-ignore lint/suspicious/noExplicitAny: Accept any shape of valid wagmi/viem parameters, wagmi does the same thing internally\n ...(params as any),\n });\n }\n\n /**\n * Get the address of a deployed clone by its identifier\n *\n * @public\n * @async\n * @param {Hex} identifier - The unique identifier for the deployed clone (see {getCloneIdentifier})\n * @param {?ReadParams} [params]\n * @returns {Promise<Clone>} - The on-chain representation of the clone\n */\n public async getClone(identifier: Hex, params?: ReadParams): Promise<Clone> {\n return await readBoostRegistryGetClone(this._config, {\n ...assertValidAddressByChainId(\n this._config,\n this.addresses,\n params?.chainId,\n ),\n args: [identifier],\n ...this.optionallyAttachAccount(),\n // biome-ignore lint/suspicious/noExplicitAny: Accept any shape of valid wagmi/viem parameters, wagmi does the same thing internally\n ...(params as any),\n });\n }\n\n /**\n * Get the list of identifiers of deployed clones for a given deployer\n *\n * @public\n * @async\n * @param {Address} deployer - The address of the deployer\n * @param {?ReadParams} [params]\n * @returns {Promise<Hex[]>} - The list of deployed clones for the given deployer\n */\n public async getClones(deployer: Address, params?: ReadParams) {\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,\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,\n ) {\n return await readBoostRegistryGetCloneIdentifier(this._config, {\n ...assertValidAddressByChainId(\n this._config,\n this.addresses,\n params?.chainId,\n ),\n args: [registryType, displayName],\n ...this.optionallyAttachAccount(),\n // biome-ignore lint/suspicious/noExplicitAny: Accept any shape of valid wagmi/viem parameters, wagmi does the same thing internally\n ...(params as any),\n });\n }\n\n /**\n * @inheritdoc\n *\n * @public\n * @param {?never[]} [_payload]\n * @param {?DeployableOptions} [_options]\n * @returns {GenericDeployableParams}\n */\n public override buildParameters(\n _payload?: never[],\n _options?: DeployableOptions,\n ): GenericDeployableParams {\n const [, options] = this.validateDeploymentConfig([], _options);\n return {\n abi: boostRegistryAbi,\n bytecode: bytecode as Hex,\n // biome-ignore lint/suspicious/noExplicitAny: Registry doesn't construct or initialize\n args: [] as any,\n ...this.optionallyAttachAccount(options.account),\n };\n }\n}\n"],"names":["BOOST_REGISTRY_ADDRESSES","BoostRegistryBases","BOOST_REGISTRY_ADDRESS","zeroAddress","isBoostRegistryDeployed","opts","isAddress","isBoostRegistryDeployable","_BoostRegistry","Deployable","config","account","options","address","assertValidAddressByChainId","registryType","name","implementation","params","request","result","simulateBoostRegistryRegister","writeBoostRegistryRegister","displayName","target","hash","instance","payload","baseAddress","simulateBoostRegistryDeployClone","writeBoostRegistryDeployClone","identifier","readBoostRegistryGetBaseImplementation","readBoostRegistryGetClone","deployer","readBoostRegistryGetClones","base","readBoostRegistryGetCloneIdentifier","_payload","_options","boostRegistryAbi","bytecode","BoostRegistry"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,GACL,SAAAC,EAEA,KAAM,CAAC,EACP,GAAG,KAAK,wBAAwB7B,EAAQ,OAAO,CAAA,CAEnD,CACF,EA3XEJ,EAAgB,UAAqCR,EAXhD,IAAM0C,EAANlC"}
@@ -1,17 +1,17 @@
1
- import { $ as l, M as u, O as y, P as g, R as w, a0 as _, a1 as A, a2 as h, c as R } from "./generated-Cyvr_Tjx.js";
1
+ import { M as l, O as u, Q as g, Y as y, Z as A, a0 as _, a1 as w, a2 as h, b as R } from "./generated-pJZHmRCK.js";
2
2
  import { zeroAddress as I, isAddress as C } from "viem";
3
- import { B as S } from "./deployments-D0fs26TV.js";
3
+ import { B as S } from "./deployments-DqjtOTUr.js";
4
4
  import { Deployable as D } from "./Deployable/Deployable.js";
5
- import { assertValidAddressByChainId as c } from "./utils.js";
6
- const B = "0x6080604052348015600e575f80fd5b50611bc78061001c5f395ff3fe608060405234801561000f575f80fd5b5060043610610086575f3560e01c8063acc83fc811610059578063acc83fc81461014a578063d12dd4811461017a578063f166879214610196578063fd97064b146101c657610086565b806301ffc9a71461008a5780633aaf1626146100ba578063792aa01c146100ea57806383f388591461011a575b5f80fd5b6100a4600480360381019061009f9190610e87565b6101f6565b6040516100b19190610ecc565b60405180910390f35b6100d460048036038101906100cf9190610f18565b61026f565b6040516100e19190611120565b60405180910390f35b61010460048036038101906100ff919061116a565b610481565b604051610111919061124c565b60405180910390f35b610134600480360381019061012f9190610f18565b610514565b604051610141919061127b565b60405180910390f35b610164600480360381019061015f9190611318565b6105bc565b60405161017191906113ab565b60405180910390f35b610194600480360381019061018f91906113c4565b6105fe565b005b6101b060048036038101906101ab9190611435565b610828565b6040516101bd91906113ab565b60405180910390f35b6101e060048036038101906101db91906114e7565b610864565b6040516101ed919061127b565b60405180910390f35b5f7fb09d9d54000000000000000000000000000000000000000000000000000000007bffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916827bffffffffffffffffffffffffffffffffffffffffffffffffffffffff19161480610268575061026782610c2c565b5b9050919050565b610277610dc7565b60015f8381526020019081526020015f206040518060800160405290815f82015f9054906101000a900460ff1660048111156102b6576102b5610f43565b5b60048111156102c8576102c7610f43565b5b81526020015f820160019054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001600182015f9054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001600282018054610386906115b7565b80601f01602080910402602001604051908101604052809291908181526020018280546103b2906115b7565b80156103fd5780601f106103d4576101008083540402835291602001916103fd565b820191905f5260205f20905b8154815290600101906020018083116103e057829003601f168201915b50505050508152505090505f73ffffffffffffffffffffffffffffffffffffffff16816020015173ffffffffffffffffffffffffffffffffffffffff160361047c57816040517f8cc00d1600000000000000000000000000000000000000000000000000000000815260040161047391906113ab565b60405180910390fd5b919050565b606060025f8373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020015f2080548060200260200160405190810160405280929190818152602001828054801561050857602002820191905f5260205f20905b8154815260200190600101908083116104f4575b50505050509050919050565b5f805f8381526020019081526020015f205f9054906101000a900473ffffffffffffffffffffffffffffffffffffffff1690505f73ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff16036105b757816040517f8cc00d160000000000000000000000000000000000000000000000000000000081526004016105ae91906113ab565b60405180910390fd5b919050565b5f6105f386868686866040516020016105d89493929190611668565b60405160208183030381529060405280519060200120610c95565b905095945050505050565b808073ffffffffffffffffffffffffffffffffffffffff166301ffc9a77f6ab67a0d000000000000000000000000000000000000000000000000000000006040518263ffffffff1660e01b815260040161065891906116b1565b602060405180830381865afa158015610673573d5f803e3d5ffd5b505050506040513d601f19601f8201168201806040525081019061069791906116f4565b6106d857806040517f903b13fd0000000000000000000000000000000000000000000000000000000081526004016106cf919061172e565b60405180910390fd5b5f6106e4868686610828565b90505f73ffffffffffffffffffffffffffffffffffffffff165f808381526020019081526020015f205f9054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16146107875785816040517f96b5684c00000000000000000000000000000000000000000000000000000000815260040161077e929190611756565b60405180910390fd5b825f808381526020019081526020015f205f6101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff160217905550808660048111156107e9576107e8610f43565b5b7f660d31df25c96b8a337fcf12a56b7363e5a997639db853d5dbaec7c01f31bd8085604051610818919061172e565b60405180910390a3505050505050565b5f61085b84848460405160200161084092919061177d565b60405160208183030381529060405280519060200120610c95565b90509392505050565b5f3068929eee149b4bd2126854036108835763ab143c065f526004601cfd5b3068929eee149b4bd212685561092b87878787336040516020016108ab9594939291906117c9565b6040516020818303038152906040528051906020012084848080601f0160208091040260200160405190810160405280939291908181526020018383808284375f81840152601f19601f820116905080830192505050505050508873ffffffffffffffffffffffffffffffffffffffff16610cc79092919063ffffffff16565b90505f61093b88883389896105bc565b90505f73ffffffffffffffffffffffffffffffffffffffff1660015f8381526020019081526020015f205f0160019054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16146109e25787816040517f96b5684c0000000000000000000000000000000000000000000000000000000081526004016109d9929190611756565b60405180910390fd5b60025f3373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020015f2081908060018154018082558091505060019003905f5260205f20015f90919091909150556040518060800160405280896004811115610a6157610a60610f43565b5b81526020018373ffffffffffffffffffffffffffffffffffffffff1681526020013373ffffffffffffffffffffffffffffffffffffffff16815260200187878080601f0160208091040260200160405190810160405280939291908181526020018383808284375f81840152601f19601f8201169050808301925050505050505081525060015f8381526020019081526020015f205f820151815f015f6101000a81548160ff02191690836004811115610b1e57610b1d610f43565b5b02179055506020820151815f0160016101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff1602179055506040820151816001015f6101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff1602179055506060820151816002019081610bc491906119de565b5090505080886004811115610bdc57610bdb610f43565b5b7f2348fcdb9847b17a183e53aa32c0c5c76afdef8fcb14bb51f216c6611701ab1a8985604051610c0d929190611aad565b60405180910390a3503868929eee149b4bd21268559695505050505050565b5f7f01ffc9a7000000000000000000000000000000000000000000000000000000007bffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916827bffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916149050919050565b5f8282604051602001610ca9929190611af4565b60405160208183030381529060405280519060200120905092915050565b5f610cf1838573ffffffffffffffffffffffffffffffffffffffff16610d6090919063ffffffff16565b90508073ffffffffffffffffffffffffffffffffffffffff1663439fab91836040518263ffffffff1660e01b8152600401610d2c9190611b71565b5f604051808303815f87803b158015610d43575f80fd5b505af1158015610d55573d5f803e3d5ffd5b505050509392505050565b5f610d6c5f8484610d74565b905092915050565b5f6c5af43d3d93803e602a57fd5bf36021528260145273602c3d8160093d39f33d3d3d3d363d3d37363d735f52816035600c86f5905080610dbc5763301164255f526004601cfd5b5f6021529392505050565b60405180608001604052805f6004811115610de557610de4610f43565b5b81526020015f73ffffffffffffffffffffffffffffffffffffffff1681526020015f73ffffffffffffffffffffffffffffffffffffffff168152602001606081525090565b5f80fd5b5f80fd5b5f7fffffffff0000000000000000000000000000000000000000000000000000000082169050919050565b610e6681610e32565b8114610e70575f80fd5b50565b5f81359050610e8181610e5d565b92915050565b5f60208284031215610e9c57610e9b610e2a565b5b5f610ea984828501610e73565b91505092915050565b5f8115159050919050565b610ec681610eb2565b82525050565b5f602082019050610edf5f830184610ebd565b92915050565b5f819050919050565b610ef781610ee5565b8114610f01575f80fd5b50565b5f81359050610f1281610eee565b92915050565b5f60208284031215610f2d57610f2c610e2a565b5b5f610f3a84828501610f04565b91505092915050565b7f4e487b71000000000000000000000000000000000000000000000000000000005f52602160045260245ffd5b60058110610f8157610f80610f43565b5b50565b5f819050610f9182610f70565b919050565b5f610fa082610f84565b9050919050565b610fb081610f96565b82525050565b5f73ffffffffffffffffffffffffffffffffffffffff82169050919050565b5f819050919050565b5f610ff8610ff3610fee84610fb6565b610fd5565b610fb6565b9050919050565b5f61100982610fde565b9050919050565b5f61101a82610fff565b9050919050565b61102a81611010565b82525050565b5f61103a82610fb6565b9050919050565b61104a81611030565b82525050565b5f81519050919050565b5f82825260208201905092915050565b8281835e5f83830152505050565b5f601f19601f8301169050919050565b5f61109282611050565b61109c818561105a565b93506110ac81856020860161106a565b6110b581611078565b840191505092915050565b5f608083015f8301516110d55f860182610fa7565b5060208301516110e86020860182611021565b5060408301516110fb6040860182611041565b50606083015184820360608601526111138282611088565b9150508091505092915050565b5f6020820190508181035f83015261113881846110c0565b905092915050565b61114981611030565b8114611153575f80fd5b50565b5f8135905061116481611140565b92915050565b5f6020828403121561117f5761117e610e2a565b5b5f61118c84828501611156565b91505092915050565b5f81519050919050565b5f82825260208201905092915050565b5f819050602082019050919050565b6111c781610ee5565b82525050565b5f6111d883836111be565b60208301905092915050565b5f602082019050919050565b5f6111fa82611195565b611204818561119f565b935061120f836111af565b805f5b8381101561123f57815161122688826111cd565b9750611231836111e4565b925050600181019050611212565b5085935050505092915050565b5f6020820190508181035f83015261126481846111f0565b905092915050565b61127581611010565b82525050565b5f60208201905061128e5f83018461126c565b92915050565b600581106112a0575f80fd5b50565b5f813590506112b181611294565b92915050565b5f80fd5b5f80fd5b5f80fd5b5f8083601f8401126112d8576112d76112b7565b5b8235905067ffffffffffffffff8111156112f5576112f46112bb565b5b602083019150836001820283011115611311576113106112bf565b5b9250929050565b5f805f805f6080868803121561133157611330610e2a565b5b5f61133e888289016112a3565b955050602061134f88828901611156565b945050604061136088828901611156565b935050606086013567ffffffffffffffff81111561138157611380610e2e565b5b61138d888289016112c3565b92509250509295509295909350565b6113a581610ee5565b82525050565b5f6020820190506113be5f83018461139c565b92915050565b5f805f80606085870312156113dc576113db610e2a565b5b5f6113e9878288016112a3565b945050602085013567ffffffffffffffff81111561140a57611409610e2e565b5b611416878288016112c3565b9350935050604061142987828801611156565b91505092959194509250565b5f805f6040848603121561144c5761144b610e2a565b5b5f611459868287016112a3565b935050602084013567ffffffffffffffff81111561147a57611479610e2e565b5b611486868287016112c3565b92509250509250925092565b5f8083601f8401126114a7576114a66112b7565b5b8235905067ffffffffffffffff8111156114c4576114c36112bb565b5b6020830191508360018202830111156114e0576114df6112bf565b5b9250929050565b5f805f805f806080878903121561150157611500610e2a565b5b5f61150e89828a016112a3565b965050602061151f89828a01611156565b955050604087013567ffffffffffffffff8111156115405761153f610e2e565b5b61154c89828a016112c3565b9450945050606087013567ffffffffffffffff81111561156f5761156e610e2e565b5b61157b89828a01611492565b92509250509295509295509295565b7f4e487b71000000000000000000000000000000000000000000000000000000005f52602260045260245ffd5b5f60028204905060018216806115ce57607f821691505b6020821081036115e1576115e061158a565b5b50919050565b5f8160601b9050919050565b5f6115fd826115e7565b9050919050565b5f61160e826115f3565b9050919050565b61162661162182611030565b611604565b82525050565b5f81905092915050565b828183375f83830152505050565b5f61164f838561162c565b935061165c838584611636565b82840190509392505050565b5f6116738287611615565b6014820191506116838286611615565b601482019150611694828486611644565b915081905095945050505050565b6116ab81610e32565b82525050565b5f6020820190506116c45f8301846116a2565b92915050565b6116d381610eb2565b81146116dd575f80fd5b50565b5f815190506116ee816116ca565b92915050565b5f6020828403121561170957611708610e2a565b5b5f611716848285016116e0565b91505092915050565b61172881611030565b82525050565b5f6020820190506117415f83018461171f565b92915050565b61175081610f96565b82525050565b5f6040820190506117695f830185611747565b611776602083018461139c565b9392505050565b5f611789828486611644565b91508190509392505050565b5f8160f81b9050919050565b5f6117ab82611795565b9050919050565b6117c36117be82610f96565b6117a1565b82525050565b5f6117d482886117b2565b6001820191506117e48287611615565b6014820191506117f5828587611644565b91506118018284611615565b6014820191508190509695505050505050565b7f4e487b71000000000000000000000000000000000000000000000000000000005f52604160045260245ffd5b5f819050815f5260205f209050919050565b5f6020601f8301049050919050565b5f82821b905092915050565b5f6008830261189d7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff82611862565b6118a78683611862565b95508019841693508086168417925050509392505050565b5f819050919050565b5f6118e26118dd6118d8846118bf565b610fd5565b6118bf565b9050919050565b5f819050919050565b6118fb836118c8565b61190f611907826118e9565b84845461186e565b825550505050565b5f90565b611923611917565b61192e8184846118f2565b505050565b5b81811015611951576119465f8261191b565b600181019050611934565b5050565b601f8211156119965761196781611841565b61197084611853565b8101602085101561197f578190505b61199361198b85611853565b830182611933565b50505b505050565b5f82821c905092915050565b5f6119b65f198460080261199b565b1980831691505092915050565b5f6119ce83836119a7565b9150826002028217905092915050565b6119e782611050565b67ffffffffffffffff811115611a00576119ff611814565b5b611a0a82546115b7565b611a15828285611955565b5f60209050601f831160018114611a46575f8415611a34578287015190505b611a3e85826119c3565b865550611aa5565b601f198416611a5486611841565b5f5b82811015611a7b57848901518255600182019150602085019450602081019050611a56565b86831015611a985784890151611a94601f8916826119a7565b8355505b6001600288020188555050505b505050505050565b5f604082019050611ac05f83018561171f565b611acd602083018461126c565b9392505050565b5f819050919050565b611aee611ae982610ee5565b611ad4565b82525050565b5f611aff82856117b2565b600182019150611b0f8284611add565b6020820191508190509392505050565b5f81519050919050565b5f82825260208201905092915050565b5f611b4382611b1f565b611b4d8185611b29565b9350611b5d81856020860161106a565b611b6681611078565b840191505092915050565b5f6020820190508181035f830152611b898184611b39565b90509291505056fea264697066735822122089535164a1a53170ebb569acb756d7169ac52157bba6839919cea3c17109da0564736f6c634300081a0033", i = {
5
+ import { assertValidAddressByChainId as t } from "./utils.js";
6
+ const B = "0x6080604052348015600e575f80fd5b5061131d8061001c5f395ff3fe608060405234801561000f575f80fd5b5060043610610085575f3560e01c8063acc83fc811610058578063acc83fc814610129578063d12dd4811461014a578063f16687921461015f578063fd97064b14610172575f80fd5b806301ffc9a7146100895780633aaf1626146100b1578063792aa01c146100d157806383f38859146100f1575b5f80fd5b61009c610097366004610b7b565b610185565b60405190151581526020015b60405180910390f35b6100c46100bf366004610bba565b61021d565b6040516100a89190610c83565b6100e46100df366004610d11565b6103ae565b6040516100a89190610d2a565b6101046100ff366004610bba565b610424565b60405173ffffffffffffffffffffffffffffffffffffffff90911681526020016100a8565b61013c610137366004610dbf565b610482565b6040519081526020016100a8565b61015d610158366004610e30565b6104c3565b005b61013c61016d366004610e91565b6106dc565b610104610180366004610ee0565b6106fc565b5f7fffffffff0000000000000000000000000000000000000000000000000000000082167fb09d9d5400000000000000000000000000000000000000000000000000000000148061021757507f01ffc9a7000000000000000000000000000000000000000000000000000000007fffffffff000000000000000000000000000000000000000000000000000000008316145b92915050565b6102456040805160808101909152805f81525f60208201819052604082015260609081015290565b5f82815260016020526040908190208151608081019092528054829060ff16600481111561027557610275610bd1565b600481111561028657610286610bd1565b8152815473ffffffffffffffffffffffffffffffffffffffff6101009091048116602083015260018301541660408201526002820180546060909201916102cc90610f70565b80601f01602080910402602001604051908101604052809291908181526020018280546102f890610f70565b80156103435780601f1061031a57610100808354040283529160200191610343565b820191905f5260205f20905b81548152906001019060200180831161032657829003601f168201915b50505091909252505050602081015190915073ffffffffffffffffffffffffffffffffffffffff166103a9576040517f8cc00d16000000000000000000000000000000000000000000000000000000008152600481018390526024015b60405180910390fd5b919050565b73ffffffffffffffffffffffffffffffffffffffff81165f9081526002602090815260409182902080548351818402810184019094528084526060939283018282801561041857602002820191905f5260205f20905b815481526020019060010190808311610404575b50505050509050919050565b5f8181526020819052604090205473ffffffffffffffffffffffffffffffffffffffff16806103a9576040517f8cc00d16000000000000000000000000000000000000000000000000000000008152600481018390526024016103a0565b5f6104b9868686868660405160200161049e9493929190610fc1565b60405160208183030381529060405280519060200120610a39565b9695505050505050565b6040517f01ffc9a70000000000000000000000000000000000000000000000000000000081527f6ab67a0d000000000000000000000000000000000000000000000000000000006004820152819073ffffffffffffffffffffffffffffffffffffffff8216906301ffc9a790602401602060405180830381865afa15801561054d573d5f803e3d5ffd5b505050506040513d601f19601f82011682018060405250810190610571919061102b565b6105bf576040517f903b13fd00000000000000000000000000000000000000000000000000000000815273ffffffffffffffffffffffffffffffffffffffff821660048201526024016103a0565b5f6105cb8686866106dc565b5f8181526020819052604090205490915073ffffffffffffffffffffffffffffffffffffffff161561062d5785816040517f96b5684c0000000000000000000000000000000000000000000000000000000081526004016103a092919061104a565b5f81815260208190526040902080547fffffffffffffffffffffffff00000000000000000000000000000000000000001673ffffffffffffffffffffffffffffffffffffffff85161790558086600481111561068b5761068b610bd1565b60405173ffffffffffffffffffffffffffffffffffffffff861681527f660d31df25c96b8a337fcf12a56b7363e5a997639db853d5dbaec7c01f31bd809060200160405180910390a3505050505050565b5f6106f484848460405160200161049e929190611065565b949350505050565b5f3068929eee149b4bd21268540361071b5763ab143c065f526004601cfd5b3068929eee149b4bd21268556107ad87878787336040516020016107439594939291906110b0565b6040516020818303038152906040528051906020012084848080601f0160208091040260200160405190810160405280939291908181526020018383808284375f920191909152505073ffffffffffffffffffffffffffffffffffffffff8b169392915050610a6b565b90505f6107bd8888338989610482565b5f81815260016020526040902054909150610100900473ffffffffffffffffffffffffffffffffffffffff16156108245787816040517f96b5684c0000000000000000000000000000000000000000000000000000000081526004016103a092919061104a565b335f908152600260209081526040808320805460018101825590845291909220018290558051608081019091528089600481111561086457610864610bd1565b81526020018373ffffffffffffffffffffffffffffffffffffffff1681526020013373ffffffffffffffffffffffffffffffffffffffff16815260200187878080601f0160208091040260200160405190810160405280939291908181526020018383808284375f920182905250939094525050838152600160208190526040909120835181549193509183917fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff00169083600481111561092657610926610bd1565b0217905550602082015181547fffffffffffffffffffffff0000000000000000000000000000000000000000ff1661010073ffffffffffffffffffffffffffffffffffffffff9283160217825560408301516001830180547fffffffffffffffffffffffff00000000000000000000000000000000000000001691909216179055606082015160028201906109bb90826111a4565b50905050808860048111156109d2576109d2610bd1565b6040805173ffffffffffffffffffffffffffffffffffffffff808c168252861660208201527f2348fcdb9847b17a183e53aa32c0c5c76afdef8fcb14bb51f216c6611701ab1a910160405180910390a3503868929eee149b4bd21268559695505050505050565b5f8282604051602001610a4d9291906112bb565b60405160208183030381529060405280519060200120905092915050565b5f610a8c73ffffffffffffffffffffffffffffffffffffffff851684610b15565b6040517f439fab9100000000000000000000000000000000000000000000000000000000815290915073ffffffffffffffffffffffffffffffffffffffff82169063439fab9190610ae19085906004016112d5565b5f604051808303815f87803b158015610af8575f80fd5b505af1158015610b0a573d5f803e3d5ffd5b505050509392505050565b5f610b215f8484610b28565b9392505050565b5f6c5af43d3d93803e602a57fd5bf36021528260145273602c3d8160093d39f33d3d3d3d363d3d37363d735f52816035600c86f5905080610b705763301164255f526004601cfd5b5f6021529392505050565b5f60208284031215610b8b575f80fd5b81357fffffffff0000000000000000000000000000000000000000000000000000000081168114610b21575f80fd5b5f60208284031215610bca575f80fd5b5035919050565b7f4e487b71000000000000000000000000000000000000000000000000000000005f52602160045260245ffd5b60058110610c33577f4e487b71000000000000000000000000000000000000000000000000000000005f52602160045260245ffd5b9052565b5f81518084528060208401602086015e5f6020828601015260207fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0601f83011685010191505092915050565b60208152610c95602082018351610bfe565b73ffffffffffffffffffffffffffffffffffffffff602083015116604082015273ffffffffffffffffffffffffffffffffffffffff60408301511660608201525f60608301516080808401526106f460a0840182610c37565b803573ffffffffffffffffffffffffffffffffffffffff811681146103a9575f80fd5b5f60208284031215610d21575f80fd5b610b2182610cee565b602080825282518282018190525f918401906040840190835b81811015610d61578351835260209384019390920191600101610d43565b509095945050505050565b8035600581106103a9575f80fd5b5f8083601f840112610d8a575f80fd5b50813567ffffffffffffffff811115610da1575f80fd5b602083019150836020828501011115610db8575f80fd5b9250929050565b5f805f805f60808688031215610dd3575f80fd5b610ddc86610d6c565b9450610dea60208701610cee565b9350610df860408701610cee565b9250606086013567ffffffffffffffff811115610e13575f80fd5b610e1f88828901610d7a565b969995985093965092949392505050565b5f805f8060608587031215610e43575f80fd5b610e4c85610d6c565b9350602085013567ffffffffffffffff811115610e67575f80fd5b610e7387828801610d7a565b9094509250610e86905060408601610cee565b905092959194509250565b5f805f60408486031215610ea3575f80fd5b610eac84610d6c565b9250602084013567ffffffffffffffff811115610ec7575f80fd5b610ed386828701610d7a565b9497909650939450505050565b5f805f805f8060808789031215610ef5575f80fd5b610efe87610d6c565b9550610f0c60208801610cee565b9450604087013567ffffffffffffffff811115610f27575f80fd5b610f3389828a01610d7a565b909550935050606087013567ffffffffffffffff811115610f52575f80fd5b610f5e89828a01610d7a565b979a9699509497509295939492505050565b600181811c90821680610f8457607f821691505b602082108103610fbb577f4e487b71000000000000000000000000000000000000000000000000000000005f52602260045260245ffd5b50919050565b7fffffffffffffffffffffffffffffffffffffffff0000000000000000000000008560601b1681527fffffffffffffffffffffffffffffffffffffffff0000000000000000000000008460601b166014820152818360288301375f91016028019081529392505050565b5f6020828403121561103b575f80fd5b81518015158114610b21575f80fd5b604081016110588285610bfe565b8260208301529392505050565b818382375f9101908152919050565b600581106110a9577f4e487b71000000000000000000000000000000000000000000000000000000005f52602160045260245ffd5b60f81b9052565b6110ba8187611074565b7fffffffffffffffffffffffffffffffffffffffff0000000000000000000000008560601b1660018201528284601583013760609190911b7fffffffffffffffffffffffffffffffffffffffff00000000000000000000000016601591909201908101919091526029019392505050565b7f4e487b71000000000000000000000000000000000000000000000000000000005f52604160045260245ffd5b601f82111561119f57805f5260205f20601f840160051c8101602085101561117d5750805b601f840160051c820191505b8181101561119c575f8155600101611189565b50505b505050565b815167ffffffffffffffff8111156111be576111be61112b565b6111d2816111cc8454610f70565b84611158565b6020601f821160018114611223575f83156111ed5750848201515b7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff600385901b1c1916600184901b17845561119c565b5f848152602081207fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe08516915b828110156112705787850151825560209485019460019092019101611250565b50848210156112ac57868401517fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff600387901b60f8161c191681555b50505050600190811b01905550565b6112c58184611074565b6001810191909152602101919050565b602081525f610b216020830184610c3756fea26469706673582212201aeb45baec863dd98c38b9f47d31f69b6b6eb91582abf1067ba4fc72af10b2b764736f6c634300081a0033", i = {
7
7
  31337: void 0,
8
8
  ...S
9
- }, v = i[11155111] || I;
10
- function E(t) {
11
- return t.address && C(t.address);
9
+ }, G = i[11155111] || I;
10
+ function O(a) {
11
+ return a.address && C(a.address);
12
12
  }
13
- function O(t) {
14
- return t.address === null;
13
+ function E(a) {
14
+ return a.address === null;
15
15
  }
16
16
  const n = class n extends D {
17
17
  /**
@@ -35,16 +35,16 @@ const n = class n extends D {
35
35
  * @param {({ address?: Address; } | {})} param0....options
36
36
  */
37
37
  constructor({ config: e, account: f, ...b }) {
38
- if (E(b) && b.address)
38
+ if (O(b) && b.address)
39
39
  super({ account: f, config: e }, b.address);
40
- else if (O(b))
40
+ else if (E(b))
41
41
  super({ account: f, config: e }, []);
42
42
  else {
43
- const { address: a } = c(
43
+ const { address: d } = t(
44
44
  e,
45
45
  i
46
46
  );
47
- super({ account: f, config: e }, a);
47
+ super({ account: f, config: e }, d);
48
48
  }
49
49
  }
50
50
  /**
@@ -62,9 +62,9 @@ const n = class n extends D {
62
62
  * await registry.register(ContractAction.registryType, 'ContractAction', ContractAction.base)
63
63
  * ```
64
64
  */
65
- async register(e, f, b, a) {
65
+ async register(e, f, b, d) {
66
66
  return await this.awaitResult(
67
- this.registerRaw(e, f, b, a)
67
+ this.registerRaw(e, f, b, d)
68
68
  );
69
69
  }
70
70
  /**
@@ -77,22 +77,22 @@ const n = class n extends D {
77
77
  * @param {?WriteParams} [params]
78
78
  * @returns {Promise<{ hash: `0x${string}`; result: void; }>}
79
79
  */
80
- async registerRaw(e, f, b, a) {
81
- const { request: d, result: s } = await l(
80
+ async registerRaw(e, f, b, d) {
81
+ const { request: c, result: s } = await l(
82
82
  this._config,
83
83
  {
84
- ...c(
84
+ ...t(
85
85
  this._config,
86
86
  this.addresses,
87
- a == null ? void 0 : a.chainId
87
+ d == null ? void 0 : d.chainId
88
88
  ),
89
89
  args: [e, f, b],
90
90
  ...this.optionallyAttachAccount(),
91
91
  // biome-ignore lint/suspicious/noExplicitAny: Accept any shape of valid wagmi/viem parameters, wagmi does the same thing internally
92
- ...a
92
+ ...d
93
93
  }
94
94
  );
95
- return { hash: await u(this._config, d), result: s };
95
+ return { hash: await u(this._config, c), result: s };
96
96
  }
97
97
  /**
98
98
  * Initialize a new instance of a registered base implementation, returning the provided target with a new address set on it.
@@ -123,12 +123,12 @@ const n = class n extends D {
123
123
  * @returns {Promise<HashAndSimulatedResult<Address> & { target: Target } >} - The transaction hash, simulated return address, and given target bound to simulated return address
124
124
  */
125
125
  async initializeRaw(e, f, b) {
126
- const { hash: a, result: d } = await this.deployCloneRaw(
126
+ const { hash: d, result: c } = await this.deployCloneRaw(
127
127
  e,
128
128
  f,
129
129
  b
130
130
  );
131
- return { hash: a, result: d, target: f.at(d) };
131
+ return { hash: d, result: c, target: f.at(c) };
132
132
  }
133
133
  /**
134
134
  * Deploy a new instance of a registered base implementation, returning the provided target with a new address set on it.
@@ -143,8 +143,8 @@ const n = class n extends D {
143
143
  * biome-ignore lint/suspicious/noExplicitAny: any deployable target will suffice
144
144
  */
145
145
  async clone(e, f, b) {
146
- const a = await this.deployClone(e, f, b);
147
- return f.at(a);
146
+ const d = await this.deployClone(e, f, b);
147
+ return f.at(d);
148
148
  }
149
149
  /**
150
150
  *
@@ -174,28 +174,28 @@ const n = class n extends D {
174
174
  * biome-ignore lint/suspicious/noExplicitAny: any deployable target will suffice
175
175
  */
176
176
  async deployCloneRaw(e, f, b) {
177
- const a = f.buildParameters(void 0, {
177
+ const d = f.buildParameters(void 0, {
178
178
  config: this._config,
179
179
  account: this._account
180
- }), { address: d } = c(
180
+ }), { address: c } = t(
181
181
  this._config,
182
182
  f.bases,
183
183
  b == null ? void 0 : b.chainId
184
- ), { request: s, result: o } = await y(
184
+ ), { request: s, result: o } = await g(
185
185
  this._config,
186
186
  {
187
- ...c(
187
+ ...t(
188
188
  this._config,
189
189
  this.addresses,
190
190
  b == null ? void 0 : b.chainId
191
191
  ),
192
- args: [f.registryType, d, e, a.args[0]],
192
+ args: [f.registryType, c, e, d.args[0]],
193
193
  ...this.optionallyAttachAccount(),
194
194
  // biome-ignore lint/suspicious/noExplicitAny: Accept any shape of valid wagmi/viem parameters, wagmi does the same thing internally
195
195
  ...b
196
196
  }
197
197
  );
198
- return { hash: await g(this._config, s), result: o };
198
+ return { hash: await y(this._config, s), result: o };
199
199
  }
200
200
  /**
201
201
  * Get the address of a registered base implementation.
@@ -208,8 +208,8 @@ const n = class n extends D {
208
208
  * @returns {Promise<Address>} - The address of the implementation
209
209
  */
210
210
  async getBaseImplementation(e, f) {
211
- return await w(this._config, {
212
- ...c(
211
+ return await A(this._config, {
212
+ ...t(
213
213
  this._config,
214
214
  this.addresses,
215
215
  f == null ? void 0 : f.chainId
@@ -231,7 +231,7 @@ const n = class n extends D {
231
231
  */
232
232
  async getClone(e, f) {
233
233
  return await _(this._config, {
234
- ...c(
234
+ ...t(
235
235
  this._config,
236
236
  this.addresses,
237
237
  f == null ? void 0 : f.chainId
@@ -252,8 +252,8 @@ const n = class n extends D {
252
252
  * @returns {Promise<Hex[]>} - The list of deployed clones for the given deployer
253
253
  */
254
254
  async getClones(e, f) {
255
- return await A(this._config, {
256
- ...c(
255
+ return await w(this._config, {
256
+ ...t(
257
257
  this._config,
258
258
  this.addresses,
259
259
  f == null ? void 0 : f.chainId
@@ -276,17 +276,17 @@ const n = class n extends D {
276
276
  * @param {?ReadParams} [params]
277
277
  * @returns {Promise<Hex>} - The unique identifier for the clone
278
278
  */
279
- async getCloneIdentifier(e, f, b, a, d) {
279
+ async getCloneIdentifier(e, f, b, d, c) {
280
280
  return await h(this._config, {
281
- ...c(
281
+ ...t(
282
282
  this._config,
283
283
  this.addresses,
284
- d == null ? void 0 : d.chainId
284
+ c == null ? void 0 : c.chainId
285
285
  ),
286
- args: [e, f, b, a],
286
+ args: [e, f, b, d],
287
287
  ...this.optionallyAttachAccount(),
288
288
  // biome-ignore lint/suspicious/noExplicitAny: Accept any shape of valid wagmi/viem parameters, wagmi does the same thing internally
289
- ...d
289
+ ...c
290
290
  });
291
291
  }
292
292
  /**
@@ -301,7 +301,7 @@ const n = class n extends D {
301
301
  */
302
302
  async getIdentifier(e, f, b) {
303
303
  return await h(this._config, {
304
- ...c(
304
+ ...t(
305
305
  this._config,
306
306
  this.addresses,
307
307
  b == null ? void 0 : b.chainId
@@ -334,7 +334,7 @@ const n = class n extends D {
334
334
  n.addresses = i;
335
335
  let r = n;
336
336
  export {
337
- v as BOOST_REGISTRY_ADDRESS,
337
+ G as BOOST_REGISTRY_ADDRESS,
338
338
  i as BOOST_REGISTRY_ADDRESSES,
339
339
  r as BoostRegistry,
340
340
  R as boostRegistryAbi
@@ -1 +1 @@
1
- {"version":3,"file":"BoostRegistry.js","sources":["../src/BoostRegistry.ts"],"sourcesContent":["import {\n boostRegistryAbi,\n readBoostRegistryGetBaseImplementation,\n readBoostRegistryGetClone,\n readBoostRegistryGetCloneIdentifier,\n readBoostRegistryGetClones,\n simulateBoostRegistryDeployClone,\n simulateBoostRegistryRegister,\n writeBoostRegistryDeployClone,\n writeBoostRegistryRegister,\n} from '@boostxyz/evm';\nimport { bytecode } from '@boostxyz/evm/artifacts/contracts/BoostRegistry.sol/BoostRegistry.json';\nimport {\n type Abi,\n type Address,\n type ContractEventName,\n type Hex,\n isAddress,\n zeroAddress,\n} from 'viem';\nimport { BoostRegistry as BoostRegistryBases } from '../dist/deployments.json';\nimport {\n Deployable,\n type DeployableOptions,\n type GenericDeployableParams,\n} from './Deployable/Deployable';\nimport type { DeployableTarget } from './Deployable/DeployableTarget';\nimport {\n type GenericLog,\n type HashAndSimulatedResult,\n type ReadParams,\n type RegistryType,\n type WriteParams,\n assertValidAddressByChainId,\n} from './utils';\n\n/**\n * The ABI of the BoostRegistry contract, if needed for low level operations\n *\n * @type {typeof boostRegistryAbi}\n */\nexport { boostRegistryAbi };\n\n/**\n * The fixed addresses for the deployed Boost Registry.\n * By default, `new BoostRegistry` will use the address deployed to the currently connected chain, or `BOOST_REGISTRY_ADDRESS` if not provided.\n *\n * @type {Record<number, Address>}\n */\nexport const BOOST_REGISTRY_ADDRESSES: Record<number, Address> = {\n 31337: import.meta.env.VITE_BOOST_REGISTRY_ADDRESS,\n ...(BoostRegistryBases as Record<number, Address>),\n};\n\n/**\n * The address of the deployed `BoostRegistry` instance. In prerelease mode, this will be its sepolia address\n *\n * @type {Address}\n */\nexport const BOOST_REGISTRY_ADDRESS =\n BOOST_REGISTRY_ADDRESSES[__DEFAULT_CHAIN_ID__ as unknown as number] ||\n zeroAddress;\n\n/**\n * A record of `BoostRegistry` event names to `AbiEvent` objects for use with `getLogs`\n *\n * @export\n * @typedef {BoostRegistryLog}\n * @template {ContractEventName<typeof boostRegistryAbi>} [event=ContractEventName<\n * typeof boostRegistryAbi\n * >]\n */\nexport type BoostRegistryLog<\n event extends ContractEventName<typeof boostRegistryAbi> = ContractEventName<\n typeof boostRegistryAbi\n >,\n> = GenericLog<typeof boostRegistryAbi, event>;\n\n/**\n * An interface representing an on-chain Clone\n *\n * @export\n * @interface Clone\n * @typedef {Clone}\n */\nexport interface Clone {\n // The clone's component type'\n baseType: RegistryType;\n // The address of the initialized clone.\n instance: Address;\n // The deployer of the clone.\n deployer: Address;\n // The display name of the clone\n name: string;\n}\n\n/**\n * Instantiation options for a previously deployed Boost Registry\n *\n * @export\n * @interface BoostRegistryDeployedOptions\n * @typedef {BoostRegistryDeployedOptions}\n * @extends {DeployableOptions}\n */\nexport interface BoostRegistryDeployedOptions extends DeployableOptions {\n /**\n * The address for a Boost Registry, if different than `BOOST_REGISTRY_ADDRESS`\n *\n * @type {?Address}\n */\n address?: Address;\n}\n\n/**\n * A typeguard to determine if instantiation is using a custom address.\n *\n * @param {*} opts\n * @returns {opts is BoostRegistryDeployedOptions}\n */\nfunction isBoostRegistryDeployed(\n // biome-ignore lint/suspicious/noExplicitAny: type guard\n opts: any,\n): opts is BoostRegistryDeployedOptions {\n return opts.address && isAddress(opts.address);\n}\n\n/**\n * The Boost Registry does not take any construction arguments, so if you'd like to deploy a new Boost Registry, pass an explicit null to the `address` field.\n *\n * @export\n * @interface BoostRegistryOptionsWithPayload\n * @typedef {BoostRegistryOptionsWithPayload}\n * @extends {DeployableOptions}\n */\nexport interface BoostRegistryOptionsWithPayload extends DeployableOptions {\n /**\n *\n * @type {null}\n */\n address: null;\n}\n\n/**\n * A typeguard to determine if the user is intending to deploy a new Boost Registry before usage\n *\n * @param {*} opts\n * @returns {opts is BoostRegistryOptionsWithPayload}\n */\nfunction isBoostRegistryDeployable(\n // biome-ignore lint/suspicious/noExplicitAny: type guard\n opts: any,\n): opts is BoostRegistryOptionsWithPayload {\n return opts.address === null;\n}\n\n/**\n * Instantiation options for a Boost Registry.\n *\n * @example\n * To target Boost's Registry, omit the address field.\n * Otherwise, supply a custom address to a previously deployed custom Boost Registry.\n * You can also pass `{ address: null }` if you are intending to deploy a new Boost Registry.\n * ```ts\n * let registry = new BoostRegistry({ config, account })\n * // or\n * registry = new BoostRegistry({ config, account, address: CUSTOM_ADDRESS })\n * // or\n * registry = new BoostRegistry({ config, account, address: null })\n * await registry.deploy()\n * ```\n *\n * @export\n * @typedef {BoostRegistryConfig}\n */\nexport type BoostRegistryConfig =\n | BoostRegistryDeployedOptions\n | BoostRegistryOptionsWithPayload;\n\n/**\n * Constructs a new Boost Registry. A registry for base implementations and cloned instances.\n * This contract is used to register base implementations and deploy new instances of those implementations for use within the Boost protocol.\n *\n * @see {@link BoostRegistryConfig}\n * @export\n * @class BoostRegistry\n * @typedef {BoostRegistry}\n * @extends {Deployable<never[]>}\n */\nexport class BoostRegistry extends Deployable<\n never[],\n typeof boostRegistryAbi\n> {\n /**\n * A static property representing a map of stringified chain ID's to the address of the deployed implementation on chain\n *\n * @static\n * @readonly\n * @type {Record<string, Address>}\n */\n static readonly addresses: Record<number, Address> = BOOST_REGISTRY_ADDRESSES;\n\n /**\n * A getter that will return Boost registry's static addresses by numerical chain ID\n *\n * @public\n * @readonly\n * @type {Record<number, Address>}\n */\n public get addresses(): Record<number, Address> {\n return (this.constructor as typeof BoostRegistry).addresses;\n }\n\n /**\n * Creates an instance of BoostRegistry.\n *\n * @see {@link BoostRegistryConfig}\n * @constructor\n * @param {BoostRegistryConfig} param0\n * @param {Config} param0.config - [Wagmi Configuration](https://wagmi.sh/core/api/createConfig)\n * @param {?Account} [param0.account] - [Viem Local Account](https://viem.sh/docs/accounts/local)\n * @param {({ address?: Address; } | {})} param0....options\n */\n constructor({ config, account, ...options }: BoostRegistryConfig) {\n if (isBoostRegistryDeployed(options) && options.address) {\n super({ account, config }, options.address);\n } else if (isBoostRegistryDeployable(options)) {\n super({ account, config }, []);\n } else {\n const { address } = assertValidAddressByChainId(\n config,\n BOOST_REGISTRY_ADDRESSES,\n );\n super({ account, config }, address);\n }\n }\n\n /**\n * Register a new base implementation of a given type\n *\n * @public\n * @async\n * @param {RegistryType} registryType - The base type for the implementation\n * @param {string} name - A name for the implementation (must be unique within the given type)\n * @param {Address} implementation - The address of the implementation contract\n * @param {?WriteParams} [params] - Optional params to provide the underlying Viem contract call\n * @returns {Promise<void>}\n * @example\n * ```ts\n * await registry.register(ContractAction.registryType, 'ContractAction', ContractAction.base)\n * ```\n */\n public async register(\n registryType: RegistryType,\n name: string,\n implementation: Address,\n params?: WriteParams,\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,\n ) {\n const { request, result } = await simulateBoostRegistryRegister(\n this._config,\n {\n ...assertValidAddressByChainId(\n this._config,\n this.addresses,\n 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,\n ): Promise<Target> {\n return this.clone(displayName, target, params);\n }\n\n /**\n * Initialize a new instance of a registered base implementation, returning a transaction hash, resulting address from simulated transaction, and the given target bound to the resulting address.\n * This method is the same as `deployCloneRaw`, but serves to make its function more obvious as to why you'd need to use it.\n *\n * @public\n * @async\n * @template {DeployableTarget} Target\n * @param {string} displayName - The display name for the clone\n * @param {Target} target - An instance of a target contract to clone and initialize\n * @param {?WriteParams} [params]\n * @returns {Promise<HashAndSimulatedResult<Address> & { target: Target } >} - The transaction hash, simulated return address, and given target bound to simulated return address\n */\n public async initializeRaw<Target extends DeployableTarget<unknown, Abi>>(\n displayName: string,\n target: Target,\n params?: WriteParams,\n ): Promise<HashAndSimulatedResult<Address> & { target: Target }> {\n const { hash, result } = await this.deployCloneRaw(\n displayName,\n target,\n params,\n );\n return { hash, result, target: target.at(result) };\n }\n\n /**\n * Deploy a new instance of a registered base implementation, returning the provided target with a new address set on it.\n *\n * @public\n * @async\n * @template {DeployableTarget} Target\n * @param {string} displayName - The display name for the clone\n * @param {Target} target - An instance of a target contract to clone and initialize\n * @param {?WriteParams} [params]\n * @returns {Promise<Target>} - The provided instance, but with a new address attached.\n * biome-ignore lint/suspicious/noExplicitAny: any deployable target will suffice\n */\n public async clone<Target extends DeployableTarget<any, any>>(\n displayName: string,\n target: Target,\n params?: WriteParams,\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,\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,\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?.chainId,\n );\n const { request, result } = await simulateBoostRegistryDeployClone(\n this._config,\n {\n ...assertValidAddressByChainId(\n this._config,\n this.addresses,\n 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(identifier: Hex, params?: ReadParams) {\n return await readBoostRegistryGetBaseImplementation(this._config, {\n ...assertValidAddressByChainId(\n this._config,\n this.addresses,\n params?.chainId,\n ),\n args: [identifier],\n ...this.optionallyAttachAccount(),\n // biome-ignore lint/suspicious/noExplicitAny: Accept any shape of valid wagmi/viem parameters, wagmi does the same thing internally\n ...(params as any),\n });\n }\n\n /**\n * Get the address of a deployed clone by its identifier\n *\n * @public\n * @async\n * @param {Hex} identifier - The unique identifier for the deployed clone (see {getCloneIdentifier})\n * @param {?ReadParams} [params]\n * @returns {Promise<Clone>} - The on-chain representation of the clone\n */\n public async getClone(identifier: Hex, params?: ReadParams): Promise<Clone> {\n return await readBoostRegistryGetClone(this._config, {\n ...assertValidAddressByChainId(\n this._config,\n this.addresses,\n params?.chainId,\n ),\n args: [identifier],\n ...this.optionallyAttachAccount(),\n // biome-ignore lint/suspicious/noExplicitAny: Accept any shape of valid wagmi/viem parameters, wagmi does the same thing internally\n ...(params as any),\n });\n }\n\n /**\n * Get the list of identifiers of deployed clones for a given deployer\n *\n * @public\n * @async\n * @param {Address} deployer - The address of the deployer\n * @param {?ReadParams} [params]\n * @returns {Promise<Hex[]>} - The list of deployed clones for the given deployer\n */\n public async getClones(deployer: Address, params?: ReadParams) {\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,\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,\n ) {\n return await readBoostRegistryGetCloneIdentifier(this._config, {\n ...assertValidAddressByChainId(\n this._config,\n this.addresses,\n params?.chainId,\n ),\n args: [registryType, displayName],\n ...this.optionallyAttachAccount(),\n // biome-ignore lint/suspicious/noExplicitAny: Accept any shape of valid wagmi/viem parameters, wagmi does the same thing internally\n ...(params as any),\n });\n }\n\n /**\n * @inheritdoc\n *\n * @public\n * @param {?never[]} [_payload]\n * @param {?DeployableOptions} [_options]\n * @returns {GenericDeployableParams}\n */\n public override buildParameters(\n _payload?: never[],\n _options?: DeployableOptions,\n ): GenericDeployableParams {\n const [, options] = this.validateDeploymentConfig([], _options);\n return {\n abi: boostRegistryAbi,\n bytecode: bytecode as Hex,\n // biome-ignore lint/suspicious/noExplicitAny: Registry doesn't construct or initialize\n args: [] as any,\n ...this.optionallyAttachAccount(options.account),\n };\n }\n}\n"],"names":["BOOST_REGISTRY_ADDRESSES","BoostRegistryBases","BOOST_REGISTRY_ADDRESS","zeroAddress","isBoostRegistryDeployed","opts","isAddress","isBoostRegistryDeployable","_BoostRegistry","Deployable","config","account","options","address","assertValidAddressByChainId","registryType","name","implementation","params","request","result","simulateBoostRegistryRegister","writeBoostRegistryRegister","displayName","target","hash","instance","payload","baseAddress","simulateBoostRegistryDeployClone","writeBoostRegistryDeployClone","identifier","readBoostRegistryGetBaseImplementation","readBoostRegistryGetClone","deployer","readBoostRegistryGetClones","base","readBoostRegistryGetCloneIdentifier","_payload","_options","boostRegistryAbi","bytecode","BoostRegistry"],"mappings":";;;;;s9bAiDaA,IAAoD;AAAA,EAC/D,OAAO;AAAA,EACP,GAAIC;AACN,GAOaC,IACXF,EAAyB,QAAyC,KAClEG;AA0DF,SAASC,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,EAAE,SAAAG,MAAYC;AAAA,QAClBJ;AAAA,QACAV;AAAA,MAAA;AAEF,YAAM,EAAE,SAAAW,GAAS,QAAAD,EAAO,GAAGG,CAAO;AAAA,IACpC;AAAA,EACF;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,EAiBA,MAAa,SACXE,GACAC,GACAC,GACAC,GACA;AACA,WAAO,MA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AA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,EAYA,MAAa,cACXH,GACAQ,GACAL,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,GAAcQ,CAAW;AAAA,MAChC,GAAG,KAAK,wBAAwB;AAAA;AAAA,MAEhC,GAAIL;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;AA3XEJ,EAAgB,YAAqCR;AAXhD,IAAM0C,IAANlC;"}
1
+ {"version":3,"file":"BoostRegistry.js","sources":["../src/BoostRegistry.ts"],"sourcesContent":["import {\n boostRegistryAbi,\n readBoostRegistryGetBaseImplementation,\n readBoostRegistryGetClone,\n readBoostRegistryGetCloneIdentifier,\n readBoostRegistryGetClones,\n simulateBoostRegistryDeployClone,\n simulateBoostRegistryRegister,\n writeBoostRegistryDeployClone,\n writeBoostRegistryRegister,\n} from '@boostxyz/evm';\nimport { bytecode } from '@boostxyz/evm/artifacts/contracts/BoostRegistry.sol/BoostRegistry.json';\nimport {\n type Abi,\n type Address,\n type ContractEventName,\n type Hex,\n isAddress,\n zeroAddress,\n} from 'viem';\nimport { BoostRegistry as BoostRegistryBases } from '../dist/deployments.json';\nimport {\n Deployable,\n type DeployableOptions,\n type GenericDeployableParams,\n} from './Deployable/Deployable';\nimport type { DeployableTarget } from './Deployable/DeployableTarget';\nimport {\n type GenericLog,\n type HashAndSimulatedResult,\n type ReadParams,\n type RegistryType,\n type WriteParams,\n assertValidAddressByChainId,\n} from './utils';\n\n/**\n * The ABI of the BoostRegistry contract, if needed for low level operations\n *\n * @type {typeof boostRegistryAbi}\n */\nexport { boostRegistryAbi };\n\n/**\n * The fixed addresses for the deployed Boost Registry.\n * By default, `new BoostRegistry` will use the address deployed to the currently connected chain, or `BOOST_REGISTRY_ADDRESS` if not provided.\n *\n * @type {Record<number, Address>}\n */\nexport const BOOST_REGISTRY_ADDRESSES: Record<number, Address> = {\n 31337: import.meta.env.VITE_BOOST_REGISTRY_ADDRESS,\n ...(BoostRegistryBases as Record<number, Address>),\n};\n\n/**\n * The address of the deployed `BoostRegistry` instance. In prerelease mode, this will be its sepolia address\n *\n * @type {Address}\n */\nexport const BOOST_REGISTRY_ADDRESS =\n BOOST_REGISTRY_ADDRESSES[__DEFAULT_CHAIN_ID__ as unknown as number] ||\n zeroAddress;\n\n/**\n * A record of `BoostRegistry` event names to `AbiEvent` objects for use with `getLogs`\n *\n * @export\n * @typedef {BoostRegistryLog}\n * @template {ContractEventName<typeof boostRegistryAbi>} [event=ContractEventName<\n * typeof boostRegistryAbi\n * >]\n */\nexport type BoostRegistryLog<\n event extends ContractEventName<typeof boostRegistryAbi> = ContractEventName<\n typeof boostRegistryAbi\n >,\n> = GenericLog<typeof boostRegistryAbi, event>;\n\n/**\n * An interface representing an on-chain Clone\n *\n * @export\n * @interface Clone\n * @typedef {Clone}\n */\nexport interface Clone {\n // The clone's component type'\n baseType: RegistryType;\n // The address of the initialized clone.\n instance: Address;\n // The deployer of the clone.\n deployer: Address;\n // The display name of the clone\n name: string;\n}\n\n/**\n * Instantiation options for a previously deployed Boost Registry\n *\n * @export\n * @interface BoostRegistryDeployedOptions\n * @typedef {BoostRegistryDeployedOptions}\n * @extends {DeployableOptions}\n */\nexport interface BoostRegistryDeployedOptions extends DeployableOptions {\n /**\n * The address for a Boost Registry, if different than `BOOST_REGISTRY_ADDRESS`\n *\n * @type {?Address}\n */\n address?: Address;\n}\n\n/**\n * A typeguard to determine if instantiation is using a custom address.\n *\n * @param {*} opts\n * @returns {opts is BoostRegistryDeployedOptions}\n */\nfunction isBoostRegistryDeployed(\n // biome-ignore lint/suspicious/noExplicitAny: type guard\n opts: any,\n): opts is BoostRegistryDeployedOptions {\n return opts.address && isAddress(opts.address);\n}\n\n/**\n * The Boost Registry does not take any construction arguments, so if you'd like to deploy a new Boost Registry, pass an explicit null to the `address` field.\n *\n * @export\n * @interface BoostRegistryOptionsWithPayload\n * @typedef {BoostRegistryOptionsWithPayload}\n * @extends {DeployableOptions}\n */\nexport interface BoostRegistryOptionsWithPayload extends DeployableOptions {\n /**\n *\n * @type {null}\n */\n address: null;\n}\n\n/**\n * A typeguard to determine if the user is intending to deploy a new Boost Registry before usage\n *\n * @param {*} opts\n * @returns {opts is BoostRegistryOptionsWithPayload}\n */\nfunction isBoostRegistryDeployable(\n // biome-ignore lint/suspicious/noExplicitAny: type guard\n opts: any,\n): opts is BoostRegistryOptionsWithPayload {\n return opts.address === null;\n}\n\n/**\n * Instantiation options for a Boost Registry.\n *\n * @example\n * To target Boost's Registry, omit the address field.\n * Otherwise, supply a custom address to a previously deployed custom Boost Registry.\n * You can also pass `{ address: null }` if you are intending to deploy a new Boost Registry.\n * ```ts\n * let registry = new BoostRegistry({ config, account })\n * // or\n * registry = new BoostRegistry({ config, account, address: CUSTOM_ADDRESS })\n * // or\n * registry = new BoostRegistry({ config, account, address: null })\n * await registry.deploy()\n * ```\n *\n * @export\n * @typedef {BoostRegistryConfig}\n */\nexport type BoostRegistryConfig =\n | BoostRegistryDeployedOptions\n | BoostRegistryOptionsWithPayload;\n\n/**\n * Constructs a new Boost Registry. A registry for base implementations and cloned instances.\n * This contract is used to register base implementations and deploy new instances of those implementations for use within the Boost protocol.\n *\n * @see {@link BoostRegistryConfig}\n * @export\n * @class BoostRegistry\n * @typedef {BoostRegistry}\n * @extends {Deployable<never[]>}\n */\nexport class BoostRegistry extends Deployable<\n never[],\n typeof boostRegistryAbi\n> {\n /**\n * A static property representing a map of stringified chain ID's to the address of the deployed implementation on chain\n *\n * @static\n * @readonly\n * @type {Record<string, Address>}\n */\n static readonly addresses: Record<number, Address> = BOOST_REGISTRY_ADDRESSES;\n\n /**\n * A getter that will return Boost registry's static addresses by numerical chain ID\n *\n * @public\n * @readonly\n * @type {Record<number, Address>}\n */\n public get addresses(): Record<number, Address> {\n return (this.constructor as typeof BoostRegistry).addresses;\n }\n\n /**\n * Creates an instance of BoostRegistry.\n *\n * @see {@link BoostRegistryConfig}\n * @constructor\n * @param {BoostRegistryConfig} param0\n * @param {Config} param0.config - [Wagmi Configuration](https://wagmi.sh/core/api/createConfig)\n * @param {?Account} [param0.account] - [Viem Local Account](https://viem.sh/docs/accounts/local)\n * @param {({ address?: Address; } | {})} param0....options\n */\n constructor({ config, account, ...options }: BoostRegistryConfig) {\n if (isBoostRegistryDeployed(options) && options.address) {\n super({ account, config }, options.address);\n } else if (isBoostRegistryDeployable(options)) {\n super({ account, config }, []);\n } else {\n const { address } = assertValidAddressByChainId(\n config,\n BOOST_REGISTRY_ADDRESSES,\n );\n super({ account, config }, address);\n }\n }\n\n /**\n * Register a new base implementation of a given type\n *\n * @public\n * @async\n * @param {RegistryType} registryType - The base type for the implementation\n * @param {string} name - A name for the implementation (must be unique within the given type)\n * @param {Address} implementation - The address of the implementation contract\n * @param {?WriteParams} [params] - Optional params to provide the underlying Viem contract call\n * @returns {Promise<void>}\n * @example\n * ```ts\n * await registry.register(ContractAction.registryType, 'ContractAction', ContractAction.base)\n * ```\n */\n public async register(\n registryType: RegistryType,\n name: string,\n implementation: Address,\n params?: WriteParams,\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,\n ) {\n const { request, result } = await simulateBoostRegistryRegister(\n this._config,\n {\n ...assertValidAddressByChainId(\n this._config,\n this.addresses,\n 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,\n ): Promise<Target> {\n return this.clone(displayName, target, params);\n }\n\n /**\n * Initialize a new instance of a registered base implementation, returning a transaction hash, resulting address from simulated transaction, and the given target bound to the resulting address.\n * This method is the same as `deployCloneRaw`, but serves to make its function more obvious as to why you'd need to use it.\n *\n * @public\n * @async\n * @template {DeployableTarget} Target\n * @param {string} displayName - The display name for the clone\n * @param {Target} target - An instance of a target contract to clone and initialize\n * @param {?WriteParams} [params]\n * @returns {Promise<HashAndSimulatedResult<Address> & { target: Target } >} - The transaction hash, simulated return address, and given target bound to simulated return address\n */\n public async initializeRaw<Target extends DeployableTarget<unknown, Abi>>(\n displayName: string,\n target: Target,\n params?: WriteParams,\n ): Promise<HashAndSimulatedResult<Address> & { target: Target }> {\n const { hash, result } = await this.deployCloneRaw(\n displayName,\n target,\n params,\n );\n return { hash, result, target: target.at(result) };\n }\n\n /**\n * Deploy a new instance of a registered base implementation, returning the provided target with a new address set on it.\n *\n * @public\n * @async\n * @template {DeployableTarget} Target\n * @param {string} displayName - The display name for the clone\n * @param {Target} target - An instance of a target contract to clone and initialize\n * @param {?WriteParams} [params]\n * @returns {Promise<Target>} - The provided instance, but with a new address attached.\n * biome-ignore lint/suspicious/noExplicitAny: any deployable target will suffice\n */\n public async clone<Target extends DeployableTarget<any, any>>(\n displayName: string,\n target: Target,\n params?: WriteParams,\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,\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,\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?.chainId,\n );\n const { request, result } = await simulateBoostRegistryDeployClone(\n this._config,\n {\n ...assertValidAddressByChainId(\n this._config,\n this.addresses,\n 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(identifier: Hex, params?: ReadParams) {\n return await readBoostRegistryGetBaseImplementation(this._config, {\n ...assertValidAddressByChainId(\n this._config,\n this.addresses,\n params?.chainId,\n ),\n args: [identifier],\n ...this.optionallyAttachAccount(),\n // biome-ignore lint/suspicious/noExplicitAny: Accept any shape of valid wagmi/viem parameters, wagmi does the same thing internally\n ...(params as any),\n });\n }\n\n /**\n * Get the address of a deployed clone by its identifier\n *\n * @public\n * @async\n * @param {Hex} identifier - The unique identifier for the deployed clone (see {getCloneIdentifier})\n * @param {?ReadParams} [params]\n * @returns {Promise<Clone>} - The on-chain representation of the clone\n */\n public async getClone(identifier: Hex, params?: ReadParams): Promise<Clone> {\n return await readBoostRegistryGetClone(this._config, {\n ...assertValidAddressByChainId(\n this._config,\n this.addresses,\n params?.chainId,\n ),\n args: [identifier],\n ...this.optionallyAttachAccount(),\n // biome-ignore lint/suspicious/noExplicitAny: Accept any shape of valid wagmi/viem parameters, wagmi does the same thing internally\n ...(params as any),\n });\n }\n\n /**\n * Get the list of identifiers of deployed clones for a given deployer\n *\n * @public\n * @async\n * @param {Address} deployer - The address of the deployer\n * @param {?ReadParams} [params]\n * @returns {Promise<Hex[]>} - The list of deployed clones for the given deployer\n */\n public async getClones(deployer: Address, params?: ReadParams) {\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,\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,\n ) {\n return await readBoostRegistryGetCloneIdentifier(this._config, {\n ...assertValidAddressByChainId(\n this._config,\n this.addresses,\n params?.chainId,\n ),\n args: [registryType, displayName],\n ...this.optionallyAttachAccount(),\n // biome-ignore lint/suspicious/noExplicitAny: Accept any shape of valid wagmi/viem parameters, wagmi does the same thing internally\n ...(params as any),\n });\n }\n\n /**\n * @inheritdoc\n *\n * @public\n * @param {?never[]} [_payload]\n * @param {?DeployableOptions} [_options]\n * @returns {GenericDeployableParams}\n */\n public override buildParameters(\n _payload?: never[],\n _options?: DeployableOptions,\n ): GenericDeployableParams {\n const [, options] = this.validateDeploymentConfig([], _options);\n return {\n abi: boostRegistryAbi,\n bytecode: bytecode as Hex,\n // biome-ignore lint/suspicious/noExplicitAny: Registry doesn't construct or initialize\n args: [] as any,\n ...this.optionallyAttachAccount(options.account),\n };\n }\n}\n"],"names":["BOOST_REGISTRY_ADDRESSES","BoostRegistryBases","BOOST_REGISTRY_ADDRESS","zeroAddress","isBoostRegistryDeployed","opts","isAddress","isBoostRegistryDeployable","_BoostRegistry","Deployable","config","account","options","address","assertValidAddressByChainId","registryType","name","implementation","params","request","result","simulateBoostRegistryRegister","writeBoostRegistryRegister","displayName","target","hash","instance","payload","baseAddress","simulateBoostRegistryDeployClone","writeBoostRegistryDeployClone","identifier","readBoostRegistryGetBaseImplementation","readBoostRegistryGetClone","deployer","readBoostRegistryGetClones","base","readBoostRegistryGetCloneIdentifier","_payload","_options","boostRegistryAbi","bytecode","BoostRegistry"],"mappings":";;;;;koTAiDaA,IAAoD;AAAA,EAC/D,OAAO;AAAA,EACP,GAAIC;AACN,GAOaC,IACXF,EAAyB,QAAyC,KAClEG;AA0DF,SAASC,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,EAAE,SAAAG,MAAYC;AAAA,QAClBJ;AAAA,QACAV;AAAA,MAAA;AAEF,YAAM,EAAE,SAAAW,GAAS,QAAAD,EAAO,GAAGG,CAAO;AAAA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AAQ;AAAA,MACV;AAAA,MACA,MAAM,CAACH,GAAcqB,GAAMF,GAAUX,CAAW;AAAA,MAChD,GAAG,KAAK,wBAAwB;AAAA;AAAA,MAEhC,GAAIL;AAAA,IAAA,CACL;AAAA,EACH;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,EAYA,MAAa,cACXH,GACAQ,GACAL,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,GAAcQ,CAAW;AAAA,MAChC,GAAG,KAAK,wBAAwB;AAAA;AAAA,MAEhC,GAAIL;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;AA3XEJ,EAAgB,YAAqCR;AAXhD,IAAM0C,IAANlC;"}
@@ -0,0 +1,2 @@
1
+ "use strict";const d=require("./generated-DgXPUgXl.cjs"),u=require("./componentInterfaces-D7r9xJmt.cjs"),l=require("@wagmi/core"),g=require("./errors.cjs"),r=require("./Budgets/ManagedBudget.cjs"),t=require("viem"),A=require("./deployments-CIXw_WKk.cjs"),p=require("./Deployable/DeployableTargetWithRBAC.cjs"),m=require("./utils.cjs"),B="0x6080604052348015600e575f80fd5b506015601f565b601b601f565b607e565b63409feecd1980546001811615603c5763f92ee8a95f526004601cfd5b8160c01c808260011c146079578060011b8355806020527fc7f505b2f371ae2175ee4913f4499e1f2633a7b5936321eed1cdaeb6115181d2602080a15b505050565b6137998061008b5f395ff3fe6080604052600436106102ea575f3560e01c806375b238fc11610183578063dcc21361116100d5578063f8724aba11610089578063fe56e23211610063578063fe56e232146108e4578063fe9fbb8014610903578063fee81cf414610922576102f1565b8063f8724aba14610887578063f9a802c3146108a6578063fa4ca9b1146108c5576102f1565b8063f04e283e116100ba578063f04e283e1461081c578063f23a6e611461082f578063f2fde38b14610874576102f1565b8063dcc21361146107e9578063ec87621c14610808576102f1565b8063b300579311610137578063c6004a3a11610111578063c6004a3a14610774578063d2514e841461079f578063d8c12d22146107be576102f1565b8063b3005793146106ef578063bc197c811461070e578063be4994f814610755576102f1565b80638da5cb5b116101685780638da5cb5b14610690578063929470eb146106bb578063a6f7f5d6146106da576102f1565b806375b238fc1461063b578063774c33ab1461064f576102f1565b8063439fab911161023c578063514e62fc116101f05780635aef467a116101ca5780635aef467a1461060157806361400c9914610614578063715018a614610633576102f1565b8063514e62fc1461059057806354d1f13d146105c5578063578bcf35146105cd576102f1565b8063451cc19111610221578063451cc1911461053d578063474f5a441461055e5780634a4ee7b11461057d576102f1565b8063439fab91146104ff57806343cc96e11461051e576102f1565b80631c10893f1161029e57806328d6183b1161027857806328d6183b146104505780632de94807146104af5780634359d28a146104e0576102f1565b80631c10893f146104005780631cd64df4146104135780632569296214610448576102f1565b806314135ce0116102cf57806314135ce014610384578063183a4f6e146103af578063185832a3146103c4576102f1565b806301ffc9a71461032357806310098ad514610357576102f1565b366102f157005b6040517fd623472500000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b34801561032e575f80fd5b5061034261033d3660046129b4565b610953565b60405190151581526020015b60405180910390f35b348015610362575f80fd5b50610376610371366004612a07565b610963565b60405190815260200161034e565b34801561038f575f80fd5b5061037661039e366004612a07565b60046020525f908152604090205481565b6103c26103bd366004612a22565b61098e565b005b3480156103cf575f80fd5b506103e36103de366004612a7e565b61099b565b604080519283526001600160a01b0390911660208301520161034e565b6103c261040e366004612ae0565b6109c3565b34801561041e575f80fd5b5061034261042d366004612ae0565b638b78c6d8600c9081525f9290925260209091205481161490565b6103c26109d9565b34801561045b575f80fd5b507fde98bbf0000000000000000000000000000000000000000000000000000000005b6040517fffffffff00000000000000000000000000000000000000000000000000000000909116815260200161034e565b3480156104ba575f80fd5b506103766104c9366004612a07565b638b78c6d8600c9081525f91909152602090205490565b3480156104eb575f80fd5b506103c26104fa366004612b4b565b610a26565b34801561050a575f80fd5b506103c2610519366004612bb7565b610b20565b348015610529575f80fd5b506103c2610538366004612bf6565b610d2a565b348015610548575f80fd5b50610376610557366004612bb7565b5f92915050565b348015610569575f80fd5b50610376610578366004612bb7565b6110b3565b6103c261058b366004612ae0565b611269565b34801561059b575f80fd5b506103426105aa366004612ae0565b638b78c6d8600c9081525f9290925260209091205416151590565b6103c261127b565b3480156105d8575f80fd5b506103766105e7366004612a07565b6001600160a01b03165f9081526005602052604090205490565b61034261060f366004612bb7565b6112b4565b34801561061f575f80fd5b5061034261062e366004612c16565b6115b4565b6103c26115fb565b348015610646575f80fd5b50610376600281565b34801561065a575f80fd5b50610376610669366004612ae0565b6001600160a01b03919091165f908152600660209081526040808320938352929052205490565b34801561069b575f80fd5b50638b78c6d819546040516001600160a01b03909116815260200161034e565b3480156106c6575f80fd5b506103426106d5366004612c49565b61160e565b3480156106e5575f80fd5b5061037660015481565b3480156106fa575f80fd5b506103e3610709366004612a7e565b6116d4565b348015610719575f80fd5b5061047e610728366004612cae565b7fbc197c810000000000000000000000000000000000000000000000000000000098975050505050505050565b348015610760575f80fd5b506103c261076f366004612b4b565b611842565b34801561077f575f80fd5b5061037661078e366004612a07565b60036020525f908152604090205481565b3480156107aa575f80fd5b506103766107b9366004612a07565b6118e0565b3480156107c9575f80fd5b506103766107d8366004612a07565b60026020525f908152604090205481565b3480156107f4575f80fd5b506103c2610803366004612b4b565b611920565b348015610813575f80fd5b50610376600181565b6103c261082a366004612a07565b6119be565b34801561083a575f80fd5b5061047e610849366004612d71565b7ff23a6e61000000000000000000000000000000000000000000000000000000009695505050505050565b6103c2610882366004612a07565b6119f8565b348015610892575f80fd5b506103766108a1366004612ae0565b611a1e565b3480156108b1575f80fd5b506103766108c0366004612ae0565b611aab565b3480156108d0575f80fd5b506103426108df366004612bb7565b611b55565b3480156108ef575f80fd5b506103c26108fe366004612a22565b611e9d565b34801561090e575f80fd5b5061034261091d366004612a07565b611f50565b34801561092d575f80fd5b5061037661093c366004612a07565b63389a75e1600c9081525f91909152602090205490565b5f61095d82611f95565b92915050565b6001600160a01b0381165f9081526004602052604081205461098483611fea565b61095d9190612e15565b6109983382612019565b50565b5f806109aa87878787876116d4565b90925090506109b98484610d2a565b9550959350505050565b6109cb612024565b6109d5828261203e565b5050565b5f6202a30067ffffffffffffffff164201905063389a75e1600c52335f52806020600c2055337fdbf36a107da19e49527a7176a1babf963b4b0ff8cde35ee35d6cd8f1f9ac7e1d5f80a250565b6002610a318161204a565b838214610a6a576040517fff633a3800000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b5f5b84811015610b18575f848483818110610a8757610a87612e28565b9050602002016020810190610a9c9190612e62565b9050801515600103610ade57610ad9878784818110610abd57610abd612e28565b9050602002016020810190610ad29190612a07565b600161203e565b610b0f565b610b0f878784818110610af357610af3612e28565b9050602002016020810190610b089190612a07565b6001612019565b50600101610a6c565b505050505050565b7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffbf6011328054600382558015610b715760018160011c14303b10610b685763f92ee8a95f526004601cfd5b818160ff1b1b91505b505f610b7f83850185612ff6565b9050610b8d815f015161207b565b5f5b816020015151811015610be857610be082602001518281518110610bb557610bb5612e28565b602002602001015183604001518381518110610bd357610bd3612e28565b60200260200101516120b6565b600101610b8f565b508060200151515f03610c5c576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601460248201527f6e6f20636f726520636f6e74726163742073657400000000000000000000000060448201526064015b60405180910390fd5b80602001515f81518110610c7257610c72612e28565b6020908102919091018101515f80547fffffffffffffffffffffffff0000000000000000000000000000000000000000166001600160a01b03909216919091179055606082015160018190556040519081527f74f254e69f1d1aa50fbf15b184112c15530415ac9f4b4bf2b75778c6befd0978910160405180910390a1508015610d25576002815560016020527fc7f505b2f371ae2175ee4913f4499e1f2633a7b5936321eed1cdaeb6115181d2602080a15b505050565b5f80546040517f13c8e2de000000000000000000000000000000000000000000000000000000008152600481018590526001600160a01b03909116906313c8e2de906024015f60405180830381865afa158015610d89573d5f803e3d5ffd5b505050506040513d5f823e601f3d9081017fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0168201604052610dce9190810190613197565b90505f81608001518381518110610de757610de7612e28565b60209081029190910101516040517f01ffc9a70000000000000000000000000000000000000000000000000000000081527f7cc1d5bb0000000000000000000000000000000000000000000000000000000060048201529091506001600160a01b038216906301ffc9a790602401602060405180830381865afa158015610e70573d5f803e3d5ffd5b505050506040513d601f19601f82011682018060405250810190610e949190613274565b15610f6e575f816001600160a01b031663dcc59b6f6040518163ffffffff1660e01b81526004016020604051808303815f875af1158015610ed7573d5f803e3d5ffd5b505050506040513d601f19601f82011682018060405250810190610efb919061328f565b90505f826001600160a01b031663a4d66daf6040518163ffffffff1660e01b81526004016020604051808303815f875af1158015610f3b573d5f803e3d5ffd5b505050506040513d601f19601f82011682018060405250810190610f5f919061328f565b9050610b1886868685856120f7565b6040517f01ffc9a70000000000000000000000000000000000000000000000000000000081527f903181110000000000000000000000000000000000000000000000000000000060048201526001600160a01b038216906301ffc9a790602401602060405180830381865afa158015610fe9573d5f803e3d5ffd5b505050506040513d601f19601f8201168201806040525081019061100d9190613274565b156102f1575f816001600160a01b031663d54ad2a16040518163ffffffff1660e01b81526004016020604051808303815f875af1158015611050573d5f803e3d5ffd5b505050506040513d601f19601f82011682018060405250810190611074919061328f565b90505f826001600160a01b031663a4d66daf6040518163ffffffff1660e01b8152600401602060405180830381865afa158015610f3b573d5f803e3d5ffd5b5f60026110bf8161204a565b5f6110cc848601866132eb565b90505f80825160028111156110e3576110e36133d1565b148061110157506001825160028111156110ff576110ff6133d1565b145b15611158575f826060015180602001905181019061111f91906133fe565b602084015160408501518251929350611150921561113e5783516122fc565b61114b8660200151610963565b6122fc565b51905061125e565b60028251600281111561116d5761116d6133d1565b03611255575f826060015180602001905181019061118b9190613440565b905061124a83602001518460400151835f015184602001515f146111b3578460200151611240565b602087015185516040517efdd58e00000000000000000000000000000000000000000000000000000000815230600482015260248101919091526001600160a01b039091169062fdd58e90604401602060405180830381865afa15801561121c573d5f803e3d5ffd5b505050506040513d601f19601f82011682018060405250810190611240919061328f565b856040015161246c565b60200151905061125e565b92506112629050565b9250505b5092915050565b611271612024565b6109d58282612019565b63389a75e1600c52335f525f6020600c2055337ffa7b8eab7da67f412cc9575ed43464468f9bfbae89d1675917346ca6d8fe3c925f80a2565b5f806112c2838501856132eb565b90505f815160028111156112d8576112d86133d1565b03611351575f81606001518060200190518101906112f691906133fe565b8051909150341461134b57602082015181516040517fcece04c50000000000000000000000000000000000000000000000000000000081526001600160a01b0390921660048301526024820152604401610c53565b506115aa565b600181516002811115611366576113666133d1565b03611413575f816060015180602001905181019061138491906133fe565b6040830151815160208501519293506113a9926001600160a01b031691903090612660565b805160208301516113c3906001600160a01b0316306126b8565b101561134b57602082015181516040517fcece04c50000000000000000000000000000000000000000000000000000000081526001600160a01b0390921660048301526024820152604401610c53565b600281516002811115611428576114286133d1565b036115a1575f81606001518060200190518101906114469190613440565b905081602001516001600160a01b031663f242432a836040015130845f0151856020015186604001516040518663ffffffff1660e01b815260040161148f95949392919061354a565b5f604051808303815f87803b1580156114a6575f80fd5b505af11580156114b8573d5f803e3d5ffd5b5050506020808301519084015183516040517efdd58e00000000000000000000000000000000000000000000000000000000815230600482015260248101919091529192506001600160a01b03169062fdd58e90604401602060405180830381865afa15801561152a573d5f803e3d5ffd5b505050506040513d601f19601f8201168201806040525081019061154e919061328f565b101561134b57602080830151908201516040517fcece04c50000000000000000000000000000000000000000000000000000000081526001600160a01b0390921660048301526024820152604401610c53565b5f91505061095d565b5060019392505050565b5f805b828110156115aa576115e68484838181106115d4576115d4612e28565b90506020028101906108df9190613591565b6115f3575f91505061095d565b6001016115b7565b611603612024565b61160c5f6126eb565b565b5f61161833611f50565b61164e576040517f82b4290000000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b6040517f1fa2acdc0000000000000000000000000000000000000000000000000000000081526001600160a01b03871690631fa2acdc9061169b90889088908890889030906004016135f2565b5f604051808303815f87803b1580156116b2575f80fd5b505af11580156116c4573d5f803e3d5ffd5b5060019998505050505050505050565b5f806116df33611f50565b611715576040517f82b4290000000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b5f6040518060400160405280306001600160a01b0316815260200188888080601f0160208091040260200160405190810160405280939291908181526020018383808284375f9201829052509390945250506040519293508a9290915081906001600160a01b0384169063dd98558c9061179390879060200161365e565b6040516020818303038152906040528a8a6040518463ffffffff1660e01b81526004016117c293929190613693565b60408051808303815f875af11580156117dd573d5f803e3d5ffd5b505050506040513d601f19601f8201168201806040525081019061180191906136b7565b6001600160a01b0381165f9081526005602052604081208054939550919350849261182d908490612e15565b90915550919b909a5098505050505050505050565b600261184d8161204a565b838214611886576040517fff633a3800000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b5f5b84811015610b18576118d88686838181106118a5576118a5612e28565b90506020020160208101906118ba9190612a07565b8585848181106118cc576118cc612e28565b9050602002013561203e565b600101611888565b6001600160a01b0381165f90815260046020908152604080832054600590925282205461190c84610963565b61191691906136e6565b61095d91906136e6565b600261192b8161204a565b838214611964576040517fff633a3800000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b5f5b84811015610b18576119b686868381811061198357611983612e28565b90506020020160208101906119989190612a07565b8585848181106119aa576119aa612e28565b90506020020135612019565b600101611966565b6119c6612024565b63389a75e1600c52805f526020600c2080544211156119ec57636f5e88185f526004601cfd5b5f9055610998816126eb565b611a00612024565b8060601b611a1557637448fbae5f526004601cfd5b610998816126eb565b6040517efdd58e000000000000000000000000000000000000000000000000000000008152306004820152602481018290525f906001600160a01b0384169062fdd58e90604401602060405180830381865afa158015611a80573d5f803e3d5ffd5b505050506040513d601f19601f82011682018060405250810190611aa4919061328f565b9392505050565b6001600160a01b0382165f8181526006602090815260408083208584529091528082205490517efdd58e000000000000000000000000000000000000000000000000000000008152306004820152602481018590529192909162fdd58e90604401602060405180830381865afa158015611b27573d5f803e3d5ffd5b505050506040513d601f19601f82011682018060405250810190611b4b919061328f565b611aa491906136e6565b5f611b5f33611f50565b611b95576040517f82b4290000000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b5f611ba2838501856132eb565b9050600181516002811115611bb957611bb96133d1565b1480611bd657505f81516002811115611bd457611bd46133d1565b145b15611d4f575f8160600151806020019051810190611bf491906133fe565b90505f612710600154835f0151611c0b91906136f9565b611c159190613710565b90505f611c258460200151610963565b90508082845f0151611c3791906136e6565b1115611c9c57602084015183518290611c519085906136e6565b6040517f5c54305e0000000000000000000000000000000000000000000000000000000081526001600160a01b03909316600484015260248301919091526044820152606401610c53565b6040808501516001600160a01b03165f90815260026020529081208054849290611cc79084906136e6565b90915550506020808501516001600160a01b03165f9081526004909152604081208054849290611cf89084906136e6565b909155505082516020808601516001600160a01b03165f9081526005909152604081208054909190611d2b9084906136e6565b9091555050602084015160408501518451611d479291906122fc565b5050506115aa565b600281516002811115611d6457611d646133d1565b036115a1575f8160600151806020019051810190611d829190613440565b602083015181516040517efdd58e00000000000000000000000000000000000000000000000000000000815230600482015260248101919091529192505f916001600160a01b039091169062fdd58e90604401602060405180830381865afa158015611df0573d5f803e3d5ffd5b505050506040513d601f19601f82011682018060405250810190611e14919061328f565b90508082602001511115611e7657602080840151908301516040517f5c54305e0000000000000000000000000000000000000000000000000000000081526001600160a01b039092166004830152602482018390526044820152606401610c53565b611e9683602001518460400151845f01518560200151866040015161246c565b50506115aa565b6002611ea88161204a565b612710821115611f14576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601660248201527f4665652063616e6e6f74206578636565642031303025000000000000000000006044820152606401610c53565b60018290556040518281527f74f254e69f1d1aa50fbf15b184112c15530415ac9f4b4bf2b75778c6befd09789060200160405180910390a15050565b5f816001600160a01b0316611f68638b78c6d8195490565b6001600160a01b0316148061095d5750638b78c6d8600c9081525f8390526020902054600316151561095d565b5f7fffffffff0000000000000000000000000000000000000000000000000000000082167fde98bbf000000000000000000000000000000000000000000000000000000000148061095d575061095d82612728565b5f6001600160a01b038216156120125761200d6001600160a01b038316306126b8565b61095d565b4792915050565b6109d582825f612815565b638b78c6d81954331461160c576382b429005f526004601cfd5b6109d582826001612815565b638b78c6d81954331461099857638b78c6d8600c52335f52806020600c205416610998576382b429005f526004601cfd5b6001600160a01b0316638b78c6d819819055805f7f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e08180a350565b638b78c6d8600c52815f52806020600c205580600c5160601c7f715ad5ce61fc9595c7b415289d59cf203f23a94fa06f04af7e489a0a76e1fe265f80a35050565b5f8360800151858151811061210e5761210e612e28565b6020908102919091018101516001600160a01b0381165f908152600283526040808220546003909452812054919350818561214988866136f9565b6121539190613710565b61215d9190612e15565b905061216981836136e6565b6001600160a01b0385165f8181526003602090815260408083209490945583517f38d52e0f000000000000000000000000000000000000000000000000000000008152935191936338d52e0f92600480830193928290030181865afa1580156121d4573d5f803e3d5ffd5b505050506040513d601f19601f820116820180604052508101906121f89190613748565b60e08901516001600160a01b0382165f908152600460205260408120805493945091928592919061222a908490612e15565b90915550505f839003612269576040517fb2e783cd00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b8461227484866136e6565b0361229f576001600160a01b0386165f90815260026020908152604080832083905560039091528120555b806001600160a01b03168a8c7ff44ff640e648077f3acc130c6ce75240070e8c40adc85b0feeeec28d9dd921b4866040516122dc91815260200190565b60405180910390a46122ef8282856122fc565b5050505050505050505050565b3068929eee149b4bd21268540361231a5763ab143c065f526004601cfd5b3068929eee149b4bd21268556001600160a01b038216612380576040517fbf182be80000000000000000000000000000000000000000000000000000000081526001600160a01b0380851660048301528316602482015260448101829052606401610c53565b61238983610963565b8111156123e4578261239a84610963565b6040517f5c54305e0000000000000000000000000000000000000000000000000000000081526001600160a01b039092166004830152602482015260448101829052606401610c53565b6001600160a01b038316612401576123fc828261286c565b612415565b6124156001600160a01b0384168383612885565b604080516001600160a01b038481168252602082018490528516917fad4a9acf26d8bba7a8cf1a41160d59be042ee554578e256c98d2ab74cdd43542910160405180910390a23868929eee149b4bd2126855505050565b3068929eee149b4bd21268540361248a5763ab143c065f526004601cfd5b3068929eee149b4bd21268556001600160a01b0384166124f0576040517fbf182be80000000000000000000000000000000000000000000000000000000081526001600160a01b0380871660048301528516602482015260448101839052606401610c53565b6124fa8584611a1e565b821115612556578461250c8685611a1e565b6040517f5c54305e0000000000000000000000000000000000000000000000000000000081526001600160a01b039092166004830152602482015260448101839052606401610c53565b6001600160a01b0385165f908152600660209081526040808320868452909152812080548492906125889084906136e6565b90915550506040517ff242432a0000000000000000000000000000000000000000000000000000000081526001600160a01b0386169063f242432a906125da903090889088908890889060040161354a565b5f604051808303815f87803b1580156125f1575f80fd5b505af1158015612603573d5f803e3d5ffd5b5050604080516001600160a01b03888116825260208201879052891693507fad4a9acf26d8bba7a8cf1a41160d59be042ee554578e256c98d2ab74cdd4354292500160405180910390a23868929eee149b4bd21268555050505050565b60405181606052826040528360601b602c526f23b872dd000000000000000000000000600c5260205f6064601c5f895af13d1560015f511417166126ab57637939f4245f526004601cfd5b5f60605260405250505050565b5f816014526f70a082310000000000000000000000005f5260208060246010865afa601f3d111660205102905092915050565b638b78c6d81980546001600160a01b039092169182907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e05f80a355565b5f7fffffffff0000000000000000000000000000000000000000000000000000000082167f5fbfaa4e0000000000000000000000000000000000000000000000000000000014806127ba57507fffffffff0000000000000000000000000000000000000000000000000000000082167f4e2312e000000000000000000000000000000000000000000000000000000000145b8061280657507fffffffff0000000000000000000000000000000000000000000000000000000082167f01ffc9a700000000000000000000000000000000000000000000000000000000145b8061095d575061095d826128ce565b638b78c6d8600c52825f526020600c20805483811783612836575080841681185b80835580600c5160601c7f715ad5ce61fc9595c7b415289d59cf203f23a94fa06f04af7e489a0a76e1fe265f80a3505050505050565b5f385f3884865af16109d55763b12d13eb5f526004601cfd5b81601452806034526fa9059cbb0000000000000000000000005f5260205f604460105f875af13d1560015f511417166128c5576390b8ec185f526004601cfd5b5f603452505050565b5f7fffffffff0000000000000000000000000000000000000000000000000000000082167fe49cedd700000000000000000000000000000000000000000000000000000000148061095d575061095d825f7fffffffff0000000000000000000000000000000000000000000000000000000082167f6ab67a0d00000000000000000000000000000000000000000000000000000000148061095d57507f01ffc9a7000000000000000000000000000000000000000000000000000000007fffffffff0000000000000000000000000000000000000000000000000000000083161461095d565b5f602082840312156129c4575f80fd5b81357fffffffff0000000000000000000000000000000000000000000000000000000081168114611aa4575f80fd5b6001600160a01b0381168114610998575f80fd5b5f60208284031215612a17575f80fd5b8135611aa4816129f3565b5f60208284031215612a32575f80fd5b5035919050565b5f8083601f840112612a49575f80fd5b50813567ffffffffffffffff811115612a60575f80fd5b602083019150836020828501011115612a77575f80fd5b9250929050565b5f805f805f60808688031215612a92575f80fd5b8535612a9d816129f3565b9450602086013567ffffffffffffffff811115612ab8575f80fd5b612ac488828901612a39565b9699909850959660408101359660609091013595509350505050565b5f8060408385031215612af1575f80fd5b8235612afc816129f3565b946020939093013593505050565b5f8083601f840112612b1a575f80fd5b50813567ffffffffffffffff811115612b31575f80fd5b6020830191508360208260051b8501011115612a77575f80fd5b5f805f8060408587031215612b5e575f80fd5b843567ffffffffffffffff811115612b74575f80fd5b612b8087828801612b0a565b909550935050602085013567ffffffffffffffff811115612b9f575f80fd5b612bab87828801612b0a565b95989497509550505050565b5f8060208385031215612bc8575f80fd5b823567ffffffffffffffff811115612bde575f80fd5b612bea85828601612a39565b90969095509350505050565b5f8060408385031215612c07575f80fd5b50508035926020909101359150565b5f8060208385031215612c27575f80fd5b823567ffffffffffffffff811115612c3d575f80fd5b612bea85828601612b0a565b5f805f805f60808688031215612c5d575f80fd5b8535612c68816129f3565b94506020860135935060408601359250606086013567ffffffffffffffff811115612c91575f80fd5b612c9d88828901612a39565b969995985093965092949392505050565b5f805f805f805f8060a0898b031215612cc5575f80fd5b8835612cd0816129f3565b97506020890135612ce0816129f3565b9650604089013567ffffffffffffffff811115612cfb575f80fd5b612d078b828c01612b0a565b909750955050606089013567ffffffffffffffff811115612d26575f80fd5b612d328b828c01612b0a565b909550935050608089013567ffffffffffffffff811115612d51575f80fd5b612d5d8b828c01612a39565b999c989b5096995094979396929594505050565b5f805f805f8060a08789031215612d86575f80fd5b8635612d91816129f3565b95506020870135612da1816129f3565b94506040870135935060608701359250608087013567ffffffffffffffff811115612dca575f80fd5b612dd689828a01612a39565b979a9699509497509295939492505050565b7f4e487b71000000000000000000000000000000000000000000000000000000005f52601160045260245ffd5b8181038181111561095d5761095d612de8565b7f4e487b71000000000000000000000000000000000000000000000000000000005f52603260045260245ffd5b8015158114610998575f80fd5b5f60208284031215612e72575f80fd5b8135611aa481612e55565b7f4e487b71000000000000000000000000000000000000000000000000000000005f52604160045260245ffd5b6040516080810167ffffffffffffffff81118282101715612ecd57612ecd612e7d565b60405290565b604051610100810167ffffffffffffffff81118282101715612ecd57612ecd612e7d565b6040516060810167ffffffffffffffff81118282101715612ecd57612ecd612e7d565b604051601f82017fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe016810167ffffffffffffffff81118282101715612f6157612f61612e7d565b604052919050565b5f67ffffffffffffffff821115612f8257612f82612e7d565b5060051b60200190565b5f82601f830112612f9b575f80fd5b8135612fae612fa982612f69565b612f1a565b8082825260208201915060208360051b860101925085831115612fcf575f80fd5b602085015b83811015612fec578035835260209283019201612fd4565b5095945050505050565b5f60208284031215613006575f80fd5b813567ffffffffffffffff81111561301c575f80fd5b82016080818503121561302d575f80fd5b613035612eaa565b8135613040816129f3565b8152602082013567ffffffffffffffff81111561305b575f80fd5b8201601f8101861361306b575f80fd5b8035613079612fa982612f69565b8082825260208201915060208360051b85010192508883111561309a575f80fd5b6020840193505b828410156130c55783356130b4816129f3565b8252602093840193909101906130a1565b6020850152505050604082013567ffffffffffffffff8111156130e6575f80fd5b6130f286828501612f8c565b604083015250606091820135918101919091529392505050565b8051613117816129f3565b919050565b5f82601f83011261312b575f80fd5b8151613139612fa982612f69565b8082825260208201915060208360051b86010192508583111561315a575f80fd5b602085015b83811015612fec578051613172816129f3565b83526020928301920161315f565b805167ffffffffffffffff81168114613117575f80fd5b5f602082840312156131a7575f80fd5b815167ffffffffffffffff8111156131bd575f80fd5b820161010081850312156131cf575f80fd5b6131d7612ed3565b6131e08261310c565b81526131ee6020830161310c565b60208201526131ff6040830161310c565b60408201526132106060830161310c565b6060820152608082015167ffffffffffffffff81111561322e575f80fd5b61323a8682850161311c565b60808301525061324c60a08301613180565b60a082015260c0828101519082015261326760e0830161310c565b60e0820152949350505050565b5f60208284031215613284575f80fd5b8151611aa481612e55565b5f6020828403121561329f575f80fd5b5051919050565b5f67ffffffffffffffff8211156132bf576132bf612e7d565b50601f017fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe01660200190565b5f602082840312156132fb575f80fd5b813567ffffffffffffffff811115613311575f80fd5b820160808185031215613322575f80fd5b61332a612eaa565b813560038110613338575f80fd5b81526020820135613348816129f3565b6020820152604082013561335b816129f3565b6040820152606082013567ffffffffffffffff811115613379575f80fd5b80830192505084601f83011261338d575f80fd5b813561339b612fa9826132a6565b8181528660208386010111156133af575f80fd5b816020850160208301375f918101602001919091526060820152949350505050565b7f4e487b71000000000000000000000000000000000000000000000000000000005f52602160045260245ffd5b5f602082840312801561340f575f80fd5b506040516020810167ffffffffffffffff8111828210171561343357613433612e7d565b6040529151825250919050565b5f60208284031215613450575f80fd5b815167ffffffffffffffff811115613466575f80fd5b820160608185031215613477575f80fd5b61347f612ef7565b8151815260208083015190820152604082015167ffffffffffffffff8111156134a6575f80fd5b80830192505084601f8301126134ba575f80fd5b81516134c8612fa9826132a6565b8181528660208386010111156134dc575f80fd5b8160208501602083015e5f918101602001919091526040820152949350505050565b5f81518084528060208401602086015e5f6020828601015260207fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0601f83011685010191505092915050565b6001600160a01b03861681526001600160a01b038516602082015283604082015282606082015260a060808201525f61358660a08301846134fe565b979650505050505050565b5f8083357fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe18436030181126135c4575f80fd5b83018035915067ffffffffffffffff8211156135de575f80fd5b602001915036819003821315612a77575f80fd5b85815284602082015260806040820152826080820152828460a08301375f60a084830101525f60a07fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0601f86011683010190506001600160a01b03831660608301529695505050505050565b602081526001600160a01b0382511660208201525f602083015160408084015261368b60608401826134fe565b949350505050565b606081525f6136a560608301866134fe565b60208301949094525060400152919050565b5f80604083850312156136c8575f80fd5b825160208401519092506136db816129f3565b809150509250929050565b8082018082111561095d5761095d612de8565b808202811582820484141761095d5761095d612de8565b5f82613743577f4e487b71000000000000000000000000000000000000000000000000000000005f52601260045260245ffd5b500490565b5f60208284031215613758575f80fd5b8151611aa4816129f356fea2646970667358221220dbd4f70bed9b922212a5c6bf33fbf9a035a23d8d6e2d872430cdd227c89ca9b664736f6c634300081a0033",o=class o extends p.DeployableTargetWithRBAC{constructor(){super(...arguments),this.abi=d.p}async allocate(f,b){return await this.awaitResult(this.allocateRaw(f,b))}async allocateRaw(f,b){const{request:a,result:e}=await d.wB(this._config,{address:this.assertValidAddress(),args:[r.prepareTransfer(f)],...this.optionallyAttachAccount(),...b});return{hash:await d.Yz(this._config,a),result:e}}async clawback(f,b){return await this.awaitResult(this.clawbackRaw(f,b))}async clawbackRaw(f,b){const{request:a,result:e}=await d.gB(this._config,{address:this.assertValidAddress(),args:[r.prepareTransfer(f)],...this.optionallyAttachAccount(),...b});return{hash:await d.tB(this._config,a),result:e}}async clawbackFromTarget(f,b,a,e,c){return await this.awaitResult(this.clawbackFromTargetRaw(f,b,a,e,c))}async clawbackFromTargetRaw(f,b,a,e,c){const{request:s,result:y}=await d.AB(this._config,{address:this.assertValidAddress(),args:[f,b,BigInt(a),BigInt(e)],...this.optionallyAttachAccount(),...c});return{hash:await d.nB(this._config,s),result:y}}async disburse(f,b){return await this.awaitResult(this.disburseRaw(f,b))}async disburseRaw(f,b){const{request:a,result:e}=await d.IB(this._config,{address:this.assertValidAddress(),args:[r.prepareTransfer(f)],...this.optionallyAttachAccount(),...b});return{hash:await d.iB(this._config,a),result:e}}async disburseBatch(f,b){return await this.awaitResult(this.disburseBatchRaw(f,b))}async disburseBatchRaw(f,b){const{request:a,result:e}=await d.NB(this._config,{address:this.assertValidAddress(),args:[f.map(r.prepareTransfer)],...this.optionallyAttachAccount(),...b});return{hash:await d.sB(this._config,a),result:e}}async payManagementFee(f,b,a){return await this.awaitResult(this.payManagementFeeRaw(f,b,a))}async payManagementFeeRaw(f,b,a){const{request:e,result:c}=await d.GF(this._config,{address:this.assertValidAddress(),args:[f,b],...this.optionallyAttachAccount(),...a});return{hash:await d.AF(this._config,e),result:c}}async setManagementFee(f,b){return await this.awaitResult(this.setManagementFeeRaw(f,b))}async setManagementFeeRaw(f,b){const{request:a,result:e}=await d.XF(this._config,{address:this.assertValidAddress(),args:[f],...this.optionallyAttachAccount(),...b});return{hash:await d.EF(this._config,a),result:e}}async managementFee(f){return await d.eF(this._config,{address:this.assertValidAddress(),args:[],...f})}owner(f){return d.jz(this._config,{address:this.assertValidAddress(),args:[],...f})}total(f=t.zeroAddress,b,a){return d.Kz(this._config,{address:this.assertValidAddress(),args:b?[f,b]:[f],...a})}available(f=t.zeroAddress,b,a){return d._z(this._config,{address:this.assertValidAddress(),args:b?[f,b]:[f],...a})}distributed(f=t.zeroAddress,b,a){return d.Lz(this._config,{address:this.assertValidAddress(),args:b?[f,b]:[f],...a})}buildParameters(f,b){var c;const[a,e]=this.validateDeploymentConfig(f,b);if(!a.owner||a.owner===t.zeroAddress){const s=e.account?e.account.address:e.config?l.getAccount(e.config).address:(c=this._account)==null?void 0:c.address;if(s)a.owner=s;else throw new g.DeployableUnknownOwnerProvidedError}return{abi:d.p,bytecode:B,args:[w(a)],...this.optionallyAttachAccount(e.account)}}};o.bases={31337:void 0,...A.ManagedBudgetWithFees},o.registryType=m.RegistryType.BUDGET;let i=o;const w=({owner:n,authorized:f,roles:b,managementFee:a})=>t.encodeAbiParameters(t.parseAbiParameters(["ManagedBudgetWithFeesPayload payload","struct ManagedBudgetWithFeesPayload { address owner; address[] authorized; uint256[] roles; uint256 managementFee; }"]),[{owner:n,authorized:f,roles:b,managementFee:a}]),h={[u.AManagedBudget]:r.ManagedBudget,[u.AManagedBudgetWithFees]:i};async function R(n,f,b){const a=await l.readContract(n.config,{abi:d.I,functionName:"getComponentInterface",address:f,...b}),e=h[a];if(!e)throw new g.InvalidComponentInterfaceError(Object.keys(h),a);return new e(n,f)}exports.BudgetByComponentInterface=h;exports.ManagedBudgetWithFees=i;exports.budgetFromAddress=R;exports.prepareManagedBudgetWithFeesPayload=w;
2
+ //# sourceMappingURL=Budget-DMbfdTom.cjs.map