@boostxyz/sdk 0.0.0-alpha.11 → 0.0.0-alpha.13

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 (154) hide show
  1. package/dist/Actions/Action.cjs +1 -1
  2. package/dist/Actions/Action.js +1 -1
  3. package/dist/Actions/ContractAction.d.ts +2 -2
  4. package/dist/Actions/ContractAction.d.ts.map +1 -1
  5. package/dist/Actions/ERC721MintAction.d.ts +2 -2
  6. package/dist/Actions/ERC721MintAction.d.ts.map +1 -1
  7. package/dist/Actions/EventAction.cjs +1 -1
  8. package/dist/Actions/EventAction.cjs.map +1 -1
  9. package/dist/Actions/EventAction.d.ts +117 -33
  10. package/dist/Actions/EventAction.d.ts.map +1 -1
  11. package/dist/Actions/EventAction.js +309 -121
  12. package/dist/Actions/EventAction.js.map +1 -1
  13. package/dist/AllowLists/AllowList.cjs +1 -1
  14. package/dist/AllowLists/AllowList.js +2 -2
  15. package/dist/AllowLists/SimpleAllowList.cjs +1 -1
  16. package/dist/AllowLists/SimpleAllowList.cjs.map +1 -1
  17. package/dist/AllowLists/SimpleAllowList.d.ts +2 -2
  18. package/dist/AllowLists/SimpleAllowList.d.ts.map +1 -1
  19. package/dist/AllowLists/SimpleAllowList.js +23 -19
  20. package/dist/AllowLists/SimpleAllowList.js.map +1 -1
  21. package/dist/AllowLists/SimpleDenyList.cjs +1 -1
  22. package/dist/AllowLists/SimpleDenyList.d.ts +2 -2
  23. package/dist/AllowLists/SimpleDenyList.d.ts.map +1 -1
  24. package/dist/AllowLists/SimpleDenyList.js +6 -5
  25. package/dist/AllowLists/SimpleDenyList.js.map +1 -1
  26. package/dist/Auth/PassthroughAuth.cjs +1 -1
  27. package/dist/Auth/PassthroughAuth.js +1 -1
  28. package/dist/BoostCore.cjs +2 -2
  29. package/dist/BoostCore.cjs.map +1 -1
  30. package/dist/BoostCore.d.ts +27 -5
  31. package/dist/BoostCore.d.ts.map +1 -1
  32. package/dist/BoostCore.js +438 -347
  33. package/dist/BoostCore.js.map +1 -1
  34. package/dist/BoostRegistry.cjs +1 -1
  35. package/dist/BoostRegistry.cjs.map +1 -1
  36. package/dist/BoostRegistry.d.ts +26 -5
  37. package/dist/BoostRegistry.d.ts.map +1 -1
  38. package/dist/BoostRegistry.js +125 -64
  39. package/dist/BoostRegistry.js.map +1 -1
  40. package/dist/Budgets/Budget.cjs +1 -1
  41. package/dist/Budgets/Budget.js +1 -1
  42. package/dist/Budgets/ManagedBudget.cjs +1 -1
  43. package/dist/Budgets/ManagedBudget.cjs.map +1 -1
  44. package/dist/Budgets/ManagedBudget.d.ts +2 -2
  45. package/dist/Budgets/ManagedBudget.d.ts.map +1 -1
  46. package/dist/Budgets/ManagedBudget.js +41 -37
  47. package/dist/Budgets/ManagedBudget.js.map +1 -1
  48. package/dist/Budgets/SimpleBudget.d.ts +2 -2
  49. package/dist/Budgets/SimpleBudget.d.ts.map +1 -1
  50. package/dist/Budgets/VestingBudget.d.ts +2 -2
  51. package/dist/Budgets/VestingBudget.d.ts.map +1 -1
  52. package/dist/Deployable/DeployableTarget.cjs +1 -1
  53. package/dist/Deployable/DeployableTarget.cjs.map +1 -1
  54. package/dist/Deployable/DeployableTarget.d.ts +6 -6
  55. package/dist/Deployable/DeployableTarget.d.ts.map +1 -1
  56. package/dist/Deployable/DeployableTarget.js +22 -17
  57. package/dist/Deployable/DeployableTarget.js.map +1 -1
  58. package/dist/Incentives/AllowListIncentive.cjs +1 -1
  59. package/dist/Incentives/AllowListIncentive.cjs.map +1 -1
  60. package/dist/Incentives/AllowListIncentive.d.ts +2 -2
  61. package/dist/Incentives/AllowListIncentive.d.ts.map +1 -1
  62. package/dist/Incentives/AllowListIncentive.js +17 -13
  63. package/dist/Incentives/AllowListIncentive.js.map +1 -1
  64. package/dist/Incentives/CGDAIncentive.cjs +1 -1
  65. package/dist/Incentives/CGDAIncentive.cjs.map +1 -1
  66. package/dist/Incentives/CGDAIncentive.d.ts +14 -2
  67. package/dist/Incentives/CGDAIncentive.d.ts.map +1 -1
  68. package/dist/Incentives/CGDAIncentive.js +27 -23
  69. package/dist/Incentives/CGDAIncentive.js.map +1 -1
  70. package/dist/Incentives/ERC1155Incentive.d.ts +2 -2
  71. package/dist/Incentives/ERC1155Incentive.d.ts.map +1 -1
  72. package/dist/Incentives/ERC20Incentive.cjs +1 -1
  73. package/dist/Incentives/ERC20Incentive.cjs.map +1 -1
  74. package/dist/Incentives/ERC20Incentive.d.ts +2 -2
  75. package/dist/Incentives/ERC20Incentive.d.ts.map +1 -1
  76. package/dist/Incentives/ERC20Incentive.js +17 -13
  77. package/dist/Incentives/ERC20Incentive.js.map +1 -1
  78. package/dist/Incentives/ERC20VariableIncentive.d.ts +2 -2
  79. package/dist/Incentives/ERC20VariableIncentive.d.ts.map +1 -1
  80. package/dist/Incentives/Incentive.cjs +1 -1
  81. package/dist/Incentives/Incentive.cjs.map +1 -1
  82. package/dist/Incentives/Incentive.js +34 -30
  83. package/dist/Incentives/Incentive.js.map +1 -1
  84. package/dist/Incentives/PointsIncentive.cjs +1 -1
  85. package/dist/Incentives/PointsIncentive.cjs.map +1 -1
  86. package/dist/Incentives/PointsIncentive.d.ts +2 -2
  87. package/dist/Incentives/PointsIncentive.d.ts.map +1 -1
  88. package/dist/Incentives/PointsIncentive.js +13 -9
  89. package/dist/Incentives/PointsIncentive.js.map +1 -1
  90. package/dist/{SimpleDenyList-4PtOPXTc.js → SimpleDenyList-C21O9Yfi.js} +23 -19
  91. package/dist/SimpleDenyList-C21O9Yfi.js.map +1 -0
  92. package/dist/SimpleDenyList-DeJRKD2D.cjs +2 -0
  93. package/dist/{SimpleDenyList-4PtOPXTc.js.map → SimpleDenyList-DeJRKD2D.cjs.map} +1 -1
  94. package/dist/Validators/SignerValidator.cjs +1 -1
  95. package/dist/Validators/SignerValidator.cjs.map +1 -1
  96. package/dist/Validators/SignerValidator.d.ts +2 -2
  97. package/dist/Validators/SignerValidator.d.ts.map +1 -1
  98. package/dist/Validators/SignerValidator.js +18 -14
  99. package/dist/Validators/SignerValidator.js.map +1 -1
  100. package/dist/Validators/Validator.cjs +1 -1
  101. package/dist/Validators/Validator.js +1 -1
  102. package/dist/deployments-BvFcK_eR.js +40 -0
  103. package/dist/deployments-BvFcK_eR.js.map +1 -0
  104. package/dist/deployments-Ho4PnGCS.cjs +2 -0
  105. package/dist/deployments-Ho4PnGCS.cjs.map +1 -0
  106. package/dist/deployments.json +38 -0
  107. package/dist/errors.cjs +1 -1
  108. package/dist/errors.cjs.map +1 -1
  109. package/dist/errors.d.ts +122 -20
  110. package/dist/errors.d.ts.map +1 -1
  111. package/dist/errors.js +98 -28
  112. package/dist/errors.js.map +1 -1
  113. package/dist/{generated-BDeDiaCK.js → generated-LpgSHrH0.js} +150 -110
  114. package/dist/generated-LpgSHrH0.js.map +1 -0
  115. package/dist/generated-tq_HLZJ0.cjs +3 -0
  116. package/dist/generated-tq_HLZJ0.cjs.map +1 -0
  117. package/dist/index.cjs +1 -1
  118. package/dist/index.js +115 -108
  119. package/dist/utils.cjs +1 -1
  120. package/dist/utils.cjs.map +1 -1
  121. package/dist/utils.d.ts +25 -11
  122. package/dist/utils.d.ts.map +1 -1
  123. package/dist/utils.js +38 -23
  124. package/dist/utils.js.map +1 -1
  125. package/package.json +10 -6
  126. package/src/Actions/Action.test.ts +8 -4
  127. package/src/Actions/ContractAction.ts +5 -3
  128. package/src/Actions/ERC721MintAction.ts +5 -3
  129. package/src/Actions/EventAction.test.ts +528 -100
  130. package/src/Actions/EventAction.ts +302 -60
  131. package/src/AllowLists/AllowList.test.ts +1 -1
  132. package/src/AllowLists/SimpleAllowList.ts +6 -3
  133. package/src/AllowLists/SimpleDenyList.ts +6 -3
  134. package/src/BoostCore.test.ts +31 -91
  135. package/src/BoostCore.ts +137 -34
  136. package/src/BoostRegistry.ts +89 -21
  137. package/src/Budgets/ManagedBudget.ts +6 -4
  138. package/src/Budgets/SimpleBudget.ts +4 -3
  139. package/src/Budgets/VestingBudget.ts +4 -3
  140. package/src/Deployable/DeployableTarget.ts +22 -11
  141. package/src/Incentives/AllowListIncentive.ts +6 -3
  142. package/src/Incentives/CGDAIncentive.ts +6 -3
  143. package/src/Incentives/ERC1155Incentive.ts +4 -3
  144. package/src/Incentives/ERC20Incentive.ts +6 -3
  145. package/src/Incentives/ERC20VariableIncentive.ts +6 -3
  146. package/src/Incentives/PointsIncentive.ts +6 -3
  147. package/src/Validators/SignerValidator.ts +6 -3
  148. package/src/errors.ts +177 -21
  149. package/src/utils.ts +60 -11
  150. package/dist/SimpleDenyList-CqT0BMP7.cjs +0 -2
  151. package/dist/SimpleDenyList-CqT0BMP7.cjs.map +0 -1
  152. package/dist/generated-BDeDiaCK.js.map +0 -1
  153. package/dist/generated-wKBNvm48.cjs +0 -3
  154. package/dist/generated-wKBNvm48.cjs.map +0 -1
@@ -1 +1 @@
1
- {"version":3,"file":"BoostRegistry.cjs","sources":["../src/BoostRegistry.ts"],"sourcesContent":["import {\n boostRegistryAbi,\n readBoostRegistryGetBaseImplementation,\n readBoostRegistryGetCloneIdentifier,\n readBoostRegistryGetClones,\n simulateBoostRegistryDeployClone,\n simulateBoostRegistryRegister,\n writeBoostRegistryDeployClone,\n writeBoostRegistryRegister,\n} from '@boostxyz/evm';\nimport { bytecode } from '@boostxyz/evm/artifacts/contracts/BoostRegistry.sol/BoostRegistry.json';\nimport {\n type Address,\n type ContractEventName,\n type Hex,\n isAddress,\n} from 'viem';\nimport {\n Deployable,\n type DeployableOptions,\n type GenericDeployableParams,\n} from './Deployable/Deployable';\nimport type { DeployableTarget } from './Deployable/DeployableTarget';\nimport type {\n GenericLog,\n HashAndSimulatedResult,\n ReadParams,\n RegistryType,\n WriteParams,\n} from './utils';\n\nexport { boostRegistryAbi };\n\n/**\n * The fixed address for the Boost Registry.\n * By default, `new BoostRegistry` will use this address if not otherwise provided.\n *\n * @type {Address}\n */\nexport const BOOST_REGISTRY_ADDRESS: Address = import.meta.env\n .VITE_BOOST_REGISTRY_ADDRESS;\n\n/**\n * A record of `BoostRegistry` event names to `AbiEvent` objects for use with `getLogs`\n *\n * @export\n * @typedef {BoostRegistryLog}\n * @template {ContractEventName<typeof boostRegistryAbi>} [event=ContractEventName<\n * typeof boostRegistryAbi\n * >]\n */\nexport type BoostRegistryLog<\n event extends ContractEventName<typeof boostRegistryAbi> = ContractEventName<\n typeof boostRegistryAbi\n >,\n> = GenericLog<typeof boostRegistryAbi, event>;\n\n/**\n * Instantiation options for a previously deployed Boost Registry\n *\n * @export\n * @interface BoostRegistryDeployedOptions\n * @typedef {BoostRegistryDeployedOptions}\n * @extends {DeployableOptions}\n */\nexport interface BoostRegistryDeployedOptions extends DeployableOptions {\n /**\n * The address for a Boost Registry, if different than `BOOST_REGISTRY_ADDRESS`\n *\n * @type {?Address}\n */\n address?: Address;\n}\n\n/**\n * A typeguard to determine if instantiation is using a custom address.\n *\n * @param {*} opts\n * @returns {opts is BoostRegistryDeployedOptions}\n */\nfunction isBoostRegistryDeployed(\n // biome-ignore lint/suspicious/noExplicitAny: type guard\n opts: any,\n): opts is BoostRegistryDeployedOptions {\n return opts.address && isAddress(opts.address);\n}\n\n/**\n * The Boost Registry does not take any construction arguments, so if you'd like to deploy a new Boost Registry, pass an explicit null to the `address` field.\n *\n * @export\n * @interface BoostRegistryOptionsWithPayload\n * @typedef {BoostRegistryOptionsWithPayload}\n * @extends {DeployableOptions}\n */\nexport interface BoostRegistryOptionsWithPayload extends DeployableOptions {\n /**\n *\n * @type {null}\n */\n address: null;\n}\n\n/**\n * A typeguard to determine if the user is intending to deploy a new Boost Registry before usage\n *\n * @param {*} opts\n * @returns {opts is BoostRegistryOptionsWithPayload}\n */\nfunction isBoostRegistryDeployable(\n // biome-ignore lint/suspicious/noExplicitAny: type guard\n opts: any,\n): opts is BoostRegistryOptionsWithPayload {\n return opts.address === null;\n}\n\n/**\n * Instantiation options for a Boost Registry.\n *\n * @example\n * To target Boost's Registry, omit the address field.\n * Otherwise, supply a custom address to a previously deployed custom Boost Registry.\n * You can also pass `{ address: null }` if you are intending to deploy a new Boost Registry.\n * ```ts\n * let registry = new BoostRegistry({ config, account })\n * // or\n * registry = new BoostRegistry({ config, account, address: CUSTOM_ADDRESS })\n * // or\n * registry = new BoostRegistry({ config, account, address: null })\n * await registry.deploy()\n * ```\n *\n * @export\n * @typedef {BoostRegistryConfig}\n */\nexport type BoostRegistryConfig =\n | BoostRegistryDeployedOptions\n | BoostRegistryOptionsWithPayload;\n\n/**\n * Constructs a new Boost Registry. A registry for base implementations and cloned instances.\n * This contract is used to register base implementations and deploy new instances of those implementations for use within the Boost protocol.\n *\n * @see {@link BoostRegistryConfig}\n * @export\n * @class BoostRegistry\n * @typedef {BoostRegistry}\n * @extends {Deployable<never[]>}\n */\nexport class BoostRegistry extends Deployable<\n never[],\n typeof boostRegistryAbi\n> {\n /**\n * 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 super({ account, config }, BOOST_REGISTRY_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<typeof boostRegistryAbi, 'register'>} [params] - Optional params to provide the underlying Viem contract call\n * @returns {unknown}\n * @example\n * ```ts\n * await registry.register(ContractAction.registryType, 'ContractAction', ContractAction.base)\n * ```\n */\n public async register(\n registryType: RegistryType,\n name: string,\n implementation: Address,\n params?: WriteParams<typeof boostRegistryAbi, 'register'>,\n ) {\n return await this.awaitResult(\n this.registerRaw(registryType, name, implementation, params),\n );\n }\n\n /**\n * @see {@link register}\n * @public\n * @async\n * @param {RegistryType} registryType\n * @param {string} name\n * @param {Address} implementation\n * @param {?WriteParams<typeof boostRegistryAbi, 'register'>} [params]\n * @returns {unknown}\n */\n public async registerRaw(\n registryType: RegistryType,\n name: string,\n implementation: Address,\n params?: WriteParams<typeof boostRegistryAbi, 'register'>,\n ) {\n const { request, result } = await simulateBoostRegistryRegister(\n this._config,\n {\n address: this.assertValidAddress(),\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<typeof boostRegistryAbi, 'deployClone'>} [params]\n * @returns {Target} - The provided instance, but with a new address attached.\n * biome-ignore lint/suspicious/noExplicitAny: any deployable target will suffice\n */\n public initialize<Target extends DeployableTarget<any, any>>(\n displayName: string,\n target: Target,\n params?: WriteParams<typeof boostRegistryAbi, 'deployClone'>,\n ): Promise<Target> {\n return this.clone(displayName, target, params);\n }\n\n /**\n * Deploy a new instance of a registered base implementation, returning the provided target with a new address set on it.\n *\n * @public\n * @async\n * @template {DeployableTarget} Target\n * @param {string} displayName - The display name for the clone\n * @param {Target} target - An instance of a target contract to clone and initialize\n * @param {?WriteParams<typeof boostRegistryAbi, 'deployClone'>} [params]\n * @returns {Target} - The provided instance, but with a new address attached.\n * biome-ignore lint/suspicious/noExplicitAny: any deployable target will suffice\n */\n public async clone<Target extends DeployableTarget<any, any>>(\n displayName: string,\n target: Target,\n params?: WriteParams<typeof boostRegistryAbi, 'deployClone'>,\n ): Promise<Target> {\n const instance = await this.deployClone(displayName, target, params);\n return target.at(instance);\n }\n\n /**\n *\n * @see {@link clone}\n * @public\n * @async\n * @template {DeployableTarget} Target\n * @param {string} displayName\n * @param {Target} target\n * @param {?WriteParams<typeof boostRegistryAbi, 'deployClone'>} [params]\n * @returns {Target}\n * biome-ignore lint/suspicious/noExplicitAny: any deployable target will suffice\n */\n public async deployClone<Target extends DeployableTarget<any, any>>(\n displayName: string,\n target: Target,\n params?: WriteParams<typeof boostRegistryAbi, 'deployClone'>,\n ): Promise<Address> {\n return await this.awaitResult(\n this.deployCloneRaw(displayName, target, params),\n );\n }\n\n /**\n * @see {@link clone}\n * @public\n * @async\n * @param {string} displayName\n * @param {DeployableTarget} target\n * @param {?WriteParams<typeof boostRegistryAbi, 'deployClone'>} [params]\n * @returns {unknown} - The transaction hash\n * biome-ignore lint/suspicious/noExplicitAny: any deployable target will suffice\n */\n public async deployCloneRaw<Target extends DeployableTarget<any, any>>(\n displayName: string,\n target: Target,\n params?: WriteParams<typeof boostRegistryAbi, 'deployClone'>,\n ): Promise<HashAndSimulatedResult<Address>> {\n const payload = target.buildParameters(undefined, {\n config: this._config,\n account: this._account,\n });\n const { request, result } = await simulateBoostRegistryDeployClone(\n this._config,\n {\n address: this.assertValidAddress(),\n args: [target.registryType, target.base, 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<typeof boostRegistryAbi, 'getBaseImplementation'>} [params]\n * @returns {unknown} - The address of the implementation\n */\n public async getBaseImplementation(\n identifier: Hex,\n params?: ReadParams<typeof boostRegistryAbi, 'getBaseImplementation'>,\n ) {\n return await readBoostRegistryGetBaseImplementation(this._config, {\n address: this.assertValidAddress(),\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<typeof boostRegistryAbi, 'getClone'>} [params]\n * @returns {Promise<Address>} - The address of the deployed clone\n */\n public async getClone(\n identifier: Hex,\n params?: ReadParams<typeof boostRegistryAbi, 'getClone'>,\n ) {\n return await readBoostRegistryGetBaseImplementation(this._config, {\n address: this.assertValidAddress(),\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<typeof boostRegistryAbi, 'getClones'>} [params]\n * @returns {Promise<Hex[]>} - The list of deployed clones for the given deployer\n */\n public async getClones(\n deployer: Address,\n params?: ReadParams<typeof boostRegistryAbi, 'getClones'>,\n ) {\n return await readBoostRegistryGetClones(this._config, {\n address: this.assertValidAddress(),\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<typeof boostRegistryAbi, 'getCloneIdentifier'>} [params]\n * @returns {Promise<Hex>} - The unique identifier for the clone\n */\n public async getCloneIdentifier(\n registryType: RegistryType,\n base: Address,\n deployer: Address,\n displayName: string,\n params?: ReadParams<typeof boostRegistryAbi, 'getCloneIdentifier'>,\n ) {\n return await readBoostRegistryGetCloneIdentifier(this._config, {\n address: this.assertValidAddress(),\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<typeof boostRegistryAbi, 'getIdentifier'>} [params]\n * @returns {Promise<Hex>} - The unique identifier for the implementation\n */\n public async getIdentifier(\n registryType: RegistryType,\n displayName: string,\n params?: ReadParams<typeof boostRegistryAbi, 'getIdentifier'>,\n ) {\n return await readBoostRegistryGetCloneIdentifier(this._config, {\n address: this.assertValidAddress(),\n args: [registryType, displayName],\n ...this.optionallyAttachAccount(),\n // biome-ignore lint/suspicious/noExplicitAny: Accept any shape of valid wagmi/viem parameters, wagmi does the same thing internally\n ...(params as any),\n });\n }\n\n /**\n * @inheritdoc\n *\n * @public\n * @param {?never[]} [_payload]\n * @param {?DeployableOptions} [_options]\n * @returns {GenericDeployableParams}\n */\n public override buildParameters(\n _payload?: never[],\n _options?: DeployableOptions,\n ): GenericDeployableParams {\n const [, options] = this.validateDeploymentConfig([], _options);\n return {\n abi: boostRegistryAbi,\n bytecode: bytecode as Hex,\n // biome-ignore lint/suspicious/noExplicitAny: Registry doesn't construct or initialize\n args: [] as any,\n ...this.optionallyAttachAccount(options.account),\n };\n }\n}\n"],"names":["BOOST_REGISTRY_ADDRESS","isBoostRegistryDeployed","opts","isAddress","isBoostRegistryDeployable","BoostRegistry","Deployable","config","account","options","registryType","name","implementation","params","request","result","simulateBoostRegistryRegister","writeBoostRegistryRegister","displayName","target","instance","payload","simulateBoostRegistryDeployClone","writeBoostRegistryDeployClone","identifier","readBoostRegistryGetBaseImplementation","deployer","readBoostRegistryGetClones","base","readBoostRegistryGetCloneIdentifier","_payload","_options","boostRegistryAbi","bytecode"],"mappings":"k5bAuCaA,EAAkC,6CAyC/C,SAASC,EAEPC,EACsC,CACtC,OAAOA,EAAK,SAAWC,EAAU,UAAAD,EAAK,OAAO,CAC/C,CAwBA,SAASE,EAEPF,EACyC,CACzC,OAAOA,EAAK,UAAY,IAC1B,CAmCO,MAAMG,UAAsBC,EAAAA,UAGjC,CAWA,YAAY,CAAE,OAAAC,EAAQ,QAAAC,EAAS,GAAGC,GAAgC,CAC5DR,EAAwBQ,CAAO,GAAKA,EAAQ,QAC9C,MAAM,CAAE,QAAAD,EAAS,OAAAD,CAAO,EAAGE,EAAQ,OAAO,EACjCL,EAA0BK,CAAO,EAC1C,MAAM,CAAE,QAAAD,EAAS,OAAAD,CAAO,EAAG,CAAE,CAAA,EAE7B,MAAM,CAAE,QAAAC,EAAS,OAAAD,CAAO,EAAGP,CAAsB,CAErD,CAiBA,MAAa,SACXU,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,QAAS,KAAK,mBAAmB,EACjC,KAAM,CAACN,EAAcC,EAAMC,CAAc,EACzC,GAAG,KAAK,wBAAwB,EAEhC,GAAIC,CACN,CAAA,EAGK,MAAA,CAAE,KADI,MAAMI,EAA2B,GAAA,KAAK,QAASH,CAAO,EACpD,OAAAC,EACjB,CAeO,WACLG,EACAC,EACAN,EACiB,CACjB,OAAO,KAAK,MAAMK,EAAaC,EAAQN,CAAM,CAC/C,CAcA,MAAa,MACXK,EACAC,E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F,EACAR,EACAL,EACA,CACO,OAAA,MAAMgB,EAAAA,GAAoC,KAAK,QAAS,CAC7D,QAAS,KAAK,mBAAmB,EACjC,KAAM,CAACnB,EAAckB,EAAMF,EAAUR,CAAW,EAChD,GAAG,KAAK,wBAAwB,EAEhC,GAAIL,CAAA,CACL,CACH,CAYA,MAAa,cACXH,EACAQ,EACAL,EACA,CACO,OAAA,MAAMgB,EAAAA,GAAoC,KAAK,QAAS,CAC7D,QAAS,KAAK,mBAAmB,EACjC,KAAM,CAACnB,EAAcQ,CAAW,EAChC,GAAG,KAAK,wBAAwB,EAEhC,GAAIL,CAAA,CACL,CACH,CAUgB,gBACdiB,EACAC,EACyB,CACnB,KAAA,CAAA,CAAGtB,CAAO,EAAI,KAAK,yBAAyB,CAAA,EAAIsB,CAAQ,EACvD,MAAA,CACL,IAAKC,EAAA,GACL,SAAAC,EAEA,KAAM,CAAC,EACP,GAAG,KAAK,wBAAwBxB,EAAQ,OAAO,CAAA,CAEnD,CACF"}
1
+ {"version":3,"file":"BoostRegistry.cjs","sources":["../src/BoostRegistry.ts"],"sourcesContent":["import {\n boostRegistryAbi,\n readBoostRegistryGetBaseImplementation,\n readBoostRegistryGetCloneIdentifier,\n readBoostRegistryGetClones,\n simulateBoostRegistryDeployClone,\n simulateBoostRegistryRegister,\n writeBoostRegistryDeployClone,\n writeBoostRegistryRegister,\n} from '@boostxyz/evm';\nimport { bytecode } from '@boostxyz/evm/artifacts/contracts/BoostRegistry.sol/BoostRegistry.json';\nimport {\n type Address,\n type ContractEventName,\n type Hex,\n isAddress,\n} from 'viem';\nimport { BoostRegistry as BoostRegistryBases } from '../dist/deployments.json';\nimport {\n Deployable,\n type DeployableOptions,\n type GenericDeployableParams,\n} from './Deployable/Deployable';\nimport type { DeployableTarget } from './Deployable/DeployableTarget';\nimport {\n type GenericLog,\n type HashAndSimulatedResult,\n type ReadParams,\n type RegistryType,\n type WriteParams,\n assertValidAddressByChainId,\n} from './utils';\n\n/**\n * The address of the deployed `BoostRegistry` instance. In prerelease mode, this will be its sepolia address\n *\n * @type {Address}\n */\nexport const BOOST_REGISTRY_ADDRESS = (\n BoostRegistryBases as Record<string, Address>\n)[__DEFAULT_CHAIN_ID__];\n\n/**\n * The fixed addresses for the deployed Boost Registry.\n * By default, `new BoostRegistry` will use the address deployed to the currently connected chain, or `BOOST_REGISTRY_ADDRESS` if not provided.\n *\n * @type {Record<number, Address>}\n */\nexport const BOOST_REGISTRY_ADDRESSES: Record<number, Address> = {\n ...(BoostRegistryBases as Record<number, Address>),\n 31337: import.meta.env.VITE_BOOST_REGISTRY_ADDRESS,\n};\n\n/**\n * A record of `BoostRegistry` event names to `AbiEvent` objects for use with `getLogs`\n *\n * @export\n * @typedef {BoostRegistryLog}\n * @template {ContractEventName<typeof boostRegistryAbi>} [event=ContractEventName<\n * typeof boostRegistryAbi\n * >]\n */\nexport type BoostRegistryLog<\n event extends ContractEventName<typeof boostRegistryAbi> = ContractEventName<\n typeof boostRegistryAbi\n >,\n> = GenericLog<typeof boostRegistryAbi, event>;\n\n/**\n * Instantiation options for a previously deployed Boost Registry\n *\n * @export\n * @interface BoostRegistryDeployedOptions\n * @typedef {BoostRegistryDeployedOptions}\n * @extends {DeployableOptions}\n */\nexport interface BoostRegistryDeployedOptions extends DeployableOptions {\n /**\n * The address for a Boost Registry, if different than `BOOST_REGISTRY_ADDRESS`\n *\n * @type {?Address}\n */\n address?: Address;\n}\n\n/**\n * A typeguard to determine if instantiation is using a custom address.\n *\n * @param {*} opts\n * @returns {opts is BoostRegistryDeployedOptions}\n */\nfunction isBoostRegistryDeployed(\n // biome-ignore lint/suspicious/noExplicitAny: type guard\n opts: any,\n): opts is BoostRegistryDeployedOptions {\n return opts.address && isAddress(opts.address);\n}\n\n/**\n * The Boost Registry does not take any construction arguments, so if you'd like to deploy a new Boost Registry, pass an explicit null to the `address` field.\n *\n * @export\n * @interface BoostRegistryOptionsWithPayload\n * @typedef {BoostRegistryOptionsWithPayload}\n * @extends {DeployableOptions}\n */\nexport interface BoostRegistryOptionsWithPayload extends DeployableOptions {\n /**\n *\n * @type {null}\n */\n address: null;\n}\n\n/**\n * A typeguard to determine if the user is intending to deploy a new Boost Registry before usage\n *\n * @param {*} opts\n * @returns {opts is BoostRegistryOptionsWithPayload}\n */\nfunction isBoostRegistryDeployable(\n // biome-ignore lint/suspicious/noExplicitAny: type guard\n opts: any,\n): opts is BoostRegistryOptionsWithPayload {\n return opts.address === null;\n}\n\n/**\n * Instantiation options for a Boost Registry.\n *\n * @example\n * To target Boost's Registry, omit the address field.\n * Otherwise, supply a custom address to a previously deployed custom Boost Registry.\n * You can also pass `{ address: null }` if you are intending to deploy a new Boost Registry.\n * ```ts\n * let registry = new BoostRegistry({ config, account })\n * // or\n * registry = new BoostRegistry({ config, account, address: CUSTOM_ADDRESS })\n * // or\n * registry = new BoostRegistry({ config, account, address: null })\n * await registry.deploy()\n * ```\n *\n * @export\n * @typedef {BoostRegistryConfig}\n */\nexport type BoostRegistryConfig =\n | BoostRegistryDeployedOptions\n | BoostRegistryOptionsWithPayload;\n\n/**\n * Constructs a new Boost Registry. A registry for base implementations and cloned instances.\n * This contract is used to register base implementations and deploy new instances of those implementations for use within the Boost protocol.\n *\n * @see {@link BoostRegistryConfig}\n * @export\n * @class BoostRegistry\n * @typedef {BoostRegistry}\n * @extends {Deployable<never[]>}\n */\nexport class BoostRegistry extends Deployable<\n never[],\n typeof boostRegistryAbi\n> {\n /**\n * A static property representing a map of stringified chain ID's to the address of the deployed implementation on chain\n *\n * @static\n * @readonly\n * @type {Record<string, Address>}\n */\n static readonly addresses: Record<number, Address> = BOOST_REGISTRY_ADDRESSES;\n\n /**\n * A getter that will return Boost registry's static addresses by numerical chain ID\n *\n * @public\n * @readonly\n * @type {Record<number, Address>}\n */\n public get addresses(): Record<number, Address> {\n return (this.constructor as typeof BoostRegistry).addresses;\n }\n\n /**\n * Creates an instance of BoostRegistry.\n *\n * @see {@link BoostRegistryConfig}\n * @constructor\n * @param {BoostRegistryConfig} param0\n * @param {Config} param0.config - [Wagmi Configuration](https://wagmi.sh/core/api/createConfig)\n * @param {?Account} [param0.account] - [Viem Local Account](https://viem.sh/docs/accounts/local)\n * @param {({ address?: Address; } | {})} param0....options\n */\n constructor({ config, account, ...options }: BoostRegistryConfig) {\n if (isBoostRegistryDeployed(options) && options.address) {\n super({ account, config }, options.address);\n } else if (isBoostRegistryDeployable(options)) {\n super({ account, config }, []);\n } else {\n const { address } = assertValidAddressByChainId(\n config,\n BOOST_REGISTRY_ADDRESSES,\n );\n super({ account, config }, address);\n }\n }\n\n /**\n * Register a new base implementation of a given type\n *\n * @public\n * @async\n * @param {RegistryType} registryType - The base type for the implementation\n * @param {string} name - A name for the implementation (must be unique within the given type)\n * @param {Address} implementation - The address of the implementation contract\n * @param {?WriteParams<typeof boostRegistryAbi, 'register'>} [params] - Optional params to provide the underlying Viem contract call\n * @returns {unknown}\n * @example\n * ```ts\n * await registry.register(ContractAction.registryType, 'ContractAction', ContractAction.base)\n * ```\n */\n public async register(\n registryType: RegistryType,\n name: string,\n implementation: Address,\n params?: WriteParams<typeof boostRegistryAbi, 'register'>,\n ) {\n return await this.awaitResult(\n this.registerRaw(registryType, name, implementation, params),\n );\n }\n\n /**\n * @see {@link register}\n * @public\n * @async\n * @param {RegistryType} registryType\n * @param {string} name\n * @param {Address} implementation\n * @param {?WriteParams<typeof boostRegistryAbi, 'register'>} [params]\n * @returns {unknown}\n */\n public async registerRaw(\n registryType: RegistryType,\n name: string,\n implementation: Address,\n params?: WriteParams<typeof boostRegistryAbi, 'register'>,\n ) {\n const { request, result } = await simulateBoostRegistryRegister(\n this._config,\n {\n ...assertValidAddressByChainId(\n this._config,\n this.addresses,\n params?.chain?.id || params?.chainId,\n ),\n args: [registryType, name, implementation],\n ...this.optionallyAttachAccount(),\n // biome-ignore lint/suspicious/noExplicitAny: Accept any shape of valid wagmi/viem parameters, wagmi does the same thing internally\n ...(params as any),\n },\n );\n const hash = await writeBoostRegistryRegister(this._config, request);\n return { hash, result };\n }\n\n /**\n * Initialize a new instance of a registered base implementation, returning the provided target with a new address set on it.\n * This method is the same as `clone`, but serves to make its function more obvious as to why you'd need to use it.\n *\n * @public\n * @async\n * @template {DeployableTarget} Target\n * @param {string} displayName - The display name for the clone\n * @param {Target} target - An instance of a target contract to clone and initialize\n * @param {?WriteParams<typeof boostRegistryAbi, 'deployClone'>} [params]\n * @returns {Target} - The provided instance, but with a new address attached.\n * biome-ignore lint/suspicious/noExplicitAny: any deployable target will suffice\n */\n public initialize<Target extends DeployableTarget<any, any>>(\n displayName: string,\n target: Target,\n params?: WriteParams<typeof boostRegistryAbi, 'deployClone'>,\n ): Promise<Target> {\n return this.clone(displayName, target, params);\n }\n\n /**\n * Deploy a new instance of a registered base implementation, returning the provided target with a new address set on it.\n *\n * @public\n * @async\n * @template {DeployableTarget} Target\n * @param {string} displayName - The display name for the clone\n * @param {Target} target - An instance of a target contract to clone and initialize\n * @param {?WriteParams<typeof boostRegistryAbi, 'deployClone'>} [params]\n * @returns {Target} - The provided instance, but with a new address attached.\n * biome-ignore lint/suspicious/noExplicitAny: any deployable target will suffice\n */\n public async clone<Target extends DeployableTarget<any, any>>(\n displayName: string,\n target: Target,\n params?: WriteParams<typeof boostRegistryAbi, 'deployClone'>,\n ): Promise<Target> {\n const instance = await this.deployClone(displayName, target, params);\n return target.at(instance);\n }\n\n /**\n *\n * @see {@link clone}\n * @public\n * @async\n * @template {DeployableTarget} Target\n * @param {string} displayName\n * @param {Target} target\n * @param {?WriteParams<typeof boostRegistryAbi, 'deployClone'>} [params]\n * @returns {Target}\n * biome-ignore lint/suspicious/noExplicitAny: any deployable target will suffice\n */\n public async deployClone<Target extends DeployableTarget<any, any>>(\n displayName: string,\n target: Target,\n params?: WriteParams<typeof boostRegistryAbi, 'deployClone'>,\n ): Promise<Address> {\n return await this.awaitResult(\n this.deployCloneRaw(displayName, target, params),\n );\n }\n\n /**\n * @see {@link clone}\n * @public\n * @async\n * @param {string} displayName\n * @param {DeployableTarget} target\n * @param {?WriteParams<typeof boostRegistryAbi, 'deployClone'>} [params]\n * @returns {unknown} - The transaction hash\n * biome-ignore lint/suspicious/noExplicitAny: any deployable target will suffice\n */\n public async deployCloneRaw<Target extends DeployableTarget<any, any>>(\n displayName: string,\n target: Target,\n params?: WriteParams<typeof boostRegistryAbi, 'deployClone'>,\n ): Promise<HashAndSimulatedResult<Address>> {\n const payload = target.buildParameters(undefined, {\n config: this._config,\n account: this._account,\n });\n const { address: baseAddress } = assertValidAddressByChainId(\n this._config,\n target.bases,\n params?.chain?.id || params?.chainId,\n );\n const { request, result } = await simulateBoostRegistryDeployClone(\n this._config,\n {\n ...assertValidAddressByChainId(\n this._config,\n this.addresses,\n params?.chain?.id || params?.chainId,\n ),\n args: [target.registryType, baseAddress, displayName, payload.args[0]],\n ...this.optionallyAttachAccount(),\n // biome-ignore lint/suspicious/noExplicitAny: Accept any shape of valid wagmi/viem parameters, wagmi does the same thing internally\n ...(params as any),\n },\n );\n const hash = await writeBoostRegistryDeployClone(this._config, request);\n return { hash, result };\n }\n\n /**\n * Get the address of a registered base implementation.\n * This function will revert if the implementation is not registered\n *\n * @public\n * @async\n * @param {Hex} identifier - The unique identifier for the implementation (see {getIdentifier})\n * @param {?ReadParams<typeof boostRegistryAbi, 'getBaseImplementation'>} [params]\n * @returns {unknown} - The address of the implementation\n */\n public async getBaseImplementation(\n identifier: Hex,\n params?: ReadParams<typeof boostRegistryAbi, 'getBaseImplementation'>,\n ) {\n return await readBoostRegistryGetBaseImplementation(this._config, {\n ...assertValidAddressByChainId(\n this._config,\n this.addresses,\n params?.chainId,\n ),\n args: [identifier],\n ...this.optionallyAttachAccount(),\n // biome-ignore lint/suspicious/noExplicitAny: Accept any shape of valid wagmi/viem parameters, wagmi does the same thing internally\n ...(params as any),\n });\n }\n\n /**\n * Get the address of a deployed clone by its identifier\n *\n * @public\n * @async\n * @param {Hex} identifier - The unique identifier for the deployed clone (see {getCloneIdentifier})\n * @param {?ReadParams<typeof boostRegistryAbi, 'getClone'>} [params]\n * @returns {Promise<Address>} - The address of the deployed clone\n */\n public async getClone(\n identifier: Hex,\n params?: ReadParams<typeof boostRegistryAbi, 'getClone'>,\n ) {\n return await readBoostRegistryGetBaseImplementation(this._config, {\n ...assertValidAddressByChainId(\n this._config,\n this.addresses,\n params?.chainId,\n ),\n args: [identifier],\n ...this.optionallyAttachAccount(),\n // biome-ignore lint/suspicious/noExplicitAny: Accept any shape of valid wagmi/viem parameters, wagmi does the same thing internally\n ...(params as any),\n });\n }\n\n /**\n * Get the list of identifiers of deployed clones for a given deployer\n *\n * @public\n * @async\n * @param {Address} deployer - The address of the deployer\n * @param {?ReadParams<typeof boostRegistryAbi, 'getClones'>} [params]\n * @returns {Promise<Hex[]>} - The list of deployed clones for the given deployer\n */\n public async getClones(\n deployer: Address,\n params?: ReadParams<typeof boostRegistryAbi, 'getClones'>,\n ) {\n return await readBoostRegistryGetClones(this._config, {\n ...assertValidAddressByChainId(\n this._config,\n this.addresses,\n params?.chainId,\n ),\n args: [deployer],\n ...this.optionallyAttachAccount(),\n // biome-ignore lint/suspicious/noExplicitAny: Accept any shape of valid wagmi/viem parameters, wagmi does the same thing internally\n ...(params as any),\n });\n }\n\n /**\n * Build the identifier for a clone of a base implementation\n *\n * @public\n * @async\n * @param {RegistryType} registryType - The base type for the implementation\n * @param {Address} base - The address of the base implementation\n * @param {Address} deployer - The address of the deployer\n * @param {string} displayName - The display name of the clone\n * @param {?ReadParams<typeof boostRegistryAbi, 'getCloneIdentifier'>} [params]\n * @returns {Promise<Hex>} - The unique identifier for the clone\n */\n public async getCloneIdentifier(\n registryType: RegistryType,\n base: Address,\n deployer: Address,\n displayName: string,\n params?: ReadParams<typeof boostRegistryAbi, 'getCloneIdentifier'>,\n ) {\n return await readBoostRegistryGetCloneIdentifier(this._config, {\n ...assertValidAddressByChainId(\n this._config,\n this.addresses,\n params?.chainId,\n ),\n args: [registryType, base, deployer, displayName],\n ...this.optionallyAttachAccount(),\n // biome-ignore lint/suspicious/noExplicitAny: Accept any shape of valid wagmi/viem parameters, wagmi does the same thing internally\n ...(params as any),\n });\n }\n\n /**\n * Build the identifier for a base implementation\n *\n * @public\n * @async\n * @param {RegistryType} registryType - The base type for the implementation\n * @param {string} displayName - The name of the implementation\n * @param {?ReadParams<typeof boostRegistryAbi, 'getIdentifier'>} [params]\n * @returns {Promise<Hex>} - The unique identifier for the implementation\n */\n public async getIdentifier(\n registryType: RegistryType,\n displayName: string,\n params?: ReadParams<typeof boostRegistryAbi, 'getIdentifier'>,\n ) {\n return await readBoostRegistryGetCloneIdentifier(this._config, {\n ...assertValidAddressByChainId(\n this._config,\n this.addresses,\n params?.chainId,\n ),\n args: [registryType, displayName],\n ...this.optionallyAttachAccount(),\n // biome-ignore lint/suspicious/noExplicitAny: Accept any shape of valid wagmi/viem parameters, wagmi does the same thing internally\n ...(params as any),\n });\n }\n\n /**\n * @inheritdoc\n *\n * @public\n * @param {?never[]} [_payload]\n * @param {?DeployableOptions} [_options]\n * @returns {GenericDeployableParams}\n */\n public override buildParameters(\n _payload?: never[],\n _options?: DeployableOptions,\n ): GenericDeployableParams {\n const [, options] = this.validateDeploymentConfig([], _options);\n return {\n abi: boostRegistryAbi,\n bytecode: bytecode as Hex,\n // biome-ignore lint/suspicious/noExplicitAny: Registry doesn't construct or initialize\n args: [] as any,\n ...this.optionallyAttachAccount(options.account),\n };\n }\n}\n"],"names":["BOOST_REGISTRY_ADDRESS","BoostRegistryBases","BOOST_REGISTRY_ADDRESSES","isBoostRegistryDeployed","opts","isAddress","isBoostRegistryDeployable","_BoostRegistry","Deployable","config","account","options","address","assertValidAddressByChainId","registryType","name","implementation","params","request","result","simulateBoostRegistryRegister","_a","writeBoostRegistryRegister","displayName","target","instance","payload","baseAddress","simulateBoostRegistryDeployClone","_b","writeBoostRegistryDeployClone","identifier","readBoostRegistryGetBaseImplementation","deployer","readBoostRegistryGetClones","base","readBoostRegistryGetCloneIdentifier","_payload","_options","boostRegistryAbi","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KAAK,wBAAwB7B,EAAQ,OAAO,CAAA,CAEnD,CACF,EA3WEJ,EAAgB,UAAqCL,EAXhD,IAAMuC,EAANlC"}
@@ -2,15 +2,20 @@ import { boostRegistryAbi } from '@boostxyz/evm';
2
2
  import { type Address, type ContractEventName, type Hex } from 'viem';
3
3
  import { Deployable, type DeployableOptions, type GenericDeployableParams } from './Deployable/Deployable';
4
4
  import type { DeployableTarget } from './Deployable/DeployableTarget';
5
- import type { GenericLog, HashAndSimulatedResult, ReadParams, RegistryType, WriteParams } from './utils';
6
- export { boostRegistryAbi };
5
+ import { type GenericLog, type HashAndSimulatedResult, type ReadParams, type RegistryType, type WriteParams } from './utils';
7
6
  /**
8
- * The fixed address for the Boost Registry.
9
- * By default, `new BoostRegistry` will use this address if not otherwise provided.
7
+ * The address of the deployed `BoostRegistry` instance. In prerelease mode, this will be its sepolia address
10
8
  *
11
9
  * @type {Address}
12
10
  */
13
- export declare const BOOST_REGISTRY_ADDRESS: Address;
11
+ export declare const BOOST_REGISTRY_ADDRESS: `0x${string}` | undefined;
12
+ /**
13
+ * The fixed addresses for the deployed Boost Registry.
14
+ * By default, `new BoostRegistry` will use the address deployed to the currently connected chain, or `BOOST_REGISTRY_ADDRESS` if not provided.
15
+ *
16
+ * @type {Record<number, Address>}
17
+ */
18
+ export declare const BOOST_REGISTRY_ADDRESSES: Record<number, Address>;
14
19
  /**
15
20
  * A record of `BoostRegistry` event names to `AbiEvent` objects for use with `getLogs`
16
21
  *
@@ -83,6 +88,22 @@ export type BoostRegistryConfig = BoostRegistryDeployedOptions | BoostRegistryOp
83
88
  * @extends {Deployable<never[]>}
84
89
  */
85
90
  export declare class BoostRegistry extends Deployable<never[], typeof boostRegistryAbi> {
91
+ /**
92
+ * A static property representing a map of stringified chain ID's to the address of the deployed implementation on chain
93
+ *
94
+ * @static
95
+ * @readonly
96
+ * @type {Record<string, Address>}
97
+ */
98
+ static readonly addresses: Record<number, Address>;
99
+ /**
100
+ * A getter that will return Boost registry's static addresses by numerical chain ID
101
+ *
102
+ * @public
103
+ * @readonly
104
+ * @type {Record<number, Address>}
105
+ */
106
+ get addresses(): Record<number, Address>;
86
107
  /**
87
108
  * Creates an instance of BoostRegistry.
88
109
  *
@@ -1 +1 @@
1
- {"version":3,"file":"BoostRegistry.d.ts","sourceRoot":"","sources":["../src/BoostRegistry.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,gBAAgB,EAQjB,MAAM,eAAe,CAAC;AAEvB,OAAO,EACL,KAAK,OAAO,EACZ,KAAK,iBAAiB,EACtB,KAAK,GAAG,EAET,MAAM,MAAM,CAAC;AACd,OAAO,EACL,UAAU,EACV,KAAK,iBAAiB,EACtB,KAAK,uBAAuB,EAC7B,MAAM,yBAAyB,CAAC;AACjC,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,+BAA+B,CAAC;AACtE,OAAO,KAAK,EACV,UAAU,EACV,sBAAsB,EACtB,UAAU,EACV,YAAY,EACZ,WAAW,EACZ,MAAM,SAAS,CAAC;AAEjB,OAAO,EAAE,gBAAgB,EAAE,CAAC;AAE5B;;;;;GAKG;AACH,eAAO,MAAM,sBAAsB,EAAE,OACP,CAAC;AAE/B;;;;;;;;GAQG;AACH,MAAM,MAAM,gBAAgB,CAC1B,KAAK,SAAS,iBAAiB,CAAC,OAAO,gBAAgB,CAAC,GAAG,iBAAiB,CAC1E,OAAO,gBAAgB,CACxB,IACC,UAAU,CAAC,OAAO,gBAAgB,EAAE,KAAK,CAAC,CAAC;AAE/C;;;;;;;GAOG;AACH,MAAM,WAAW,4BAA6B,SAAQ,iBAAiB;IACrE;;;;OAIG;IACH,OAAO,CAAC,EAAE,OAAO,CAAC;CACnB;AAeD;;;;;;;GAOG;AACH,MAAM,WAAW,+BAAgC,SAAQ,iBAAiB;IACxE;;;OAGG;IACH,OAAO,EAAE,IAAI,CAAC;CACf;AAeD;;;;;;;;;;;;;;;;;;GAkBG;AACH,MAAM,MAAM,mBAAmB,GAC3B,4BAA4B,GAC5B,+B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,29 @@
1
- import { h as n, I as o, N as l, d as h, g as t, i as y, m as i, e as u } from "./generated-BDeDiaCK.js";
2
- import { isAddress as g } from "viem";
3
- import { Deployable as A } from "./Deployable/Deployable.js";
4
- const p = "0x6080604052348015600e575f80fd5b50611b4e8061001c5f395ff3fe608060405234801561000f575f80fd5b5060043610610086575f3560e01c8063acc83fc811610059578063acc83fc81461014a578063d12dd4811461017a578063f166879214610196578063fd97064b146101c657610086565b806301ffc9a71461008a5780633aaf1626146100ba578063792aa01c146100ea57806383f388591461011a575b5f80fd5b6100a4600480360381019061009f9190610e0e565b6101f6565b6040516100b19190610e53565b60405180910390f35b6100d460048036038101906100cf9190610e9f565b61025f565b6040516100e191906110a7565b60405180910390f35b61010460048036038101906100ff91906110f1565b610471565b60405161011191906111d3565b60405180910390f35b610134600480360381019061012f9190610e9f565b610504565b6040516101419190611202565b60405180910390f35b610164600480360381019061015f919061129f565b6105ac565b6040516101719190611332565b60405180910390f35b610194600480360381019061018f919061134b565b6105ee565b005b6101b060048036038101906101ab91906113bc565b610818565b6040516101bd9190611332565b60405180910390f35b6101e060048036038101906101db919061146e565b610854565b6040516101ed9190611202565b60405180910390f35b5f7f01ffc9a7000000000000000000000000000000000000000000000000000000007bffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916827bffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916149050919050565b610267610d4e565b60015f8381526020019081526020015f206040518060800160405290815f82015f9054906101000a900460ff1660048111156102a6576102a5610eca565b5b60048111156102b8576102b7610eca565b5b81526020015f820160019054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001600182015f9054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020016002820180546103769061153e565b80601f01602080910402602001604051908101604052809291908181526020018280546103a29061153e565b80156103ed5780601f106103c4576101008083540402835291602001916103ed565b820191905f5260205f20905b8154815290600101906020018083116103d057829003601f168201915b50505050508152505090505f73ffffffffffffffffffffffffffffffffffffffff16816020015173ffffffffffffffffffffffffffffffffffffffff160361046c57816040517f8cc00d160000000000000000000000000000000000000000000000000000000081526004016104639190611332565b60405180910390fd5b919050565b606060025f8373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020015f208054806020026020016040519081016040528092919081815260200182805480156104f857602002820191905f5260205f20905b8154815260200190600101908083116104e4575b50505050509050919050565b5f805f8381526020019081526020015f205f9054906101000a900473ffffffffffffffffffffffffffffffffffffffff1690505f73ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff16036105a757816040517f8cc00d1600000000000000000000000000000000000000000000000000000000815260040161059e9190611332565b60405180910390fd5b919050565b5f6105e386868686866040516020016105c894939291906115ef565b60405160208183030381529060405280519060200120610c1c565b905095945050505050565b808073ffffffffffffffffffffffffffffffffffffffff166301ffc9a77f6ab67a0d000000000000000000000000000000000000000000000000000000006040518263ffffffff1660e01b81526004016106489190611638565b602060405180830381865afa158015610663573d5f803e3d5ffd5b505050506040513d601f19601f82011682018060405250810190610687919061167b565b6106c857806040517f903b13fd0000000000000000000000000000000000000000000000000000000081526004016106bf91906116b5565b60405180910390fd5b5f6106d4868686610818565b90505f73ffffffffffffffffffffffffffffffffffffffff165f808381526020019081526020015f205f9054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16146107775785816040517f96b5684c00000000000000000000000000000000000000000000000000000000815260040161076e9291906116dd565b60405180910390fd5b825f808381526020019081526020015f205f6101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff160217905550808660048111156107d9576107d8610eca565b5b7f660d31df25c96b8a337fcf12a56b7363e5a997639db853d5dbaec7c01f31bd808560405161080891906116b5565b60405180910390a3505050505050565b5f61084b848484604051602001610830929190611704565b60405160208183030381529060405280519060200120610c1c565b90509392505050565b5f3068929eee149b4bd2126854036108735763ab143c065f526004601cfd5b3068929eee149b4bd212685561091b878787873360405160200161089b959493929190611750565b6040516020818303038152906040528051906020012084848080601f0160208091040260200160405190810160405280939291908181526020018383808284375f81840152601f19601f820116905080830192505050505050508873ffffffffffffffffffffffffffffffffffffffff16610c4e9092919063ffffffff16565b90505f61092b88883389896105ac565b90505f73ffffffffffffffffffffffffffffffffffffffff1660015f8381526020019081526020015f205f0160019054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16146109d25787816040517f96b5684c0000000000000000000000000000000000000000000000000000000081526004016109c99291906116dd565b60405180910390fd5b60025f3373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020015f2081908060018154018082558091505060019003905f5260205f20015f90919091909150556040518060800160405280896004811115610a5157610a50610eca565b5b81526020018373ffffffffffffffffffffffffffffffffffffffff1681526020013373ffffffffffffffffffffffffffffffffffffffff16815260200187878080601f0160208091040260200160405190810160405280939291908181526020018383808284375f81840152601f19601f8201169050808301925050505050505081525060015f8381526020019081526020015f205f820151815f015f6101000a81548160ff02191690836004811115610b0e57610b0d610eca565b5b02179055506020820151815f0160016101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff1602179055506040820151816001015f6101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff1602179055506060820151816002019081610bb49190611965565b5090505080886004811115610bcc57610bcb610eca565b5b7f2348fcdb9847b17a183e53aa32c0c5c76afdef8fcb14bb51f216c6611701ab1a8985604051610bfd929190611a34565b60405180910390a3503868929eee149b4bd21268559695505050505050565b5f8282604051602001610c30929190611a7b565b60405160208183030381529060405280519060200120905092915050565b5f610c78838573ffffffffffffffffffffffffffffffffffffffff16610ce790919063ffffffff16565b90508073ffffffffffffffffffffffffffffffffffffffff1663439fab91836040518263ffffffff1660e01b8152600401610cb39190611af8565b5f604051808303815f87803b158015610cca575f80fd5b505af1158015610cdc573d5f803e3d5ffd5b505050509392505050565b5f610cf35f8484610cfb565b905092915050565b5f6c5af43d3d93803e602a57fd5bf36021528260145273602c3d8160093d39f33d3d3d3d363d3d37363d735f52816035600c86f5905080610d435763301164255f526004601cfd5b5f6021529392505050565b60405180608001604052805f6004811115610d6c57610d6b610eca565b5b81526020015f73ffffffffffffffffffffffffffffffffffffffff1681526020015f73ffffffffffffffffffffffffffffffffffffffff168152602001606081525090565b5f80fd5b5f80fd5b5f7fffffffff0000000000000000000000000000000000000000000000000000000082169050919050565b610ded81610db9565b8114610df7575f80fd5b50565b5f81359050610e0881610de4565b92915050565b5f60208284031215610e2357610e22610db1565b5b5f610e3084828501610dfa565b91505092915050565b5f8115159050919050565b610e4d81610e39565b82525050565b5f602082019050610e665f830184610e44565b92915050565b5f819050919050565b610e7e81610e6c565b8114610e88575f80fd5b50565b5f81359050610e9981610e75565b92915050565b5f60208284031215610eb457610eb3610db1565b5b5f610ec184828501610e8b565b91505092915050565b7f4e487b71000000000000000000000000000000000000000000000000000000005f52602160045260245ffd5b60058110610f0857610f07610eca565b5b50565b5f819050610f1882610ef7565b919050565b5f610f2782610f0b565b9050919050565b610f3781610f1d565b82525050565b5f73ffffffffffffffffffffffffffffffffffffffff82169050919050565b5f819050919050565b5f610f7f610f7a610f7584610f3d565b610f5c565b610f3d565b9050919050565b5f610f9082610f65565b9050919050565b5f610fa182610f86565b9050919050565b610fb181610f97565b82525050565b5f610fc182610f3d565b9050919050565b610fd181610fb7565b82525050565b5f81519050919050565b5f82825260208201905092915050565b8281835e5f83830152505050565b5f601f19601f8301169050919050565b5f61101982610fd7565b6110238185610fe1565b9350611033818560208601610ff1565b61103c81610fff565b840191505092915050565b5f608083015f83015161105c5f860182610f2e565b50602083015161106f6020860182610fa8565b5060408301516110826040860182610fc8565b506060830151848203606086015261109a828261100f565b9150508091505092915050565b5f6020820190508181035f8301526110bf8184611047565b905092915050565b6110d081610fb7565b81146110da575f80fd5b50565b5f813590506110eb816110c7565b92915050565b5f6020828403121561110657611105610db1565b5b5f611113848285016110dd565b91505092915050565b5f81519050919050565b5f82825260208201905092915050565b5f819050602082019050919050565b61114e81610e6c565b82525050565b5f61115f8383611145565b60208301905092915050565b5f602082019050919050565b5f6111818261111c565b61118b8185611126565b935061119683611136565b805f5b838110156111c65781516111ad8882611154565b97506111b88361116b565b925050600181019050611199565b5085935050505092915050565b5f6020820190508181035f8301526111eb8184611177565b905092915050565b6111fc81610f97565b82525050565b5f6020820190506112155f8301846111f3565b92915050565b60058110611227575f80fd5b50565b5f813590506112388161121b565b92915050565b5f80fd5b5f80fd5b5f80fd5b5f8083601f84011261125f5761125e61123e565b5b8235905067ffffffffffffffff81111561127c5761127b611242565b5b60208301915083600182028301111561129857611297611246565b5b9250929050565b5f805f805f608086880312156112b8576112b7610db1565b5b5f6112c58882890161122a565b95505060206112d6888289016110dd565b94505060406112e7888289016110dd565b935050606086013567ffffffffffffffff81111561130857611307610db5565b5b6113148882890161124a565b92509250509295509295909350565b61132c81610e6c565b82525050565b5f6020820190506113455f830184611323565b92915050565b5f805f806060858703121561136357611362610db1565b5b5f6113708782880161122a565b945050602085013567ffffffffffffffff81111561139157611390610db5565b5b61139d8782880161124a565b935093505060406113b0878288016110dd565b91505092959194509250565b5f805f604084860312156113d3576113d2610db1565b5b5f6113e08682870161122a565b935050602084013567ffffffffffffffff81111561140157611400610db5565b5b61140d8682870161124a565b92509250509250925092565b5f8083601f84011261142e5761142d61123e565b5b8235905067ffffffffffffffff81111561144b5761144a611242565b5b60208301915083600182028301111561146757611466611246565b5b9250929050565b5f805f805f806080878903121561148857611487610db1565b5b5f61149589828a0161122a565b96505060206114a689828a016110dd565b955050604087013567ffffffffffffffff8111156114c7576114c6610db5565b5b6114d389828a0161124a565b9450945050606087013567ffffffffffffffff8111156114f6576114f5610db5565b5b61150289828a01611419565b92509250509295509295509295565b7f4e487b71000000000000000000000000000000000000000000000000000000005f52602260045260245ffd5b5f600282049050600182168061155557607f821691505b60208210810361156857611567611511565b5b50919050565b5f8160601b9050919050565b5f6115848261156e565b9050919050565b5f6115958261157a565b9050919050565b6115ad6115a882610fb7565b61158b565b82525050565b5f81905092915050565b828183375f83830152505050565b5f6115d683856115b3565b93506115e38385846115bd565b82840190509392505050565b5f6115fa828761159c565b60148201915061160a828661159c565b60148201915061161b8284866115cb565b915081905095945050505050565b61163281610db9565b82525050565b5f60208201905061164b5f830184611629565b92915050565b61165a81610e39565b8114611664575f80fd5b50565b5f8151905061167581611651565b92915050565b5f602082840312156116905761168f610db1565b5b5f61169d84828501611667565b91505092915050565b6116af81610fb7565b82525050565b5f6020820190506116c85f8301846116a6565b92915050565b6116d781610f1d565b82525050565b5f6040820190506116f05f8301856116ce565b6116fd6020830184611323565b9392505050565b5f6117108284866115cb565b91508190509392505050565b5f8160f81b9050919050565b5f6117328261171c565b9050919050565b61174a61174582610f1d565b611728565b82525050565b5f61175b8288611739565b60018201915061176b828761159c565b60148201915061177c8285876115cb565b9150611788828461159c565b6014820191508190509695505050505050565b7f4e487b71000000000000000000000000000000000000000000000000000000005f52604160045260245ffd5b5f819050815f5260205f209050919050565b5f6020601f8301049050919050565b5f82821b905092915050565b5f600883026118247fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff826117e9565b61182e86836117e9565b95508019841693508086168417925050509392505050565b5f819050919050565b5f61186961186461185f84611846565b610f5c565b611846565b9050919050565b5f819050919050565b6118828361184f565b61189661188e82611870565b8484546117f5565b825550505050565b5f90565b6118aa61189e565b6118b5818484611879565b505050565b5b818110156118d8576118cd5f826118a2565b6001810190506118bb565b5050565b601f82111561191d576118ee816117c8565b6118f7846117da565b81016020851015611906578190505b61191a611912856117da565b8301826118ba565b50505b505050565b5f82821c905092915050565b5f61193d5f1984600802611922565b1980831691505092915050565b5f611955838361192e565b9150826002028217905092915050565b61196e82610fd7565b67ffffffffffffffff8111156119875761198661179b565b5b611991825461153e565b61199c8282856118dc565b5f60209050601f8311600181146119cd575f84156119bb578287015190505b6119c5858261194a565b865550611a2c565b601f1984166119db866117c8565b5f5b82811015611a02578489015182556001820191506020850194506020810190506119dd565b86831015611a1f5784890151611a1b601f89168261192e565b8355505b6001600288020188555050505b505050505050565b5f604082019050611a475f8301856116a6565b611a5460208301846111f3565b9392505050565b5f819050919050565b611a75611a7082610e6c565b611a5b565b82525050565b5f611a868285611739565b600182019150611a968284611a64565b6020820191508190509392505050565b5f81519050919050565b5f82825260208201905092915050565b5f611aca82611aa6565b611ad48185611ab0565b9350611ae4818560208601610ff1565b611aed81610fff565b840191505092915050565b5f6020820190508181035f830152611b108184611ac0565b90509291505056fea264697066735822122031d8b5092c0648488ea4f8c739d0ff5d8c5debf32ebfcd2f52c823a98c8a410064736f6c634300081a0033", w = "0x6659255D4Aa39a975c7C841D5d898969fc3F75aa";
5
- function _(d) {
6
- return d.address && g(d.address);
1
+ import { g as _, c as w, h as I, I as R, e as u, i as C, j as y, k as D } from "./generated-LpgSHrH0.js";
2
+ import { isAddress as S } from "viem";
3
+ import { B as A } from "./deployments-BvFcK_eR.js";
4
+ import { Deployable as B } from "./Deployable/Deployable.js";
5
+ import { assertValidAddressByChainId as c } from "./utils.js";
6
+ const E = "0x6080604052348015600e575f80fd5b50611b4e8061001c5f395ff3fe608060405234801561000f575f80fd5b5060043610610086575f3560e01c8063acc83fc811610059578063acc83fc81461014a578063d12dd4811461017a578063f166879214610196578063fd97064b146101c657610086565b806301ffc9a71461008a5780633aaf1626146100ba578063792aa01c146100ea57806383f388591461011a575b5f80fd5b6100a4600480360381019061009f9190610e0e565b6101f6565b6040516100b19190610e53565b60405180910390f35b6100d460048036038101906100cf9190610e9f565b61025f565b6040516100e191906110a7565b60405180910390f35b61010460048036038101906100ff91906110f1565b610471565b60405161011191906111d3565b60405180910390f35b610134600480360381019061012f9190610e9f565b610504565b6040516101419190611202565b60405180910390f35b610164600480360381019061015f919061129f565b6105ac565b6040516101719190611332565b60405180910390f35b610194600480360381019061018f919061134b565b6105ee565b005b6101b060048036038101906101ab91906113bc565b610818565b6040516101bd9190611332565b60405180910390f35b6101e060048036038101906101db919061146e565b610854565b6040516101ed9190611202565b60405180910390f35b5f7f01ffc9a7000000000000000000000000000000000000000000000000000000007bffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916827bffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916149050919050565b610267610d4e565b60015f8381526020019081526020015f206040518060800160405290815f82015f9054906101000a900460ff1660048111156102a6576102a5610eca565b5b60048111156102b8576102b7610eca565b5b81526020015f820160019054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001600182015f9054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020016002820180546103769061153e565b80601f01602080910402602001604051908101604052809291908181526020018280546103a29061153e565b80156103ed5780601f106103c4576101008083540402835291602001916103ed565b820191905f5260205f20905b8154815290600101906020018083116103d057829003601f168201915b50505050508152505090505f73ffffffffffffffffffffffffffffffffffffffff16816020015173ffffffffffffffffffffffffffffffffffffffff160361046c57816040517f8cc00d160000000000000000000000000000000000000000000000000000000081526004016104639190611332565b60405180910390fd5b919050565b606060025f8373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020015f208054806020026020016040519081016040528092919081815260200182805480156104f857602002820191905f5260205f20905b8154815260200190600101908083116104e4575b50505050509050919050565b5f805f8381526020019081526020015f205f9054906101000a900473ffffffffffffffffffffffffffffffffffffffff1690505f73ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff16036105a757816040517f8cc00d1600000000000000000000000000000000000000000000000000000000815260040161059e9190611332565b60405180910390fd5b919050565b5f6105e386868686866040516020016105c894939291906115ef565b60405160208183030381529060405280519060200120610c1c565b905095945050505050565b808073ffffffffffffffffffffffffffffffffffffffff166301ffc9a77f6ab67a0d000000000000000000000000000000000000000000000000000000006040518263ffffffff1660e01b81526004016106489190611638565b602060405180830381865afa158015610663573d5f803e3d5ffd5b505050506040513d601f19601f82011682018060405250810190610687919061167b565b6106c857806040517f903b13fd0000000000000000000000000000000000000000000000000000000081526004016106bf91906116b5565b60405180910390fd5b5f6106d4868686610818565b90505f73ffffffffffffffffffffffffffffffffffffffff165f808381526020019081526020015f205f9054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16146107775785816040517f96b5684c00000000000000000000000000000000000000000000000000000000815260040161076e9291906116dd565b60405180910390fd5b825f808381526020019081526020015f205f6101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff160217905550808660048111156107d9576107d8610eca565b5b7f660d31df25c96b8a337fcf12a56b7363e5a997639db853d5dbaec7c01f31bd808560405161080891906116b5565b60405180910390a3505050505050565b5f61084b848484604051602001610830929190611704565b60405160208183030381529060405280519060200120610c1c565b90509392505050565b5f3068929eee149b4bd2126854036108735763ab143c065f526004601cfd5b3068929eee149b4bd212685561091b878787873360405160200161089b959493929190611750565b6040516020818303038152906040528051906020012084848080601f0160208091040260200160405190810160405280939291908181526020018383808284375f81840152601f19601f820116905080830192505050505050508873ffffffffffffffffffffffffffffffffffffffff16610c4e9092919063ffffffff16565b90505f61092b88883389896105ac565b90505f73ffffffffffffffffffffffffffffffffffffffff1660015f8381526020019081526020015f205f0160019054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16146109d25787816040517f96b5684c0000000000000000000000000000000000000000000000000000000081526004016109c99291906116dd565b60405180910390fd5b60025f3373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020015f2081908060018154018082558091505060019003905f5260205f20015f90919091909150556040518060800160405280896004811115610a5157610a50610eca565b5b81526020018373ffffffffffffffffffffffffffffffffffffffff1681526020013373ffffffffffffffffffffffffffffffffffffffff16815260200187878080601f0160208091040260200160405190810160405280939291908181526020018383808284375f81840152601f19601f8201169050808301925050505050505081525060015f8381526020019081526020015f205f820151815f015f6101000a81548160ff02191690836004811115610b0e57610b0d610eca565b5b02179055506020820151815f0160016101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff1602179055506040820151816001015f6101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff1602179055506060820151816002019081610bb49190611965565b5090505080886004811115610bcc57610bcb610eca565b5b7f2348fcdb9847b17a183e53aa32c0c5c76afdef8fcb14bb51f216c6611701ab1a8985604051610bfd929190611a34565b60405180910390a3503868929eee149b4bd21268559695505050505050565b5f8282604051602001610c30929190611a7b565b60405160208183030381529060405280519060200120905092915050565b5f610c78838573ffffffffffffffffffffffffffffffffffffffff16610ce790919063ffffffff16565b90508073ffffffffffffffffffffffffffffffffffffffff1663439fab91836040518263ffffffff1660e01b8152600401610cb39190611af8565b5f604051808303815f87803b158015610cca575f80fd5b505af1158015610cdc573d5f803e3d5ffd5b505050509392505050565b5f610cf35f8484610cfb565b905092915050565b5f6c5af43d3d93803e602a57fd5bf36021528260145273602c3d8160093d39f33d3d3d3d363d3d37363d735f52816035600c86f5905080610d435763301164255f526004601cfd5b5f6021529392505050565b60405180608001604052805f6004811115610d6c57610d6b610eca565b5b81526020015f73ffffffffffffffffffffffffffffffffffffffff1681526020015f73ffffffffffffffffffffffffffffffffffffffff168152602001606081525090565b5f80fd5b5f80fd5b5f7fffffffff0000000000000000000000000000000000000000000000000000000082169050919050565b610ded81610db9565b8114610df7575f80fd5b50565b5f81359050610e0881610de4565b92915050565b5f60208284031215610e2357610e22610db1565b5b5f610e3084828501610dfa565b91505092915050565b5f8115159050919050565b610e4d81610e39565b82525050565b5f602082019050610e665f830184610e44565b92915050565b5f819050919050565b610e7e81610e6c565b8114610e88575f80fd5b50565b5f81359050610e9981610e75565b92915050565b5f60208284031215610eb457610eb3610db1565b5b5f610ec184828501610e8b565b91505092915050565b7f4e487b71000000000000000000000000000000000000000000000000000000005f52602160045260245ffd5b60058110610f0857610f07610eca565b5b50565b5f819050610f1882610ef7565b919050565b5f610f2782610f0b565b9050919050565b610f3781610f1d565b82525050565b5f73ffffffffffffffffffffffffffffffffffffffff82169050919050565b5f819050919050565b5f610f7f610f7a610f7584610f3d565b610f5c565b610f3d565b9050919050565b5f610f9082610f65565b9050919050565b5f610fa182610f86565b9050919050565b610fb181610f97565b82525050565b5f610fc182610f3d565b9050919050565b610fd181610fb7565b82525050565b5f81519050919050565b5f82825260208201905092915050565b8281835e5f83830152505050565b5f601f19601f8301169050919050565b5f61101982610fd7565b6110238185610fe1565b9350611033818560208601610ff1565b61103c81610fff565b840191505092915050565b5f608083015f83015161105c5f860182610f2e565b50602083015161106f6020860182610fa8565b5060408301516110826040860182610fc8565b506060830151848203606086015261109a828261100f565b9150508091505092915050565b5f6020820190508181035f8301526110bf8184611047565b905092915050565b6110d081610fb7565b81146110da575f80fd5b50565b5f813590506110eb816110c7565b92915050565b5f6020828403121561110657611105610db1565b5b5f611113848285016110dd565b91505092915050565b5f81519050919050565b5f82825260208201905092915050565b5f819050602082019050919050565b61114e81610e6c565b82525050565b5f61115f8383611145565b60208301905092915050565b5f602082019050919050565b5f6111818261111c565b61118b8185611126565b935061119683611136565b805f5b838110156111c65781516111ad8882611154565b97506111b88361116b565b925050600181019050611199565b5085935050505092915050565b5f6020820190508181035f8301526111eb8184611177565b905092915050565b6111fc81610f97565b82525050565b5f6020820190506112155f8301846111f3565b92915050565b60058110611227575f80fd5b50565b5f813590506112388161121b565b92915050565b5f80fd5b5f80fd5b5f80fd5b5f8083601f84011261125f5761125e61123e565b5b8235905067ffffffffffffffff81111561127c5761127b611242565b5b60208301915083600182028301111561129857611297611246565b5b9250929050565b5f805f805f608086880312156112b8576112b7610db1565b5b5f6112c58882890161122a565b95505060206112d6888289016110dd565b94505060406112e7888289016110dd565b935050606086013567ffffffffffffffff81111561130857611307610db5565b5b6113148882890161124a565b92509250509295509295909350565b61132c81610e6c565b82525050565b5f6020820190506113455f830184611323565b92915050565b5f805f806060858703121561136357611362610db1565b5b5f6113708782880161122a565b945050602085013567ffffffffffffffff81111561139157611390610db5565b5b61139d8782880161124a565b935093505060406113b0878288016110dd565b91505092959194509250565b5f805f604084860312156113d3576113d2610db1565b5b5f6113e08682870161122a565b935050602084013567ffffffffffffffff81111561140157611400610db5565b5b61140d8682870161124a565b92509250509250925092565b5f8083601f84011261142e5761142d61123e565b5b8235905067ffffffffffffffff81111561144b5761144a611242565b5b60208301915083600182028301111561146757611466611246565b5b9250929050565b5f805f805f806080878903121561148857611487610db1565b5b5f61149589828a0161122a565b96505060206114a689828a016110dd565b955050604087013567ffffffffffffffff8111156114c7576114c6610db5565b5b6114d389828a0161124a565b9450945050606087013567ffffffffffffffff8111156114f6576114f5610db5565b5b61150289828a01611419565b92509250509295509295509295565b7f4e487b71000000000000000000000000000000000000000000000000000000005f52602260045260245ffd5b5f600282049050600182168061155557607f821691505b60208210810361156857611567611511565b5b50919050565b5f8160601b9050919050565b5f6115848261156e565b9050919050565b5f6115958261157a565b9050919050565b6115ad6115a882610fb7565b61158b565b82525050565b5f81905092915050565b828183375f83830152505050565b5f6115d683856115b3565b93506115e38385846115bd565b82840190509392505050565b5f6115fa828761159c565b60148201915061160a828661159c565b60148201915061161b8284866115cb565b915081905095945050505050565b61163281610db9565b82525050565b5f60208201905061164b5f830184611629565b92915050565b61165a81610e39565b8114611664575f80fd5b50565b5f8151905061167581611651565b92915050565b5f602082840312156116905761168f610db1565b5b5f61169d84828501611667565b91505092915050565b6116af81610fb7565b82525050565b5f6020820190506116c85f8301846116a6565b92915050565b6116d781610f1d565b82525050565b5f6040820190506116f05f8301856116ce565b6116fd6020830184611323565b9392505050565b5f6117108284866115cb565b91508190509392505050565b5f8160f81b9050919050565b5f6117328261171c565b9050919050565b61174a61174582610f1d565b611728565b82525050565b5f61175b8288611739565b60018201915061176b828761159c565b60148201915061177c8285876115cb565b9150611788828461159c565b6014820191508190509695505050505050565b7f4e487b71000000000000000000000000000000000000000000000000000000005f52604160045260245ffd5b5f819050815f5260205f209050919050565b5f6020601f8301049050919050565b5f82821b905092915050565b5f600883026118247fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff826117e9565b61182e86836117e9565b95508019841693508086168417925050509392505050565b5f819050919050565b5f61186961186461185f84611846565b610f5c565b611846565b9050919050565b5f819050919050565b6118828361184f565b61189661188e82611870565b8484546117f5565b825550505050565b5f90565b6118aa61189e565b6118b5818484611879565b505050565b5b818110156118d8576118cd5f826118a2565b6001810190506118bb565b5050565b601f82111561191d576118ee816117c8565b6118f7846117da565b81016020851015611906578190505b61191a611912856117da565b8301826118ba565b50505b505050565b5f82821c905092915050565b5f61193d5f1984600802611922565b1980831691505092915050565b5f611955838361192e565b9150826002028217905092915050565b61196e82610fd7565b67ffffffffffffffff8111156119875761198661179b565b5b611991825461153e565b61199c8282856118dc565b5f60209050601f8311600181146119cd575f84156119bb578287015190505b6119c5858261194a565b865550611a2c565b601f1984166119db866117c8565b5f5b82811015611a02578489015182556001820191506020850194506020810190506119dd565b86831015611a1f5784890151611a1b601f89168261192e565b8355505b6001600288020188555050505b505050505050565b5f604082019050611a475f8301856116a6565b611a5460208301846111f3565b9392505050565b5f819050919050565b611a75611a7082610e6c565b611a5b565b82525050565b5f611a868285611739565b600182019150611a968284611a64565b6020820191508190509392505050565b5f81519050919050565b5f82825260208201905092915050565b5f611aca82611aa6565b611ad48185611ab0565b9350611ae4818560208601610ff1565b611aed81610fff565b840191505092915050565b5f6020820190508181035f830152611b108184611ac0565b90509291505056fea264697066735822122031d8b5092c0648488ea4f8c739d0ff5d8c5debf32ebfcd2f52c823a98c8a410064736f6c634300081a0033", Y = A[11155111], r = {
7
+ ...A,
8
+ 31337: "0x6659255D4Aa39a975c7C841D5d898969fc3F75aa"
9
+ };
10
+ function T(t) {
11
+ return t.address && S(t.address);
7
12
  }
8
- function m(d) {
9
- return d.address === null;
13
+ function x(t) {
14
+ return t.address === null;
10
15
  }
11
- class V extends A {
16
+ const n = class n extends B {
17
+ /**
18
+ * A getter that will return Boost registry's static addresses by numerical chain ID
19
+ *
20
+ * @public
21
+ * @readonly
22
+ * @type {Record<number, Address>}
23
+ */
24
+ get addresses() {
25
+ return this.constructor.addresses;
26
+ }
12
27
  /**
13
28
  * Creates an instance of BoostRegistry.
14
29
  *
@@ -19,8 +34,18 @@ class V extends A {
19
34
  * @param {?Account} [param0.account] - [Viem Local Account](https://viem.sh/docs/accounts/local)
20
35
  * @param {({ address?: Address; } | {})} param0....options
21
36
  */
22
- constructor({ config: b, account: f, ...a }) {
23
- _(a) && a.address ? super({ account: f, config: b }, a.address) : m(a) ? super({ account: f, config: b }, []) : super({ account: f, config: b }, w);
37
+ constructor({ config: e, account: f, ...b }) {
38
+ if (T(b) && b.address)
39
+ super({ account: f, config: e }, b.address);
40
+ else if (x(b))
41
+ super({ account: f, config: e }, []);
42
+ else {
43
+ const { address: d } = c(
44
+ e,
45
+ r
46
+ );
47
+ super({ account: f, config: e }, d);
48
+ }
24
49
  }
25
50
  /**
26
51
  * Register a new base implementation of a given type
@@ -37,9 +62,9 @@ class V extends A {
37
62
  * await registry.register(ContractAction.registryType, 'ContractAction', ContractAction.base)
38
63
  * ```
39
64
  */
40
- async register(b, f, a, e) {
65
+ async register(e, f, b, d) {
41
66
  return await this.awaitResult(
42
- this.registerRaw(b, f, a, e)
67
+ this.registerRaw(e, f, b, d)
43
68
  );
44
69
  }
45
70
  /**
@@ -52,18 +77,23 @@ class V extends A {
52
77
  * @param {?WriteParams<typeof boostRegistryAbi, 'register'>} [params]
53
78
  * @returns {unknown}
54
79
  */
55
- async registerRaw(b, f, a, e) {
56
- const { request: c, result: s } = await n(
80
+ async registerRaw(e, f, b, d) {
81
+ var s;
82
+ const { request: a, result: i } = await _(
57
83
  this._config,
58
84
  {
59
- address: this.assertValidAddress(),
60
- args: [b, f, a],
85
+ ...c(
86
+ this._config,
87
+ this.addresses,
88
+ ((s = d == null ? void 0 : d.chain) == null ? void 0 : s.id) || (d == null ? void 0 : d.chainId)
89
+ ),
90
+ args: [e, f, b],
61
91
  ...this.optionallyAttachAccount(),
62
92
  // biome-ignore lint/suspicious/noExplicitAny: Accept any shape of valid wagmi/viem parameters, wagmi does the same thing internally
63
- ...e
93
+ ...d
64
94
  }
65
95
  );
66
- return { hash: await o(this._config, c), result: s };
96
+ return { hash: await w(this._config, a), result: i };
67
97
  }
68
98
  /**
69
99
  * Initialize a new instance of a registered base implementation, returning the provided target with a new address set on it.
@@ -78,8 +108,8 @@ class V extends A {
78
108
  * @returns {Target} - The provided instance, but with a new address attached.
79
109
  * biome-ignore lint/suspicious/noExplicitAny: any deployable target will suffice
80
110
  */
81
- initialize(b, f, a) {
82
- return this.clone(b, f, a);
111
+ initialize(e, f, b) {
112
+ return this.clone(e, f, b);
83
113
  }
84
114
  /**
85
115
  * Deploy a new instance of a registered base implementation, returning the provided target with a new address set on it.
@@ -93,9 +123,9 @@ class V extends A {
93
123
  * @returns {Target} - The provided instance, but with a new address attached.
94
124
  * biome-ignore lint/suspicious/noExplicitAny: any deployable target will suffice
95
125
  */
96
- async clone(b, f, a) {
97
- const e = await this.deployClone(b, f, a);
98
- return f.at(e);
126
+ async clone(e, f, b) {
127
+ const d = await this.deployClone(e, f, b);
128
+ return f.at(d);
99
129
  }
100
130
  /**
101
131
  *
@@ -109,9 +139,9 @@ class V extends A {
109
139
  * @returns {Target}
110
140
  * biome-ignore lint/suspicious/noExplicitAny: any deployable target will suffice
111
141
  */
112
- async deployClone(b, f, a) {
142
+ async deployClone(e, f, b) {
113
143
  return await this.awaitResult(
114
- this.deployCloneRaw(b, f, a)
144
+ this.deployCloneRaw(e, f, b)
115
145
  );
116
146
  }
117
147
  /**
@@ -124,21 +154,30 @@ class V extends A {
124
154
  * @returns {unknown} - The transaction hash
125
155
  * biome-ignore lint/suspicious/noExplicitAny: any deployable target will suffice
126
156
  */
127
- async deployCloneRaw(b, f, a) {
128
- const e = f.buildParameters(void 0, {
157
+ async deployCloneRaw(e, f, b) {
158
+ var h, l;
159
+ const d = f.buildParameters(void 0, {
129
160
  config: this._config,
130
161
  account: this._account
131
- }), { request: c, result: s } = await l(
162
+ }), { address: a } = c(
163
+ this._config,
164
+ f.bases,
165
+ ((h = b == null ? void 0 : b.chain) == null ? void 0 : h.id) || (b == null ? void 0 : b.chainId)
166
+ ), { request: i, result: o } = await I(
132
167
  this._config,
133
168
  {
134
- address: this.assertValidAddress(),
135
- args: [f.registryType, f.base, b, e.args[0]],
169
+ ...c(
170
+ this._config,
171
+ this.addresses,
172
+ ((l = b == null ? void 0 : b.chain) == null ? void 0 : l.id) || (b == null ? void 0 : b.chainId)
173
+ ),
174
+ args: [f.registryType, a, e, d.args[0]],
136
175
  ...this.optionallyAttachAccount(),
137
176
  // biome-ignore lint/suspicious/noExplicitAny: Accept any shape of valid wagmi/viem parameters, wagmi does the same thing internally
138
- ...a
177
+ ...b
139
178
  }
140
179
  );
141
- return { hash: await h(this._config, c), result: s };
180
+ return { hash: await R(this._config, i), result: o };
142
181
  }
143
182
  /**
144
183
  * Get the address of a registered base implementation.
@@ -150,10 +189,14 @@ class V extends A {
150
189
  * @param {?ReadParams<typeof boostRegistryAbi, 'getBaseImplementation'>} [params]
151
190
  * @returns {unknown} - The address of the implementation
152
191
  */
153
- async getBaseImplementation(b, f) {
154
- return await t(this._config, {
155
- address: this.assertValidAddress(),
156
- args: [b],
192
+ async getBaseImplementation(e, f) {
193
+ return await u(this._config, {
194
+ ...c(
195
+ this._config,
196
+ this.addresses,
197
+ f == null ? void 0 : f.chainId
198
+ ),
199
+ args: [e],
157
200
  ...this.optionallyAttachAccount(),
158
201
  // biome-ignore lint/suspicious/noExplicitAny: Accept any shape of valid wagmi/viem parameters, wagmi does the same thing internally
159
202
  ...f
@@ -168,10 +211,14 @@ class V extends A {
168
211
  * @param {?ReadParams<typeof boostRegistryAbi, 'getClone'>} [params]
169
212
  * @returns {Promise<Address>} - The address of the deployed clone
170
213
  */
171
- async getClone(b, f) {
172
- return await t(this._config, {
173
- address: this.assertValidAddress(),
174
- args: [b],
214
+ async getClone(e, f) {
215
+ return await u(this._config, {
216
+ ...c(
217
+ this._config,
218
+ this.addresses,
219
+ f == null ? void 0 : f.chainId
220
+ ),
221
+ args: [e],
175
222
  ...this.optionallyAttachAccount(),
176
223
  // biome-ignore lint/suspicious/noExplicitAny: Accept any shape of valid wagmi/viem parameters, wagmi does the same thing internally
177
224
  ...f
@@ -186,10 +233,14 @@ class V extends A {
186
233
  * @param {?ReadParams<typeof boostRegistryAbi, 'getClones'>} [params]
187
234
  * @returns {Promise<Hex[]>} - The list of deployed clones for the given deployer
188
235
  */
189
- async getClones(b, f) {
190
- return await y(this._config, {
191
- address: this.assertValidAddress(),
192
- args: [b],
236
+ async getClones(e, f) {
237
+ return await C(this._config, {
238
+ ...c(
239
+ this._config,
240
+ this.addresses,
241
+ f == null ? void 0 : f.chainId
242
+ ),
243
+ args: [e],
193
244
  ...this.optionallyAttachAccount(),
194
245
  // biome-ignore lint/suspicious/noExplicitAny: Accept any shape of valid wagmi/viem parameters, wagmi does the same thing internally
195
246
  ...f
@@ -207,13 +258,17 @@ class V extends A {
207
258
  * @param {?ReadParams<typeof boostRegistryAbi, 'getCloneIdentifier'>} [params]
208
259
  * @returns {Promise<Hex>} - The unique identifier for the clone
209
260
  */
210
- async getCloneIdentifier(b, f, a, e, c) {
211
- return await i(this._config, {
212
- address: this.assertValidAddress(),
213
- args: [b, f, a, e],
261
+ async getCloneIdentifier(e, f, b, d, a) {
262
+ return await y(this._config, {
263
+ ...c(
264
+ this._config,
265
+ this.addresses,
266
+ a == null ? void 0 : a.chainId
267
+ ),
268
+ args: [e, f, b, d],
214
269
  ...this.optionallyAttachAccount(),
215
270
  // biome-ignore lint/suspicious/noExplicitAny: Accept any shape of valid wagmi/viem parameters, wagmi does the same thing internally
216
- ...c
271
+ ...a
217
272
  });
218
273
  }
219
274
  /**
@@ -226,13 +281,17 @@ class V extends A {
226
281
  * @param {?ReadParams<typeof boostRegistryAbi, 'getIdentifier'>} [params]
227
282
  * @returns {Promise<Hex>} - The unique identifier for the implementation
228
283
  */
229
- async getIdentifier(b, f, a) {
230
- return await i(this._config, {
231
- address: this.assertValidAddress(),
232
- args: [b, f],
284
+ async getIdentifier(e, f, b) {
285
+ return await y(this._config, {
286
+ ...c(
287
+ this._config,
288
+ this.addresses,
289
+ b == null ? void 0 : b.chainId
290
+ ),
291
+ args: [e, f],
233
292
  ...this.optionallyAttachAccount(),
234
293
  // biome-ignore lint/suspicious/noExplicitAny: Accept any shape of valid wagmi/viem parameters, wagmi does the same thing internally
235
- ...a
294
+ ...b
236
295
  });
237
296
  }
238
297
  /**
@@ -243,20 +302,22 @@ class V extends A {
243
302
  * @param {?DeployableOptions} [_options]
244
303
  * @returns {GenericDeployableParams}
245
304
  */
246
- buildParameters(b, f) {
247
- const [, a] = this.validateDeploymentConfig([], f);
305
+ buildParameters(e, f) {
306
+ const [, b] = this.validateDeploymentConfig([], f);
248
307
  return {
249
- abi: u,
250
- bytecode: p,
308
+ abi: D,
309
+ bytecode: E,
251
310
  // biome-ignore lint/suspicious/noExplicitAny: Registry doesn't construct or initialize
252
311
  args: [],
253
- ...this.optionallyAttachAccount(a.account)
312
+ ...this.optionallyAttachAccount(b.account)
254
313
  };
255
314
  }
256
- }
315
+ };
316
+ n.addresses = r;
317
+ let g = n;
257
318
  export {
258
- w as BOOST_REGISTRY_ADDRESS,
259
- V as BoostRegistry,
260
- u as boostRegistryAbi
319
+ Y as BOOST_REGISTRY_ADDRESS,
320
+ r as BOOST_REGISTRY_ADDRESSES,
321
+ g as BoostRegistry
261
322
  };
262
323
  //# sourceMappingURL=BoostRegistry.js.map