@latchprotocol/widgets 0.1.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.
- package/LICENSE +21 -0
- package/README.md +649 -0
- package/dist/adapters/binDistribution.d.ts +19 -0
- package/dist/adapters/binDistribution.d.ts.map +1 -0
- package/dist/adapters/protocol.d.ts +409 -0
- package/dist/adapters/protocol.d.ts.map +1 -0
- package/dist/adapters/sale.d.ts +142 -0
- package/dist/adapters/sale.d.ts.map +1 -0
- package/dist/adapters/viem.d.ts +89 -0
- package/dist/adapters/viem.d.ts.map +1 -0
- package/dist/callpath/constants.d.ts +218 -0
- package/dist/callpath/constants.d.ts.map +1 -0
- package/dist/callpath/launch.d.ts +1979 -0
- package/dist/callpath/launch.d.ts.map +1 -0
- package/dist/callpath/liquidity.d.ts +103 -0
- package/dist/callpath/liquidity.d.ts.map +1 -0
- package/dist/callpath/plan.d.ts +34 -0
- package/dist/callpath/plan.d.ts.map +1 -0
- package/dist/callpath/swap.d.ts +129 -0
- package/dist/callpath/swap.d.ts.map +1 -0
- package/dist/chunks/SwapWidget-DgyHAVc8.js +2404 -0
- package/dist/chunks/SwapWidget-DgyHAVc8.js.map +1 -0
- package/dist/chunks/scan-Dhu7f4Nl.js +2497 -0
- package/dist/chunks/scan-Dhu7f4Nl.js.map +1 -0
- package/dist/chunks/useLocker-D1c_NTk-.js +1613 -0
- package/dist/chunks/useLocker-D1c_NTk-.js.map +1 -0
- package/dist/components/LaunchWidget.d.ts +117 -0
- package/dist/components/LaunchWidget.d.ts.map +1 -0
- package/dist/components/LiquidityWidget.d.ts +33 -0
- package/dist/components/LiquidityWidget.d.ts.map +1 -0
- package/dist/components/LockerWidget.d.ts +51 -0
- package/dist/components/LockerWidget.d.ts.map +1 -0
- package/dist/components/LocksWidgets.d.ts +61 -0
- package/dist/components/LocksWidgets.d.ts.map +1 -0
- package/dist/components/SwapWidget.d.ts +165 -0
- package/dist/components/SwapWidget.d.ts.map +1 -0
- package/dist/components/TokenTrustPanel.d.ts +32 -0
- package/dist/components/TokenTrustPanel.d.ts.map +1 -0
- package/dist/components/lockCharts.d.ts +29 -0
- package/dist/components/lockCharts.d.ts.map +1 -0
- package/dist/components/portal.d.ts +10 -0
- package/dist/components/portal.d.ts.map +1 -0
- package/dist/components/primitives.d.ts +139 -0
- package/dist/components/primitives.d.ts.map +1 -0
- package/dist/components/swap/SwapSettings.d.ts +12 -0
- package/dist/components/swap/SwapSettings.d.ts.map +1 -0
- package/dist/components/swap/TokenSelect.d.ts +61 -0
- package/dist/components/swap/TokenSelect.d.ts.map +1 -0
- package/dist/components/swap/state.d.ts +208 -0
- package/dist/components/swap/state.d.ts.map +1 -0
- package/dist/config/chain.d.ts +163 -0
- package/dist/config/chain.d.ts.map +1 -0
- package/dist/config/integrator.d.ts +121 -0
- package/dist/config/integrator.d.ts.map +1 -0
- package/dist/context/WidgetProvider.d.ts +78 -0
- package/dist/context/WidgetProvider.d.ts.map +1 -0
- package/dist/core/clMath.d.ts +98 -0
- package/dist/core/clMath.d.ts.map +1 -0
- package/dist/core/errors.d.ts +18 -0
- package/dist/core/errors.d.ts.map +1 -0
- package/dist/core/format.d.ts +47 -0
- package/dist/core/format.d.ts.map +1 -0
- package/dist/core/liquidityGuards.d.ts +53 -0
- package/dist/core/liquidityGuards.d.ts.map +1 -0
- package/dist/core/liquidityRefresh.d.ts +35 -0
- package/dist/core/liquidityRefresh.d.ts.map +1 -0
- package/dist/core/math.d.ts +129 -0
- package/dist/core/math.d.ts.map +1 -0
- package/dist/core/pool.d.ts +33 -0
- package/dist/core/pool.d.ts.map +1 -0
- package/dist/core/tokenLists.d.ts +46 -0
- package/dist/core/tokenLists.d.ts.map +1 -0
- package/dist/embed/iframe.d.ts +185 -0
- package/dist/embed/iframe.d.ts.map +1 -0
- package/dist/embed/lockBadge.d.ts +55 -0
- package/dist/embed/lockBadge.d.ts.map +1 -0
- package/dist/embed/webComponent.d.ts +83 -0
- package/dist/embed/webComponent.d.ts.map +1 -0
- package/dist/embed.d.ts +25 -0
- package/dist/embed.d.ts.map +1 -0
- package/dist/embed.js +543 -0
- package/dist/embed.js.map +1 -0
- package/dist/headless.d.ts +60 -0
- package/dist/headless.d.ts.map +1 -0
- package/dist/headless.js +223 -0
- package/dist/headless.js.map +1 -0
- package/dist/hooks/useAsyncResource.d.ts +38 -0
- package/dist/hooks/useAsyncResource.d.ts.map +1 -0
- package/dist/hooks/useLaunch.d.ts +140 -0
- package/dist/hooks/useLaunch.d.ts.map +1 -0
- package/dist/hooks/useLiquidity.d.ts +91 -0
- package/dist/hooks/useLiquidity.d.ts.map +1 -0
- package/dist/hooks/useLocker.d.ts +77 -0
- package/dist/hooks/useLocker.d.ts.map +1 -0
- package/dist/hooks/useLocks.d.ts +33 -0
- package/dist/hooks/useLocks.d.ts.map +1 -0
- package/dist/hooks/useSwapExecute.d.ts +46 -0
- package/dist/hooks/useSwapExecute.d.ts.map +1 -0
- package/dist/hooks/useSwapQuote.d.ts +51 -0
- package/dist/hooks/useSwapQuote.d.ts.map +1 -0
- package/dist/hooks/useTokenLists.d.ts +26 -0
- package/dist/hooks/useTokenLists.d.ts.map +1 -0
- package/dist/hooks/useTokenTrust.d.ts +40 -0
- package/dist/hooks/useTokenTrust.d.ts.map +1 -0
- package/dist/hooks/useTokens.d.ts +15 -0
- package/dist/hooks/useTokens.d.ts.map +1 -0
- package/dist/index.d.ts +59 -0
- package/dist/index.d.ts.map +1 -0
- package/dist/index.js +1052 -0
- package/dist/index.js.map +1 -0
- package/dist/latch-embed.d.ts +19 -0
- package/dist/latch-embed.d.ts.map +1 -0
- package/dist/latch-embed.js +950 -0
- package/dist/latch-embed.js.map +1 -0
- package/dist/latch-embed.mjs +13162 -0
- package/dist/latch-embed.mjs.map +1 -0
- package/dist/locker/model.d.ts +73 -0
- package/dist/locker/model.d.ts.map +1 -0
- package/dist/locks/embedModel.d.ts +22 -0
- package/dist/locks/embedModel.d.ts.map +1 -0
- package/dist/locks/fetch.d.ts +60 -0
- package/dist/locks/fetch.d.ts.map +1 -0
- package/dist/locks/model.d.ts +143 -0
- package/dist/locks/model.d.ts.map +1 -0
- package/dist/locks/scan.d.ts +25 -0
- package/dist/locks/scan.d.ts.map +1 -0
- package/dist/styles/css.d.ts +32 -0
- package/dist/styles/css.d.ts.map +1 -0
- package/dist/styles.css +895 -0
- package/dist/trust/model.d.ts +48 -0
- package/dist/trust/model.d.ts.map +1 -0
- package/package.json +102 -0
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"latch-embed.js","sources":["../node_modules/abitype/dist/esm/version.js","../node_modules/abitype/dist/esm/errors.js","../node_modules/abitype/dist/esm/regex.js","../node_modules/abitype/dist/esm/human-readable/formatAbiParameter.js","../node_modules/abitype/dist/esm/human-readable/formatAbiParameters.js","../node_modules/abitype/dist/esm/human-readable/formatAbiItem.js","../node_modules/abitype/dist/esm/human-readable/runtime/signatures.js","../node_modules/abitype/dist/esm/human-readable/errors/abiItem.js","../node_modules/abitype/dist/esm/human-readable/errors/abiParameter.js","../node_modules/abitype/dist/esm/human-readable/errors/signature.js","../node_modules/abitype/dist/esm/human-readable/errors/struct.js","../node_modules/abitype/dist/esm/human-readable/errors/splitParameters.js","../node_modules/abitype/dist/esm/human-readable/runtime/cache.js","../node_modules/abitype/dist/esm/human-readable/runtime/utils.js","../node_modules/abitype/dist/esm/human-readable/runtime/structs.js","../node_modules/abitype/dist/esm/human-readable/parseAbi.js","../node_modules/abitype/dist/esm/human-readable/parseAbiItem.js","../node_modules/viem/_esm/utils/getAction.js","../node_modules/viem/_esm/utils/abi/formatAbiItem.js","../node_modules/viem/_esm/utils/data/isHex.js","../node_modules/viem/_esm/utils/data/size.js","../node_modules/viem/_esm/errors/version.js","../node_modules/viem/_esm/errors/base.js","../node_modules/viem/_esm/errors/abi.js","../node_modules/viem/_esm/errors/log.js","../node_modules/viem/_esm/errors/data.js","../node_modules/viem/_esm/utils/data/pad.js","../node_modules/viem/_esm/errors/encoding.js","../node_modules/viem/_esm/utils/data/trim.js","../node_modules/viem/_esm/utils/encoding/fromHex.js","../node_modules/viem/_esm/utils/encoding/toHex.js","../node_modules/viem/_esm/utils/encoding/toBytes.js","../node_modules/@noble/hashes/esm/_u64.js","../node_modules/@noble/hashes/esm/utils.js","../node_modules/@noble/hashes/esm/sha3.js","../node_modules/viem/_esm/utils/hash/keccak256.js","../node_modules/viem/_esm/utils/hash/hashSignature.js","../node_modules/viem/_esm/utils/hash/normalizeSignature.js","../node_modules/viem/_esm/utils/hash/toSignature.js","../node_modules/viem/_esm/utils/hash/toSignatureHash.js","../node_modules/viem/_esm/utils/hash/toEventSelector.js","../node_modules/viem/_esm/errors/address.js","../node_modules/viem/_esm/utils/lru.js","../node_modules/viem/_esm/utils/address/getAddress.js","../node_modules/viem/_esm/utils/address/isAddress.js","../node_modules/viem/_esm/utils/data/concat.js","../node_modules/viem/_esm/utils/data/slice.js","../node_modules/viem/_esm/utils/regex.js","../node_modules/viem/_esm/utils/abi/encodeAbiParameters.js","../node_modules/viem/_esm/utils/hash/toFunctionSelector.js","../node_modules/viem/_esm/utils/abi/getAbiItem.js","../node_modules/viem/_esm/utils/abi/encodeEventTopics.js","../node_modules/viem/_esm/accounts/utils/parseAccount.js","../node_modules/viem/_esm/utils/abi/prepareEncodeFunctionData.js","../node_modules/viem/_esm/utils/abi/encodeFunctionData.js","../node_modules/viem/_esm/constants/solidity.js","../node_modules/viem/_esm/errors/cursor.js","../node_modules/viem/_esm/utils/cursor.js","../node_modules/viem/_esm/utils/encoding/fromBytes.js","../node_modules/viem/_esm/utils/abi/decodeAbiParameters.js","../node_modules/viem/_esm/utils/abi/decodeErrorResult.js","../node_modules/viem/_esm/utils/stringify.js","../node_modules/viem/_esm/utils/abi/formatAbiItemWithArgs.js","../node_modules/viem/_esm/utils/unit/Value.js","../node_modules/viem/_esm/utils/unit/formatEther.js","../node_modules/viem/_esm/utils/unit/formatGwei.js","../node_modules/viem/_esm/errors/stateOverride.js","../node_modules/viem/_esm/errors/transaction.js","../node_modules/viem/_esm/errors/utils.js","../node_modules/viem/_esm/errors/contract.js","../node_modules/viem/_esm/errors/request.js","../node_modules/viem/_esm/errors/rpc.js","../node_modules/viem/_esm/utils/errors/getContractError.js","../node_modules/viem/_esm/errors/node.js","../node_modules/viem/_esm/utils/errors/getNodeError.js","../node_modules/viem/_esm/utils/formatters/extract.js","../node_modules/viem/_esm/utils/formatters/transactionRequest.js","../node_modules/viem/_esm/utils/stateOverride.js","../node_modules/viem/_esm/constants/number.js","../node_modules/viem/_esm/utils/transaction/assertRequest.js","../node_modules/viem/_esm/errors/block.js","../node_modules/viem/_esm/utils/formatters/transaction.js","../node_modules/viem/_esm/utils/formatters/block.js","../node_modules/viem/_esm/actions/public/getBlock.js","../node_modules/viem/_esm/utils/block/formatBlockParameter.js","../node_modules/viem/_esm/utils/address/isAddressEqual.js","../node_modules/viem/_esm/utils/formatters/log.js","../node_modules/viem/_esm/utils/abi/decodeEventLog.js","../node_modules/viem/_esm/utils/abi/parseEventLogs.js","../node_modules/viem/_esm/actions/public/getLogs.js","../node_modules/viem/_esm/utils/abi/decodeFunctionResult.js","../node_modules/ox/_esm/core/version.js","../node_modules/ox/_esm/core/internal/errors.js","../node_modules/ox/_esm/core/Errors.js","../node_modules/ox/_esm/core/internal/hex.js","../node_modules/ox/_esm/core/Hex.js","../node_modules/ox/_esm/core/Withdrawal.js","../node_modules/ox/_esm/core/BlockOverrides.js","../node_modules/viem/_esm/constants/abis.js","../node_modules/viem/_esm/constants/contract.js","../node_modules/viem/_esm/constants/contracts.js","../node_modules/viem/_esm/errors/chain.js","../node_modules/viem/_esm/utils/abi/encodeDeployData.js","../node_modules/viem/_esm/utils/chain/getChainContractAddress.js","../node_modules/viem/_esm/utils/errors/getCallError.js","../node_modules/viem/_esm/utils/promise/withResolvers.js","../node_modules/viem/_esm/utils/promise/createBatchScheduler.js","../node_modules/viem/_esm/actions/public/call.js","../node_modules/viem/_esm/actions/public/readContract.js","../node_modules/viem/_esm/utils/wait.js","../node_modules/viem/_esm/utils/promise/withCache.js","../node_modules/viem/_esm/actions/public/getBlockNumber.js","../node_modules/viem/_esm/utils/promise/withRetry.js","../node_modules/viem/_esm/utils/uid.js","../node_modules/viem/_esm/clients/createClient.js","../node_modules/viem/_esm/utils/abi/decodeFunctionData.js","../node_modules/viem/_esm/utils/abi/encodeErrorResult.js","../node_modules/viem/_esm/utils/abi/encodeFunctionResult.js","../node_modules/viem/_esm/utils/ens/localBatchGatewayRequest.js","../node_modules/viem/_esm/utils/promise/withDedupe.js","../node_modules/viem/_esm/utils/buildRequest.js","../node_modules/viem/_esm/errors/ccip.js","../node_modules/viem/_esm/utils/ccip.js","../node_modules/viem/_esm/utils/promise/withTimeout.js","../node_modules/viem/_esm/utils/rpc/id.js","../node_modules/viem/_esm/utils/rpc/http.js","../node_modules/viem/_esm/constants/address.js","../node_modules/viem/_esm/clients/transports/createTransport.js","../node_modules/viem/_esm/clients/transports/fallback.js","../node_modules/viem/_esm/errors/transport.js","../node_modules/viem/_esm/clients/transports/http.js","../../sdk/dist/deployments/safe.js","../../sdk/dist/deployments/index.js","../../sdk/dist/launchpad/generated/abi.js","../../sdk/dist/utilities/feeGate.js","../../sdk/dist/launchpad/tickMath.js","../../sdk/dist/lock/clAmounts.js","../../sdk/dist/trading/generated/abi.js","../../sdk/dist/lock/lpLockers.js","../../sdk/dist/lock/position.js","../../sdk/dist/lock/token.js","../../sdk/dist/chains/endpoints.js","../../sdk/dist/chains/cooldown.js","../../sdk/dist/chains/transport.js","../src/core/format.ts","../src/locks/fetch.ts","../src/locks/model.ts","../src/locks/embedModel.ts","../src/locks/scan.ts","../src/styles/css.ts","../src/embed/lockBadge.ts","../src/latch-embed.ts"],"sourcesContent":["export const version = '1.2.3';\n//# sourceMappingURL=version.js.map","import { version } from './version.js';\nexport class BaseError extends Error {\n constructor(shortMessage, args = {}) {\n const details = args.cause instanceof BaseError\n ? args.cause.details\n : args.cause?.message\n ? args.cause.message\n : args.details;\n const docsPath = args.cause instanceof BaseError\n ? args.cause.docsPath || args.docsPath\n : args.docsPath;\n const message = [\n shortMessage || 'An error occurred.',\n '',\n ...(args.metaMessages ? [...args.metaMessages, ''] : []),\n ...(docsPath ? [`Docs: https://abitype.dev${docsPath}`] : []),\n ...(details ? [`Details: ${details}`] : []),\n `Version: abitype@${version}`,\n ].join('\\n');\n super(message);\n Object.defineProperty(this, \"details\", {\n enumerable: true,\n configurable: true,\n writable: true,\n value: void 0\n });\n Object.defineProperty(this, \"docsPath\", {\n enumerable: true,\n configurable: true,\n writable: true,\n value: void 0\n });\n Object.defineProperty(this, \"metaMessages\", {\n enumerable: true,\n configurable: true,\n writable: true,\n value: void 0\n });\n Object.defineProperty(this, \"shortMessage\", {\n enumerable: true,\n configurable: true,\n writable: true,\n value: void 0\n });\n Object.defineProperty(this, \"name\", {\n enumerable: true,\n configurable: true,\n writable: true,\n value: 'AbiTypeError'\n });\n if (args.cause)\n this.cause = args.cause;\n this.details = details;\n this.docsPath = docsPath;\n this.metaMessages = args.metaMessages;\n this.shortMessage = shortMessage;\n }\n}\n//# sourceMappingURL=errors.js.map","// TODO: This looks cool. Need to check the performance of `new RegExp` versus defined inline though.\n// https://twitter.com/GabrielVergnaud/status/1622906834343366657\nexport function execTyped(regex, string) {\n const match = regex.exec(string);\n return match?.groups;\n}\n// `bytes<M>`: binary type of `M` bytes, `0 < M <= 32`\n// https://regexr.com/6va55\nexport const bytesRegex = /^bytes([1-9]|1[0-9]|2[0-9]|3[0-2])?$/;\n// `(u)int<M>`: (un)signed integer type of `M` bits, `0 < M <= 256`, `M % 8 == 0`\n// https://regexr.com/6v8hp\nexport const integerRegex = /^u?int(8|16|24|32|40|48|56|64|72|80|88|96|104|112|120|128|136|144|152|160|168|176|184|192|200|208|216|224|232|240|248|256)?$/;\nexport const isTupleRegex = /^\\(.+?\\).*?$/;\n//# sourceMappingURL=regex.js.map","import { execTyped } from '../regex.js';\n// https://regexr.com/7f7rv\nconst tupleRegex = /^tuple(?<array>(\\[(\\d*)\\])*)$/;\n/**\n * Formats {@link AbiParameter} to human-readable ABI parameter.\n *\n * @param abiParameter - ABI parameter\n * @returns Human-readable ABI parameter\n *\n * @example\n * const result = formatAbiParameter({ type: 'address', name: 'from' })\n * // ^? const result: 'address from'\n */\nexport function formatAbiParameter(abiParameter) {\n let type = abiParameter.type;\n if (tupleRegex.test(abiParameter.type) && 'components' in abiParameter) {\n type = '(';\n const length = abiParameter.components.length;\n for (let i = 0; i < length; i++) {\n const component = abiParameter.components[i];\n type += formatAbiParameter(component);\n if (i < length - 1)\n type += ', ';\n }\n const result = execTyped(tupleRegex, abiParameter.type);\n type += `)${result?.array || ''}`;\n return formatAbiParameter({\n ...abiParameter,\n type,\n });\n }\n // Add `indexed` to type if in `abiParameter`\n if ('indexed' in abiParameter && abiParameter.indexed)\n type = `${type} indexed`;\n // Return human-readable ABI parameter\n if (abiParameter.name)\n return `${type} ${abiParameter.name}`;\n return type;\n}\n//# sourceMappingURL=formatAbiParameter.js.map","import { formatAbiParameter, } from './formatAbiParameter.js';\n/**\n * Formats {@link AbiParameter}s to human-readable ABI parameters.\n *\n * @param abiParameters - ABI parameters\n * @returns Human-readable ABI parameters\n *\n * @example\n * const result = formatAbiParameters([\n * // ^? const result: 'address from, uint256 tokenId'\n * { type: 'address', name: 'from' },\n * { type: 'uint256', name: 'tokenId' },\n * ])\n */\nexport function formatAbiParameters(abiParameters) {\n let params = '';\n const length = abiParameters.length;\n for (let i = 0; i < length; i++) {\n const abiParameter = abiParameters[i];\n params += formatAbiParameter(abiParameter);\n if (i !== length - 1)\n params += ', ';\n }\n return params;\n}\n//# sourceMappingURL=formatAbiParameters.js.map","import { formatAbiParameters, } from './formatAbiParameters.js';\n/**\n * Formats ABI item (e.g. error, event, function) into human-readable ABI item\n *\n * @param abiItem - ABI item\n * @returns Human-readable ABI item\n */\nexport function formatAbiItem(abiItem) {\n if (abiItem.type === 'function')\n return `function ${abiItem.name}(${formatAbiParameters(abiItem.inputs)})${abiItem.stateMutability && abiItem.stateMutability !== 'nonpayable'\n ? ` ${abiItem.stateMutability}`\n : ''}${abiItem.outputs?.length\n ? ` returns (${formatAbiParameters(abiItem.outputs)})`\n : ''}`;\n if (abiItem.type === 'event')\n return `event ${abiItem.name}(${formatAbiParameters(abiItem.inputs)})`;\n if (abiItem.type === 'error')\n return `error ${abiItem.name}(${formatAbiParameters(abiItem.inputs)})`;\n if (abiItem.type === 'constructor')\n return `constructor(${formatAbiParameters(abiItem.inputs)})${abiItem.stateMutability === 'payable' ? ' payable' : ''}`;\n if (abiItem.type === 'fallback')\n return `fallback() external${abiItem.stateMutability === 'payable' ? ' payable' : ''}`;\n return 'receive() external payable';\n}\n//# sourceMappingURL=formatAbiItem.js.map","import { execTyped } from '../../regex.js';\n// https://regexr.com/7gmok\nconst errorSignatureRegex = /^error (?<name>[a-zA-Z$_][a-zA-Z0-9$_]*)\\((?<parameters>.*?)\\)$/;\nexport function isErrorSignature(signature) {\n return errorSignatureRegex.test(signature);\n}\nexport function execErrorSignature(signature) {\n return execTyped(errorSignatureRegex, signature);\n}\n// https://regexr.com/7gmoq\nconst eventSignatureRegex = /^event (?<name>[a-zA-Z$_][a-zA-Z0-9$_]*)\\((?<parameters>.*?)\\)$/;\nexport function isEventSignature(signature) {\n return eventSignatureRegex.test(signature);\n}\nexport function execEventSignature(signature) {\n return execTyped(eventSignatureRegex, signature);\n}\n// https://regexr.com/7gmot\nconst functionSignatureRegex = /^function (?<name>[a-zA-Z$_][a-zA-Z0-9$_]*)\\((?<parameters>.*?)\\)(?: (?<scope>external|public{1}))?(?: (?<stateMutability>pure|view|nonpayable|payable{1}))?(?: returns\\s?\\((?<returns>.*?)\\))?$/;\nexport function isFunctionSignature(signature) {\n return functionSignatureRegex.test(signature);\n}\nexport function execFunctionSignature(signature) {\n return execTyped(functionSignatureRegex, signature);\n}\n// https://regexr.com/7gmp3\nconst structSignatureRegex = /^struct (?<name>[a-zA-Z$_][a-zA-Z0-9$_]*) \\{(?<properties>.*?)\\}$/;\nexport function isStructSignature(signature) {\n return structSignatureRegex.test(signature);\n}\nexport function execStructSignature(signature) {\n return execTyped(structSignatureRegex, signature);\n}\n// https://regexr.com/78u01\nconst constructorSignatureRegex = /^constructor\\((?<parameters>.*?)\\)(?:\\s(?<stateMutability>payable{1}))?$/;\nexport function isConstructorSignature(signature) {\n return constructorSignatureRegex.test(signature);\n}\nexport function execConstructorSignature(signature) {\n return execTyped(constructorSignatureRegex, signature);\n}\n// https://regexr.com/7srtn\nconst fallbackSignatureRegex = /^fallback\\(\\) external(?:\\s(?<stateMutability>payable{1}))?$/;\nexport function isFallbackSignature(signature) {\n return fallbackSignatureRegex.test(signature);\n}\nexport function execFallbackSignature(signature) {\n return execTyped(fallbackSignatureRegex, signature);\n}\n// https://regexr.com/78u1k\nconst receiveSignatureRegex = /^receive\\(\\) external payable$/;\nexport function isReceiveSignature(signature) {\n return receiveSignatureRegex.test(signature);\n}\nexport const modifiers = new Set([\n 'memory',\n 'indexed',\n 'storage',\n 'calldata',\n]);\nexport const eventModifiers = new Set(['indexed']);\nexport const functionModifiers = new Set([\n 'calldata',\n 'memory',\n 'storage',\n]);\n//# sourceMappingURL=signatures.js.map","import { BaseError } from '../../errors.js';\nexport class InvalidAbiItemError extends BaseError {\n constructor({ signature }) {\n super('Failed to parse ABI item.', {\n details: `parseAbiItem(${JSON.stringify(signature, null, 2)})`,\n docsPath: '/api/human#parseabiitem-1',\n });\n Object.defineProperty(this, \"name\", {\n enumerable: true,\n configurable: true,\n writable: true,\n value: 'InvalidAbiItemError'\n });\n }\n}\nexport class UnknownTypeError extends BaseError {\n constructor({ type }) {\n super('Unknown type.', {\n metaMessages: [\n `Type \"${type}\" is not a valid ABI type. Perhaps you forgot to include a struct signature?`,\n ],\n });\n Object.defineProperty(this, \"name\", {\n enumerable: true,\n configurable: true,\n writable: true,\n value: 'UnknownTypeError'\n });\n }\n}\nexport class UnknownSolidityTypeError extends BaseError {\n constructor({ type }) {\n super('Unknown type.', {\n metaMessages: [`Type \"${type}\" is not a valid ABI type.`],\n });\n Object.defineProperty(this, \"name\", {\n enumerable: true,\n configurable: true,\n writable: true,\n value: 'UnknownSolidityTypeError'\n });\n }\n}\n//# sourceMappingURL=abiItem.js.map","import { BaseError } from '../../errors.js';\nexport class InvalidAbiParameterError extends BaseError {\n constructor({ param }) {\n super('Failed to parse ABI parameter.', {\n details: `parseAbiParameter(${JSON.stringify(param, null, 2)})`,\n docsPath: '/api/human#parseabiparameter-1',\n });\n Object.defineProperty(this, \"name\", {\n enumerable: true,\n configurable: true,\n writable: true,\n value: 'InvalidAbiParameterError'\n });\n }\n}\nexport class InvalidAbiParametersError extends BaseError {\n constructor({ params }) {\n super('Failed to parse ABI parameters.', {\n details: `parseAbiParameters(${JSON.stringify(params, null, 2)})`,\n docsPath: '/api/human#parseabiparameters-1',\n });\n Object.defineProperty(this, \"name\", {\n enumerable: true,\n configurable: true,\n writable: true,\n value: 'InvalidAbiParametersError'\n });\n }\n}\nexport class InvalidParameterError extends BaseError {\n constructor({ param }) {\n super('Invalid ABI parameter.', {\n details: param,\n });\n Object.defineProperty(this, \"name\", {\n enumerable: true,\n configurable: true,\n writable: true,\n value: 'InvalidParameterError'\n });\n }\n}\nexport class SolidityProtectedKeywordError extends BaseError {\n constructor({ param, name }) {\n super('Invalid ABI parameter.', {\n details: param,\n metaMessages: [\n `\"${name}\" is a protected Solidity keyword. More info: https://docs.soliditylang.org/en/latest/cheatsheet.html`,\n ],\n });\n Object.defineProperty(this, \"name\", {\n enumerable: true,\n configurable: true,\n writable: true,\n value: 'SolidityProtectedKeywordError'\n });\n }\n}\nexport class InvalidModifierError extends BaseError {\n constructor({ param, type, modifier, }) {\n super('Invalid ABI parameter.', {\n details: param,\n metaMessages: [\n `Modifier \"${modifier}\" not allowed${type ? ` in \"${type}\" type` : ''}.`,\n ],\n });\n Object.defineProperty(this, \"name\", {\n enumerable: true,\n configurable: true,\n writable: true,\n value: 'InvalidModifierError'\n });\n }\n}\nexport class InvalidFunctionModifierError extends BaseError {\n constructor({ param, type, modifier, }) {\n super('Invalid ABI parameter.', {\n details: param,\n metaMessages: [\n `Modifier \"${modifier}\" not allowed${type ? ` in \"${type}\" type` : ''}.`,\n `Data location can only be specified for array, struct, or mapping types, but \"${modifier}\" was given.`,\n ],\n });\n Object.defineProperty(this, \"name\", {\n enumerable: true,\n configurable: true,\n writable: true,\n value: 'InvalidFunctionModifierError'\n });\n }\n}\nexport class InvalidAbiTypeParameterError extends BaseError {\n constructor({ abiParameter, }) {\n super('Invalid ABI parameter.', {\n details: JSON.stringify(abiParameter, null, 2),\n metaMessages: ['ABI parameter type is invalid.'],\n });\n Object.defineProperty(this, \"name\", {\n enumerable: true,\n configurable: true,\n writable: true,\n value: 'InvalidAbiTypeParameterError'\n });\n }\n}\n//# sourceMappingURL=abiParameter.js.map","import { BaseError } from '../../errors.js';\nexport class InvalidSignatureError extends BaseError {\n constructor({ signature, type, }) {\n super(`Invalid ${type} signature.`, {\n details: signature,\n });\n Object.defineProperty(this, \"name\", {\n enumerable: true,\n configurable: true,\n writable: true,\n value: 'InvalidSignatureError'\n });\n }\n}\nexport class UnknownSignatureError extends BaseError {\n constructor({ signature }) {\n super('Unknown signature.', {\n details: signature,\n });\n Object.defineProperty(this, \"name\", {\n enumerable: true,\n configurable: true,\n writable: true,\n value: 'UnknownSignatureError'\n });\n }\n}\nexport class InvalidStructSignatureError extends BaseError {\n constructor({ signature }) {\n super('Invalid struct signature.', {\n details: signature,\n metaMessages: ['No properties exist.'],\n });\n Object.defineProperty(this, \"name\", {\n enumerable: true,\n configurable: true,\n writable: true,\n value: 'InvalidStructSignatureError'\n });\n }\n}\n//# sourceMappingURL=signature.js.map","import { BaseError } from '../../errors.js';\nexport class CircularReferenceError extends BaseError {\n constructor({ type }) {\n super('Circular reference detected.', {\n metaMessages: [`Struct \"${type}\" is a circular reference.`],\n });\n Object.defineProperty(this, \"name\", {\n enumerable: true,\n configurable: true,\n writable: true,\n value: 'CircularReferenceError'\n });\n }\n}\n//# sourceMappingURL=struct.js.map","import { BaseError } from '../../errors.js';\nexport class InvalidParenthesisError extends BaseError {\n constructor({ current, depth }) {\n super('Unbalanced parentheses.', {\n metaMessages: [\n `\"${current.trim()}\" has too many ${depth > 0 ? 'opening' : 'closing'} parentheses.`,\n ],\n details: `Depth \"${depth}\"`,\n });\n Object.defineProperty(this, \"name\", {\n enumerable: true,\n configurable: true,\n writable: true,\n value: 'InvalidParenthesisError'\n });\n }\n}\n//# sourceMappingURL=splitParameters.js.map","/**\n * Gets {@link parameterCache} cache key namespaced by {@link type} and {@link structs}. This prevents parameters from being accessible to types that don't allow them (e.g. `string indexed foo` not allowed outside of `type: 'event'`) and ensures different struct definitions with the same name are cached separately.\n * @param param ABI parameter string\n * @param type ABI parameter type\n * @param structs Struct definitions to include in cache key\n * @returns Cache key for {@link parameterCache}\n */\nexport function getParameterCacheKey(param, type, structs) {\n let structKey = '';\n if (structs)\n for (const struct of Object.entries(structs)) {\n if (!struct)\n continue;\n let propertyKey = '';\n for (const property of struct[1]) {\n propertyKey += `[${property.type}${property.name ? `:${property.name}` : ''}]`;\n }\n structKey += `(${struct[0]}{${propertyKey}})`;\n }\n if (type)\n return `${type}:${param}${structKey}`;\n return `${param}${structKey}`;\n}\n/**\n * Basic cache seeded with common ABI parameter strings.\n *\n * **Note: When seeding more parameters, make sure you benchmark performance. The current number is the ideal balance between performance and having an already existing cache.**\n */\nexport const parameterCache = new Map([\n // Unnamed\n ['address', { type: 'address' }],\n ['bool', { type: 'bool' }],\n ['bytes', { type: 'bytes' }],\n ['bytes32', { type: 'bytes32' }],\n ['int', { type: 'int256' }],\n ['int256', { type: 'int256' }],\n ['string', { type: 'string' }],\n ['uint', { type: 'uint256' }],\n ['uint8', { type: 'uint8' }],\n ['uint16', { type: 'uint16' }],\n ['uint24', { type: 'uint24' }],\n ['uint32', { type: 'uint32' }],\n ['uint64', { type: 'uint64' }],\n ['uint96', { type: 'uint96' }],\n ['uint112', { type: 'uint112' }],\n ['uint160', { type: 'uint160' }],\n ['uint192', { type: 'uint192' }],\n ['uint256', { type: 'uint256' }],\n // Named\n ['address owner', { type: 'address', name: 'owner' }],\n ['address to', { type: 'address', name: 'to' }],\n ['bool approved', { type: 'bool', name: 'approved' }],\n ['bytes _data', { type: 'bytes', name: '_data' }],\n ['bytes data', { type: 'bytes', name: 'data' }],\n ['bytes signature', { type: 'bytes', name: 'signature' }],\n ['bytes32 hash', { type: 'bytes32', name: 'hash' }],\n ['bytes32 r', { type: 'bytes32', name: 'r' }],\n ['bytes32 root', { type: 'bytes32', name: 'root' }],\n ['bytes32 s', { type: 'bytes32', name: 's' }],\n ['string name', { type: 'string', name: 'name' }],\n ['string symbol', { type: 'string', name: 'symbol' }],\n ['string tokenURI', { type: 'string', name: 'tokenURI' }],\n ['uint tokenId', { type: 'uint256', name: 'tokenId' }],\n ['uint8 v', { type: 'uint8', name: 'v' }],\n ['uint256 balance', { type: 'uint256', name: 'balance' }],\n ['uint256 tokenId', { type: 'uint256', name: 'tokenId' }],\n ['uint256 value', { type: 'uint256', name: 'value' }],\n // Indexed\n [\n 'event:address indexed from',\n { type: 'address', name: 'from', indexed: true },\n ],\n ['event:address indexed to', { type: 'address', name: 'to', indexed: true }],\n [\n 'event:uint indexed tokenId',\n { type: 'uint256', name: 'tokenId', indexed: true },\n ],\n [\n 'event:uint256 indexed tokenId',\n { type: 'uint256', name: 'tokenId', indexed: true },\n ],\n]);\n//# sourceMappingURL=cache.js.map","import { bytesRegex, execTyped, integerRegex, isTupleRegex, } from '../../regex.js';\nimport { UnknownSolidityTypeError } from '../errors/abiItem.js';\nimport { InvalidFunctionModifierError, InvalidModifierError, InvalidParameterError, SolidityProtectedKeywordError, } from '../errors/abiParameter.js';\nimport { InvalidSignatureError, UnknownSignatureError, } from '../errors/signature.js';\nimport { InvalidParenthesisError } from '../errors/splitParameters.js';\nimport { getParameterCacheKey, parameterCache } from './cache.js';\nimport { eventModifiers, execConstructorSignature, execErrorSignature, execEventSignature, execFallbackSignature, execFunctionSignature, functionModifiers, isConstructorSignature, isErrorSignature, isEventSignature, isFallbackSignature, isFunctionSignature, isReceiveSignature, } from './signatures.js';\nexport function parseSignature(signature, structs = {}) {\n if (isFunctionSignature(signature))\n return parseFunctionSignature(signature, structs);\n if (isEventSignature(signature))\n return parseEventSignature(signature, structs);\n if (isErrorSignature(signature))\n return parseErrorSignature(signature, structs);\n if (isConstructorSignature(signature))\n return parseConstructorSignature(signature, structs);\n if (isFallbackSignature(signature))\n return parseFallbackSignature(signature);\n if (isReceiveSignature(signature))\n return {\n type: 'receive',\n stateMutability: 'payable',\n };\n throw new UnknownSignatureError({ signature });\n}\nexport function parseFunctionSignature(signature, structs = {}) {\n const match = execFunctionSignature(signature);\n if (!match)\n throw new InvalidSignatureError({ signature, type: 'function' });\n const inputParams = splitParameters(match.parameters);\n const inputs = [];\n const inputLength = inputParams.length;\n for (let i = 0; i < inputLength; i++) {\n inputs.push(parseAbiParameter(inputParams[i], {\n modifiers: functionModifiers,\n structs,\n type: 'function',\n }));\n }\n const outputs = [];\n if (match.returns) {\n const outputParams = splitParameters(match.returns);\n const outputLength = outputParams.length;\n for (let i = 0; i < outputLength; i++) {\n outputs.push(parseAbiParameter(outputParams[i], {\n modifiers: functionModifiers,\n structs,\n type: 'function',\n }));\n }\n }\n return {\n name: match.name,\n type: 'function',\n stateMutability: match.stateMutability ?? 'nonpayable',\n inputs,\n outputs,\n };\n}\nexport function parseEventSignature(signature, structs = {}) {\n const match = execEventSignature(signature);\n if (!match)\n throw new InvalidSignatureError({ signature, type: 'event' });\n const params = splitParameters(match.parameters);\n const abiParameters = [];\n const length = params.length;\n for (let i = 0; i < length; i++)\n abiParameters.push(parseAbiParameter(params[i], {\n modifiers: eventModifiers,\n structs,\n type: 'event',\n }));\n return { name: match.name, type: 'event', inputs: abiParameters };\n}\nexport function parseErrorSignature(signature, structs = {}) {\n const match = execErrorSignature(signature);\n if (!match)\n throw new InvalidSignatureError({ signature, type: 'error' });\n const params = splitParameters(match.parameters);\n const abiParameters = [];\n const length = params.length;\n for (let i = 0; i < length; i++)\n abiParameters.push(parseAbiParameter(params[i], { structs, type: 'error' }));\n return { name: match.name, type: 'error', inputs: abiParameters };\n}\nexport function parseConstructorSignature(signature, structs = {}) {\n const match = execConstructorSignature(signature);\n if (!match)\n throw new InvalidSignatureError({ signature, type: 'constructor' });\n const params = splitParameters(match.parameters);\n const abiParameters = [];\n const length = params.length;\n for (let i = 0; i < length; i++)\n abiParameters.push(parseAbiParameter(params[i], { structs, type: 'constructor' }));\n return {\n type: 'constructor',\n stateMutability: match.stateMutability ?? 'nonpayable',\n inputs: abiParameters,\n };\n}\nexport function parseFallbackSignature(signature) {\n const match = execFallbackSignature(signature);\n if (!match)\n throw new InvalidSignatureError({ signature, type: 'fallback' });\n return {\n type: 'fallback',\n stateMutability: match.stateMutability ?? 'nonpayable',\n };\n}\nconst abiParameterWithoutTupleRegex = /^(?<type>[a-zA-Z$_][a-zA-Z0-9$_]*(?:\\spayable)?)(?<array>(?:\\[\\d*?\\])+?)?(?:\\s(?<modifier>calldata|indexed|memory|storage{1}))?(?:\\s(?<name>[a-zA-Z$_][a-zA-Z0-9$_]*))?$/;\nconst abiParameterWithTupleRegex = /^\\((?<type>.+?)\\)(?<array>(?:\\[\\d*?\\])+?)?(?:\\s(?<modifier>calldata|indexed|memory|storage{1}))?(?:\\s(?<name>[a-zA-Z$_][a-zA-Z0-9$_]*))?$/;\nconst dynamicIntegerRegex = /^u?int$/;\nexport function parseAbiParameter(param, options) {\n // optional namespace cache by `type`\n const parameterCacheKey = getParameterCacheKey(param, options?.type, options?.structs);\n if (parameterCache.has(parameterCacheKey))\n return parameterCache.get(parameterCacheKey);\n const isTuple = isTupleRegex.test(param);\n const match = execTyped(isTuple ? abiParameterWithTupleRegex : abiParameterWithoutTupleRegex, param);\n if (!match)\n throw new InvalidParameterError({ param });\n if (match.name && isSolidityKeyword(match.name))\n throw new SolidityProtectedKeywordError({ param, name: match.name });\n const name = match.name ? { name: match.name } : {};\n const indexed = match.modifier === 'indexed' ? { indexed: true } : {};\n const structs = options?.structs ?? {};\n let type;\n let components = {};\n if (isTuple) {\n type = 'tuple';\n const params = splitParameters(match.type);\n const components_ = [];\n const length = params.length;\n for (let i = 0; i < length; i++) {\n // remove `modifiers` from `options` to prevent from being added to tuple components\n components_.push(parseAbiParameter(params[i], { structs }));\n }\n components = { components: components_ };\n }\n else if (match.type in structs) {\n type = 'tuple';\n components = { components: structs[match.type] };\n }\n else if (dynamicIntegerRegex.test(match.type)) {\n type = `${match.type}256`;\n }\n else if (match.type === 'address payable') {\n type = 'address';\n }\n else {\n type = match.type;\n if (!(options?.type === 'struct') && !isSolidityType(type))\n throw new UnknownSolidityTypeError({ type });\n }\n if (match.modifier) {\n // Check if modifier exists, but is not allowed (e.g. `indexed` in `functionModifiers`)\n if (!options?.modifiers?.has?.(match.modifier))\n throw new InvalidModifierError({\n param,\n type: options?.type,\n modifier: match.modifier,\n });\n // Check if resolved `type` is valid if there is a function modifier\n if (functionModifiers.has(match.modifier) &&\n !isValidDataLocation(type, !!match.array))\n throw new InvalidFunctionModifierError({\n param,\n type: options?.type,\n modifier: match.modifier,\n });\n }\n const abiParameter = {\n type: `${type}${match.array ?? ''}`,\n ...name,\n ...indexed,\n ...components,\n };\n parameterCache.set(parameterCacheKey, abiParameter);\n return abiParameter;\n}\n// s/o latika for this\nexport function splitParameters(params, result = [], current = '', depth = 0) {\n const length = params.trim().length;\n // biome-ignore lint/correctness/noUnreachable: recursive\n for (let i = 0; i < length; i++) {\n const char = params[i];\n const tail = params.slice(i + 1);\n switch (char) {\n case ',':\n return depth === 0\n ? splitParameters(tail, [...result, current.trim()])\n : splitParameters(tail, result, `${current}${char}`, depth);\n case '(':\n return splitParameters(tail, result, `${current}${char}`, depth + 1);\n case ')':\n return splitParameters(tail, result, `${current}${char}`, depth - 1);\n default:\n return splitParameters(tail, result, `${current}${char}`, depth);\n }\n }\n if (current === '')\n return result;\n if (depth !== 0)\n throw new InvalidParenthesisError({ current, depth });\n result.push(current.trim());\n return result;\n}\nexport function isSolidityType(type) {\n return (type === 'address' ||\n type === 'bool' ||\n type === 'function' ||\n type === 'string' ||\n bytesRegex.test(type) ||\n integerRegex.test(type));\n}\nconst protectedKeywordsRegex = /^(?:after|alias|anonymous|apply|auto|byte|calldata|case|catch|constant|copyof|default|defined|error|event|external|false|final|function|immutable|implements|in|indexed|inline|internal|let|mapping|match|memory|mutable|null|of|override|partial|private|promise|public|pure|reference|relocatable|return|returns|sizeof|static|storage|struct|super|supports|switch|this|true|try|typedef|typeof|var|view|virtual)$/;\n/** @internal */\nexport function isSolidityKeyword(name) {\n return (name === 'address' ||\n name === 'bool' ||\n name === 'function' ||\n name === 'string' ||\n name === 'tuple' ||\n bytesRegex.test(name) ||\n integerRegex.test(name) ||\n protectedKeywordsRegex.test(name));\n}\n/** @internal */\nexport function isValidDataLocation(type, isArray) {\n return isArray || type === 'bytes' || type === 'string' || type === 'tuple';\n}\n//# sourceMappingURL=utils.js.map","import { execTyped, isTupleRegex } from '../../regex.js';\nimport { UnknownTypeError } from '../errors/abiItem.js';\nimport { InvalidAbiTypeParameterError } from '../errors/abiParameter.js';\nimport { InvalidSignatureError, InvalidStructSignatureError, } from '../errors/signature.js';\nimport { CircularReferenceError } from '../errors/struct.js';\nimport { execStructSignature, isStructSignature } from './signatures.js';\nimport { isSolidityType, parseAbiParameter } from './utils.js';\nexport function parseStructs(signatures) {\n // Create \"shallow\" version of each struct (and filter out non-structs or invalid structs)\n const shallowStructs = {};\n const signaturesLength = signatures.length;\n for (let i = 0; i < signaturesLength; i++) {\n const signature = signatures[i];\n if (!isStructSignature(signature))\n continue;\n const match = execStructSignature(signature);\n if (!match)\n throw new InvalidSignatureError({ signature, type: 'struct' });\n const properties = match.properties.split(';');\n const components = [];\n const propertiesLength = properties.length;\n for (let k = 0; k < propertiesLength; k++) {\n const property = properties[k];\n const trimmed = property.trim();\n if (!trimmed)\n continue;\n const abiParameter = parseAbiParameter(trimmed, {\n type: 'struct',\n });\n components.push(abiParameter);\n }\n if (!components.length)\n throw new InvalidStructSignatureError({ signature });\n shallowStructs[match.name] = components;\n }\n // Resolve nested structs inside each parameter\n const resolvedStructs = {};\n const entries = Object.entries(shallowStructs);\n const entriesLength = entries.length;\n for (let i = 0; i < entriesLength; i++) {\n const [name, parameters] = entries[i];\n resolvedStructs[name] = resolveStructs(parameters, shallowStructs);\n }\n return resolvedStructs;\n}\nconst typeWithoutTupleRegex = /^(?<type>[a-zA-Z$_][a-zA-Z0-9$_]*)(?<array>(?:\\[\\d*?\\])+?)?$/;\nfunction resolveStructs(abiParameters = [], structs = {}, ancestors = new Set()) {\n const components = [];\n const length = abiParameters.length;\n for (let i = 0; i < length; i++) {\n const abiParameter = abiParameters[i];\n const isTuple = isTupleRegex.test(abiParameter.type);\n if (isTuple)\n components.push(abiParameter);\n else {\n const match = execTyped(typeWithoutTupleRegex, abiParameter.type);\n if (!match?.type)\n throw new InvalidAbiTypeParameterError({ abiParameter });\n const { array, type } = match;\n if (type in structs) {\n if (ancestors.has(type))\n throw new CircularReferenceError({ type });\n components.push({\n ...abiParameter,\n type: `tuple${array ?? ''}`,\n components: resolveStructs(structs[type], structs, new Set([...ancestors, type])),\n });\n }\n else {\n if (isSolidityType(type))\n components.push(abiParameter);\n else\n throw new UnknownTypeError({ type });\n }\n }\n }\n return components;\n}\n//# sourceMappingURL=structs.js.map","import { isStructSignature } from './runtime/signatures.js';\nimport { parseStructs } from './runtime/structs.js';\nimport { parseSignature } from './runtime/utils.js';\n/**\n * Parses human-readable ABI into JSON {@link Abi}\n *\n * @param signatures - Human-Readable ABI\n * @returns Parsed {@link Abi}\n *\n * @example\n * const abi = parseAbi([\n * // ^? const abi: readonly [{ name: \"balanceOf\"; type: \"function\"; stateMutability:...\n * 'function balanceOf(address owner) view returns (uint256)',\n * 'event Transfer(address indexed from, address indexed to, uint256 amount)',\n * ])\n */\nexport function parseAbi(signatures) {\n const structs = parseStructs(signatures);\n const abi = [];\n const length = signatures.length;\n for (let i = 0; i < length; i++) {\n const signature = signatures[i];\n if (isStructSignature(signature))\n continue;\n abi.push(parseSignature(signature, structs));\n }\n return abi;\n}\n//# sourceMappingURL=parseAbi.js.map","import { InvalidAbiItemError } from './errors/abiItem.js';\nimport { isStructSignature } from './runtime/signatures.js';\nimport { parseStructs } from './runtime/structs.js';\nimport { parseSignature } from './runtime/utils.js';\n/**\n * Parses human-readable ABI item (e.g. error, event, function) into {@link Abi} item\n *\n * @param signature - Human-readable ABI item\n * @returns Parsed {@link Abi} item\n *\n * @example\n * const abiItem = parseAbiItem('function balanceOf(address owner) view returns (uint256)')\n * // ^? const abiItem: { name: \"balanceOf\"; type: \"function\"; stateMutability: \"view\";...\n *\n * @example\n * const abiItem = parseAbiItem([\n * // ^? const abiItem: { name: \"foo\"; type: \"function\"; stateMutability: \"view\"; inputs:...\n * 'function foo(Baz bar) view returns (string)',\n * 'struct Baz { string name; }',\n * ])\n */\nexport function parseAbiItem(signature) {\n let abiItem;\n if (typeof signature === 'string')\n abiItem = parseSignature(signature);\n else {\n const structs = parseStructs(signature);\n const length = signature.length;\n for (let i = 0; i < length; i++) {\n const signature_ = signature[i];\n if (isStructSignature(signature_))\n continue;\n abiItem = parseSignature(signature_, structs);\n break;\n }\n }\n if (!abiItem)\n throw new InvalidAbiItemError({ signature });\n return abiItem;\n}\n//# sourceMappingURL=parseAbiItem.js.map","/**\n * Retrieves and returns an action from the client (if exists), and falls\n * back to the tree-shakable action.\n *\n * Useful for extracting overridden actions from a client (ie. if a consumer\n * wants to override the `sendTransaction` implementation).\n */\nexport function getAction(client, actionFn, \n// Some minifiers drop `Function.prototype.name`, or replace it with short letters,\n// meaning that `actionFn.name` will not always work. For that case, the consumer\n// needs to pass the name explicitly.\nname) {\n const action_implicit = client[actionFn.name];\n if (typeof action_implicit === 'function')\n return action_implicit;\n const action_explicit = client[name];\n if (typeof action_explicit === 'function')\n return action_explicit;\n return (params) => actionFn(client, params);\n}\n//# sourceMappingURL=getAction.js.map","import { InvalidDefinitionTypeError, } from '../../errors/abi.js';\nexport function formatAbiItem(abiItem, { includeName = false } = {}) {\n if (abiItem.type !== 'function' &&\n abiItem.type !== 'event' &&\n abiItem.type !== 'error')\n throw new InvalidDefinitionTypeError(abiItem.type);\n return `${abiItem.name}(${formatAbiParams(abiItem.inputs, { includeName })})`;\n}\nexport function formatAbiParams(params, { includeName = false } = {}) {\n if (!params)\n return '';\n return params\n .map((param) => formatAbiParam(param, { includeName }))\n .join(includeName ? ', ' : ',');\n}\nfunction formatAbiParam(param, { includeName }) {\n if (param.type.startsWith('tuple')) {\n return `(${formatAbiParams(param.components, { includeName })})${param.type.slice('tuple'.length)}`;\n }\n return param.type + (includeName && param.name ? ` ${param.name}` : '');\n}\n//# sourceMappingURL=formatAbiItem.js.map","export function isHex(value, { strict = true } = {}) {\n if (!value)\n return false;\n if (typeof value !== 'string')\n return false;\n return strict ? /^0x[0-9a-fA-F]*$/.test(value) : value.startsWith('0x');\n}\n//# sourceMappingURL=isHex.js.map","import { isHex } from './isHex.js';\n/**\n * @description Retrieves the size of the value (in bytes).\n *\n * @param value The value (hex or byte array) to retrieve the size of.\n * @returns The size of the value (in bytes).\n */\nexport function size(value) {\n if (isHex(value, { strict: false }))\n return Math.ceil((value.length - 2) / 2);\n return value.length;\n}\n//# sourceMappingURL=size.js.map","export const version = '2.56.3';\n//# sourceMappingURL=version.js.map","import { version } from './version.js';\nlet errorConfig = {\n getDocsUrl: ({ docsBaseUrl, docsPath = '', docsSlug, }) => docsPath\n ? `${docsBaseUrl ?? 'https://viem.sh'}${docsPath}${docsSlug ? `#${docsSlug}` : ''}`\n : undefined,\n version: `viem@${version}`,\n};\nexport function setErrorConfig(config) {\n errorConfig = config;\n}\nexport class BaseError extends Error {\n constructor(shortMessage, args = {}) {\n const details = (() => {\n if (args.cause instanceof BaseError)\n return args.cause.details;\n if (args.cause?.message)\n return args.cause.message;\n return args.details;\n })();\n const docsPath = (() => {\n if (args.cause instanceof BaseError)\n return args.cause.docsPath || args.docsPath;\n return args.docsPath;\n })();\n const docsUrl = errorConfig.getDocsUrl?.({ ...args, docsPath });\n const message = [\n shortMessage || 'An error occurred.',\n '',\n ...(args.metaMessages ? [...args.metaMessages, ''] : []),\n ...(docsUrl ? [`Docs: ${docsUrl}`] : []),\n ...(details ? [`Details: ${details}`] : []),\n ...(errorConfig.version ? [`Version: ${errorConfig.version}`] : []),\n ].join('\\n');\n super(message, args.cause ? { cause: args.cause } : undefined);\n Object.defineProperty(this, \"details\", {\n enumerable: true,\n configurable: true,\n writable: true,\n value: void 0\n });\n Object.defineProperty(this, \"docsPath\", {\n enumerable: true,\n configurable: true,\n writable: true,\n value: void 0\n });\n Object.defineProperty(this, \"metaMessages\", {\n enumerable: true,\n configurable: true,\n writable: true,\n value: void 0\n });\n Object.defineProperty(this, \"shortMessage\", {\n enumerable: true,\n configurable: true,\n writable: true,\n value: void 0\n });\n Object.defineProperty(this, \"version\", {\n enumerable: true,\n configurable: true,\n writable: true,\n value: void 0\n });\n Object.defineProperty(this, \"name\", {\n enumerable: true,\n configurable: true,\n writable: true,\n value: 'BaseError'\n });\n this.details = details;\n this.docsPath = docsPath;\n this.metaMessages = args.metaMessages;\n this.name = args.name ?? this.name;\n this.shortMessage = shortMessage;\n this.version = version;\n }\n walk(fn) {\n return walk(this, fn);\n }\n}\nfunction walk(err, fn) {\n if (fn?.(err))\n return err;\n if (err &&\n typeof err === 'object' &&\n 'cause' in err &&\n err.cause !== undefined)\n return walk(err.cause, fn);\n return fn ? null : err;\n}\n//# sourceMappingURL=base.js.map","import { formatAbiItem, formatAbiParams } from '../utils/abi/formatAbiItem.js';\nimport { size } from '../utils/data/size.js';\nimport { BaseError } from './base.js';\nexport class AbiConstructorNotFoundError extends BaseError {\n constructor({ docsPath }) {\n super([\n 'A constructor was not found on the ABI.',\n 'Make sure you are using the correct ABI and that the constructor exists on it.',\n ].join('\\n'), {\n docsPath,\n name: 'AbiConstructorNotFoundError',\n });\n }\n}\nexport class AbiConstructorParamsNotFoundError extends BaseError {\n constructor({ docsPath }) {\n super([\n 'Constructor arguments were provided (`args`), but a constructor parameters (`inputs`) were not found on the ABI.',\n 'Make sure you are using the correct ABI, and that the `inputs` attribute on the constructor exists.',\n ].join('\\n'), {\n docsPath,\n name: 'AbiConstructorParamsNotFoundError',\n });\n }\n}\nexport class AbiDecodingDataSizeInvalidError extends BaseError {\n constructor({ data, size }) {\n super([\n `Data size of ${size} bytes is invalid.`,\n 'Size must be in increments of 32 bytes (size % 32 === 0).',\n ].join('\\n'), {\n metaMessages: [`Data: ${data} (${size} bytes)`],\n name: 'AbiDecodingDataSizeInvalidError',\n });\n }\n}\nexport class AbiDecodingDataSizeTooSmallError extends BaseError {\n constructor({ data, params, size, }) {\n super([`Data size of ${size} bytes is too small for given parameters.`].join('\\n'), {\n metaMessages: [\n `Params: (${formatAbiParams(params, { includeName: true })})`,\n `Data: ${data} (${size} bytes)`,\n ],\n name: 'AbiDecodingDataSizeTooSmallError',\n });\n Object.defineProperty(this, \"data\", {\n enumerable: true,\n configurable: true,\n writable: true,\n value: void 0\n });\n Object.defineProperty(this, \"params\", {\n enumerable: true,\n configurable: true,\n writable: true,\n value: void 0\n });\n Object.defineProperty(this, \"size\", {\n enumerable: true,\n configurable: true,\n writable: true,\n value: void 0\n });\n this.data = data;\n this.params = params;\n this.size = size;\n }\n}\nexport class AbiDecodingZeroDataError extends BaseError {\n constructor({ cause } = {}) {\n super('Cannot decode zero data (\"0x\") with ABI parameters.', {\n name: 'AbiDecodingZeroDataError',\n cause,\n });\n }\n}\nexport class AbiEncodingArrayLengthMismatchError extends BaseError {\n constructor({ expectedLength, givenLength, type, }) {\n super([\n `ABI encoding array length mismatch for type ${type}.`,\n `Expected length: ${expectedLength}`,\n `Given length: ${givenLength}`,\n ].join('\\n'), { name: 'AbiEncodingArrayLengthMismatchError' });\n }\n}\nexport class AbiEncodingBytesSizeMismatchError extends BaseError {\n constructor({ expectedSize, value }) {\n super(`Size of bytes \"${value}\" (bytes${size(value)}) does not match expected size (bytes${expectedSize}).`, { name: 'AbiEncodingBytesSizeMismatchError' });\n }\n}\nexport class AbiEncodingLengthMismatchError extends BaseError {\n constructor({ expectedLength, givenLength, }) {\n super([\n 'ABI encoding params/values length mismatch.',\n `Expected length (params): ${expectedLength}`,\n `Given length (values): ${givenLength}`,\n ].join('\\n'), { name: 'AbiEncodingLengthMismatchError' });\n }\n}\nexport class AbiErrorInputsNotFoundError extends BaseError {\n constructor(errorName, { docsPath }) {\n super([\n `Arguments (\\`args\\`) were provided to \"${errorName}\", but \"${errorName}\" on the ABI does not contain any parameters (\\`inputs\\`).`,\n 'Cannot encode error result without knowing what the parameter types are.',\n 'Make sure you are using the correct ABI and that the inputs exist on it.',\n ].join('\\n'), {\n docsPath,\n name: 'AbiErrorInputsNotFoundError',\n });\n }\n}\nexport class AbiErrorNotFoundError extends BaseError {\n constructor(errorName, { docsPath } = {}) {\n super([\n `Error ${errorName ? `\"${errorName}\" ` : ''}not found on ABI.`,\n 'Make sure you are using the correct ABI and that the error exists on it.',\n ].join('\\n'), {\n docsPath,\n name: 'AbiErrorNotFoundError',\n });\n }\n}\nexport class AbiErrorSignatureNotFoundError extends BaseError {\n constructor(signature, { docsPath, cause, }) {\n super([\n `Encoded error signature \"${signature}\" not found on ABI.`,\n 'Make sure you are using the correct ABI and that the error exists on it.',\n `You can look up the decoded signature here: https://4byte.sourcify.dev/?q=${signature}.`,\n ].join('\\n'), {\n docsPath,\n name: 'AbiErrorSignatureNotFoundError',\n cause,\n });\n Object.defineProperty(this, \"signature\", {\n enumerable: true,\n configurable: true,\n writable: true,\n value: void 0\n });\n this.signature = signature;\n }\n}\nexport class AbiEventSignatureEmptyTopicsError extends BaseError {\n constructor({ docsPath }) {\n super('Cannot extract event signature from empty topics.', {\n docsPath,\n name: 'AbiEventSignatureEmptyTopicsError',\n });\n }\n}\nexport class AbiEventSignatureNotFoundError extends BaseError {\n constructor(signature, { docsPath }) {\n super([\n `Encoded event signature \"${signature}\" not found on ABI.`,\n 'Make sure you are using the correct ABI and that the event exists on it.',\n `You can look up the signature here: https://4byte.sourcify.dev/?q=${signature}.`,\n ].join('\\n'), {\n docsPath,\n name: 'AbiEventSignatureNotFoundError',\n });\n }\n}\nexport class AbiEventNotFoundError extends BaseError {\n constructor(eventName, { docsPath } = {}) {\n super([\n `Event ${eventName ? `\"${eventName}\" ` : ''}not found on ABI.`,\n 'Make sure you are using the correct ABI and that the event exists on it.',\n ].join('\\n'), {\n docsPath,\n name: 'AbiEventNotFoundError',\n });\n }\n}\nexport class AbiFunctionNotFoundError extends BaseError {\n constructor(functionName, { docsPath } = {}) {\n super([\n `Function ${functionName ? `\"${functionName}\" ` : ''}not found on ABI.`,\n 'Make sure you are using the correct ABI and that the function exists on it.',\n ].join('\\n'), {\n docsPath,\n name: 'AbiFunctionNotFoundError',\n });\n }\n}\nexport class AbiFunctionOutputsNotFoundError extends BaseError {\n constructor(functionName, { docsPath }) {\n super([\n `Function \"${functionName}\" does not contain any \\`outputs\\` on ABI.`,\n 'Cannot decode function result without knowing what the parameter types are.',\n 'Make sure you are using the correct ABI and that the function exists on it.',\n ].join('\\n'), {\n docsPath,\n name: 'AbiFunctionOutputsNotFoundError',\n });\n }\n}\nexport class AbiFunctionSignatureNotFoundError extends BaseError {\n constructor(signature, { docsPath }) {\n super([\n `Encoded function signature \"${signature}\" not found on ABI.`,\n 'Make sure you are using the correct ABI and that the function exists on it.',\n `You can look up the signature here: https://4byte.sourcify.dev/?q=${signature}.`,\n ].join('\\n'), {\n docsPath,\n name: 'AbiFunctionSignatureNotFoundError',\n });\n }\n}\nexport class AbiItemAmbiguityError extends BaseError {\n constructor(x, y) {\n super('Found ambiguous types in overloaded ABI items.', {\n metaMessages: [\n `\\`${x.type}\\` in \\`${formatAbiItem(x.abiItem)}\\`, and`,\n `\\`${y.type}\\` in \\`${formatAbiItem(y.abiItem)}\\``,\n '',\n 'These types encode differently and cannot be distinguished at runtime.',\n 'Remove one of the ambiguous items in the ABI.',\n ],\n name: 'AbiItemAmbiguityError',\n });\n }\n}\nexport class BytesSizeMismatchError extends BaseError {\n constructor({ expectedSize, givenSize, }) {\n super(`Expected bytes${expectedSize}, got bytes${givenSize}.`, {\n name: 'BytesSizeMismatchError',\n });\n }\n}\nexport class DecodeLogDataMismatch extends BaseError {\n constructor({ abiItem, data, params, size, }) {\n super([\n `Data size of ${size} bytes is too small for non-indexed event parameters.`,\n ].join('\\n'), {\n metaMessages: [\n `Params: (${formatAbiParams(params, { includeName: true })})`,\n `Data: ${data} (${size} bytes)`,\n ],\n name: 'DecodeLogDataMismatch',\n });\n Object.defineProperty(this, \"abiItem\", {\n enumerable: true,\n configurable: true,\n writable: true,\n value: void 0\n });\n Object.defineProperty(this, \"data\", {\n enumerable: true,\n configurable: true,\n writable: true,\n value: void 0\n });\n Object.defineProperty(this, \"params\", {\n enumerable: true,\n configurable: true,\n writable: true,\n value: void 0\n });\n Object.defineProperty(this, \"size\", {\n enumerable: true,\n configurable: true,\n writable: true,\n value: void 0\n });\n this.abiItem = abiItem;\n this.data = data;\n this.params = params;\n this.size = size;\n }\n}\nexport class DecodeLogTopicsMismatch extends BaseError {\n constructor({ abiItem, param, }) {\n super([\n `Expected a topic for indexed event parameter${param.name ? ` \"${param.name}\"` : ''} on event \"${formatAbiItem(abiItem, { includeName: true })}\".`,\n ].join('\\n'), { name: 'DecodeLogTopicsMismatch' });\n Object.defineProperty(this, \"abiItem\", {\n enumerable: true,\n configurable: true,\n writable: true,\n value: void 0\n });\n this.abiItem = abiItem;\n }\n}\nexport class InvalidAbiEncodingTypeError extends BaseError {\n constructor(type, { docsPath }) {\n super([\n `Type \"${type}\" is not a valid encoding type.`,\n 'Please provide a valid ABI type.',\n ].join('\\n'), { docsPath, name: 'InvalidAbiEncodingType' });\n }\n}\nexport class InvalidAbiDecodingTypeError extends BaseError {\n constructor(type, { docsPath }) {\n super([\n `Type \"${type}\" is not a valid decoding type.`,\n 'Please provide a valid ABI type.',\n ].join('\\n'), { docsPath, name: 'InvalidAbiDecodingType' });\n }\n}\nexport class InvalidArrayError extends BaseError {\n constructor(value) {\n super([`Value \"${value}\" is not a valid array.`].join('\\n'), {\n name: 'InvalidArrayError',\n });\n }\n}\nexport class InvalidDefinitionTypeError extends BaseError {\n constructor(type) {\n super([\n `\"${type}\" is not a valid definition type.`,\n 'Valid types: \"function\", \"event\", \"error\"',\n ].join('\\n'), { name: 'InvalidDefinitionTypeError' });\n }\n}\nexport class UnsupportedPackedAbiType extends BaseError {\n constructor(type) {\n super(`Type \"${type}\" is not supported for packed encoding.`, {\n name: 'UnsupportedPackedAbiType',\n });\n }\n}\n//# sourceMappingURL=abi.js.map","import { BaseError } from './base.js';\nexport class FilterTypeNotSupportedError extends BaseError {\n constructor(type) {\n super(`Filter type \"${type}\" is not supported.`, {\n name: 'FilterTypeNotSupportedError',\n });\n }\n}\n//# sourceMappingURL=log.js.map","import { BaseError } from './base.js';\nexport class SliceOffsetOutOfBoundsError extends BaseError {\n constructor({ offset, position, size, }) {\n super(`Slice ${position === 'start' ? 'starting' : 'ending'} at offset \"${offset}\" is out-of-bounds (size: ${size}).`, { name: 'SliceOffsetOutOfBoundsError' });\n }\n}\nexport class SizeExceedsPaddingSizeError extends BaseError {\n constructor({ size, targetSize, type, }) {\n super(`${type.charAt(0).toUpperCase()}${type\n .slice(1)\n .toLowerCase()} size (${size}) exceeds padding size (${targetSize}).`, { name: 'SizeExceedsPaddingSizeError' });\n }\n}\nexport class InvalidBytesLengthError extends BaseError {\n constructor({ size, targetSize, type, }) {\n super(`${type.charAt(0).toUpperCase()}${type\n .slice(1)\n .toLowerCase()} is expected to be ${targetSize} ${type} long, but is ${size} ${type} long.`, { name: 'InvalidBytesLengthError' });\n }\n}\n//# sourceMappingURL=data.js.map","import { SizeExceedsPaddingSizeError, } from '../../errors/data.js';\nexport function pad(hexOrBytes, { dir, size = 32 } = {}) {\n if (typeof hexOrBytes === 'string')\n return padHex(hexOrBytes, { dir, size });\n return padBytes(hexOrBytes, { dir, size });\n}\nexport function padHex(hex_, { dir, size = 32 } = {}) {\n if (size === null)\n return hex_;\n const hex = hex_.replace('0x', '');\n if (hex.length > size * 2)\n throw new SizeExceedsPaddingSizeError({\n size: Math.ceil(hex.length / 2),\n targetSize: size,\n type: 'hex',\n });\n return `0x${hex[dir === 'right' ? 'padEnd' : 'padStart'](size * 2, '0')}`;\n}\nexport function padBytes(bytes, { dir, size = 32 } = {}) {\n if (size === null)\n return bytes;\n if (bytes.length > size)\n throw new SizeExceedsPaddingSizeError({\n size: bytes.length,\n targetSize: size,\n type: 'bytes',\n });\n const paddedBytes = new Uint8Array(size);\n for (let i = 0; i < size; i++) {\n const padEnd = dir === 'right';\n paddedBytes[padEnd ? i : size - i - 1] =\n bytes[padEnd ? i : bytes.length - i - 1];\n }\n return paddedBytes;\n}\n//# sourceMappingURL=pad.js.map","import { BaseError } from './base.js';\nexport class IntegerOutOfRangeError extends BaseError {\n constructor({ max, min, signed, size, value, }) {\n super(`Number \"${value}\" is not in safe ${size ? `${size * 8}-bit ${signed ? 'signed' : 'unsigned'} ` : ''}integer range ${max ? `(${min} to ${max})` : `(above ${min})`}`, { name: 'IntegerOutOfRangeError' });\n }\n}\nexport class InvalidBytesBooleanError extends BaseError {\n constructor(bytes) {\n super(`Bytes value \"${bytes}\" is not a valid boolean. The bytes array must contain a single byte of either a 0 or 1 value.`, {\n name: 'InvalidBytesBooleanError',\n });\n }\n}\nexport class InvalidHexBooleanError extends BaseError {\n constructor(hex) {\n super(`Hex value \"${hex}\" is not a valid boolean. The hex value must be \"0x0\" (false) or \"0x1\" (true).`, { name: 'InvalidHexBooleanError' });\n }\n}\nexport class InvalidHexValueError extends BaseError {\n constructor(value) {\n super(`Hex value \"${value}\" is an odd length (${value.length}). It must be an even length.`, { name: 'InvalidHexValueError' });\n }\n}\nexport class RlpDepthLimitExceededError extends BaseError {\n constructor({ limit }) {\n super(`RLP depth limit of \\`${limit}\\` exceeded.`, {\n name: 'RlpDepthLimitExceededError',\n });\n }\n}\nexport class RlpListBoundaryExceededError extends BaseError {\n constructor({ consumed, declared }) {\n super(`RLP list items consumed \\`${consumed}\\` bytes but the list declared a length of \\`${declared}\\`.`, { name: 'RlpListBoundaryExceededError' });\n }\n}\nexport class RlpTrailingBytesError extends BaseError {\n constructor({ count }) {\n super(`RLP payload encodes a single item, but \\`${count}\\` trailing ${count === 1 ? 'byte remains' : 'bytes remain'}.`, { name: 'RlpTrailingBytesError' });\n }\n}\nexport class SizeOverflowError extends BaseError {\n constructor({ givenSize, maxSize }) {\n super(`Size cannot exceed ${maxSize} bytes. Given size: ${givenSize} bytes.`, { name: 'SizeOverflowError' });\n }\n}\n//# sourceMappingURL=encoding.js.map","export function trim(hexOrBytes, { dir = 'left' } = {}) {\n let data = typeof hexOrBytes === 'string' ? hexOrBytes.replace('0x', '') : hexOrBytes;\n let sliceLength = 0;\n for (let i = 0; i < data.length - 1; i++) {\n if (data[dir === 'left' ? i : data.length - i - 1].toString() === '0')\n sliceLength++;\n else\n break;\n }\n data =\n dir === 'left'\n ? data.slice(sliceLength)\n : data.slice(0, data.length - sliceLength);\n if (typeof hexOrBytes === 'string') {\n if (data.length === 1 && dir === 'right')\n data = `${data}0`;\n return `0x${data.length % 2 === 1 ? `0${data}` : data}`;\n }\n return data;\n}\n//# sourceMappingURL=trim.js.map","import { IntegerOutOfRangeError, InvalidHexBooleanError, SizeOverflowError, } from '../../errors/encoding.js';\nimport { size as size_ } from '../data/size.js';\nimport { trim } from '../data/trim.js';\nimport { hexToBytes } from './toBytes.js';\nexport function assertSize(hexOrBytes, { size }) {\n if (size_(hexOrBytes) > size)\n throw new SizeOverflowError({\n givenSize: size_(hexOrBytes),\n maxSize: size,\n });\n}\n/**\n * Decodes a hex string into a string, number, bigint, boolean, or byte array.\n *\n * - Docs: https://viem.sh/docs/utilities/fromHex\n * - Example: https://viem.sh/docs/utilities/fromHex#usage\n *\n * @param hex Hex string to decode.\n * @param toOrOpts Type to convert to or options.\n * @returns Decoded value.\n *\n * @example\n * import { fromHex } from 'viem'\n * const data = fromHex('0x1a4', 'number')\n * // 420\n *\n * @example\n * import { fromHex } from 'viem'\n * const data = fromHex('0x48656c6c6f20576f726c6421', 'string')\n * // 'Hello world'\n *\n * @example\n * import { fromHex } from 'viem'\n * const data = fromHex('0x48656c6c6f20576f726c64210000000000000000000000000000000000000000', {\n * size: 32,\n * to: 'string'\n * })\n * // 'Hello world'\n */\nexport function fromHex(hex, toOrOpts) {\n const opts = typeof toOrOpts === 'string' ? { to: toOrOpts } : toOrOpts;\n const to = opts.to;\n if (to === 'number')\n return hexToNumber(hex, opts);\n if (to === 'bigint')\n return hexToBigInt(hex, opts);\n if (to === 'string')\n return hexToString(hex, opts);\n if (to === 'boolean')\n return hexToBool(hex, opts);\n return hexToBytes(hex, opts);\n}\n/**\n * Decodes a hex value into a bigint.\n *\n * - Docs: https://viem.sh/docs/utilities/fromHex#hextobigint\n *\n * @param hex Hex value to decode.\n * @param opts Options.\n * @returns BigInt value.\n *\n * @example\n * import { hexToBigInt } from 'viem'\n * const data = hexToBigInt('0x1a4', { signed: true })\n * // 420n\n *\n * @example\n * import { hexToBigInt } from 'viem'\n * const data = hexToBigInt('0x00000000000000000000000000000000000000000000000000000000000001a4', { size: 32 })\n * // 420n\n */\nexport function hexToBigInt(hex, opts = {}) {\n const { signed } = opts;\n if (opts.size)\n assertSize(hex, { size: opts.size });\n const value = BigInt(hex);\n if (!signed)\n return value;\n const size = Math.ceil((hex.length - 2) / 2);\n const max = (1n << (BigInt(size) * 8n - 1n)) - 1n;\n if (value <= max)\n return value;\n return value - BigInt(`0x${'f'.padStart(size * 2, 'f')}`) - 1n;\n}\n/**\n * Decodes a hex value into a boolean.\n *\n * - Docs: https://viem.sh/docs/utilities/fromHex#hextobool\n *\n * @param hex Hex value to decode.\n * @param opts Options.\n * @returns Boolean value.\n *\n * @example\n * import { hexToBool } from 'viem'\n * const data = hexToBool('0x01')\n * // true\n *\n * @example\n * import { hexToBool } from 'viem'\n * const data = hexToBool('0x0000000000000000000000000000000000000000000000000000000000000001', { size: 32 })\n * // true\n */\nexport function hexToBool(hex_, opts = {}) {\n let hex = hex_;\n if (opts.size) {\n assertSize(hex, { size: opts.size });\n hex = trim(hex);\n }\n if (trim(hex) === '0x00')\n return false;\n if (trim(hex) === '0x01')\n return true;\n throw new InvalidHexBooleanError(hex);\n}\n/**\n * Decodes a hex string into a number.\n *\n * - Docs: https://viem.sh/docs/utilities/fromHex#hextonumber\n *\n * @param hex Hex value to decode.\n * @param opts Options.\n * @returns Number value.\n *\n * @example\n * import { hexToNumber } from 'viem'\n * const data = hexToNumber('0x1a4')\n * // 420\n *\n * @example\n * import { hexToNumber } from 'viem'\n * const data = hexToNumber('0x00000000000000000000000000000000000000000000000000000000000001a4', { size: 32 })\n * // 420\n */\nexport function hexToNumber(hex, opts = {}) {\n const value = hexToBigInt(hex, opts);\n const number = Number(value);\n if (!Number.isSafeInteger(number))\n throw new IntegerOutOfRangeError({\n max: `${Number.MAX_SAFE_INTEGER}`,\n min: `${Number.MIN_SAFE_INTEGER}`,\n signed: opts.signed,\n size: opts.size,\n value: `${value}n`,\n });\n return number;\n}\n/**\n * Decodes a hex value into a UTF-8 string.\n *\n * - Docs: https://viem.sh/docs/utilities/fromHex#hextostring\n *\n * @param hex Hex value to decode.\n * @param opts Options.\n * @returns String value.\n *\n * @example\n * import { hexToString } from 'viem'\n * const data = hexToString('0x48656c6c6f20576f726c6421')\n * // 'Hello world!'\n *\n * @example\n * import { hexToString } from 'viem'\n * const data = hexToString('0x48656c6c6f20576f726c64210000000000000000000000000000000000000000', {\n * size: 32,\n * })\n * // 'Hello world'\n */\nexport function hexToString(hex, opts = {}) {\n let bytes = hexToBytes(hex);\n if (opts.size) {\n assertSize(bytes, { size: opts.size });\n bytes = trim(bytes, { dir: 'right' });\n }\n return new TextDecoder().decode(bytes);\n}\n//# sourceMappingURL=fromHex.js.map","import { IntegerOutOfRangeError, } from '../../errors/encoding.js';\nimport { pad } from '../data/pad.js';\nimport { assertSize } from './fromHex.js';\nconst hexes = /*#__PURE__*/ Array.from({ length: 256 }, (_v, i) => i.toString(16).padStart(2, '0'));\n/**\n * Encodes a string, number, bigint, or ByteArray into a hex string\n *\n * - Docs: https://viem.sh/docs/utilities/toHex\n * - Example: https://viem.sh/docs/utilities/toHex#usage\n *\n * @param value Value to encode.\n * @param opts Options.\n * @returns Hex value.\n *\n * @example\n * import { toHex } from 'viem'\n * const data = toHex('Hello world')\n * // '0x48656c6c6f20776f726c6421'\n *\n * @example\n * import { toHex } from 'viem'\n * const data = toHex(420)\n * // '0x1a4'\n *\n * @example\n * import { toHex } from 'viem'\n * const data = toHex('Hello world', { size: 32 })\n * // '0x48656c6c6f20776f726c64210000000000000000000000000000000000000000'\n */\nexport function toHex(value, opts = {}) {\n if (typeof value === 'number' || typeof value === 'bigint')\n return numberToHex(value, opts);\n if (typeof value === 'string') {\n return stringToHex(value, opts);\n }\n if (typeof value === 'boolean')\n return boolToHex(value, opts);\n return bytesToHex(value, opts);\n}\n/**\n * Encodes a boolean into a hex string\n *\n * - Docs: https://viem.sh/docs/utilities/toHex#booltohex\n *\n * @param value Value to encode.\n * @param opts Options.\n * @returns Hex value.\n *\n * @example\n * import { boolToHex } from 'viem'\n * const data = boolToHex(true)\n * // '0x1'\n *\n * @example\n * import { boolToHex } from 'viem'\n * const data = boolToHex(false)\n * // '0x0'\n *\n * @example\n * import { boolToHex } from 'viem'\n * const data = boolToHex(true, { size: 32 })\n * // '0x0000000000000000000000000000000000000000000000000000000000000001'\n */\nexport function boolToHex(value, opts = {}) {\n const hex = `0x${Number(value)}`;\n if (typeof opts.size === 'number') {\n assertSize(hex, { size: opts.size });\n return pad(hex, { size: opts.size });\n }\n return hex;\n}\n/**\n * Encodes a bytes array into a hex string\n *\n * - Docs: https://viem.sh/docs/utilities/toHex#bytestohex\n *\n * @param value Value to encode.\n * @param opts Options.\n * @returns Hex value.\n *\n * @example\n * import { bytesToHex } from 'viem'\n * const data = bytesToHex(Uint8Array.from([72, 101, 108, 108, 111, 32, 87, 111, 114, 108, 100, 33])\n * // '0x48656c6c6f20576f726c6421'\n *\n * @example\n * import { bytesToHex } from 'viem'\n * const data = bytesToHex(Uint8Array.from([72, 101, 108, 108, 111, 32, 87, 111, 114, 108, 100, 33]), { size: 32 })\n * // '0x48656c6c6f20576f726c64210000000000000000000000000000000000000000'\n */\nexport function bytesToHex(value, opts = {}) {\n let string = '';\n for (let i = 0; i < value.length; i++) {\n string += hexes[value[i]];\n }\n const hex = `0x${string}`;\n if (typeof opts.size === 'number') {\n assertSize(hex, { size: opts.size });\n return pad(hex, { dir: 'right', size: opts.size });\n }\n return hex;\n}\n/**\n * Encodes a number or bigint into a hex string\n *\n * - Docs: https://viem.sh/docs/utilities/toHex#numbertohex\n *\n * @param value Value to encode.\n * @param opts Options.\n * @returns Hex value.\n *\n * @example\n * import { numberToHex } from 'viem'\n * const data = numberToHex(420)\n * // '0x1a4'\n *\n * @example\n * import { numberToHex } from 'viem'\n * const data = numberToHex(420, { size: 32 })\n * // '0x00000000000000000000000000000000000000000000000000000000000001a4'\n */\nexport function numberToHex(value_, opts = {}) {\n const { signed, size } = opts;\n const value = BigInt(value_);\n let maxValue;\n if (size) {\n if (signed)\n maxValue = (1n << (BigInt(size) * 8n - 1n)) - 1n;\n else\n maxValue = 2n ** (BigInt(size) * 8n) - 1n;\n }\n else if (typeof value_ === 'number') {\n maxValue = BigInt(Number.MAX_SAFE_INTEGER);\n }\n const minValue = typeof maxValue === 'bigint' && signed ? -maxValue - 1n : 0;\n if ((maxValue && value > maxValue) || value < minValue) {\n const suffix = typeof value_ === 'bigint' ? 'n' : '';\n throw new IntegerOutOfRangeError({\n max: maxValue ? `${maxValue}${suffix}` : undefined,\n min: `${minValue}${suffix}`,\n signed,\n size,\n value: `${value_}${suffix}`,\n });\n }\n const hex = `0x${(signed && value < 0 ? (1n << BigInt(size * 8)) + BigInt(value) : value).toString(16)}`;\n if (size)\n return pad(hex, { size });\n return hex;\n}\nconst encoder = /*#__PURE__*/ new TextEncoder();\n/**\n * Encodes a UTF-8 string into a hex string\n *\n * - Docs: https://viem.sh/docs/utilities/toHex#stringtohex\n *\n * @param value Value to encode.\n * @param opts Options.\n * @returns Hex value.\n *\n * @example\n * import { stringToHex } from 'viem'\n * const data = stringToHex('Hello World!')\n * // '0x48656c6c6f20576f726c6421'\n *\n * @example\n * import { stringToHex } from 'viem'\n * const data = stringToHex('Hello World!', { size: 32 })\n * // '0x48656c6c6f20576f726c64210000000000000000000000000000000000000000'\n */\nexport function stringToHex(value_, opts = {}) {\n const value = encoder.encode(value_);\n return bytesToHex(value, opts);\n}\n//# sourceMappingURL=toHex.js.map","import { BaseError } from '../../errors/base.js';\nimport { isHex } from '../data/isHex.js';\nimport { pad } from '../data/pad.js';\nimport { assertSize } from './fromHex.js';\nimport { numberToHex, } from './toHex.js';\nconst encoder = /*#__PURE__*/ new TextEncoder();\n/**\n * Encodes a UTF-8 string, hex value, bigint, number or boolean to a byte array.\n *\n * - Docs: https://viem.sh/docs/utilities/toBytes\n * - Example: https://viem.sh/docs/utilities/toBytes#usage\n *\n * @param value Value to encode.\n * @param opts Options.\n * @returns Byte array value.\n *\n * @example\n * import { toBytes } from 'viem'\n * const data = toBytes('Hello world')\n * // Uint8Array([72, 101, 108, 108, 111, 32, 87, 111, 114, 108, 100, 33])\n *\n * @example\n * import { toBytes } from 'viem'\n * const data = toBytes(420)\n * // Uint8Array([1, 164])\n *\n * @example\n * import { toBytes } from 'viem'\n * const data = toBytes(420, { size: 4 })\n * // Uint8Array([0, 0, 1, 164])\n */\nexport function toBytes(value, opts = {}) {\n if (typeof value === 'number' || typeof value === 'bigint')\n return numberToBytes(value, opts);\n if (typeof value === 'boolean')\n return boolToBytes(value, opts);\n if (isHex(value))\n return hexToBytes(value, opts);\n return stringToBytes(value, opts);\n}\n/**\n * Encodes a boolean into a byte array.\n *\n * - Docs: https://viem.sh/docs/utilities/toBytes#booltobytes\n *\n * @param value Boolean value to encode.\n * @param opts Options.\n * @returns Byte array value.\n *\n * @example\n * import { boolToBytes } from 'viem'\n * const data = boolToBytes(true)\n * // Uint8Array([1])\n *\n * @example\n * import { boolToBytes } from 'viem'\n * const data = boolToBytes(true, { size: 32 })\n * // Uint8Array([0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1])\n */\nexport function boolToBytes(value, opts = {}) {\n const bytes = new Uint8Array(1);\n bytes[0] = Number(value);\n if (typeof opts.size === 'number') {\n assertSize(bytes, { size: opts.size });\n return pad(bytes, { size: opts.size });\n }\n return bytes;\n}\n// We use very optimized technique to convert hex string to byte array\nconst charCodeMap = {\n zero: 48,\n nine: 57,\n A: 65,\n F: 70,\n a: 97,\n f: 102,\n};\nfunction charCodeToBase16(char) {\n if (char >= charCodeMap.zero && char <= charCodeMap.nine)\n return char - charCodeMap.zero;\n if (char >= charCodeMap.A && char <= charCodeMap.F)\n return char - (charCodeMap.A - 10);\n if (char >= charCodeMap.a && char <= charCodeMap.f)\n return char - (charCodeMap.a - 10);\n return undefined;\n}\n/**\n * Encodes a hex string into a byte array.\n *\n * - Docs: https://viem.sh/docs/utilities/toBytes#hextobytes\n *\n * @param hex Hex string to encode.\n * @param opts Options.\n * @returns Byte array value.\n *\n * @example\n * import { hexToBytes } from 'viem'\n * const data = hexToBytes('0x48656c6c6f20776f726c6421')\n * // Uint8Array([72, 101, 108, 108, 111, 32, 87, 111, 114, 108, 100, 33])\n *\n * @example\n * import { hexToBytes } from 'viem'\n * const data = hexToBytes('0x48656c6c6f20776f726c6421', { size: 32 })\n * // Uint8Array([72, 101, 108, 108, 111, 32, 87, 111, 114, 108, 100, 33, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0])\n */\nexport function hexToBytes(hex_, opts = {}) {\n let hex = hex_;\n if (opts.size) {\n assertSize(hex, { size: opts.size });\n hex = pad(hex, { dir: 'right', size: opts.size });\n }\n let hexString = hex.slice(2);\n if (hexString.length % 2)\n hexString = `0${hexString}`;\n const length = hexString.length / 2;\n const bytes = new Uint8Array(length);\n for (let index = 0, j = 0; index < length; index++) {\n const nibbleLeft = charCodeToBase16(hexString.charCodeAt(j++));\n const nibbleRight = charCodeToBase16(hexString.charCodeAt(j++));\n if (nibbleLeft === undefined || nibbleRight === undefined) {\n throw new BaseError(`Invalid byte sequence (\"${hexString[j - 2]}${hexString[j - 1]}\" in \"${hexString}\").`);\n }\n bytes[index] = nibbleLeft * 16 + nibbleRight;\n }\n return bytes;\n}\n/**\n * Encodes a number into a byte array.\n *\n * - Docs: https://viem.sh/docs/utilities/toBytes#numbertobytes\n *\n * @param value Number to encode.\n * @param opts Options.\n * @returns Byte array value.\n *\n * @example\n * import { numberToBytes } from 'viem'\n * const data = numberToBytes(420)\n * // Uint8Array([1, 164])\n *\n * @example\n * import { numberToBytes } from 'viem'\n * const data = numberToBytes(420, { size: 4 })\n * // Uint8Array([0, 0, 1, 164])\n */\nexport function numberToBytes(value, opts) {\n const hex = numberToHex(value, opts);\n return hexToBytes(hex);\n}\n/**\n * Encodes a UTF-8 string into a byte array.\n *\n * - Docs: https://viem.sh/docs/utilities/toBytes#stringtobytes\n *\n * @param value String to encode.\n * @param opts Options.\n * @returns Byte array value.\n *\n * @example\n * import { stringToBytes } from 'viem'\n * const data = stringToBytes('Hello world!')\n * // Uint8Array([72, 101, 108, 108, 111, 32, 119, 111, 114, 108, 100, 33])\n *\n * @example\n * import { stringToBytes } from 'viem'\n * const data = stringToBytes('Hello world!', { size: 32 })\n * // Uint8Array([72, 101, 108, 108, 111, 32, 87, 111, 114, 108, 100, 33, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0])\n */\nexport function stringToBytes(value, opts = {}) {\n const bytes = encoder.encode(value);\n if (typeof opts.size === 'number') {\n assertSize(bytes, { size: opts.size });\n return pad(bytes, { dir: 'right', size: opts.size });\n }\n return bytes;\n}\n//# sourceMappingURL=toBytes.js.map","/**\n * Internal helpers for u64. BigUint64Array is too slow as per 2025, so we implement it using Uint32Array.\n * @todo re-check https://issues.chromium.org/issues/42212588\n * @module\n */\nconst U32_MASK64 = /* @__PURE__ */ BigInt(2 ** 32 - 1);\nconst _32n = /* @__PURE__ */ BigInt(32);\nfunction fromBig(n, le = false) {\n if (le)\n return { h: Number(n & U32_MASK64), l: Number((n >> _32n) & U32_MASK64) };\n return { h: Number((n >> _32n) & U32_MASK64) | 0, l: Number(n & U32_MASK64) | 0 };\n}\nfunction split(lst, le = false) {\n const len = lst.length;\n let Ah = new Uint32Array(len);\n let Al = new Uint32Array(len);\n for (let i = 0; i < len; i++) {\n const { h, l } = fromBig(lst[i], le);\n [Ah[i], Al[i]] = [h, l];\n }\n return [Ah, Al];\n}\nconst toBig = (h, l) => (BigInt(h >>> 0) << _32n) | BigInt(l >>> 0);\n// for Shift in [0, 32)\nconst shrSH = (h, _l, s) => h >>> s;\nconst shrSL = (h, l, s) => (h << (32 - s)) | (l >>> s);\n// Right rotate for Shift in [1, 32)\nconst rotrSH = (h, l, s) => (h >>> s) | (l << (32 - s));\nconst rotrSL = (h, l, s) => (h << (32 - s)) | (l >>> s);\n// Right rotate for Shift in (32, 64), NOTE: 32 is special case.\nconst rotrBH = (h, l, s) => (h << (64 - s)) | (l >>> (s - 32));\nconst rotrBL = (h, l, s) => (h >>> (s - 32)) | (l << (64 - s));\n// Right rotate for shift===32 (just swaps l&h)\nconst rotr32H = (_h, l) => l;\nconst rotr32L = (h, _l) => h;\n// Left rotate for Shift in [1, 32)\nconst rotlSH = (h, l, s) => (h << s) | (l >>> (32 - s));\nconst rotlSL = (h, l, s) => (l << s) | (h >>> (32 - s));\n// Left rotate for Shift in (32, 64), NOTE: 32 is special case.\nconst rotlBH = (h, l, s) => (l << (s - 32)) | (h >>> (64 - s));\nconst rotlBL = (h, l, s) => (h << (s - 32)) | (l >>> (64 - s));\n// JS uses 32-bit signed integers for bitwise operations which means we cannot\n// simple take carry out of low bit sum by shift, we need to use division.\nfunction add(Ah, Al, Bh, Bl) {\n const l = (Al >>> 0) + (Bl >>> 0);\n return { h: (Ah + Bh + ((l / 2 ** 32) | 0)) | 0, l: l | 0 };\n}\n// Addition with more than 2 elements\nconst add3L = (Al, Bl, Cl) => (Al >>> 0) + (Bl >>> 0) + (Cl >>> 0);\nconst add3H = (low, Ah, Bh, Ch) => (Ah + Bh + Ch + ((low / 2 ** 32) | 0)) | 0;\nconst add4L = (Al, Bl, Cl, Dl) => (Al >>> 0) + (Bl >>> 0) + (Cl >>> 0) + (Dl >>> 0);\nconst add4H = (low, Ah, Bh, Ch, Dh) => (Ah + Bh + Ch + Dh + ((low / 2 ** 32) | 0)) | 0;\nconst add5L = (Al, Bl, Cl, Dl, El) => (Al >>> 0) + (Bl >>> 0) + (Cl >>> 0) + (Dl >>> 0) + (El >>> 0);\nconst add5H = (low, Ah, Bh, Ch, Dh, Eh) => (Ah + Bh + Ch + Dh + Eh + ((low / 2 ** 32) | 0)) | 0;\n// prettier-ignore\nexport { add, add3H, add3L, add4H, add4L, add5H, add5L, fromBig, rotlBH, rotlBL, rotlSH, rotlSL, rotr32H, rotr32L, rotrBH, rotrBL, rotrSH, rotrSL, shrSH, shrSL, split, toBig };\n// prettier-ignore\nconst u64 = {\n fromBig, split, toBig,\n shrSH, shrSL,\n rotrSH, rotrSL, rotrBH, rotrBL,\n rotr32H, rotr32L,\n rotlSH, rotlSL, rotlBH, rotlBL,\n add, add3L, add3H, add4L, add4H, add5H, add5L,\n};\nexport default u64;\n//# sourceMappingURL=_u64.js.map","/**\n * Utilities for hex, bytes, CSPRNG.\n * @module\n */\n/*! noble-hashes - MIT License (c) 2022 Paul Miller (paulmillr.com) */\n// We use WebCrypto aka globalThis.crypto, which exists in browsers and node.js 16+.\n// node.js versions earlier than v19 don't declare it in global scope.\n// For node.js, package.json#exports field mapping rewrites import\n// from `crypto` to `cryptoNode`, which imports native module.\n// Makes the utils un-importable in browsers without a bundler.\n// Once node.js 18 is deprecated (2025-04-30), we can just drop the import.\nimport { crypto } from '@noble/hashes/crypto';\n/** Checks if something is Uint8Array. Be careful: nodejs Buffer will return true. */\nexport function isBytes(a) {\n return a instanceof Uint8Array || (ArrayBuffer.isView(a) && a.constructor.name === 'Uint8Array');\n}\n/** Asserts something is positive integer. */\nexport function anumber(n) {\n if (!Number.isSafeInteger(n) || n < 0)\n throw new Error('positive integer expected, got ' + n);\n}\n/** Asserts something is Uint8Array. */\nexport function abytes(b, ...lengths) {\n if (!isBytes(b))\n throw new Error('Uint8Array expected');\n if (lengths.length > 0 && !lengths.includes(b.length))\n throw new Error('Uint8Array expected of length ' + lengths + ', got length=' + b.length);\n}\n/** Asserts something is hash */\nexport function ahash(h) {\n if (typeof h !== 'function' || typeof h.create !== 'function')\n throw new Error('Hash should be wrapped by utils.createHasher');\n anumber(h.outputLen);\n anumber(h.blockLen);\n}\n/** Asserts a hash instance has not been destroyed / finished */\nexport function aexists(instance, checkFinished = true) {\n if (instance.destroyed)\n throw new Error('Hash instance has been destroyed');\n if (checkFinished && instance.finished)\n throw new Error('Hash#digest() has already been called');\n}\n/** Asserts output is properly-sized byte array */\nexport function aoutput(out, instance) {\n abytes(out);\n const min = instance.outputLen;\n if (out.length < min) {\n throw new Error('digestInto() expects output buffer of length at least ' + min);\n }\n}\n/** Cast u8 / u16 / u32 to u8. */\nexport function u8(arr) {\n return new Uint8Array(arr.buffer, arr.byteOffset, arr.byteLength);\n}\n/** Cast u8 / u16 / u32 to u32. */\nexport function u32(arr) {\n return new Uint32Array(arr.buffer, arr.byteOffset, Math.floor(arr.byteLength / 4));\n}\n/** Zeroize a byte array. Warning: JS provides no guarantees. */\nexport function clean(...arrays) {\n for (let i = 0; i < arrays.length; i++) {\n arrays[i].fill(0);\n }\n}\n/** Create DataView of an array for easy byte-level manipulation. */\nexport function createView(arr) {\n return new DataView(arr.buffer, arr.byteOffset, arr.byteLength);\n}\n/** The rotate right (circular right shift) operation for uint32 */\nexport function rotr(word, shift) {\n return (word << (32 - shift)) | (word >>> shift);\n}\n/** The rotate left (circular left shift) operation for uint32 */\nexport function rotl(word, shift) {\n return (word << shift) | ((word >>> (32 - shift)) >>> 0);\n}\n/** Is current platform little-endian? Most are. Big-Endian platform: IBM */\nexport const isLE = /* @__PURE__ */ (() => new Uint8Array(new Uint32Array([0x11223344]).buffer)[0] === 0x44)();\n/** The byte swap operation for uint32 */\nexport function byteSwap(word) {\n return (((word << 24) & 0xff000000) |\n ((word << 8) & 0xff0000) |\n ((word >>> 8) & 0xff00) |\n ((word >>> 24) & 0xff));\n}\n/** Conditionally byte swap if on a big-endian platform */\nexport const swap8IfBE = isLE\n ? (n) => n\n : (n) => byteSwap(n);\n/** @deprecated */\nexport const byteSwapIfBE = swap8IfBE;\n/** In place byte swap for Uint32Array */\nexport function byteSwap32(arr) {\n for (let i = 0; i < arr.length; i++) {\n arr[i] = byteSwap(arr[i]);\n }\n return arr;\n}\nexport const swap32IfBE = isLE\n ? (u) => u\n : byteSwap32;\n// Built-in hex conversion https://caniuse.com/mdn-javascript_builtins_uint8array_fromhex\nconst hasHexBuiltin = /* @__PURE__ */ (() => \n// @ts-ignore\ntypeof Uint8Array.from([]).toHex === 'function' && typeof Uint8Array.fromHex === 'function')();\n// Array where index 0xf0 (240) is mapped to string 'f0'\nconst hexes = /* @__PURE__ */ Array.from({ length: 256 }, (_, i) => i.toString(16).padStart(2, '0'));\n/**\n * Convert byte array to hex string. Uses built-in function, when available.\n * @example bytesToHex(Uint8Array.from([0xca, 0xfe, 0x01, 0x23])) // 'cafe0123'\n */\nexport function bytesToHex(bytes) {\n abytes(bytes);\n // @ts-ignore\n if (hasHexBuiltin)\n return bytes.toHex();\n // pre-caching improves the speed 6x\n let hex = '';\n for (let i = 0; i < bytes.length; i++) {\n hex += hexes[bytes[i]];\n }\n return hex;\n}\n// We use optimized technique to convert hex string to byte array\nconst asciis = { _0: 48, _9: 57, A: 65, F: 70, a: 97, f: 102 };\nfunction asciiToBase16(ch) {\n if (ch >= asciis._0 && ch <= asciis._9)\n return ch - asciis._0; // '2' => 50-48\n if (ch >= asciis.A && ch <= asciis.F)\n return ch - (asciis.A - 10); // 'B' => 66-(65-10)\n if (ch >= asciis.a && ch <= asciis.f)\n return ch - (asciis.a - 10); // 'b' => 98-(97-10)\n return;\n}\n/**\n * Convert hex string to byte array. Uses built-in function, when available.\n * @example hexToBytes('cafe0123') // Uint8Array.from([0xca, 0xfe, 0x01, 0x23])\n */\nexport function hexToBytes(hex) {\n if (typeof hex !== 'string')\n throw new Error('hex string expected, got ' + typeof hex);\n // @ts-ignore\n if (hasHexBuiltin)\n return Uint8Array.fromHex(hex);\n const hl = hex.length;\n const al = hl / 2;\n if (hl % 2)\n throw new Error('hex string expected, got unpadded hex of length ' + hl);\n const array = new Uint8Array(al);\n for (let ai = 0, hi = 0; ai < al; ai++, hi += 2) {\n const n1 = asciiToBase16(hex.charCodeAt(hi));\n const n2 = asciiToBase16(hex.charCodeAt(hi + 1));\n if (n1 === undefined || n2 === undefined) {\n const char = hex[hi] + hex[hi + 1];\n throw new Error('hex string expected, got non-hex character \"' + char + '\" at index ' + hi);\n }\n array[ai] = n1 * 16 + n2; // multiply first octet, e.g. 'a3' => 10*16+3 => 160 + 3 => 163\n }\n return array;\n}\n/**\n * There is no setImmediate in browser and setTimeout is slow.\n * Call of async fn will return Promise, which will be fullfiled only on\n * next scheduler queue processing step and this is exactly what we need.\n */\nexport const nextTick = async () => { };\n/** Returns control to thread each 'tick' ms to avoid blocking. */\nexport async function asyncLoop(iters, tick, cb) {\n let ts = Date.now();\n for (let i = 0; i < iters; i++) {\n cb(i);\n // Date.now() is not monotonic, so in case if clock goes backwards we return return control too\n const diff = Date.now() - ts;\n if (diff >= 0 && diff < tick)\n continue;\n await nextTick();\n ts += diff;\n }\n}\n/**\n * Converts string to bytes using UTF8 encoding.\n * @example utf8ToBytes('abc') // Uint8Array.from([97, 98, 99])\n */\nexport function utf8ToBytes(str) {\n if (typeof str !== 'string')\n throw new Error('string expected');\n return new Uint8Array(new TextEncoder().encode(str)); // https://bugzil.la/1681809\n}\n/**\n * Converts bytes to string using UTF8 encoding.\n * @example bytesToUtf8(Uint8Array.from([97, 98, 99])) // 'abc'\n */\nexport function bytesToUtf8(bytes) {\n return new TextDecoder().decode(bytes);\n}\n/**\n * Normalizes (non-hex) string or Uint8Array to Uint8Array.\n * Warning: when Uint8Array is passed, it would NOT get copied.\n * Keep in mind for future mutable operations.\n */\nexport function toBytes(data) {\n if (typeof data === 'string')\n data = utf8ToBytes(data);\n abytes(data);\n return data;\n}\n/**\n * Helper for KDFs: consumes uint8array or string.\n * When string is passed, does utf8 decoding, using TextDecoder.\n */\nexport function kdfInputToBytes(data) {\n if (typeof data === 'string')\n data = utf8ToBytes(data);\n abytes(data);\n return data;\n}\n/** Copies several Uint8Arrays into one. */\nexport function concatBytes(...arrays) {\n let sum = 0;\n for (let i = 0; i < arrays.length; i++) {\n const a = arrays[i];\n abytes(a);\n sum += a.length;\n }\n const res = new Uint8Array(sum);\n for (let i = 0, pad = 0; i < arrays.length; i++) {\n const a = arrays[i];\n res.set(a, pad);\n pad += a.length;\n }\n return res;\n}\nexport function checkOpts(defaults, opts) {\n if (opts !== undefined && {}.toString.call(opts) !== '[object Object]')\n throw new Error('options should be object or undefined');\n const merged = Object.assign(defaults, opts);\n return merged;\n}\n/** For runtime check if class implements interface */\nexport class Hash {\n}\n/** Wraps hash function, creating an interface on top of it */\nexport function createHasher(hashCons) {\n const hashC = (msg) => hashCons().update(toBytes(msg)).digest();\n const tmp = hashCons();\n hashC.outputLen = tmp.outputLen;\n hashC.blockLen = tmp.blockLen;\n hashC.create = () => hashCons();\n return hashC;\n}\nexport function createOptHasher(hashCons) {\n const hashC = (msg, opts) => hashCons(opts).update(toBytes(msg)).digest();\n const tmp = hashCons({});\n hashC.outputLen = tmp.outputLen;\n hashC.blockLen = tmp.blockLen;\n hashC.create = (opts) => hashCons(opts);\n return hashC;\n}\nexport function createXOFer(hashCons) {\n const hashC = (msg, opts) => hashCons(opts).update(toBytes(msg)).digest();\n const tmp = hashCons({});\n hashC.outputLen = tmp.outputLen;\n hashC.blockLen = tmp.blockLen;\n hashC.create = (opts) => hashCons(opts);\n return hashC;\n}\nexport const wrapConstructor = createHasher;\nexport const wrapConstructorWithOpts = createOptHasher;\nexport const wrapXOFConstructorWithOpts = createXOFer;\n/** Cryptographically secure PRNG. Uses internal OS-level `crypto.getRandomValues`. */\nexport function randomBytes(bytesLength = 32) {\n if (crypto && typeof crypto.getRandomValues === 'function') {\n return crypto.getRandomValues(new Uint8Array(bytesLength));\n }\n // Legacy Node.js compatibility\n if (crypto && typeof crypto.randomBytes === 'function') {\n return Uint8Array.from(crypto.randomBytes(bytesLength));\n }\n throw new Error('crypto.getRandomValues must be defined');\n}\n//# sourceMappingURL=utils.js.map","/**\n * SHA3 (keccak) hash function, based on a new \"Sponge function\" design.\n * Different from older hashes, the internal state is bigger than output size.\n *\n * Check out [FIPS-202](https://nvlpubs.nist.gov/nistpubs/FIPS/NIST.FIPS.202.pdf),\n * [Website](https://keccak.team/keccak.html),\n * [the differences between SHA-3 and Keccak](https://crypto.stackexchange.com/questions/15727/what-are-the-key-differences-between-the-draft-sha-3-standard-and-the-keccak-sub).\n *\n * Check out `sha3-addons` module for cSHAKE, k12, and others.\n * @module\n */\nimport { rotlBH, rotlBL, rotlSH, rotlSL, split } from \"./_u64.js\";\n// prettier-ignore\nimport { abytes, aexists, anumber, aoutput, clean, createHasher, createXOFer, Hash, swap32IfBE, toBytes, u32 } from \"./utils.js\";\n// No __PURE__ annotations in sha3 header:\n// EVERYTHING is in fact used on every export.\n// Various per round constants calculations\nconst _0n = BigInt(0);\nconst _1n = BigInt(1);\nconst _2n = BigInt(2);\nconst _7n = BigInt(7);\nconst _256n = BigInt(256);\nconst _0x71n = BigInt(0x71);\nconst SHA3_PI = [];\nconst SHA3_ROTL = [];\nconst _SHA3_IOTA = [];\nfor (let round = 0, R = _1n, x = 1, y = 0; round < 24; round++) {\n // Pi\n [x, y] = [y, (2 * x + 3 * y) % 5];\n SHA3_PI.push(2 * (5 * y + x));\n // Rotational\n SHA3_ROTL.push((((round + 1) * (round + 2)) / 2) % 64);\n // Iota\n let t = _0n;\n for (let j = 0; j < 7; j++) {\n R = ((R << _1n) ^ ((R >> _7n) * _0x71n)) % _256n;\n if (R & _2n)\n t ^= _1n << ((_1n << /* @__PURE__ */ BigInt(j)) - _1n);\n }\n _SHA3_IOTA.push(t);\n}\nconst IOTAS = split(_SHA3_IOTA, true);\nconst SHA3_IOTA_H = IOTAS[0];\nconst SHA3_IOTA_L = IOTAS[1];\n// Left rotation (without 0, 32, 64)\nconst rotlH = (h, l, s) => (s > 32 ? rotlBH(h, l, s) : rotlSH(h, l, s));\nconst rotlL = (h, l, s) => (s > 32 ? rotlBL(h, l, s) : rotlSL(h, l, s));\n/** `keccakf1600` internal function, additionally allows to adjust round count. */\nexport function keccakP(s, rounds = 24) {\n const B = new Uint32Array(5 * 2);\n // NOTE: all indices are x2 since we store state as u32 instead of u64 (bigints to slow in js)\n for (let round = 24 - rounds; round < 24; round++) {\n // Theta θ\n for (let x = 0; x < 10; x++)\n B[x] = s[x] ^ s[x + 10] ^ s[x + 20] ^ s[x + 30] ^ s[x + 40];\n for (let x = 0; x < 10; x += 2) {\n const idx1 = (x + 8) % 10;\n const idx0 = (x + 2) % 10;\n const B0 = B[idx0];\n const B1 = B[idx0 + 1];\n const Th = rotlH(B0, B1, 1) ^ B[idx1];\n const Tl = rotlL(B0, B1, 1) ^ B[idx1 + 1];\n for (let y = 0; y < 50; y += 10) {\n s[x + y] ^= Th;\n s[x + y + 1] ^= Tl;\n }\n }\n // Rho (ρ) and Pi (π)\n let curH = s[2];\n let curL = s[3];\n for (let t = 0; t < 24; t++) {\n const shift = SHA3_ROTL[t];\n const Th = rotlH(curH, curL, shift);\n const Tl = rotlL(curH, curL, shift);\n const PI = SHA3_PI[t];\n curH = s[PI];\n curL = s[PI + 1];\n s[PI] = Th;\n s[PI + 1] = Tl;\n }\n // Chi (χ)\n for (let y = 0; y < 50; y += 10) {\n for (let x = 0; x < 10; x++)\n B[x] = s[y + x];\n for (let x = 0; x < 10; x++)\n s[y + x] ^= ~B[(x + 2) % 10] & B[(x + 4) % 10];\n }\n // Iota (ι)\n s[0] ^= SHA3_IOTA_H[round];\n s[1] ^= SHA3_IOTA_L[round];\n }\n clean(B);\n}\n/** Keccak sponge function. */\nexport class Keccak extends Hash {\n // NOTE: we accept arguments in bytes instead of bits here.\n constructor(blockLen, suffix, outputLen, enableXOF = false, rounds = 24) {\n super();\n this.pos = 0;\n this.posOut = 0;\n this.finished = false;\n this.destroyed = false;\n this.enableXOF = false;\n this.blockLen = blockLen;\n this.suffix = suffix;\n this.outputLen = outputLen;\n this.enableXOF = enableXOF;\n this.rounds = rounds;\n // Can be passed from user as dkLen\n anumber(outputLen);\n // 1600 = 5x5 matrix of 64bit. 1600 bits === 200 bytes\n // 0 < blockLen < 200\n if (!(0 < blockLen && blockLen < 200))\n throw new Error('only keccak-f1600 function is supported');\n this.state = new Uint8Array(200);\n this.state32 = u32(this.state);\n }\n clone() {\n return this._cloneInto();\n }\n keccak() {\n swap32IfBE(this.state32);\n keccakP(this.state32, this.rounds);\n swap32IfBE(this.state32);\n this.posOut = 0;\n this.pos = 0;\n }\n update(data) {\n aexists(this);\n data = toBytes(data);\n abytes(data);\n const { blockLen, state } = this;\n const len = data.length;\n for (let pos = 0; pos < len;) {\n const take = Math.min(blockLen - this.pos, len - pos);\n for (let i = 0; i < take; i++)\n state[this.pos++] ^= data[pos++];\n if (this.pos === blockLen)\n this.keccak();\n }\n return this;\n }\n finish() {\n if (this.finished)\n return;\n this.finished = true;\n const { state, suffix, pos, blockLen } = this;\n // Do the padding\n state[pos] ^= suffix;\n if ((suffix & 0x80) !== 0 && pos === blockLen - 1)\n this.keccak();\n state[blockLen - 1] ^= 0x80;\n this.keccak();\n }\n writeInto(out) {\n aexists(this, false);\n abytes(out);\n this.finish();\n const bufferOut = this.state;\n const { blockLen } = this;\n for (let pos = 0, len = out.length; pos < len;) {\n if (this.posOut >= blockLen)\n this.keccak();\n const take = Math.min(blockLen - this.posOut, len - pos);\n out.set(bufferOut.subarray(this.posOut, this.posOut + take), pos);\n this.posOut += take;\n pos += take;\n }\n return out;\n }\n xofInto(out) {\n // Sha3/Keccak usage with XOF is probably mistake, only SHAKE instances can do XOF\n if (!this.enableXOF)\n throw new Error('XOF is not possible for this instance');\n return this.writeInto(out);\n }\n xof(bytes) {\n anumber(bytes);\n return this.xofInto(new Uint8Array(bytes));\n }\n digestInto(out) {\n aoutput(out, this);\n if (this.finished)\n throw new Error('digest() was already called');\n this.writeInto(out);\n this.destroy();\n return out;\n }\n digest() {\n return this.digestInto(new Uint8Array(this.outputLen));\n }\n destroy() {\n this.destroyed = true;\n clean(this.state);\n }\n _cloneInto(to) {\n const { blockLen, suffix, outputLen, rounds, enableXOF } = this;\n to || (to = new Keccak(blockLen, suffix, outputLen, enableXOF, rounds));\n to.state32.set(this.state32);\n to.pos = this.pos;\n to.posOut = this.posOut;\n to.finished = this.finished;\n to.rounds = rounds;\n // Suffix can change in cSHAKE\n to.suffix = suffix;\n to.outputLen = outputLen;\n to.enableXOF = enableXOF;\n to.destroyed = this.destroyed;\n return to;\n }\n}\nconst gen = (suffix, blockLen, outputLen) => createHasher(() => new Keccak(blockLen, suffix, outputLen));\n/** SHA3-224 hash function. */\nexport const sha3_224 = /* @__PURE__ */ (() => gen(0x06, 144, 224 / 8))();\n/** SHA3-256 hash function. Different from keccak-256. */\nexport const sha3_256 = /* @__PURE__ */ (() => gen(0x06, 136, 256 / 8))();\n/** SHA3-384 hash function. */\nexport const sha3_384 = /* @__PURE__ */ (() => gen(0x06, 104, 384 / 8))();\n/** SHA3-512 hash function. */\nexport const sha3_512 = /* @__PURE__ */ (() => gen(0x06, 72, 512 / 8))();\n/** keccak-224 hash function. */\nexport const keccak_224 = /* @__PURE__ */ (() => gen(0x01, 144, 224 / 8))();\n/** keccak-256 hash function. Different from SHA3-256. */\nexport const keccak_256 = /* @__PURE__ */ (() => gen(0x01, 136, 256 / 8))();\n/** keccak-384 hash function. */\nexport const keccak_384 = /* @__PURE__ */ (() => gen(0x01, 104, 384 / 8))();\n/** keccak-512 hash function. */\nexport const keccak_512 = /* @__PURE__ */ (() => gen(0x01, 72, 512 / 8))();\nconst genShake = (suffix, blockLen, outputLen) => createXOFer((opts = {}) => new Keccak(blockLen, suffix, opts.dkLen === undefined ? outputLen : opts.dkLen, true));\n/** SHAKE128 XOF with 128-bit security. */\nexport const shake128 = /* @__PURE__ */ (() => genShake(0x1f, 168, 128 / 8))();\n/** SHAKE256 XOF with 256-bit security. */\nexport const shake256 = /* @__PURE__ */ (() => genShake(0x1f, 136, 256 / 8))();\n//# sourceMappingURL=sha3.js.map","import { keccak_256 } from '@noble/hashes/sha3';\nimport { isHex } from '../data/isHex.js';\nimport { toBytes } from '../encoding/toBytes.js';\nimport { toHex } from '../encoding/toHex.js';\nexport function keccak256(value, to_) {\n const to = to_ || 'hex';\n const bytes = keccak_256(isHex(value, { strict: false }) ? toBytes(value) : value);\n if (to === 'bytes')\n return bytes;\n return toHex(bytes);\n}\n//# sourceMappingURL=keccak256.js.map","import { toBytes } from '../encoding/toBytes.js';\nimport { keccak256 } from './keccak256.js';\nconst hash = (value) => keccak256(toBytes(value));\nexport function hashSignature(sig) {\n return hash(sig);\n}\n//# sourceMappingURL=hashSignature.js.map","import { BaseError } from '../../errors/base.js';\nexport function normalizeSignature(signature) {\n let active = true;\n let current = '';\n let level = 0;\n let result = '';\n let valid = false;\n for (let i = 0; i < signature.length; i++) {\n const char = signature[i];\n // If the character is a separator, we want to reactivate.\n if (['(', ')', ','].includes(char))\n active = true;\n // If the character is a \"level\" token, we want to increment/decrement.\n if (char === '(')\n level++;\n if (char === ')')\n level--;\n // If we aren't active, we don't want to mutate the result.\n if (!active)\n continue;\n // If level === 0, we are at the definition level.\n if (level === 0) {\n if (char === ' ' && ['event', 'function', ''].includes(result))\n result = '';\n else {\n result += char;\n // If we are at the end of the definition, we must be finished.\n if (char === ')') {\n valid = true;\n break;\n }\n }\n continue;\n }\n // Ignore spaces\n if (char === ' ') {\n // If the previous character is a separator, and the current section isn't empty, we want to deactivate.\n if (signature[i - 1] !== ',' && current !== ',' && current !== ',(') {\n current = '';\n active = false;\n }\n continue;\n }\n result += char;\n current += char;\n }\n if (!valid)\n throw new BaseError('Unable to normalize signature.');\n return result;\n}\n//# sourceMappingURL=normalizeSignature.js.map","import { formatAbiItem } from 'abitype';\nimport { normalizeSignature, } from './normalizeSignature.js';\n/**\n * Returns the signature for a given function or event definition.\n *\n * @example\n * const signature = toSignature('function ownerOf(uint256 tokenId)')\n * // 'ownerOf(uint256)'\n *\n * @example\n * const signature_3 = toSignature({\n * name: 'ownerOf',\n * type: 'function',\n * inputs: [{ name: 'tokenId', type: 'uint256' }],\n * outputs: [],\n * stateMutability: 'view',\n * })\n * // 'ownerOf(uint256)'\n */\nexport const toSignature = (def) => {\n const def_ = (() => {\n if (typeof def === 'string')\n return def;\n return formatAbiItem(def);\n })();\n return normalizeSignature(def_);\n};\n//# sourceMappingURL=toSignature.js.map","import { hashSignature } from './hashSignature.js';\nimport { toSignature } from './toSignature.js';\n/**\n * Returns the hash (of the function/event signature) for a given event or function definition.\n */\nexport function toSignatureHash(fn) {\n return hashSignature(toSignature(fn));\n}\n//# sourceMappingURL=toSignatureHash.js.map","import { toSignatureHash, } from './toSignatureHash.js';\n/**\n * Returns the event selector for a given event definition.\n *\n * @example\n * const selector = toEventSelector('Transfer(address indexed from, address indexed to, uint256 amount)')\n * // 0xddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef\n */\nexport const toEventSelector = toSignatureHash;\n//# sourceMappingURL=toEventSelector.js.map","import { BaseError } from './base.js';\nexport class InvalidAddressError extends BaseError {\n constructor({ address }) {\n super(`Address \"${address}\" is invalid.`, {\n metaMessages: [\n '- Address must be a hex value of 20 bytes (40 hex characters).',\n '- Address must match its checksum counterpart.',\n ],\n name: 'InvalidAddressError',\n });\n }\n}\n//# sourceMappingURL=address.js.map","/**\n * Map with a LRU (Least recently used) policy.\n *\n * @link https://en.wikipedia.org/wiki/Cache_replacement_policies#LRU\n */\nexport class LruMap extends Map {\n constructor(size) {\n super();\n Object.defineProperty(this, \"maxSize\", {\n enumerable: true,\n configurable: true,\n writable: true,\n value: void 0\n });\n this.maxSize = size;\n }\n get(key) {\n const value = super.get(key);\n if (super.has(key)) {\n super.delete(key);\n super.set(key, value);\n }\n return value;\n }\n set(key, value) {\n if (super.has(key))\n super.delete(key);\n super.set(key, value);\n if (this.maxSize && this.size > this.maxSize) {\n const firstKey = super.keys().next().value;\n if (firstKey !== undefined)\n super.delete(firstKey);\n }\n return this;\n }\n}\n//# sourceMappingURL=lru.js.map","import { InvalidAddressError } from '../../errors/address.js';\nimport { stringToBytes, } from '../encoding/toBytes.js';\nimport { keccak256 } from '../hash/keccak256.js';\nimport { LruMap } from '../lru.js';\nimport { isAddress } from './isAddress.js';\nconst checksumAddressCache = /*#__PURE__*/ new LruMap(8192);\nexport function checksumAddress(address_, \n/**\n * Warning: EIP-1191 checksum addresses are generally not backwards compatible with the\n * wider Ethereum ecosystem, meaning it will break when validated against an application/tool\n * that relies on EIP-55 checksum encoding (checksum without chainId).\n *\n * It is highly recommended to not use this feature unless you\n * know what you are doing.\n *\n * See more: https://github.com/ethereum/EIPs/issues/1121\n */\nchainId) {\n if (checksumAddressCache.has(`${address_}.${chainId}`))\n return checksumAddressCache.get(`${address_}.${chainId}`);\n const hexAddress = chainId\n ? `${chainId}${address_.toLowerCase()}`\n : address_.substring(2).toLowerCase();\n const hash = keccak256(stringToBytes(hexAddress), 'bytes');\n const address = (chainId ? hexAddress.substring(`${chainId}0x`.length) : hexAddress).split('');\n for (let i = 0; i < 40; i += 2) {\n if (hash[i >> 1] >> 4 >= 8 && address[i]) {\n address[i] = address[i].toUpperCase();\n }\n if ((hash[i >> 1] & 0x0f) >= 8 && address[i + 1]) {\n address[i + 1] = address[i + 1].toUpperCase();\n }\n }\n const result = `0x${address.join('')}`;\n checksumAddressCache.set(`${address_}.${chainId}`, result);\n return result;\n}\nexport function getAddress(address, \n/**\n * Warning: EIP-1191 checksum addresses are generally not backwards compatible with the\n * wider Ethereum ecosystem, meaning it will break when validated against an application/tool\n * that relies on EIP-55 checksum encoding (checksum without chainId).\n *\n * It is highly recommended to not use this feature unless you\n * know what you are doing.\n *\n * See more: https://github.com/ethereum/EIPs/issues/1121\n */\nchainId) {\n if (!isAddress(address, { strict: false }))\n throw new InvalidAddressError({ address });\n return checksumAddress(address, chainId);\n}\n//# sourceMappingURL=getAddress.js.map","import { LruMap } from '../lru.js';\nimport { checksumAddress } from './getAddress.js';\nconst addressRegex = /^0x[a-fA-F0-9]{40}$/;\n/** @internal */\nexport const isAddressCache = /*#__PURE__*/ new LruMap(8192);\nexport function isAddress(address, options) {\n const { strict = true } = options ?? {};\n const cacheKey = `${address}.${strict}`;\n if (isAddressCache.has(cacheKey))\n return isAddressCache.get(cacheKey);\n const result = (() => {\n if (!addressRegex.test(address))\n return false;\n if (address.toLowerCase() === address)\n return true;\n if (strict)\n return checksumAddress(address) === address;\n return true;\n })();\n isAddressCache.set(cacheKey, result);\n return result;\n}\n//# sourceMappingURL=isAddress.js.map","export function concat(values) {\n if (typeof values[0] === 'string')\n return concatHex(values);\n return concatBytes(values);\n}\nexport function concatBytes(values) {\n let length = 0;\n for (const arr of values) {\n length += arr.length;\n }\n const result = new Uint8Array(length);\n let offset = 0;\n for (const arr of values) {\n result.set(arr, offset);\n offset += arr.length;\n }\n return result;\n}\nexport function concatHex(values) {\n return `0x${values.reduce((acc, x) => acc + x.replace('0x', ''), '')}`;\n}\n//# sourceMappingURL=concat.js.map","import { SliceOffsetOutOfBoundsError, } from '../../errors/data.js';\nimport { isHex } from './isHex.js';\nimport { size } from './size.js';\n/**\n * @description Returns a section of the hex or byte array given a start/end bytes offset.\n *\n * @param value The hex or byte array to slice.\n * @param start The start offset (in bytes).\n * @param end The end offset (in bytes).\n */\nexport function slice(value, start, end, { strict } = {}) {\n if (isHex(value, { strict: false }))\n return sliceHex(value, start, end, {\n strict,\n });\n return sliceBytes(value, start, end, {\n strict,\n });\n}\nfunction assertStartOffset(value, start) {\n if (typeof start === 'number' && start > 0 && start > size(value) - 1)\n throw new SliceOffsetOutOfBoundsError({\n offset: start,\n position: 'start',\n size: size(value),\n });\n}\nfunction assertEndOffset(value, start, end) {\n if (typeof start === 'number' &&\n typeof end === 'number' &&\n size(value) !== end - start) {\n throw new SliceOffsetOutOfBoundsError({\n offset: end,\n position: 'end',\n size: size(value),\n });\n }\n}\n/**\n * @description Returns a section of the byte array given a start/end bytes offset.\n *\n * @param value The byte array to slice.\n * @param start The start offset (in bytes).\n * @param end The end offset (in bytes).\n */\nexport function sliceBytes(value_, start, end, { strict } = {}) {\n assertStartOffset(value_, start);\n const value = value_.slice(start, end);\n if (strict)\n assertEndOffset(value, start, end);\n return value;\n}\n/**\n * @description Returns a section of the hex value given a start/end bytes offset.\n *\n * @param value The hex value to slice.\n * @param start The start offset (in bytes).\n * @param end The end offset (in bytes).\n */\nexport function sliceHex(value_, start, end, { strict } = {}) {\n assertStartOffset(value_, start);\n const value = `0x${value_\n .replace('0x', '')\n .slice((start ?? 0) * 2, (end ?? value_.length) * 2)}`;\n if (strict)\n assertEndOffset(value, start, end);\n return value;\n}\n//# sourceMappingURL=slice.js.map","export const arrayRegex = /^(.*)\\[([0-9]*)\\]$/;\n// `bytes<M>`: binary type of `M` bytes, `0 < M <= 32`\n// https://regexr.com/6va55\nexport const bytesRegex = /^bytes([1-9]|1[0-9]|2[0-9]|3[0-2])?$/;\n// `(u)int<M>`: (un)signed integer type of `M` bits, `0 < M <= 256`, `M % 8 == 0`\n// https://regexr.com/6v8hp\nexport const integerRegex = /^(u?int)(8|16|24|32|40|48|56|64|72|80|88|96|104|112|120|128|136|144|152|160|168|176|184|192|200|208|216|224|232|240|248|256)?$/;\n//# sourceMappingURL=regex.js.map","import { AbiEncodingArrayLengthMismatchError, AbiEncodingBytesSizeMismatchError, AbiEncodingLengthMismatchError, InvalidAbiEncodingTypeError, InvalidArrayError, } from '../../errors/abi.js';\nimport { InvalidAddressError, } from '../../errors/address.js';\nimport { BaseError } from '../../errors/base.js';\nimport { IntegerOutOfRangeError } from '../../errors/encoding.js';\nimport { isAddress } from '../address/isAddress.js';\nimport { concatHex } from '../data/concat.js';\nimport { padHex } from '../data/pad.js';\nimport { size } from '../data/size.js';\nimport { slice } from '../data/slice.js';\nimport { boolToHex, numberToHex, stringToHex, } from '../encoding/toHex.js';\nimport { integerRegex } from '../regex.js';\n/**\n * @description Encodes a list of primitive values into an ABI-encoded hex value.\n *\n * - Docs: https://viem.sh/docs/abi/encodeAbiParameters#encodeabiparameters\n *\n * Generates ABI encoded data using the [ABI specification](https://docs.soliditylang.org/en/latest/abi-spec), given a set of ABI parameters (inputs/outputs) and their corresponding values.\n *\n * @param params - a set of ABI Parameters (params), that can be in the shape of the inputs or outputs attribute of an ABI Item.\n * @param values - a set of values (values) that correspond to the given params.\n * @example\n * ```typescript\n * import { encodeAbiParameters } from 'viem'\n *\n * const encodedData = encodeAbiParameters(\n * [\n * { name: 'x', type: 'string' },\n * { name: 'y', type: 'uint' },\n * { name: 'z', type: 'bool' }\n * ],\n * ['wagmi', 420n, true]\n * )\n * ```\n *\n * You can also pass in Human Readable parameters with the parseAbiParameters utility.\n *\n * @example\n * ```typescript\n * import { encodeAbiParameters, parseAbiParameters } from 'viem'\n *\n * const encodedData = encodeAbiParameters(\n * parseAbiParameters('string x, uint y, bool z'),\n * ['wagmi', 420n, true]\n * )\n * ```\n */\nexport function encodeAbiParameters(params, values) {\n if (params.length !== values.length)\n throw new AbiEncodingLengthMismatchError({\n expectedLength: params.length,\n givenLength: values.length,\n });\n // Prepare the parameters to determine dynamic types to encode.\n const preparedParams = prepareParams({\n params: params,\n values: values,\n });\n return encodeParams(preparedParams);\n}\nfunction prepareParams({ params, values, }) {\n const preparedParams = [];\n for (let i = 0; i < params.length; i++) {\n preparedParams.push(prepareParam({ param: params[i], value: values[i] }));\n }\n return preparedParams;\n}\nfunction prepareParam({ param, value, }) {\n const arrayComponents = getArrayComponents(param.type);\n if (arrayComponents) {\n const [length, type] = arrayComponents;\n return encodeArray(value, { length, param: { ...param, type } });\n }\n if (param.type === 'tuple') {\n return encodeTuple(value, {\n param: param,\n });\n }\n if (param.type === 'address') {\n return encodeAddress(value);\n }\n if (param.type === 'bool') {\n return encodeBool(value);\n }\n if (param.type.startsWith('uint') || param.type.startsWith('int')) {\n const signed = param.type.startsWith('int');\n const [, , size = '256'] = integerRegex.exec(param.type) ?? [];\n return encodeNumber(value, {\n signed,\n size: Number(size),\n });\n }\n if (param.type.startsWith('bytes')) {\n return encodeBytes(value, { param });\n }\n if (param.type === 'string') {\n return encodeString(value);\n }\n throw new InvalidAbiEncodingTypeError(param.type, {\n docsPath: '/docs/contract/encodeAbiParameters',\n });\n}\nfunction encodeParams(preparedParams) {\n // 1. Compute the size of the static part of the parameters.\n let staticSize = 0;\n for (let i = 0; i < preparedParams.length; i++) {\n const { dynamic, encoded } = preparedParams[i];\n if (dynamic)\n staticSize += 32;\n else\n staticSize += size(encoded);\n }\n // 2. Split the parameters into static and dynamic parts.\n const staticParams = [];\n const dynamicParams = [];\n let dynamicSize = 0;\n for (let i = 0; i < preparedParams.length; i++) {\n const { dynamic, encoded } = preparedParams[i];\n if (dynamic) {\n staticParams.push(numberToHex(staticSize + dynamicSize, { size: 32 }));\n dynamicParams.push(encoded);\n dynamicSize += size(encoded);\n }\n else {\n staticParams.push(encoded);\n }\n }\n // 3. Concatenate static and dynamic parts.\n // `concatHex` returns `'0x'` for empty input (zero-width parameters).\n return concatHex([...staticParams, ...dynamicParams]);\n}\nfunction encodeAddress(value) {\n if (!isAddress(value))\n throw new InvalidAddressError({ address: value });\n return { dynamic: false, encoded: padHex(value.toLowerCase()) };\n}\nfunction encodeArray(value, { length, param, }) {\n const dynamic = length === null;\n if (!Array.isArray(value))\n throw new InvalidArrayError(value);\n if (!dynamic && value.length !== length)\n throw new AbiEncodingArrayLengthMismatchError({\n expectedLength: length,\n givenLength: value.length,\n type: `${param.type}[${length}]`,\n });\n // Zero-length fixed arrays of dynamic types (e.g. `string[0]`) are dynamic\n // per the ABI spec, even though they have no elements to inspect.\n let dynamicChild = value.length === 0 && isDynamicType(param);\n const preparedParams = [];\n for (let i = 0; i < value.length; i++) {\n const preparedParam = prepareParam({ param, value: value[i] });\n if (preparedParam.dynamic)\n dynamicChild = true;\n preparedParams.push(preparedParam);\n }\n if (dynamic || dynamicChild) {\n const data = encodeParams(preparedParams);\n if (dynamic) {\n const length = numberToHex(preparedParams.length, { size: 32 });\n return {\n dynamic: true,\n encoded: concatHex([length, data]),\n };\n }\n if (dynamicChild)\n return { dynamic: true, encoded: data };\n }\n return {\n dynamic: false,\n encoded: concatHex(preparedParams.map(({ encoded }) => encoded)),\n };\n}\nfunction encodeBytes(value, { param }) {\n const [, paramSize] = param.type.split('bytes');\n const bytesSize = size(value);\n if (!paramSize) {\n let value_ = value;\n // If the size is not divisible by 32 bytes, pad the end\n // with empty bytes to the ceiling 32 bytes.\n if (bytesSize % 32 !== 0)\n value_ = padHex(value_, {\n dir: 'right',\n size: Math.ceil((value.length - 2) / 2 / 32) * 32,\n });\n return {\n dynamic: true,\n encoded: concatHex([\n padHex(numberToHex(bytesSize, { size: 32 })),\n value_,\n ]),\n };\n }\n if (bytesSize !== Number.parseInt(paramSize, 10))\n throw new AbiEncodingBytesSizeMismatchError({\n expectedSize: Number.parseInt(paramSize, 10),\n value,\n });\n return { dynamic: false, encoded: padHex(value, { dir: 'right' }) };\n}\nfunction encodeBool(value) {\n if (typeof value !== 'boolean')\n throw new BaseError(`Invalid boolean value: \"${value}\" (type: ${typeof value}). Expected: \\`true\\` or \\`false\\`.`);\n return { dynamic: false, encoded: padHex(boolToHex(value)) };\n}\nfunction encodeNumber(value, { signed, size = 256 }) {\n if (typeof size === 'number') {\n const max = 2n ** (BigInt(size) - (signed ? 1n : 0n)) - 1n;\n const min = signed ? -max - 1n : 0n;\n if (value > max || value < min)\n throw new IntegerOutOfRangeError({\n max: max.toString(),\n min: min.toString(),\n signed,\n size: size / 8,\n value: value.toString(),\n });\n }\n return {\n dynamic: false,\n encoded: numberToHex(value, {\n size: 32,\n signed,\n }),\n };\n}\nfunction encodeString(value) {\n const hexValue = stringToHex(value);\n const partsLength = Math.ceil(size(hexValue) / 32);\n const parts = [];\n for (let i = 0; i < partsLength; i++) {\n parts.push(padHex(slice(hexValue, i * 32, (i + 1) * 32), {\n dir: 'right',\n }));\n }\n return {\n dynamic: true,\n encoded: concatHex([\n padHex(numberToHex(size(hexValue), { size: 32 })),\n ...parts,\n ]),\n };\n}\nfunction encodeTuple(value, { param }) {\n let dynamic = false;\n const preparedParams = [];\n for (let i = 0; i < param.components.length; i++) {\n const param_ = param.components[i];\n const index = Array.isArray(value) ? i : param_.name;\n const preparedParam = prepareParam({\n param: param_,\n value: value[index],\n });\n preparedParams.push(preparedParam);\n if (preparedParam.dynamic)\n dynamic = true;\n }\n return {\n dynamic,\n encoded: dynamic\n ? encodeParams(preparedParams)\n : concatHex(preparedParams.map(({ encoded }) => encoded)),\n };\n}\nexport function getArrayComponents(type) {\n const matches = type.match(/^(.*)\\[(\\d+)?\\]$/);\n return matches\n ? // Return `null` if the array is dynamic.\n [matches[2] ? Number(matches[2]) : null, matches[1]]\n : undefined;\n}\nfunction isDynamicType(param) {\n const { type } = param;\n if (type === 'string')\n return true;\n if (type === 'bytes')\n return true;\n if (type.endsWith('[]'))\n return true;\n if (type === 'tuple')\n return param.components.some(isDynamicType);\n const arrayComponents = getArrayComponents(type);\n if (arrayComponents)\n return isDynamicType({ ...param, type: arrayComponents[1] });\n return false;\n}\n//# sourceMappingURL=encodeAbiParameters.js.map","import { slice } from '../data/slice.js';\nimport { toSignatureHash, } from './toSignatureHash.js';\n/**\n * Returns the function selector for a given function definition.\n *\n * @example\n * const selector = toFunctionSelector('function ownerOf(uint256 tokenId)')\n * // 0x6352211e\n */\nexport const toFunctionSelector = (fn) => slice(toSignatureHash(fn), 0, 4);\n//# sourceMappingURL=toFunctionSelector.js.map","import { AbiItemAmbiguityError, } from '../../errors/abi.js';\nimport { isHex } from '../../utils/data/isHex.js';\nimport { isAddress } from '../address/isAddress.js';\nimport { toEventSelector } from '../hash/toEventSelector.js';\nimport { toFunctionSelector, } from '../hash/toFunctionSelector.js';\nexport function getAbiItem(parameters) {\n const { abi, args = [], name } = parameters;\n const isSelector = isHex(name, { strict: false });\n const abiItems = abi.filter((abiItem) => {\n if (isSelector) {\n if (abiItem.type === 'function')\n return toFunctionSelector(abiItem) === name;\n if (abiItem.type === 'event')\n return toEventSelector(abiItem) === name;\n return false;\n }\n return 'name' in abiItem && abiItem.name === name;\n });\n if (abiItems.length === 0)\n return undefined;\n if (abiItems.length === 1)\n return abiItems[0];\n let matchedAbiItem;\n for (const abiItem of abiItems) {\n if (!('inputs' in abiItem))\n continue;\n if (!args || args.length === 0) {\n if (!abiItem.inputs || abiItem.inputs.length === 0)\n return abiItem;\n continue;\n }\n if (!abiItem.inputs)\n continue;\n if (abiItem.inputs.length === 0)\n continue;\n if (abiItem.inputs.length !== args.length)\n continue;\n const matched = args.every((arg, index) => {\n const abiParameter = 'inputs' in abiItem && abiItem.inputs[index];\n if (!abiParameter)\n return false;\n return isArgOfType(arg, abiParameter);\n });\n if (matched) {\n // Check for ambiguity against already matched parameters (e.g. `address` vs `bytes20`).\n if (matchedAbiItem &&\n 'inputs' in matchedAbiItem &&\n matchedAbiItem.inputs) {\n const ambiguousTypes = getAmbiguousTypes(abiItem.inputs, matchedAbiItem.inputs, args);\n if (ambiguousTypes)\n throw new AbiItemAmbiguityError({\n abiItem,\n type: ambiguousTypes[0],\n }, {\n abiItem: matchedAbiItem,\n type: ambiguousTypes[1],\n });\n }\n matchedAbiItem = abiItem;\n }\n }\n if (matchedAbiItem)\n return matchedAbiItem;\n return abiItems[0];\n}\n/** @internal */\nexport function isArgOfType(arg, abiParameter) {\n const argType = typeof arg;\n const abiParameterType = abiParameter.type;\n switch (abiParameterType) {\n case 'address':\n return isAddress(arg, { strict: false });\n case 'bool':\n return argType === 'boolean';\n case 'function':\n return argType === 'string';\n case 'string':\n return argType === 'string';\n default: {\n if (abiParameterType === 'tuple' && 'components' in abiParameter)\n return Object.values(abiParameter.components).every((component, index) => {\n return (argType === 'object' &&\n isArgOfType(Object.values(arg)[index], component));\n });\n // `(u)int<M>`: (un)signed integer type of `M` bits, `0 < M <= 256`, `M % 8 == 0`\n // https://regexr.com/6v8hp\n if (/^u?int(8|16|24|32|40|48|56|64|72|80|88|96|104|112|120|128|136|144|152|160|168|176|184|192|200|208|216|224|232|240|248|256)?$/.test(abiParameterType))\n return argType === 'number' || argType === 'bigint';\n // `bytes<M>`: binary type of `M` bytes, `0 < M <= 32`\n // https://regexr.com/6va55\n if (/^bytes([1-9]|1[0-9]|2[0-9]|3[0-2])?$/.test(abiParameterType))\n return argType === 'string' || arg instanceof Uint8Array;\n // fixed-length (`<type>[M]`) and dynamic (`<type>[]`) arrays\n // https://regexr.com/6va6i\n if (/[a-z]+[1-9]{0,3}(\\[[0-9]{0,}\\])+$/.test(abiParameterType)) {\n return (Array.isArray(arg) &&\n arg.every((x) => isArgOfType(x, {\n ...abiParameter,\n // Pop off `[]` or `[M]` from end of type\n type: abiParameterType.replace(/(\\[[0-9]{0,}\\])$/, ''),\n })));\n }\n return false;\n }\n }\n}\n/** @internal */\nexport function getAmbiguousTypes(sourceParameters, targetParameters, args) {\n for (const parameterIndex in sourceParameters) {\n const sourceParameter = sourceParameters[parameterIndex];\n const targetParameter = targetParameters[parameterIndex];\n if (sourceParameter.type === 'tuple' &&\n targetParameter.type === 'tuple' &&\n 'components' in sourceParameter &&\n 'components' in targetParameter)\n return getAmbiguousTypes(sourceParameter.components, targetParameter.components, args[parameterIndex]);\n const types = [sourceParameter.type, targetParameter.type];\n const ambiguous = (() => {\n if (types.includes('address') && types.includes('bytes20'))\n return true;\n if (types.includes('address') && types.includes('string'))\n return isAddress(args[parameterIndex], { strict: false });\n if (types.includes('address') && types.includes('bytes'))\n return isAddress(args[parameterIndex], { strict: false });\n return false;\n })();\n if (ambiguous)\n return types;\n }\n return;\n}\n//# sourceMappingURL=getAbiItem.js.map","import { AbiEventNotFoundError, } from '../../errors/abi.js';\nimport { FilterTypeNotSupportedError, } from '../../errors/log.js';\nimport { toBytes } from '../encoding/toBytes.js';\nimport { keccak256 } from '../hash/keccak256.js';\nimport { toEventSelector, } from '../hash/toEventSelector.js';\nimport { encodeAbiParameters, } from './encodeAbiParameters.js';\nimport { formatAbiItem } from './formatAbiItem.js';\nimport { getAbiItem } from './getAbiItem.js';\nconst docsPath = '/docs/contract/encodeEventTopics';\nexport function encodeEventTopics(parameters) {\n const { abi, eventName, args } = parameters;\n let abiItem = abi[0];\n if (eventName) {\n const item = getAbiItem({ abi, name: eventName });\n if (!item)\n throw new AbiEventNotFoundError(eventName, { docsPath });\n abiItem = item;\n }\n if (abiItem.type !== 'event')\n throw new AbiEventNotFoundError(undefined, { docsPath });\n let topics = [];\n if (args && 'inputs' in abiItem) {\n const indexedInputs = abiItem.inputs?.filter((param) => 'indexed' in param && param.indexed);\n const args_ = Array.isArray(args)\n ? args\n : Object.values(args).length > 0\n ? (indexedInputs?.map((x) => args[x.name]) ?? [])\n : [];\n if (args_.length > 0) {\n topics =\n indexedInputs?.map((param, i) => {\n if (Array.isArray(args_[i]))\n return args_[i].map((_, j) => encodeArg({ param, value: args_[i][j] }));\n return typeof args_[i] !== 'undefined' && args_[i] !== null\n ? encodeArg({ param, value: args_[i] })\n : null;\n }) ?? [];\n }\n }\n // Anonymous events are not identified by a signature topic, so the event\n // selector must not be prepended.\n if (abiItem.anonymous)\n return topics;\n const definition = formatAbiItem(abiItem);\n const signature = toEventSelector(definition);\n return [signature, ...topics];\n}\nfunction encodeArg({ param, value, }) {\n if (param.type === 'string' || param.type === 'bytes')\n return keccak256(toBytes(value));\n if (param.type === 'tuple' || param.type.match(/^(.*)\\[(\\d+)?\\]$/))\n throw new FilterTypeNotSupportedError(param.type);\n return encodeAbiParameters([param], [value]);\n}\n//# sourceMappingURL=encodeEventTopics.js.map","export function parseAccount(account) {\n if (typeof account === 'string')\n return { address: account, type: 'json-rpc' };\n return account;\n}\n//# sourceMappingURL=parseAccount.js.map","import { AbiFunctionNotFoundError, } from '../../errors/abi.js';\nimport { toFunctionSelector, } from '../hash/toFunctionSelector.js';\nimport { formatAbiItem } from './formatAbiItem.js';\nimport { getAbiItem } from './getAbiItem.js';\nconst docsPath = '/docs/contract/encodeFunctionData';\nexport function prepareEncodeFunctionData(parameters) {\n const { abi, args, functionName } = parameters;\n let abiItem = abi[0];\n if (functionName) {\n const item = getAbiItem({\n abi,\n args,\n name: functionName,\n });\n if (!item)\n throw new AbiFunctionNotFoundError(functionName, { docsPath });\n abiItem = item;\n }\n if (abiItem.type !== 'function')\n throw new AbiFunctionNotFoundError(undefined, { docsPath });\n return {\n abi: [abiItem],\n functionName: toFunctionSelector(formatAbiItem(abiItem)),\n };\n}\n//# sourceMappingURL=prepareEncodeFunctionData.js.map","import { concatHex } from '../data/concat.js';\nimport { encodeAbiParameters, } from './encodeAbiParameters.js';\nimport { prepareEncodeFunctionData } from './prepareEncodeFunctionData.js';\nexport function encodeFunctionData(parameters) {\n const { args } = parameters;\n const { abi, functionName } = (() => {\n if (parameters.abi.length === 1 &&\n parameters.functionName?.startsWith('0x'))\n return parameters;\n return prepareEncodeFunctionData(parameters);\n })();\n const abiItem = abi[0];\n const signature = functionName;\n const data = 'inputs' in abiItem && abiItem.inputs\n ? encodeAbiParameters(abiItem.inputs, args ?? [])\n : undefined;\n return concatHex([signature, data ?? '0x']);\n}\n//# sourceMappingURL=encodeFunctionData.js.map","// https://docs.soliditylang.org/en/v0.8.16/control-structures.html#panic-via-assert-and-error-via-require\nexport const panicReasons = {\n 1: 'An `assert` condition failed.',\n 17: 'Arithmetic operation resulted in underflow or overflow.',\n 18: 'Division or modulo by zero (e.g. `5 / 0` or `23 % 0`).',\n 33: 'Attempted to convert to an invalid type.',\n 34: 'Attempted to access a storage byte array that is incorrectly encoded.',\n 49: 'Performed `.pop()` on an empty array',\n 50: 'Array index is out of bounds.',\n 65: 'Allocated too much memory or created an array which is too large.',\n 81: 'Attempted to call a zero-initialized variable of internal function type.',\n};\nexport const solidityError = {\n inputs: [\n {\n name: 'message',\n type: 'string',\n },\n ],\n name: 'Error',\n type: 'error',\n};\nexport const solidityPanic = {\n inputs: [\n {\n name: 'reason',\n type: 'uint256',\n },\n ],\n name: 'Panic',\n type: 'error',\n};\n//# sourceMappingURL=solidity.js.map","import { BaseError } from './base.js';\nexport class NegativeOffsetError extends BaseError {\n constructor({ offset }) {\n super(`Offset \\`${offset}\\` cannot be negative.`, {\n name: 'NegativeOffsetError',\n });\n }\n}\nexport class PositionOutOfBoundsError extends BaseError {\n constructor({ length, position }) {\n super(`Position \\`${position}\\` is out of bounds (\\`0 < position < ${length}\\`).`, { name: 'PositionOutOfBoundsError' });\n }\n}\nexport class RecursiveReadLimitExceededError extends BaseError {\n constructor({ count, limit }) {\n super(`Recursive read limit of \\`${limit}\\` exceeded (recursive read count: \\`${count}\\`).`, { name: 'RecursiveReadLimitExceededError' });\n }\n}\n//# sourceMappingURL=cursor.js.map","import { NegativeOffsetError, PositionOutOfBoundsError, RecursiveReadLimitExceededError, } from '../errors/cursor.js';\nconst staticCursor = {\n bytes: new Uint8Array(),\n dataView: new DataView(new ArrayBuffer(0)),\n position: 0,\n positionReadCount: new Map(),\n recursiveReadCount: 0,\n recursiveReadLimit: Number.POSITIVE_INFINITY,\n assertReadLimit() {\n if (this.recursiveReadCount >= this.recursiveReadLimit)\n throw new RecursiveReadLimitExceededError({\n count: this.recursiveReadCount + 1,\n limit: this.recursiveReadLimit,\n });\n },\n assertPosition(position) {\n if (position < 0 || position > this.bytes.length - 1)\n throw new PositionOutOfBoundsError({\n length: this.bytes.length,\n position,\n });\n },\n decrementPosition(offset) {\n if (offset < 0)\n throw new NegativeOffsetError({ offset });\n const position = this.position - offset;\n this.assertPosition(position);\n this.position = position;\n },\n getReadCount(position) {\n return this.positionReadCount.get(position || this.position) || 0;\n },\n incrementPosition(offset) {\n if (offset < 0)\n throw new NegativeOffsetError({ offset });\n const position = this.position + offset;\n this.assertPosition(position);\n this.position = position;\n },\n inspectByte(position_) {\n const position = position_ ?? this.position;\n this.assertPosition(position);\n return this.bytes[position];\n },\n inspectBytes(length, position_) {\n const position = position_ ?? this.position;\n this.assertPosition(position + length - 1);\n return this.bytes.subarray(position, position + length);\n },\n inspectUint8(position_) {\n const position = position_ ?? this.position;\n this.assertPosition(position);\n return this.bytes[position];\n },\n inspectUint16(position_) {\n const position = position_ ?? this.position;\n this.assertPosition(position + 1);\n return this.dataView.getUint16(position);\n },\n inspectUint24(position_) {\n const position = position_ ?? this.position;\n this.assertPosition(position + 2);\n return ((this.dataView.getUint16(position) << 8) +\n this.dataView.getUint8(position + 2));\n },\n inspectUint32(position_) {\n const position = position_ ?? this.position;\n this.assertPosition(position + 3);\n return this.dataView.getUint32(position);\n },\n pushByte(byte) {\n this.assertPosition(this.position);\n this.bytes[this.position] = byte;\n this.position++;\n },\n pushBytes(bytes) {\n this.assertPosition(this.position + bytes.length - 1);\n this.bytes.set(bytes, this.position);\n this.position += bytes.length;\n },\n pushUint8(value) {\n this.assertPosition(this.position);\n this.bytes[this.position] = value;\n this.position++;\n },\n pushUint16(value) {\n this.assertPosition(this.position + 1);\n this.dataView.setUint16(this.position, value);\n this.position += 2;\n },\n pushUint24(value) {\n this.assertPosition(this.position + 2);\n this.dataView.setUint16(this.position, value >> 8);\n this.dataView.setUint8(this.position + 2, value & ~4294967040);\n this.position += 3;\n },\n pushUint32(value) {\n this.assertPosition(this.position + 3);\n this.dataView.setUint32(this.position, value);\n this.position += 4;\n },\n readByte() {\n this.assertReadLimit();\n this._touch();\n const value = this.inspectByte();\n this.position++;\n return value;\n },\n readBytes(length, size) {\n this.assertReadLimit();\n this._touch();\n const value = this.inspectBytes(length);\n this.position += size ?? length;\n return value;\n },\n readUint8() {\n this.assertReadLimit();\n this._touch();\n const value = this.inspectUint8();\n this.position += 1;\n return value;\n },\n readUint16() {\n this.assertReadLimit();\n this._touch();\n const value = this.inspectUint16();\n this.position += 2;\n return value;\n },\n readUint24() {\n this.assertReadLimit();\n this._touch();\n const value = this.inspectUint24();\n this.position += 3;\n return value;\n },\n readUint32() {\n this.assertReadLimit();\n this._touch();\n const value = this.inspectUint32();\n this.position += 4;\n return value;\n },\n get remaining() {\n return this.bytes.length - this.position;\n },\n setPosition(position) {\n const oldPosition = this.position;\n this.assertPosition(position);\n this.position = position;\n return () => (this.position = oldPosition);\n },\n _touch() {\n if (this.recursiveReadLimit === Number.POSITIVE_INFINITY)\n return;\n const count = this.getReadCount();\n this.positionReadCount.set(this.position, count + 1);\n if (count > 0)\n this.recursiveReadCount++;\n },\n};\nexport function createCursor(bytes, { recursiveReadLimit = 8_192 } = {}) {\n const cursor = Object.create(staticCursor);\n cursor.bytes = bytes;\n cursor.dataView = new DataView(bytes.buffer ?? bytes, bytes.byteOffset, bytes.byteLength);\n cursor.positionReadCount = new Map();\n cursor.recursiveReadLimit = recursiveReadLimit;\n return cursor;\n}\n//# sourceMappingURL=cursor.js.map","import { InvalidBytesBooleanError } from '../../errors/encoding.js';\nimport { trim } from '../data/trim.js';\nimport { assertSize, hexToBigInt, hexToNumber, } from './fromHex.js';\nimport { bytesToHex } from './toHex.js';\n/**\n * Decodes a byte array into a UTF-8 string, hex value, number, bigint or boolean.\n *\n * - Docs: https://viem.sh/docs/utilities/fromBytes\n * - Example: https://viem.sh/docs/utilities/fromBytes#usage\n *\n * @param bytes Byte array to decode.\n * @param toOrOpts Type to convert to or options.\n * @returns Decoded value.\n *\n * @example\n * import { fromBytes } from 'viem'\n * const data = fromBytes(new Uint8Array([1, 164]), 'number')\n * // 420\n *\n * @example\n * import { fromBytes } from 'viem'\n * const data = fromBytes(\n * new Uint8Array([72, 101, 108, 108, 111, 32, 87, 111, 114, 108, 100, 33]),\n * 'string'\n * )\n * // 'Hello world'\n */\nexport function fromBytes(bytes, toOrOpts) {\n const opts = typeof toOrOpts === 'string' ? { to: toOrOpts } : toOrOpts;\n const to = opts.to;\n if (to === 'number')\n return bytesToNumber(bytes, opts);\n if (to === 'bigint')\n return bytesToBigInt(bytes, opts);\n if (to === 'boolean')\n return bytesToBool(bytes, opts);\n if (to === 'string')\n return bytesToString(bytes, opts);\n return bytesToHex(bytes, opts);\n}\n/**\n * Decodes a byte array into a bigint.\n *\n * - Docs: https://viem.sh/docs/utilities/fromBytes#bytestobigint\n *\n * @param bytes Byte array to decode.\n * @param opts Options.\n * @returns BigInt value.\n *\n * @example\n * import { bytesToBigInt } from 'viem'\n * const data = bytesToBigInt(new Uint8Array([1, 164]))\n * // 420n\n */\nexport function bytesToBigInt(bytes, opts = {}) {\n if (typeof opts.size !== 'undefined')\n assertSize(bytes, { size: opts.size });\n const hex = bytesToHex(bytes);\n return hexToBigInt(hex, opts);\n}\n/**\n * Decodes a byte array into a boolean.\n *\n * - Docs: https://viem.sh/docs/utilities/fromBytes#bytestobool\n *\n * @param bytes Byte array to decode.\n * @param opts Options.\n * @returns Boolean value.\n *\n * @example\n * import { bytesToBool } from 'viem'\n * const data = bytesToBool(new Uint8Array([1]))\n * // true\n */\nexport function bytesToBool(bytes_, opts = {}) {\n let bytes = bytes_;\n if (typeof opts.size !== 'undefined') {\n assertSize(bytes, { size: opts.size });\n bytes = trim(bytes);\n }\n if (bytes.length > 1 || bytes[0] > 1)\n throw new InvalidBytesBooleanError(bytes);\n return Boolean(bytes[0]);\n}\n/**\n * Decodes a byte array into a number.\n *\n * - Docs: https://viem.sh/docs/utilities/fromBytes#bytestonumber\n *\n * @param bytes Byte array to decode.\n * @param opts Options.\n * @returns Number value.\n *\n * @example\n * import { bytesToNumber } from 'viem'\n * const data = bytesToNumber(new Uint8Array([1, 164]))\n * // 420\n */\nexport function bytesToNumber(bytes, opts = {}) {\n if (typeof opts.size !== 'undefined')\n assertSize(bytes, { size: opts.size });\n const hex = bytesToHex(bytes);\n return hexToNumber(hex, opts);\n}\n/**\n * Decodes a byte array into a UTF-8 string.\n *\n * - Docs: https://viem.sh/docs/utilities/fromBytes#bytestostring\n *\n * @param bytes Byte array to decode.\n * @param opts Options.\n * @returns String value.\n *\n * @example\n * import { bytesToString } from 'viem'\n * const data = bytesToString(new Uint8Array([72, 101, 108, 108, 111, 32, 87, 111, 114, 108, 100, 33]))\n * // 'Hello world'\n */\nexport function bytesToString(bytes_, opts = {}) {\n let bytes = bytes_;\n if (typeof opts.size !== 'undefined') {\n assertSize(bytes, { size: opts.size });\n bytes = trim(bytes, { dir: 'right' });\n }\n return new TextDecoder().decode(bytes);\n}\n//# sourceMappingURL=fromBytes.js.map","import { AbiDecodingDataSizeTooSmallError, AbiDecodingZeroDataError, InvalidAbiDecodingTypeError, } from '../../errors/abi.js';\nimport { checksumAddress, } from '../address/getAddress.js';\nimport { createCursor, } from '../cursor.js';\nimport { size } from '../data/size.js';\nimport { sliceBytes } from '../data/slice.js';\nimport { bytesToBigInt, bytesToBool, bytesToNumber, bytesToString, } from '../encoding/fromBytes.js';\nimport { hexToBytes } from '../encoding/toBytes.js';\nimport { bytesToHex } from '../encoding/toHex.js';\nimport { getArrayComponents } from './encodeAbiParameters.js';\nexport function decodeAbiParameters(params, data) {\n const bytes = typeof data === 'string' ? hexToBytes(data) : data;\n const cursor = createCursor(bytes);\n if (size(bytes) === 0 && params.length > 0)\n throw new AbiDecodingZeroDataError();\n if (size(data) && size(data) < 32)\n throw new AbiDecodingDataSizeTooSmallError({\n data: typeof data === 'string' ? data : bytesToHex(data),\n params: params,\n size: size(data),\n });\n let consumed = 0;\n const values = [];\n for (let i = 0; i < params.length; ++i) {\n const param = params[i];\n // Zero-width types (e.g. `uint256[0]`, empty tuples) at the end of the\n // data consume no bytes, so the cursor may already be exhausted.\n if (consumed < bytes.length)\n cursor.setPosition(consumed);\n const [data, consumed_] = decodeParameter(cursor, param, {\n staticPosition: 0,\n });\n consumed += consumed_;\n values.push(data);\n }\n return values;\n}\nfunction decodeParameter(cursor, param, { staticPosition }) {\n const arrayComponents = getArrayComponents(param.type);\n if (arrayComponents) {\n const [length, type] = arrayComponents;\n return decodeArray(cursor, { ...param, type }, { length, staticPosition });\n }\n if (param.type === 'tuple')\n return decodeTuple(cursor, param, { staticPosition });\n if (param.type === 'address')\n return decodeAddress(cursor);\n if (param.type === 'bool')\n return decodeBool(cursor);\n if (param.type.startsWith('bytes'))\n return decodeBytes(cursor, param, { staticPosition });\n if (param.type.startsWith('uint') || param.type.startsWith('int'))\n return decodeNumber(cursor, param);\n if (param.type === 'string')\n return decodeString(cursor, { staticPosition });\n throw new InvalidAbiDecodingTypeError(param.type, {\n docsPath: '/docs/contract/decodeAbiParameters',\n });\n}\n////////////////////////////////////////////////////////////////////\n// Type Decoders\nconst sizeOfLength = 32;\nconst sizeOfOffset = 32;\nfunction decodeAddress(cursor) {\n const value = cursor.readBytes(32);\n return [checksumAddress(bytesToHex(sliceBytes(value, -20))), 32];\n}\nfunction decodeArray(cursor, param, { length, staticPosition }) {\n // If the length of the array is not known in advance (dynamic array),\n // this means we will need to wonder off to the pointer and decode.\n // Note: zero-length fixed arrays (`T[0]`) are not dynamic.\n if (length === null) {\n // Dealing with a dynamic type, so get the offset of the array data.\n const offset = bytesToNumber(cursor.readBytes(sizeOfOffset));\n // Start is the static position of current slot + offset.\n const start = staticPosition + offset;\n const startOfData = start + sizeOfLength;\n // Get the length of the array from the offset.\n cursor.setPosition(start);\n const length = bytesToNumber(cursor.readBytes(sizeOfLength));\n // Check if the array has any dynamic children.\n const dynamicChild = hasDynamicChild(param);\n let consumed = 0;\n const value = [];\n for (let i = 0; i < length; ++i) {\n // If any of the children is dynamic, then all elements will be offset pointer, thus size of one slot (32 bytes).\n // Otherwise, elements will be the size of their encoding (consumed bytes).\n cursor.setPosition(startOfData + (dynamicChild ? i * 32 : consumed));\n const [data, consumed_] = decodeParameter(cursor, param, {\n staticPosition: startOfData,\n });\n consumed += consumed_;\n value.push(data);\n // Charge zero-width elements against the read limit to bound work\n // on huge lengths of zero-width types (e.g. `uint256[0][]`).\n if (consumed_ === 0) {\n cursor.assertReadLimit();\n cursor._touch();\n }\n }\n // As we have gone wondering, restore to the original position + next slot.\n cursor.setPosition(staticPosition + 32);\n return [value, 32];\n }\n // If the length of the array is known in advance,\n // and the length of an element deeply nested in the array is not known,\n // we need to decode the offset of the array data.\n if (hasDynamicChild(param)) {\n // Dealing with dynamic types, so get the offset of the array data.\n const offset = bytesToNumber(cursor.readBytes(sizeOfOffset));\n // Start is the static position of current slot + offset.\n const start = staticPosition + offset;\n const value = [];\n for (let i = 0; i < length; ++i) {\n // Move cursor along to the next slot (next offset pointer).\n cursor.setPosition(start + i * 32);\n const [data] = decodeParameter(cursor, param, {\n staticPosition: start,\n });\n value.push(data);\n }\n // As we have gone wondering, restore to the original position + next slot.\n cursor.setPosition(staticPosition + 32);\n return [value, 32];\n }\n // If the length of the array is known in advance and the array is deeply static,\n // then we can just decode each element in sequence.\n let consumed = 0;\n const value = [];\n for (let i = 0; i < length; ++i) {\n const [data, consumed_] = decodeParameter(cursor, param, {\n staticPosition: staticPosition + consumed,\n });\n consumed += consumed_;\n value.push(data);\n // Charge zero-width elements against the read limit to bound work\n // on huge lengths of zero-width types (e.g. `uint256[0][4294967295]`).\n if (consumed_ === 0) {\n cursor.assertReadLimit();\n cursor._touch();\n }\n }\n return [value, consumed];\n}\nfunction decodeBool(cursor) {\n return [bytesToBool(cursor.readBytes(32), { size: 32 }), 32];\n}\nfunction decodeBytes(cursor, param, { staticPosition }) {\n const [_, size] = param.type.split('bytes');\n if (!size) {\n // Dealing with dynamic types, so get the offset of the bytes data.\n const offset = bytesToNumber(cursor.readBytes(32));\n // Set position of the cursor to start of bytes data.\n cursor.setPosition(staticPosition + offset);\n const length = bytesToNumber(cursor.readBytes(32));\n // If there is no length, we have zero data.\n if (length === 0) {\n // As we have gone wondering, restore to the original position + next slot.\n cursor.setPosition(staticPosition + 32);\n return ['0x', 32];\n }\n const data = cursor.readBytes(length);\n // As we have gone wondering, restore to the original position + next slot.\n cursor.setPosition(staticPosition + 32);\n return [bytesToHex(data), 32];\n }\n const value = bytesToHex(cursor.readBytes(Number.parseInt(size, 10), 32));\n return [value, 32];\n}\nfunction decodeNumber(cursor, param) {\n const signed = param.type.startsWith('int');\n const size = Number.parseInt(param.type.split('int')[1] || '256', 10);\n const value = cursor.readBytes(32);\n return [\n size > 48\n ? bytesToBigInt(value, { signed })\n : bytesToNumber(value, { signed }),\n 32,\n ];\n}\nfunction decodeTuple(cursor, param, { staticPosition }) {\n // Tuples can have unnamed components (i.e. they are arrays), so we must\n // determine whether the tuple is named or unnamed. In the case of a named\n // tuple, the value will be an object where each property is the name of the\n // component. In the case of an unnamed tuple, the value will be an array.\n const hasUnnamedChild = param.components.length === 0 || param.components.some(({ name }) => !name);\n // Initialize the value to an object or an array, depending on whether the\n // tuple is named or unnamed.\n const value = hasUnnamedChild ? [] : {};\n let consumed = 0;\n // If the tuple has a dynamic child, we must first decode the offset to the\n // tuple data.\n if (hasDynamicChild(param)) {\n // Dealing with dynamic types, so get the offset of the tuple data.\n const offset = bytesToNumber(cursor.readBytes(sizeOfOffset));\n // Start is the static position of referencing slot + offset.\n const start = staticPosition + offset;\n for (let i = 0; i < param.components.length; ++i) {\n const component = param.components[i];\n cursor.setPosition(start + consumed);\n const [data, consumed_] = decodeParameter(cursor, component, {\n staticPosition: start,\n });\n consumed += consumed_;\n value[hasUnnamedChild ? i : component?.name] = data;\n }\n // As we have gone wondering, restore to the original position + next slot.\n cursor.setPosition(staticPosition + 32);\n return [value, 32];\n }\n // If the tuple has static children, we can just decode each component\n // in sequence.\n for (let i = 0; i < param.components.length; ++i) {\n const component = param.components[i];\n const [data, consumed_] = decodeParameter(cursor, component, {\n staticPosition,\n });\n value[hasUnnamedChild ? i : component?.name] = data;\n consumed += consumed_;\n }\n return [value, consumed];\n}\nfunction decodeString(cursor, { staticPosition }) {\n // Get offset to start of string data.\n const offset = bytesToNumber(cursor.readBytes(32));\n // Start is the static position of current slot + offset.\n const start = staticPosition + offset;\n cursor.setPosition(start);\n const length = bytesToNumber(cursor.readBytes(32));\n // If there is no length, we have zero data (empty string).\n if (length === 0) {\n cursor.setPosition(staticPosition + 32);\n return ['', 32];\n }\n const data = cursor.readBytes(length, 32);\n const value = bytesToString(data);\n // As we have gone wondering, restore to the original position + next slot.\n cursor.setPosition(staticPosition + 32);\n return [value, 32];\n}\nfunction hasDynamicChild(param) {\n const { type } = param;\n if (type === 'string')\n return true;\n if (type === 'bytes')\n return true;\n if (type.endsWith('[]'))\n return true;\n if (type === 'tuple')\n return param.components?.some(hasDynamicChild);\n const arrayComponents = getArrayComponents(param.type);\n if (arrayComponents &&\n hasDynamicChild({ ...param, type: arrayComponents[1] }))\n return true;\n return false;\n}\n//# sourceMappingURL=decodeAbiParameters.js.map","import { solidityError, solidityPanic } from '../../constants/solidity.js';\nimport { AbiDecodingZeroDataError, AbiErrorSignatureNotFoundError, } from '../../errors/abi.js';\nimport { slice } from '../data/slice.js';\nimport { toFunctionSelector, } from '../hash/toFunctionSelector.js';\nimport { decodeAbiParameters, } from './decodeAbiParameters.js';\nimport { formatAbiItem } from './formatAbiItem.js';\nexport function decodeErrorResult(parameters) {\n const { abi, data, cause } = parameters;\n const signature = slice(data, 0, 4);\n if (signature === '0x')\n throw new AbiDecodingZeroDataError({ cause });\n const abi_ = [...(abi || []), solidityError, solidityPanic];\n const abiItem = abi_.find((x) => x.type === 'error' && signature === toFunctionSelector(formatAbiItem(x)));\n if (!abiItem)\n throw new AbiErrorSignatureNotFoundError(signature, {\n docsPath: '/docs/contract/decodeErrorResult',\n cause,\n });\n return {\n abiItem,\n args: 'inputs' in abiItem && abiItem.inputs && abiItem.inputs.length > 0\n ? decodeAbiParameters(abiItem.inputs, slice(data, 4))\n : undefined,\n errorName: abiItem.name,\n };\n}\n//# sourceMappingURL=decodeErrorResult.js.map","export const stringify = (value, replacer, space) => JSON.stringify(value, (key, value_) => {\n const value = typeof value_ === 'bigint' ? value_.toString() : value_;\n return typeof replacer === 'function' ? replacer(key, value) : value;\n}, space);\n//# sourceMappingURL=stringify.js.map","import { stringify } from '../stringify.js';\nexport function formatAbiItemWithArgs({ abiItem, args, includeFunctionName = true, includeName = false, }) {\n if (!('name' in abiItem))\n return;\n if (!('inputs' in abiItem))\n return;\n if (!abiItem.inputs)\n return;\n return `${includeFunctionName ? abiItem.name : ''}(${abiItem.inputs\n .map((input, i) => `${includeName && input.name ? `${input.name}: ` : ''}${typeof args[i] === 'object' ? stringify(args[i]) : args[i]}`)\n .join(', ')})`;\n}\n//# sourceMappingURL=formatAbiItemWithArgs.js.map","// Adapted from the Ox v1 `Value` module.\n/** @see https://ethereum.github.io/yellowpaper/paper.pdf */\nconst exponents = {\n wei: 0,\n gwei: 9,\n szabo: 12,\n finney: 15,\n ether: 18,\n};\n/**\n * Formats a `bigint` Value to its string representation (divided by the given exponent).\n *\n * @example\n * ```ts twoslash\n * import { Value } from 'ox'\n *\n * Value.format(420_000_000_000n, 9)\n * // @log: '420'\n * ```\n *\n * @param value - The `bigint` Value to format.\n * @param decimals - The exponent to divide the `bigint` Value by.\n * @returns The string representation of the Value.\n */\nexport function format(value, decimals = 0) {\n if (!Number.isInteger(decimals) || decimals < 0)\n throw new InvalidDecimalsError({ decimals });\n let display = value.toString();\n const negative = display.startsWith('-');\n if (negative)\n display = display.slice(1);\n display = display.padStart(decimals, '0');\n let [integer, fraction] = [\n display.slice(0, display.length - decimals),\n display.slice(display.length - decimals),\n ];\n fraction = fraction.replace(/(0+)$/, '');\n return `${negative ? '-' : ''}${integer || '0'}${fraction ? `.${fraction}` : ''}`;\n}\n/**\n * Formats a `bigint` Value (default: wei) to a string representation of Ether.\n *\n * @example\n * ```ts twoslash\n * import { Value } from 'ox'\n *\n * Value.formatEther(1_000_000_000_000_000_000n)\n * // @log: '1'\n * ```\n *\n * @param wei - The Value to format.\n * @param unit - The unit to format the Value in. @default 'wei'.\n * @returns The Ether string representation of the Value.\n */\nexport function formatEther(wei, unit = 'wei') {\n return format(wei, exponents.ether - exponents[unit]);\n}\n/**\n * Formats a `bigint` Value (default: wei) to a string representation of Gwei.\n *\n * @example\n * ```ts twoslash\n * import { Value } from 'ox'\n *\n * Value.formatGwei(1_000_000_000n)\n * // @log: '1'\n * ```\n *\n * @param wei - The Value to format.\n * @param unit - The unit to format the Value in. @default 'wei'.\n * @returns The Gwei string representation of the Value.\n */\nexport function formatGwei(wei, unit = 'wei') {\n return format(wei, exponents.gwei - exponents[unit]);\n}\n/**\n * Parses a `string` representation of a Value to `bigint` (multiplied by the given exponent).\n *\n * @example\n * ```ts twoslash\n * import { Value } from 'ox'\n *\n * Value.from('420', 9)\n * // @log: 420000000000n\n * ```\n *\n * @param value - The string representation of the Value.\n * @param decimals - The exponent to multiply the Value by.\n * @returns The `bigint` representation of the Value.\n */\nexport function from(value, decimals = 0) {\n if (!Number.isInteger(decimals) || decimals < 0)\n throw new InvalidDecimalsError({ decimals });\n // Require at least one digit overall. Rejects '', '.', '-', '-.' which\n // the previous regex accepted (and which then either produced garbage or\n // threw a raw `SyntaxError` from `BigInt('')`).\n if (!/^-?(?:[0-9]+(?:\\.[0-9]*)?|\\.[0-9]+)$/.test(value))\n throw new InvalidDecimalNumberError({ value });\n let [integer = '', fraction = '0'] = value.split('.');\n const negative = integer.startsWith('-');\n if (negative)\n integer = integer.slice(1);\n if (integer === '')\n integer = '0';\n // trim trailing zeros.\n fraction = fraction.replace(/(0+)$/, '');\n // round off if the fraction is larger than the number of decimals.\n if (decimals === 0) {\n // Round half-away-from-zero by inspecting the first fractional digit.\n if (fraction.length > 0 && Number.parseInt(fraction[0], 10) >= 5)\n integer = `${BigInt(integer) + 1n}`;\n fraction = '';\n }\n else if (fraction.length > decimals) {\n const left = fraction.slice(0, decimals);\n const roundDigit = Number.parseInt(fraction.slice(decimals, decimals + 1), 10);\n if (roundDigit >= 5) {\n // Carry through the truncated fraction digits into the integer part\n // without converting to a JS Number (avoids float precision loss).\n const carried = carry(left);\n if (carried.length > decimals) {\n // Carry overflowed into the integer part.\n fraction = carried.slice(1);\n integer = `${BigInt(integer) + 1n}`;\n }\n else {\n fraction = carried;\n }\n }\n else {\n fraction = left;\n }\n }\n else {\n fraction = fraction.padEnd(decimals, '0');\n }\n return BigInt(`${negative ? '-' : ''}${integer}${fraction}`);\n}\n/**\n * Adds 1 to a digit string with carry, returning a string of the same length\n * unless the carry overflows past the most-significant digit (in which case\n * the returned string is one digit longer).\n *\n * @internal\n */\nfunction carry(digits) {\n const out = digits.split('');\n let i = out.length - 1;\n while (i >= 0) {\n const d = Number.parseInt(out[i], 10) + 1;\n if (d < 10) {\n out[i] = String(d);\n return out.join('');\n }\n out[i] = '0';\n i--;\n }\n return `1${out.join('')}`;\n}\n/**\n * Parses a string representation of Ether to a `bigint` Value (default: wei).\n *\n * @example\n * ```ts twoslash\n * import { Value } from 'ox'\n *\n * Value.fromEther('420')\n * // @log: 420000000000000000000n\n * ```\n *\n * @param ether - String representation of Ether.\n * @param unit - The unit to parse to. @default 'wei'.\n * @returns A `bigint` Value.\n */\nexport function fromEther(ether, unit = 'wei') {\n return from(ether, exponents.ether - exponents[unit]);\n}\n/**\n * Parses a string representation of Gwei to a `bigint` Value (default: wei).\n *\n * @example\n * ```ts twoslash\n * import { Value } from 'ox'\n *\n * Value.fromGwei('420')\n * // @log: 420000000000n\n * ```\n *\n * @param gwei - String representation of Gwei.\n * @param unit - The unit to parse to. @default 'wei'.\n * @returns A `bigint` Value.\n */\nexport function fromGwei(gwei, unit = 'wei') {\n return from(gwei, exponents.gwei - exponents[unit]);\n}\n/**\n * Thrown when a value is not a valid decimal number.\n *\n * @example\n * ```ts twoslash\n * import { Value } from 'ox'\n *\n * Value.fromEther('123.456.789')\n * // @error: Value.InvalidDecimalNumberError: Value `123.456.789` is not a valid decimal number.\n * ```\n */\nclass InvalidDecimalNumberError extends Error {\n constructor({ value }) {\n super(`Value \\`${value}\\` is not a valid decimal number.`);\n Object.defineProperty(this, \"name\", {\n enumerable: true,\n configurable: true,\n writable: true,\n value: 'Value.InvalidDecimalNumberError'\n });\n }\n}\n/**\n * Thrown when the `decimals` argument is not a non-negative integer.\n *\n * @example\n * ```ts twoslash\n * import { Value } from 'ox'\n *\n * Value.from('1', -1)\n * // @error: Value.InvalidDecimalsError: `decimals` must be a non-negative integer. Got `-1`.\n * ```\n */\nclass InvalidDecimalsError extends Error {\n constructor({ decimals }) {\n super(`\\`decimals\\` must be a non-negative integer. Got \\`${decimals}\\`.`);\n Object.defineProperty(this, \"name\", {\n enumerable: true,\n configurable: true,\n writable: true,\n value: 'Value.InvalidDecimalsError'\n });\n }\n}\n//# sourceMappingURL=Value.js.map","import * as Value from './Value.js';\n/**\n * Converts numerical wei to a string representation of ether.\n *\n * - Docs: https://viem.sh/docs/utilities/formatEther\n *\n * @example\n * import { formatEther } from 'viem'\n *\n * formatEther(1000000000000000000n)\n * // '1'\n */\nexport function formatEther(wei, unit = 'wei') {\n return Value.formatEther(wei, unit);\n}\n//# sourceMappingURL=formatEther.js.map","import * as Value from './Value.js';\n/**\n * Converts numerical wei to a string representation of gwei.\n *\n * - Docs: https://viem.sh/docs/utilities/formatGwei\n *\n * @example\n * import { formatGwei } from 'viem'\n *\n * formatGwei(1000000000n)\n * // '1'\n */\nexport function formatGwei(wei, unit = 'wei') {\n return Value.formatGwei(wei, unit);\n}\n//# sourceMappingURL=formatGwei.js.map","import { BaseError } from './base.js';\nexport class AccountStateConflictError extends BaseError {\n constructor({ address }) {\n super(`State for account \"${address}\" is set multiple times.`, {\n name: 'AccountStateConflictError',\n });\n }\n}\nexport class StateAssignmentConflictError extends BaseError {\n constructor() {\n super('state and stateDiff are set on the same account.', {\n name: 'StateAssignmentConflictError',\n });\n }\n}\n/** @internal */\nexport function prettyStateMapping(stateMapping) {\n return stateMapping.reduce((pretty, { slot, value }) => {\n return `${pretty} ${slot}: ${value}\\n`;\n }, '');\n}\nexport function prettyStateOverride(stateOverride) {\n return stateOverride\n .reduce((pretty, { address, ...state }) => {\n let val = `${pretty} ${address}:\\n`;\n if (state.nonce)\n val += ` nonce: ${state.nonce}\\n`;\n if (state.balance)\n val += ` balance: ${state.balance}\\n`;\n if (state.code)\n val += ` code: ${state.code}\\n`;\n if (state.state) {\n val += ' state:\\n';\n val += prettyStateMapping(state.state);\n }\n if (state.stateDiff) {\n val += ' stateDiff:\\n';\n val += prettyStateMapping(state.stateDiff);\n }\n return val;\n }, ' State Override:\\n')\n .slice(0, -1);\n}\n//# sourceMappingURL=stateOverride.js.map","import { formatEther } from '../utils/unit/formatEther.js';\nimport { formatGwei } from '../utils/unit/formatGwei.js';\nimport { BaseError } from './base.js';\nexport function prettyPrint(args) {\n const entries = Object.entries(args)\n .map(([key, value]) => {\n if (value === undefined || value === false)\n return null;\n return [key, value];\n })\n .filter(Boolean);\n const maxLength = entries.reduce((acc, [key]) => Math.max(acc, key.length), 0);\n return entries\n .map(([key, value]) => ` ${`${key}:`.padEnd(maxLength + 1)} ${value}`)\n .join('\\n');\n}\nexport class FeeConflictError extends BaseError {\n constructor() {\n super([\n 'Cannot specify both a `gasPrice` and a `maxFeePerGas`/`maxPriorityFeePerGas`.',\n 'Use `maxFeePerGas`/`maxPriorityFeePerGas` for EIP-1559 compatible networks, and `gasPrice` for others.',\n ].join('\\n'), { name: 'FeeConflictError' });\n }\n}\nexport class FeePayerNonceMismatchError extends BaseError {\n constructor({ filledNonce, requestedNonce, }) {\n super('The filled transaction nonce does not match the requested nonce.', {\n metaMessages: [\n `Requested Nonce: ${requestedNonce}`,\n `Filled Nonce: ${filledNonce}`,\n ],\n name: 'FeePayerNonceMismatchError',\n });\n }\n}\nexport class InvalidLegacyVError extends BaseError {\n constructor({ v }) {\n super(`Invalid \\`v\\` value \"${v}\". Expected 27 or 28.`, {\n name: 'InvalidLegacyVError',\n });\n }\n}\nexport class InvalidYParityError extends BaseError {\n constructor({ yParity }) {\n super(`Invalid \\`yParity\\` value \"${yParity}\". Expected 0 or 1.`, {\n name: 'InvalidYParityError',\n });\n }\n}\nexport class InvalidSerializableTransactionError extends BaseError {\n constructor({ transaction }) {\n super('Cannot infer a transaction type from provided transaction.', {\n metaMessages: [\n 'Provided Transaction:',\n '{',\n prettyPrint(transaction),\n '}',\n '',\n 'To infer the type, either provide:',\n '- a `type` to the Transaction, or',\n '- an EIP-1559 Transaction with `maxFeePerGas`, or',\n '- an EIP-2930 Transaction with `gasPrice` & `accessList`, or',\n '- an EIP-4844 Transaction with `blobs`, `blobVersionedHashes`, `sidecars`, or',\n '- an EIP-7702 Transaction with `authorizationList`, or',\n '- a Legacy Transaction with `gasPrice`',\n ],\n name: 'InvalidSerializableTransactionError',\n });\n }\n}\nexport class InvalidSerializedTransactionTypeError extends BaseError {\n constructor({ serializedType }) {\n super(`Serialized transaction type \"${serializedType}\" is invalid.`, {\n name: 'InvalidSerializedTransactionType',\n });\n Object.defineProperty(this, \"serializedType\", {\n enumerable: true,\n configurable: true,\n writable: true,\n value: void 0\n });\n this.serializedType = serializedType;\n }\n}\nexport class InvalidSerializedTransactionError extends BaseError {\n constructor({ attributes, serializedTransaction, type, }) {\n const missing = Object.entries(attributes)\n .map(([key, value]) => (typeof value === 'undefined' ? key : undefined))\n .filter(Boolean);\n super(`Invalid serialized transaction of type \"${type}\" was provided.`, {\n metaMessages: [\n `Serialized Transaction: \"${serializedTransaction}\"`,\n missing.length > 0 ? `Missing Attributes: ${missing.join(', ')}` : '',\n ].filter(Boolean),\n name: 'InvalidSerializedTransactionError',\n });\n Object.defineProperty(this, \"serializedTransaction\", {\n enumerable: true,\n configurable: true,\n writable: true,\n value: void 0\n });\n Object.defineProperty(this, \"type\", {\n enumerable: true,\n configurable: true,\n writable: true,\n value: void 0\n });\n this.serializedTransaction = serializedTransaction;\n this.type = type;\n }\n}\nexport class InvalidStorageKeySizeError extends BaseError {\n constructor({ storageKey }) {\n super(`Size for storage key \"${storageKey}\" is invalid. Expected 32 bytes. Got ${Math.floor((storageKey.length - 2) / 2)} bytes.`, { name: 'InvalidStorageKeySizeError' });\n }\n}\nexport class TransactionExecutionError extends BaseError {\n constructor(cause, { account, docsPath, chain, data, gas, gasPrice, maxFeePerGas, maxPriorityFeePerGas, nonce, to, value, }) {\n const prettyArgs = prettyPrint({\n chain: chain && `${chain?.name} (id: ${chain?.id})`,\n from: account?.address,\n to,\n value: typeof value !== 'undefined' &&\n `${formatEther(value)} ${chain?.nativeCurrency?.symbol || 'ETH'}`,\n data,\n gas,\n gasPrice: typeof gasPrice !== 'undefined' && `${formatGwei(gasPrice)} gwei`,\n maxFeePerGas: typeof maxFeePerGas !== 'undefined' &&\n `${formatGwei(maxFeePerGas)} gwei`,\n maxPriorityFeePerGas: typeof maxPriorityFeePerGas !== 'undefined' &&\n `${formatGwei(maxPriorityFeePerGas)} gwei`,\n nonce,\n });\n super(cause.shortMessage, {\n cause,\n docsPath,\n metaMessages: [\n ...(cause.metaMessages ? [...cause.metaMessages, ' '] : []),\n 'Request Arguments:',\n prettyArgs,\n ].filter(Boolean),\n name: 'TransactionExecutionError',\n });\n Object.defineProperty(this, \"cause\", {\n enumerable: true,\n configurable: true,\n writable: true,\n value: void 0\n });\n this.cause = cause;\n }\n}\nexport class TransactionNotFoundError extends BaseError {\n constructor({ blockHash, blockNumber, blockTag, hash, index, }) {\n let identifier = 'Transaction';\n if (blockTag && index !== undefined)\n identifier = `Transaction at block time \"${blockTag}\" at index \"${index}\"`;\n if (blockHash && index !== undefined)\n identifier = `Transaction at block hash \"${blockHash}\" at index \"${index}\"`;\n if (blockNumber && index !== undefined)\n identifier = `Transaction at block number \"${blockNumber}\" at index \"${index}\"`;\n if (hash)\n identifier = `Transaction with hash \"${hash}\"`;\n super(`${identifier} could not be found.`, {\n name: 'TransactionNotFoundError',\n });\n }\n}\nexport class TransactionReceiptNotFoundError extends BaseError {\n constructor({ hash }) {\n super(`Transaction receipt with hash \"${hash}\" could not be found. The Transaction may not be processed on a block yet.`, {\n name: 'TransactionReceiptNotFoundError',\n });\n }\n}\nexport class TransactionReceiptRevertedError extends BaseError {\n constructor({ receipt }) {\n super(`Transaction with hash \"${receipt.transactionHash}\" reverted.`, {\n metaMessages: [\n 'The receipt marked the transaction as \"reverted\". This could mean that the function on the contract you are trying to call threw an error.',\n ' ',\n 'You can attempt to extract the revert reason by:',\n '- calling the `simulateContract` or `simulateCalls` Action with the `abi` and `functionName` of the contract',\n '- using the `call` Action with raw `data`',\n ],\n name: 'TransactionReceiptRevertedError',\n });\n Object.defineProperty(this, \"receipt\", {\n enumerable: true,\n configurable: true,\n writable: true,\n value: void 0\n });\n this.receipt = receipt;\n }\n}\nexport class WaitForTransactionReceiptTimeoutError extends BaseError {\n constructor({ hash }) {\n super(`Timed out while waiting for transaction with hash \"${hash}\" to be confirmed.`, { name: 'WaitForTransactionReceiptTimeoutError' });\n }\n}\n//# sourceMappingURL=transaction.js.map","export const getContractAddress = (address) => address;\nexport function getAbortError(signal) {\n if (signal?.reason)\n return signal.reason;\n if (typeof DOMException === 'function')\n return new DOMException('This operation was aborted', 'AbortError');\n const error = new Error('This operation was aborted');\n error.name = 'AbortError';\n return error;\n}\nexport function isAbortError(error) {\n return (typeof error === 'object' &&\n error !== null &&\n 'name' in error &&\n error.name === 'AbortError');\n}\n/**\n * Returns the URL with any embedded basic-auth credentials stripped, so\n * error messages and logs don't leak secrets when an RPC URL like\n * `https://user:pass@host` is used.\n */\nexport const getUrl = (url) => {\n try {\n const parsed = new URL(url);\n if (!parsed.username && !parsed.password)\n return url;\n parsed.username = '';\n parsed.password = '';\n return parsed.toString();\n }\n catch {\n return url;\n }\n};\n//# sourceMappingURL=utils.js.map","import { parseAccount } from '../accounts/utils/parseAccount.js';\nimport { panicReasons } from '../constants/solidity.js';\nimport { decodeErrorResult, } from '../utils/abi/decodeErrorResult.js';\nimport { formatAbiItem } from '../utils/abi/formatAbiItem.js';\nimport { formatAbiItemWithArgs } from '../utils/abi/formatAbiItemWithArgs.js';\nimport { getAbiItem } from '../utils/abi/getAbiItem.js';\nimport { formatEther } from '../utils/unit/formatEther.js';\nimport { formatGwei } from '../utils/unit/formatGwei.js';\nimport { AbiErrorSignatureNotFoundError } from './abi.js';\nimport { BaseError } from './base.js';\nimport { prettyStateOverride } from './stateOverride.js';\nimport { prettyPrint } from './transaction.js';\nimport { getContractAddress } from './utils.js';\nexport class CallExecutionError extends BaseError {\n constructor(cause, { account: account_, docsPath, chain, data, gas, gasPrice, maxFeePerGas, maxPriorityFeePerGas, nonce, to, value, stateOverride, }) {\n const account = account_ ? parseAccount(account_) : undefined;\n let prettyArgs = prettyPrint({\n from: account?.address,\n to,\n value: typeof value !== 'undefined' &&\n `${formatEther(value)} ${chain?.nativeCurrency?.symbol || 'ETH'}`,\n data,\n gas,\n gasPrice: typeof gasPrice !== 'undefined' && `${formatGwei(gasPrice)} gwei`,\n maxFeePerGas: typeof maxFeePerGas !== 'undefined' &&\n `${formatGwei(maxFeePerGas)} gwei`,\n maxPriorityFeePerGas: typeof maxPriorityFeePerGas !== 'undefined' &&\n `${formatGwei(maxPriorityFeePerGas)} gwei`,\n nonce,\n });\n if (stateOverride) {\n prettyArgs += `\\n${prettyStateOverride(stateOverride)}`;\n }\n super(cause.shortMessage, {\n cause,\n docsPath,\n metaMessages: [\n ...(cause.metaMessages ? [...cause.metaMessages, ' '] : []),\n 'Raw Call Arguments:',\n prettyArgs,\n ].filter(Boolean),\n name: 'CallExecutionError',\n });\n Object.defineProperty(this, \"cause\", {\n enumerable: true,\n configurable: true,\n writable: true,\n value: void 0\n });\n this.cause = cause;\n }\n}\nexport class ContractFunctionExecutionError extends BaseError {\n constructor(cause, { abi, args, contractAddress, docsPath, functionName, sender, }) {\n const abiItem = getAbiItem({ abi, args, name: functionName });\n const formattedArgs = abiItem\n ? formatAbiItemWithArgs({\n abiItem,\n args,\n includeFunctionName: false,\n includeName: false,\n })\n : undefined;\n const functionWithParams = abiItem\n ? formatAbiItem(abiItem, { includeName: true })\n : undefined;\n const prettyArgs = prettyPrint({\n address: contractAddress && getContractAddress(contractAddress),\n function: functionWithParams,\n args: formattedArgs &&\n formattedArgs !== '()' &&\n `${[...Array(functionName?.length ?? 0).keys()]\n .map(() => ' ')\n .join('')}${formattedArgs}`,\n sender,\n });\n super(cause.shortMessage ||\n `An unknown error occurred while executing the contract function \"${functionName}\".`, {\n cause,\n docsPath,\n metaMessages: [\n ...(cause.metaMessages ? [...cause.metaMessages, ' '] : []),\n prettyArgs && 'Contract Call:',\n prettyArgs,\n ].filter(Boolean),\n name: 'ContractFunctionExecutionError',\n });\n Object.defineProperty(this, \"abi\", {\n enumerable: true,\n configurable: true,\n writable: true,\n value: void 0\n });\n Object.defineProperty(this, \"args\", {\n enumerable: true,\n configurable: true,\n writable: true,\n value: void 0\n });\n Object.defineProperty(this, \"cause\", {\n enumerable: true,\n configurable: true,\n writable: true,\n value: void 0\n });\n Object.defineProperty(this, \"contractAddress\", {\n enumerable: true,\n configurable: true,\n writable: true,\n value: void 0\n });\n Object.defineProperty(this, \"formattedArgs\", {\n enumerable: true,\n configurable: true,\n writable: true,\n value: void 0\n });\n Object.defineProperty(this, \"functionName\", {\n enumerable: true,\n configurable: true,\n writable: true,\n value: void 0\n });\n Object.defineProperty(this, \"sender\", {\n enumerable: true,\n configurable: true,\n writable: true,\n value: void 0\n });\n this.abi = abi;\n this.args = args;\n this.cause = cause;\n this.contractAddress = contractAddress;\n this.functionName = functionName;\n this.sender = sender;\n }\n}\nexport class ContractFunctionRevertedError extends BaseError {\n constructor({ abi, data, functionName, message, cause: error, }) {\n let cause;\n let decodedData;\n let metaMessages;\n let reason;\n if (data && data !== '0x') {\n try {\n decodedData = decodeErrorResult({ abi, data, cause: error });\n const { abiItem, errorName, args: errorArgs } = decodedData;\n if (errorName === 'Error') {\n reason = errorArgs[0];\n }\n else if (errorName === 'Panic') {\n const [firstArg] = errorArgs;\n reason = panicReasons[firstArg];\n }\n else {\n const errorWithParams = abiItem\n ? formatAbiItem(abiItem, { includeName: true })\n : undefined;\n const formattedArgs = abiItem && errorArgs\n ? formatAbiItemWithArgs({\n abiItem,\n args: errorArgs,\n includeFunctionName: false,\n includeName: false,\n })\n : undefined;\n metaMessages = [\n errorWithParams ? `Error: ${errorWithParams}` : '',\n formattedArgs && formattedArgs !== '()'\n ? ` ${[...Array(errorName?.length ?? 0).keys()]\n .map(() => ' ')\n .join('')}${formattedArgs}`\n : '',\n ];\n }\n }\n catch (err) {\n cause = err;\n }\n }\n else if (message)\n reason = message;\n let signature;\n if (cause instanceof AbiErrorSignatureNotFoundError) {\n signature = cause.signature;\n metaMessages = [\n `Unable to decode signature \"${signature}\" as it was not found on the provided ABI.`,\n 'Make sure you are using the correct ABI and that the error exists on it.',\n `You can look up the decoded signature here: https://4byte.sourcify.dev/?q=${signature}.`,\n ];\n }\n super((reason && reason !== 'execution reverted') || signature\n ? [\n `The contract function \"${functionName}\" reverted with the following ${signature ? 'signature' : 'reason'}:`,\n reason || signature,\n ].join('\\n')\n : `The contract function \"${functionName}\" reverted.`, {\n cause: cause ?? error,\n metaMessages,\n name: 'ContractFunctionRevertedError',\n });\n Object.defineProperty(this, \"data\", {\n enumerable: true,\n configurable: true,\n writable: true,\n value: void 0\n });\n Object.defineProperty(this, \"raw\", {\n enumerable: true,\n configurable: true,\n writable: true,\n value: void 0\n });\n Object.defineProperty(this, \"reason\", {\n enumerable: true,\n configurable: true,\n writable: true,\n value: void 0\n });\n Object.defineProperty(this, \"signature\", {\n enumerable: true,\n configurable: true,\n writable: true,\n value: void 0\n });\n this.data = decodedData;\n this.raw = data;\n this.reason = reason;\n this.signature = signature;\n }\n}\nexport class ContractFunctionZeroDataError extends BaseError {\n constructor({ functionName, cause, }) {\n super(`The contract function \"${functionName}\" returned no data (\"0x\").`, {\n metaMessages: [\n 'This could be due to any of the following:',\n ` - The contract does not have the function \"${functionName}\",`,\n ' - The parameters passed to the contract function may be invalid, or',\n ' - The address is not a contract.',\n ],\n name: 'ContractFunctionZeroDataError',\n cause,\n });\n }\n}\nexport class CounterfactualDeploymentFailedError extends BaseError {\n constructor({ factory }) {\n super(`Deployment for counterfactual contract call failed${factory ? ` for factory \"${factory}\".` : ''}`, {\n metaMessages: [\n 'Please ensure:',\n '- The `factory` is a valid contract deployment factory (ie. Create2 Factory, ERC-4337 Factory, etc).',\n '- The `factoryData` is a valid encoded function call for contract deployment function on the factory.',\n ],\n name: 'CounterfactualDeploymentFailedError',\n });\n }\n}\nexport class RawContractError extends BaseError {\n constructor({ data, message, }) {\n super(message || '', { name: 'RawContractError' });\n Object.defineProperty(this, \"code\", {\n enumerable: true,\n configurable: true,\n writable: true,\n value: 3\n });\n Object.defineProperty(this, \"data\", {\n enumerable: true,\n configurable: true,\n writable: true,\n value: void 0\n });\n this.data = data;\n }\n}\n//# sourceMappingURL=contract.js.map","import { stringify } from '../utils/stringify.js';\nimport { BaseError } from './base.js';\nimport { getUrl } from './utils.js';\nexport class HttpRequestError extends BaseError {\n constructor({ body, cause, details, headers, status, url, }) {\n super('HTTP request failed.', {\n cause,\n details,\n metaMessages: [\n status && `Status: ${status}`,\n `URL: ${getUrl(url)}`,\n body && `Request body: ${stringify(body)}`,\n ].filter(Boolean),\n name: 'HttpRequestError',\n });\n Object.defineProperty(this, \"body\", {\n enumerable: true,\n configurable: true,\n writable: true,\n value: void 0\n });\n Object.defineProperty(this, \"headers\", {\n enumerable: true,\n configurable: true,\n writable: true,\n value: void 0\n });\n Object.defineProperty(this, \"status\", {\n enumerable: true,\n configurable: true,\n writable: true,\n value: void 0\n });\n Object.defineProperty(this, \"url\", {\n enumerable: true,\n configurable: true,\n writable: true,\n value: void 0\n });\n this.body = body;\n this.headers = headers;\n this.status = status;\n this.url = url;\n }\n}\nexport class ResponseBodyTooLargeError extends BaseError {\n constructor({ maxSize, size }) {\n super('HTTP response body exceeded the size limit.', {\n metaMessages: [`Max: ${maxSize} bytes`, `Received: ${size} bytes`],\n name: 'ResponseBodyTooLargeError',\n });\n Object.defineProperty(this, \"maxSize\", {\n enumerable: true,\n configurable: true,\n writable: true,\n value: void 0\n });\n Object.defineProperty(this, \"size\", {\n enumerable: true,\n configurable: true,\n writable: true,\n value: void 0\n });\n this.maxSize = maxSize;\n this.size = size;\n }\n}\nexport class WebSocketRequestError extends BaseError {\n constructor({ body, cause, details, url, }) {\n super('WebSocket request failed.', {\n cause,\n details,\n metaMessages: [\n `URL: ${getUrl(url)}`,\n body && `Request body: ${stringify(body)}`,\n ].filter(Boolean),\n name: 'WebSocketRequestError',\n });\n Object.defineProperty(this, \"url\", {\n enumerable: true,\n configurable: true,\n writable: true,\n value: void 0\n });\n this.url = url;\n }\n}\nexport class RpcRequestError extends BaseError {\n constructor({ body, error, url, }) {\n super('RPC Request failed.', {\n cause: error,\n details: error.message,\n metaMessages: [`URL: ${getUrl(url)}`, `Request body: ${stringify(body)}`],\n name: 'RpcRequestError',\n });\n Object.defineProperty(this, \"code\", {\n enumerable: true,\n configurable: true,\n writable: true,\n value: void 0\n });\n Object.defineProperty(this, \"data\", {\n enumerable: true,\n configurable: true,\n writable: true,\n value: void 0\n });\n Object.defineProperty(this, \"url\", {\n enumerable: true,\n configurable: true,\n writable: true,\n value: void 0\n });\n this.code = error.code;\n this.data = error.data;\n this.url = url;\n }\n}\nexport class SocketClosedError extends BaseError {\n constructor({ url, } = {}) {\n super('The socket has been closed.', {\n metaMessages: [url && `URL: ${getUrl(url)}`].filter(Boolean),\n name: 'SocketClosedError',\n });\n Object.defineProperty(this, \"url\", {\n enumerable: true,\n configurable: true,\n writable: true,\n value: void 0\n });\n this.url = url;\n }\n}\nexport class TimeoutError extends BaseError {\n constructor({ body, url, }) {\n super('The request took too long to respond.', {\n details: 'The request timed out.',\n metaMessages: [`URL: ${getUrl(url)}`, `Request body: ${stringify(body)}`],\n name: 'TimeoutError',\n });\n Object.defineProperty(this, \"url\", {\n enumerable: true,\n configurable: true,\n writable: true,\n value: void 0\n });\n this.url = url;\n }\n}\n//# sourceMappingURL=request.js.map","import { BaseError } from './base.js';\nimport { RpcRequestError } from './request.js';\nconst unknownErrorCode = -1;\nexport class RpcError extends BaseError {\n constructor(cause, { code, docsPath, metaMessages, name, shortMessage, }) {\n super(shortMessage, {\n cause,\n docsPath,\n metaMessages: metaMessages || cause?.metaMessages,\n name: name || 'RpcError',\n });\n Object.defineProperty(this, \"code\", {\n enumerable: true,\n configurable: true,\n writable: true,\n value: void 0\n });\n this.name = name || cause.name;\n this.code = (cause instanceof RpcRequestError ? cause.code : (code ?? unknownErrorCode));\n }\n}\nexport class ProviderRpcError extends RpcError {\n constructor(cause, options) {\n super(cause, options);\n Object.defineProperty(this, \"data\", {\n enumerable: true,\n configurable: true,\n writable: true,\n value: void 0\n });\n this.data = options.data;\n }\n}\nexport class ParseRpcError extends RpcError {\n constructor(cause) {\n super(cause, {\n code: ParseRpcError.code,\n name: 'ParseRpcError',\n shortMessage: 'Invalid JSON was received by the server. An error occurred on the server while parsing the JSON text.',\n });\n }\n}\nObject.defineProperty(ParseRpcError, \"code\", {\n enumerable: true,\n configurable: true,\n writable: true,\n value: -32700\n});\nexport class InvalidRequestRpcError extends RpcError {\n constructor(cause) {\n super(cause, {\n code: InvalidRequestRpcError.code,\n name: 'InvalidRequestRpcError',\n shortMessage: 'JSON is not a valid request object.',\n });\n }\n}\nObject.defineProperty(InvalidRequestRpcError, \"code\", {\n enumerable: true,\n configurable: true,\n writable: true,\n value: -32600\n});\nexport class MethodNotFoundRpcError extends RpcError {\n constructor(cause, { method } = {}) {\n super(cause, {\n code: MethodNotFoundRpcError.code,\n name: 'MethodNotFoundRpcError',\n shortMessage: `The method${method ? ` \"${method}\"` : ''} does not exist / is not available.`,\n });\n }\n}\nObject.defineProperty(MethodNotFoundRpcError, \"code\", {\n enumerable: true,\n configurable: true,\n writable: true,\n value: -32601\n});\nexport class InvalidParamsRpcError extends RpcError {\n constructor(cause) {\n super(cause, {\n code: InvalidParamsRpcError.code,\n name: 'InvalidParamsRpcError',\n shortMessage: [\n 'Invalid parameters were provided to the RPC method.',\n 'Double check you have provided the correct parameters.',\n ].join('\\n'),\n });\n }\n}\nObject.defineProperty(InvalidParamsRpcError, \"code\", {\n enumerable: true,\n configurable: true,\n writable: true,\n value: -32602\n});\nexport class InternalRpcError extends RpcError {\n constructor(cause) {\n super(cause, {\n code: InternalRpcError.code,\n name: 'InternalRpcError',\n shortMessage: 'An internal error was received.',\n });\n }\n}\nObject.defineProperty(InternalRpcError, \"code\", {\n enumerable: true,\n configurable: true,\n writable: true,\n value: -32603\n});\nexport class InvalidInputRpcError extends RpcError {\n constructor(cause) {\n super(cause, {\n code: InvalidInputRpcError.code,\n name: 'InvalidInputRpcError',\n shortMessage: [\n 'Missing or invalid parameters.',\n 'Double check you have provided the correct parameters.',\n ].join('\\n'),\n });\n }\n}\nObject.defineProperty(InvalidInputRpcError, \"code\", {\n enumerable: true,\n configurable: true,\n writable: true,\n value: -32000\n});\nexport class ResourceNotFoundRpcError extends RpcError {\n constructor(cause) {\n super(cause, {\n code: ResourceNotFoundRpcError.code,\n name: 'ResourceNotFoundRpcError',\n shortMessage: 'Requested resource not found.',\n });\n Object.defineProperty(this, \"name\", {\n enumerable: true,\n configurable: true,\n writable: true,\n value: 'ResourceNotFoundRpcError'\n });\n }\n}\nObject.defineProperty(ResourceNotFoundRpcError, \"code\", {\n enumerable: true,\n configurable: true,\n writable: true,\n value: -32001\n});\nexport class ResourceUnavailableRpcError extends RpcError {\n constructor(cause) {\n super(cause, {\n code: ResourceUnavailableRpcError.code,\n name: 'ResourceUnavailableRpcError',\n shortMessage: 'Requested resource not available.',\n });\n }\n}\nObject.defineProperty(ResourceUnavailableRpcError, \"code\", {\n enumerable: true,\n configurable: true,\n writable: true,\n value: -32002\n});\nexport class TransactionRejectedRpcError extends RpcError {\n constructor(cause) {\n super(cause, {\n code: TransactionRejectedRpcError.code,\n name: 'TransactionRejectedRpcError',\n shortMessage: 'Transaction creation failed.',\n });\n }\n}\nObject.defineProperty(TransactionRejectedRpcError, \"code\", {\n enumerable: true,\n configurable: true,\n writable: true,\n value: -32003\n});\nexport class MethodNotSupportedRpcError extends RpcError {\n constructor(cause, { method } = {}) {\n super(cause, {\n code: MethodNotSupportedRpcError.code,\n name: 'MethodNotSupportedRpcError',\n shortMessage: `Method${method ? ` \"${method}\"` : ''} is not supported.`,\n });\n }\n}\nObject.defineProperty(MethodNotSupportedRpcError, \"code\", {\n enumerable: true,\n configurable: true,\n writable: true,\n value: -32004\n});\nexport class LimitExceededRpcError extends RpcError {\n constructor(cause) {\n super(cause, {\n code: LimitExceededRpcError.code,\n name: 'LimitExceededRpcError',\n shortMessage: 'Request exceeds defined limit.',\n });\n }\n}\nObject.defineProperty(LimitExceededRpcError, \"code\", {\n enumerable: true,\n configurable: true,\n writable: true,\n value: -32005\n});\nexport class JsonRpcVersionUnsupportedError extends RpcError {\n constructor(cause) {\n super(cause, {\n code: JsonRpcVersionUnsupportedError.code,\n name: 'JsonRpcVersionUnsupportedError',\n shortMessage: 'Version of JSON-RPC protocol is not supported.',\n });\n }\n}\nObject.defineProperty(JsonRpcVersionUnsupportedError, \"code\", {\n enumerable: true,\n configurable: true,\n writable: true,\n value: -32006\n});\nexport class UserRejectedRequestError extends ProviderRpcError {\n constructor(cause) {\n super(cause, {\n code: UserRejectedRequestError.code,\n name: 'UserRejectedRequestError',\n shortMessage: 'User rejected the request.',\n });\n }\n}\nObject.defineProperty(UserRejectedRequestError, \"code\", {\n enumerable: true,\n configurable: true,\n writable: true,\n value: 4001\n});\nexport class UnauthorizedProviderError extends ProviderRpcError {\n constructor(cause) {\n super(cause, {\n code: UnauthorizedProviderError.code,\n name: 'UnauthorizedProviderError',\n shortMessage: 'The requested method and/or account has not been authorized by the user.',\n });\n }\n}\nObject.defineProperty(UnauthorizedProviderError, \"code\", {\n enumerable: true,\n configurable: true,\n writable: true,\n value: 4100\n});\nexport class UnsupportedProviderMethodError extends ProviderRpcError {\n constructor(cause, { method } = {}) {\n super(cause, {\n code: UnsupportedProviderMethodError.code,\n name: 'UnsupportedProviderMethodError',\n shortMessage: `The Provider does not support the requested method${method ? ` \" ${method}\"` : ''}.`,\n });\n }\n}\nObject.defineProperty(UnsupportedProviderMethodError, \"code\", {\n enumerable: true,\n configurable: true,\n writable: true,\n value: 4200\n});\nexport class ProviderDisconnectedError extends ProviderRpcError {\n constructor(cause) {\n super(cause, {\n code: ProviderDisconnectedError.code,\n name: 'ProviderDisconnectedError',\n shortMessage: 'The Provider is disconnected from all chains.',\n });\n }\n}\nObject.defineProperty(ProviderDisconnectedError, \"code\", {\n enumerable: true,\n configurable: true,\n writable: true,\n value: 4900\n});\nexport class ChainDisconnectedError extends ProviderRpcError {\n constructor(cause) {\n super(cause, {\n code: ChainDisconnectedError.code,\n name: 'ChainDisconnectedError',\n shortMessage: 'The Provider is not connected to the requested chain.',\n });\n }\n}\nObject.defineProperty(ChainDisconnectedError, \"code\", {\n enumerable: true,\n configurable: true,\n writable: true,\n value: 4901\n});\nexport class SwitchChainError extends ProviderRpcError {\n constructor(cause) {\n super(cause, {\n code: SwitchChainError.code,\n name: 'SwitchChainError',\n shortMessage: 'An error occurred when attempting to switch chain.',\n });\n }\n}\nObject.defineProperty(SwitchChainError, \"code\", {\n enumerable: true,\n configurable: true,\n writable: true,\n value: 4902\n});\nexport class UnsupportedNonOptionalCapabilityError extends ProviderRpcError {\n constructor(cause) {\n super(cause, {\n code: UnsupportedNonOptionalCapabilityError.code,\n name: 'UnsupportedNonOptionalCapabilityError',\n shortMessage: 'This Wallet does not support a capability that was not marked as optional.',\n });\n }\n}\nObject.defineProperty(UnsupportedNonOptionalCapabilityError, \"code\", {\n enumerable: true,\n configurable: true,\n writable: true,\n value: 5700\n});\nexport class UnsupportedChainIdError extends ProviderRpcError {\n constructor(cause) {\n super(cause, {\n code: UnsupportedChainIdError.code,\n name: 'UnsupportedChainIdError',\n shortMessage: 'This Wallet does not support the requested chain ID.',\n });\n }\n}\nObject.defineProperty(UnsupportedChainIdError, \"code\", {\n enumerable: true,\n configurable: true,\n writable: true,\n value: 5710\n});\nexport class DuplicateIdError extends ProviderRpcError {\n constructor(cause) {\n super(cause, {\n code: DuplicateIdError.code,\n name: 'DuplicateIdError',\n shortMessage: 'There is already a bundle submitted with this ID.',\n });\n }\n}\nObject.defineProperty(DuplicateIdError, \"code\", {\n enumerable: true,\n configurable: true,\n writable: true,\n value: 5720\n});\nexport class UnknownBundleIdError extends ProviderRpcError {\n constructor(cause) {\n super(cause, {\n code: UnknownBundleIdError.code,\n name: 'UnknownBundleIdError',\n shortMessage: 'This bundle id is unknown / has not been submitted',\n });\n }\n}\nObject.defineProperty(UnknownBundleIdError, \"code\", {\n enumerable: true,\n configurable: true,\n writable: true,\n value: 5730\n});\nexport class BundleTooLargeError extends ProviderRpcError {\n constructor(cause) {\n super(cause, {\n code: BundleTooLargeError.code,\n name: 'BundleTooLargeError',\n shortMessage: 'The call bundle is too large for the Wallet to process.',\n });\n }\n}\nObject.defineProperty(BundleTooLargeError, \"code\", {\n enumerable: true,\n configurable: true,\n writable: true,\n value: 5740\n});\nexport class AtomicReadyWalletRejectedUpgradeError extends ProviderRpcError {\n constructor(cause) {\n super(cause, {\n code: AtomicReadyWalletRejectedUpgradeError.code,\n name: 'AtomicReadyWalletRejectedUpgradeError',\n shortMessage: 'The Wallet can support atomicity after an upgrade, but the user rejected the upgrade.',\n });\n }\n}\nObject.defineProperty(AtomicReadyWalletRejectedUpgradeError, \"code\", {\n enumerable: true,\n configurable: true,\n writable: true,\n value: 5750\n});\nexport class AtomicityNotSupportedError extends ProviderRpcError {\n constructor(cause) {\n super(cause, {\n code: AtomicityNotSupportedError.code,\n name: 'AtomicityNotSupportedError',\n shortMessage: 'The wallet does not support atomic execution but the request requires it.',\n });\n }\n}\nObject.defineProperty(AtomicityNotSupportedError, \"code\", {\n enumerable: true,\n configurable: true,\n writable: true,\n value: 5760\n});\nexport class WalletConnectSessionSettlementError extends ProviderRpcError {\n constructor(cause) {\n super(cause, {\n code: WalletConnectSessionSettlementError.code,\n name: 'WalletConnectSessionSettlementError',\n shortMessage: 'WalletConnect session settlement failed.',\n });\n }\n}\nObject.defineProperty(WalletConnectSessionSettlementError, \"code\", {\n enumerable: true,\n configurable: true,\n writable: true,\n value: 7000\n});\nexport class UnknownRpcError extends RpcError {\n constructor(cause) {\n super(cause, {\n name: 'UnknownRpcError',\n shortMessage: 'An unknown RPC error occurred.',\n });\n }\n}\n//# sourceMappingURL=rpc.js.map","import { AbiDecodingZeroDataError } from '../../errors/abi.js';\nimport { BaseError } from '../../errors/base.js';\nimport { ContractFunctionExecutionError, ContractFunctionRevertedError, ContractFunctionZeroDataError, RawContractError, } from '../../errors/contract.js';\nimport { RpcRequestError } from '../../errors/request.js';\nimport { InternalRpcError, InvalidInputRpcError } from '../../errors/rpc.js';\nconst EXECUTION_REVERTED_ERROR_CODE = 3;\nexport function getContractError(err, { abi, address, args, docsPath, functionName, sender, }) {\n const error = (err instanceof RawContractError\n ? err\n : err instanceof BaseError\n ? err.walk((err) => 'data' in err) || err.walk()\n : {});\n const { code, data, details, message, shortMessage } = error;\n const cause = (() => {\n if (err instanceof AbiDecodingZeroDataError)\n return new ContractFunctionZeroDataError({ functionName, cause: err });\n if (([EXECUTION_REVERTED_ERROR_CODE, InternalRpcError.code].includes(code) &&\n (data || details || message || shortMessage)) ||\n (code === InvalidInputRpcError.code &&\n details === 'execution reverted' &&\n data)) {\n return new ContractFunctionRevertedError({\n abi,\n data: typeof data === 'object' ? data.data : data,\n functionName,\n message: error instanceof RpcRequestError\n ? details\n : (shortMessage ?? message),\n cause: err,\n });\n }\n return err;\n })();\n return new ContractFunctionExecutionError(cause, {\n abi,\n args,\n contractAddress: address,\n docsPath,\n functionName,\n sender,\n });\n}\n//# sourceMappingURL=getContractError.js.map","import { formatGwei } from '../utils/unit/formatGwei.js';\nimport { BaseError } from './base.js';\nexport class ExecutionRevertedError extends BaseError {\n constructor({ cause, message, } = {}) {\n const reason = message\n ?.replace('execution reverted: ', '')\n ?.replace('execution reverted', '');\n super(`Execution reverted ${reason ? `with reason: ${reason}` : 'for an unknown reason'}.`, {\n cause,\n name: 'ExecutionRevertedError',\n });\n }\n}\nObject.defineProperty(ExecutionRevertedError, \"code\", {\n enumerable: true,\n configurable: true,\n writable: true,\n value: 3\n});\nObject.defineProperty(ExecutionRevertedError, \"nodeMessage\", {\n enumerable: true,\n configurable: true,\n writable: true,\n value: /execution reverted|gas required exceeds allowance/\n});\nexport class FeeCapTooHighError extends BaseError {\n constructor({ cause, maxFeePerGas, } = {}) {\n super(`The fee cap (\\`maxFeePerGas\\`${maxFeePerGas ? ` = ${formatGwei(maxFeePerGas)} gwei` : ''}) cannot be higher than the maximum allowed value (2^256-1).`, {\n cause,\n name: 'FeeCapTooHighError',\n });\n }\n}\nObject.defineProperty(FeeCapTooHighError, \"nodeMessage\", {\n enumerable: true,\n configurable: true,\n writable: true,\n value: /max fee per gas higher than 2\\^256-1|fee cap higher than 2\\^256-1/\n});\nexport class FeeCapTooLowError extends BaseError {\n constructor({ cause, maxFeePerGas, } = {}) {\n super(`The fee cap (\\`maxFeePerGas\\`${maxFeePerGas ? ` = ${formatGwei(maxFeePerGas)}` : ''} gwei) cannot be lower than the block base fee.`, {\n cause,\n name: 'FeeCapTooLowError',\n });\n }\n}\nObject.defineProperty(FeeCapTooLowError, \"nodeMessage\", {\n enumerable: true,\n configurable: true,\n writable: true,\n value: /max fee per gas less than block base fee|fee cap less than block base fee|transaction is outdated/\n});\nexport class NonceTooHighError extends BaseError {\n constructor({ cause, nonce, } = {}) {\n super(`Nonce provided for the transaction ${nonce ? `(${nonce}) ` : ''}is higher than the next one expected.`, { cause, name: 'NonceTooHighError' });\n }\n}\nObject.defineProperty(NonceTooHighError, \"nodeMessage\", {\n enumerable: true,\n configurable: true,\n writable: true,\n value: /nonce too high/\n});\nexport class NonceTooLowError extends BaseError {\n constructor({ cause, nonce, } = {}) {\n super([\n `Nonce provided for the transaction ${nonce ? `(${nonce}) ` : ''}is lower than the current nonce of the account.`,\n 'Try increasing the nonce or find the latest nonce with `getTransactionCount`.',\n ].join('\\n'), { cause, name: 'NonceTooLowError' });\n }\n}\nObject.defineProperty(NonceTooLowError, \"nodeMessage\", {\n enumerable: true,\n configurable: true,\n writable: true,\n value: /nonce too low|transaction already imported|already known/\n});\nexport class NonceMaxValueError extends BaseError {\n constructor({ cause, nonce, } = {}) {\n super(`Nonce provided for the transaction ${nonce ? `(${nonce}) ` : ''}exceeds the maximum allowed nonce.`, { cause, name: 'NonceMaxValueError' });\n }\n}\nObject.defineProperty(NonceMaxValueError, \"nodeMessage\", {\n enumerable: true,\n configurable: true,\n writable: true,\n value: /nonce has max value/\n});\nexport class InsufficientFundsError extends BaseError {\n constructor({ cause } = {}) {\n super([\n 'The total cost (gas * gas fee + value) of executing this transaction exceeds the balance of the account.',\n ].join('\\n'), {\n cause,\n metaMessages: [\n 'This error could arise when the account does not have enough funds to:',\n ' - pay for the total gas fee,',\n ' - pay for the value to send.',\n ' ',\n 'The cost of the transaction is calculated as `gas * gas fee + value`, where:',\n ' - `gas` is the amount of gas needed for transaction to execute,',\n ' - `gas fee` is the gas fee,',\n ' - `value` is the amount of ether to send to the recipient.',\n ],\n name: 'InsufficientFundsError',\n });\n }\n}\nObject.defineProperty(InsufficientFundsError, \"nodeMessage\", {\n enumerable: true,\n configurable: true,\n writable: true,\n value: /insufficient funds|exceeds transaction sender account balance/\n});\nexport class IntrinsicGasTooHighError extends BaseError {\n constructor({ cause, gas, } = {}) {\n super(`The amount of gas ${gas ? `(${gas}) ` : ''}provided for the transaction exceeds the limit allowed for the block.`, {\n cause,\n name: 'IntrinsicGasTooHighError',\n });\n }\n}\nObject.defineProperty(IntrinsicGasTooHighError, \"nodeMessage\", {\n enumerable: true,\n configurable: true,\n writable: true,\n value: /intrinsic gas too high|gas limit reached/\n});\nexport class IntrinsicGasTooLowError extends BaseError {\n constructor({ cause, gas, } = {}) {\n super(`The amount of gas ${gas ? `(${gas}) ` : ''}provided for the transaction is too low.`, {\n cause,\n name: 'IntrinsicGasTooLowError',\n });\n }\n}\nObject.defineProperty(IntrinsicGasTooLowError, \"nodeMessage\", {\n enumerable: true,\n configurable: true,\n writable: true,\n value: /intrinsic gas too low/\n});\nexport class TransactionTypeNotSupportedError extends BaseError {\n constructor({ cause }) {\n super('The transaction type is not supported for this chain.', {\n cause,\n name: 'TransactionTypeNotSupportedError',\n });\n }\n}\nObject.defineProperty(TransactionTypeNotSupportedError, \"nodeMessage\", {\n enumerable: true,\n configurable: true,\n writable: true,\n value: /transaction type not valid/\n});\nexport class TipAboveFeeCapError extends BaseError {\n constructor({ cause, maxPriorityFeePerGas, maxFeePerGas, } = {}) {\n super([\n `The provided tip (\\`maxPriorityFeePerGas\\`${maxPriorityFeePerGas\n ? ` = ${formatGwei(maxPriorityFeePerGas)} gwei`\n : ''}) cannot be higher than the fee cap (\\`maxFeePerGas\\`${maxFeePerGas ? ` = ${formatGwei(maxFeePerGas)} gwei` : ''}).`,\n ].join('\\n'), {\n cause,\n name: 'TipAboveFeeCapError',\n });\n }\n}\nObject.defineProperty(TipAboveFeeCapError, \"nodeMessage\", {\n enumerable: true,\n configurable: true,\n writable: true,\n value: /max priority fee per gas higher than max fee per gas|tip higher than fee cap/\n});\nexport class UnknownNodeError extends BaseError {\n constructor({ cause }) {\n super(`An error occurred while executing: ${cause?.shortMessage}`, {\n cause,\n name: 'UnknownNodeError',\n });\n }\n}\n//# sourceMappingURL=node.js.map","import { BaseError } from '../../errors/base.js';\nimport { ExecutionRevertedError, FeeCapTooHighError, FeeCapTooLowError, InsufficientFundsError, IntrinsicGasTooHighError, IntrinsicGasTooLowError, NonceMaxValueError, NonceTooHighError, NonceTooLowError, TipAboveFeeCapError, TransactionTypeNotSupportedError, UnknownNodeError, } from '../../errors/node.js';\nimport { RpcRequestError } from '../../errors/request.js';\nimport { InvalidInputRpcError, TransactionRejectedRpcError, } from '../../errors/rpc.js';\nexport function containsNodeError(err) {\n return (err instanceof TransactionRejectedRpcError ||\n err instanceof InvalidInputRpcError ||\n (err instanceof RpcRequestError && err.code === ExecutionRevertedError.code));\n}\nexport function getNodeError(err, args) {\n const message = (err.details || '').toLowerCase();\n const executionRevertedError = err instanceof BaseError\n ? err.walk((e) => e?.code ===\n ExecutionRevertedError.code)\n : err;\n if (executionRevertedError instanceof BaseError)\n return new ExecutionRevertedError({\n cause: err,\n message: executionRevertedError.details,\n });\n if (ExecutionRevertedError.nodeMessage.test(message))\n return new ExecutionRevertedError({\n cause: err,\n message: err.details,\n });\n if (FeeCapTooHighError.nodeMessage.test(message))\n return new FeeCapTooHighError({\n cause: err,\n maxFeePerGas: args?.maxFeePerGas,\n });\n if (FeeCapTooLowError.nodeMessage.test(message))\n return new FeeCapTooLowError({\n cause: err,\n maxFeePerGas: args?.maxFeePerGas,\n });\n if (NonceTooHighError.nodeMessage.test(message))\n return new NonceTooHighError({ cause: err, nonce: args?.nonce });\n if (NonceTooLowError.nodeMessage.test(message))\n return new NonceTooLowError({ cause: err, nonce: args?.nonce });\n if (NonceMaxValueError.nodeMessage.test(message))\n return new NonceMaxValueError({ cause: err, nonce: args?.nonce });\n if (InsufficientFundsError.nodeMessage.test(message))\n return new InsufficientFundsError({ cause: err });\n if (IntrinsicGasTooHighError.nodeMessage.test(message))\n return new IntrinsicGasTooHighError({ cause: err, gas: args?.gas });\n if (IntrinsicGasTooLowError.nodeMessage.test(message))\n return new IntrinsicGasTooLowError({ cause: err, gas: args?.gas });\n if (TransactionTypeNotSupportedError.nodeMessage.test(message))\n return new TransactionTypeNotSupportedError({ cause: err });\n if (TipAboveFeeCapError.nodeMessage.test(message))\n return new TipAboveFeeCapError({\n cause: err,\n maxFeePerGas: args?.maxFeePerGas,\n maxPriorityFeePerGas: args?.maxPriorityFeePerGas,\n });\n return new UnknownNodeError({\n cause: err,\n });\n}\n//# sourceMappingURL=getNodeError.js.map","/**\n * @description Picks out the keys from `value` that exist in the formatter..\n */\nexport function extract(value_, { format }) {\n if (!format)\n return {};\n const value = {};\n function extract_(formatted) {\n const keys = Object.keys(formatted);\n for (const key of keys) {\n if (key in value_)\n value[key] = value_[key];\n if (formatted[key] &&\n typeof formatted[key] === 'object' &&\n !Array.isArray(formatted[key]))\n extract_(formatted[key]);\n }\n }\n const formatted = format(value_ || {});\n extract_(formatted);\n return value;\n}\n//# sourceMappingURL=extract.js.map","import { bytesToHex, numberToHex } from '../encoding/toHex.js';\nimport { defineFormatter } from './formatter.js';\nexport const rpcTransactionType = {\n legacy: '0x0',\n eip2930: '0x1',\n eip1559: '0x2',\n eip4844: '0x3',\n eip7702: '0x4',\n};\nexport function formatTransactionRequest(request, _) {\n const rpcRequest = {};\n if (typeof request.authorizationList !== 'undefined')\n rpcRequest.authorizationList = formatAuthorizationList(request.authorizationList);\n if (typeof request.accessList !== 'undefined')\n rpcRequest.accessList = request.accessList;\n if (typeof request.blobVersionedHashes !== 'undefined')\n rpcRequest.blobVersionedHashes = request.blobVersionedHashes;\n if (typeof request.blobs !== 'undefined') {\n if (typeof request.blobs[0] !== 'string')\n rpcRequest.blobs = request.blobs.map((x) => bytesToHex(x));\n else\n rpcRequest.blobs = request.blobs;\n }\n if (typeof request.data !== 'undefined')\n rpcRequest.data = request.data;\n if (request.account)\n rpcRequest.from = request.account.address;\n if (typeof request.from !== 'undefined')\n rpcRequest.from = request.from;\n if (typeof request.gas !== 'undefined')\n rpcRequest.gas = numberToHex(request.gas);\n if (typeof request.gasPrice !== 'undefined')\n rpcRequest.gasPrice = numberToHex(request.gasPrice);\n if (typeof request.maxFeePerBlobGas !== 'undefined')\n rpcRequest.maxFeePerBlobGas = numberToHex(request.maxFeePerBlobGas);\n if (typeof request.maxFeePerGas !== 'undefined')\n rpcRequest.maxFeePerGas = numberToHex(request.maxFeePerGas);\n if (typeof request.maxPriorityFeePerGas !== 'undefined')\n rpcRequest.maxPriorityFeePerGas = numberToHex(request.maxPriorityFeePerGas);\n if (typeof request.nonce !== 'undefined')\n rpcRequest.nonce = numberToHex(request.nonce);\n if (typeof request.to !== 'undefined')\n rpcRequest.to = request.to;\n if (typeof request.type !== 'undefined')\n rpcRequest.type = rpcTransactionType[request.type];\n if (typeof request.value !== 'undefined')\n rpcRequest.value = numberToHex(request.value);\n return rpcRequest;\n}\nexport const defineTransactionRequest = /*#__PURE__*/ defineFormatter('transactionRequest', formatTransactionRequest);\n//////////////////////////////////////////////////////////////////////////////\nfunction formatAuthorizationList(authorizationList) {\n return authorizationList.map((authorization) => ({\n address: authorization.address,\n r: authorization.r\n ? numberToHex(BigInt(authorization.r))\n : authorization.r,\n s: authorization.s\n ? numberToHex(BigInt(authorization.s))\n : authorization.s,\n chainId: numberToHex(authorization.chainId),\n nonce: numberToHex(authorization.nonce),\n ...(typeof authorization.yParity !== 'undefined'\n ? { yParity: numberToHex(authorization.yParity) }\n : {}),\n ...(typeof authorization.v !== 'undefined' &&\n typeof authorization.yParity === 'undefined'\n ? { v: numberToHex(authorization.v) }\n : {}),\n }));\n}\n//# sourceMappingURL=transactionRequest.js.map","import { InvalidAddressError, } from '../errors/address.js';\nimport { InvalidBytesLengthError, } from '../errors/data.js';\nimport { AccountStateConflictError, StateAssignmentConflictError, } from '../errors/stateOverride.js';\nimport { isAddress } from './address/isAddress.js';\nimport { numberToHex } from './encoding/toHex.js';\n/** @internal */\nexport function serializeStateMapping(stateMapping) {\n if (!stateMapping || stateMapping.length === 0)\n return undefined;\n return stateMapping.reduce((acc, { slot, value }) => {\n if (slot.length !== 66)\n throw new InvalidBytesLengthError({\n size: slot.length,\n targetSize: 66,\n type: 'hex',\n });\n if (value.length !== 66)\n throw new InvalidBytesLengthError({\n size: value.length,\n targetSize: 66,\n type: 'hex',\n });\n acc[slot] = value;\n return acc;\n }, {});\n}\n/** @internal */\nexport function serializeAccountStateOverride(parameters) {\n const { balance, nonce, state, stateDiff, code } = parameters;\n const rpcAccountStateOverride = {};\n if (code !== undefined)\n rpcAccountStateOverride.code = code;\n if (balance !== undefined)\n rpcAccountStateOverride.balance = numberToHex(balance);\n if (nonce !== undefined)\n rpcAccountStateOverride.nonce = numberToHex(nonce);\n if (state !== undefined)\n rpcAccountStateOverride.state = serializeStateMapping(state);\n if (stateDiff !== undefined) {\n if (rpcAccountStateOverride.state)\n throw new StateAssignmentConflictError();\n rpcAccountStateOverride.stateDiff = serializeStateMapping(stateDiff);\n }\n return rpcAccountStateOverride;\n}\n/** @internal */\nexport function serializeStateOverride(parameters) {\n if (!parameters)\n return undefined;\n const rpcStateOverride = {};\n for (const { address, ...accountState } of parameters) {\n if (!isAddress(address, { strict: false }))\n throw new InvalidAddressError({ address });\n if (rpcStateOverride[address])\n throw new AccountStateConflictError({ address: address });\n rpcStateOverride[address] = serializeAccountStateOverride(accountState);\n }\n return rpcStateOverride;\n}\n//# sourceMappingURL=stateOverride.js.map","export const maxInt8 = 2n ** (8n - 1n) - 1n;\nexport const maxInt16 = 2n ** (16n - 1n) - 1n;\nexport const maxInt24 = 2n ** (24n - 1n) - 1n;\nexport const maxInt32 = 2n ** (32n - 1n) - 1n;\nexport const maxInt40 = 2n ** (40n - 1n) - 1n;\nexport const maxInt48 = 2n ** (48n - 1n) - 1n;\nexport const maxInt56 = 2n ** (56n - 1n) - 1n;\nexport const maxInt64 = 2n ** (64n - 1n) - 1n;\nexport const maxInt72 = 2n ** (72n - 1n) - 1n;\nexport const maxInt80 = 2n ** (80n - 1n) - 1n;\nexport const maxInt88 = 2n ** (88n - 1n) - 1n;\nexport const maxInt96 = 2n ** (96n - 1n) - 1n;\nexport const maxInt104 = 2n ** (104n - 1n) - 1n;\nexport const maxInt112 = 2n ** (112n - 1n) - 1n;\nexport const maxInt120 = 2n ** (120n - 1n) - 1n;\nexport const maxInt128 = 2n ** (128n - 1n) - 1n;\nexport const maxInt136 = 2n ** (136n - 1n) - 1n;\nexport const maxInt144 = 2n ** (144n - 1n) - 1n;\nexport const maxInt152 = 2n ** (152n - 1n) - 1n;\nexport const maxInt160 = 2n ** (160n - 1n) - 1n;\nexport const maxInt168 = 2n ** (168n - 1n) - 1n;\nexport const maxInt176 = 2n ** (176n - 1n) - 1n;\nexport const maxInt184 = 2n ** (184n - 1n) - 1n;\nexport const maxInt192 = 2n ** (192n - 1n) - 1n;\nexport const maxInt200 = 2n ** (200n - 1n) - 1n;\nexport const maxInt208 = 2n ** (208n - 1n) - 1n;\nexport const maxInt216 = 2n ** (216n - 1n) - 1n;\nexport const maxInt224 = 2n ** (224n - 1n) - 1n;\nexport const maxInt232 = 2n ** (232n - 1n) - 1n;\nexport const maxInt240 = 2n ** (240n - 1n) - 1n;\nexport const maxInt248 = 2n ** (248n - 1n) - 1n;\nexport const maxInt256 = 2n ** (256n - 1n) - 1n;\nexport const minInt8 = -(2n ** (8n - 1n));\nexport const minInt16 = -(2n ** (16n - 1n));\nexport const minInt24 = -(2n ** (24n - 1n));\nexport const minInt32 = -(2n ** (32n - 1n));\nexport const minInt40 = -(2n ** (40n - 1n));\nexport const minInt48 = -(2n ** (48n - 1n));\nexport const minInt56 = -(2n ** (56n - 1n));\nexport const minInt64 = -(2n ** (64n - 1n));\nexport const minInt72 = -(2n ** (72n - 1n));\nexport const minInt80 = -(2n ** (80n - 1n));\nexport const minInt88 = -(2n ** (88n - 1n));\nexport const minInt96 = -(2n ** (96n - 1n));\nexport const minInt104 = -(2n ** (104n - 1n));\nexport const minInt112 = -(2n ** (112n - 1n));\nexport const minInt120 = -(2n ** (120n - 1n));\nexport const minInt128 = -(2n ** (128n - 1n));\nexport const minInt136 = -(2n ** (136n - 1n));\nexport const minInt144 = -(2n ** (144n - 1n));\nexport const minInt152 = -(2n ** (152n - 1n));\nexport const minInt160 = -(2n ** (160n - 1n));\nexport const minInt168 = -(2n ** (168n - 1n));\nexport const minInt176 = -(2n ** (176n - 1n));\nexport const minInt184 = -(2n ** (184n - 1n));\nexport const minInt192 = -(2n ** (192n - 1n));\nexport const minInt200 = -(2n ** (200n - 1n));\nexport const minInt208 = -(2n ** (208n - 1n));\nexport const minInt216 = -(2n ** (216n - 1n));\nexport const minInt224 = -(2n ** (224n - 1n));\nexport const minInt232 = -(2n ** (232n - 1n));\nexport const minInt240 = -(2n ** (240n - 1n));\nexport const minInt248 = -(2n ** (248n - 1n));\nexport const minInt256 = -(2n ** (256n - 1n));\nexport const maxUint8 = 2n ** 8n - 1n;\nexport const maxUint16 = 2n ** 16n - 1n;\nexport const maxUint24 = 2n ** 24n - 1n;\nexport const maxUint32 = 2n ** 32n - 1n;\nexport const maxUint40 = 2n ** 40n - 1n;\nexport const maxUint48 = 2n ** 48n - 1n;\nexport const maxUint56 = 2n ** 56n - 1n;\nexport const maxUint64 = 2n ** 64n - 1n;\nexport const maxUint72 = 2n ** 72n - 1n;\nexport const maxUint80 = 2n ** 80n - 1n;\nexport const maxUint88 = 2n ** 88n - 1n;\nexport const maxUint96 = 2n ** 96n - 1n;\nexport const maxUint104 = 2n ** 104n - 1n;\nexport const maxUint112 = 2n ** 112n - 1n;\nexport const maxUint120 = 2n ** 120n - 1n;\nexport const maxUint128 = 2n ** 128n - 1n;\nexport const maxUint136 = 2n ** 136n - 1n;\nexport const maxUint144 = 2n ** 144n - 1n;\nexport const maxUint152 = 2n ** 152n - 1n;\nexport const maxUint160 = 2n ** 160n - 1n;\nexport const maxUint168 = 2n ** 168n - 1n;\nexport const maxUint176 = 2n ** 176n - 1n;\nexport const maxUint184 = 2n ** 184n - 1n;\nexport const maxUint192 = 2n ** 192n - 1n;\nexport const maxUint200 = 2n ** 200n - 1n;\nexport const maxUint208 = 2n ** 208n - 1n;\nexport const maxUint216 = 2n ** 216n - 1n;\nexport const maxUint224 = 2n ** 224n - 1n;\nexport const maxUint232 = 2n ** 232n - 1n;\nexport const maxUint240 = 2n ** 240n - 1n;\nexport const maxUint248 = 2n ** 248n - 1n;\nexport const maxUint256 = 2n ** 256n - 1n;\n//# sourceMappingURL=number.js.map","import { parseAccount, } from '../../accounts/utils/parseAccount.js';\nimport { maxUint256 } from '../../constants/number.js';\nimport { InvalidAddressError, } from '../../errors/address.js';\nimport { FeeCapTooHighError, TipAboveFeeCapError, } from '../../errors/node.js';\nimport { isAddress } from '../address/isAddress.js';\nexport function assertRequest(args) {\n const { account: account_, maxFeePerGas, maxPriorityFeePerGas, to } = args;\n const account = account_ ? parseAccount(account_) : undefined;\n if (account && !isAddress(account.address))\n throw new InvalidAddressError({ address: account.address });\n if (to && !isAddress(to))\n throw new InvalidAddressError({ address: to });\n if (maxFeePerGas && maxFeePerGas > maxUint256)\n throw new FeeCapTooHighError({ maxFeePerGas });\n if (maxPriorityFeePerGas &&\n maxFeePerGas &&\n maxPriorityFeePerGas > maxFeePerGas)\n throw new TipAboveFeeCapError({ maxFeePerGas, maxPriorityFeePerGas });\n}\n//# sourceMappingURL=assertRequest.js.map","import { BaseError } from './base.js';\nexport class BlockNotFoundError extends BaseError {\n constructor({ blockHash, blockNumber, }) {\n let identifier = 'Block';\n if (blockHash)\n identifier = `Block at hash \"${blockHash}\"`;\n if (blockNumber)\n identifier = `Block at number \"${blockNumber}\"`;\n super(`${identifier} could not be found.`, { name: 'BlockNotFoundError' });\n }\n}\n//# sourceMappingURL=block.js.map","import { hexToNumber } from '../encoding/fromHex.js';\nimport { defineFormatter } from './formatter.js';\nexport const transactionType = {\n '0x0': 'legacy',\n '0x1': 'eip2930',\n '0x2': 'eip1559',\n '0x3': 'eip4844',\n '0x4': 'eip7702',\n};\nexport function formatTransaction(transaction, _) {\n const transaction_ = {\n ...transaction,\n blockHash: transaction.blockHash ? transaction.blockHash : null,\n blockNumber: transaction.blockNumber\n ? BigInt(transaction.blockNumber)\n : null,\n ...(transaction.blockTimestamp != null && {\n blockTimestamp: BigInt(transaction.blockTimestamp),\n }),\n chainId: transaction.chainId ? hexToNumber(transaction.chainId) : undefined,\n gas: transaction.gas ? BigInt(transaction.gas) : undefined,\n gasPrice: transaction.gasPrice ? BigInt(transaction.gasPrice) : undefined,\n maxFeePerBlobGas: transaction.maxFeePerBlobGas\n ? BigInt(transaction.maxFeePerBlobGas)\n : undefined,\n maxFeePerGas: transaction.maxFeePerGas\n ? BigInt(transaction.maxFeePerGas)\n : undefined,\n maxPriorityFeePerGas: transaction.maxPriorityFeePerGas\n ? BigInt(transaction.maxPriorityFeePerGas)\n : undefined,\n nonce: transaction.nonce ? hexToNumber(transaction.nonce) : undefined,\n to: transaction.to ? transaction.to : null,\n transactionIndex: transaction.transactionIndex\n ? Number(transaction.transactionIndex)\n : null,\n type: transaction.type\n ? transactionType[transaction.type]\n : undefined,\n typeHex: transaction.type ? transaction.type : undefined,\n value: transaction.value ? BigInt(transaction.value) : undefined,\n v: transaction.v ? BigInt(transaction.v) : undefined,\n };\n if (transaction.authorizationList)\n transaction_.authorizationList = formatAuthorizationList(transaction.authorizationList);\n transaction_.yParity = (() => {\n // If `yParity` is provided, we will use it.\n if (transaction.yParity)\n return Number(transaction.yParity);\n // If no `yParity` provided, try derive from `v`.\n if (typeof transaction_.v === 'bigint') {\n if (transaction_.v === 0n || transaction_.v === 27n)\n return 0;\n if (transaction_.v === 1n || transaction_.v === 28n)\n return 1;\n if (transaction_.v >= 35n)\n return transaction_.v % 2n === 0n ? 1 : 0;\n }\n return undefined;\n })();\n if (transaction_.type === 'legacy') {\n delete transaction_.accessList;\n delete transaction_.maxFeePerBlobGas;\n delete transaction_.maxFeePerGas;\n delete transaction_.maxPriorityFeePerGas;\n delete transaction_.yParity;\n }\n if (transaction_.type === 'eip2930') {\n delete transaction_.maxFeePerBlobGas;\n delete transaction_.maxFeePerGas;\n delete transaction_.maxPriorityFeePerGas;\n }\n if (transaction_.type === 'eip1559')\n delete transaction_.maxFeePerBlobGas;\n return transaction_;\n}\nexport const defineTransaction = /*#__PURE__*/ defineFormatter('transaction', formatTransaction);\n//////////////////////////////////////////////////////////////////////////////\nfunction formatAuthorizationList(authorizationList) {\n return authorizationList.map((authorization) => ({\n address: authorization.address,\n chainId: Number(authorization.chainId),\n nonce: Number(authorization.nonce),\n r: authorization.r,\n s: authorization.s,\n yParity: Number(authorization.yParity),\n }));\n}\n//# sourceMappingURL=transaction.js.map","import { defineFormatter } from './formatter.js';\nimport { formatTransaction } from './transaction.js';\nexport function formatBlock(block, _) {\n const transactions = (block.transactions ?? []).map((transaction) => {\n if (typeof transaction === 'string')\n return transaction;\n return formatTransaction(transaction);\n });\n return {\n ...block,\n baseFeePerGas: block.baseFeePerGas ? BigInt(block.baseFeePerGas) : null,\n blobGasUsed: block.blobGasUsed ? BigInt(block.blobGasUsed) : undefined,\n difficulty: block.difficulty ? BigInt(block.difficulty) : undefined,\n excessBlobGas: block.excessBlobGas\n ? BigInt(block.excessBlobGas)\n : undefined,\n gasLimit: block.gasLimit ? BigInt(block.gasLimit) : undefined,\n gasUsed: block.gasUsed ? BigInt(block.gasUsed) : undefined,\n hash: block.hash ? block.hash : null,\n logsBloom: block.logsBloom ? block.logsBloom : null,\n nonce: block.nonce ? block.nonce : null,\n number: block.number ? BigInt(block.number) : null,\n size: block.size ? BigInt(block.size) : undefined,\n timestamp: block.timestamp ? BigInt(block.timestamp) : undefined,\n transactions,\n totalDifficulty: block.totalDifficulty\n ? BigInt(block.totalDifficulty)\n : null,\n };\n}\nexport const defineBlock = /*#__PURE__*/ defineFormatter('block', formatBlock);\n//# sourceMappingURL=block.js.map","import { BlockNotFoundError, } from '../../errors/block.js';\nimport { numberToHex, } from '../../utils/encoding/toHex.js';\nimport { formatBlock, } from '../../utils/formatters/block.js';\n/**\n * Returns information about a block at a block number, hash, or tag.\n *\n * - Docs: https://viem.sh/docs/actions/public/getBlock\n * - Examples: https://stackblitz.com/github/wevm/viem/tree/main/examples/blocks_fetching-blocks\n * - JSON-RPC Methods:\n * - Calls [`eth_getBlockByNumber`](https://ethereum.org/en/developers/docs/apis/json-rpc/#eth_getblockbynumber) for `blockNumber` & `blockTag`.\n * - Calls [`eth_getBlockByHash`](https://ethereum.org/en/developers/docs/apis/json-rpc/#eth_getblockbyhash) for `blockHash`.\n *\n * @param client - Client to use\n * @param parameters - {@link GetBlockParameters}\n * @returns Information about the block. {@link GetBlockReturnType}\n *\n * @example\n * import { createPublicClient, http } from 'viem'\n * import { mainnet } from 'viem/chains'\n * import { getBlock } from 'viem/public'\n *\n * const client = createPublicClient({\n * chain: mainnet,\n * transport: http(),\n * })\n * const block = await getBlock(client)\n */\nexport async function getBlock(client, { blockHash, blockNumber, blockTag = client.experimental_blockTag ?? 'latest', includeTransactions: includeTransactions_, } = {}) {\n const includeTransactions = includeTransactions_ ?? false;\n const blockNumberHex = blockNumber !== undefined ? numberToHex(blockNumber) : undefined;\n let block = null;\n if (blockHash) {\n block = await client.request({\n method: 'eth_getBlockByHash',\n params: [blockHash, includeTransactions],\n }, { dedupe: true });\n }\n else {\n block = await client.request({\n method: 'eth_getBlockByNumber',\n params: [blockNumberHex || blockTag, includeTransactions],\n }, { dedupe: Boolean(blockNumberHex) });\n }\n if (!block)\n throw new BlockNotFoundError({ blockHash, blockNumber });\n const format = client.chain?.formatters?.block?.format || formatBlock;\n return format(block, 'getBlock');\n}\n//# sourceMappingURL=getBlock.js.map","import { BaseError } from '../../errors/base.js';\nimport { numberToHex } from '../encoding/toHex.js';\n/**\n * Formats block parameters for RPC calls according to EIP-1898.\n *\n * @param parameters - Block parameters\n * @returns Formatted block parameter for RPC call\n *\n * @example\n * // Using block tag\n * formatBlockParameter({ blockTag: 'latest' })\n * // => 'latest'\n *\n * @example\n * // Using block number\n * formatBlockParameter({ blockNumber: 69420n })\n * // => '0x10f2c'\n *\n * @example\n * // Using block hash (EIP-1898)\n * formatBlockParameter({ blockHash: '0x...' })\n * // => { blockHash: '0x...' }\n *\n * @example\n * // Using block hash with requireCanonical (EIP-1898)\n * formatBlockParameter({ blockHash: '0x...', requireCanonical: true })\n * // => { blockHash: '0x...', requireCanonical: true }\n */\nexport function formatBlockParameter(parameters) {\n const { blockHash, blockNumber, blockTag, requireCanonical } = parameters;\n if (requireCanonical !== undefined && !blockHash)\n throw new BaseError('`requireCanonical` can only be provided when `blockHash` is set.');\n if (blockHash)\n return requireCanonical ? { blockHash, requireCanonical } : { blockHash };\n if (typeof blockNumber === 'bigint')\n return numberToHex(blockNumber);\n return blockTag ?? 'latest';\n}\n//# sourceMappingURL=formatBlockParameter.js.map","import { InvalidAddressError, } from '../../errors/address.js';\nimport { isAddress } from './isAddress.js';\nexport function isAddressEqual(a, b) {\n if (!isAddress(a, { strict: false }))\n throw new InvalidAddressError({ address: a });\n if (!isAddress(b, { strict: false }))\n throw new InvalidAddressError({ address: b });\n return a.toLowerCase() === b.toLowerCase();\n}\n//# sourceMappingURL=isAddressEqual.js.map","export function formatLog(log, { args, eventName, } = {}) {\n return {\n ...log,\n blockHash: log.blockHash ? log.blockHash : null,\n blockNumber: log.blockNumber ? BigInt(log.blockNumber) : null,\n blockTimestamp: log.blockTimestamp\n ? BigInt(log.blockTimestamp)\n : log.blockTimestamp === null\n ? null\n : undefined,\n logIndex: log.logIndex ? Number(log.logIndex) : null,\n transactionHash: log.transactionHash ? log.transactionHash : null,\n transactionIndex: log.transactionIndex\n ? Number(log.transactionIndex)\n : null,\n ...(eventName ? { args, eventName } : {}),\n };\n}\n//# sourceMappingURL=log.js.map","import { AbiDecodingDataSizeTooSmallError, AbiEventSignatureEmptyTopicsError, AbiEventSignatureNotFoundError, DecodeLogDataMismatch, DecodeLogTopicsMismatch, } from '../../errors/abi.js';\nimport { PositionOutOfBoundsError } from '../../errors/cursor.js';\nimport { size } from '../data/size.js';\nimport { toEventSelector, } from '../hash/toEventSelector.js';\nimport { decodeAbiParameters, } from './decodeAbiParameters.js';\nimport { formatAbiItem } from './formatAbiItem.js';\nconst docsPath = '/docs/contract/decodeEventLog';\nexport function decodeEventLog(parameters) {\n const { abi, data, strict: strict_, topics, } = parameters;\n const strict = strict_ ?? true;\n const [signature, ...argTopics] = topics;\n if (!signature)\n throw new AbiEventSignatureEmptyTopicsError({ docsPath });\n const abiItem = abi.find((x) => x.type === 'event' &&\n signature === toEventSelector(formatAbiItem(x)));\n if (!(abiItem && 'name' in abiItem) || abiItem.type !== 'event')\n throw new AbiEventSignatureNotFoundError(signature, { docsPath });\n const { name, inputs } = abiItem;\n const isUnnamed = inputs?.some((x) => !('name' in x && x.name));\n const args = isUnnamed ? [] : {};\n // Decode topics (indexed args).\n const indexedInputs = inputs\n .map((x, i) => [x, i])\n .filter(([x]) => 'indexed' in x && x.indexed);\n const missingIndexedInputs = [];\n for (let i = 0; i < indexedInputs.length; i++) {\n const [param, argIndex] = indexedInputs[i];\n const topic = argTopics[i];\n if (!topic) {\n if (strict)\n throw new DecodeLogTopicsMismatch({\n abiItem,\n param: param,\n });\n // Track missing indexed inputs to decode from data when strict is false\n missingIndexedInputs.push([param, argIndex]);\n continue;\n }\n args[isUnnamed ? argIndex : param.name || argIndex] = decodeTopic({\n param,\n value: topic,\n });\n }\n // Decode data (non-indexed args + missing indexed args when strict is false).\n const nonIndexedInputs = inputs.filter((x) => !('indexed' in x && x.indexed));\n // When strict is false, missing indexed inputs should be decoded from data\n const inputsToDecode = strict\n ? nonIndexedInputs\n : [...missingIndexedInputs.map(([param]) => param), ...nonIndexedInputs];\n if (inputsToDecode.length > 0) {\n if (data && data !== '0x') {\n try {\n const decodedData = decodeAbiParameters(inputsToDecode, data);\n if (decodedData) {\n let dataIndex = 0;\n // First, assign missing indexed parameters (when strict is false)\n if (!strict) {\n for (const [param, argIndex] of missingIndexedInputs) {\n args[isUnnamed ? argIndex : param.name || argIndex] =\n decodedData[dataIndex++];\n }\n }\n // Then, assign non-indexed parameters\n if (isUnnamed) {\n for (let i = 0; i < inputs.length; i++)\n if (args[i] === undefined && dataIndex < decodedData.length)\n args[i] = decodedData[dataIndex++];\n }\n else\n for (let i = 0; i < nonIndexedInputs.length; i++)\n args[nonIndexedInputs[i].name] = decodedData[dataIndex++];\n }\n }\n catch (err) {\n if (strict) {\n if (err instanceof AbiDecodingDataSizeTooSmallError ||\n err instanceof PositionOutOfBoundsError)\n throw new DecodeLogDataMismatch({\n abiItem,\n data: data,\n params: inputsToDecode,\n size: size(data),\n });\n throw err;\n }\n }\n }\n else if (strict) {\n throw new DecodeLogDataMismatch({\n abiItem,\n data: '0x',\n params: inputsToDecode,\n size: 0,\n });\n }\n }\n return {\n eventName: name,\n args: Object.values(args).length > 0 ? args : undefined,\n };\n}\nfunction decodeTopic({ param, value }) {\n if (param.type === 'string' ||\n param.type === 'bytes' ||\n param.type === 'tuple' ||\n param.type.match(/^(.*)\\[(\\d+)?\\]$/))\n return value;\n const decodedArg = decodeAbiParameters([param], value) || [];\n return decodedArg[0];\n}\n//# sourceMappingURL=decodeEventLog.js.map","// TODO(v3): checksum address.\nimport { isAddressEqual } from '../address/isAddressEqual.js';\nimport { toBytes } from '../encoding/toBytes.js';\nimport { formatLog } from '../formatters/log.js';\nimport { keccak256 } from '../hash/keccak256.js';\nimport { toEventSelector } from '../hash/toEventSelector.js';\nimport { decodeEventLog, } from './decodeEventLog.js';\n/**\n * Extracts & decodes logs matching the provided signature(s) (`abi` + optional `eventName`)\n * from a set of opaque logs.\n *\n * @param parameters - {@link ParseEventLogsParameters}\n * @returns The logs. {@link ParseEventLogsReturnType}\n *\n * @example\n * import { createClient, http } from 'viem'\n * import { mainnet } from 'viem/chains'\n * import { parseEventLogs } from 'viem/op-stack'\n *\n * const client = createClient({\n * chain: mainnet,\n * transport: http(),\n * })\n *\n * const receipt = await getTransactionReceipt(client, {\n * hash: '0xec23b2ba4bc59ba61554507c1b1bc91649e6586eb2dd00c728e8ed0db8bb37ea',\n * })\n *\n * const logs = parseEventLogs({ logs: receipt.logs })\n * // [{ args: { ... }, eventName: 'TransactionDeposited', ... }, ...]\n */\nexport function parseEventLogs(parameters) {\n const { abi, args, logs, strict = true } = parameters;\n const eventName = (() => {\n if (!parameters.eventName)\n return undefined;\n if (Array.isArray(parameters.eventName))\n return parameters.eventName;\n return [parameters.eventName];\n })();\n const abiTopics = abi\n .filter((abiItem) => abiItem.type === 'event')\n .map((abiItem) => ({\n abi: abiItem,\n selector: toEventSelector(abiItem),\n }));\n return logs\n .map((log) => {\n // Normalize RpcLog (hex-encoded quantities) to Log (bigint/number).\n // When logs come directly from an RPC response (e.g. eth_getLogs),\n // fields like blockNumber are hex strings instead of bigints.\n const formattedLog = typeof log.blockNumber === 'string' ? formatLog(log) : log;\n // Find all matching ABI items with the same selector.\n // Multiple events can share the same selector but differ in indexed parameters\n // (e.g., ERC20 vs ERC721 Transfer events).\n const abiItems = abiTopics.filter((abiTopic) => formattedLog.topics[0] === abiTopic.selector);\n if (abiItems.length === 0)\n return null;\n // Try each matching ABI item until one successfully decodes.\n let event;\n let abiItem;\n for (const item of abiItems) {\n try {\n event = decodeEventLog({\n ...formattedLog,\n abi: [item.abi],\n strict: true,\n });\n abiItem = item;\n break;\n }\n catch {\n // Try next ABI item\n }\n }\n // If strict decoding failed for all, and we're in non-strict mode,\n // fall back to the first matching ABI item.\n if (!event && !strict) {\n abiItem = abiItems[0];\n try {\n event = decodeEventLog({\n data: formattedLog.data,\n topics: formattedLog.topics,\n abi: [abiItem.abi],\n strict: false,\n });\n }\n catch {\n // If decoding still fails, return partial log in non-strict mode.\n const isUnnamed = abiItem.abi.inputs?.some((x) => !('name' in x && x.name));\n return {\n ...formattedLog,\n args: isUnnamed ? [] : {},\n eventName: abiItem.abi.name,\n };\n }\n }\n // If no event was found, return null.\n if (!event || !abiItem)\n return null;\n // Check that the decoded event name matches the provided event name.\n if (eventName && !eventName.includes(event.eventName))\n return null;\n // Check that the decoded event args match the provided args.\n if (!includesArgs({\n args: event.args,\n inputs: abiItem.abi.inputs,\n matchArgs: args,\n }))\n return null;\n return { ...event, ...formattedLog };\n })\n .filter(Boolean);\n}\nfunction includesArgs(parameters) {\n const { args, inputs, matchArgs } = parameters;\n if (!matchArgs)\n return true;\n if (!args)\n return false;\n function isEqual(input, value, arg) {\n try {\n if (input.type === 'address')\n return isAddressEqual(value, arg);\n if (input.type === 'string' || input.type === 'bytes')\n return keccak256(toBytes(value)) === arg;\n return value === arg;\n }\n catch {\n return false;\n }\n }\n if (Array.isArray(args) && Array.isArray(matchArgs)) {\n return matchArgs.every((value, index) => {\n if (value === null || value === undefined)\n return true;\n const input = inputs[index];\n if (!input)\n return false;\n const value_ = Array.isArray(value) ? value : [value];\n return value_.some((value) => isEqual(input, value, args[index]));\n });\n }\n if (typeof args === 'object' &&\n !Array.isArray(args) &&\n typeof matchArgs === 'object' &&\n !Array.isArray(matchArgs))\n return Object.entries(matchArgs).every(([key, value]) => {\n if (value === null || value === undefined)\n return true;\n const input = inputs.find((input) => input.name === key);\n if (!input)\n return false;\n const value_ = Array.isArray(value) ? value : [value];\n return value_.some((value) => isEqual(input, value, args[key]));\n });\n return false;\n}\n//# sourceMappingURL=parseEventLogs.js.map","import { encodeEventTopics, } from '../../utils/abi/encodeEventTopics.js';\nimport { parseEventLogs } from '../../utils/abi/parseEventLogs.js';\nimport { numberToHex, } from '../../utils/encoding/toHex.js';\nimport { formatLog, } from '../../utils/formatters/log.js';\n/**\n * Returns a list of event logs matching the provided parameters.\n *\n * - Docs: https://viem.sh/docs/actions/public/getLogs\n * - Examples: https://stackblitz.com/github/wevm/viem/tree/main/examples/logs_event-logs\n * - JSON-RPC Methods: [`eth_getLogs`](https://ethereum.org/en/developers/docs/apis/json-rpc/#eth_getlogs)\n *\n * @param client - Client to use\n * @param parameters - {@link GetLogsParameters}\n * @returns A list of event logs. {@link GetLogsReturnType}\n *\n * @example\n * import { createPublicClient, http, parseAbiItem } from 'viem'\n * import { mainnet } from 'viem/chains'\n * import { getLogs } from 'viem/public'\n *\n * const client = createPublicClient({\n * chain: mainnet,\n * transport: http(),\n * })\n * const logs = await getLogs(client)\n */\nexport async function getLogs(client, { address, blockHash, fromBlock, toBlock, event, events: events_, args, strict: strict_, } = {}) {\n const strict = strict_ ?? false;\n const events = events_ ?? (event ? [event] : undefined);\n let topics = [];\n if (events) {\n const encoded = events.flatMap((event) => encodeEventTopics({\n abi: [event],\n eventName: event.name,\n args: events_ ? undefined : args,\n }));\n // TODO: Clean up type casting\n topics = [encoded];\n if (event)\n topics = topics[0];\n }\n let logs;\n if (blockHash) {\n logs = await client.request({\n method: 'eth_getLogs',\n params: [{ address, topics, blockHash }],\n });\n }\n else {\n logs = await client.request({\n method: 'eth_getLogs',\n params: [\n {\n address,\n topics,\n fromBlock: typeof fromBlock === 'bigint' ? numberToHex(fromBlock) : fromBlock,\n toBlock: typeof toBlock === 'bigint' ? numberToHex(toBlock) : toBlock,\n },\n ],\n });\n }\n const formattedLogs = logs.map((log) => formatLog(log));\n if (!events)\n return formattedLogs;\n return parseEventLogs({\n abi: events,\n args: args,\n logs: formattedLogs,\n strict,\n });\n}\n//# sourceMappingURL=getLogs.js.map","import { AbiFunctionNotFoundError, AbiFunctionOutputsNotFoundError, } from '../../errors/abi.js';\nimport { decodeAbiParameters, } from './decodeAbiParameters.js';\nimport { getAbiItem } from './getAbiItem.js';\nconst docsPath = '/docs/contract/decodeFunctionResult';\nexport function decodeFunctionResult(parameters) {\n const { abi, args, functionName, data } = parameters;\n let abiItem = abi[0];\n if (functionName) {\n const item = getAbiItem({ abi, args, name: functionName });\n if (!item)\n throw new AbiFunctionNotFoundError(functionName, { docsPath });\n abiItem = item;\n }\n if (abiItem.type !== 'function')\n throw new AbiFunctionNotFoundError(undefined, { docsPath });\n if (!abiItem.outputs)\n throw new AbiFunctionOutputsNotFoundError(abiItem.name, { docsPath });\n const values = decodeAbiParameters(abiItem.outputs, data);\n if (values && values.length > 1)\n return values;\n if (values && values.length === 1)\n return values[0];\n return undefined;\n}\n//# sourceMappingURL=decodeFunctionResult.js.map","/** @internal */\nexport const version = '0.1.1';\n//# sourceMappingURL=version.js.map","import { version } from '../version.js';\n/** @internal */\nexport function getUrl(url) {\n return url;\n}\n/** @internal */\nexport function getVersion() {\n return version;\n}\n/** @internal */\nexport function prettyPrint(args) {\n if (!args)\n return '';\n const entries = Object.entries(args)\n .map(([key, value]) => {\n if (value === undefined || value === false)\n return null;\n return [key, value];\n })\n .filter(Boolean);\n const maxLength = entries.reduce((acc, [key]) => Math.max(acc, key.length), 0);\n return entries\n .map(([key, value]) => ` ${`${key}:`.padEnd(maxLength + 1)} ${value}`)\n .join('\\n');\n}\n//# sourceMappingURL=errors.js.map","import { getVersion } from './internal/errors.js';\n/**\n * Base error class inherited by all errors thrown by ox.\n *\n * @example\n * ```ts\n * import { Errors } from 'ox'\n * throw new Errors.BaseError('An error occurred')\n * ```\n */\nexport class BaseError extends Error {\n static setStaticOptions(options) {\n BaseError.prototype.docsOrigin = options.docsOrigin;\n BaseError.prototype.showVersion = options.showVersion;\n BaseError.prototype.version = options.version;\n }\n constructor(shortMessage, options = {}) {\n const details = (() => {\n if (options.cause instanceof BaseError) {\n if (options.cause.details)\n return options.cause.details;\n if (options.cause.shortMessage)\n return options.cause.shortMessage;\n }\n if (options.cause &&\n 'details' in options.cause &&\n typeof options.cause.details === 'string')\n return options.cause.details;\n if (options.cause?.message)\n return options.cause.message;\n return options.details;\n })();\n const docsPath = (() => {\n if (options.cause instanceof BaseError)\n return options.cause.docsPath || options.docsPath;\n return options.docsPath;\n })();\n const docsBaseUrl = options.docsOrigin ?? BaseError.prototype.docsOrigin;\n const docs = `${docsBaseUrl}${docsPath ?? ''}`;\n const showVersion = Boolean(options.version ?? BaseError.prototype.showVersion);\n const version = options.version ?? BaseError.prototype.version;\n const message = [\n shortMessage || 'An error occurred.',\n ...(options.metaMessages ? ['', ...options.metaMessages] : []),\n ...(details || docsPath || showVersion\n ? [\n '',\n details ? `Details: ${details}` : undefined,\n docsPath ? `See: ${docs}` : undefined,\n showVersion ? `Version: ${version}` : undefined,\n ]\n : []),\n ]\n .filter((x) => typeof x === 'string')\n .join('\\n');\n super(message, options.cause ? { cause: options.cause } : undefined);\n Object.defineProperty(this, \"details\", {\n enumerable: true,\n configurable: true,\n writable: true,\n value: void 0\n });\n Object.defineProperty(this, \"docs\", {\n enumerable: true,\n configurable: true,\n writable: true,\n value: void 0\n });\n Object.defineProperty(this, \"docsOrigin\", {\n enumerable: true,\n configurable: true,\n writable: true,\n value: void 0\n });\n Object.defineProperty(this, \"docsPath\", {\n enumerable: true,\n configurable: true,\n writable: true,\n value: void 0\n });\n Object.defineProperty(this, \"shortMessage\", {\n enumerable: true,\n configurable: true,\n writable: true,\n value: void 0\n });\n Object.defineProperty(this, \"showVersion\", {\n enumerable: true,\n configurable: true,\n writable: true,\n value: void 0\n });\n Object.defineProperty(this, \"version\", {\n enumerable: true,\n configurable: true,\n writable: true,\n value: void 0\n });\n Object.defineProperty(this, \"cause\", {\n enumerable: true,\n configurable: true,\n writable: true,\n value: void 0\n });\n Object.defineProperty(this, \"name\", {\n enumerable: true,\n configurable: true,\n writable: true,\n value: 'BaseError'\n });\n this.cause = options.cause;\n this.details = details;\n this.docs = docs;\n this.docsOrigin = docsBaseUrl;\n this.docsPath = docsPath;\n this.shortMessage = shortMessage;\n this.showVersion = showVersion;\n this.version = version;\n }\n walk(fn) {\n return walk(this, fn);\n }\n}\nObject.defineProperty(BaseError, \"defaultStaticOptions\", {\n enumerable: true,\n configurable: true,\n writable: true,\n value: {\n docsOrigin: 'https://oxlib.sh',\n showVersion: false,\n version: `ox@${getVersion()}`,\n }\n});\n(() => {\n BaseError.setStaticOptions(BaseError.defaultStaticOptions);\n})();\n/** @internal */\nfunction walk(err, fn) {\n if (fn?.(err))\n return err;\n if (err && typeof err === 'object' && 'cause' in err && err.cause)\n return walk(err.cause, fn);\n return fn ? null : err;\n}\n//# sourceMappingURL=Errors.js.map","import * as Hex from '../Hex.js';\n/** @internal */\nexport function assertSize(hex, size_) {\n if (Hex.size(hex) > size_)\n throw new Hex.SizeOverflowError({\n givenSize: Hex.size(hex),\n maxSize: size_,\n });\n}\n/** @internal */\nexport function assertStartOffset(value, start) {\n if (typeof start === 'number' && start > 0 && start > Hex.size(value) - 1)\n throw new Hex.SliceOffsetOutOfBoundsError({\n offset: start,\n position: 'start',\n size: Hex.size(value),\n });\n}\n/** @internal */\nexport function assertEndOffset(value, start, end) {\n if (typeof start === 'number' &&\n typeof end === 'number' &&\n Hex.size(value) !== end - start) {\n throw new Hex.SliceOffsetOutOfBoundsError({\n offset: end,\n position: 'end',\n size: Hex.size(value),\n });\n }\n}\n/** @internal */\nexport function pad(hex_, options = {}) {\n const { dir, size = 32 } = options;\n if (size === 0)\n return hex_;\n const hex = hex_.replace('0x', '');\n if (hex.length > size * 2)\n throw new Hex.SizeExceedsPaddingSizeError({\n size: Math.ceil(hex.length / 2),\n targetSize: size,\n type: 'Hex',\n });\n return `0x${hex[dir === 'right' ? 'padEnd' : 'padStart'](size * 2, '0')}`;\n}\n/** @internal */\nexport function trim(value, options = {}) {\n const { dir = 'left' } = options;\n let data = value.replace('0x', '');\n let sliceLength = 0;\n for (let i = 0; i < data.length - 1; i++) {\n if (data[dir === 'left' ? i : data.length - i - 1].toString() === '0')\n sliceLength++;\n else\n break;\n }\n data =\n dir === 'left'\n ? data.slice(sliceLength)\n : data.slice(0, data.length - sliceLength);\n if (data === '0')\n return '0x';\n if (dir === 'right' && data.length % 2 === 1)\n return `0x${data}0`;\n return `0x${data}`;\n}\n//# sourceMappingURL=hex.js.map","import { equalBytes } from '@noble/curves/abstract/utils';\nimport * as Bytes from './Bytes.js';\nimport * as Errors from './Errors.js';\nimport * as internal_bytes from './internal/bytes.js';\nimport * as internal from './internal/hex.js';\nimport * as Json from './Json.js';\nconst encoder = /*#__PURE__*/ new TextEncoder();\nconst hexes = /*#__PURE__*/ Array.from({ length: 256 }, (_v, i) => i.toString(16).padStart(2, '0'));\n/**\n * Asserts if the given value is {@link ox#Hex.Hex}.\n *\n * @example\n * ```ts twoslash\n * import { Hex } from 'ox'\n *\n * Hex.assert('abc')\n * // @error: InvalidHexValueTypeError:\n * // @error: Value `\"abc\"` of type `string` is an invalid hex type.\n * // @error: Hex types must be represented as `\"0x\\${string}\"`.\n * ```\n *\n * @param value - The value to assert.\n * @param options - Options.\n */\nexport function assert(value, options = {}) {\n const { strict = false } = options;\n if (!value)\n throw new InvalidHexTypeError(value);\n if (typeof value !== 'string')\n throw new InvalidHexTypeError(value);\n if (strict) {\n if (!/^0x[0-9a-fA-F]*$/.test(value))\n throw new InvalidHexValueError(value);\n }\n if (!value.startsWith('0x'))\n throw new InvalidHexValueError(value);\n}\n/**\n * Concatenates two or more {@link ox#Hex.Hex}.\n *\n * @example\n * ```ts twoslash\n * import { Hex } from 'ox'\n *\n * Hex.concat('0x123', '0x456')\n * // @log: '0x123456'\n * ```\n *\n * @param values - The {@link ox#Hex.Hex} values to concatenate.\n * @returns The concatenated {@link ox#Hex.Hex} value.\n */\nexport function concat(...values) {\n return `0x${values.reduce((acc, x) => acc + x.replace('0x', ''), '')}`;\n}\n/**\n * Instantiates a {@link ox#Hex.Hex} value from a hex string or {@link ox#Bytes.Bytes} value.\n *\n * :::tip\n *\n * To instantiate from a **Boolean**, **String**, or **Number**, use one of the following:\n *\n * - `Hex.fromBoolean`\n *\n * - `Hex.fromString`\n *\n * - `Hex.fromNumber`\n *\n * :::\n *\n * @example\n * ```ts twoslash\n * import { Bytes, Hex } from 'ox'\n *\n * Hex.from('0x48656c6c6f20576f726c6421')\n * // @log: '0x48656c6c6f20576f726c6421'\n *\n * Hex.from(Bytes.from([72, 101, 108, 108, 111, 32, 87, 111, 114, 108, 100, 33]))\n * // @log: '0x48656c6c6f20576f726c6421'\n * ```\n *\n * @param value - The {@link ox#Bytes.Bytes} value to encode.\n * @returns The encoded {@link ox#Hex.Hex} value.\n */\nexport function from(value) {\n if (value instanceof Uint8Array)\n return fromBytes(value);\n if (Array.isArray(value))\n return fromBytes(new Uint8Array(value));\n return value;\n}\n/**\n * Encodes a boolean into a {@link ox#Hex.Hex} value.\n *\n * @example\n * ```ts twoslash\n * import { Hex } from 'ox'\n *\n * Hex.fromBoolean(true)\n * // @log: '0x1'\n *\n * Hex.fromBoolean(false)\n * // @log: '0x0'\n *\n * Hex.fromBoolean(true, { size: 32 })\n * // @log: '0x0000000000000000000000000000000000000000000000000000000000000001'\n * ```\n *\n * @param value - The boolean value to encode.\n * @param options - Options.\n * @returns The encoded {@link ox#Hex.Hex} value.\n */\nexport function fromBoolean(value, options = {}) {\n const hex = `0x${Number(value)}`;\n if (typeof options.size === 'number') {\n internal.assertSize(hex, options.size);\n return padLeft(hex, options.size);\n }\n return hex;\n}\n/**\n * Encodes a {@link ox#Bytes.Bytes} value into a {@link ox#Hex.Hex} value.\n *\n * @example\n * ```ts twoslash\n * import { Bytes, Hex } from 'ox'\n *\n * Hex.fromBytes(Bytes.from([72, 101, 108, 108, 111, 32, 87, 111, 114, 108, 100, 33]))\n * // @log: '0x48656c6c6f20576f726c6421'\n * ```\n *\n * @param value - The {@link ox#Bytes.Bytes} value to encode.\n * @param options - Options.\n * @returns The encoded {@link ox#Hex.Hex} value.\n */\nexport function fromBytes(value, options = {}) {\n let string = '';\n for (let i = 0; i < value.length; i++)\n string += hexes[value[i]];\n const hex = `0x${string}`;\n if (typeof options.size === 'number') {\n internal.assertSize(hex, options.size);\n return padRight(hex, options.size);\n }\n return hex;\n}\n/**\n * Encodes a number or bigint into a {@link ox#Hex.Hex} value.\n *\n * @example\n * ```ts twoslash\n * import { Hex } from 'ox'\n *\n * Hex.fromNumber(420)\n * // @log: '0x1a4'\n *\n * Hex.fromNumber(420, { size: 32 })\n * // @log: '0x00000000000000000000000000000000000000000000000000000000000001a4'\n * ```\n *\n * @param value - The number or bigint value to encode.\n * @param options - Options.\n * @returns The encoded {@link ox#Hex.Hex} value.\n */\nexport function fromNumber(value, options = {}) {\n const { signed, size } = options;\n const value_ = BigInt(value);\n let maxValue;\n if (size) {\n if (signed)\n maxValue = (1n << (BigInt(size) * 8n - 1n)) - 1n;\n else\n maxValue = 2n ** (BigInt(size) * 8n) - 1n;\n }\n else if (typeof value === 'number') {\n maxValue = BigInt(Number.MAX_SAFE_INTEGER);\n }\n const minValue = typeof maxValue === 'bigint' && signed ? -maxValue - 1n : 0;\n if ((maxValue && value_ > maxValue) || value_ < minValue) {\n const suffix = typeof value === 'bigint' ? 'n' : '';\n throw new IntegerOutOfRangeError({\n max: maxValue ? `${maxValue}${suffix}` : undefined,\n min: `${minValue}${suffix}`,\n signed,\n size,\n value: `${value}${suffix}`,\n });\n }\n const stringValue = (signed && value_ < 0 ? BigInt.asUintN(size * 8, BigInt(value_)) : value_).toString(16);\n const hex = `0x${stringValue}`;\n if (size)\n return padLeft(hex, size);\n return hex;\n}\n/**\n * Encodes a string into a {@link ox#Hex.Hex} value.\n *\n * @example\n * ```ts twoslash\n * import { Hex } from 'ox'\n * Hex.fromString('Hello World!')\n * // '0x48656c6c6f20576f726c6421'\n *\n * Hex.fromString('Hello World!', { size: 32 })\n * // '0x48656c6c6f20576f726c64210000000000000000000000000000000000000000'\n * ```\n *\n * @param value - The string value to encode.\n * @param options - Options.\n * @returns The encoded {@link ox#Hex.Hex} value.\n */\nexport function fromString(value, options = {}) {\n return fromBytes(encoder.encode(value), options);\n}\n/**\n * Checks if two {@link ox#Hex.Hex} values are equal.\n *\n * @example\n * ```ts twoslash\n * import { Hex } from 'ox'\n *\n * Hex.isEqual('0xdeadbeef', '0xdeadbeef')\n * // @log: true\n *\n * Hex.isEqual('0xda', '0xba')\n * // @log: false\n * ```\n *\n * @param hexA - The first {@link ox#Hex.Hex} value.\n * @param hexB - The second {@link ox#Hex.Hex} value.\n * @returns `true` if the two {@link ox#Hex.Hex} values are equal, `false` otherwise.\n */\nexport function isEqual(hexA, hexB) {\n return equalBytes(Bytes.fromHex(hexA), Bytes.fromHex(hexB));\n}\n/**\n * Pads a {@link ox#Hex.Hex} value to the left with zero bytes until it reaches the given `size` (default: 32 bytes).\n *\n * @example\n * ```ts twoslash\n * import { Hex } from 'ox'\n *\n * Hex.padLeft('0x1234', 4)\n * // @log: '0x00001234'\n * ```\n *\n * @param value - The {@link ox#Hex.Hex} value to pad.\n * @param size - The size (in bytes) of the output hex value.\n * @returns The padded {@link ox#Hex.Hex} value.\n */\nexport function padLeft(value, size) {\n return internal.pad(value, { dir: 'left', size });\n}\n/**\n * Pads a {@link ox#Hex.Hex} value to the right with zero bytes until it reaches the given `size` (default: 32 bytes).\n *\n * @example\n * ```ts\n * import { Hex } from 'ox'\n *\n * Hex.padRight('0x1234', 4)\n * // @log: '0x12340000'\n * ```\n *\n * @param value - The {@link ox#Hex.Hex} value to pad.\n * @param size - The size (in bytes) of the output hex value.\n * @returns The padded {@link ox#Hex.Hex} value.\n */\nexport function padRight(value, size) {\n return internal.pad(value, { dir: 'right', size });\n}\n/**\n * Generates a random {@link ox#Hex.Hex} value of the specified length.\n *\n * @example\n * ```ts twoslash\n * import { Hex } from 'ox'\n *\n * const hex = Hex.random(32)\n * // @log: '0x...'\n * ```\n *\n * @returns Random {@link ox#Hex.Hex} value.\n */\nexport function random(length) {\n return fromBytes(Bytes.random(length));\n}\n/**\n * Returns a section of a {@link ox#Bytes.Bytes} value given a start/end bytes offset.\n *\n * @example\n * ```ts twoslash\n * import { Hex } from 'ox'\n *\n * Hex.slice('0x0123456789', 1, 4)\n * // @log: '0x234567'\n * ```\n *\n * @param value - The {@link ox#Hex.Hex} value to slice.\n * @param start - The start offset (in bytes).\n * @param end - The end offset (in bytes).\n * @param options - Options.\n * @returns The sliced {@link ox#Hex.Hex} value.\n */\nexport function slice(value, start, end, options = {}) {\n const { strict } = options;\n internal.assertStartOffset(value, start);\n const value_ = `0x${value\n .replace('0x', '')\n .slice((start ?? 0) * 2, (end ?? value.length) * 2)}`;\n if (strict)\n internal.assertEndOffset(value_, start, end);\n return value_;\n}\n/**\n * Retrieves the size of a {@link ox#Hex.Hex} value (in bytes).\n *\n * @example\n * ```ts twoslash\n * import { Hex } from 'ox'\n *\n * Hex.size('0xdeadbeef')\n * // @log: 4\n * ```\n *\n * @param value - The {@link ox#Hex.Hex} value to get the size of.\n * @returns The size of the {@link ox#Hex.Hex} value (in bytes).\n */\nexport function size(value) {\n return Math.ceil((value.length - 2) / 2);\n}\n/**\n * Trims leading zeros from a {@link ox#Hex.Hex} value.\n *\n * @example\n * ```ts twoslash\n * import { Hex } from 'ox'\n *\n * Hex.trimLeft('0x00000000deadbeef')\n * // @log: '0xdeadbeef'\n * ```\n *\n * @param value - The {@link ox#Hex.Hex} value to trim.\n * @returns The trimmed {@link ox#Hex.Hex} value.\n */\nexport function trimLeft(value) {\n return internal.trim(value, { dir: 'left' });\n}\n/**\n * Trims trailing zeros from a {@link ox#Hex.Hex} value.\n *\n * @example\n * ```ts twoslash\n * import { Hex } from 'ox'\n *\n * Hex.trimRight('0xdeadbeef00000000')\n * // @log: '0xdeadbeef'\n * ```\n *\n * @param value - The {@link ox#Hex.Hex} value to trim.\n * @returns The trimmed {@link ox#Hex.Hex} value.\n */\nexport function trimRight(value) {\n return internal.trim(value, { dir: 'right' });\n}\n/**\n * Decodes a {@link ox#Hex.Hex} value into a BigInt.\n *\n * @example\n * ```ts twoslash\n * import { Hex } from 'ox'\n *\n * Hex.toBigInt('0x1a4')\n * // @log: 420n\n *\n * Hex.toBigInt('0x00000000000000000000000000000000000000000000000000000000000001a4', { size: 32 })\n * // @log: 420n\n * ```\n *\n * @param hex - The {@link ox#Hex.Hex} value to decode.\n * @param options - Options.\n * @returns The decoded BigInt.\n */\nexport function toBigInt(hex, options = {}) {\n const { signed } = options;\n if (options.size)\n internal.assertSize(hex, options.size);\n const value = BigInt(hex);\n if (!signed)\n return value;\n const size = (hex.length - 2) / 2;\n const max_unsigned = (1n << (BigInt(size) * 8n)) - 1n;\n const max_signed = max_unsigned >> 1n;\n if (value <= max_signed)\n return value;\n return value - max_unsigned - 1n;\n}\n/**\n * Decodes a {@link ox#Hex.Hex} value into a boolean.\n *\n * @example\n * ```ts twoslash\n * import { Hex } from 'ox'\n *\n * Hex.toBoolean('0x01')\n * // @log: true\n *\n * Hex.toBoolean('0x0000000000000000000000000000000000000000000000000000000000000001', { size: 32 })\n * // @log: true\n * ```\n *\n * @param hex - The {@link ox#Hex.Hex} value to decode.\n * @param options - Options.\n * @returns The decoded boolean.\n */\nexport function toBoolean(hex, options = {}) {\n if (options.size)\n internal.assertSize(hex, options.size);\n const hex_ = trimLeft(hex);\n if (hex_ === '0x')\n return false;\n if (hex_ === '0x1')\n return true;\n throw new InvalidHexBooleanError(hex);\n}\n/**\n * Decodes a {@link ox#Hex.Hex} value into a {@link ox#Bytes.Bytes}.\n *\n * @example\n * ```ts twoslash\n * import { Hex } from 'ox'\n *\n * const data = Hex.toBytes('0x48656c6c6f20776f726c6421')\n * // @log: Uint8Array([72, 101, 108, 108, 111, 32, 87, 111, 114, 108, 100, 33])\n * ```\n *\n * @param hex - The {@link ox#Hex.Hex} value to decode.\n * @param options - Options.\n * @returns The decoded {@link ox#Bytes.Bytes}.\n */\nexport function toBytes(hex, options = {}) {\n return Bytes.fromHex(hex, options);\n}\n/**\n * Decodes a {@link ox#Hex.Hex} value into a number.\n *\n * @example\n * ```ts twoslash\n * import { Hex } from 'ox'\n *\n * Hex.toNumber('0x1a4')\n * // @log: 420\n *\n * Hex.toNumber('0x00000000000000000000000000000000000000000000000000000000000001a4', { size: 32 })\n * // @log: 420\n * ```\n *\n * @param hex - The {@link ox#Hex.Hex} value to decode.\n * @param options - Options.\n * @returns The decoded number.\n */\nexport function toNumber(hex, options = {}) {\n const { signed, size } = options;\n if (!signed && !size)\n return Number(hex);\n return Number(toBigInt(hex, options));\n}\n/**\n * Decodes a {@link ox#Hex.Hex} value into a string.\n *\n * @example\n * ```ts twoslash\n * import { Hex } from 'ox'\n *\n * Hex.toString('0x48656c6c6f20576f726c6421')\n * // @log: 'Hello world!'\n *\n * Hex.toString('0x48656c6c6f20576f726c64210000000000000000000000000000000000000000', {\n * size: 32,\n * })\n * // @log: 'Hello world'\n * ```\n *\n * @param hex - The {@link ox#Hex.Hex} value to decode.\n * @param options - Options.\n * @returns The decoded string.\n */\nexport function toString(hex, options = {}) {\n const { size } = options;\n let bytes = Bytes.fromHex(hex);\n if (size) {\n internal_bytes.assertSize(bytes, size);\n bytes = Bytes.trimRight(bytes);\n }\n return new TextDecoder().decode(bytes);\n}\n/**\n * Checks if the given value is {@link ox#Hex.Hex}.\n *\n * @example\n * ```ts twoslash\n * import { Bytes, Hex } from 'ox'\n *\n * Hex.validate('0xdeadbeef')\n * // @log: true\n *\n * Hex.validate(Bytes.from([1, 2, 3]))\n * // @log: false\n * ```\n *\n * @param value - The value to check.\n * @param options - Options.\n * @returns `true` if the value is a {@link ox#Hex.Hex}, `false` otherwise.\n */\nexport function validate(value, options = {}) {\n const { strict = false } = options;\n try {\n assert(value, { strict });\n return true;\n }\n catch {\n return false;\n }\n}\n/**\n * Thrown when the provided integer is out of range, and cannot be represented as a hex value.\n *\n * @example\n * ```ts twoslash\n * import { Hex } from 'ox'\n *\n * Hex.fromNumber(420182738912731283712937129)\n * // @error: Hex.IntegerOutOfRangeError: Number \\`4.2018273891273126e+26\\` is not in safe unsigned integer range (`0` to `9007199254740991`)\n * ```\n */\nexport class IntegerOutOfRangeError extends Errors.BaseError {\n constructor({ max, min, signed, size, value, }) {\n super(`Number \\`${value}\\` is not in safe${size ? ` ${size * 8}-bit` : ''}${signed ? ' signed' : ' unsigned'} integer range ${max ? `(\\`${min}\\` to \\`${max}\\`)` : `(above \\`${min}\\`)`}`);\n Object.defineProperty(this, \"name\", {\n enumerable: true,\n configurable: true,\n writable: true,\n value: 'Hex.IntegerOutOfRangeError'\n });\n }\n}\n/**\n * Thrown when the provided hex value cannot be represented as a boolean.\n *\n * @example\n * ```ts twoslash\n * import { Hex } from 'ox'\n *\n * Hex.toBoolean('0xa')\n * // @error: Hex.InvalidHexBooleanError: Hex value `\"0xa\"` is not a valid boolean.\n * // @error: The hex value must be `\"0x0\"` (false) or `\"0x1\"` (true).\n * ```\n */\nexport class InvalidHexBooleanError extends Errors.BaseError {\n constructor(hex) {\n super(`Hex value \\`\"${hex}\"\\` is not a valid boolean.`, {\n metaMessages: [\n 'The hex value must be `\"0x0\"` (false) or `\"0x1\"` (true).',\n ],\n });\n Object.defineProperty(this, \"name\", {\n enumerable: true,\n configurable: true,\n writable: true,\n value: 'Hex.InvalidHexBooleanError'\n });\n }\n}\n/**\n * Thrown when the provided value is not a valid hex type.\n *\n * @example\n * ```ts twoslash\n * import { Hex } from 'ox'\n *\n * Hex.assert(1)\n * // @error: Hex.InvalidHexTypeError: Value `1` of type `number` is an invalid hex type.\n * ```\n */\nexport class InvalidHexTypeError extends Errors.BaseError {\n constructor(value) {\n super(`Value \\`${typeof value === 'object' ? Json.stringify(value) : value}\\` of type \\`${typeof value}\\` is an invalid hex type.`, {\n metaMessages: ['Hex types must be represented as `\"0x${string}\"`.'],\n });\n Object.defineProperty(this, \"name\", {\n enumerable: true,\n configurable: true,\n writable: true,\n value: 'Hex.InvalidHexTypeError'\n });\n }\n}\n/**\n * Thrown when the provided hex value is invalid.\n *\n * @example\n * ```ts twoslash\n * import { Hex } from 'ox'\n *\n * Hex.assert('0x0123456789abcdefg')\n * // @error: Hex.InvalidHexValueError: Value `0x0123456789abcdefg` is an invalid hex value.\n * // @error: Hex values must start with `\"0x\"` and contain only hexadecimal characters (0-9, a-f, A-F).\n * ```\n */\nexport class InvalidHexValueError extends Errors.BaseError {\n constructor(value) {\n super(`Value \\`${value}\\` is an invalid hex value.`, {\n metaMessages: [\n 'Hex values must start with `\"0x\"` and contain only hexadecimal characters (0-9, a-f, A-F).',\n ],\n });\n Object.defineProperty(this, \"name\", {\n enumerable: true,\n configurable: true,\n writable: true,\n value: 'Hex.InvalidHexValueError'\n });\n }\n}\n/**\n * Thrown when the provided hex value is an odd length.\n *\n * @example\n * ```ts twoslash\n * import { Bytes } from 'ox'\n *\n * Bytes.fromHex('0xabcde')\n * // @error: Hex.InvalidLengthError: Hex value `\"0xabcde\"` is an odd length (5 nibbles).\n * ```\n */\nexport class InvalidLengthError extends Errors.BaseError {\n constructor(value) {\n super(`Hex value \\`\"${value}\"\\` is an odd length (${value.length - 2} nibbles).`, {\n metaMessages: ['It must be an even length.'],\n });\n Object.defineProperty(this, \"name\", {\n enumerable: true,\n configurable: true,\n writable: true,\n value: 'Hex.InvalidLengthError'\n });\n }\n}\n/**\n * Thrown when the size of the value exceeds the expected max size.\n *\n * @example\n * ```ts twoslash\n * import { Hex } from 'ox'\n *\n * Hex.fromString('Hello World!', { size: 8 })\n * // @error: Hex.SizeOverflowError: Size cannot exceed `8` bytes. Given size: `12` bytes.\n * ```\n */\nexport class SizeOverflowError extends Errors.BaseError {\n constructor({ givenSize, maxSize }) {\n super(`Size cannot exceed \\`${maxSize}\\` bytes. Given size: \\`${givenSize}\\` bytes.`);\n Object.defineProperty(this, \"name\", {\n enumerable: true,\n configurable: true,\n writable: true,\n value: 'Hex.SizeOverflowError'\n });\n }\n}\n/**\n * Thrown when the slice offset exceeds the bounds of the value.\n *\n * @example\n * ```ts twoslash\n * import { Hex } from 'ox'\n *\n * Hex.slice('0x0123456789', 6)\n * // @error: Hex.SliceOffsetOutOfBoundsError: Slice starting at offset `6` is out-of-bounds (size: `5`).\n * ```\n */\nexport class SliceOffsetOutOfBoundsError extends Errors.BaseError {\n constructor({ offset, position, size, }) {\n super(`Slice ${position === 'start' ? 'starting' : 'ending'} at offset \\`${offset}\\` is out-of-bounds (size: \\`${size}\\`).`);\n Object.defineProperty(this, \"name\", {\n enumerable: true,\n configurable: true,\n writable: true,\n value: 'Hex.SliceOffsetOutOfBoundsError'\n });\n }\n}\n/**\n * Thrown when the size of the value exceeds the pad size.\n *\n * @example\n * ```ts twoslash\n * import { Hex } from 'ox'\n *\n * Hex.padLeft('0x1a4e12a45a21323123aaa87a897a897a898a6567a578a867a98778a667a85a875a87a6a787a65a675a6a9', 32)\n * // @error: Hex.SizeExceedsPaddingSizeError: Hex size (`43`) exceeds padding size (`32`).\n * ```\n */\nexport class SizeExceedsPaddingSizeError extends Errors.BaseError {\n constructor({ size, targetSize, type, }) {\n super(`${type.charAt(0).toUpperCase()}${type\n .slice(1)\n .toLowerCase()} size (\\`${size}\\`) exceeds padding size (\\`${targetSize}\\`).`);\n Object.defineProperty(this, \"name\", {\n enumerable: true,\n configurable: true,\n writable: true,\n value: 'Hex.SizeExceedsPaddingSizeError'\n });\n }\n}\n//# sourceMappingURL=Hex.js.map","import * as Hex from './Hex.js';\n/**\n * Converts a {@link ox#Withdrawal.Rpc} to an {@link ox#Withdrawal.Withdrawal}.\n *\n * @example\n * ```ts twoslash\n * import { Withdrawal } from 'ox'\n *\n * const withdrawal = Withdrawal.fromRpc({\n * address: '0x00000000219ab540356cBB839Cbe05303d7705Fa',\n * amount: '0x620323',\n * index: '0x0',\n * validatorIndex: '0x1',\n * })\n * // @log: {\n * // @log: address: '0x00000000219ab540356cBB839Cbe05303d7705Fa',\n * // @log: amount: 6423331n,\n * // @log: index: 0,\n * // @log: validatorIndex: 1\n * // @log: }\n * ```\n *\n * @param withdrawal - The RPC withdrawal to convert.\n * @returns An instantiated {@link ox#Withdrawal.Withdrawal}.\n */\nexport function fromRpc(withdrawal) {\n return {\n ...withdrawal,\n amount: BigInt(withdrawal.amount),\n index: Number(withdrawal.index),\n validatorIndex: Number(withdrawal.validatorIndex),\n };\n}\n/**\n * Converts a {@link ox#Withdrawal.Withdrawal} to an {@link ox#Withdrawal.Rpc}.\n *\n * @example\n * ```ts twoslash\n * import { Withdrawal } from 'ox'\n *\n * const withdrawal = Withdrawal.toRpc({\n * address: '0x00000000219ab540356cBB839Cbe05303d7705Fa',\n * amount: 6423331n,\n * index: 0,\n * validatorIndex: 1,\n * })\n * // @log: {\n * // @log: address: '0x00000000219ab540356cBB839Cbe05303d7705Fa',\n * // @log: amount: '0x620323',\n * // @log: index: '0x0',\n * // @log: validatorIndex: '0x1',\n * // @log: }\n * ```\n *\n * @param withdrawal - The Withdrawal to convert.\n * @returns An RPC Withdrawal.\n */\nexport function toRpc(withdrawal) {\n return {\n address: withdrawal.address,\n amount: Hex.fromNumber(withdrawal.amount),\n index: Hex.fromNumber(withdrawal.index),\n validatorIndex: Hex.fromNumber(withdrawal.validatorIndex),\n };\n}\n//# sourceMappingURL=Withdrawal.js.map","import * as Hex from './Hex.js';\nimport * as Withdrawal from './Withdrawal.js';\n/**\n * Converts an {@link ox#BlockOverrides.Rpc} to an {@link ox#BlockOverrides.BlockOverrides}.\n *\n * @example\n * ```ts twoslash\n * import { BlockOverrides } from 'ox'\n *\n * const blockOverrides = BlockOverrides.fromRpc({\n * baseFeePerGas: '0x1',\n * blobBaseFee: '0x2',\n * feeRecipient: '0x0000000000000000000000000000000000000000',\n * gasLimit: '0x4',\n * number: '0x5',\n * prevRandao: '0x6',\n * time: '0x1234567890',\n * withdrawals: [\n * {\n * address: '0x0000000000000000000000000000000000000000',\n * amount: '0x1',\n * index: '0x0',\n * validatorIndex: '0x1',\n * },\n * ],\n * })\n * ```\n *\n * @param rpcBlockOverrides - The RPC block overrides to convert.\n * @returns An instantiated {@link ox#BlockOverrides.BlockOverrides}.\n */\nexport function fromRpc(rpcBlockOverrides) {\n return {\n ...(rpcBlockOverrides.baseFeePerGas && {\n baseFeePerGas: BigInt(rpcBlockOverrides.baseFeePerGas),\n }),\n ...(rpcBlockOverrides.blobBaseFee && {\n blobBaseFee: BigInt(rpcBlockOverrides.blobBaseFee),\n }),\n ...(rpcBlockOverrides.feeRecipient && {\n feeRecipient: rpcBlockOverrides.feeRecipient,\n }),\n ...(rpcBlockOverrides.gasLimit && {\n gasLimit: BigInt(rpcBlockOverrides.gasLimit),\n }),\n ...(rpcBlockOverrides.number && {\n number: BigInt(rpcBlockOverrides.number),\n }),\n ...(rpcBlockOverrides.prevRandao && {\n prevRandao: BigInt(rpcBlockOverrides.prevRandao),\n }),\n ...(rpcBlockOverrides.time && {\n time: BigInt(rpcBlockOverrides.time),\n }),\n ...(rpcBlockOverrides.withdrawals && {\n withdrawals: rpcBlockOverrides.withdrawals.map(Withdrawal.fromRpc),\n }),\n };\n}\n/**\n * Converts an {@link ox#BlockOverrides.BlockOverrides} to an {@link ox#BlockOverrides.Rpc}.\n *\n * @example\n * ```ts twoslash\n * import { BlockOverrides } from 'ox'\n *\n * const blockOverrides = BlockOverrides.toRpc({\n * baseFeePerGas: 1n,\n * blobBaseFee: 2n,\n * feeRecipient: '0x0000000000000000000000000000000000000000',\n * gasLimit: 4n,\n * number: 5n,\n * prevRandao: 6n,\n * time: 78187493520n,\n * withdrawals: [\n * {\n * address: '0x0000000000000000000000000000000000000000',\n * amount: 1n,\n * index: 0,\n * validatorIndex: 1,\n * },\n * ],\n * })\n * ```\n *\n * @param blockOverrides - The block overrides to convert.\n * @returns An instantiated {@link ox#BlockOverrides.Rpc}.\n */\nexport function toRpc(blockOverrides) {\n return {\n ...(typeof blockOverrides.baseFeePerGas === 'bigint' && {\n baseFeePerGas: Hex.fromNumber(blockOverrides.baseFeePerGas),\n }),\n ...(typeof blockOverrides.blobBaseFee === 'bigint' && {\n blobBaseFee: Hex.fromNumber(blockOverrides.blobBaseFee),\n }),\n ...(typeof blockOverrides.feeRecipient === 'string' && {\n feeRecipient: blockOverrides.feeRecipient,\n }),\n ...(typeof blockOverrides.gasLimit === 'bigint' && {\n gasLimit: Hex.fromNumber(blockOverrides.gasLimit),\n }),\n ...(typeof blockOverrides.number === 'bigint' && {\n number: Hex.fromNumber(blockOverrides.number),\n }),\n ...(typeof blockOverrides.prevRandao === 'bigint' && {\n prevRandao: Hex.fromNumber(blockOverrides.prevRandao),\n }),\n ...(typeof blockOverrides.time === 'bigint' && {\n time: Hex.fromNumber(blockOverrides.time),\n }),\n ...(blockOverrides.withdrawals && {\n withdrawals: blockOverrides.withdrawals.map(Withdrawal.toRpc),\n }),\n };\n}\n//# sourceMappingURL=BlockOverrides.js.map","/* [Multicall3](https://github.com/mds1/multicall) */\nexport const multicall3Abi = [\n {\n inputs: [\n {\n components: [\n {\n name: 'target',\n type: 'address',\n },\n {\n name: 'allowFailure',\n type: 'bool',\n },\n {\n name: 'callData',\n type: 'bytes',\n },\n ],\n name: 'calls',\n type: 'tuple[]',\n },\n ],\n name: 'aggregate3',\n outputs: [\n {\n components: [\n {\n name: 'success',\n type: 'bool',\n },\n {\n name: 'returnData',\n type: 'bytes',\n },\n ],\n name: 'returnData',\n type: 'tuple[]',\n },\n ],\n stateMutability: 'view',\n type: 'function',\n },\n {\n inputs: [\n {\n name: 'addr',\n type: 'address',\n },\n ],\n name: 'getEthBalance',\n outputs: [\n {\n name: 'balance',\n type: 'uint256',\n },\n ],\n stateMutability: 'view',\n type: 'function',\n },\n {\n inputs: [],\n name: 'getCurrentBlockTimestamp',\n outputs: [\n {\n internalType: 'uint256',\n name: 'timestamp',\n type: 'uint256',\n },\n ],\n stateMutability: 'view',\n type: 'function',\n },\n];\nexport const batchGatewayAbi = [\n {\n name: 'query',\n type: 'function',\n stateMutability: 'view',\n inputs: [\n {\n type: 'tuple[]',\n name: 'queries',\n components: [\n {\n type: 'address',\n name: 'sender',\n },\n {\n type: 'string[]',\n name: 'urls',\n },\n {\n type: 'bytes',\n name: 'data',\n },\n ],\n },\n ],\n outputs: [\n {\n type: 'bool[]',\n name: 'failures',\n },\n {\n type: 'bytes[]',\n name: 'responses',\n },\n ],\n },\n {\n name: 'HttpError',\n type: 'error',\n inputs: [\n {\n type: 'uint16',\n name: 'status',\n },\n {\n type: 'string',\n name: 'message',\n },\n ],\n },\n];\nconst universalResolverErrors = [\n {\n inputs: [\n {\n name: 'dns',\n type: 'bytes',\n },\n ],\n name: 'DNSDecodingFailed',\n type: 'error',\n },\n {\n inputs: [\n {\n name: 'ens',\n type: 'string',\n },\n ],\n name: 'DNSEncodingFailed',\n type: 'error',\n },\n {\n inputs: [],\n name: 'EmptyAddress',\n type: 'error',\n },\n {\n inputs: [\n {\n name: 'status',\n type: 'uint16',\n },\n {\n name: 'message',\n type: 'string',\n },\n ],\n name: 'HttpError',\n type: 'error',\n },\n {\n inputs: [],\n name: 'InvalidBatchGatewayResponse',\n type: 'error',\n },\n {\n inputs: [\n {\n name: 'errorData',\n type: 'bytes',\n },\n ],\n name: 'ResolverError',\n type: 'error',\n },\n {\n inputs: [\n {\n name: 'name',\n type: 'bytes',\n },\n {\n name: 'resolver',\n type: 'address',\n },\n ],\n name: 'ResolverNotContract',\n type: 'error',\n },\n {\n inputs: [\n {\n name: 'name',\n type: 'bytes',\n },\n ],\n name: 'ResolverNotFound',\n type: 'error',\n },\n {\n inputs: [\n {\n name: 'primary',\n type: 'string',\n },\n {\n name: 'primaryAddress',\n type: 'bytes',\n },\n ],\n name: 'ReverseAddressMismatch',\n type: 'error',\n },\n {\n inputs: [\n {\n internalType: 'bytes4',\n name: 'selector',\n type: 'bytes4',\n },\n ],\n name: 'UnsupportedResolverProfile',\n type: 'error',\n },\n];\nexport const universalResolverResolveAbi = [\n ...universalResolverErrors,\n {\n name: 'resolveWithGateways',\n type: 'function',\n stateMutability: 'view',\n inputs: [\n { name: 'name', type: 'bytes' },\n { name: 'data', type: 'bytes' },\n { name: 'gateways', type: 'string[]' },\n ],\n outputs: [\n { name: '', type: 'bytes' },\n { name: 'address', type: 'address' },\n ],\n },\n];\nexport const universalResolverReverseAbi = [\n ...universalResolverErrors,\n {\n name: 'reverseWithGateways',\n type: 'function',\n stateMutability: 'view',\n inputs: [\n { type: 'bytes', name: 'reverseName' },\n { type: 'uint256', name: 'coinType' },\n { type: 'string[]', name: 'gateways' },\n ],\n outputs: [\n { type: 'string', name: 'resolvedName' },\n { type: 'address', name: 'resolver' },\n { type: 'address', name: 'reverseResolver' },\n ],\n },\n];\nexport const textResolverAbi = [\n {\n name: 'text',\n type: 'function',\n stateMutability: 'view',\n inputs: [\n { name: 'name', type: 'bytes32' },\n { name: 'key', type: 'string' },\n ],\n outputs: [{ name: '', type: 'string' }],\n },\n];\nexport const addressResolverAbi = [\n {\n name: 'addr',\n type: 'function',\n stateMutability: 'view',\n inputs: [{ name: 'name', type: 'bytes32' }],\n outputs: [{ name: '', type: 'address' }],\n },\n {\n name: 'addr',\n type: 'function',\n stateMutability: 'view',\n inputs: [\n { name: 'name', type: 'bytes32' },\n { name: 'coinType', type: 'uint256' },\n ],\n outputs: [{ name: '', type: 'bytes' }],\n },\n];\n// ERC-1271\n// isValidSignature(bytes32 hash, bytes signature) → bytes4 magicValue\n/** @internal */\nexport const erc1271Abi = [\n {\n name: 'isValidSignature',\n type: 'function',\n stateMutability: 'view',\n inputs: [\n { name: 'hash', type: 'bytes32' },\n { name: 'signature', type: 'bytes' },\n ],\n outputs: [{ name: '', type: 'bytes4' }],\n },\n];\n// ERC-6492 - universal deployless signature validator contract\n// constructor(address _signer, bytes32 _hash, bytes _signature) → bytes4 returnValue\n// returnValue is either 0x1 (valid) or 0x0 (invalid)\nexport const erc6492SignatureValidatorAbi = [\n {\n inputs: [\n {\n name: '_signer',\n type: 'address',\n },\n {\n name: '_hash',\n type: 'bytes32',\n },\n {\n name: '_signature',\n type: 'bytes',\n },\n ],\n stateMutability: 'nonpayable',\n type: 'constructor',\n },\n {\n inputs: [\n {\n name: '_signer',\n type: 'address',\n },\n {\n name: '_hash',\n type: 'bytes32',\n },\n {\n name: '_signature',\n type: 'bytes',\n },\n ],\n outputs: [\n {\n type: 'bool',\n },\n ],\n stateMutability: 'nonpayable',\n type: 'function',\n name: 'isValidSig',\n },\n];\n/** [ERC-20 Token Standard](https://ethereum.org/en/developers/docs/standards/tokens/erc-20) */\nexport const erc20Abi = [\n {\n type: 'event',\n name: 'Approval',\n inputs: [\n {\n indexed: true,\n name: 'owner',\n type: 'address',\n },\n {\n indexed: true,\n name: 'spender',\n type: 'address',\n },\n {\n indexed: false,\n name: 'value',\n type: 'uint256',\n },\n ],\n },\n {\n type: 'event',\n name: 'Transfer',\n inputs: [\n {\n indexed: true,\n name: 'from',\n type: 'address',\n },\n {\n indexed: true,\n name: 'to',\n type: 'address',\n },\n {\n indexed: false,\n name: 'value',\n type: 'uint256',\n },\n ],\n },\n {\n type: 'function',\n name: 'allowance',\n stateMutability: 'view',\n inputs: [\n {\n name: 'owner',\n type: 'address',\n },\n {\n name: 'spender',\n type: 'address',\n },\n ],\n outputs: [\n {\n type: 'uint256',\n },\n ],\n },\n {\n type: 'function',\n name: 'approve',\n stateMutability: 'nonpayable',\n inputs: [\n {\n name: 'spender',\n type: 'address',\n },\n {\n name: 'amount',\n type: 'uint256',\n },\n ],\n outputs: [\n {\n type: 'bool',\n },\n ],\n },\n {\n type: 'function',\n name: 'balanceOf',\n stateMutability: 'view',\n inputs: [\n {\n name: 'account',\n type: 'address',\n },\n ],\n outputs: [\n {\n type: 'uint256',\n },\n ],\n },\n {\n type: 'function',\n name: 'decimals',\n stateMutability: 'view',\n inputs: [],\n outputs: [\n {\n type: 'uint8',\n },\n ],\n },\n {\n type: 'function',\n name: 'name',\n stateMutability: 'view',\n inputs: [],\n outputs: [\n {\n type: 'string',\n },\n ],\n },\n {\n type: 'function',\n name: 'symbol',\n stateMutability: 'view',\n inputs: [],\n outputs: [\n {\n type: 'string',\n },\n ],\n },\n {\n type: 'function',\n name: 'totalSupply',\n stateMutability: 'view',\n inputs: [],\n outputs: [\n {\n type: 'uint256',\n },\n ],\n },\n {\n type: 'function',\n name: 'transfer',\n stateMutability: 'nonpayable',\n inputs: [\n {\n name: 'recipient',\n type: 'address',\n },\n {\n name: 'amount',\n type: 'uint256',\n },\n ],\n outputs: [\n {\n type: 'bool',\n },\n ],\n },\n {\n type: 'function',\n name: 'transferFrom',\n stateMutability: 'nonpayable',\n inputs: [\n {\n name: 'sender',\n type: 'address',\n },\n {\n name: 'recipient',\n type: 'address',\n },\n {\n name: 'amount',\n type: 'uint256',\n },\n ],\n outputs: [\n {\n type: 'bool',\n },\n ],\n },\n];\n/**\n * [bytes32-flavored ERC-20](https://docs.makerdao.com/smart-contract-modules/mkr-module#4.-gotchas-potential-source-of-user-error)\n * for tokens (ie. Maker) that use bytes32 instead of string.\n */\nexport const erc20Abi_bytes32 = [\n {\n type: 'event',\n name: 'Approval',\n inputs: [\n {\n indexed: true,\n name: 'owner',\n type: 'address',\n },\n {\n indexed: true,\n name: 'spender',\n type: 'address',\n },\n {\n indexed: false,\n name: 'value',\n type: 'uint256',\n },\n ],\n },\n {\n type: 'event',\n name: 'Transfer',\n inputs: [\n {\n indexed: true,\n name: 'from',\n type: 'address',\n },\n {\n indexed: true,\n name: 'to',\n type: 'address',\n },\n {\n indexed: false,\n name: 'value',\n type: 'uint256',\n },\n ],\n },\n {\n type: 'function',\n name: 'allowance',\n stateMutability: 'view',\n inputs: [\n {\n name: 'owner',\n type: 'address',\n },\n {\n name: 'spender',\n type: 'address',\n },\n ],\n outputs: [\n {\n type: 'uint256',\n },\n ],\n },\n {\n type: 'function',\n name: 'approve',\n stateMutability: 'nonpayable',\n inputs: [\n {\n name: 'spender',\n type: 'address',\n },\n {\n name: 'amount',\n type: 'uint256',\n },\n ],\n outputs: [\n {\n type: 'bool',\n },\n ],\n },\n {\n type: 'function',\n name: 'balanceOf',\n stateMutability: 'view',\n inputs: [\n {\n name: 'account',\n type: 'address',\n },\n ],\n outputs: [\n {\n type: 'uint256',\n },\n ],\n },\n {\n type: 'function',\n name: 'decimals',\n stateMutability: 'view',\n inputs: [],\n outputs: [\n {\n type: 'uint8',\n },\n ],\n },\n {\n type: 'function',\n name: 'name',\n stateMutability: 'view',\n inputs: [],\n outputs: [\n {\n type: 'bytes32',\n },\n ],\n },\n {\n type: 'function',\n name: 'symbol',\n stateMutability: 'view',\n inputs: [],\n outputs: [\n {\n type: 'bytes32',\n },\n ],\n },\n {\n type: 'function',\n name: 'totalSupply',\n stateMutability: 'view',\n inputs: [],\n outputs: [\n {\n type: 'uint256',\n },\n ],\n },\n {\n type: 'function',\n name: 'transfer',\n stateMutability: 'nonpayable',\n inputs: [\n {\n name: 'recipient',\n type: 'address',\n },\n {\n name: 'amount',\n type: 'uint256',\n },\n ],\n outputs: [\n {\n type: 'bool',\n },\n ],\n },\n {\n type: 'function',\n name: 'transferFrom',\n stateMutability: 'nonpayable',\n inputs: [\n {\n name: 'sender',\n type: 'address',\n },\n {\n name: 'recipient',\n type: 'address',\n },\n {\n name: 'amount',\n type: 'uint256',\n },\n ],\n outputs: [\n {\n type: 'bool',\n },\n ],\n },\n];\n/** [ERC-1155 Multi Token Standard](https://ethereum.org/en/developers/docs/standards/tokens/erc-1155) */\nexport const erc1155Abi = [\n {\n inputs: [\n {\n internalType: 'address',\n name: 'sender',\n type: 'address',\n },\n {\n internalType: 'uint256',\n name: 'balance',\n type: 'uint256',\n },\n {\n internalType: 'uint256',\n name: 'needed',\n type: 'uint256',\n },\n {\n internalType: 'uint256',\n name: 'tokenId',\n type: 'uint256',\n },\n ],\n name: 'ERC1155InsufficientBalance',\n type: 'error',\n },\n {\n inputs: [\n {\n internalType: 'address',\n name: 'approver',\n type: 'address',\n },\n ],\n name: 'ERC1155InvalidApprover',\n type: 'error',\n },\n {\n inputs: [\n {\n internalType: 'uint256',\n name: 'idsLength',\n type: 'uint256',\n },\n {\n internalType: 'uint256',\n name: 'valuesLength',\n type: 'uint256',\n },\n ],\n name: 'ERC1155InvalidArrayLength',\n type: 'error',\n },\n {\n inputs: [\n {\n internalType: 'address',\n name: 'operator',\n type: 'address',\n },\n ],\n name: 'ERC1155InvalidOperator',\n type: 'error',\n },\n {\n inputs: [\n {\n internalType: 'address',\n name: 'receiver',\n type: 'address',\n },\n ],\n name: 'ERC1155InvalidReceiver',\n type: 'error',\n },\n {\n inputs: [\n {\n internalType: 'address',\n name: 'sender',\n type: 'address',\n },\n ],\n name: 'ERC1155InvalidSender',\n type: 'error',\n },\n {\n inputs: [\n {\n internalType: 'address',\n name: 'operator',\n type: 'address',\n },\n {\n internalType: 'address',\n name: 'owner',\n type: 'address',\n },\n ],\n name: 'ERC1155MissingApprovalForAll',\n type: 'error',\n },\n {\n anonymous: false,\n inputs: [\n {\n indexed: true,\n internalType: 'address',\n name: 'account',\n type: 'address',\n },\n {\n indexed: true,\n internalType: 'address',\n name: 'operator',\n type: 'address',\n },\n {\n indexed: false,\n internalType: 'bool',\n name: 'approved',\n type: 'bool',\n },\n ],\n name: 'ApprovalForAll',\n type: 'event',\n },\n {\n anonymous: false,\n inputs: [\n {\n indexed: true,\n internalType: 'address',\n name: 'operator',\n type: 'address',\n },\n {\n indexed: true,\n internalType: 'address',\n name: 'from',\n type: 'address',\n },\n {\n indexed: true,\n internalType: 'address',\n name: 'to',\n type: 'address',\n },\n {\n indexed: false,\n internalType: 'uint256[]',\n name: 'ids',\n type: 'uint256[]',\n },\n {\n indexed: false,\n internalType: 'uint256[]',\n name: 'values',\n type: 'uint256[]',\n },\n ],\n name: 'TransferBatch',\n type: 'event',\n },\n {\n anonymous: false,\n inputs: [\n {\n indexed: true,\n internalType: 'address',\n name: 'operator',\n type: 'address',\n },\n {\n indexed: true,\n internalType: 'address',\n name: 'from',\n type: 'address',\n },\n {\n indexed: true,\n internalType: 'address',\n name: 'to',\n type: 'address',\n },\n {\n indexed: false,\n internalType: 'uint256',\n name: 'id',\n type: 'uint256',\n },\n {\n indexed: false,\n internalType: 'uint256',\n name: 'value',\n type: 'uint256',\n },\n ],\n name: 'TransferSingle',\n type: 'event',\n },\n {\n anonymous: false,\n inputs: [\n {\n indexed: false,\n internalType: 'string',\n name: 'value',\n type: 'string',\n },\n {\n indexed: true,\n internalType: 'uint256',\n name: 'id',\n type: 'uint256',\n },\n ],\n name: 'URI',\n type: 'event',\n },\n {\n inputs: [\n {\n internalType: 'address',\n name: 'account',\n type: 'address',\n },\n {\n internalType: 'uint256',\n name: 'id',\n type: 'uint256',\n },\n ],\n name: 'balanceOf',\n outputs: [\n {\n internalType: 'uint256',\n name: '',\n type: 'uint256',\n },\n ],\n stateMutability: 'view',\n type: 'function',\n },\n {\n inputs: [\n {\n internalType: 'address[]',\n name: 'accounts',\n type: 'address[]',\n },\n {\n internalType: 'uint256[]',\n name: 'ids',\n type: 'uint256[]',\n },\n ],\n name: 'balanceOfBatch',\n outputs: [\n {\n internalType: 'uint256[]',\n name: '',\n type: 'uint256[]',\n },\n ],\n stateMutability: 'view',\n type: 'function',\n },\n {\n inputs: [\n {\n internalType: 'address',\n name: 'account',\n type: 'address',\n },\n {\n internalType: 'address',\n name: 'operator',\n type: 'address',\n },\n ],\n name: 'isApprovedForAll',\n outputs: [\n {\n internalType: 'bool',\n name: '',\n type: 'bool',\n },\n ],\n stateMutability: 'view',\n type: 'function',\n },\n {\n inputs: [\n {\n internalType: 'address',\n name: 'from',\n type: 'address',\n },\n {\n internalType: 'address',\n name: 'to',\n type: 'address',\n },\n {\n internalType: 'uint256[]',\n name: 'ids',\n type: 'uint256[]',\n },\n {\n internalType: 'uint256[]',\n name: 'values',\n type: 'uint256[]',\n },\n {\n internalType: 'bytes',\n name: 'data',\n type: 'bytes',\n },\n ],\n name: 'safeBatchTransferFrom',\n outputs: [],\n stateMutability: 'nonpayable',\n type: 'function',\n },\n {\n inputs: [\n {\n internalType: 'address',\n name: 'from',\n type: 'address',\n },\n {\n internalType: 'address',\n name: 'to',\n type: 'address',\n },\n {\n internalType: 'uint256',\n name: 'id',\n type: 'uint256',\n },\n {\n internalType: 'uint256',\n name: 'value',\n type: 'uint256',\n },\n {\n internalType: 'bytes',\n name: 'data',\n type: 'bytes',\n },\n ],\n name: 'safeTransferFrom',\n outputs: [],\n stateMutability: 'nonpayable',\n type: 'function',\n },\n {\n inputs: [\n {\n internalType: 'address',\n name: 'operator',\n type: 'address',\n },\n {\n internalType: 'bool',\n name: 'approved',\n type: 'bool',\n },\n ],\n name: 'setApprovalForAll',\n outputs: [],\n stateMutability: 'nonpayable',\n type: 'function',\n },\n {\n inputs: [\n {\n internalType: 'bytes4',\n name: 'interfaceId',\n type: 'bytes4',\n },\n ],\n name: 'supportsInterface',\n outputs: [\n {\n internalType: 'bool',\n name: '',\n type: 'bool',\n },\n ],\n stateMutability: 'view',\n type: 'function',\n },\n {\n inputs: [\n {\n internalType: 'uint256',\n name: '',\n type: 'uint256',\n },\n ],\n name: 'uri',\n outputs: [\n {\n internalType: 'string',\n name: '',\n type: 'string',\n },\n ],\n stateMutability: 'view',\n type: 'function',\n },\n];\n/** [ERC-721 Non-Fungible Token Standard](https://ethereum.org/en/developers/docs/standards/tokens/erc-721) */\nexport const erc721Abi = [\n {\n type: 'event',\n name: 'Approval',\n inputs: [\n {\n indexed: true,\n name: 'owner',\n type: 'address',\n },\n {\n indexed: true,\n name: 'spender',\n type: 'address',\n },\n {\n indexed: true,\n name: 'tokenId',\n type: 'uint256',\n },\n ],\n },\n {\n type: 'event',\n name: 'ApprovalForAll',\n inputs: [\n {\n indexed: true,\n name: 'owner',\n type: 'address',\n },\n {\n indexed: true,\n name: 'operator',\n type: 'address',\n },\n {\n indexed: false,\n name: 'approved',\n type: 'bool',\n },\n ],\n },\n {\n type: 'event',\n name: 'Transfer',\n inputs: [\n {\n indexed: true,\n name: 'from',\n type: 'address',\n },\n {\n indexed: true,\n name: 'to',\n type: 'address',\n },\n {\n indexed: true,\n name: 'tokenId',\n type: 'uint256',\n },\n ],\n },\n {\n type: 'function',\n name: 'approve',\n stateMutability: 'payable',\n inputs: [\n {\n name: 'spender',\n type: 'address',\n },\n {\n name: 'tokenId',\n type: 'uint256',\n },\n ],\n outputs: [],\n },\n {\n type: 'function',\n name: 'balanceOf',\n stateMutability: 'view',\n inputs: [\n {\n name: 'account',\n type: 'address',\n },\n ],\n outputs: [\n {\n type: 'uint256',\n },\n ],\n },\n {\n type: 'function',\n name: 'getApproved',\n stateMutability: 'view',\n inputs: [\n {\n name: 'tokenId',\n type: 'uint256',\n },\n ],\n outputs: [\n {\n type: 'address',\n },\n ],\n },\n {\n type: 'function',\n name: 'isApprovedForAll',\n stateMutability: 'view',\n inputs: [\n {\n name: 'owner',\n type: 'address',\n },\n {\n name: 'operator',\n type: 'address',\n },\n ],\n outputs: [\n {\n type: 'bool',\n },\n ],\n },\n {\n type: 'function',\n name: 'name',\n stateMutability: 'view',\n inputs: [],\n outputs: [\n {\n type: 'string',\n },\n ],\n },\n {\n type: 'function',\n name: 'ownerOf',\n stateMutability: 'view',\n inputs: [\n {\n name: 'tokenId',\n type: 'uint256',\n },\n ],\n outputs: [\n {\n name: 'owner',\n type: 'address',\n },\n ],\n },\n {\n type: 'function',\n name: 'safeTransferFrom',\n stateMutability: 'payable',\n inputs: [\n {\n name: 'from',\n type: 'address',\n },\n {\n name: 'to',\n type: 'address',\n },\n {\n name: 'tokenId',\n type: 'uint256',\n },\n ],\n outputs: [],\n },\n {\n type: 'function',\n name: 'safeTransferFrom',\n stateMutability: 'nonpayable',\n inputs: [\n {\n name: 'from',\n type: 'address',\n },\n {\n name: 'to',\n type: 'address',\n },\n {\n name: 'id',\n type: 'uint256',\n },\n {\n name: 'data',\n type: 'bytes',\n },\n ],\n outputs: [],\n },\n {\n type: 'function',\n name: 'setApprovalForAll',\n stateMutability: 'nonpayable',\n inputs: [\n {\n name: 'operator',\n type: 'address',\n },\n {\n name: 'approved',\n type: 'bool',\n },\n ],\n outputs: [],\n },\n {\n type: 'function',\n name: 'symbol',\n stateMutability: 'view',\n inputs: [],\n outputs: [\n {\n type: 'string',\n },\n ],\n },\n {\n type: 'function',\n name: 'tokenByIndex',\n stateMutability: 'view',\n inputs: [\n {\n name: 'index',\n type: 'uint256',\n },\n ],\n outputs: [\n {\n type: 'uint256',\n },\n ],\n },\n {\n type: 'function',\n name: 'tokenByIndex',\n stateMutability: 'view',\n inputs: [\n {\n name: 'owner',\n type: 'address',\n },\n {\n name: 'index',\n type: 'uint256',\n },\n ],\n outputs: [\n {\n name: 'tokenId',\n type: 'uint256',\n },\n ],\n },\n {\n type: 'function',\n name: 'tokenURI',\n stateMutability: 'view',\n inputs: [\n {\n name: 'tokenId',\n type: 'uint256',\n },\n ],\n outputs: [\n {\n type: 'string',\n },\n ],\n },\n {\n type: 'function',\n name: 'totalSupply',\n stateMutability: 'view',\n inputs: [],\n outputs: [\n {\n type: 'uint256',\n },\n ],\n },\n {\n type: 'function',\n name: 'transferFrom',\n stateMutability: 'payable',\n inputs: [\n {\n name: 'sender',\n type: 'address',\n },\n {\n name: 'recipient',\n type: 'address',\n },\n {\n name: 'tokenId',\n type: 'uint256',\n },\n ],\n outputs: [],\n },\n];\n/** [ERC-4626 Tokenized Vaults Standard](https://ethereum.org/en/developers/docs/standards/tokens/erc-4626) */\nexport const erc4626Abi = [\n {\n anonymous: false,\n inputs: [\n {\n indexed: true,\n name: 'owner',\n type: 'address',\n },\n {\n indexed: true,\n name: 'spender',\n type: 'address',\n },\n {\n indexed: false,\n name: 'value',\n type: 'uint256',\n },\n ],\n name: 'Approval',\n type: 'event',\n },\n {\n anonymous: false,\n inputs: [\n {\n indexed: true,\n name: 'sender',\n type: 'address',\n },\n {\n indexed: true,\n name: 'receiver',\n type: 'address',\n },\n {\n indexed: false,\n name: 'assets',\n type: 'uint256',\n },\n {\n indexed: false,\n name: 'shares',\n type: 'uint256',\n },\n ],\n name: 'Deposit',\n type: 'event',\n },\n {\n anonymous: false,\n inputs: [\n {\n indexed: true,\n name: 'from',\n type: 'address',\n },\n {\n indexed: true,\n name: 'to',\n type: 'address',\n },\n {\n indexed: false,\n name: 'value',\n type: 'uint256',\n },\n ],\n name: 'Transfer',\n type: 'event',\n },\n {\n anonymous: false,\n inputs: [\n {\n indexed: true,\n name: 'sender',\n type: 'address',\n },\n {\n indexed: true,\n name: 'receiver',\n type: 'address',\n },\n {\n indexed: true,\n name: 'owner',\n type: 'address',\n },\n {\n indexed: false,\n name: 'assets',\n type: 'uint256',\n },\n {\n indexed: false,\n name: 'shares',\n type: 'uint256',\n },\n ],\n name: 'Withdraw',\n type: 'event',\n },\n {\n inputs: [\n {\n name: 'owner',\n type: 'address',\n },\n {\n name: 'spender',\n type: 'address',\n },\n ],\n name: 'allowance',\n outputs: [\n {\n type: 'uint256',\n },\n ],\n stateMutability: 'view',\n type: 'function',\n },\n {\n inputs: [\n {\n name: 'spender',\n type: 'address',\n },\n {\n name: 'amount',\n type: 'uint256',\n },\n ],\n name: 'approve',\n outputs: [\n {\n type: 'bool',\n },\n ],\n stateMutability: 'nonpayable',\n type: 'function',\n },\n {\n inputs: [],\n name: 'asset',\n outputs: [\n {\n name: 'assetTokenAddress',\n type: 'address',\n },\n ],\n stateMutability: 'view',\n type: 'function',\n },\n {\n inputs: [\n {\n name: 'account',\n type: 'address',\n },\n ],\n name: 'balanceOf',\n outputs: [\n {\n type: 'uint256',\n },\n ],\n stateMutability: 'view',\n type: 'function',\n },\n {\n inputs: [\n {\n name: 'shares',\n type: 'uint256',\n },\n ],\n name: 'convertToAssets',\n outputs: [\n {\n name: 'assets',\n type: 'uint256',\n },\n ],\n stateMutability: 'view',\n type: 'function',\n },\n {\n inputs: [\n {\n name: 'assets',\n type: 'uint256',\n },\n ],\n name: 'convertToShares',\n outputs: [\n {\n name: 'shares',\n type: 'uint256',\n },\n ],\n stateMutability: 'view',\n type: 'function',\n },\n {\n inputs: [\n {\n name: 'assets',\n type: 'uint256',\n },\n {\n name: 'receiver',\n type: 'address',\n },\n ],\n name: 'deposit',\n outputs: [\n {\n name: 'shares',\n type: 'uint256',\n },\n ],\n stateMutability: 'nonpayable',\n type: 'function',\n },\n {\n inputs: [\n {\n name: 'caller',\n type: 'address',\n },\n ],\n name: 'maxDeposit',\n outputs: [\n {\n name: 'maxAssets',\n type: 'uint256',\n },\n ],\n stateMutability: 'view',\n type: 'function',\n },\n {\n inputs: [\n {\n name: 'caller',\n type: 'address',\n },\n ],\n name: 'maxMint',\n outputs: [\n {\n name: 'maxShares',\n type: 'uint256',\n },\n ],\n stateMutability: 'view',\n type: 'function',\n },\n {\n inputs: [\n {\n name: 'owner',\n type: 'address',\n },\n ],\n name: 'maxRedeem',\n outputs: [\n {\n name: 'maxShares',\n type: 'uint256',\n },\n ],\n stateMutability: 'view',\n type: 'function',\n },\n {\n inputs: [\n {\n name: 'owner',\n type: 'address',\n },\n ],\n name: 'maxWithdraw',\n outputs: [\n {\n name: 'maxAssets',\n type: 'uint256',\n },\n ],\n stateMutability: 'view',\n type: 'function',\n },\n {\n inputs: [\n {\n name: 'shares',\n type: 'uint256',\n },\n {\n name: 'receiver',\n type: 'address',\n },\n ],\n name: 'mint',\n outputs: [\n {\n name: 'assets',\n type: 'uint256',\n },\n ],\n stateMutability: 'nonpayable',\n type: 'function',\n },\n {\n inputs: [\n {\n name: 'assets',\n type: 'uint256',\n },\n ],\n name: 'previewDeposit',\n outputs: [\n {\n name: 'shares',\n type: 'uint256',\n },\n ],\n stateMutability: 'view',\n type: 'function',\n },\n {\n inputs: [\n {\n name: 'shares',\n type: 'uint256',\n },\n ],\n name: 'previewMint',\n outputs: [\n {\n name: 'assets',\n type: 'uint256',\n },\n ],\n stateMutability: 'view',\n type: 'function',\n },\n {\n inputs: [\n {\n name: 'shares',\n type: 'uint256',\n },\n ],\n name: 'previewRedeem',\n outputs: [\n {\n name: 'assets',\n type: 'uint256',\n },\n ],\n stateMutability: 'view',\n type: 'function',\n },\n {\n inputs: [\n {\n name: 'assets',\n type: 'uint256',\n },\n ],\n name: 'previewWithdraw',\n outputs: [\n {\n name: 'shares',\n type: 'uint256',\n },\n ],\n stateMutability: 'view',\n type: 'function',\n },\n {\n inputs: [\n {\n name: 'shares',\n type: 'uint256',\n },\n {\n name: 'receiver',\n type: 'address',\n },\n {\n name: 'owner',\n type: 'address',\n },\n ],\n name: 'redeem',\n outputs: [\n {\n name: 'assets',\n type: 'uint256',\n },\n ],\n stateMutability: 'nonpayable',\n type: 'function',\n },\n {\n inputs: [],\n name: 'totalAssets',\n outputs: [\n {\n name: 'totalManagedAssets',\n type: 'uint256',\n },\n ],\n stateMutability: 'view',\n type: 'function',\n },\n {\n inputs: [],\n name: 'totalSupply',\n outputs: [\n {\n type: 'uint256',\n },\n ],\n stateMutability: 'view',\n type: 'function',\n },\n {\n inputs: [\n {\n name: 'to',\n type: 'address',\n },\n {\n name: 'amount',\n type: 'uint256',\n },\n ],\n name: 'transfer',\n outputs: [\n {\n type: 'bool',\n },\n ],\n stateMutability: 'nonpayable',\n type: 'function',\n },\n {\n inputs: [\n {\n name: 'from',\n type: 'address',\n },\n {\n name: 'to',\n type: 'address',\n },\n {\n name: 'amount',\n type: 'uint256',\n },\n ],\n name: 'transferFrom',\n outputs: [\n {\n type: 'bool',\n },\n ],\n stateMutability: 'nonpayable',\n type: 'function',\n },\n {\n inputs: [\n {\n name: 'assets',\n type: 'uint256',\n },\n {\n name: 'receiver',\n type: 'address',\n },\n {\n name: 'owner',\n type: 'address',\n },\n ],\n name: 'withdraw',\n outputs: [\n {\n name: 'shares',\n type: 'uint256',\n },\n ],\n stateMutability: 'nonpayable',\n type: 'function',\n },\n];\n//# sourceMappingURL=abis.js.map","export const aggregate3Signature = '0x82ad56cb';\n//# sourceMappingURL=contract.js.map","export const deploylessCallViaBytecodeBytecode = '0x608060405234801561001057600080fd5b5060405161018e38038061018e83398101604081905261002f91610124565b6000808351602085016000f59050803b61004857600080fd5b6000808351602085016000855af16040513d6000823e81610067573d81fd5b3d81f35b634e487b7160e01b600052604160045260246000fd5b600082601f83011261009257600080fd5b81516001600160401b038111156100ab576100ab61006b565b604051601f8201601f19908116603f011681016001600160401b03811182821017156100d9576100d961006b565b6040528181528382016020018510156100f157600080fd5b60005b82811015610110576020818601810151838301820152016100f4565b506000918101602001919091529392505050565b6000806040838503121561013757600080fd5b82516001600160401b0381111561014d57600080fd5b61015985828601610081565b602085015190935090506001600160401b0381111561017757600080fd5b61018385828601610081565b915050925092905056fe';\nexport const deploylessCallViaFactoryBytecode = '0x608060405234801561001057600080fd5b506040516102c03803806102c083398101604081905261002f916101e6565b836001600160a01b03163b6000036100e457600080836001600160a01b03168360405161005c9190610270565b6000604051808303816000865af19150503d8060008114610099576040519150601f19603f3d011682016040523d82523d6000602084013e61009e565b606091505b50915091508115806100b857506001600160a01b0386163b155b156100e1578060405163101bb98d60e01b81526004016100d8919061028c565b60405180910390fd5b50505b6000808451602086016000885af16040513d6000823e81610103573d81fd5b3d81f35b80516001600160a01b038116811461011e57600080fd5b919050565b634e487b7160e01b600052604160045260246000fd5b60005b8381101561015457818101518382015260200161013c565b50506000910152565b600082601f83011261016e57600080fd5b81516001600160401b0381111561018757610187610123565b604051601f8201601f19908116603f011681016001600160401b03811182821017156101b5576101b5610123565b6040528181528382016020018510156101cd57600080fd5b6101de826020830160208701610139565b949350505050565b600080600080608085870312156101fc57600080fd5b61020585610107565b60208601519094506001600160401b0381111561022157600080fd5b61022d8782880161015d565b93505061023c60408601610107565b60608601519092506001600160401b0381111561025857600080fd5b6102648782880161015d565b91505092959194509250565b60008251610282818460208701610139565b9190910192915050565b60208152600082518060208401526102ab816040850160208701610139565b601f01601f1916919091016040019291505056fe';\nexport const erc6492SignatureValidatorByteCode = '0x608060405234801561001057600080fd5b5060405161069438038061069483398101604081905261002f9161051e565b600061003c848484610048565b9050806000526001601ff35b60007f64926492649264926492649264926492649264926492649264926492649264926100748361040c565b036101e7576000606080848060200190518101906100929190610577565b60405192955090935091506000906001600160a01b038516906100b69085906105dd565b6000604051808303816000865af19150503d80600081146100f3576040519150601f19603f3d011682016040523d82523d6000602084013e6100f8565b606091505b50509050876001600160a01b03163b60000361016057806101605760405162461bcd60e51b815260206004820152601e60248201527f5369676e617475726556616c696461746f723a206465706c6f796d656e74000060448201526064015b60405180910390fd5b604051630b135d3f60e11b808252906001600160a01b038a1690631626ba7e90610190908b9087906004016105f9565b602060405180830381865afa1580156101ad573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906101d19190610633565b6001600160e01b03191614945050505050610405565b6001600160a01b0384163b1561027a57604051630b135d3f60e11b808252906001600160a01b03861690631626ba7e9061022790879087906004016105f9565b602060405180830381865afa158015610244573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906102689190610633565b6001600160e01b031916149050610405565b81516041146102df5760405162461bcd60e51b815260206004820152603a602482015260008051602061067483398151915260448201527f3a20696e76616c6964207369676e6174757265206c656e6774680000000000006064820152608401610157565b6102e7610425565b5060208201516040808401518451859392600091859190811061030c5761030c61065d565b016020015160f81c9050601b811480159061032b57508060ff16601c14155b1561038c5760405162461bcd60e51b815260206004820152603b602482015260008051602061067483398151915260448201527f3a20696e76616c6964207369676e617475726520762076616c756500000000006064820152608401610157565b60408051600081526020810180835289905260ff83169181019190915260608101849052608081018390526001600160a01b0389169060019060a0016020604051602081039080840390855afa1580156103ea573d6000803e3d6000fd5b505050602060405103516001600160a01b0316149450505050505b9392505050565b600060208251101561041d57600080fd5b508051015190565b60405180606001604052806003906020820280368337509192915050565b6001600160a01b038116811461045857600080fd5b50565b634e487b7160e01b600052604160045260246000fd5b60005b8381101561048c578181015183820152602001610474565b50506000910152565b600082601f8301126104a657600080fd5b81516001600160401b038111156104bf576104bf61045b565b604051601f8201601f19908116603f011681016001600160401b03811182821017156104ed576104ed61045b565b60405281815283820160200185101561050557600080fd5b610516826020830160208701610471565b949350505050565b60008060006060848603121561053357600080fd5b835161053e81610443565b6020850151604086015191945092506001600160401b0381111561056157600080fd5b61056d86828701610495565b9150509250925092565b60008060006060848603121561058c57600080fd5b835161059781610443565b60208501519093506001600160401b038111156105b357600080fd5b6105bf86828701610495565b604086015190935090506001600160401b0381111561056157600080fd5b600082516105ef818460208701610471565b9190910192915050565b828152604060208201526000825180604084015261061e816060850160208701610471565b601f01601f1916919091016060019392505050565b60006020828403121561064557600080fd5b81516001600160e01b03198116811461040557600080fd5b634e487b7160e01b600052603260045260246000fdfe5369676e617475726556616c696461746f72237265636f7665725369676e6572';\nexport const multicall3Bytecode = '0x608060405234801561001057600080fd5b506115b9806100206000396000f3fe6080604052600436106100f35760003560e01c80634d2301cc1161008a578063a8b0574e11610059578063a8b0574e14610325578063bce38bd714610350578063c3077fa914610380578063ee82ac5e146103b2576100f3565b80634d2301cc1461026257806372425d9d1461029f57806382ad56cb146102ca57806386d516e8146102fa576100f3565b80633408e470116100c65780633408e470146101af578063399542e9146101da5780633e64a6961461020c57806342cbb15c14610237576100f3565b80630f28c97d146100f8578063174dea7114610123578063252dba421461015357806327e86d6e14610184575b600080fd5b34801561010457600080fd5b5061010d6103ef565b60405161011a9190610c0a565b60405180910390f35b61013d60048036038101906101389190610c94565b6103f7565b60405161014a9190610e94565b60405180910390f35b61016d60048036038101906101689190610f0c565b610615565b60405161017b92919061101b565b60405180910390f35b34801561019057600080fd5b506101996107ab565b6040516101a69190611064565b60405180910390f35b3480156101bb57600080fd5b506101c46107b7565b6040516101d19190610c0a565b60405180910390f35b6101f460048036038101906101ef91906110ab565b6107bf565b6040516102039392919061110b565b60405180910390f35b34801561021857600080fd5b506102216107e1565b60405161022e9190610c0a565b60405180910390f35b34801561024357600080fd5b5061024c6107e9565b6040516102599190610c0a565b60405180910390f35b34801561026e57600080fd5b50610289600480360381019061028491906111a7565b6107f1565b6040516102969190610c0a565b60405180910390f35b3480156102ab57600080fd5b506102b4610812565b6040516102c19190610c0a565b60405180910390f35b6102e460048036038101906102df919061122a565b61081a565b6040516102f19190610e94565b60405180910390f35b34801561030657600080fd5b5061030f6109e4565b60405161031c9190610c0a565b60405180910390f35b34801561033157600080fd5b5061033a6109ec565b6040516103479190611286565b60405180910390f35b61036a600480360381019061036591906110ab565b6109f4565b6040516103779190610e94565b60405180910390f35b61039a60048036038101906103959190610f0c565b610ba6565b6040516103a99392919061110b565b60405180910390f35b3480156103be57600080fd5b506103d960048036038101906103d491906112cd565b610bca565b6040516103e69190611064565b60405180910390f35b600042905090565b60606000808484905090508067ffffffffffffffff81111561041c5761041b6112fa565b5b60405190808252806020026020018201604052801561045557816020015b610442610bd5565b81526020019060019003908161043a5790505b5092503660005b828110156105c957600085828151811061047957610478611329565b5b6020026020010151905087878381811061049657610495611329565b5b90506020028101906104a89190611367565b925060008360400135905080860195508360000160208101906104cb91906111a7565b73ffffffffffffffffffffffffffffffffffffffff16818580606001906104f2919061138f565b604051610500929190611431565b60006040518083038185875af1925050503d806000811461053d576040519150601f19603f3d011682016040523d82523d6000602084013e610542565b606091505b5083600001846020018290528215151515815250505081516020850135176105bc577f08c379a000000000000000000000000000000000000000000000000000000000600052602060045260176024527f4d756c746963616c6c333a2063616c6c206661696c656400000000000000000060445260846000fd5b826001019250505061045c565b5082341461060c576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610603906114a7565b60405180910390fd5b50505092915050565b6000606043915060008484905090508067ffffffffffffffff81111561063e5761063d6112fa565b5b60405190808252806020026020018201604052801561067157816020015b606081526020019060019003908161065c5790505b5091503660005b828110156107a157600087878381811061069557610694611329565b5b90506020028101906106a791906114c7565b92508260000160208101906106bc91906111a7565b73ffffffffffffffffffffffffffffffffffffffff168380602001906106e2919061138f565b6040516106f0929190611431565b6000604051808303816000865af19150503d806000811461072d576040519150601f19603f3d011682016040523d82523d6000602084013e610732565b606091505b5086848151811061074657610745611329565b5b60200260200101819052819250505080610795576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161078c9061153b565b60405180910390fd5b81600101915050610678565b5050509250929050565b60006001430340905090565b600046905090565b6000806060439250434091506107d68686866109f4565b905093509350939050565b600048905090565b600043905090565b60008173ffffffffffffffffffffffffffffffffffffffff16319050919050565b600044905090565b606060008383905090508067ffffffffffffffff81111561083e5761083d6112fa565b5b60405190808252806020026020018201604052801561087757816020015b610864610bd5565b81526020019060019003908161085c5790505b5091503660005b828110156109db57600084828151811061089b5761089a611329565b5b602002602001015190508686838181106108b8576108b7611329565b5b90506020028101906108ca919061155b565b92508260000160208101906108df91906111a7565b73ffffffffffffffffffffffffffffffffffffffff16838060400190610905919061138f565b604051610913929190611431565b6000604051808303816000865af19150503d8060008114610950576040519150601f19603f3d011682016040523d82523d6000602084013e610955565b606091505b5082600001836020018290528215151515815250505080516020840135176109cf577f08c379a000000000000000000000000000000000000000000000000000000000600052602060045260176024527f4d756c746963616c6c333a2063616c6c206661696c656400000000000000000060445260646000fd5b8160010191505061087e565b50505092915050565b600045905090565b600041905090565b606060008383905090508067ffffffffffffffff811115610a1857610a176112fa565b5b604051908082528060200260200182016040528015610a5157816020015b610a3e610bd5565b815260200190600190039081610a365790505b5091503660005b82811015610b9c576000848281518110610a7557610a74611329565b5b60200260200101519050868683818110610a9257610a91611329565b5b9050602002810190610aa491906114c7565b9250826000016020810190610ab991906111a7565b73ffffffffffffffffffffffffffffffffffffffff16838060200190610adf919061138f565b604051610aed929190611431565b6000604051808303816000865af19150503d8060008114610b2a576040519150601f19603f3d011682016040523d82523d6000602084013e610b2f565b606091505b508260000183602001829052821515151581525050508715610b90578060000151610b8f576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610b869061153b565b60405180910390fd5b5b81600101915050610a58565b5050509392505050565b6000806060610bb7600186866107bf565b8093508194508295505050509250925092565b600081409050919050565b6040518060400160405280600015158152602001606081525090565b6000819050919050565b610c0481610bf1565b82525050565b6000602082019050610c1f6000830184610bfb565b92915050565b600080fd5b600080fd5b600080fd5b600080fd5b600080fd5b60008083601f840112610c5457610c53610c2f565b5b8235905067ffffffffffffffff811115610c7157610c70610c34565b5b602083019150836020820283011115610c8d57610c8c610c39565b5b9250929050565b60008060208385031215610cab57610caa610c25565b5b600083013567ffffffffffffffff811115610cc957610cc8610c2a565b5b610cd585828601610c3e565b92509250509250929050565b600081519050919050565b600082825260208201905092915050565b6000819050602082019050919050565b60008115159050919050565b610d2281610d0d565b82525050565b600081519050919050565b600082825260208201905092915050565b60005b83811015610d62578082015181840152602081019050610d47565b83811115610d71576000848401525b50505050565b6000601f19601f8301169050919050565b6000610d9382610d28565b610d9d8185610d33565b9350610dad818560208601610d44565b610db681610d77565b840191505092915050565b6000604083016000830151610dd96000860182610d19565b5060208301518482036020860152610df18282610d88565b9150508091505092915050565b6000610e0a8383610dc1565b905092915050565b6000602082019050919050565b6000610e2a82610ce1565b610e348185610cec565b935083602082028501610e4685610cfd565b8060005b85811015610e825784840389528151610e638582610dfe565b9450610e6e83610e12565b925060208a01995050600181019050610e4a565b50829750879550505050505092915050565b60006020820190508181036000830152610eae8184610e1f565b905092915050565b60008083601f840112610ecc57610ecb610c2f565b5b8235905067ffffffffffffffff811115610ee957610ee8610c34565b5b602083019150836020820283011115610f0557610f04610c39565b5b9250929050565b60008060208385031215610f2357610f22610c25565b5b600083013567ffffffffffffffff811115610f4157610f40610c2a565b5b610f4d85828601610eb6565b92509250509250929050565b600081519050919050565b600082825260208201905092915050565b6000819050602082019050919050565b6000610f918383610d88565b905092915050565b6000602082019050919050565b6000610fb182610f59565b610fbb8185610f64565b935083602082028501610fcd85610f75565b8060005b858110156110095784840389528151610fea8582610f85565b9450610ff583610f99565b925060208a01995050600181019050610fd1565b50829750879550505050505092915050565b60006040820190506110306000830185610bfb565b81810360208301526110428184610fa6565b90509392505050565b6000819050919050565b61105e8161104b565b82525050565b60006020820190506110796000830184611055565b92915050565b61108881610d0d565b811461109357600080fd5b50565b6000813590506110a58161107f565b92915050565b6000806000604084860312156110c4576110c3610c25565b5b60006110d286828701611096565b935050602084013567ffffffffffffffff8111156110f3576110f2610c2a565b5b6110ff86828701610eb6565b92509250509250925092565b60006060820190506111206000830186610bfb565b61112d6020830185611055565b818103604083015261113f8184610e1f565b9050949350505050565b600073ffffffffffffffffffffffffffffffffffffffff82169050919050565b600061117482611149565b9050919050565b61118481611169565b811461118f57600080fd5b50565b6000813590506111a18161117b565b92915050565b6000602082840312156111bd576111bc610c25565b5b60006111cb84828501611192565b91505092915050565b60008083601f8401126111ea576111e9610c2f565b5b8235905067ffffffffffffffff81111561120757611206610c34565b5b60208301915083602082028301111561122357611222610c39565b5b9250929050565b6000806020838503121561124157611240610c25565b5b600083013567ffffffffffffffff81111561125f5761125e610c2a565b5b61126b858286016111d4565b92509250509250929050565b61128081611169565b82525050565b600060208201905061129b6000830184611277565b92915050565b6112aa81610bf1565b81146112b557600080fd5b50565b6000813590506112c7816112a1565b92915050565b6000602082840312156112e3576112e2610c25565b5b60006112f1848285016112b8565b91505092915050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052604160045260246000fd5b7f4e487b7100000000000000000000000000000000000000000000000000000000600052603260045260246000fd5b600080fd5b600080fd5b600080fd5b60008235600160800383360303811261138357611382611358565b5b80830191505092915050565b600080833560016020038436030381126113ac576113ab611358565b5b80840192508235915067ffffffffffffffff8211156113ce576113cd61135d565b5b6020830192506001820236038313156113ea576113e9611362565b5b509250929050565b600081905092915050565b82818337600083830152505050565b600061141883856113f2565b93506114258385846113fd565b82840190509392505050565b600061143e82848661140c565b91508190509392505050565b600082825260208201905092915050565b7f4d756c746963616c6c333a2076616c7565206d69736d61746368000000000000600082015250565b6000611491601a8361144a565b915061149c8261145b565b602082019050919050565b600060208201905081810360008301526114c081611484565b9050919050565b6000823560016040038336030381126114e3576114e2611358565b5b80830191505092915050565b7f4d756c746963616c6c333a2063616c6c206661696c6564000000000000000000600082015250565b600061152560178361144a565b9150611530826114ef565b602082019050919050565b6000602082019050818103600083015261155481611518565b9050919050565b60008235600160600383360303811261157757611576611358565b5b8083019150509291505056fea264697066735822122020c1bc9aacf8e4a6507193432a895a8e77094f45a1395583f07b24e860ef06cd64736f6c634300080c0033';\n//# sourceMappingURL=contracts.js.map","import { BaseError } from './base.js';\nexport class ChainDoesNotSupportContract extends BaseError {\n constructor({ blockNumber, chain, contract, }) {\n super(`Chain \"${chain.name}\" does not support contract \"${contract.name}\".`, {\n metaMessages: [\n 'This could be due to any of the following:',\n ...(blockNumber &&\n contract.blockCreated &&\n contract.blockCreated > blockNumber\n ? [\n `- The contract \"${contract.name}\" was not deployed until block ${contract.blockCreated} (current block ${blockNumber}).`,\n ]\n : [\n `- The chain does not have the contract \"${contract.name}\" configured.`,\n ]),\n ],\n name: 'ChainDoesNotSupportContract',\n });\n }\n}\nexport class ChainMismatchError extends BaseError {\n constructor({ chain, currentChainId, }) {\n super(`The current chain of the wallet (id: ${currentChainId}) does not match the target chain for the transaction (id: ${chain.id} – ${chain.name}).`, {\n metaMessages: [\n `Current Chain ID: ${currentChainId}`,\n `Expected Chain ID: ${chain.id} – ${chain.name}`,\n ],\n name: 'ChainMismatchError',\n });\n }\n}\nexport class ChainNotFoundError extends BaseError {\n constructor() {\n super([\n 'No chain was provided to the request.',\n 'Please provide a chain with the `chain` argument on the Action, or by supplying a `chain` to WalletClient.',\n ].join('\\n'), {\n name: 'ChainNotFoundError',\n });\n }\n}\nexport class ClientChainNotConfiguredError extends BaseError {\n constructor() {\n super('No chain was provided to the Client.', {\n name: 'ClientChainNotConfiguredError',\n });\n }\n}\nexport class InvalidChainIdError extends BaseError {\n constructor({ chainId }) {\n super(typeof chainId === 'number'\n ? `Chain ID \"${chainId}\" is invalid.`\n : 'Chain ID is invalid.', { name: 'InvalidChainIdError' });\n }\n}\n//# sourceMappingURL=chain.js.map","import { AbiConstructorNotFoundError, AbiConstructorParamsNotFoundError, } from '../../errors/abi.js';\nimport { concatHex } from '../data/concat.js';\nimport { encodeAbiParameters, } from './encodeAbiParameters.js';\nconst docsPath = '/docs/contract/encodeDeployData';\nexport function encodeDeployData(parameters) {\n const { abi, args, bytecode } = parameters;\n if (!args || args.length === 0)\n return bytecode;\n const description = abi.find((x) => 'type' in x && x.type === 'constructor');\n if (!description)\n throw new AbiConstructorNotFoundError({ docsPath });\n if (!('inputs' in description))\n throw new AbiConstructorParamsNotFoundError({ docsPath });\n if (!description.inputs || description.inputs.length === 0)\n throw new AbiConstructorParamsNotFoundError({ docsPath });\n const data = encodeAbiParameters(description.inputs, args);\n return concatHex([bytecode, data]);\n}\n//# sourceMappingURL=encodeDeployData.js.map","import { ChainDoesNotSupportContract, } from '../../errors/chain.js';\nexport function getChainContractAddress({ blockNumber, chain, contract: name, }) {\n const contract = chain?.contracts?.[name];\n if (!contract)\n throw new ChainDoesNotSupportContract({\n chain,\n contract: { name },\n });\n if (blockNumber &&\n contract.blockCreated &&\n contract.blockCreated > blockNumber)\n throw new ChainDoesNotSupportContract({\n blockNumber,\n chain,\n contract: {\n name,\n blockCreated: contract.blockCreated,\n },\n });\n return contract.address;\n}\n//# sourceMappingURL=getChainContractAddress.js.map","import { CallExecutionError, } from '../../errors/contract.js';\nimport { UnknownNodeError } from '../../errors/node.js';\nimport { getNodeError, } from './getNodeError.js';\nexport function getCallError(err, { docsPath, ...args }) {\n const cause = (() => {\n const cause = getNodeError(err, args);\n if (cause instanceof UnknownNodeError)\n return err;\n return cause;\n })();\n return new CallExecutionError(cause, {\n docsPath,\n ...args,\n });\n}\n//# sourceMappingURL=getCallError.js.map","/** @internal */\nexport function withResolvers() {\n let resolve = () => undefined;\n let reject = () => undefined;\n const promise = new Promise((resolve_, reject_) => {\n resolve = resolve_;\n reject = reject_;\n });\n return { promise, resolve, reject };\n}\n//# sourceMappingURL=withResolvers.js.map","import { withResolvers } from './withResolvers.js';\nconst schedulerCache = /*#__PURE__*/ new Map();\n/** @internal */\nexport function createBatchScheduler({ fn, id, shouldSplitBatch, wait = 0, sort, }) {\n const exec = async () => {\n const scheduler = getScheduler();\n flush();\n const args = scheduler.map(({ args }) => args);\n if (args.length === 0)\n return;\n fn(args)\n .then((data) => {\n if (sort && Array.isArray(data))\n data.sort(sort);\n for (let i = 0; i < scheduler.length; i++) {\n const { resolve } = scheduler[i];\n resolve?.([data[i], data]);\n }\n })\n .catch((err) => {\n for (let i = 0; i < scheduler.length; i++) {\n const { reject } = scheduler[i];\n reject?.(err);\n }\n });\n };\n const flush = () => schedulerCache.delete(id);\n const getBatchedArgs = () => getScheduler().map(({ args }) => args);\n const getScheduler = () => schedulerCache.get(id) || [];\n const setScheduler = (item) => schedulerCache.set(id, [...getScheduler(), item]);\n return {\n flush,\n async schedule(args) {\n const { promise, resolve, reject } = withResolvers();\n const split = shouldSplitBatch?.([...getBatchedArgs(), args]);\n if (split)\n exec();\n const hasActiveScheduler = getScheduler().length > 0;\n if (hasActiveScheduler) {\n setScheduler({ args, resolve, reject });\n return promise;\n }\n setScheduler({ args, resolve, reject });\n setTimeout(exec, wait);\n return promise;\n },\n };\n}\n//# sourceMappingURL=createBatchScheduler.js.map","import { parseAbi } from 'abitype';\nimport * as BlockOverrides from 'ox/BlockOverrides';\nimport { parseAccount, } from '../../accounts/utils/parseAccount.js';\nimport { multicall3Abi } from '../../constants/abis.js';\nimport { aggregate3Signature } from '../../constants/contract.js';\nimport { deploylessCallViaBytecodeBytecode, deploylessCallViaFactoryBytecode, multicall3Bytecode, } from '../../constants/contracts.js';\nimport { BaseError } from '../../errors/base.js';\nimport { ChainDoesNotSupportContract, ClientChainNotConfiguredError, } from '../../errors/chain.js';\nimport { CounterfactualDeploymentFailedError, RawContractError, } from '../../errors/contract.js';\nimport { getAbortError, isAbortError, } from '../../errors/utils.js';\nimport { decodeFunctionResult, } from '../../utils/abi/decodeFunctionResult.js';\nimport { encodeDeployData, } from '../../utils/abi/encodeDeployData.js';\nimport { encodeFunctionData, } from '../../utils/abi/encodeFunctionData.js';\nimport { isAddressEqual } from '../../utils/address/isAddressEqual.js';\nimport { formatBlockParameter, } from '../../utils/block/formatBlockParameter.js';\nimport { getChainContractAddress, } from '../../utils/chain/getChainContractAddress.js';\nimport { getCallError, } from '../../utils/errors/getCallError.js';\nimport { extract } from '../../utils/formatters/extract.js';\nimport { formatTransactionRequest, } from '../../utils/formatters/transactionRequest.js';\nimport { createBatchScheduler, } from '../../utils/promise/createBatchScheduler.js';\nimport { serializeStateOverride, } from '../../utils/stateOverride.js';\nimport { assertRequest } from '../../utils/transaction/assertRequest.js';\n/**\n * Executes a new message call immediately without submitting a transaction to the network.\n *\n * - Docs: https://viem.sh/docs/actions/public/call\n * - JSON-RPC Methods: [`eth_call`](https://ethereum.org/en/developers/docs/apis/json-rpc/#eth_call)\n *\n * @param client - Client to use\n * @param parameters - {@link CallParameters}\n * @returns The call data. {@link CallReturnType}\n *\n * @example\n * import { createPublicClient, http } from 'viem'\n * import { mainnet } from 'viem/chains'\n * import { call } from 'viem/public'\n *\n * const client = createPublicClient({\n * chain: mainnet,\n * transport: http(),\n * })\n * const data = await call(client, {\n * account: '0xf39fd6e51aad88f6f4ce6ab8827279cfffb92266',\n * data: '0xc02aaa39b223fe8d0a0e5c4f27ead9083c756cc2',\n * to: '0x70997970c51812dc3a010c7d01b50e0d17dc79c8',\n * })\n */\nexport async function call(client, args) {\n const { account: account_ = client.account, authorizationList, batch = Boolean(client.batch?.multicall), blockHash, blockNumber, blockTag = client.experimental_blockTag ?? 'latest', requireCanonical, accessList, blobs, blockOverrides, code, data: data_, factory, factoryData, gas, gasPrice, maxFeePerBlobGas, maxFeePerGas, maxPriorityFeePerGas, nonce, requestOptions, to, value, stateOverride, ...rest } = args;\n const account = account_ ? parseAccount(account_) : undefined;\n if (code && (factory || factoryData))\n throw new BaseError('Cannot provide both `code` & `factory`/`factoryData` as parameters.');\n if (code && to)\n throw new BaseError('Cannot provide both `code` & `to` as parameters.');\n // Check if the call is deployless via bytecode.\n const deploylessCallViaBytecode = code && data_;\n // Check if the call is deployless via a factory.\n const deploylessCallViaFactory = factory && factoryData && to && data_;\n const deploylessCall = deploylessCallViaBytecode || deploylessCallViaFactory;\n const data = (() => {\n if (deploylessCallViaBytecode)\n return toDeploylessCallViaBytecodeData({\n code,\n data: data_,\n });\n if (deploylessCallViaFactory)\n return toDeploylessCallViaFactoryData({\n data: data_,\n factory,\n factoryData,\n to,\n });\n return data_;\n })();\n try {\n assertRequest(args);\n const block = formatBlockParameter({\n blockHash,\n blockNumber,\n blockTag,\n requireCanonical,\n });\n const rpcBlockOverrides = blockOverrides\n ? BlockOverrides.toRpc(blockOverrides)\n : undefined;\n const rpcStateOverride = serializeStateOverride(stateOverride);\n const chainFormat = client.chain?.formatters?.transactionRequest?.format;\n const format = chainFormat || formatTransactionRequest;\n const request = format({\n // Pick out extra data that might exist on the chain's transaction request type.\n ...extract(rest, { format: chainFormat }),\n accessList,\n account,\n authorizationList,\n blobs,\n data,\n gas,\n gasPrice,\n maxFeePerBlobGas,\n maxFeePerGas,\n maxPriorityFeePerGas,\n nonce,\n to: deploylessCall ? undefined : to,\n value,\n }, 'call');\n if (batch &&\n shouldPerformMulticall({ request }) &&\n !rpcBlockOverrides &&\n blockHash === undefined) {\n try {\n const { deployless = false } = typeof client.batch?.multicall === 'object'\n ? client.batch.multicall\n : {};\n const multicallAddress = getMulticallAddress(client, {\n blockNumber,\n deployless,\n });\n if (!multicallAddress ||\n !hasStateOverrideForAddress(rpcStateOverride, multicallAddress))\n return await scheduleMulticall(client, {\n ...request,\n blockHash,\n blockNumber,\n blockTag,\n multicallAddress,\n requestOptions,\n requireCanonical,\n rpcStateOverride,\n });\n }\n catch (err) {\n if (!(err instanceof ClientChainNotConfiguredError) &&\n !(err instanceof ChainDoesNotSupportContract))\n throw err;\n }\n }\n const params = (() => {\n const base = [\n request,\n block,\n ];\n if (rpcStateOverride && rpcBlockOverrides)\n return [...base, rpcStateOverride, rpcBlockOverrides];\n if (rpcStateOverride)\n return [...base, rpcStateOverride];\n if (rpcBlockOverrides)\n return [...base, {}, rpcBlockOverrides];\n return base;\n })();\n const response = await client.request({\n method: 'eth_call',\n params,\n }, requestOptions);\n if (response === '0x')\n return { data: undefined };\n return { data: response };\n }\n catch (err) {\n if (requestOptions?.signal?.aborted)\n throw getAbortError(requestOptions.signal);\n if (isAbortError(err))\n throw err;\n const data = getRevertErrorData(err);\n // Check for CCIP-Read offchain lookup signature.\n const { offchainLookup, offchainLookupSignature } = await import('../../utils/ccip.js');\n if (client.ccipRead !== false &&\n data?.slice(0, 10) === offchainLookupSignature &&\n to)\n return {\n data: await offchainLookup(client, { data, requestOptions, to }),\n };\n // Check for counterfactual deployment error.\n if (deploylessCall && data?.slice(0, 10) === '0x101bb98d')\n throw new CounterfactualDeploymentFailedError({ factory });\n throw getCallError(err, {\n ...args,\n account,\n chain: client.chain,\n });\n }\n}\n// We only want to perform a scheduled multicall if:\n// - The request has calldata,\n// - The request has a target address,\n// - The target address is not already the aggregate3 signature,\n// - The request has no other properties (`nonce`, `gas`, etc cannot be sent with a multicall).\nfunction shouldPerformMulticall({ request }) {\n const { data, to, ...request_ } = request;\n if (!data)\n return false;\n if (data.startsWith(aggregate3Signature))\n return false;\n if (!to)\n return false;\n if (Object.values(request_).filter((x) => typeof x !== 'undefined').length > 0)\n return false;\n return true;\n}\nlet requestOptionsId = 0;\nconst requestOptionsIds = new WeakMap();\nfunction getRequestOptionsId(requestOptions) {\n if (!requestOptions)\n return 'default';\n const id = requestOptionsIds.get(requestOptions);\n if (id !== undefined)\n return id;\n const nextId = requestOptionsId++;\n requestOptionsIds.set(requestOptions, nextId);\n return nextId;\n}\nasync function scheduleMulticall(client, args) {\n const { batchSize = 1024, deployless = false, wait = 0, } = typeof client.batch?.multicall === 'object' ? client.batch.multicall : {};\n const { blockHash, blockNumber, blockTag = client.experimental_blockTag ?? 'latest', requireCanonical, data, multicallAddress: multicallAddress_, requestOptions, rpcStateOverride, to, } = args;\n const multicallAddress = multicallAddress_ !== undefined\n ? multicallAddress_\n : getMulticallAddress(client, {\n blockNumber,\n deployless,\n });\n const block = formatBlockParameter({\n blockHash,\n blockNumber,\n blockTag,\n requireCanonical,\n });\n const blockId = typeof block === 'string' ? block : JSON.stringify(block);\n const stateOverrideKey = rpcStateOverride\n ? `.${JSON.stringify(rpcStateOverride)}`\n : '';\n const { schedule } = createBatchScheduler({\n id: `${client.uid}.${blockId}.${getRequestOptionsId(requestOptions)}${stateOverrideKey}`,\n wait,\n shouldSplitBatch(args) {\n const size = args.reduce((size, { data }) => size + (data.length - 2), 0);\n return size > batchSize * 2;\n },\n fn: async (requests) => {\n const calls = requests.map((request) => ({\n allowFailure: true,\n callData: request.data,\n target: request.to,\n }));\n const calldata = encodeFunctionData({\n abi: multicall3Abi,\n args: [calls],\n functionName: 'aggregate3',\n });\n const multicallRequest = {\n ...(multicallAddress === null\n ? {\n data: toDeploylessCallViaBytecodeData({\n code: multicall3Bytecode,\n data: calldata,\n }),\n }\n : { to: multicallAddress, data: calldata }),\n };\n const data = await client.request({\n method: 'eth_call',\n params: rpcStateOverride\n ? [multicallRequest, block, rpcStateOverride]\n : [multicallRequest, block],\n }, requestOptions);\n return decodeFunctionResult({\n abi: multicall3Abi,\n args: [calls],\n functionName: 'aggregate3',\n data: data || '0x',\n });\n },\n });\n const [{ returnData, success }] = await schedule({ data, to });\n if (!success)\n throw new RawContractError({ data: returnData });\n if (returnData === '0x')\n return { data: undefined };\n return { data: returnData };\n}\nfunction getMulticallAddress(client, parameters) {\n const { blockNumber, deployless } = parameters;\n if (deployless)\n return null;\n if (client.chain)\n return getChainContractAddress({\n blockNumber,\n chain: client.chain,\n contract: 'multicall3',\n });\n throw new ClientChainNotConfiguredError();\n}\nfunction hasStateOverrideForAddress(rpcStateOverride, address) {\n if (!rpcStateOverride)\n return false;\n return Object.keys(rpcStateOverride).some((stateOverrideAddress) => isAddressEqual(stateOverrideAddress, address));\n}\nfunction toDeploylessCallViaBytecodeData(parameters) {\n const { code, data } = parameters;\n return encodeDeployData({\n abi: parseAbi(['constructor(bytes, bytes)']),\n bytecode: deploylessCallViaBytecodeBytecode,\n args: [code, data],\n });\n}\nfunction toDeploylessCallViaFactoryData(parameters) {\n const { data, factory, factoryData, to } = parameters;\n return encodeDeployData({\n abi: parseAbi(['constructor(address, bytes, address, bytes)']),\n bytecode: deploylessCallViaFactoryBytecode,\n args: [to, data, factory, factoryData],\n });\n}\n/** @internal */\nexport function getRevertErrorData(err) {\n if (!(err instanceof BaseError))\n return undefined;\n const error = err.walk();\n return typeof error?.data === 'object' ? error.data?.data : error.data;\n}\n//# sourceMappingURL=call.js.map","import { decodeFunctionResult, } from '../../utils/abi/decodeFunctionResult.js';\nimport { encodeFunctionData, } from '../../utils/abi/encodeFunctionData.js';\nimport { getContractError, } from '../../utils/errors/getContractError.js';\nimport { getAction } from '../../utils/getAction.js';\nimport { call } from './call.js';\n/**\n * Calls a read-only function on a contract, and returns the response.\n *\n * - Docs: https://viem.sh/docs/contract/readContract\n * - Examples: https://stackblitz.com/github/wevm/viem/tree/main/examples/contracts_reading-contracts\n *\n * A \"read-only\" function (constant function) on a Solidity contract is denoted by a `view` or `pure` keyword. They can only read the state of the contract, and cannot make any changes to it. Since read-only methods do not change the state of the contract, they do not require any gas to be executed, and can be called by any user without the need to pay for gas.\n *\n * Internally, uses a [Public Client](https://viem.sh/docs/clients/public) to call the [`call` action](https://viem.sh/docs/actions/public/call) with [ABI-encoded `data`](https://viem.sh/docs/contract/encodeFunctionData).\n *\n * @param client - Client to use\n * @param parameters - {@link ReadContractParameters}\n * @returns The response from the contract. Type is inferred. {@link ReadContractReturnType}\n *\n * @example\n * import { createPublicClient, http, parseAbi } from 'viem'\n * import { mainnet } from 'viem/chains'\n * import { readContract } from 'viem/contract'\n *\n * const client = createPublicClient({\n * chain: mainnet,\n * transport: http(),\n * })\n * const result = await readContract(client, {\n * address: '0xFBA3912Ca04dd458c843e2EE08967fC04f3579c2',\n * abi: parseAbi(['function balanceOf(address) view returns (uint256)']),\n * functionName: 'balanceOf',\n * args: ['0xA0Cf798816D4b9b9866b5330EEa46a18382f251e'],\n * })\n * // 424122n\n */\nexport async function readContract(client, parameters) {\n const { abi, address, args, functionName, ...rest } = parameters;\n const calldata = encodeFunctionData({\n abi,\n args,\n functionName,\n });\n try {\n const { data } = await getAction(client, call, 'call')({\n ...rest,\n data: calldata,\n to: address,\n });\n return decodeFunctionResult({\n abi,\n args,\n functionName,\n data: data || '0x',\n });\n }\n catch (error) {\n throw getContractError(error, {\n abi,\n address,\n args,\n docsPath: '/docs/contract/readContract',\n functionName,\n });\n }\n}\n//# sourceMappingURL=readContract.js.map","import { getAbortError } from '../errors/utils.js';\nexport async function wait(time, { signal } = {}) {\n return new Promise((resolve, reject) => {\n if (signal?.aborted) {\n reject(getAbortError(signal));\n return;\n }\n const cleanup = () => signal?.removeEventListener('abort', onAbort);\n const timeout = setTimeout(() => {\n cleanup();\n resolve();\n }, time);\n const onAbort = () => {\n clearTimeout(timeout);\n cleanup();\n reject(getAbortError(signal));\n };\n signal?.addEventListener('abort', onAbort, { once: true });\n });\n}\n//# sourceMappingURL=wait.js.map","/** @internal */\nexport const promiseCache = /*#__PURE__*/ new Map();\n/** @internal */\nexport const responseCache = /*#__PURE__*/ new Map();\nexport function getCache(cacheKey) {\n const buildCache = (cacheKey, cache) => ({\n clear: () => cache.delete(cacheKey),\n get: () => cache.get(cacheKey),\n set: (data) => cache.set(cacheKey, data),\n });\n const promise = buildCache(cacheKey, promiseCache);\n const response = buildCache(cacheKey, responseCache);\n return {\n clear: () => {\n promise.clear();\n response.clear();\n },\n promise,\n response,\n };\n}\n/**\n * @description Returns the result of a given promise, and caches the result for\n * subsequent invocations against a provided cache key.\n */\nexport async function withCache(fn, { cacheKey, cacheTime = Number.POSITIVE_INFINITY }) {\n const cache = getCache(cacheKey);\n // If a response exists in the cache, and it's not expired, return it\n // and do not invoke the promise.\n // If the max age is 0, the cache is disabled.\n const response = cache.response.get();\n if (response && cacheTime > 0) {\n const age = Date.now() - response.created.getTime();\n if (age < cacheTime)\n return response.data;\n }\n let promise = cache.promise.get();\n if (!promise) {\n promise = fn();\n // Store the promise in the cache so that subsequent invocations\n // will wait for the same promise to resolve (deduping).\n cache.promise.set(promise);\n }\n try {\n const data = await promise;\n // Store the response in the cache so that subsequent invocations\n // will return the same response.\n cache.response.set({ created: new Date(), data });\n return data;\n }\n finally {\n // Clear the promise cache so that subsequent invocations will\n // invoke the promise again.\n cache.promise.clear();\n }\n}\n//# sourceMappingURL=withCache.js.map","import { getCache, withCache, } from '../../utils/promise/withCache.js';\nconst cacheKey = (id) => `blockNumber.${id}`;\n/** @internal */\nexport function getBlockNumberCache(id) {\n return getCache(cacheKey(id));\n}\n/**\n * Returns the number of the most recent block seen.\n *\n * - Docs: https://viem.sh/docs/actions/public/getBlockNumber\n * - Examples: https://stackblitz.com/github/wevm/viem/tree/main/examples/blocks_fetching-blocks\n * - JSON-RPC Methods: [`eth_blockNumber`](https://ethereum.org/en/developers/docs/apis/json-rpc/#eth_blocknumber)\n *\n * @param client - Client to use\n * @param parameters - {@link GetBlockNumberParameters}\n * @returns The number of the block. {@link GetBlockNumberReturnType}\n *\n * @example\n * import { createPublicClient, http } from 'viem'\n * import { mainnet } from 'viem/chains'\n * import { getBlockNumber } from 'viem/public'\n *\n * const client = createPublicClient({\n * chain: mainnet,\n * transport: http(),\n * })\n * const blockNumber = await getBlockNumber(client)\n * // 69420n\n */\nexport async function getBlockNumber(client, { cacheTime = client.cacheTime } = {}) {\n const blockNumberHex = await withCache(() => client.request({\n method: 'eth_blockNumber',\n }), { cacheKey: cacheKey(client.uid), cacheTime });\n return BigInt(blockNumberHex);\n}\n//# sourceMappingURL=getBlockNumber.js.map","import { getAbortError, isAbortError, } from '../../errors/utils.js';\nimport { wait } from '../wait.js';\nexport function withRetry(fn, { delay: delay_ = 100, retryCount = 2, shouldRetry = () => true, signal, } = {}) {\n return new Promise((resolve, reject) => {\n const attemptRetry = async ({ count = 0 } = {}) => {\n if (signal?.aborted) {\n reject(getAbortError(signal));\n return;\n }\n const retry = async ({ error }) => {\n const delay = typeof delay_ === 'function' ? delay_({ count, error }) : delay_;\n if (delay) {\n try {\n await wait(delay, { signal });\n }\n catch (err) {\n reject(err);\n return;\n }\n }\n return attemptRetry({ count: count + 1 });\n };\n try {\n const data = await fn();\n resolve(data);\n }\n catch (err) {\n if (signal?.aborted) {\n reject(getAbortError(signal));\n return;\n }\n if (isAbortError(err)) {\n reject(err);\n return;\n }\n if (count < retryCount &&\n (await shouldRetry({ count, error: err })))\n return retry({ error: err });\n reject(err);\n }\n };\n void attemptRetry().catch(reject);\n });\n}\n//# sourceMappingURL=withRetry.js.map","const size = 256;\nlet index = size;\nlet buffer;\nexport function uid(length = 11) {\n if (!buffer || index + length > size * 2) {\n buffer = '';\n index = 0;\n for (let i = 0; i < size; i++) {\n buffer += ((256 + Math.random() * 256) | 0).toString(16).substring(1);\n }\n }\n return buffer.substring(index, index++ + length);\n}\n//# sourceMappingURL=uid.js.map","import { parseAccount, } from '../accounts/utils/parseAccount.js';\nimport { uid } from '../utils/uid.js';\nexport function createClient(parameters) {\n const { batch, chain, ccipRead, dataSuffix, key = 'base', name = 'Base Client', tokens, type = 'base', } = parameters;\n const experimental_blockTag = parameters.experimental_blockTag ??\n (typeof chain?.experimental_preconfirmationTime === 'number'\n ? 'pending'\n : undefined);\n const blockTime = chain?.blockTime ?? 12_000;\n const defaultPollingInterval = Math.min(Math.max(Math.floor(blockTime / 2), 500), 4_000);\n const pollingInterval = parameters.pollingInterval ?? defaultPollingInterval;\n const cacheTime = parameters.cacheTime ?? pollingInterval;\n const account = parameters.account\n ? parseAccount(parameters.account)\n : undefined;\n const { config, request, value } = parameters.transport({\n account,\n chain,\n pollingInterval,\n });\n const transport = { ...config, ...value };\n const client = {\n account,\n batch,\n cacheTime,\n ccipRead,\n chain,\n dataSuffix,\n key,\n name,\n pollingInterval,\n request,\n tokens,\n transport,\n type,\n uid: uid(),\n ...(experimental_blockTag ? { experimental_blockTag } : {}),\n };\n function extend(base) {\n return (extendFn) => {\n const extended = extendFn(base);\n for (const key in client)\n delete extended[key];\n const combined = { ...base, ...extended };\n // For keys that exist on both the base client and the extension and\n // resolve to plain objects (e.g. namespaces like `token`), shallow-merge\n // their members instead of overwriting. This lets decorators contribute\n // to the same namespace (e.g. `publicActions` adds read actions and\n // `walletActions` adds write actions to `client.token`).\n for (const key in extended) {\n const a = base[key];\n const b = extended[key];\n if (isPlainObject(a) && isPlainObject(b))\n combined[key] = { ...a, ...b };\n }\n return Object.assign(combined, { extend: extend(combined) });\n };\n }\n return Object.assign(client, { extend: extend(client) });\n}\n/** Whether `value` is a plain object (`{}`), as opposed to a function, array,\n * or class instance. Used to decide which extension namespaces to merge. */\nfunction isPlainObject(value) {\n if (typeof value !== 'object' || value === null)\n return false;\n const prototype = Object.getPrototypeOf(value);\n return prototype === Object.prototype || prototype === null;\n}\n/**\n * Binds an action function to a `client`, returning a parameter-only version\n * along with any helpers the action exposes. Helpers that need a client\n * (`.call`, `.calls`, `.callWithPeriod`, `.estimateGas`, `.prepare`,\n * `.prepareRecipient`, `.predict`, `.simulate`) are bound to `client`;\n * pure helpers (`.extractEvent`, `.extractEvents`) are copied as-is. Used\n * by decorators that attach namespaced actions to a Client.\n * @internal\n */\nexport function bindActionDecorators(client, action) {\n const wrapped = (parameters = {}) => action(client, parameters);\n for (const key of [\n 'call',\n 'calls',\n 'callWithPeriod',\n 'estimateGas',\n 'prepare',\n 'prepareRecipient',\n 'predict',\n 'simulate',\n ])\n if (Object.hasOwn(action, key)) {\n const helper = action[key];\n wrapped[key] = (args = {}) => {\n // Single-parameter helpers are client-less (e.g. `dex.buy.call(args)`).\n // Everything else is called with `(client, args)`: two-parameter\n // helpers, rest-parameter helpers that accept `(client, args)` or\n // `(args)` (`length === 0`, e.g. `token.transfer.call`), and\n // zero-argument helpers, which ignore the extra arguments.\n if (helper.length === 1)\n return helper(args);\n return helper(client, args);\n };\n }\n for (const key of ['extractEvent', 'extractEvents'])\n if (Object.hasOwn(action, key))\n wrapped[key] = action[key];\n return wrapped;\n}\n/**\n * Defines a typed JSON-RPC schema for the client.\n * Note: This is a runtime noop function.\n */\nexport function rpcSchema() {\n return null;\n}\n//# sourceMappingURL=createClient.js.map","import { AbiFunctionSignatureNotFoundError } from '../../errors/abi.js';\nimport { slice } from '../data/slice.js';\nimport { toFunctionSelector, } from '../hash/toFunctionSelector.js';\nimport { decodeAbiParameters, } from './decodeAbiParameters.js';\nimport { formatAbiItem } from './formatAbiItem.js';\nexport function decodeFunctionData(parameters) {\n const { abi, data } = parameters;\n const signature = slice(data, 0, 4);\n const description = abi.find((x) => x.type === 'function' &&\n signature === toFunctionSelector(formatAbiItem(x)));\n if (!description)\n throw new AbiFunctionSignatureNotFoundError(signature, {\n docsPath: '/docs/contract/decodeFunctionData',\n });\n return {\n functionName: description.name,\n args: ('inputs' in description &&\n description.inputs &&\n description.inputs.length > 0\n ? decodeAbiParameters(description.inputs, slice(data, 4))\n : undefined),\n };\n}\n//# sourceMappingURL=decodeFunctionData.js.map","import { AbiErrorInputsNotFoundError, AbiErrorNotFoundError, } from '../../errors/abi.js';\nimport { concatHex } from '../data/concat.js';\nimport { toFunctionSelector, } from '../hash/toFunctionSelector.js';\nimport { encodeAbiParameters, } from './encodeAbiParameters.js';\nimport { formatAbiItem } from './formatAbiItem.js';\nimport { getAbiItem } from './getAbiItem.js';\nconst docsPath = '/docs/contract/encodeErrorResult';\nexport function encodeErrorResult(parameters) {\n const { abi, errorName, args } = parameters;\n let abiItem = abi[0];\n if (errorName) {\n const item = getAbiItem({ abi, args, name: errorName });\n if (!item)\n throw new AbiErrorNotFoundError(errorName, { docsPath });\n abiItem = item;\n }\n if (abiItem.type !== 'error')\n throw new AbiErrorNotFoundError(undefined, { docsPath });\n const definition = formatAbiItem(abiItem);\n const signature = toFunctionSelector(definition);\n let data = '0x';\n if (args && args.length > 0) {\n if (!abiItem.inputs)\n throw new AbiErrorInputsNotFoundError(abiItem.name, { docsPath });\n data = encodeAbiParameters(abiItem.inputs, args);\n }\n return concatHex([signature, data]);\n}\n//# sourceMappingURL=encodeErrorResult.js.map","import { AbiFunctionNotFoundError, AbiFunctionOutputsNotFoundError, InvalidArrayError, } from '../../errors/abi.js';\nimport { encodeAbiParameters, } from './encodeAbiParameters.js';\nimport { getAbiItem } from './getAbiItem.js';\nconst docsPath = '/docs/contract/encodeFunctionResult';\nexport function encodeFunctionResult(parameters) {\n const { abi, functionName, result } = parameters;\n let abiItem = abi[0];\n if (functionName) {\n const item = getAbiItem({ abi, name: functionName });\n if (!item)\n throw new AbiFunctionNotFoundError(functionName, { docsPath });\n abiItem = item;\n }\n if (abiItem.type !== 'function')\n throw new AbiFunctionNotFoundError(undefined, { docsPath });\n if (!abiItem.outputs)\n throw new AbiFunctionOutputsNotFoundError(abiItem.name, { docsPath });\n const values = (() => {\n if (abiItem.outputs.length === 0)\n return [];\n if (abiItem.outputs.length === 1)\n return [result];\n if (Array.isArray(result))\n return result;\n throw new InvalidArrayError(result);\n })();\n return encodeAbiParameters(abiItem.outputs, values);\n}\n//# sourceMappingURL=encodeFunctionResult.js.map","import { batchGatewayAbi } from '../../constants/abis.js';\nimport { solidityError } from '../../constants/solidity.js';\nimport { decodeFunctionData } from '../abi/decodeFunctionData.js';\nimport { encodeErrorResult } from '../abi/encodeErrorResult.js';\nimport { encodeFunctionResult } from '../abi/encodeFunctionResult.js';\nexport const localBatchGatewayUrl = 'x-batch-gateway:true';\nexport async function localBatchGatewayRequest(parameters) {\n const { data, ccipRequest } = parameters;\n const { args: [queries], } = decodeFunctionData({ abi: batchGatewayAbi, data });\n const failures = [];\n const responses = [];\n await Promise.all(queries.map(async (query, i) => {\n try {\n responses[i] = query.urls.includes(localBatchGatewayUrl)\n ? await localBatchGatewayRequest({ data: query.data, ccipRequest })\n : await ccipRequest(query);\n failures[i] = false;\n }\n catch (err) {\n failures[i] = true;\n responses[i] = encodeError(err);\n }\n }));\n return encodeFunctionResult({\n abi: batchGatewayAbi,\n functionName: 'query',\n result: [failures, responses],\n });\n}\nfunction encodeError(error) {\n if (error.name === 'HttpRequestError' && error.status)\n return encodeErrorResult({\n abi: batchGatewayAbi,\n errorName: 'HttpError',\n args: [error.status, error.shortMessage],\n });\n return encodeErrorResult({\n abi: [solidityError],\n errorName: 'Error',\n args: ['shortMessage' in error ? error.shortMessage : error.message],\n });\n}\n//# sourceMappingURL=localBatchGatewayRequest.js.map","import { LruMap } from '../lru.js';\n/** @internal */\nexport const promiseCache = /*#__PURE__*/ new LruMap(8192);\n/** Deduplicates in-flight promises. */\nexport function withDedupe(fn, { enabled = true, id }) {\n if (!enabled || !id)\n return fn();\n if (promiseCache.get(id))\n return promiseCache.get(id);\n const promise = fn().finally(() => promiseCache.delete(id));\n promiseCache.set(id, promise);\n return promise;\n}\n//# sourceMappingURL=withDedupe.js.map","import { BaseError } from '../errors/base.js';\nimport { HttpRequestError, } from '../errors/request.js';\nimport { AtomicityNotSupportedError, AtomicReadyWalletRejectedUpgradeError, BundleTooLargeError, ChainDisconnectedError, DuplicateIdError, InternalRpcError, InvalidInputRpcError, InvalidParamsRpcError, InvalidRequestRpcError, JsonRpcVersionUnsupportedError, LimitExceededRpcError, MethodNotFoundRpcError, MethodNotSupportedRpcError, ParseRpcError, ProviderDisconnectedError, ResourceNotFoundRpcError, ResourceUnavailableRpcError, SwitchChainError, TransactionRejectedRpcError, UnauthorizedProviderError, UnknownBundleIdError, UnknownRpcError, UnsupportedChainIdError, UnsupportedNonOptionalCapabilityError, UnsupportedProviderMethodError, UserRejectedRequestError, WalletConnectSessionSettlementError, } from '../errors/rpc.js';\nimport { getAbortError, isAbortError, } from '../errors/utils.js';\nimport { withDedupe } from './promise/withDedupe.js';\nimport { withRetry } from './promise/withRetry.js';\nimport { stringify } from './stringify.js';\nexport function buildRequest(request, options = {}) {\n return async (args, overrideOptions = {}) => {\n const { dedupe = false, methods, retryDelay = 150, retryCount = 3, signal, uid, } = {\n ...options,\n ...overrideOptions,\n };\n const { method } = args;\n if (methods?.exclude?.includes(method))\n throw new MethodNotSupportedRpcError(new Error('method not supported'), {\n method,\n });\n if (methods?.include && !methods.include.includes(method))\n throw new MethodNotSupportedRpcError(new Error('method not supported'), {\n method,\n });\n if (signal?.aborted)\n throw getAbortError(signal);\n const requestId = dedupe\n ? hashString(`${uid}.${stringify(args)}`)\n : undefined;\n return withDedupe(() => withRetry(async () => {\n try {\n return await request(args, signal ? { signal } : undefined);\n }\n catch (err_) {\n if (signal?.aborted)\n throw getAbortError(signal);\n if (isAbortError(err_))\n throw err_;\n const err = err_;\n switch (err.code) {\n // -32700\n case ParseRpcError.code:\n throw new ParseRpcError(err);\n // -32600\n case InvalidRequestRpcError.code:\n throw new InvalidRequestRpcError(err);\n // -32601\n case MethodNotFoundRpcError.code:\n throw new MethodNotFoundRpcError(err, { method: args.method });\n // -32602\n case InvalidParamsRpcError.code:\n throw new InvalidParamsRpcError(err);\n // -32603\n case InternalRpcError.code:\n throw new InternalRpcError(err);\n // -32000\n case InvalidInputRpcError.code:\n throw new InvalidInputRpcError(err);\n // -32001\n case ResourceNotFoundRpcError.code:\n throw new ResourceNotFoundRpcError(err);\n // -32002\n case ResourceUnavailableRpcError.code:\n throw new ResourceUnavailableRpcError(err);\n // -32003\n case TransactionRejectedRpcError.code:\n throw new TransactionRejectedRpcError(err);\n // -32004\n case MethodNotSupportedRpcError.code:\n throw new MethodNotSupportedRpcError(err, {\n method: args.method,\n });\n // -32005\n case LimitExceededRpcError.code:\n throw new LimitExceededRpcError(err);\n // -32006\n case JsonRpcVersionUnsupportedError.code:\n throw new JsonRpcVersionUnsupportedError(err);\n // 4001\n case UserRejectedRequestError.code:\n throw new UserRejectedRequestError(err);\n // 4100\n case UnauthorizedProviderError.code:\n throw new UnauthorizedProviderError(err);\n // 4200\n case UnsupportedProviderMethodError.code:\n throw new UnsupportedProviderMethodError(err);\n // 4900\n case ProviderDisconnectedError.code:\n throw new ProviderDisconnectedError(err);\n // 4901\n case ChainDisconnectedError.code:\n throw new ChainDisconnectedError(err);\n // 4902\n case SwitchChainError.code:\n throw new SwitchChainError(err);\n // 5700\n case UnsupportedNonOptionalCapabilityError.code:\n throw new UnsupportedNonOptionalCapabilityError(err);\n // 5710\n case UnsupportedChainIdError.code:\n throw new UnsupportedChainIdError(err);\n // 5720\n case DuplicateIdError.code:\n throw new DuplicateIdError(err);\n // 5730\n case UnknownBundleIdError.code:\n throw new UnknownBundleIdError(err);\n // 5740\n case BundleTooLargeError.code:\n throw new BundleTooLargeError(err);\n // 5750\n case AtomicReadyWalletRejectedUpgradeError.code:\n throw new AtomicReadyWalletRejectedUpgradeError(err);\n // 5760\n case AtomicityNotSupportedError.code:\n throw new AtomicityNotSupportedError(err);\n // CAIP-25: User Rejected Error\n // https://docs.walletconnect.com/2.0/specs/clients/sign/error-codes#rejected-caip-25\n case 5000:\n throw new UserRejectedRequestError(err);\n // WalletConnect: Session Settlement Failed\n // https://docs.walletconnect.com/2.0/specs/clients/sign/error-codes\n case WalletConnectSessionSettlementError.code:\n throw new WalletConnectSessionSettlementError(err);\n default:\n if (err_ instanceof BaseError)\n throw err_;\n throw new UnknownRpcError(err);\n }\n }\n }, {\n delay: ({ count, error }) => {\n // If we find a Retry-After header, let's retry after the given time.\n if (error && error instanceof HttpRequestError) {\n const retryAfter = error?.headers?.get('Retry-After');\n if (retryAfter?.match(/\\d/))\n return Number.parseInt(retryAfter, 10) * 1000;\n }\n // Otherwise, let's retry with an exponential backoff.\n return ~~(1 << count) * retryDelay;\n },\n retryCount,\n signal,\n shouldRetry: ({ error }) => shouldRetry(error),\n }), { enabled: dedupe, id: requestId });\n };\n}\n/** @internal */\nexport function shouldRetry(error) {\n if (isAbortError(error))\n return false;\n if ('code' in error && typeof error.code === 'number') {\n if (error.code === -1)\n return true; // Unknown error\n if (error.code === LimitExceededRpcError.code)\n return true;\n if (error.code === InternalRpcError.code)\n return true;\n // Too Many Requests — some providers (e.g. Alchemy in batch mode) return\n // HTTP 200 with a JSON-RPC body of `{ code: 429 }` instead of an HTTP 429,\n // so we need to handle this code in addition to the HTTP status check below.\n if (error.code === 429)\n return true;\n return false;\n }\n if (error instanceof HttpRequestError && error.status) {\n // Forbidden\n if (error.status === 403)\n return true;\n // Request Timeout\n if (error.status === 408)\n return true;\n // Request Entity Too Large\n if (error.status === 413)\n return true;\n // Too Many Requests\n if (error.status === 429)\n return true;\n // Internal Server Error\n if (error.status === 500)\n return true;\n // Bad Gateway\n if (error.status === 502)\n return true;\n // Service Unavailable\n if (error.status === 503)\n return true;\n // Gateway Timeout\n if (error.status === 504)\n return true;\n return false;\n }\n return true;\n}\n/** @internal cyrb53 – fast, non-cryptographic 53-bit string hash */\nfunction hashString(str, seed = 0) {\n let h1 = 0xdeadbeef ^ seed;\n let h2 = 0x41c6ce57 ^ seed;\n for (let i = 0; i < str.length; i++) {\n const ch = str.charCodeAt(i);\n h1 = Math.imul(h1 ^ ch, 2654435761);\n h2 = Math.imul(h2 ^ ch, 1597334677);\n }\n h1 = Math.imul(h1 ^ (h1 >>> 16), 2246822507);\n h1 ^= Math.imul(h2 ^ (h2 >>> 16), 3266489909);\n h2 = Math.imul(h2 ^ (h2 >>> 16), 2246822507);\n h2 ^= Math.imul(h1 ^ (h1 >>> 16), 3266489909);\n return (4294967296 * (2097151 & h2) + (h1 >>> 0)).toString(36);\n}\n//# sourceMappingURL=buildRequest.js.map","import { stringify } from '../utils/stringify.js';\nimport { BaseError } from './base.js';\nimport { getUrl } from './utils.js';\nexport class OffchainLookupError extends BaseError {\n constructor({ callbackSelector, cause, data, extraData, sender, urls, }) {\n super(cause.shortMessage ||\n 'An error occurred while fetching for an offchain result.', {\n cause,\n metaMessages: [\n ...(cause.metaMessages || []),\n cause.metaMessages?.length ? '' : [],\n 'Offchain Gateway Call:',\n urls && [\n ' Gateway URL(s):',\n ...urls.map((url) => ` ${getUrl(url)}`),\n ],\n ` Sender: ${sender}`,\n ` Data: ${data}`,\n ` Callback selector: ${callbackSelector}`,\n ` Extra data: ${extraData}`,\n ].flat(),\n name: 'OffchainLookupError',\n });\n }\n}\nexport class OffchainLookupResponseMalformedError extends BaseError {\n constructor({ result, url }) {\n super('Offchain gateway response is malformed. Response data must be a hex value.', {\n metaMessages: [\n `Gateway URL: ${getUrl(url)}`,\n `Response: ${stringify(result)}`,\n ],\n name: 'OffchainLookupResponseMalformedError',\n });\n }\n}\nexport class OffchainLookupSenderMismatchError extends BaseError {\n constructor({ sender, to }) {\n super('Reverted sender address does not match target contract address (`to`).', {\n metaMessages: [\n `Contract address: ${to}`,\n `OffchainLookup sender address: ${sender}`,\n ],\n name: 'OffchainLookupSenderMismatchError',\n });\n }\n}\n//# sourceMappingURL=ccip.js.map","import { call } from '../actions/public/call.js';\nimport { OffchainLookupError, OffchainLookupResponseMalformedError, OffchainLookupSenderMismatchError, } from '../errors/ccip.js';\nimport { HttpRequestError, } from '../errors/request.js';\nimport { getAbortError, isAbortError } from '../errors/utils.js';\nimport { decodeErrorResult } from './abi/decodeErrorResult.js';\nimport { encodeAbiParameters } from './abi/encodeAbiParameters.js';\nimport { isAddressEqual } from './address/isAddressEqual.js';\nimport { concat } from './data/concat.js';\nimport { isHex } from './data/isHex.js';\nimport { localBatchGatewayRequest, localBatchGatewayUrl, } from './ens/localBatchGatewayRequest.js';\nimport { stringify } from './stringify.js';\nexport const offchainLookupSignature = '0x556f1830';\nexport const offchainLookupAbiItem = {\n name: 'OffchainLookup',\n type: 'error',\n inputs: [\n {\n name: 'sender',\n type: 'address',\n },\n {\n name: 'urls',\n type: 'string[]',\n },\n {\n name: 'callData',\n type: 'bytes',\n },\n {\n name: 'callbackFunction',\n type: 'bytes4',\n },\n {\n name: 'extraData',\n type: 'bytes',\n },\n ],\n};\nexport async function offchainLookup(client, { blockNumber, blockTag, data, requestOptions, to, }) {\n const { args } = decodeErrorResult({\n data,\n abi: [offchainLookupAbiItem],\n });\n const [sender, urls, callData, callbackSelector, extraData] = args;\n const { ccipRead } = client;\n const ccipRequest_ = ccipRead && typeof ccipRead?.request === 'function'\n ? ccipRead.request\n : ccipRequest;\n try {\n if (!isAddressEqual(to, sender))\n throw new OffchainLookupSenderMismatchError({ sender, to });\n const result = urls.includes(localBatchGatewayUrl)\n ? await localBatchGatewayRequest({\n data: callData,\n ccipRequest: (parameters) => ccipRequest_({ ...parameters, requestOptions }),\n })\n : await ccipRequest_({ data: callData, requestOptions, sender, urls });\n const { data: data_ } = await call(client, {\n blockNumber,\n blockTag,\n data: concat([\n callbackSelector,\n encodeAbiParameters([{ type: 'bytes' }, { type: 'bytes' }], [result, extraData]),\n ]),\n requestOptions,\n to,\n });\n return data_;\n }\n catch (err) {\n if (requestOptions?.signal?.aborted)\n throw getAbortError(requestOptions.signal);\n if (isAbortError(err))\n throw err;\n throw new OffchainLookupError({\n callbackSelector,\n cause: err,\n data,\n extraData,\n sender,\n urls,\n });\n }\n}\nexport async function ccipRequest({ data, requestOptions, sender, urls, }) {\n let error = new Error('An unknown error occurred.');\n for (let i = 0; i < urls.length; i++) {\n if (requestOptions?.signal?.aborted)\n throw getAbortError(requestOptions.signal);\n const url = urls[i];\n const method = url.includes('{data}') ? 'GET' : 'POST';\n const body = method === 'POST' ? { data, sender } : undefined;\n const headers = method === 'POST' ? { 'Content-Type': 'application/json' } : {};\n try {\n const response = await fetch(url.replace('{sender}', sender.toLowerCase()).replace('{data}', data), {\n body: JSON.stringify(body),\n headers,\n method,\n ...(requestOptions?.signal ? { signal: requestOptions.signal } : {}),\n });\n let result;\n if (response.headers.get('Content-Type')?.startsWith('application/json')) {\n result = (await response.json()).data;\n }\n else {\n result = (await response.text());\n }\n if (!response.ok) {\n error = new HttpRequestError({\n body,\n details: result?.error\n ? stringify(result.error)\n : response.statusText,\n headers: response.headers,\n status: response.status,\n url,\n });\n continue;\n }\n if (!isHex(result)) {\n error = new OffchainLookupResponseMalformedError({\n result,\n url,\n });\n continue;\n }\n return result;\n }\n catch (err) {\n if (requestOptions?.signal?.aborted)\n throw getAbortError(requestOptions.signal);\n if (isAbortError(err))\n throw err;\n error = new HttpRequestError({\n body,\n details: err.message,\n url,\n });\n }\n }\n throw error;\n}\n//# sourceMappingURL=ccip.js.map","import { isAbortError } from '../../errors/utils.js';\nexport function withTimeout(fn, { errorInstance = new Error('timed out'), timeout, signal, }) {\n return new Promise((resolve, reject) => {\n ;\n (async () => {\n let timeoutId;\n const controller = new AbortController();\n try {\n if (timeout > 0) {\n timeoutId = setTimeout(() => {\n if (signal) {\n controller.abort();\n }\n else {\n reject(errorInstance);\n }\n }, timeout); // need to cast because bun globals.d.ts overrides @types/node\n }\n resolve(await fn({ signal: controller?.signal || null }));\n }\n catch (err) {\n if (controller?.signal.aborted && isAbortError(err)) {\n reject(errorInstance);\n return;\n }\n reject(err);\n }\n finally {\n clearTimeout(timeoutId);\n }\n })();\n });\n}\n//# sourceMappingURL=withTimeout.js.map","function createIdStore() {\n return {\n current: 0,\n take() {\n return this.current++;\n },\n reset() {\n this.current = 0;\n },\n };\n}\nexport const idCache = /*#__PURE__*/ createIdStore();\n//# sourceMappingURL=id.js.map","import { HttpRequestError, ResponseBodyTooLargeError, TimeoutError, } from '../../errors/request.js';\nimport { getAbortError, isAbortError, } from '../../errors/utils.js';\nimport { withTimeout, } from '../promise/withTimeout.js';\nimport { stringify } from '../stringify.js';\nimport { idCache } from './id.js';\nconst defaultMaxResponseBodySize = 10_485_760;\nexport function getHttpRpcClient(url_, options = {}) {\n const { url, headers: headers_url } = parseUrl(url_);\n return {\n async request(params) {\n const { body, fetchFn = options.fetchFn ?? fetch, maxResponseBodySize = options.maxResponseBodySize ??\n defaultMaxResponseBodySize, onRequest = options.onRequest, onResponse = options.onResponse, timeout = options.timeout ?? 10_000, } = params;\n const fetchOptions = {\n ...(options.fetchOptions ?? {}),\n ...(params.fetchOptions ?? {}),\n };\n const { headers, method, signal: signal_ } = fetchOptions;\n try {\n const response = await withTimeout(async ({ signal }) => {\n const init = {\n ...fetchOptions,\n body: Array.isArray(body)\n ? stringify(body.map((body) => ({\n jsonrpc: '2.0',\n id: body.id ?? idCache.take(),\n ...body,\n })))\n : stringify({\n jsonrpc: '2.0',\n id: body.id ?? idCache.take(),\n ...body,\n }),\n headers: {\n ...headers_url,\n 'Content-Type': 'application/json',\n ...headers,\n },\n method: method || 'POST',\n signal: signal_ || (timeout > 0 ? signal : null),\n };\n const request = new Request(url, init);\n const args = (await onRequest?.(request, init)) ?? { ...init, url };\n const response = await fetchFn(args.url ?? url, args);\n return response;\n }, {\n errorInstance: new TimeoutError({ body, url }),\n timeout,\n signal: true,\n });\n if (onResponse)\n await onResponse(response);\n let data;\n const responseBody = await readResponseBody(response, {\n maxResponseBodySize,\n });\n if (response.headers.get('Content-Type')?.startsWith('application/json'))\n data = JSON.parse(responseBody);\n else {\n data = responseBody;\n try {\n data = JSON.parse(data || '{}');\n }\n catch (err) {\n if (response.ok)\n throw err;\n data = { error: data };\n }\n }\n if (!response.ok) {\n // If the response body contains a valid JSON-RPC error, return it\n // so it flows through the normal RPC error handling pipeline.\n if (typeof data.error?.code === 'number' &&\n typeof data.error?.message === 'string')\n return data;\n throw new HttpRequestError({\n body,\n details: stringify(data.error) || response.statusText,\n headers: response.headers,\n status: response.status,\n url,\n });\n }\n return data;\n }\n catch (err) {\n if (signal_?.aborted)\n throw getAbortError(signal_);\n if (isAbortError(err))\n throw err;\n if (err instanceof HttpRequestError)\n throw err;\n if (err instanceof ResponseBodyTooLargeError)\n throw err;\n if (err instanceof TimeoutError)\n throw err;\n throw new HttpRequestError({\n body,\n cause: err,\n url,\n });\n }\n },\n };\n}\nasync function readResponseBody(response, { maxResponseBodySize }) {\n if (maxResponseBodySize === false)\n return response.text();\n const contentLength = response.headers.get('Content-Length');\n if (contentLength) {\n const size = Number(contentLength);\n if (size > maxResponseBodySize)\n throw new ResponseBodyTooLargeError({\n maxSize: maxResponseBodySize,\n size,\n });\n }\n if (!response.body) {\n const body = await response.text();\n const size = new TextEncoder().encode(body).length;\n if (size > maxResponseBodySize)\n throw new ResponseBodyTooLargeError({\n maxSize: maxResponseBodySize,\n size,\n });\n return body;\n }\n const reader = response.body.getReader();\n const decoder = new TextDecoder();\n let body = '';\n let size = 0;\n try {\n while (true) {\n const { done, value } = await reader.read();\n if (done)\n break;\n size += value.byteLength;\n if (size > maxResponseBodySize) {\n await reader.cancel();\n throw new ResponseBodyTooLargeError({\n maxSize: maxResponseBodySize,\n size,\n });\n }\n body += decoder.decode(value, { stream: true });\n }\n body += decoder.decode();\n return body;\n }\n finally {\n reader.releaseLock();\n }\n}\n/** @internal */\nexport function parseUrl(url_) {\n try {\n const url = new URL(url_);\n const result = (() => {\n // Handle Basic authentication credentials\n if (url.username) {\n const credentials = `${decodeURIComponent(url.username)}:${decodeURIComponent(url.password)}`;\n url.username = '';\n url.password = '';\n return {\n url: url.toString(),\n headers: { Authorization: `Basic ${btoa(credentials)}` },\n };\n }\n return;\n })();\n return { url: url.toString(), ...result };\n }\n catch {\n return { url: url_ };\n }\n}\n//# sourceMappingURL=http.js.map","export const ethAddress = '0xeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeee';\nexport const zeroAddress = '0x0000000000000000000000000000000000000000';\n//# sourceMappingURL=address.js.map","import { buildRequest } from '../../utils/buildRequest.js';\nimport { uid as uid_ } from '../../utils/uid.js';\n/**\n * @description Creates an transport intended to be used with a client.\n */\nexport function createTransport({ key, methods, name, request, retryCount = 3, retryDelay = 150, timeout, type, }, value) {\n const uid = uid_();\n return {\n config: {\n key,\n methods,\n name,\n request,\n retryCount,\n retryDelay,\n timeout,\n type,\n },\n request: buildRequest(request, { methods, retryCount, retryDelay, uid }),\n value,\n };\n}\n//# sourceMappingURL=createTransport.js.map","import { ExecutionRevertedError } from '../../errors/node.js';\nimport { TransactionRejectedRpcError, UserRejectedRequestError, WalletConnectSessionSettlementError, } from '../../errors/rpc.js';\nimport { wait } from '../../utils/wait.js';\nimport { createTransport, } from './createTransport.js';\nexport function fallback(transports_, config = {}) {\n const { key = 'fallback', name = 'Fallback', rank = false, shouldThrow: shouldThrow_ = shouldThrow, retryCount, retryDelay, } = config;\n return (({ chain, pollingInterval = 4_000, timeout, ...rest }) => {\n let transports = transports_;\n let onResponse = () => { };\n const transport = createTransport({\n key,\n name,\n async request({ method, params }) {\n let includes;\n const fetch = async (i = 0) => {\n const transport = transports[i]({\n ...rest,\n chain,\n retryCount: 0,\n timeout,\n });\n try {\n const response = await transport.request({\n method,\n params,\n });\n onResponse({\n method,\n params: params,\n response,\n transport,\n status: 'success',\n });\n return response;\n }\n catch (err) {\n onResponse({\n error: err,\n method,\n params: params,\n transport,\n status: 'error',\n });\n if (shouldThrow_(err))\n throw err;\n // If we've reached the end of the fallbacks, throw the error.\n if (i === transports.length - 1)\n throw err;\n // Check if at least one other transport includes the method\n includes ??= transports.slice(i + 1).some((transport) => {\n const { include, exclude } = transport({ chain }).config.methods || {};\n if (include)\n return include.includes(method);\n if (exclude)\n return !exclude.includes(method);\n return true;\n });\n if (!includes)\n throw err;\n // Otherwise, try the next fallback.\n return fetch(i + 1);\n }\n };\n return fetch();\n },\n retryCount,\n retryDelay,\n type: 'fallback',\n }, {\n onResponse: (fn) => (onResponse = fn),\n transports: transports.map((fn) => fn({ chain, retryCount: 0 })),\n });\n if (rank) {\n const rankOptions = (typeof rank === 'object' ? rank : {});\n rankTransports({\n chain,\n interval: rankOptions.interval ?? pollingInterval,\n onTransports: (transports_) => (transports = transports_),\n ping: rankOptions.ping,\n sampleCount: rankOptions.sampleCount,\n timeout: rankOptions.timeout,\n transports,\n weights: rankOptions.weights,\n });\n }\n return transport;\n });\n}\nexport function shouldThrow(error) {\n if ('code' in error && typeof error.code === 'number') {\n if (error.code === TransactionRejectedRpcError.code ||\n error.code === UserRejectedRequestError.code ||\n error.code === WalletConnectSessionSettlementError.code ||\n ExecutionRevertedError.nodeMessage.test(error.message) ||\n error.code === 5000 // CAIP UserRejectedRequestError\n )\n return true;\n }\n return false;\n}\n/** @internal */\nexport function rankTransports({ chain, interval = 4_000, onTransports, ping, sampleCount = 10, timeout = 1_000, transports, weights = {}, }) {\n const { stability: stabilityWeight = 0.7, latency: latencyWeight = 0.3 } = weights;\n const samples = [];\n const rankTransports_ = async () => {\n // 1. Take a sample from each Transport.\n const sample = await Promise.all(transports.map(async (transport) => {\n const transport_ = transport({ chain, retryCount: 0, timeout });\n const start = Date.now();\n let end;\n let success;\n try {\n await (ping\n ? ping({ transport: transport_ })\n : transport_.request({ method: 'net_listening' }));\n success = 1;\n }\n catch {\n success = 0;\n }\n finally {\n end = Date.now();\n }\n const latency = end - start;\n return { latency, success };\n }));\n // 2. Store the sample. If we have more than `sampleCount` samples, remove\n // the oldest sample.\n samples.push(sample);\n if (samples.length > sampleCount)\n samples.shift();\n // 3. Calculate the max latency from samples.\n const maxLatency = Math.max(...samples.map((sample) => Math.max(...sample.map(({ latency }) => latency))));\n // 4. Calculate the score for each Transport.\n const scores = transports\n .map((_, i) => {\n const latencies = samples.map((sample) => sample[i].latency);\n const meanLatency = latencies.reduce((acc, latency) => acc + latency, 0) /\n latencies.length;\n const latencyScore = 1 - meanLatency / maxLatency;\n const successes = samples.map((sample) => sample[i].success);\n const stabilityScore = successes.reduce((acc, success) => acc + success, 0) /\n successes.length;\n if (stabilityScore === 0)\n return [0, i];\n return [\n latencyWeight * latencyScore + stabilityWeight * stabilityScore,\n i,\n ];\n })\n .sort((a, b) => b[0] - a[0]);\n // 5. Sort the Transports by score.\n onTransports(scores.map(([, i]) => transports[i]));\n // 6. Wait, and then rank again.\n await wait(interval);\n rankTransports_();\n };\n rankTransports_();\n}\n//# sourceMappingURL=fallback.js.map","import { BaseError } from './base.js';\nexport class UrlRequiredError extends BaseError {\n constructor() {\n super('No URL was provided to the Transport. Please provide a valid RPC URL to the Transport.', {\n docsPath: '/docs/clients/intro',\n name: 'UrlRequiredError',\n });\n }\n}\n//# sourceMappingURL=transport.js.map","import { RpcRequestError } from '../../errors/request.js';\nimport { UrlRequiredError, } from '../../errors/transport.js';\nimport { createBatchScheduler } from '../../utils/promise/createBatchScheduler.js';\nimport { getHttpRpcClient, } from '../../utils/rpc/http.js';\nimport { createTransport, } from './createTransport.js';\nlet signalId = 0;\nconst signalIds = new WeakMap();\nfunction getSignalId(signal) {\n if (!signal)\n return 'default';\n const id = signalIds.get(signal);\n if (id !== undefined)\n return id;\n const nextId = signalId++;\n signalIds.set(signal, nextId);\n return nextId;\n}\n/**\n * @description Creates a HTTP transport that connects to a JSON-RPC API.\n */\nexport function http(\n/** URL of the JSON-RPC API. Defaults to the chain's public RPC URL. */\nurl, config = {}) {\n const { batch, fetchFn, fetchOptions, key = 'http', maxResponseBodySize, methods, name = 'HTTP JSON-RPC', onFetchRequest, onFetchResponse, retryDelay, raw, } = config;\n return ({ chain, retryCount: retryCount_, timeout: timeout_ }) => {\n const { batchSize = 1000, wait = 0 } = typeof batch === 'object' ? batch : {};\n const retryCount = config.retryCount ?? retryCount_;\n const timeout = timeout_ ?? config.timeout ?? 10_000;\n const url_ = url || chain?.rpcUrls.default.http[0];\n if (!url_)\n throw new UrlRequiredError();\n const rpcClient = getHttpRpcClient(url_, {\n fetchFn,\n fetchOptions,\n maxResponseBodySize,\n onRequest: onFetchRequest,\n onResponse: onFetchResponse,\n timeout,\n });\n return createTransport({\n key,\n methods,\n name,\n async request({ method, params }, options) {\n const body = { method, params };\n const fetchOptions = options?.signal\n ? { signal: options.signal }\n : undefined;\n const { schedule } = createBatchScheduler({\n id: `${url_}.${getSignalId(options?.signal)}`,\n wait,\n shouldSplitBatch(requests) {\n return requests.length > batchSize;\n },\n fn: (body) => rpcClient.request({\n body,\n fetchOptions,\n }),\n sort: (a, b) => a.id - b.id,\n });\n const fn = async (body) => batch\n ? schedule(body)\n : [\n await rpcClient.request({\n body,\n fetchOptions,\n }),\n ];\n const [{ error, result }] = await fn(body);\n if (raw)\n return { error, result };\n if (error)\n throw new RpcRequestError({\n body,\n error,\n url: url_,\n });\n return result;\n },\n retryCount,\n retryDelay,\n timeout,\n type: 'http',\n }, {\n fetchOptions,\n url: url_,\n });\n };\n}\n//# sourceMappingURL=http.js.map","// SPDX-License-Identifier: MIT\n/* ============================================================================\n Safe{Wallet} v1.4.1 contract addresses, per chain.\n\n The governance Safe (`LatchDeployment.governanceSafe`) is a plain v1.4.1\n proxy created through the canonical `SafeProxyFactory`, and every chain Latch\n governs is one where the canonical singleton deployment landed at the same\n deterministic addresses. That is what lets a Safe transaction be hashed,\n signed and executed WITHOUT app.safe.global: the EIP-712 domain is\n `{ chainId, verifyingContract: safe }`, and a batch is a DELEGATECALL into\n `multiSendCallOnly`, which can only CALL onward.\n\n Every value below is the canonical v1.4.1 address published by\n `@safe-global/safe-deployments` (MIT), transcribed rather than imported so the\n SDK stays dependency-free. `docs/chain-certification.md` records `eth_getCode`\n and `VERSION()` reads at these addresses on each chain; `test/safeContracts.test.ts`\n re-reads the code when an RPC is reachable and asserts the transcription\n against the published package in the admin build. A chain missing from this\n table has NOT been checked — do not add it on the strength of \"the canonical\n deployment is everywhere\". Read the code first.\n\n Which singleton a given Safe proxy points at (L1 `singleton` or `l2Singleton`)\n is read from the proxy's storage slot 0 at run time; both are listed because\n both exist on every chain here and Safe{Wallet} creates L2 proxies on L2s.\n ============================================================================ */\n/** The canonical v1.4.1 deployment, identical on every EVM chain that has it (deterministic CREATE2). */\nconst CANONICAL_1_4_1 = {\n version: \"1.4.1\",\n singleton: \"0x41675C099F32341bf84BFc5382aF534df5C7461a\",\n l2Singleton: \"0x29fcB43b46531BcA003ddC8FCB67FFE91900C762\",\n proxyFactory: \"0x4e1DCf7AD4e460CfD30791CCC4F9c8a4f820ec67\",\n multiSend: \"0x38869bf66a61cF6bDB996A6aE40D5853Fd43B526\",\n multiSendCallOnly: \"0x9641d764fc13c8B624c04430C7356C1C7C8102e2\",\n fallbackHandler: \"0xfd0732Dc9E303f09fCEf3a7388Ad10A83459Ec99\",\n signMessageLib: \"0xd53cd0aB83D845Ac265BE939c57F53AD838012c9\",\n createCall: \"0x9b35Af71d77eaf8d7e40252370304687390A1A52\",\n simulateTxAccessor: \"0x3d4BA2E0884aa488718476ca2FB8Efc291A46199\",\n};\n/**\n * Chains where the canonical v1.4.1 contracts were READ at these addresses\n * (`docs/chain-certification.md`, \"Safe infra\"): code present, singletons answer\n * `VERSION() == \"1.4.1\"`. Robinhood also verified `MultiSendCallOnly` by code hash\n * (`apps/api/config/chains/4663.json`). Base (8453) is listed because the\n * governance Safe exists there at the same address with the same owners, not\n * because Latch is deployed there.\n */\nexport const SAFE_CONTRACTS = {\n 4663: CANONICAL_1_4_1,\n 8453: CANONICAL_1_4_1,\n 11155111: CANONICAL_1_4_1,\n};\nexport const SAFE_CONTRACT_CHAIN_IDS = Object.keys(SAFE_CONTRACTS).map(Number);\nexport function safeContractsFor(chainId) {\n return SAFE_CONTRACTS[chainId];\n}\nexport function requireSafeContracts(chainId) {\n const c = SAFE_CONTRACTS[chainId];\n if (!c)\n throw new Error(`Safe v1.4.1 contracts have not been verified on chain ${chainId}; read eth_getCode at the canonical addresses before adding it to SAFE_CONTRACTS`);\n return c;\n}\n/**\n * Safe v1.4.1 EIP-712 `SafeTx` type. The domain is `{ chainId, verifyingContract }`\n * (no name, no version) for every Safe >= 1.3.0. `safeTxHash` is\n * `hashTypedData({ domain, types: SAFE_TX_TYPES, primaryType: \"SafeTx\", message })`,\n * and it is what an owner's `eth_signTypedData_v4` signs and what\n * `execTransaction` recovers each signature against.\n */\nexport const SAFE_TX_TYPES = {\n SafeTx: [\n { name: \"to\", type: \"address\" },\n { name: \"value\", type: \"uint256\" },\n { name: \"data\", type: \"bytes\" },\n { name: \"operation\", type: \"uint8\" },\n { name: \"safeTxGas\", type: \"uint256\" },\n { name: \"baseGas\", type: \"uint256\" },\n { name: \"gasPrice\", type: \"uint256\" },\n { name: \"gasToken\", type: \"address\" },\n { name: \"refundReceiver\", type: \"address\" },\n { name: \"nonce\", type: \"uint256\" },\n ],\n};\n//# sourceMappingURL=safe.js.map","// SPDX-License-Identifier: MIT\n/* ============================================================================\n THE LATCH ADDRESS BOOK — one file, every deployed contract, per chain.\n\n WHY THIS LIVES IN THE SDK AND NOWHERE ELSE\n ------------------------------------------\n An address table is the first thing an integrator needs and the last thing\n they should have to type. Before this module the SDK shipped ABIs, event\n decoders and a probed RPC list but not a single address, so \"simple\n integration\" still began with hand-copying twenty hex strings out of a\n markdown file — and every consumer that did so became another place the\n truth could rot.\n\n It had already started. `apps/web/src/lib/chain.ts` carried one copy and\n `packages/create-latch-dex/template/src/config/deployments.ts` a second, and\n the two had ALREADY diverged: the web copy knows the timelocks, the fee\n controller, the quoters and the position descriptor; the template copy does\n not. Neither was wrong, which is exactly the problem — two partial tables\n with no way to tell which one is behind. The DefiLlama adapters in this repo\n went the other way, two hand-maintained mirrors with a parity test bolted on\n to catch drift, and a parity test is a smoke alarm, not a fix. This module is\n the fix: both of those files now RE-EXPORT this one.\n\n Addresses and ABIs are facts about a public chain, not derivative works of\n the GPL contracts that produced them. Nothing here imports from\n `packages/core`, `periphery`, `router` or any hook package, so a third-party\n hook author can build against this MIT package without ever touching GPL\n code. Every value below was transcribed from `ops/safe/robinhood-deployment\n .md` and `packages/core/script/config/*.json`, both of which record addresses\n READ BACK off chain after deployment rather than copied from a script's log.\n\n NULL MEANS NOT DEPLOYED. IT NEVER MEANS ZERO.\n ---------------------------------------------\n Every address field that can be absent is typed `Address | null`, and absent\n is written `null`. The zero address is not used as a placeholder anywhere in\n this file and must never be introduced: `0x000...000` is a value a caller\n will happily pass to `readContract`, `getCode` or a swap path, where it\n silently returns empty rather than failing. `null` cannot be called. It\n forces the consumer to branch, which is the whole point — the honest render\n for a contract that does not exist yet is \"not configured on this chain\",\n not a read against nothing.\n\n So: `deployment.launchpadKit === null` is a complete, checkable answer.\n `requireContract(deployment, \"launchpadKit\")` is the other half, for call\n sites that genuinely cannot proceed without it and would rather throw a\n sentence than a stack trace from viem.\n\n FOUR OF THESE ADDRESSES ARE ABOUT TO CHANGE\n -------------------------------------------\n `LatchRegistry`, `RevShareHook` and the 48h custody timelock are queued for\n redeployment with fixes, and `LatchLaunchRegistry` plus the launchpad pair\n have not landed at all. That is the normal state of an address book, not an\n exception to plan around, so the shape is chosen for it:\n\n * ONE edit, in ONE file, per redeploy. Nothing downstream restates an\n address; `apps/web` and the `create-latch-dex` template both import.\n * `REDEPLOYABLE_CONTRACTS` names the keys whose address is a moving target,\n because the failure mode of a stale one is silent. A retired\n `LatchRegistry` still answers `latchCount()` with a number and renders as\n a healthy, empty marketplace — see the 2026-09-10 rename, where the old\n registry at 0x665e7e5C… still responds and nothing reads it. A stale\n Vault, by contrast, cannot happen: it is immutable and permanent.\n\n DECIMALS ARE PART OF THE ADDRESS BOOK, NOT AN AFTERTHOUGHT\n ----------------------------------------------------------\n USDG is 6 decimals on Robinhood and WETH9 is 18. `sqrtPriceX96` encodes a\n price as a ratio of RAW units, so a hardcoded 18 against a 6-decimal quote is\n wrong by 10^12 — that is a pool opened at a million times the intended price,\n fixed permanently at `initialize`. This repo has already caught that trap\n twice (see the Arc note in `chains/endpoints.ts`, and `lib/swap.ts`). A token\n listed here therefore ALWAYS carries its decimals, and a token whose decimals\n nobody has read off its own contract does not get listed.\n\n The table is still a claim, not a proof. `decimals()` on the live contract is\n the proof, and anything pricing a pool should read it — `npm run latch:verify`\n in the scaffolded app does exactly that for every address and token here.\n\n ADDING A CHAIN IS A DATA CHANGE, NOT A CODE CHANGE\n --------------------------------------------------\n One object literal in `DEPLOYMENTS_TABLE` below is the whole edit. Nothing\n restates the chain list: `LatchChainId`, `LatchChainKey`, `LATCH_CHAIN_IDS`,\n `LATCH_MAINNET_CHAIN_IDS`, `NATIVE_CURRENCY` and `isLatchChainId` are all\n DERIVED from that table's keys. It was not always so — until 2026-09-20 the\n two chains were restated five times, and a third chain meant editing a union\n type, an array, a map and a function body, any one of which could be missed\n while the other four compiled fine.\n\n What the compiler still enforces, and should: every field typed `Address`\n (not `Address | null`) must be present. A chain is not addable half-way.\n `vault`, `clPoolManager`, `binPoolManager`, `feeController`, `registry`,\n `universalRouter`, both position managers, both quoters, the descriptor,\n `create3Factory`, `permit2`, `weth`, `revShareHook`, the custody timelock and\n `deployedAtBlock` are all required (the policy timelock is not: Base has none), because a consumer branching on `null`\n for those was never written. So a new chain enters this table when its core\n is deployed and read back, and not one commit earlier. There is no\n placeholder to pre-stage and no zero address to fill in.\n\n ARC MAINNET (5042) IS DELIBERATELY ABSENT\n -----------------------------------------\n It has never answered a probe from this project: TLS handshake failures on\n every candidate endpoint, so chain id 5042 has never been read off a live\n node, and its published USDC decimals contradict themselves (6 in the owner's\n config, 18 on Circle's own Connect page — the 10^12 gap above). See the long\n note in `chains/endpoints.ts`. Do not add it from memory or from a docs page.\n Nothing is deployed there in any case.\n ============================================================================ */\nimport { SAFE_CONTRACTS } from \"./safe.js\";\n/* ============================================================================\n THE TABLE.\n\n Edit HERE for a redeploy, and only here. Everything downstream — the dapp,\n the scaffolded tenant app, the keeper, any integrator — reads through this.\n ============================================================================ */\n/*\n * The table itself, unannotated and `as const` so its KEYS and its `key` fields\n * are literal types the chain-id and chain-key unions above are read off. The\n * shape check happens once, on the annotated `LATCH_DEPLOYMENTS` below: a field\n * of the wrong type, or a missing required address, is an error there and\n * points at the offending line here.\n */\nconst DEPLOYMENTS_TABLE = {\n /* --------------------------------------------------------------------------\n Robinhood Chain — mainnet. REDEPLOYED 2026-09-27 (owner 2026-09-26: \"we\n are redeploying on robinhood\"): a fresh stack from the same deployer and\n salts as Base, so every Latch address below equals Base's. Nothing was\n migrated from the first stack (2026-09-11, bound to the retired Vault\n 0x78e8…fB6c); those contracts stay on chain and are no longer read.\n \n OWNERSHIP MUST BE READ, NOT ASSUMED. The Safe and the custody timelock are\n identifiers here, not claims about who owns what at any given block: read\n `owner()` / `pendingOwner()` on the contract you care about.\n -------------------------------------------------------------------------- */\n 4663: {\n chainId: 4663,\n key: \"robinhood\",\n name: \"Robinhood Chain\",\n /* Official explorer (owner 2026-09-27); Etherscan chainlist: 4663 -> robin.etherscan.io, v2 API live. */\n explorer: \"https://robin.etherscan.io\",\n isMainnet: true,\n /* The REDEPLOYED stack (2026-09-27, owner 2026-09-26: \"we are redeploying on robinhood\"): first\n transaction, the core Create3Factory, landed in L2 block 74,028,398. The first stack (from block\n 60,111,836) is retired and bound to the retired Vault 0x78e8…fB6c. */\n deployedAtBlock: 74028398n,\n nativeCurrency: { name: \"Ether\", symbol: \"ETH\", decimals: 18 },\n /* Arbitrum Nitro. Measured 2026-09-13: eth_call NUMBER 25,972,228 while\n eth_blockNumber read 62,397,593; the latest header's l1BlockNumber matched\n NUMBER, and over 3,428 s of headers NUMBER advanced 283 (12.1 s each).\n Mined-state proof: ERC20Votes 0x1eae…8888 checkpointed L2 block\n 62,356,430 at key 25,971,883, that block's l1BlockNumber. The RPC's own\n 0.102 s blocks are the LOG clock only. */\n contractBlockClock: \"parent-l1\",\n contractBlockTimeCentis: 1200,\n vault: \"0xaC44C903CE3d89054fD5b70e0E396f26b214CBE3\",\n clPoolManager: \"0x3d4afd3190b1e5036e410abb576f99c02D6fBb20\",\n binPoolManager: \"0xbD6274D94102C3fCafE043f8EF7C7F33f33B255A\",\n clPoolManagerOwner: \"0xa66f5f4aE2682a965956Fd6B0E448Ec7D8Ce1a3E\",\n binPoolManagerOwner: \"0xeA8480331310Cf1EEA2D1d8E41429AE163EcfA51\",\n /* LatchProtocolFeeControllerV3, composing over V2 0x03Eda5609a11f9259fB0EBdB8f7671e09A932aBe\n (the same addresses as Base). Whether it is in force is\n `poolManager.protocolFeeController()`, read it. */\n feeController: \"0x197855617B40D79b4eaD1b4e0f8Bf6ab41022b19\",\n clProtocolFeeController: null,\n binProtocolFeeController: null,\n /* The 3-of-4 Safe of record, created on 4663 on 2026-09-26. The 2-of-3 `0x715a…3432` it\n superseded still exists here and still owns the RETIRED first stack; nothing reads it. */\n governanceSafe: \"0xeA7903Ed7d5FAE93CE1500ED2c4df138bDF0a038\",\n safe: SAFE_CONTRACTS[4663],\n /* No policy timelock: the tier was retired 2026-09-12. Retired contracts are NOT dead: a\n retired LatchRegistry still answers latchCount() and renders as a healthy empty\n marketplace, which is exactly how the 2026-09-10 rename went unnoticed. */\n timelockCustody: \"0x71E6B57d1dC373929899e6189771ee9115B4EF14\",\n timelockPolicy: null,\n registry: \"0x197855eBa41da04f2A380ba612AdD1C48f7a27aA\",\n universalRouter: \"0xd3dF9e77ed0Cf41B22BB0c7E527caE966CF79695\",\n /* LatchFillRouter. `EXECUTOR()` on the router is the authority for its executor. */\n fillRouter: \"0x197827dceB223ADDeE5cbdf123C08df6b73016E3\",\n clPositionManager: \"0x637A989326Fe99e9618A97f68D05621858B68973\",\n binPositionManager: \"0x585F7D8DAFEA7178ea91a54789f5059C2B1D3998\",\n clQuoter: \"0x0f971d005eC4E6E2f0dEe532ce4E9469c4D2651A\",\n binQuoter: \"0x684eD241c7B15eC83b1F4f93c049C6F74f504fEF\",\n clPositionDescriptor: \"0x69d18C3F0CFf468B9b2afb729b326D93eD2C7A22\",\n create3Factory: \"0x501D3a1F7674BE9f4BCe56bE81Dc3CafA1E51BD1\",\n permit2: \"0x000000000022D473030F116dDEE9F6B43aC78BA3\",\n /* Canonical per docs.robinhood.com/chain/contracts. The predeploys you\n would reach for out of habit — 0x4200…06 and 0xC02aaA… — have NO CODE on\n this chain. */\n weth: \"0x0Bd7D308f8E1639FAb988df18A8011f41EAcAD73\",\n revShareHook: \"0x1978A2C6905aC690f21b23d581dc5b1E0Aa18266\",\n launchRegistry: \"0x1978f09B8F8886251e2693566822b7aCC30faD59\",\n /* v1 kit 0x2a4C…bcA7 and its block-clock guard 0x8b4F…575c are RETIRED with the first stack:\n both are bound to the retired Vault and managers. */\n launchpadKit: null,\n launchGuardHook: null,\n launchpadV2: {\n launchpadKitV2: \"0x19789C58f0d648146a698D6d3fAAA40Abb3e68a8\",\n launchLegs: \"0x1978bCCCe1CfaCD456a1908fe1c8c3198203917A\",\n launchTokenFactory: \"0x197865Bf8bEb9d597feAfd39136d5aDA2e8DBcD7\",\n clLPLocker: \"0x1978ECb2789423aE7fB4020dD432bc614741206c\",\n binLPLocker: \"0x1978029ec07FF1E85FA1fF53d430322D08F8F01f\",\n clLaunchGuardHook: \"0x1978493942bDE85721d047655Cee31Ef57C0303f\",\n binLaunchGuardHook: \"0x19785eB03DFeFea2371cc5C5Cd7130B5D829C195\",\n padFactory: \"0x1978b82718FfbE0f0D2Ab0FfDc575b87fAfeca1C\",\n },\n splitFactory: \"0x1978F55996c371A30CdE8CA8015B0D362b72Cd53\",\n positionLock: \"0x1978c7b933371bc4B238939De9dfE047653CFb85\",\n tokenLock: \"0x19784D694a07bB88380B1e9e3F5d6506190d2A7a\",\n multisend: \"0x1978DB38B8495b70FBa397b1F41f3dEd4A5FF2c2\",\n dropFactory: \"0x1978989f87B6F05000e2A0C04451114f1f50C04E\",\n /* The redeployed stack is timestamp-clocked throughout. The retired block-numbered\n RevShareHooks below keep their own clock records for readers of their old pools. */\n durationClocks: {\n revShareHook: \"timestamp\",\n launchpadKit: null,\n launchGuardHook: null,\n },\n revShareHooks: [\n {\n address: \"0x1978A2C6905aC690f21b23d581dc5b1E0Aa18266\",\n durationClock: \"timestamp\",\n pendingShape: \"timestamp-with-expiry\",\n status: \"current\",\n note: \"The redeployed stack (2026-09-27), timestamp source; same address as on Base.\",\n },\n {\n address: \"0xfC00485AFB2f9C73Bd7F9f5e72d14709233E2aD2\",\n durationClock: \"contract-block\",\n pendingShape: \"block-with-expiry\",\n status: \"retired\",\n note: \"432,000-block delay declared at 0.1 s; on the real ~12 s contract clock that is ~60 days, \" +\n \"and its proposal TTL ~360 days. No pools.\",\n },\n {\n address: \"0x23CE34E8199927DD270dddd8579c947542bDE446\",\n durationClock: \"contract-block\",\n pendingShape: \"block-no-expiry\",\n status: \"retired\",\n note: \"Hosts the LTT1/LTT2 pool for as long as it exists. 3,600-block (~12 h) delay and NO expiry: \" +\n \"a matured proposal stays armed until cancelled or frozen.\",\n },\n ],\n tokens: [\n {\n /* `name()` on this contract answers \"WETH\", not \"Wrapped Ether\" (read\n 2026-09-18 by the token-list generator's chain check, confirmed by a\n direct eth_call). The Sepolia WETH below does say \"Wrapped Ether\". */\n address: \"0x0Bd7D308f8E1639FAb988df18A8011f41EAcAD73\",\n symbol: \"WETH\",\n name: \"WETH\",\n decimals: 18,\n isTestToken: false,\n },\n {\n /* SIX decimals, not eighteen. Paired against 18-decimal WETH this is a\n 10^12 gap in `sqrtPriceX96`, which is a permanent mispricing at\n `initialize`, not a display bug. */\n address: \"0x5fc5360D0400a0Fd4f2af552ADD042D716F1d168\",\n symbol: \"USDG\",\n name: \"Global Dollar\",\n decimals: 6,\n isTestToken: false,\n },\n /* Robinhood stock tokens, read on chain 2026-09-13: 283-byte beacon\n proxies of `Stock` (implementation 0xb354…5aE2 on Sourcify), beacon +\n registry 0xe10b6f6B275de231345c20D14Ab812db62151b00. Transfer freely\n into the Vault today; the issuer keeps pause / adminBurn / upgrade. */\n {\n address: \"0xd0601CE157Db5bdC3162BbaC2a2C8aF5320D9EEC\",\n symbol: \"NVDA\",\n name: \"NVIDIA • Robinhood Token\",\n decimals: 18,\n isTestToken: false,\n stock: { issuer: \"Robinhood\", ticker: \"NVDA\" },\n },\n {\n address: \"0x4a0E65A3EcceC6dBe60AE065F2e7bb85Fae35eEa\",\n symbol: \"SPCX\",\n name: \"Space Exploration Technologies Corp. Class A Common Stock • Robinhood Token\",\n decimals: 18,\n isTestToken: false,\n stock: { issuer: \"Robinhood\", ticker: \"SPCX\" },\n },\n {\n address: \"0x2A21c0826848f2D597B7C87A4B931dE1407958A6\",\n symbol: \"LTT1\",\n name: \"Latch Test Token One\",\n decimals: 18,\n isTestToken: true,\n },\n {\n address: \"0xa29927045BDFfd61B8F539D491085F1b6f7A8bE4\",\n symbol: \"LTT2\",\n name: \"Latch Test Token Two\",\n decimals: 18,\n isTestToken: true,\n },\n ],\n },\n /* --------------------------------------------------------------------------\n Base — mainnet. Deployed 2026-09-27 (core, periphery, router and the Latch\n release), every contract verified on Sourcify and every address below read\n back on chain after deployment.\n \n OWNERSHIP MUST BE READ, NOT ASSUMED. The Safe and the custody timelock are\n identifiers here, not claims about who owns what at any given block: read\n `owner()` / `pendingOwner()` on the contract you care about.\n \n No policy timelock (the tier was retired 2026-09-12), no upstream\n ProtocolFeeControllers and no Kit v1: the release is timestamp-clocked\n throughout.\n -------------------------------------------------------------------------- */\n 8453: {\n chainId: 8453,\n key: \"base\",\n name: \"Base\",\n explorer: \"https://basescan.org\",\n isMainnet: true,\n /* The Create3Factory's deployment receipt — the first Latch transaction on Base. */\n deployedAtBlock: 51856606n,\n nativeCurrency: { name: \"Ether\", symbol: \"ETH\", decimals: 18 },\n /* OP-stack: `block.number` inside the EVM is Base's own L2 block (~2 s),\n the same clock `eth_blockNumber` reports. See `chains/clock.ts`. */\n contractBlockClock: \"native\",\n contractBlockTimeCentis: 200,\n vault: \"0xaC44C903CE3d89054fD5b70e0E396f26b214CBE3\",\n clPoolManager: \"0x3d4afd3190b1e5036e410abb576f99c02D6fBb20\",\n binPoolManager: \"0xbD6274D94102C3fCafE043f8EF7C7F33f33B255A\",\n clPoolManagerOwner: \"0xa66f5f4aE2682a965956Fd6B0E448Ec7D8Ce1a3E\",\n binPoolManagerOwner: \"0xeA8480331310Cf1EEA2D1d8E41429AE163EcfA51\",\n /* LatchProtocolFeeControllerV3, composing over V2 0x03Eda5609a11f9259fB0EBdB8f7671e09A932aBe.\n Whether it is in force is `poolManager.protocolFeeController()`, read it. */\n feeController: \"0x197855617B40D79b4eaD1b4e0f8Bf6ab41022b19\",\n clProtocolFeeController: null,\n binProtocolFeeController: null,\n governanceSafe: \"0xeA7903Ed7d5FAE93CE1500ED2c4df138bDF0a038\",\n safe: SAFE_CONTRACTS[8453],\n timelockCustody: \"0x71E6B57d1dC373929899e6189771ee9115B4EF14\",\n timelockPolicy: null,\n registry: \"0x197855eBa41da04f2A380ba612AdD1C48f7a27aA\",\n universalRouter: \"0xd3dF9e77ed0Cf41B22BB0c7E527caE966CF79695\",\n /* LatchFillRouter. Its executor (0xBD024353910230d2C62a70f7464E339801C772b6) is derived;\n `EXECUTOR()` on the router is the authority. */\n fillRouter: \"0x197827dceB223ADDeE5cbdf123C08df6b73016E3\",\n clPositionManager: \"0x637A989326Fe99e9618A97f68D05621858B68973\",\n binPositionManager: \"0x585F7D8DAFEA7178ea91a54789f5059C2B1D3998\",\n clQuoter: \"0x0f971d005eC4E6E2f0dEe532ce4E9469c4D2651A\",\n binQuoter: \"0x684eD241c7B15eC83b1F4f93c049C6F74f504fEF\",\n clPositionDescriptor: \"0x69d18C3F0CFf468B9b2afb729b326D93eD2C7A22\",\n create3Factory: \"0x501D3a1F7674BE9f4BCe56bE81Dc3CafA1E51BD1\",\n permit2: \"0x000000000022D473030F116dDEE9F6B43aC78BA3\",\n /* The OP-stack predeploy. symbol()/decimals() read on chain 2026-09-27. */\n weth: \"0x4200000000000000000000000000000000000006\",\n revShareHook: \"0x1978A2C6905aC690f21b23d581dc5b1E0Aa18266\",\n launchRegistry: \"0x1978f09B8F8886251e2693566822b7aCC30faD59\",\n launchpadKit: null,\n launchGuardHook: null,\n launchpadV2: {\n launchpadKitV2: \"0x19789C58f0d648146a698D6d3fAAA40Abb3e68a8\",\n launchLegs: \"0x1978bCCCe1CfaCD456a1908fe1c8c3198203917A\",\n launchTokenFactory: \"0x197865Bf8bEb9d597feAfd39136d5aDA2e8DBcD7\",\n clLPLocker: \"0x1978ECb2789423aE7fB4020dD432bc614741206c\",\n binLPLocker: \"0x1978029ec07FF1E85FA1fF53d430322D08F8F01f\",\n clLaunchGuardHook: \"0x1978493942bDE85721d047655Cee31Ef57C0303f\",\n binLaunchGuardHook: \"0x19785eB03DFeFea2371cc5C5Cd7130B5D829C195\",\n padFactory: \"0x1978b82718FfbE0f0D2Ab0FfDc575b87fAfeca1C\",\n },\n splitFactory: \"0x1978F55996c371A30CdE8CA8015B0D362b72Cd53\",\n positionLock: \"0x1978c7b933371bc4B238939De9dfE047653CFb85\",\n tokenLock: \"0x19784D694a07bB88380B1e9e3F5d6506190d2A7a\",\n multisend: \"0x1978DB38B8495b70FBa397b1F41f3dEd4A5FF2c2\",\n dropFactory: \"0x1978989f87B6F05000e2A0C04451114f1f50C04E\",\n durationClocks: {\n revShareHook: \"timestamp\",\n launchpadKit: null,\n launchGuardHook: null,\n },\n revShareHooks: [\n {\n /* CLOCK_MODE() read \"mode=timestamp\" on chain 2026-09-27. */\n address: \"0x1978A2C6905aC690f21b23d581dc5b1E0Aa18266\",\n durationClock: \"timestamp\",\n pendingShape: \"timestamp-with-expiry\",\n status: \"current\",\n note: \"Release-commit timestamp build: seconds-based delay and a 3-day proposal TTL.\",\n },\n ],\n tokens: [\n {\n /* symbol() \"WETH\", name() \"Wrapped Ether\", decimals() 18, read on chain 2026-09-27. */\n address: \"0x4200000000000000000000000000000000000006\",\n symbol: \"WETH\",\n name: \"Wrapped Ether\",\n decimals: 18,\n isTestToken: false,\n },\n ],\n },\n /* --------------------------------------------------------------------------\n Ethereum Sepolia — testnet. Nothing here is worth anything, and nothing\n here is governed: the deployer EOA still owns everything and the two\n timelocks are deployed but inert (their sole proposer is that same EOA,\n which is a delay on one key, not governance). They are redeployed properly\n before mainnet; per the deployment order.\n \n Source: `packages/core/script/config/latch-sepolia.json`, plus the periphery\n and router addresses read back after the later periphery deployment.\n -------------------------------------------------------------------------- */\n 11155111: {\n chainId: 11155111,\n key: \"sepolia\",\n name: \"Ethereum Sepolia\",\n explorer: \"https://sepolia.etherscan.io\",\n isMainnet: false,\n /* MEASURED, not estimated. Was 11672600n — the 2026-09-13 deployment — while the release\n contracts landed on 2026-09-25, so the indexer's first pass asked for a 105,474-block span\n that ALL FIVE public Sepolia endpoints refused at once and only completed by halving down.\n The earliest event any watched contract has is block 11,778,074 (read from the indexer's\n own table after that backfill, so the whole old range is proven empty rather than assumed\n empty — nothing is lost by starting later). 74 blocks of margin, which costs nothing.\n Raise this after any redeploy that retires the contracts below it. */\n deployedAtBlock: 11778000n,\n nativeCurrency: { name: \"Sepolia Ether\", symbol: \"ETH\", decimals: 18 },\n /* An L1: NUMBER and eth_blockNumber are the same clock (both 11,699,528\n when probed 2026-09-13), 12 s slots. */\n contractBlockClock: \"native\",\n contractBlockTimeCentis: 1200,\n vault: \"0xCe3d133eb486b448A53437A5073619FbE424d01B\",\n clPoolManager: \"0xb7C8a11E0B359616eD06256783aF57114841F738\",\n binPoolManager: \"0xdBA93F91BA5B8535AE2b38be6a3A6CdcfDE6f6f3\",\n /* Never deployed here — the managers are owned directly, which is fine on a\n chain holding nothing and is exactly what mainnet must not look like. */\n clPoolManagerOwner: null,\n binPoolManagerOwner: null,\n feeController: \"0xc1b7A4e61A4B6ceBA3e308425dc2390c2CE57ea9\",\n /* V2 (0x5c43d541…) and V3 (0x19789d7f…) were DEPLOYED on 2026-09-25 but NOT\n INSTALLED: `setProtocolFeeController` on each manager needs the core owner EOA\n 0x615C…7854, which the release session does not hold. So the managers still\n answer V1, and these stay null because null means \"what the managers actually\n use\", not \"what exists\". Installing them is two transactions by that key. */\n clProtocolFeeController: null,\n binProtocolFeeController: null,\n /* The Safe OF RECORD, created on Sepolia at its canonical address on 2026-09-25\n by replaying the exact initializer from its Base creation transaction (v1.4.1,\n 3-of-4, same owners, nonce 0). It owns every contract deployed that day. The\n superseded 2-of-3 Safe 0x715a…3432 is still on chain here and still owns what\n predates the redeploy; read `owner()` rather than inferring from either line. */\n governanceSafe: \"0xeA7903Ed7d5FAE93CE1500ED2c4df138bDF0a038\",\n safe: SAFE_CONTRACTS[11155111],\n timelockCustody: \"0x35D72DbEeD5F2CE95a4DFb3917D2CD3c43e544CA\",\n timelockPolicy: \"0x30897C9e7c1c336cDF68C7494f930C75A355d42F\",\n /* Redeployed 2026-09-10 as `LatchRegistry` (was `LatchHookRegistry`). The\n old contract at 0x665e7e5C419d004420C6Cb8c924E1E5Ca31F43DE still answers\n `hookCount()` and still holds the original listing. Nothing reads it; it\n was retired, NOT migrated. That is the silent-stale failure mode this\n module exists to prevent. */\n /* REPLACED 2026-09-25. The 0xB504… build has no `vault()`, so\n `DeployLaunchRegistry.s.sol` reverts against it — replacing it is required on\n Sepolia, not optional. 0xB504… still answers and still holds its listings;\n nothing reads it. */\n registry: \"0x1978048a2E1a896384E0540e6dBe7Edc89392695\",\n universalRouter: \"0xB647CEbd5b8d6bE38C198634828187F482f4874B\",\n /* Deployed 2026-09-25 with the rest of the release.\n feeBps 10 inside an immutable maxFeeBps 50; owner is the Safe of record. */\n fillRouter: \"0x19783226D9b43E2B3fC7401ae5507D75e4a2A9bc\",\n clPositionManager: \"0xb3505d48A84651c104a02D41B2b9D8CB84dFEC33\",\n binPositionManager: \"0x965b1D98BB0cd4E0125D78AD17ea4d2D1d62AE6f\",\n clQuoter: \"0x4471e61fE697204908CA97CdF4810EeAf406e9C1\",\n binQuoter: \"0x3544C594f12F7c89aa1D8C596d793b661206Ab17\",\n clPositionDescriptor: \"0xFe386132bE4A3D85267488A1C64061ba691cfc7a\",\n create3Factory: \"0x76473D174Aa17C23FBE49CAb50aAc4ED4d8c678F\",\n /* NOT the canonical 0x0000…78BA3: Sepolia's canonical Permit2 was not\n usable here, so one was deployed. Do not \"correct\" this to the mainnet\n constant. */\n permit2: \"0x31c2F6fcFf4F8759b3Bd5Bf0e1084A055615c768\",\n weth: \"0xfFf9976782d46CC05630D1f6eBAb18b2324d6B14\",\n /* PREDATES `keyOf`/`hasKey`/`totalTaken` and reverts on all three. The dapp\n reads none of them and sums `RevShareTaken` logs instead. */\n revShareHook: \"0x1C86dc775FF3FDADCCF87F132de7a4eb60B6bE28\",\n launchRegistry: \"0x19786475eFB20fB9972c8A07dBfD2Ed785E18D3C\",\n /* Kit v1 was never deployed here and never will be: v2 is the release. */\n launchpadKit: null,\n launchGuardHook: \"0x19787323459816B6E76dF78507363269a9458197\",\n /* The whole v2 stack, deployed 2026-09-25 from the release commit and exercised\n live: two launches, two swaps, the creator\n tax taken, settled and claimed. Every owner is the Safe of record. */\n launchpadV2: {\n launchpadKitV2: \"0x1978DC12388ee2feda6cFDfD7245F543fB019cb8\",\n launchLegs: \"0x1978367629505f09d16AEd93616A643E25a71550\",\n launchTokenFactory: \"0x1978c70a0e59A6b52477ce34dce050CfC3E4b4A5\",\n clLPLocker: \"0x1978D33E07d2ED2E155c3F168E3510D027C49A48\",\n binLPLocker: \"0x19787F213d0988005934A2F87dBD8E5c5E7A0d5E\",\n clLaunchGuardHook: \"0x19787323459816B6E76dF78507363269a9458197\",\n binLaunchGuardHook: \"0x1978A3f6d11C9a6cAEa0Df547CbE54A3fa7280f7\",\n padFactory: \"0x19781ED911c36E5303c972545A31736C94D18604\",\n },\n splitFactory: \"0x19789714b1fEa5dfECF0761cbAf4Fd1B6FC0728D\",\n /* Latch utilities, REDEPLOYED 2026-09-25 by the RELEASE script\n (script/DeployLatchUtilities.s.sol), not by the 2026-09-19 showcase — the rule\n is that every release contract is deployed by its own script, and the showcase\n is a Sepolia convenience that hard-codes the superseded Safe. Owner and fee\n recipient: the Safe of record. TESTNET fee 0.0001 ETH per action, cap 10x,\n 1-day notice; the mainnet price is set by the mainnet deploy, not here.\n The 2026-09-19 set (0x9D73…, 0x502d…, 0xDe2e…, 0xbB34…) is still on chain and\n still works; nothing reads it. */\n positionLock: \"0x1979B9a756D00149F695C88c2f37f88228746Df9\",\n tokenLock: \"0x1979481aad83348b537b12a320bd3771e0836Db4\",\n multisend: \"0x1979f6410B204A31E4f94587768a910Abd0aFAB4\",\n dropFactory: \"0x197961B758267BE455c9dEb94f9525978d30b392\",\n durationClocks: {\n /* 0x1C86… is the OLD block-based hook and stays the address book's\n `revShareHook` until a consumer migrates; the 2026-09-25 redeploy\n 0x197837e5… is timestamp-based and is listed in `revShareHooks` below. */\n revShareHook: \"contract-block\",\n launchpadKit: null,\n launchGuardHook: \"timestamp\",\n },\n revShareHooks: [\n {\n address: \"0x1C86dc775FF3FDADCCF87F132de7a4eb60B6bE28\",\n durationClock: \"contract-block\",\n pendingShape: \"block-no-expiry\",\n status: \"current\",\n note: \"Predates proposal expiry. An L1, so the contract block clock is the RPC one (12 s).\",\n },\n {\n /* Deployed 2026-09-25 by the release script (ops/deploy/sepolia-deployment.json,\n 19,733 bytes). Read back 2026-09-26 by eth_call:\n 19,733 bytes of code, getHooksRegistrationBitmap() 0x0881, CLOCK_MODE \"mode=timestamp\",\n CONFIG_PROPOSAL_TTL_SECONDS 259,200, owner() the Safe of record 0xeA79…a038, vault() and\n poolManager() this chain's Vault and CL pool manager. */\n address: \"0x197837E55B7EA86120743d8F6eD9d4bbe50FC9CA\",\n durationClock: \"timestamp\",\n pendingShape: \"timestamp-with-expiry\",\n status: \"live\",\n note: \"Release-commit timestamp build: seconds-based delay and a 3-day proposal TTL. Not yet the address book's revShareHook.\",\n },\n ],\n tokens: [\n {\n address: \"0xfFf9976782d46CC05630D1f6eBAb18b2324d6B14\",\n symbol: \"WETH\",\n name: \"Wrapped Ether\",\n decimals: 18,\n isTestToken: false,\n },\n {\n address: \"0x5c00ea81EedcED610c5174b9D20F83Ca245e269C\",\n symbol: \"ltUSD\",\n name: \"Latch Test USD\",\n decimals: 18,\n isTestToken: true,\n },\n {\n address: \"0xbEf6E0f94Fe1a96390Eb25D32759aad85fD1f067\",\n symbol: \"ltETH\",\n name: \"Latch Test ETH\",\n decimals: 18,\n isTestToken: true,\n },\n ],\n },\n};\n/**\n * Every Latch contract on every chain.\n *\n * This annotation is the shape check for `DEPLOYMENTS_TABLE` above: a typo, a\n * wrong type or a missing required address fails HERE and names the field.\n */\nexport const LATCH_DEPLOYMENTS = DEPLOYMENTS_TABLE;\n/** Every chain in the table, ascending. Derived — never written out by hand. */\nexport const LATCH_CHAIN_IDS = Object.keys(DEPLOYMENTS_TABLE).map(Number).sort((a, b) => a - b);\n/**\n * The mainnets only. Iterate this, not `LATCH_CHAIN_IDS`, anywhere a testnet\n * being present would be a bug.\n *\n * BOTH LISTS EXIST ON PURPOSE, and the reasoning is worth keeping because the\n * obvious move is to ship one. Dropping Sepolia was considered and rejected: a\n * developer building a hook needs a deployed Latch to test against before\n * putting one in a real swap path, and a mainnet-only address book means they\n * hand-type testnet addresses — which is precisely the drift this module was\n * created to end.\n *\n * The real risk was never that a testnet is listed. It is that one gets\n * SELECTED by a default nobody revisited. So the answer is a narrower list for\n * the code paths where that would matter, rather than a smaller table that\n * makes honest testing harder.\n *\n * `LATCH_DEPLOYMENTS[id].isMainnet` is the per-record form of the same fact.\n */\nexport const LATCH_MAINNET_CHAIN_IDS = LATCH_CHAIN_IDS.filter((id) => LATCH_DEPLOYMENTS[id].isMainnet);\n/**\n * Native currency per chain, split out for callers that want only this.\n *\n * Derived. Do not restate a chain here: a hand-written map is how a third chain\n * gets a fourth-hand ETH entry with the wrong symbol on a chain whose gas token\n * is not ether at all.\n */\nexport const NATIVE_CURRENCY = Object.freeze(Object.fromEntries(LATCH_CHAIN_IDS.map((id) => [id, LATCH_DEPLOYMENTS[id].nativeCurrency])));\n/**\n * Contracts whose address is a MOVING TARGET.\n *\n * Not a style note — a warning about failure modes. Each of these can be\n * replaced without anything downstream noticing, because the retired instance\n * keeps answering: a dead `LatchRegistry` returns a count, a superseded\n * `RevShareHook` returns balances for pools nobody uses any more, a replaced\n * timelock still reports its delay. None of that throws.\n *\n * The correct handling is to read them from this module at call time rather\n * than snapshot them into a config, a database or a deployed front end's build.\n * Everything NOT on this list — the Vault above all — is immutable or has never\n * been replaced.\n */\nexport const REDEPLOYABLE_CONTRACTS = [\n \"registry\",\n \"revShareHook\",\n \"timelockCustody\",\n \"timelockPolicy\",\n \"feeController\",\n \"launchRegistry\",\n \"launchpadKit\",\n \"launchGuardHook\",\n];\n/**\n * Whether the address book knows this chain. Derived from the table's keys, so\n * a chain added there is recognised everywhere without a second edit.\n */\nexport function isLatchChainId(chainId) {\n return Object.prototype.hasOwnProperty.call(DEPLOYMENTS_TABLE, chainId);\n}\n/**\n * The deployment for a chain, or `undefined`.\n *\n * `undefined` rather than a throw, because \"Latch is not on this chain\" is a\n * perfectly ordinary answer that a UI should render, not an exception.\n */\nexport function getDeployment(chainId) {\n return isLatchChainId(chainId) ? LATCH_DEPLOYMENTS[chainId] : undefined;\n}\n/**\n * The deployment for a chain, or a thrown error naming the supported chains.\n *\n * For call sites that cannot proceed — a swap builder, a deploy script. Failing\n * loudly beats defaulting to another chain, which is how a testnet call ends up\n * signed against mainnet.\n */\nexport function requireDeployment(chainId) {\n const d = getDeployment(chainId);\n if (d === undefined) {\n throw new Error(`Latch is not deployed on chain ${chainId}. Deployed: ` +\n LATCH_CHAIN_IDS.map((id) => `${id} (${LATCH_DEPLOYMENTS[id].name})`).join(\", \") +\n \".\");\n }\n return d;\n}\n/**\n * One contract address, or a thrown error that says which chain lacks it.\n *\n * The point is the message. `readContract` against `null` throws something\n * about an invalid address; this throws \"LaunchpadKit is not deployed on\n * Robinhood Chain (4663)\", which is the sentence the caller needed.\n */\nexport function requireContract(deployment, key) {\n const value = deployment[key];\n if (value === null) {\n throw new Error(`${key} is not deployed on ${deployment.name} (${deployment.chainId}). ` +\n \"It is recorded as null in @latchprotocol/sdk deployments, which means \" +\n \"not-yet-deployed — handle its absence rather than substituting an address.\");\n }\n return value;\n}\n/** A known token on a chain, by symbol (case-insensitive). `undefined` if unknown. */\nexport function tokenBySymbol(chainId, symbol) {\n const wanted = symbol.toLowerCase();\n return LATCH_DEPLOYMENTS[chainId].tokens.find((t) => t.symbol.toLowerCase() === wanted);\n}\n/** A known token on a chain, by address (case-insensitive). `undefined` if unknown. */\nexport function tokenByAddress(chainId, address) {\n const wanted = address.toLowerCase();\n return LATCH_DEPLOYMENTS[chainId].tokens.find((t) => t.address.toLowerCase() === wanted);\n}\n/**\n * The record for a `RevShareHook` at `address` on `chainId`, current or retired,\n * or `undefined` when the address book does not know it.\n *\n * `undefined` is a real answer. A tenant's own hook, or a hook deployed after\n * this build of the SDK, has an unknown shape: render \"unrecognised hook\"\n * rather than decoding it through a layout that might be wrong.\n */\nexport function revShareHookRecord(chainId, address) {\n const d = getDeployment(chainId);\n if (d === undefined)\n return undefined;\n const wanted = address.toLowerCase();\n return d.revShareHooks.find((h) => h.address.toLowerCase() === wanted);\n}\n/**\n * The duration clock of one of a deployment's time-bounded contracts, or a\n * thrown error when that contract is not deployed on this chain.\n */\nexport function requireDurationClock(deployment, key) {\n const clock = deployment.durationClocks[key];\n if (clock === null) {\n throw new Error(`${key} is not deployed on ${deployment.name} (${deployment.chainId}), so it has no clock.`);\n }\n return clock;\n}\n/**\n * The kit v2 stack on a chain, every address present, or a thrown error naming\n * what is missing. A partially filled group is a deployment in progress: a kit\n * whose lockers or guards are not recorded cannot be checked, so it is refused.\n */\nexport function requireLaunchpadV2(deployment) {\n const g = deployment.launchpadV2;\n const missing = Object.keys(g).filter((k) => g[k] === null);\n if (missing.length > 0) {\n throw new Error(`LaunchpadKitV2 is not deployed on ${deployment.name} (${deployment.chainId}): ${missing.join(\", \")} ` +\n \"recorded as null in @latchprotocol/sdk deployments.\");\n }\n return g;\n}\nexport function explorerTxUrl(chainId, hash) {\n return `${LATCH_DEPLOYMENTS[chainId].explorer}/tx/${hash}`;\n}\nexport function explorerAddressUrl(chainId, address) {\n return `${LATCH_DEPLOYMENTS[chainId].explorer}/address/${address}`;\n}\n// Safe v1.4.1 contract addresses per chain (see ./safe.ts). Re-exported here so\n// the `deployments` namespace and the `./deployments` subpath carry them.\nexport { SAFE_CONTRACTS, SAFE_CONTRACT_CHAIN_IDS, SAFE_TX_TYPES, requireSafeContracts, safeContractsFor } from \"./safe.js\";\n//# sourceMappingURL=index.js.map","// SPDX-License-Identifier: MIT\n// -----------------------------------------------------------------------------\n// GENERATED FILE - DO NOT EDIT BY HAND.\n// Produced by scripts/generate-launchpad-abi.mjs from the compiled contract ABIs.\n// Re-run `npm run generate` after the contracts are rebuilt.\n// -----------------------------------------------------------------------------\n/**\n * `LaunchpadKit` - the one-call launch factory.\n *\n * 25 errors, 4 events, 14 functions - curated from the compiled artifact, not the full ABI.\n */\nexport const LAUNCHPAD_KIT_ABI = [\n {\n \"type\": \"error\",\n \"name\": \"AddressEmptyCode\",\n \"inputs\": [\n {\n \"name\": \"target\",\n \"type\": \"address\",\n \"internalType\": \"address\"\n }\n ]\n },\n {\n \"type\": \"error\",\n \"name\": \"AddressInsufficientBalance\",\n \"inputs\": [\n {\n \"name\": \"account\",\n \"type\": \"address\",\n \"internalType\": \"address\"\n }\n ]\n },\n {\n \"type\": \"error\",\n \"name\": \"FailedInnerCall\",\n \"inputs\": []\n },\n {\n \"type\": \"error\",\n \"name\": \"HookClockMismatch\",\n \"inputs\": [\n {\n \"name\": \"hookClockMode\",\n \"type\": \"string\",\n \"internalType\": \"string\"\n }\n ]\n },\n {\n \"type\": \"error\",\n \"name\": \"HookPoolManagerMismatch\",\n \"inputs\": [\n {\n \"name\": \"expected\",\n \"type\": \"address\",\n \"internalType\": \"address\"\n },\n {\n \"name\": \"actual\",\n \"type\": \"address\",\n \"internalType\": \"address\"\n }\n ]\n },\n {\n \"type\": \"error\",\n \"name\": \"IdenticalCurrencies\",\n \"inputs\": [\n {\n \"name\": \"currency\",\n \"type\": \"address\",\n \"internalType\": \"address\"\n }\n ]\n },\n {\n \"type\": \"error\",\n \"name\": \"InvalidTick\",\n \"inputs\": [\n {\n \"name\": \"tick\",\n \"type\": \"int24\",\n \"internalType\": \"int24\"\n }\n ]\n },\n {\n \"type\": \"error\",\n \"name\": \"InvalidTickRange\",\n \"inputs\": [\n {\n \"name\": \"tickLower\",\n \"type\": \"int24\",\n \"internalType\": \"int24\"\n },\n {\n \"name\": \"tickUpper\",\n \"type\": \"int24\",\n \"internalType\": \"int24\"\n }\n ]\n },\n {\n \"type\": \"error\",\n \"name\": \"LaunchAlreadyExists\",\n \"inputs\": [\n {\n \"name\": \"poolId\",\n \"type\": \"bytes32\",\n \"internalType\": \"PoolId\"\n }\n ]\n },\n {\n \"type\": \"error\",\n \"name\": \"LaunchTokenCannotBeNative\",\n \"inputs\": []\n },\n {\n \"type\": \"error\",\n \"name\": \"LaunchTokenHasNoCode\",\n \"inputs\": [\n {\n \"name\": \"launchToken\",\n \"type\": \"address\",\n \"internalType\": \"address\"\n }\n ]\n },\n {\n \"type\": \"error\",\n \"name\": \"MaxBuyRequiredByPreset\",\n \"inputs\": [\n {\n \"name\": \"preset\",\n \"type\": \"uint8\",\n \"internalType\": \"enum Preset\"\n }\n ]\n },\n {\n \"type\": \"error\",\n \"name\": \"NativeValueMismatch\",\n \"inputs\": [\n {\n \"name\": \"expected\",\n \"type\": \"uint256\",\n \"internalType\": \"uint256\"\n },\n {\n \"name\": \"actual\",\n \"type\": \"uint256\",\n \"internalType\": \"uint256\"\n }\n ]\n },\n {\n \"type\": \"error\",\n \"name\": \"NoParametersForCustomPreset\",\n \"inputs\": []\n },\n {\n \"type\": \"error\",\n \"name\": \"NotLaunchOperator\",\n \"inputs\": [\n {\n \"name\": \"poolId\",\n \"type\": \"bytes32\",\n \"internalType\": \"PoolId\"\n },\n {\n \"name\": \"caller\",\n \"type\": \"address\",\n \"internalType\": \"address\"\n }\n ]\n },\n {\n \"type\": \"error\",\n \"name\": \"ReentrancyGuardReentrantCall\",\n \"inputs\": []\n },\n {\n \"type\": \"error\",\n \"name\": \"RegistryNotConfigured\",\n \"inputs\": []\n },\n {\n \"type\": \"error\",\n \"name\": \"SafeCastOverflow\",\n \"inputs\": []\n },\n {\n \"type\": \"error\",\n \"name\": \"SafeERC20FailedOperation\",\n \"inputs\": [\n {\n \"name\": \"token\",\n \"type\": \"address\",\n \"internalType\": \"address\"\n }\n ]\n },\n {\n \"type\": \"error\",\n \"name\": \"SeedProducesNoLiquidity\",\n \"inputs\": []\n },\n {\n \"type\": \"error\",\n \"name\": \"StartDelayTooLong\",\n \"inputs\": [\n {\n \"name\": \"delaySeconds\",\n \"type\": \"uint256\",\n \"internalType\": \"uint256\"\n }\n ]\n },\n {\n \"type\": \"error\",\n \"name\": \"UnexpectedHookBitmap\",\n \"inputs\": [\n {\n \"name\": \"expected\",\n \"type\": \"uint16\",\n \"internalType\": \"uint16\"\n },\n {\n \"name\": \"actual\",\n \"type\": \"uint16\",\n \"internalType\": \"uint16\"\n }\n ]\n },\n {\n \"type\": \"error\",\n \"name\": \"UnexpectedNativeValue\",\n \"inputs\": [\n {\n \"name\": \"value\",\n \"type\": \"uint256\",\n \"internalType\": \"uint256\"\n }\n ]\n },\n {\n \"type\": \"error\",\n \"name\": \"UnknownLaunch\",\n \"inputs\": [\n {\n \"name\": \"poolId\",\n \"type\": \"bytes32\",\n \"internalType\": \"PoolId\"\n }\n ]\n },\n {\n \"type\": \"error\",\n \"name\": \"ZeroAddress\",\n \"inputs\": []\n },\n {\n \"type\": \"event\",\n \"name\": \"HookListed\",\n \"inputs\": [\n {\n \"name\": \"hook\",\n \"type\": \"address\",\n \"indexed\": true,\n \"internalType\": \"address\"\n },\n {\n \"name\": \"steward\",\n \"type\": \"address\",\n \"indexed\": true,\n \"internalType\": \"address\"\n }\n ],\n \"anonymous\": false\n },\n {\n \"type\": \"event\",\n \"name\": \"LaunchCreated\",\n \"inputs\": [\n {\n \"name\": \"poolId\",\n \"type\": \"bytes32\",\n \"indexed\": true,\n \"internalType\": \"PoolId\"\n },\n {\n \"name\": \"launchToken\",\n \"type\": \"address\",\n \"indexed\": true,\n \"internalType\": \"address\"\n },\n {\n \"name\": \"operator\",\n \"type\": \"address\",\n \"indexed\": true,\n \"internalType\": \"address\"\n },\n {\n \"name\": \"quoteToken\",\n \"type\": \"address\",\n \"indexed\": false,\n \"internalType\": \"address\"\n },\n {\n \"name\": \"startTime\",\n \"type\": \"uint40\",\n \"indexed\": false,\n \"internalType\": \"uint40\"\n },\n {\n \"name\": \"decaySeconds\",\n \"type\": \"uint32\",\n \"indexed\": false,\n \"internalType\": \"uint32\"\n },\n {\n \"name\": \"initialFeeBips\",\n \"type\": \"uint24\",\n \"indexed\": false,\n \"internalType\": \"uint24\"\n },\n {\n \"name\": \"finalFeeBips\",\n \"type\": \"uint24\",\n \"indexed\": false,\n \"internalType\": \"uint24\"\n },\n {\n \"name\": \"maxBuyPerTx\",\n \"type\": \"uint128\",\n \"indexed\": false,\n \"internalType\": \"uint128\"\n },\n {\n \"name\": \"launchTokenIsCurrency0\",\n \"type\": \"bool\",\n \"indexed\": false,\n \"internalType\": \"bool\"\n },\n {\n \"name\": \"preset\",\n \"type\": \"uint8\",\n \"indexed\": false,\n \"internalType\": \"enum Preset\"\n }\n ],\n \"anonymous\": false\n },\n {\n \"type\": \"event\",\n \"name\": \"LaunchReconfigured\",\n \"inputs\": [\n {\n \"name\": \"poolId\",\n \"type\": \"bytes32\",\n \"indexed\": true,\n \"internalType\": \"PoolId\"\n },\n {\n \"name\": \"operator\",\n \"type\": \"address\",\n \"indexed\": true,\n \"internalType\": \"address\"\n },\n {\n \"name\": \"startTime\",\n \"type\": \"uint40\",\n \"indexed\": false,\n \"internalType\": \"uint40\"\n },\n {\n \"name\": \"decaySeconds\",\n \"type\": \"uint32\",\n \"indexed\": false,\n \"internalType\": \"uint32\"\n },\n {\n \"name\": \"initialFeeBips\",\n \"type\": \"uint24\",\n \"indexed\": false,\n \"internalType\": \"uint24\"\n },\n {\n \"name\": \"finalFeeBips\",\n \"type\": \"uint24\",\n \"indexed\": false,\n \"internalType\": \"uint24\"\n },\n {\n \"name\": \"maxBuyPerTx\",\n \"type\": \"uint128\",\n \"indexed\": false,\n \"internalType\": \"uint128\"\n },\n {\n \"name\": \"enabled\",\n \"type\": \"bool\",\n \"indexed\": false,\n \"internalType\": \"bool\"\n }\n ],\n \"anonymous\": false\n },\n {\n \"type\": \"event\",\n \"name\": \"LaunchSeeded\",\n \"inputs\": [\n {\n \"name\": \"poolId\",\n \"type\": \"bytes32\",\n \"indexed\": true,\n \"internalType\": \"PoolId\"\n },\n {\n \"name\": \"positionTokenId\",\n \"type\": \"uint256\",\n \"indexed\": true,\n \"internalType\": \"uint256\"\n },\n {\n \"name\": \"positionRecipient\",\n \"type\": \"address\",\n \"indexed\": true,\n \"internalType\": \"address\"\n },\n {\n \"name\": \"liquidity\",\n \"type\": \"uint128\",\n \"indexed\": false,\n \"internalType\": \"uint128\"\n },\n {\n \"name\": \"amount0Spent\",\n \"type\": \"uint256\",\n \"indexed\": false,\n \"internalType\": \"uint256\"\n },\n {\n \"name\": \"amount1Spent\",\n \"type\": \"uint256\",\n \"indexed\": false,\n \"internalType\": \"uint256\"\n }\n ],\n \"anonymous\": false\n },\n {\n \"type\": \"function\",\n \"name\": \"CLOCK_MODE\",\n \"inputs\": [],\n \"outputs\": [\n {\n \"name\": \"\",\n \"type\": \"string\",\n \"internalType\": \"string\"\n }\n ],\n \"stateMutability\": \"view\"\n },\n {\n \"type\": \"function\",\n \"name\": \"EXPECTED_HOOK_BITMAP\",\n \"inputs\": [],\n \"outputs\": [\n {\n \"name\": \"\",\n \"type\": \"uint16\",\n \"internalType\": \"uint16\"\n }\n ],\n \"stateMutability\": \"view\"\n },\n {\n \"type\": \"function\",\n \"name\": \"clPoolManager\",\n \"inputs\": [],\n \"outputs\": [\n {\n \"name\": \"\",\n \"type\": \"address\",\n \"internalType\": \"contract ICLPoolManager\"\n }\n ],\n \"stateMutability\": \"view\"\n },\n {\n \"type\": \"function\",\n \"name\": \"computePoolKey\",\n \"inputs\": [\n {\n \"name\": \"launchToken\",\n \"type\": \"address\",\n \"internalType\": \"address\"\n },\n {\n \"name\": \"quoteToken\",\n \"type\": \"address\",\n \"internalType\": \"address\"\n },\n {\n \"name\": \"tickSpacing\",\n \"type\": \"int24\",\n \"internalType\": \"int24\"\n }\n ],\n \"outputs\": [\n {\n \"name\": \"key\",\n \"type\": \"tuple\",\n \"internalType\": \"struct PoolKey\",\n \"components\": [\n {\n \"name\": \"currency0\",\n \"type\": \"address\",\n \"internalType\": \"Currency\"\n },\n {\n \"name\": \"currency1\",\n \"type\": \"address\",\n \"internalType\": \"Currency\"\n },\n {\n \"name\": \"hooks\",\n \"type\": \"address\",\n \"internalType\": \"contract IHooks\"\n },\n {\n \"name\": \"poolManager\",\n \"type\": \"address\",\n \"internalType\": \"contract IPoolManager\"\n },\n {\n \"name\": \"fee\",\n \"type\": \"uint24\",\n \"internalType\": \"uint24\"\n },\n {\n \"name\": \"parameters\",\n \"type\": \"bytes32\",\n \"internalType\": \"bytes32\"\n }\n ]\n },\n {\n \"name\": \"poolId\",\n \"type\": \"bytes32\",\n \"internalType\": \"PoolId\"\n },\n {\n \"name\": \"launchTokenIsCurrency0\",\n \"type\": \"bool\",\n \"internalType\": \"bool\"\n }\n ],\n \"stateMutability\": \"view\"\n },\n {\n \"type\": \"function\",\n \"name\": \"createLaunch\",\n \"inputs\": [\n {\n \"name\": \"p\",\n \"type\": \"tuple\",\n \"internalType\": \"struct LaunchParams\",\n \"components\": [\n {\n \"name\": \"launchToken\",\n \"type\": \"address\",\n \"internalType\": \"address\"\n },\n {\n \"name\": \"quoteToken\",\n \"type\": \"address\",\n \"internalType\": \"address\"\n },\n {\n \"name\": \"tickSpacing\",\n \"type\": \"int24\",\n \"internalType\": \"int24\"\n },\n {\n \"name\": \"sqrtPriceX96\",\n \"type\": \"uint160\",\n \"internalType\": \"uint160\"\n },\n {\n \"name\": \"preset\",\n \"type\": \"uint8\",\n \"internalType\": \"enum Preset\"\n },\n {\n \"name\": \"initialFeeBips\",\n \"type\": \"uint24\",\n \"internalType\": \"uint24\"\n },\n {\n \"name\": \"finalFeeBips\",\n \"type\": \"uint24\",\n \"internalType\": \"uint24\"\n },\n {\n \"name\": \"decaySeconds\",\n \"type\": \"uint32\",\n \"internalType\": \"uint32\"\n },\n {\n \"name\": \"enabled\",\n \"type\": \"bool\",\n \"internalType\": \"bool\"\n },\n {\n \"name\": \"startDelaySeconds\",\n \"type\": \"uint32\",\n \"internalType\": \"uint32\"\n },\n {\n \"name\": \"maxBuyPerTx\",\n \"type\": \"uint128\",\n \"internalType\": \"uint128\"\n },\n {\n \"name\": \"launchOperator\",\n \"type\": \"address\",\n \"internalType\": \"address\"\n },\n {\n \"name\": \"seed\",\n \"type\": \"tuple\",\n \"internalType\": \"struct SeedParams\",\n \"components\": [\n {\n \"name\": \"tickLower\",\n \"type\": \"int24\",\n \"internalType\": \"int24\"\n },\n {\n \"name\": \"tickUpper\",\n \"type\": \"int24\",\n \"internalType\": \"int24\"\n },\n {\n \"name\": \"launchTokenAmount\",\n \"type\": \"uint128\",\n \"internalType\": \"uint128\"\n },\n {\n \"name\": \"quoteTokenAmount\",\n \"type\": \"uint128\",\n \"internalType\": \"uint128\"\n },\n {\n \"name\": \"positionRecipient\",\n \"type\": \"address\",\n \"internalType\": \"address\"\n },\n {\n \"name\": \"deadline\",\n \"type\": \"uint256\",\n \"internalType\": \"uint256\"\n }\n ]\n },\n {\n \"name\": \"listing\",\n \"type\": \"tuple\",\n \"internalType\": \"struct HookListingParams\",\n \"components\": [\n {\n \"name\": \"register\",\n \"type\": \"bool\",\n \"internalType\": \"bool\"\n },\n {\n \"name\": \"steward\",\n \"type\": \"address\",\n \"internalType\": \"address\"\n },\n {\n \"name\": \"metadata\",\n \"type\": \"tuple\",\n \"internalType\": \"struct LatchMetadata\",\n \"components\": [\n {\n \"name\": \"name\",\n \"type\": \"string\",\n \"internalType\": \"string\"\n },\n {\n \"name\": \"description\",\n \"type\": \"string\",\n \"internalType\": \"string\"\n },\n {\n \"name\": \"sourceURI\",\n \"type\": \"string\",\n \"internalType\": \"string\"\n },\n {\n \"name\": \"auditURI\",\n \"type\": \"string\",\n \"internalType\": \"string\"\n },\n {\n \"name\": \"chainIds\",\n \"type\": \"uint256[]\",\n \"internalType\": \"uint256[]\"\n }\n ]\n }\n ]\n }\n ]\n }\n ],\n \"outputs\": [\n {\n \"name\": \"result\",\n \"type\": \"tuple\",\n \"internalType\": \"struct LaunchResult\",\n \"components\": [\n {\n \"name\": \"key\",\n \"type\": \"tuple\",\n \"internalType\": \"struct PoolKey\",\n \"components\": [\n {\n \"name\": \"currency0\",\n \"type\": \"address\",\n \"internalType\": \"Currency\"\n },\n {\n \"name\": \"currency1\",\n \"type\": \"address\",\n \"internalType\": \"Currency\"\n },\n {\n \"name\": \"hooks\",\n \"type\": \"address\",\n \"internalType\": \"contract IHooks\"\n },\n {\n \"name\": \"poolManager\",\n \"type\": \"address\",\n \"internalType\": \"contract IPoolManager\"\n },\n {\n \"name\": \"fee\",\n \"type\": \"uint24\",\n \"internalType\": \"uint24\"\n },\n {\n \"name\": \"parameters\",\n \"type\": \"bytes32\",\n \"internalType\": \"bytes32\"\n }\n ]\n },\n {\n \"name\": \"poolId\",\n \"type\": \"bytes32\",\n \"internalType\": \"PoolId\"\n },\n {\n \"name\": \"startTime\",\n \"type\": \"uint40\",\n \"internalType\": \"uint40\"\n },\n {\n \"name\": \"decaySeconds\",\n \"type\": \"uint32\",\n \"internalType\": \"uint32\"\n },\n {\n \"name\": \"positionTokenId\",\n \"type\": \"uint256\",\n \"internalType\": \"uint256\"\n },\n {\n \"name\": \"liquiditySeeded\",\n \"type\": \"uint128\",\n \"internalType\": \"uint128\"\n },\n {\n \"name\": \"launchTokenIsCurrency0\",\n \"type\": \"bool\",\n \"internalType\": \"bool\"\n }\n ]\n }\n ],\n \"stateMutability\": \"payable\"\n },\n {\n \"type\": \"function\",\n \"name\": \"getLaunchRecord\",\n \"inputs\": [\n {\n \"name\": \"poolId\",\n \"type\": \"bytes32\",\n \"internalType\": \"PoolId\"\n }\n ],\n \"outputs\": [\n {\n \"name\": \"\",\n \"type\": \"tuple\",\n \"internalType\": \"struct LaunchRecord\",\n \"components\": [\n {\n \"name\": \"operator\",\n \"type\": \"address\",\n \"internalType\": \"address\"\n },\n {\n \"name\": \"launchTokenIsCurrency0\",\n \"type\": \"bool\",\n \"internalType\": \"bool\"\n },\n {\n \"name\": \"launchToken\",\n \"type\": \"address\",\n \"internalType\": \"address\"\n }\n ]\n }\n ],\n \"stateMutability\": \"view\"\n },\n {\n \"type\": \"function\",\n \"name\": \"hook\",\n \"inputs\": [],\n \"outputs\": [\n {\n \"name\": \"\",\n \"type\": \"address\",\n \"internalType\": \"contract LaunchGuardHook\"\n }\n ],\n \"stateMutability\": \"view\"\n },\n {\n \"type\": \"function\",\n \"name\": \"hookBitmap\",\n \"inputs\": [],\n \"outputs\": [\n {\n \"name\": \"\",\n \"type\": \"uint16\",\n \"internalType\": \"uint16\"\n }\n ],\n \"stateMutability\": \"view\"\n },\n {\n \"type\": \"function\",\n \"name\": \"listHook\",\n \"inputs\": [\n {\n \"name\": \"metadata\",\n \"type\": \"tuple\",\n \"internalType\": \"struct LatchMetadata\",\n \"components\": [\n {\n \"name\": \"name\",\n \"type\": \"string\",\n \"internalType\": \"string\"\n },\n {\n \"name\": \"description\",\n \"type\": \"string\",\n \"internalType\": \"string\"\n },\n {\n \"name\": \"sourceURI\",\n \"type\": \"string\",\n \"internalType\": \"string\"\n },\n {\n \"name\": \"auditURI\",\n \"type\": \"string\",\n \"internalType\": \"string\"\n },\n {\n \"name\": \"chainIds\",\n \"type\": \"uint256[]\",\n \"internalType\": \"uint256[]\"\n }\n ]\n },\n {\n \"name\": \"steward\",\n \"type\": \"address\",\n \"internalType\": \"address\"\n }\n ],\n \"outputs\": [\n {\n \"name\": \"listed\",\n \"type\": \"bool\",\n \"internalType\": \"bool\"\n }\n ],\n \"stateMutability\": \"nonpayable\"\n },\n {\n \"type\": \"function\",\n \"name\": \"permit2\",\n \"inputs\": [],\n \"outputs\": [\n {\n \"name\": \"\",\n \"type\": \"address\",\n \"internalType\": \"contract IAllowanceTransfer\"\n }\n ],\n \"stateMutability\": \"view\"\n },\n {\n \"type\": \"function\",\n \"name\": \"positionManager\",\n \"inputs\": [],\n \"outputs\": [\n {\n \"name\": \"\",\n \"type\": \"address\",\n \"internalType\": \"contract ICLPositionManager\"\n }\n ],\n \"stateMutability\": \"view\"\n },\n {\n \"type\": \"function\",\n \"name\": \"previewSchedule\",\n \"inputs\": [\n {\n \"name\": \"p\",\n \"type\": \"tuple\",\n \"internalType\": \"struct LaunchParams\",\n \"components\": [\n {\n \"name\": \"launchToken\",\n \"type\": \"address\",\n \"internalType\": \"address\"\n },\n {\n \"name\": \"quoteToken\",\n \"type\": \"address\",\n \"internalType\": \"address\"\n },\n {\n \"name\": \"tickSpacing\",\n \"type\": \"int24\",\n \"internalType\": \"int24\"\n },\n {\n \"name\": \"sqrtPriceX96\",\n \"type\": \"uint160\",\n \"internalType\": \"uint160\"\n },\n {\n \"name\": \"preset\",\n \"type\": \"uint8\",\n \"internalType\": \"enum Preset\"\n },\n {\n \"name\": \"initialFeeBips\",\n \"type\": \"uint24\",\n \"internalType\": \"uint24\"\n },\n {\n \"name\": \"finalFeeBips\",\n \"type\": \"uint24\",\n \"internalType\": \"uint24\"\n },\n {\n \"name\": \"decaySeconds\",\n \"type\": \"uint32\",\n \"internalType\": \"uint32\"\n },\n {\n \"name\": \"enabled\",\n \"type\": \"bool\",\n \"internalType\": \"bool\"\n },\n {\n \"name\": \"startDelaySeconds\",\n \"type\": \"uint32\",\n \"internalType\": \"uint32\"\n },\n {\n \"name\": \"maxBuyPerTx\",\n \"type\": \"uint128\",\n \"internalType\": \"uint128\"\n },\n {\n \"name\": \"launchOperator\",\n \"type\": \"address\",\n \"internalType\": \"address\"\n },\n {\n \"name\": \"seed\",\n \"type\": \"tuple\",\n \"internalType\": \"struct SeedParams\",\n \"components\": [\n {\n \"name\": \"tickLower\",\n \"type\": \"int24\",\n \"internalType\": \"int24\"\n },\n {\n \"name\": \"tickUpper\",\n \"type\": \"int24\",\n \"internalType\": \"int24\"\n },\n {\n \"name\": \"launchTokenAmount\",\n \"type\": \"uint128\",\n \"internalType\": \"uint128\"\n },\n {\n \"name\": \"quoteTokenAmount\",\n \"type\": \"uint128\",\n \"internalType\": \"uint128\"\n },\n {\n \"name\": \"positionRecipient\",\n \"type\": \"address\",\n \"internalType\": \"address\"\n },\n {\n \"name\": \"deadline\",\n \"type\": \"uint256\",\n \"internalType\": \"uint256\"\n }\n ]\n },\n {\n \"name\": \"listing\",\n \"type\": \"tuple\",\n \"internalType\": \"struct HookListingParams\",\n \"components\": [\n {\n \"name\": \"register\",\n \"type\": \"bool\",\n \"internalType\": \"bool\"\n },\n {\n \"name\": \"steward\",\n \"type\": \"address\",\n \"internalType\": \"address\"\n },\n {\n \"name\": \"metadata\",\n \"type\": \"tuple\",\n \"internalType\": \"struct LatchMetadata\",\n \"components\": [\n {\n \"name\": \"name\",\n \"type\": \"string\",\n \"internalType\": \"string\"\n },\n {\n \"name\": \"description\",\n \"type\": \"string\",\n \"internalType\": \"string\"\n },\n {\n \"name\": \"sourceURI\",\n \"type\": \"string\",\n \"internalType\": \"string\"\n },\n {\n \"name\": \"auditURI\",\n \"type\": \"string\",\n \"internalType\": \"string\"\n },\n {\n \"name\": \"chainIds\",\n \"type\": \"uint256[]\",\n \"internalType\": \"uint256[]\"\n }\n ]\n }\n ]\n }\n ]\n }\n ],\n \"outputs\": [\n {\n \"name\": \"cfg\",\n \"type\": \"tuple\",\n \"internalType\": \"struct LaunchGuardHook.LaunchConfig\",\n \"components\": [\n {\n \"name\": \"startTime\",\n \"type\": \"uint40\",\n \"internalType\": \"uint40\"\n },\n {\n \"name\": \"decaySeconds\",\n \"type\": \"uint32\",\n \"internalType\": \"uint32\"\n },\n {\n \"name\": \"initialFeeBips\",\n \"type\": \"uint24\",\n \"internalType\": \"uint24\"\n },\n {\n \"name\": \"finalFeeBips\",\n \"type\": \"uint24\",\n \"internalType\": \"uint24\"\n },\n {\n \"name\": \"maxBuyPerTx\",\n \"type\": \"uint128\",\n \"internalType\": \"uint128\"\n },\n {\n \"name\": \"launchTokenIsCurrency0\",\n \"type\": \"bool\",\n \"internalType\": \"bool\"\n },\n {\n \"name\": \"enabled\",\n \"type\": \"bool\",\n \"internalType\": \"bool\"\n }\n ]\n }\n ],\n \"stateMutability\": \"view\"\n },\n {\n \"type\": \"function\",\n \"name\": \"reconfigureLaunch\",\n \"inputs\": [\n {\n \"name\": \"key\",\n \"type\": \"tuple\",\n \"internalType\": \"struct PoolKey\",\n \"components\": [\n {\n \"name\": \"currency0\",\n \"type\": \"address\",\n \"internalType\": \"Currency\"\n },\n {\n \"name\": \"currency1\",\n \"type\": \"address\",\n \"internalType\": \"Currency\"\n },\n {\n \"name\": \"hooks\",\n \"type\": \"address\",\n \"internalType\": \"contract IHooks\"\n },\n {\n \"name\": \"poolManager\",\n \"type\": \"address\",\n \"internalType\": \"contract IPoolManager\"\n },\n {\n \"name\": \"fee\",\n \"type\": \"uint24\",\n \"internalType\": \"uint24\"\n },\n {\n \"name\": \"parameters\",\n \"type\": \"bytes32\",\n \"internalType\": \"bytes32\"\n }\n ]\n },\n {\n \"name\": \"cfg\",\n \"type\": \"tuple\",\n \"internalType\": \"struct LaunchGuardHook.LaunchConfig\",\n \"components\": [\n {\n \"name\": \"startTime\",\n \"type\": \"uint40\",\n \"internalType\": \"uint40\"\n },\n {\n \"name\": \"decaySeconds\",\n \"type\": \"uint32\",\n \"internalType\": \"uint32\"\n },\n {\n \"name\": \"initialFeeBips\",\n \"type\": \"uint24\",\n \"internalType\": \"uint24\"\n },\n {\n \"name\": \"finalFeeBips\",\n \"type\": \"uint24\",\n \"internalType\": \"uint24\"\n },\n {\n \"name\": \"maxBuyPerTx\",\n \"type\": \"uint128\",\n \"internalType\": \"uint128\"\n },\n {\n \"name\": \"launchTokenIsCurrency0\",\n \"type\": \"bool\",\n \"internalType\": \"bool\"\n },\n {\n \"name\": \"enabled\",\n \"type\": \"bool\",\n \"internalType\": \"bool\"\n }\n ]\n }\n ],\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\"\n },\n {\n \"type\": \"function\",\n \"name\": \"registry\",\n \"inputs\": [],\n \"outputs\": [\n {\n \"name\": \"\",\n \"type\": \"address\",\n \"internalType\": \"contract IHookRegistryListing\"\n }\n ],\n \"stateMutability\": \"view\"\n }\n];\n/**\n * `LaunchGuardHook` - the CL launch hook the kit drives.\n *\n * 35 errors, 10 events, 37 functions - curated from the compiled artifact, not the full ABI.\n */\nexport const LAUNCH_GUARD_HOOK_ABI = [\n {\n \"type\": \"error\",\n \"name\": \"BuyExceedsMaxPerTx\",\n \"inputs\": [\n {\n \"name\": \"amountIn\",\n \"type\": \"uint256\",\n \"internalType\": \"uint256\"\n },\n {\n \"name\": \"maxBuyPerTx\",\n \"type\": \"uint128\",\n \"internalType\": \"uint128\"\n }\n ]\n },\n {\n \"type\": \"error\",\n \"name\": \"CurrencyHasNoCode\",\n \"inputs\": [\n {\n \"name\": \"currency\",\n \"type\": \"address\",\n \"internalType\": \"address\"\n }\n ]\n },\n {\n \"type\": \"error\",\n \"name\": \"ExactOutputBuyBlockedDuringLaunch\",\n \"inputs\": []\n },\n {\n \"type\": \"error\",\n \"name\": \"HookMismatch\",\n \"inputs\": [\n {\n \"name\": \"declared\",\n \"type\": \"address\",\n \"internalType\": \"address\"\n }\n ]\n },\n {\n \"type\": \"error\",\n \"name\": \"HookNotImplemented\",\n \"inputs\": []\n },\n {\n \"type\": \"error\",\n \"name\": \"InsufficientBackedBalance\",\n \"inputs\": [\n {\n \"name\": \"currency\",\n \"type\": \"address\",\n \"internalType\": \"Currency\"\n },\n {\n \"name\": \"needed\",\n \"type\": \"uint256\",\n \"internalType\": \"uint256\"\n },\n {\n \"name\": \"available\",\n \"type\": \"uint256\",\n \"internalType\": \"uint256\"\n }\n ]\n },\n {\n \"type\": \"error\",\n \"name\": \"InvalidDecaySeconds\",\n \"inputs\": [\n {\n \"name\": \"decaySeconds\",\n \"type\": \"uint32\",\n \"internalType\": \"uint32\"\n }\n ]\n },\n {\n \"type\": \"error\",\n \"name\": \"InvalidFeeSchedule\",\n \"inputs\": [\n {\n \"name\": \"initialFeeBips\",\n \"type\": \"uint24\",\n \"internalType\": \"uint24\"\n },\n {\n \"name\": \"finalFeeBips\",\n \"type\": \"uint24\",\n \"internalType\": \"uint24\"\n }\n ]\n },\n {\n \"type\": \"error\",\n \"name\": \"InvalidRecipient\",\n \"inputs\": []\n },\n {\n \"type\": \"error\",\n \"name\": \"InvalidStartTime\",\n \"inputs\": [\n {\n \"name\": \"startTime\",\n \"type\": \"uint256\",\n \"internalType\": \"uint256\"\n },\n {\n \"name\": \"currentTime\",\n \"type\": \"uint256\",\n \"internalType\": \"uint256\"\n }\n ]\n },\n {\n \"type\": \"error\",\n \"name\": \"InvalidTaxRecipient\",\n \"inputs\": [\n {\n \"name\": \"recipient\",\n \"type\": \"address\",\n \"internalType\": \"address\"\n }\n ]\n },\n {\n \"type\": \"error\",\n \"name\": \"LaunchAlreadyStarted\",\n \"inputs\": [\n {\n \"name\": \"poolId\",\n \"type\": \"bytes32\",\n \"internalType\": \"PoolId\"\n },\n {\n \"name\": \"startTime\",\n \"type\": \"uint256\",\n \"internalType\": \"uint256\"\n }\n ]\n },\n {\n \"type\": \"error\",\n \"name\": \"LaunchNotConfigured\",\n \"inputs\": [\n {\n \"name\": \"poolId\",\n \"type\": \"bytes32\",\n \"internalType\": \"PoolId\"\n }\n ]\n },\n {\n \"type\": \"error\",\n \"name\": \"LaunchPoolReserved\",\n \"inputs\": [\n {\n \"name\": \"token\",\n \"type\": \"address\",\n \"internalType\": \"address\"\n },\n {\n \"name\": \"creator\",\n \"type\": \"address\",\n \"internalType\": \"address\"\n },\n {\n \"name\": \"caller\",\n \"type\": \"address\",\n \"internalType\": \"address\"\n }\n ]\n },\n {\n \"type\": \"error\",\n \"name\": \"NativeNotAccepted\",\n \"inputs\": []\n },\n {\n \"type\": \"error\",\n \"name\": \"NotLaunchOwner\",\n \"inputs\": [\n {\n \"name\": \"poolId\",\n \"type\": \"bytes32\",\n \"internalType\": \"PoolId\"\n },\n {\n \"name\": \"caller\",\n \"type\": \"address\",\n \"internalType\": \"address\"\n }\n ]\n },\n {\n \"type\": \"error\",\n \"name\": \"NotPoolManager\",\n \"inputs\": []\n },\n {\n \"type\": \"error\",\n \"name\": \"NotTokenCreator\",\n \"inputs\": [\n {\n \"name\": \"token\",\n \"type\": \"address\",\n \"internalType\": \"address\"\n },\n {\n \"name\": \"caller\",\n \"type\": \"address\",\n \"internalType\": \"address\"\n }\n ]\n },\n {\n \"type\": \"error\",\n \"name\": \"NothingToClaim\",\n \"inputs\": []\n },\n {\n \"type\": \"error\",\n \"name\": \"NothingToSkim\",\n \"inputs\": [\n {\n \"name\": \"currency\",\n \"type\": \"address\",\n \"internalType\": \"Currency\"\n }\n ]\n },\n {\n \"type\": \"error\",\n \"name\": \"PermissionDependencyMissing\",\n \"inputs\": [\n {\n \"name\": \"declared\",\n \"type\": \"uint16\",\n \"internalType\": \"uint16\"\n }\n ]\n },\n {\n \"type\": \"error\",\n \"name\": \"PoolManagerMismatch\",\n \"inputs\": [\n {\n \"name\": \"declared\",\n \"type\": \"address\",\n \"internalType\": \"address\"\n }\n ]\n },\n {\n \"type\": \"error\",\n \"name\": \"PoolMustUseDynamicFee\",\n \"inputs\": [\n {\n \"name\": \"fee\",\n \"type\": \"uint24\",\n \"internalType\": \"uint24\"\n }\n ]\n },\n {\n \"type\": \"error\",\n \"name\": \"ReentrancyGuardReentrantCall\",\n \"inputs\": []\n },\n {\n \"type\": \"error\",\n \"name\": \"ReservedBitsSet\",\n \"inputs\": [\n {\n \"name\": \"declared\",\n \"type\": \"uint16\",\n \"internalType\": \"uint16\"\n }\n ]\n },\n {\n \"type\": \"error\",\n \"name\": \"TaxExpiryOutOfRange\",\n \"inputs\": [\n {\n \"name\": \"expiresAt\",\n \"type\": \"uint40\",\n \"internalType\": \"uint40\"\n },\n {\n \"name\": \"currentTime\",\n \"type\": \"uint256\",\n \"internalType\": \"uint256\"\n }\n ]\n },\n {\n \"type\": \"error\",\n \"name\": \"TaxIntegratorShareTooHigh\",\n \"inputs\": [\n {\n \"name\": \"bps\",\n \"type\": \"uint16\",\n \"internalType\": \"uint16\"\n }\n ]\n },\n {\n \"type\": \"error\",\n \"name\": \"TaxProtocolShareOutOfBounds\",\n \"inputs\": [\n {\n \"name\": \"bps\",\n \"type\": \"uint16\",\n \"internalType\": \"uint16\"\n }\n ]\n },\n {\n \"type\": \"error\",\n \"name\": \"TaxRateTooHigh\",\n \"inputs\": [\n {\n \"name\": \"bps\",\n \"type\": \"uint16\",\n \"internalType\": \"uint16\"\n }\n ]\n },\n {\n \"type\": \"error\",\n \"name\": \"TaxRecipientMismatch\",\n \"inputs\": [\n {\n \"name\": \"recipient\",\n \"type\": \"address\",\n \"internalType\": \"address\"\n },\n {\n \"name\": \"bps\",\n \"type\": \"uint16\",\n \"internalType\": \"uint16\"\n }\n ]\n },\n {\n \"type\": \"error\",\n \"name\": \"TaxSplitDoesNotSum\",\n \"inputs\": [\n {\n \"name\": \"sum\",\n \"type\": \"uint256\",\n \"internalType\": \"uint256\"\n }\n ]\n },\n {\n \"type\": \"error\",\n \"name\": \"TaxWithoutRate\",\n \"inputs\": []\n },\n {\n \"type\": \"error\",\n \"name\": \"TradingNotOpen\",\n \"inputs\": [\n {\n \"name\": \"poolId\",\n \"type\": \"bytes32\",\n \"internalType\": \"PoolId\"\n },\n {\n \"name\": \"startTime\",\n \"type\": \"uint256\",\n \"internalType\": \"uint256\"\n },\n {\n \"name\": \"currentTime\",\n \"type\": \"uint256\",\n \"internalType\": \"uint256\"\n }\n ]\n },\n {\n \"type\": \"error\",\n \"name\": \"UnexpectedLockCallback\",\n \"inputs\": []\n },\n {\n \"type\": \"error\",\n \"name\": \"ZeroAddress\",\n \"inputs\": []\n },\n {\n \"type\": \"event\",\n \"name\": \"LaunchClaimed\",\n \"inputs\": [\n {\n \"name\": \"poolId\",\n \"type\": \"bytes32\",\n \"indexed\": true,\n \"internalType\": \"PoolId\"\n },\n {\n \"name\": \"owner\",\n \"type\": \"address\",\n \"indexed\": true,\n \"internalType\": \"address\"\n }\n ],\n \"anonymous\": false\n },\n {\n \"type\": \"event\",\n \"name\": \"LaunchClaimerSet\",\n \"inputs\": [\n {\n \"name\": \"token\",\n \"type\": \"address\",\n \"indexed\": true,\n \"internalType\": \"address\"\n },\n {\n \"name\": \"creator\",\n \"type\": \"address\",\n \"indexed\": true,\n \"internalType\": \"address\"\n },\n {\n \"name\": \"claimer\",\n \"type\": \"address\",\n \"indexed\": true,\n \"internalType\": \"address\"\n }\n ],\n \"anonymous\": false\n },\n {\n \"type\": \"event\",\n \"name\": \"LaunchConfigured\",\n \"inputs\": [\n {\n \"name\": \"poolId\",\n \"type\": \"bytes32\",\n \"indexed\": true,\n \"internalType\": \"PoolId\"\n },\n {\n \"name\": \"owner\",\n \"type\": \"address\",\n \"indexed\": true,\n \"internalType\": \"address\"\n },\n {\n \"name\": \"startTime\",\n \"type\": \"uint40\",\n \"indexed\": false,\n \"internalType\": \"uint40\"\n },\n {\n \"name\": \"decaySeconds\",\n \"type\": \"uint32\",\n \"indexed\": false,\n \"internalType\": \"uint32\"\n },\n {\n \"name\": \"initialFeeBips\",\n \"type\": \"uint24\",\n \"indexed\": false,\n \"internalType\": \"uint24\"\n },\n {\n \"name\": \"finalFeeBips\",\n \"type\": \"uint24\",\n \"indexed\": false,\n \"internalType\": \"uint24\"\n },\n {\n \"name\": \"maxBuyPerTx\",\n \"type\": \"uint128\",\n \"indexed\": false,\n \"internalType\": \"uint128\"\n },\n {\n \"name\": \"launchTokenIsCurrency0\",\n \"type\": \"bool\",\n \"indexed\": false,\n \"internalType\": \"bool\"\n },\n {\n \"name\": \"enabled\",\n \"type\": \"bool\",\n \"indexed\": false,\n \"internalType\": \"bool\"\n }\n ],\n \"anonymous\": false\n },\n {\n \"type\": \"event\",\n \"name\": \"LaunchStarted\",\n \"inputs\": [\n {\n \"name\": \"poolId\",\n \"type\": \"bytes32\",\n \"indexed\": true,\n \"internalType\": \"PoolId\"\n },\n {\n \"name\": \"timestamp\",\n \"type\": \"uint256\",\n \"indexed\": false,\n \"internalType\": \"uint256\"\n }\n ],\n \"anonymous\": false\n },\n {\n \"type\": \"event\",\n \"name\": \"TaxClaimed\",\n \"inputs\": [\n {\n \"name\": \"account\",\n \"type\": \"address\",\n \"indexed\": true,\n \"internalType\": \"address\"\n },\n {\n \"name\": \"currency\",\n \"type\": \"address\",\n \"indexed\": true,\n \"internalType\": \"Currency\"\n },\n {\n \"name\": \"to\",\n \"type\": \"address\",\n \"indexed\": false,\n \"internalType\": \"address\"\n },\n {\n \"name\": \"amount\",\n \"type\": \"uint256\",\n \"indexed\": false,\n \"internalType\": \"uint256\"\n }\n ],\n \"anonymous\": false\n },\n {\n \"type\": \"event\",\n \"name\": \"TaxConfigured\",\n \"inputs\": [\n {\n \"name\": \"poolId\",\n \"type\": \"bytes32\",\n \"indexed\": true,\n \"internalType\": \"PoolId\"\n },\n {\n \"name\": \"buyBps\",\n \"type\": \"uint16\",\n \"indexed\": false,\n \"internalType\": \"uint16\"\n },\n {\n \"name\": \"sellBps\",\n \"type\": \"uint16\",\n \"indexed\": false,\n \"internalType\": \"uint16\"\n },\n {\n \"name\": \"expiresAt\",\n \"type\": \"uint40\",\n \"indexed\": false,\n \"internalType\": \"uint40\"\n },\n {\n \"name\": \"creator\",\n \"type\": \"address\",\n \"indexed\": false,\n \"internalType\": \"address\"\n },\n {\n \"name\": \"integrator\",\n \"type\": \"address\",\n \"indexed\": false,\n \"internalType\": \"address\"\n },\n {\n \"name\": \"creatorBps\",\n \"type\": \"uint16\",\n \"indexed\": false,\n \"internalType\": \"uint16\"\n },\n {\n \"name\": \"protocolBps\",\n \"type\": \"uint16\",\n \"indexed\": false,\n \"internalType\": \"uint16\"\n },\n {\n \"name\": \"integratorBps\",\n \"type\": \"uint16\",\n \"indexed\": false,\n \"internalType\": \"uint16\"\n }\n ],\n \"anonymous\": false\n },\n {\n \"type\": \"event\",\n \"name\": \"TaxRedeemed\",\n \"inputs\": [\n {\n \"name\": \"currency\",\n \"type\": \"address\",\n \"indexed\": true,\n \"internalType\": \"Currency\"\n },\n {\n \"name\": \"amount\",\n \"type\": \"uint256\",\n \"indexed\": false,\n \"internalType\": \"uint256\"\n }\n ],\n \"anonymous\": false\n },\n {\n \"type\": \"event\",\n \"name\": \"TaxSettled\",\n \"inputs\": [\n {\n \"name\": \"poolId\",\n \"type\": \"bytes32\",\n \"indexed\": true,\n \"internalType\": \"PoolId\"\n },\n {\n \"name\": \"currency\",\n \"type\": \"address\",\n \"indexed\": true,\n \"internalType\": \"Currency\"\n },\n {\n \"name\": \"toCreator\",\n \"type\": \"uint256\",\n \"indexed\": false,\n \"internalType\": \"uint256\"\n },\n {\n \"name\": \"toProtocol\",\n \"type\": \"uint256\",\n \"indexed\": false,\n \"internalType\": \"uint256\"\n },\n {\n \"name\": \"toIntegrator\",\n \"type\": \"uint256\",\n \"indexed\": false,\n \"internalType\": \"uint256\"\n }\n ],\n \"anonymous\": false\n },\n {\n \"type\": \"event\",\n \"name\": \"TaxSkimmed\",\n \"inputs\": [\n {\n \"name\": \"currency\",\n \"type\": \"address\",\n \"indexed\": true,\n \"internalType\": \"Currency\"\n },\n {\n \"name\": \"caller\",\n \"type\": \"address\",\n \"indexed\": true,\n \"internalType\": \"address\"\n },\n {\n \"name\": \"amount\",\n \"type\": \"uint256\",\n \"indexed\": false,\n \"internalType\": \"uint256\"\n }\n ],\n \"anonymous\": false\n },\n {\n \"type\": \"event\",\n \"name\": \"TaxTaken\",\n \"inputs\": [\n {\n \"name\": \"poolId\",\n \"type\": \"bytes32\",\n \"indexed\": true,\n \"internalType\": \"PoolId\"\n },\n {\n \"name\": \"currency\",\n \"type\": \"address\",\n \"indexed\": true,\n \"internalType\": \"Currency\"\n },\n {\n \"name\": \"isBuy\",\n \"type\": \"bool\",\n \"indexed\": false,\n \"internalType\": \"bool\"\n },\n {\n \"name\": \"amount\",\n \"type\": \"uint256\",\n \"indexed\": false,\n \"internalType\": \"uint256\"\n }\n ],\n \"anonymous\": false\n },\n {\n \"type\": \"function\",\n \"name\": \"CLOCK_MODE\",\n \"inputs\": [],\n \"outputs\": [\n {\n \"name\": \"\",\n \"type\": \"string\",\n \"internalType\": \"string\"\n }\n ],\n \"stateMutability\": \"view\"\n },\n {\n \"type\": \"function\",\n \"name\": \"LAUNCH_TOKEN_FACTORY\",\n \"inputs\": [],\n \"outputs\": [\n {\n \"name\": \"\",\n \"type\": \"address\",\n \"internalType\": \"contract ILaunchTokenOrigin\"\n }\n ],\n \"stateMutability\": \"view\"\n },\n {\n \"type\": \"function\",\n \"name\": \"MAX_DECAY_SECONDS\",\n \"inputs\": [],\n \"outputs\": [\n {\n \"name\": \"\",\n \"type\": \"uint32\",\n \"internalType\": \"uint32\"\n }\n ],\n \"stateMutability\": \"view\"\n },\n {\n \"type\": \"function\",\n \"name\": \"MAX_FINAL_FEE\",\n \"inputs\": [],\n \"outputs\": [\n {\n \"name\": \"\",\n \"type\": \"uint24\",\n \"internalType\": \"uint24\"\n }\n ],\n \"stateMutability\": \"view\"\n },\n {\n \"type\": \"function\",\n \"name\": \"MAX_INITIAL_FEE\",\n \"inputs\": [],\n \"outputs\": [\n {\n \"name\": \"\",\n \"type\": \"uint24\",\n \"internalType\": \"uint24\"\n }\n ],\n \"stateMutability\": \"view\"\n },\n {\n \"type\": \"function\",\n \"name\": \"MAX_INTEGRATOR_BPS\",\n \"inputs\": [],\n \"outputs\": [\n {\n \"name\": \"\",\n \"type\": \"uint16\",\n \"internalType\": \"uint16\"\n }\n ],\n \"stateMutability\": \"view\"\n },\n {\n \"type\": \"function\",\n \"name\": \"MAX_PROTOCOL_BPS\",\n \"inputs\": [],\n \"outputs\": [\n {\n \"name\": \"\",\n \"type\": \"uint16\",\n \"internalType\": \"uint16\"\n }\n ],\n \"stateMutability\": \"view\"\n },\n {\n \"type\": \"function\",\n \"name\": \"MAX_START_DELAY_SECONDS\",\n \"inputs\": [],\n \"outputs\": [\n {\n \"name\": \"\",\n \"type\": \"uint40\",\n \"internalType\": \"uint40\"\n }\n ],\n \"stateMutability\": \"view\"\n },\n {\n \"type\": \"function\",\n \"name\": \"MAX_TAX_BPS\",\n \"inputs\": [],\n \"outputs\": [\n {\n \"name\": \"\",\n \"type\": \"uint16\",\n \"internalType\": \"uint16\"\n }\n ],\n \"stateMutability\": \"view\"\n },\n {\n \"type\": \"function\",\n \"name\": \"MAX_TAX_DURATION_SECONDS\",\n \"inputs\": [],\n \"outputs\": [\n {\n \"name\": \"\",\n \"type\": \"uint40\",\n \"internalType\": \"uint40\"\n }\n ],\n \"stateMutability\": \"view\"\n },\n {\n \"type\": \"function\",\n \"name\": \"MIN_DECAY_SECONDS\",\n \"inputs\": [],\n \"outputs\": [\n {\n \"name\": \"\",\n \"type\": \"uint32\",\n \"internalType\": \"uint32\"\n }\n ],\n \"stateMutability\": \"view\"\n },\n {\n \"type\": \"function\",\n \"name\": \"MIN_PROTOCOL_BPS\",\n \"inputs\": [],\n \"outputs\": [\n {\n \"name\": \"\",\n \"type\": \"uint16\",\n \"internalType\": \"uint16\"\n }\n ],\n \"stateMutability\": \"view\"\n },\n {\n \"type\": \"function\",\n \"name\": \"backing\",\n \"inputs\": [\n {\n \"name\": \"currency\",\n \"type\": \"address\",\n \"internalType\": \"Currency\"\n }\n ],\n \"outputs\": [\n {\n \"name\": \"\",\n \"type\": \"uint256\",\n \"internalType\": \"uint256\"\n }\n ],\n \"stateMutability\": \"view\"\n },\n {\n \"type\": \"function\",\n \"name\": \"claim\",\n \"inputs\": [\n {\n \"name\": \"currency\",\n \"type\": \"address\",\n \"internalType\": \"Currency\"\n },\n {\n \"name\": \"to\",\n \"type\": \"address\",\n \"internalType\": \"address\"\n }\n ],\n \"outputs\": [\n {\n \"name\": \"amount\",\n \"type\": \"uint256\",\n \"internalType\": \"uint256\"\n }\n ],\n \"stateMutability\": \"nonpayable\"\n },\n {\n \"type\": \"function\",\n \"name\": \"claimFrom\",\n \"inputs\": [\n {\n \"name\": \"pools\",\n \"type\": \"bytes32[]\",\n \"internalType\": \"PoolId[]\"\n },\n {\n \"name\": \"currency\",\n \"type\": \"address\",\n \"internalType\": \"Currency\"\n },\n {\n \"name\": \"to\",\n \"type\": \"address\",\n \"internalType\": \"address\"\n }\n ],\n \"outputs\": [\n {\n \"name\": \"amount\",\n \"type\": \"uint256\",\n \"internalType\": \"uint256\"\n }\n ],\n \"stateMutability\": \"nonpayable\"\n },\n {\n \"type\": \"function\",\n \"name\": \"claimable\",\n \"inputs\": [\n {\n \"name\": \"account\",\n \"type\": \"address\",\n \"internalType\": \"address\"\n },\n {\n \"name\": \"currency\",\n \"type\": \"address\",\n \"internalType\": \"Currency\"\n }\n ],\n \"outputs\": [\n {\n \"name\": \"\",\n \"type\": \"uint256\",\n \"internalType\": \"uint256\"\n }\n ],\n \"stateMutability\": \"view\"\n },\n {\n \"type\": \"function\",\n \"name\": \"clock\",\n \"inputs\": [],\n \"outputs\": [\n {\n \"name\": \"\",\n \"type\": \"uint48\",\n \"internalType\": \"uint48\"\n }\n ],\n \"stateMutability\": \"view\"\n },\n {\n \"type\": \"function\",\n \"name\": \"configureLaunch\",\n \"inputs\": [\n {\n \"name\": \"key\",\n \"type\": \"tuple\",\n \"internalType\": \"struct PoolKey\",\n \"components\": [\n {\n \"name\": \"currency0\",\n \"type\": \"address\",\n \"internalType\": \"Currency\"\n },\n {\n \"name\": \"currency1\",\n \"type\": \"address\",\n \"internalType\": \"Currency\"\n },\n {\n \"name\": \"hooks\",\n \"type\": \"address\",\n \"internalType\": \"contract IHooks\"\n },\n {\n \"name\": \"poolManager\",\n \"type\": \"address\",\n \"internalType\": \"contract IPoolManager\"\n },\n {\n \"name\": \"fee\",\n \"type\": \"uint24\",\n \"internalType\": \"uint24\"\n },\n {\n \"name\": \"parameters\",\n \"type\": \"bytes32\",\n \"internalType\": \"bytes32\"\n }\n ]\n },\n {\n \"name\": \"cfg\",\n \"type\": \"tuple\",\n \"internalType\": \"struct LaunchGuardHook.LaunchConfig\",\n \"components\": [\n {\n \"name\": \"startTime\",\n \"type\": \"uint40\",\n \"internalType\": \"uint40\"\n },\n {\n \"name\": \"decaySeconds\",\n \"type\": \"uint32\",\n \"internalType\": \"uint32\"\n },\n {\n \"name\": \"initialFeeBips\",\n \"type\": \"uint24\",\n \"internalType\": \"uint24\"\n },\n {\n \"name\": \"finalFeeBips\",\n \"type\": \"uint24\",\n \"internalType\": \"uint24\"\n },\n {\n \"name\": \"maxBuyPerTx\",\n \"type\": \"uint128\",\n \"internalType\": \"uint128\"\n },\n {\n \"name\": \"launchTokenIsCurrency0\",\n \"type\": \"bool\",\n \"internalType\": \"bool\"\n },\n {\n \"name\": \"enabled\",\n \"type\": \"bool\",\n \"internalType\": \"bool\"\n }\n ]\n }\n ],\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\"\n },\n {\n \"type\": \"function\",\n \"name\": \"configureTax\",\n \"inputs\": [\n {\n \"name\": \"key\",\n \"type\": \"tuple\",\n \"internalType\": \"struct PoolKey\",\n \"components\": [\n {\n \"name\": \"currency0\",\n \"type\": \"address\",\n \"internalType\": \"Currency\"\n },\n {\n \"name\": \"currency1\",\n \"type\": \"address\",\n \"internalType\": \"Currency\"\n },\n {\n \"name\": \"hooks\",\n \"type\": \"address\",\n \"internalType\": \"contract IHooks\"\n },\n {\n \"name\": \"poolManager\",\n \"type\": \"address\",\n \"internalType\": \"contract IPoolManager\"\n },\n {\n \"name\": \"fee\",\n \"type\": \"uint24\",\n \"internalType\": \"uint24\"\n },\n {\n \"name\": \"parameters\",\n \"type\": \"bytes32\",\n \"internalType\": \"bytes32\"\n }\n ]\n },\n {\n \"name\": \"cfg\",\n \"type\": \"tuple\",\n \"internalType\": \"struct LaunchTaxModule.TaxConfig\",\n \"components\": [\n {\n \"name\": \"buyBps\",\n \"type\": \"uint16\",\n \"internalType\": \"uint16\"\n },\n {\n \"name\": \"sellBps\",\n \"type\": \"uint16\",\n \"internalType\": \"uint16\"\n },\n {\n \"name\": \"expiresAt\",\n \"type\": \"uint40\",\n \"internalType\": \"uint40\"\n },\n {\n \"name\": \"creator\",\n \"type\": \"address\",\n \"internalType\": \"address\"\n },\n {\n \"name\": \"integrator\",\n \"type\": \"address\",\n \"internalType\": \"address\"\n },\n {\n \"name\": \"creatorBps\",\n \"type\": \"uint16\",\n \"internalType\": \"uint16\"\n },\n {\n \"name\": \"protocolBps\",\n \"type\": \"uint16\",\n \"internalType\": \"uint16\"\n },\n {\n \"name\": \"integratorBps\",\n \"type\": \"uint16\",\n \"internalType\": \"uint16\"\n }\n ]\n }\n ],\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\"\n },\n {\n \"type\": \"function\",\n \"name\": \"currentFee\",\n \"inputs\": [\n {\n \"name\": \"poolId\",\n \"type\": \"bytes32\",\n \"internalType\": \"PoolId\"\n }\n ],\n \"outputs\": [\n {\n \"name\": \"\",\n \"type\": \"uint24\",\n \"internalType\": \"uint24\"\n }\n ],\n \"stateMutability\": \"view\"\n },\n {\n \"type\": \"function\",\n \"name\": \"currentTaxRates\",\n \"inputs\": [\n {\n \"name\": \"poolId\",\n \"type\": \"bytes32\",\n \"internalType\": \"PoolId\"\n }\n ],\n \"outputs\": [\n {\n \"name\": \"buyBps\",\n \"type\": \"uint16\",\n \"internalType\": \"uint16\"\n },\n {\n \"name\": \"sellBps\",\n \"type\": \"uint16\",\n \"internalType\": \"uint16\"\n }\n ],\n \"stateMutability\": \"view\"\n },\n {\n \"type\": \"function\",\n \"name\": \"feeAt\",\n \"inputs\": [\n {\n \"name\": \"poolId\",\n \"type\": \"bytes32\",\n \"internalType\": \"PoolId\"\n },\n {\n \"name\": \"timestamp\",\n \"type\": \"uint256\",\n \"internalType\": \"uint256\"\n }\n ],\n \"outputs\": [\n {\n \"name\": \"\",\n \"type\": \"uint24\",\n \"internalType\": \"uint24\"\n }\n ],\n \"stateMutability\": \"view\"\n },\n {\n \"type\": \"function\",\n \"name\": \"getHooksRegistrationBitmap\",\n \"inputs\": [],\n \"outputs\": [\n {\n \"name\": \"\",\n \"type\": \"uint16\",\n \"internalType\": \"uint16\"\n }\n ],\n \"stateMutability\": \"pure\"\n },\n {\n \"type\": \"function\",\n \"name\": \"getLaunch\",\n \"inputs\": [\n {\n \"name\": \"poolId\",\n \"type\": \"bytes32\",\n \"internalType\": \"PoolId\"\n }\n ],\n \"outputs\": [\n {\n \"name\": \"\",\n \"type\": \"tuple\",\n \"internalType\": \"struct LaunchGuardHook.Launch\",\n \"components\": [\n {\n \"name\": \"owner\",\n \"type\": \"address\",\n \"internalType\": \"address\"\n },\n {\n \"name\": \"startTime\",\n \"type\": \"uint40\",\n \"internalType\": \"uint40\"\n },\n {\n \"name\": \"decaySeconds\",\n \"type\": \"uint32\",\n \"internalType\": \"uint32\"\n },\n {\n \"name\": \"enabled\",\n \"type\": \"bool\",\n \"internalType\": \"bool\"\n },\n {\n \"name\": \"initialFeeBips\",\n \"type\": \"uint24\",\n \"internalType\": \"uint24\"\n },\n {\n \"name\": \"finalFeeBips\",\n \"type\": \"uint24\",\n \"internalType\": \"uint24\"\n },\n {\n \"name\": \"maxBuyPerTx\",\n \"type\": \"uint128\",\n \"internalType\": \"uint128\"\n },\n {\n \"name\": \"launchTokenIsCurrency0\",\n \"type\": \"bool\",\n \"internalType\": \"bool\"\n },\n {\n \"name\": \"launched\",\n \"type\": \"bool\",\n \"internalType\": \"bool\"\n }\n ]\n }\n ],\n \"stateMutability\": \"view\"\n },\n {\n \"type\": \"function\",\n \"name\": \"getTax\",\n \"inputs\": [\n {\n \"name\": \"poolId\",\n \"type\": \"bytes32\",\n \"internalType\": \"PoolId\"\n }\n ],\n \"outputs\": [\n {\n \"name\": \"\",\n \"type\": \"tuple\",\n \"internalType\": \"struct LaunchTaxModule.Tax\",\n \"components\": [\n {\n \"name\": \"creator\",\n \"type\": \"address\",\n \"internalType\": \"address\"\n },\n {\n \"name\": \"buyBps\",\n \"type\": \"uint16\",\n \"internalType\": \"uint16\"\n },\n {\n \"name\": \"sellBps\",\n \"type\": \"uint16\",\n \"internalType\": \"uint16\"\n },\n {\n \"name\": \"expiresAt\",\n \"type\": \"uint40\",\n \"internalType\": \"uint40\"\n },\n {\n \"name\": \"creatorBps\",\n \"type\": \"uint16\",\n \"internalType\": \"uint16\"\n },\n {\n \"name\": \"integrator\",\n \"type\": \"address\",\n \"internalType\": \"address\"\n },\n {\n \"name\": \"protocolBps\",\n \"type\": \"uint16\",\n \"internalType\": \"uint16\"\n },\n {\n \"name\": \"integratorBps\",\n \"type\": \"uint16\",\n \"internalType\": \"uint16\"\n }\n ]\n }\n ],\n \"stateMutability\": \"view\"\n },\n {\n \"type\": \"function\",\n \"name\": \"launchClaimerOf\",\n \"inputs\": [\n {\n \"name\": \"token\",\n \"type\": \"address\",\n \"internalType\": \"address\"\n }\n ],\n \"outputs\": [\n {\n \"name\": \"claimer\",\n \"type\": \"address\",\n \"internalType\": \"address\"\n }\n ],\n \"stateMutability\": \"view\"\n },\n {\n \"type\": \"function\",\n \"name\": \"launchOwner\",\n \"inputs\": [\n {\n \"name\": \"poolId\",\n \"type\": \"bytes32\",\n \"internalType\": \"PoolId\"\n }\n ],\n \"outputs\": [\n {\n \"name\": \"\",\n \"type\": \"address\",\n \"internalType\": \"address\"\n }\n ],\n \"stateMutability\": \"view\"\n },\n {\n \"type\": \"function\",\n \"name\": \"pendingTax\",\n \"inputs\": [\n {\n \"name\": \"poolId\",\n \"type\": \"bytes32\",\n \"internalType\": \"PoolId\"\n },\n {\n \"name\": \"currency\",\n \"type\": \"address\",\n \"internalType\": \"Currency\"\n }\n ],\n \"outputs\": [\n {\n \"name\": \"\",\n \"type\": \"uint256\",\n \"internalType\": \"uint256\"\n }\n ],\n \"stateMutability\": \"view\"\n },\n {\n \"type\": \"function\",\n \"name\": \"poolManager\",\n \"inputs\": [],\n \"outputs\": [\n {\n \"name\": \"\",\n \"type\": \"address\",\n \"internalType\": \"contract ICLPoolManager\"\n }\n ],\n \"stateMutability\": \"view\"\n },\n {\n \"type\": \"function\",\n \"name\": \"protocolRecipient\",\n \"inputs\": [],\n \"outputs\": [\n {\n \"name\": \"\",\n \"type\": \"address\",\n \"internalType\": \"address\"\n }\n ],\n \"stateMutability\": \"view\"\n },\n {\n \"type\": \"function\",\n \"name\": \"redeem\",\n \"inputs\": [\n {\n \"name\": \"currency\",\n \"type\": \"address\",\n \"internalType\": \"Currency\"\n }\n ],\n \"outputs\": [\n {\n \"name\": \"amount\",\n \"type\": \"uint256\",\n \"internalType\": \"uint256\"\n }\n ],\n \"stateMutability\": \"nonpayable\"\n },\n {\n \"type\": \"function\",\n \"name\": \"setLaunchClaimer\",\n \"inputs\": [\n {\n \"name\": \"token\",\n \"type\": \"address\",\n \"internalType\": \"address\"\n },\n {\n \"name\": \"claimer\",\n \"type\": \"address\",\n \"internalType\": \"address\"\n }\n ],\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\"\n },\n {\n \"type\": \"function\",\n \"name\": \"settleTax\",\n \"inputs\": [\n {\n \"name\": \"poolId\",\n \"type\": \"bytes32\",\n \"internalType\": \"PoolId\"\n },\n {\n \"name\": \"currency\",\n \"type\": \"address\",\n \"internalType\": \"Currency\"\n }\n ],\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\"\n },\n {\n \"type\": \"function\",\n \"name\": \"skim\",\n \"inputs\": [\n {\n \"name\": \"currency\",\n \"type\": \"address\",\n \"internalType\": \"Currency\"\n }\n ],\n \"outputs\": [\n {\n \"name\": \"surplus\",\n \"type\": \"uint256\",\n \"internalType\": \"uint256\"\n }\n ],\n \"stateMutability\": \"nonpayable\"\n },\n {\n \"type\": \"function\",\n \"name\": \"taxRatesAt\",\n \"inputs\": [\n {\n \"name\": \"poolId\",\n \"type\": \"bytes32\",\n \"internalType\": \"PoolId\"\n },\n {\n \"name\": \"timestamp\",\n \"type\": \"uint256\",\n \"internalType\": \"uint256\"\n }\n ],\n \"outputs\": [\n {\n \"name\": \"buyBps\",\n \"type\": \"uint16\",\n \"internalType\": \"uint16\"\n },\n {\n \"name\": \"sellBps\",\n \"type\": \"uint16\",\n \"internalType\": \"uint16\"\n }\n ],\n \"stateMutability\": \"view\"\n },\n {\n \"type\": \"function\",\n \"name\": \"totalOwed\",\n \"inputs\": [\n {\n \"name\": \"currency\",\n \"type\": \"address\",\n \"internalType\": \"Currency\"\n }\n ],\n \"outputs\": [\n {\n \"name\": \"\",\n \"type\": \"uint256\",\n \"internalType\": \"uint256\"\n }\n ],\n \"stateMutability\": \"view\"\n },\n {\n \"type\": \"function\",\n \"name\": \"vault\",\n \"inputs\": [],\n \"outputs\": [\n {\n \"name\": \"\",\n \"type\": \"address\",\n \"internalType\": \"contract IVault\"\n }\n ],\n \"stateMutability\": \"view\"\n }\n];\n/**\n * `BinLaunchGuardHook` - the liquidity-book variant, including `beforeMint`.\n *\n * 37 errors, 10 events, 37 functions - curated from the compiled artifact, not the full ABI.\n */\nexport const BIN_LAUNCH_GUARD_HOOK_ABI = [\n {\n \"type\": \"error\",\n \"name\": \"BuyExceedsMaxPerTx\",\n \"inputs\": [\n {\n \"name\": \"amountIn\",\n \"type\": \"uint256\",\n \"internalType\": \"uint256\"\n },\n {\n \"name\": \"maxBuyPerTx\",\n \"type\": \"uint128\",\n \"internalType\": \"uint128\"\n }\n ]\n },\n {\n \"type\": \"error\",\n \"name\": \"CurrencyHasNoCode\",\n \"inputs\": [\n {\n \"name\": \"currency\",\n \"type\": \"address\",\n \"internalType\": \"address\"\n }\n ]\n },\n {\n \"type\": \"error\",\n \"name\": \"ExactOutputBuyBlockedDuringLaunch\",\n \"inputs\": []\n },\n {\n \"type\": \"error\",\n \"name\": \"HookMismatch\",\n \"inputs\": [\n {\n \"name\": \"declared\",\n \"type\": \"address\",\n \"internalType\": \"address\"\n }\n ]\n },\n {\n \"type\": \"error\",\n \"name\": \"HookNotImplemented\",\n \"inputs\": []\n },\n {\n \"type\": \"error\",\n \"name\": \"InsufficientBackedBalance\",\n \"inputs\": [\n {\n \"name\": \"currency\",\n \"type\": \"address\",\n \"internalType\": \"Currency\"\n },\n {\n \"name\": \"needed\",\n \"type\": \"uint256\",\n \"internalType\": \"uint256\"\n },\n {\n \"name\": \"available\",\n \"type\": \"uint256\",\n \"internalType\": \"uint256\"\n }\n ]\n },\n {\n \"type\": \"error\",\n \"name\": \"InvalidDecaySeconds\",\n \"inputs\": [\n {\n \"name\": \"decaySeconds\",\n \"type\": \"uint32\",\n \"internalType\": \"uint32\"\n }\n ]\n },\n {\n \"type\": \"error\",\n \"name\": \"InvalidFeeSchedule\",\n \"inputs\": [\n {\n \"name\": \"initialFeeBips\",\n \"type\": \"uint24\",\n \"internalType\": \"uint24\"\n },\n {\n \"name\": \"finalFeeBips\",\n \"type\": \"uint24\",\n \"internalType\": \"uint24\"\n }\n ]\n },\n {\n \"type\": \"error\",\n \"name\": \"InvalidRecipient\",\n \"inputs\": []\n },\n {\n \"type\": \"error\",\n \"name\": \"InvalidStartTime\",\n \"inputs\": [\n {\n \"name\": \"startTime\",\n \"type\": \"uint256\",\n \"internalType\": \"uint256\"\n },\n {\n \"name\": \"currentTime\",\n \"type\": \"uint256\",\n \"internalType\": \"uint256\"\n }\n ]\n },\n {\n \"type\": \"error\",\n \"name\": \"InvalidTaxRecipient\",\n \"inputs\": [\n {\n \"name\": \"recipient\",\n \"type\": \"address\",\n \"internalType\": \"address\"\n }\n ]\n },\n {\n \"type\": \"error\",\n \"name\": \"LaunchAlreadyStarted\",\n \"inputs\": [\n {\n \"name\": \"poolId\",\n \"type\": \"bytes32\",\n \"internalType\": \"PoolId\"\n },\n {\n \"name\": \"startTime\",\n \"type\": \"uint256\",\n \"internalType\": \"uint256\"\n }\n ]\n },\n {\n \"type\": \"error\",\n \"name\": \"LaunchNotConfigured\",\n \"inputs\": [\n {\n \"name\": \"poolId\",\n \"type\": \"bytes32\",\n \"internalType\": \"PoolId\"\n }\n ]\n },\n {\n \"type\": \"error\",\n \"name\": \"LaunchPoolReserved\",\n \"inputs\": [\n {\n \"name\": \"token\",\n \"type\": \"address\",\n \"internalType\": \"address\"\n },\n {\n \"name\": \"creator\",\n \"type\": \"address\",\n \"internalType\": \"address\"\n },\n {\n \"name\": \"caller\",\n \"type\": \"address\",\n \"internalType\": \"address\"\n }\n ]\n },\n {\n \"type\": \"error\",\n \"name\": \"LiquidityConfigurations__InvalidConfig\",\n \"inputs\": []\n },\n {\n \"type\": \"error\",\n \"name\": \"NativeNotAccepted\",\n \"inputs\": []\n },\n {\n \"type\": \"error\",\n \"name\": \"NotLaunchOwner\",\n \"inputs\": [\n {\n \"name\": \"poolId\",\n \"type\": \"bytes32\",\n \"internalType\": \"PoolId\"\n },\n {\n \"name\": \"caller\",\n \"type\": \"address\",\n \"internalType\": \"address\"\n }\n ]\n },\n {\n \"type\": \"error\",\n \"name\": \"NotPoolManager\",\n \"inputs\": []\n },\n {\n \"type\": \"error\",\n \"name\": \"NotTokenCreator\",\n \"inputs\": [\n {\n \"name\": \"token\",\n \"type\": \"address\",\n \"internalType\": \"address\"\n },\n {\n \"name\": \"caller\",\n \"type\": \"address\",\n \"internalType\": \"address\"\n }\n ]\n },\n {\n \"type\": \"error\",\n \"name\": \"NothingToClaim\",\n \"inputs\": []\n },\n {\n \"type\": \"error\",\n \"name\": \"NothingToSkim\",\n \"inputs\": [\n {\n \"name\": \"currency\",\n \"type\": \"address\",\n \"internalType\": \"Currency\"\n }\n ]\n },\n {\n \"type\": \"error\",\n \"name\": \"PermissionDependencyMissing\",\n \"inputs\": [\n {\n \"name\": \"declared\",\n \"type\": \"uint16\",\n \"internalType\": \"uint16\"\n }\n ]\n },\n {\n \"type\": \"error\",\n \"name\": \"PoolManagerMismatch\",\n \"inputs\": [\n {\n \"name\": \"declared\",\n \"type\": \"address\",\n \"internalType\": \"address\"\n }\n ]\n },\n {\n \"type\": \"error\",\n \"name\": \"PoolMustUseDynamicFee\",\n \"inputs\": [\n {\n \"name\": \"fee\",\n \"type\": \"uint24\",\n \"internalType\": \"uint24\"\n }\n ]\n },\n {\n \"type\": \"error\",\n \"name\": \"ReentrancyGuardReentrantCall\",\n \"inputs\": []\n },\n {\n \"type\": \"error\",\n \"name\": \"ReservedBitsSet\",\n \"inputs\": [\n {\n \"name\": \"declared\",\n \"type\": \"uint16\",\n \"internalType\": \"uint16\"\n }\n ]\n },\n {\n \"type\": \"error\",\n \"name\": \"TaxExpiryOutOfRange\",\n \"inputs\": [\n {\n \"name\": \"expiresAt\",\n \"type\": \"uint40\",\n \"internalType\": \"uint40\"\n },\n {\n \"name\": \"currentTime\",\n \"type\": \"uint256\",\n \"internalType\": \"uint256\"\n }\n ]\n },\n {\n \"type\": \"error\",\n \"name\": \"TaxIntegratorShareTooHigh\",\n \"inputs\": [\n {\n \"name\": \"bps\",\n \"type\": \"uint16\",\n \"internalType\": \"uint16\"\n }\n ]\n },\n {\n \"type\": \"error\",\n \"name\": \"TaxProtocolShareOutOfBounds\",\n \"inputs\": [\n {\n \"name\": \"bps\",\n \"type\": \"uint16\",\n \"internalType\": \"uint16\"\n }\n ]\n },\n {\n \"type\": \"error\",\n \"name\": \"TaxRateTooHigh\",\n \"inputs\": [\n {\n \"name\": \"bps\",\n \"type\": \"uint16\",\n \"internalType\": \"uint16\"\n }\n ]\n },\n {\n \"type\": \"error\",\n \"name\": \"TaxRecipientMismatch\",\n \"inputs\": [\n {\n \"name\": \"recipient\",\n \"type\": \"address\",\n \"internalType\": \"address\"\n },\n {\n \"name\": \"bps\",\n \"type\": \"uint16\",\n \"internalType\": \"uint16\"\n }\n ]\n },\n {\n \"type\": \"error\",\n \"name\": \"TaxSplitDoesNotSum\",\n \"inputs\": [\n {\n \"name\": \"sum\",\n \"type\": \"uint256\",\n \"internalType\": \"uint256\"\n }\n ]\n },\n {\n \"type\": \"error\",\n \"name\": \"TaxWithoutRate\",\n \"inputs\": []\n },\n {\n \"type\": \"error\",\n \"name\": \"TaxedActiveBinMintBlocked\",\n \"inputs\": [\n {\n \"name\": \"poolId\",\n \"type\": \"bytes32\",\n \"internalType\": \"PoolId\"\n },\n {\n \"name\": \"activeId\",\n \"type\": \"uint24\",\n \"internalType\": \"uint24\"\n }\n ]\n },\n {\n \"type\": \"error\",\n \"name\": \"TradingNotOpen\",\n \"inputs\": [\n {\n \"name\": \"poolId\",\n \"type\": \"bytes32\",\n \"internalType\": \"PoolId\"\n },\n {\n \"name\": \"startTime\",\n \"type\": \"uint256\",\n \"internalType\": \"uint256\"\n },\n {\n \"name\": \"currentTime\",\n \"type\": \"uint256\",\n \"internalType\": \"uint256\"\n }\n ]\n },\n {\n \"type\": \"error\",\n \"name\": \"UnexpectedLockCallback\",\n \"inputs\": []\n },\n {\n \"type\": \"error\",\n \"name\": \"ZeroAddress\",\n \"inputs\": []\n },\n {\n \"type\": \"event\",\n \"name\": \"LaunchClaimed\",\n \"inputs\": [\n {\n \"name\": \"poolId\",\n \"type\": \"bytes32\",\n \"indexed\": true,\n \"internalType\": \"PoolId\"\n },\n {\n \"name\": \"owner\",\n \"type\": \"address\",\n \"indexed\": true,\n \"internalType\": \"address\"\n }\n ],\n \"anonymous\": false\n },\n {\n \"type\": \"event\",\n \"name\": \"LaunchClaimerSet\",\n \"inputs\": [\n {\n \"name\": \"token\",\n \"type\": \"address\",\n \"indexed\": true,\n \"internalType\": \"address\"\n },\n {\n \"name\": \"creator\",\n \"type\": \"address\",\n \"indexed\": true,\n \"internalType\": \"address\"\n },\n {\n \"name\": \"claimer\",\n \"type\": \"address\",\n \"indexed\": true,\n \"internalType\": \"address\"\n }\n ],\n \"anonymous\": false\n },\n {\n \"type\": \"event\",\n \"name\": \"LaunchConfigured\",\n \"inputs\": [\n {\n \"name\": \"poolId\",\n \"type\": \"bytes32\",\n \"indexed\": true,\n \"internalType\": \"PoolId\"\n },\n {\n \"name\": \"owner\",\n \"type\": \"address\",\n \"indexed\": true,\n \"internalType\": \"address\"\n },\n {\n \"name\": \"startTime\",\n \"type\": \"uint40\",\n \"indexed\": false,\n \"internalType\": \"uint40\"\n },\n {\n \"name\": \"decaySeconds\",\n \"type\": \"uint32\",\n \"indexed\": false,\n \"internalType\": \"uint32\"\n },\n {\n \"name\": \"initialFeeBips\",\n \"type\": \"uint24\",\n \"indexed\": false,\n \"internalType\": \"uint24\"\n },\n {\n \"name\": \"finalFeeBips\",\n \"type\": \"uint24\",\n \"indexed\": false,\n \"internalType\": \"uint24\"\n },\n {\n \"name\": \"maxBuyPerTx\",\n \"type\": \"uint128\",\n \"indexed\": false,\n \"internalType\": \"uint128\"\n },\n {\n \"name\": \"launchTokenIsCurrency0\",\n \"type\": \"bool\",\n \"indexed\": false,\n \"internalType\": \"bool\"\n },\n {\n \"name\": \"enabled\",\n \"type\": \"bool\",\n \"indexed\": false,\n \"internalType\": \"bool\"\n }\n ],\n \"anonymous\": false\n },\n {\n \"type\": \"event\",\n \"name\": \"LaunchStarted\",\n \"inputs\": [\n {\n \"name\": \"poolId\",\n \"type\": \"bytes32\",\n \"indexed\": true,\n \"internalType\": \"PoolId\"\n },\n {\n \"name\": \"timestamp\",\n \"type\": \"uint256\",\n \"indexed\": false,\n \"internalType\": \"uint256\"\n }\n ],\n \"anonymous\": false\n },\n {\n \"type\": \"event\",\n \"name\": \"TaxClaimed\",\n \"inputs\": [\n {\n \"name\": \"account\",\n \"type\": \"address\",\n \"indexed\": true,\n \"internalType\": \"address\"\n },\n {\n \"name\": \"currency\",\n \"type\": \"address\",\n \"indexed\": true,\n \"internalType\": \"Currency\"\n },\n {\n \"name\": \"to\",\n \"type\": \"address\",\n \"indexed\": false,\n \"internalType\": \"address\"\n },\n {\n \"name\": \"amount\",\n \"type\": \"uint256\",\n \"indexed\": false,\n \"internalType\": \"uint256\"\n }\n ],\n \"anonymous\": false\n },\n {\n \"type\": \"event\",\n \"name\": \"TaxConfigured\",\n \"inputs\": [\n {\n \"name\": \"poolId\",\n \"type\": \"bytes32\",\n \"indexed\": true,\n \"internalType\": \"PoolId\"\n },\n {\n \"name\": \"buyBps\",\n \"type\": \"uint16\",\n \"indexed\": false,\n \"internalType\": \"uint16\"\n },\n {\n \"name\": \"sellBps\",\n \"type\": \"uint16\",\n \"indexed\": false,\n \"internalType\": \"uint16\"\n },\n {\n \"name\": \"expiresAt\",\n \"type\": \"uint40\",\n \"indexed\": false,\n \"internalType\": \"uint40\"\n },\n {\n \"name\": \"creator\",\n \"type\": \"address\",\n \"indexed\": false,\n \"internalType\": \"address\"\n },\n {\n \"name\": \"integrator\",\n \"type\": \"address\",\n \"indexed\": false,\n \"internalType\": \"address\"\n },\n {\n \"name\": \"creatorBps\",\n \"type\": \"uint16\",\n \"indexed\": false,\n \"internalType\": \"uint16\"\n },\n {\n \"name\": \"protocolBps\",\n \"type\": \"uint16\",\n \"indexed\": false,\n \"internalType\": \"uint16\"\n },\n {\n \"name\": \"integratorBps\",\n \"type\": \"uint16\",\n \"indexed\": false,\n \"internalType\": \"uint16\"\n }\n ],\n \"anonymous\": false\n },\n {\n \"type\": \"event\",\n \"name\": \"TaxRedeemed\",\n \"inputs\": [\n {\n \"name\": \"currency\",\n \"type\": \"address\",\n \"indexed\": true,\n \"internalType\": \"Currency\"\n },\n {\n \"name\": \"amount\",\n \"type\": \"uint256\",\n \"indexed\": false,\n \"internalType\": \"uint256\"\n }\n ],\n \"anonymous\": false\n },\n {\n \"type\": \"event\",\n \"name\": \"TaxSettled\",\n \"inputs\": [\n {\n \"name\": \"poolId\",\n \"type\": \"bytes32\",\n \"indexed\": true,\n \"internalType\": \"PoolId\"\n },\n {\n \"name\": \"currency\",\n \"type\": \"address\",\n \"indexed\": true,\n \"internalType\": \"Currency\"\n },\n {\n \"name\": \"toCreator\",\n \"type\": \"uint256\",\n \"indexed\": false,\n \"internalType\": \"uint256\"\n },\n {\n \"name\": \"toProtocol\",\n \"type\": \"uint256\",\n \"indexed\": false,\n \"internalType\": \"uint256\"\n },\n {\n \"name\": \"toIntegrator\",\n \"type\": \"uint256\",\n \"indexed\": false,\n \"internalType\": \"uint256\"\n }\n ],\n \"anonymous\": false\n },\n {\n \"type\": \"event\",\n \"name\": \"TaxSkimmed\",\n \"inputs\": [\n {\n \"name\": \"currency\",\n \"type\": \"address\",\n \"indexed\": true,\n \"internalType\": \"Currency\"\n },\n {\n \"name\": \"caller\",\n \"type\": \"address\",\n \"indexed\": true,\n \"internalType\": \"address\"\n },\n {\n \"name\": \"amount\",\n \"type\": \"uint256\",\n \"indexed\": false,\n \"internalType\": \"uint256\"\n }\n ],\n \"anonymous\": false\n },\n {\n \"type\": \"event\",\n \"name\": \"TaxTaken\",\n \"inputs\": [\n {\n \"name\": \"poolId\",\n \"type\": \"bytes32\",\n \"indexed\": true,\n \"internalType\": \"PoolId\"\n },\n {\n \"name\": \"currency\",\n \"type\": \"address\",\n \"indexed\": true,\n \"internalType\": \"Currency\"\n },\n {\n \"name\": \"isBuy\",\n \"type\": \"bool\",\n \"indexed\": false,\n \"internalType\": \"bool\"\n },\n {\n \"name\": \"amount\",\n \"type\": \"uint256\",\n \"indexed\": false,\n \"internalType\": \"uint256\"\n }\n ],\n \"anonymous\": false\n },\n {\n \"type\": \"function\",\n \"name\": \"CLOCK_MODE\",\n \"inputs\": [],\n \"outputs\": [\n {\n \"name\": \"\",\n \"type\": \"string\",\n \"internalType\": \"string\"\n }\n ],\n \"stateMutability\": \"view\"\n },\n {\n \"type\": \"function\",\n \"name\": \"LAUNCH_TOKEN_FACTORY\",\n \"inputs\": [],\n \"outputs\": [\n {\n \"name\": \"\",\n \"type\": \"address\",\n \"internalType\": \"contract ILaunchTokenOrigin\"\n }\n ],\n \"stateMutability\": \"view\"\n },\n {\n \"type\": \"function\",\n \"name\": \"MAX_DECAY_SECONDS\",\n \"inputs\": [],\n \"outputs\": [\n {\n \"name\": \"\",\n \"type\": \"uint32\",\n \"internalType\": \"uint32\"\n }\n ],\n \"stateMutability\": \"view\"\n },\n {\n \"type\": \"function\",\n \"name\": \"MAX_FINAL_FEE\",\n \"inputs\": [],\n \"outputs\": [\n {\n \"name\": \"\",\n \"type\": \"uint24\",\n \"internalType\": \"uint24\"\n }\n ],\n \"stateMutability\": \"view\"\n },\n {\n \"type\": \"function\",\n \"name\": \"MAX_INITIAL_FEE\",\n \"inputs\": [],\n \"outputs\": [\n {\n \"name\": \"\",\n \"type\": \"uint24\",\n \"internalType\": \"uint24\"\n }\n ],\n \"stateMutability\": \"view\"\n },\n {\n \"type\": \"function\",\n \"name\": \"MAX_INTEGRATOR_BPS\",\n \"inputs\": [],\n \"outputs\": [\n {\n \"name\": \"\",\n \"type\": \"uint16\",\n \"internalType\": \"uint16\"\n }\n ],\n \"stateMutability\": \"view\"\n },\n {\n \"type\": \"function\",\n \"name\": \"MAX_PROTOCOL_BPS\",\n \"inputs\": [],\n \"outputs\": [\n {\n \"name\": \"\",\n \"type\": \"uint16\",\n \"internalType\": \"uint16\"\n }\n ],\n \"stateMutability\": \"view\"\n },\n {\n \"type\": \"function\",\n \"name\": \"MAX_START_DELAY_SECONDS\",\n \"inputs\": [],\n \"outputs\": [\n {\n \"name\": \"\",\n \"type\": \"uint40\",\n \"internalType\": \"uint40\"\n }\n ],\n \"stateMutability\": \"view\"\n },\n {\n \"type\": \"function\",\n \"name\": \"MAX_TAX_BPS\",\n \"inputs\": [],\n \"outputs\": [\n {\n \"name\": \"\",\n \"type\": \"uint16\",\n \"internalType\": \"uint16\"\n }\n ],\n \"stateMutability\": \"view\"\n },\n {\n \"type\": \"function\",\n \"name\": \"MAX_TAX_DURATION_SECONDS\",\n \"inputs\": [],\n \"outputs\": [\n {\n \"name\": \"\",\n \"type\": \"uint40\",\n \"internalType\": \"uint40\"\n }\n ],\n \"stateMutability\": \"view\"\n },\n {\n \"type\": \"function\",\n \"name\": \"MIN_DECAY_SECONDS\",\n \"inputs\": [],\n \"outputs\": [\n {\n \"name\": \"\",\n \"type\": \"uint32\",\n \"internalType\": \"uint32\"\n }\n ],\n \"stateMutability\": \"view\"\n },\n {\n \"type\": \"function\",\n \"name\": \"MIN_PROTOCOL_BPS\",\n \"inputs\": [],\n \"outputs\": [\n {\n \"name\": \"\",\n \"type\": \"uint16\",\n \"internalType\": \"uint16\"\n }\n ],\n \"stateMutability\": \"view\"\n },\n {\n \"type\": \"function\",\n \"name\": \"backing\",\n \"inputs\": [\n {\n \"name\": \"currency\",\n \"type\": \"address\",\n \"internalType\": \"Currency\"\n }\n ],\n \"outputs\": [\n {\n \"name\": \"\",\n \"type\": \"uint256\",\n \"internalType\": \"uint256\"\n }\n ],\n \"stateMutability\": \"view\"\n },\n {\n \"type\": \"function\",\n \"name\": \"claim\",\n \"inputs\": [\n {\n \"name\": \"currency\",\n \"type\": \"address\",\n \"internalType\": \"Currency\"\n },\n {\n \"name\": \"to\",\n \"type\": \"address\",\n \"internalType\": \"address\"\n }\n ],\n \"outputs\": [\n {\n \"name\": \"amount\",\n \"type\": \"uint256\",\n \"internalType\": \"uint256\"\n }\n ],\n \"stateMutability\": \"nonpayable\"\n },\n {\n \"type\": \"function\",\n \"name\": \"claimFrom\",\n \"inputs\": [\n {\n \"name\": \"pools\",\n \"type\": \"bytes32[]\",\n \"internalType\": \"PoolId[]\"\n },\n {\n \"name\": \"currency\",\n \"type\": \"address\",\n \"internalType\": \"Currency\"\n },\n {\n \"name\": \"to\",\n \"type\": \"address\",\n \"internalType\": \"address\"\n }\n ],\n \"outputs\": [\n {\n \"name\": \"amount\",\n \"type\": \"uint256\",\n \"internalType\": \"uint256\"\n }\n ],\n \"stateMutability\": \"nonpayable\"\n },\n {\n \"type\": \"function\",\n \"name\": \"claimable\",\n \"inputs\": [\n {\n \"name\": \"account\",\n \"type\": \"address\",\n \"internalType\": \"address\"\n },\n {\n \"name\": \"currency\",\n \"type\": \"address\",\n \"internalType\": \"Currency\"\n }\n ],\n \"outputs\": [\n {\n \"name\": \"\",\n \"type\": \"uint256\",\n \"internalType\": \"uint256\"\n }\n ],\n \"stateMutability\": \"view\"\n },\n {\n \"type\": \"function\",\n \"name\": \"clock\",\n \"inputs\": [],\n \"outputs\": [\n {\n \"name\": \"\",\n \"type\": \"uint48\",\n \"internalType\": \"uint48\"\n }\n ],\n \"stateMutability\": \"view\"\n },\n {\n \"type\": \"function\",\n \"name\": \"configureLaunch\",\n \"inputs\": [\n {\n \"name\": \"key\",\n \"type\": \"tuple\",\n \"internalType\": \"struct PoolKey\",\n \"components\": [\n {\n \"name\": \"currency0\",\n \"type\": \"address\",\n \"internalType\": \"Currency\"\n },\n {\n \"name\": \"currency1\",\n \"type\": \"address\",\n \"internalType\": \"Currency\"\n },\n {\n \"name\": \"hooks\",\n \"type\": \"address\",\n \"internalType\": \"contract IHooks\"\n },\n {\n \"name\": \"poolManager\",\n \"type\": \"address\",\n \"internalType\": \"contract IPoolManager\"\n },\n {\n \"name\": \"fee\",\n \"type\": \"uint24\",\n \"internalType\": \"uint24\"\n },\n {\n \"name\": \"parameters\",\n \"type\": \"bytes32\",\n \"internalType\": \"bytes32\"\n }\n ]\n },\n {\n \"name\": \"cfg\",\n \"type\": \"tuple\",\n \"internalType\": \"struct BinLaunchGuardHook.LaunchConfig\",\n \"components\": [\n {\n \"name\": \"startTime\",\n \"type\": \"uint40\",\n \"internalType\": \"uint40\"\n },\n {\n \"name\": \"decaySeconds\",\n \"type\": \"uint32\",\n \"internalType\": \"uint32\"\n },\n {\n \"name\": \"initialFeeBips\",\n \"type\": \"uint24\",\n \"internalType\": \"uint24\"\n },\n {\n \"name\": \"finalFeeBips\",\n \"type\": \"uint24\",\n \"internalType\": \"uint24\"\n },\n {\n \"name\": \"maxBuyPerTx\",\n \"type\": \"uint128\",\n \"internalType\": \"uint128\"\n },\n {\n \"name\": \"launchTokenIsCurrency0\",\n \"type\": \"bool\",\n \"internalType\": \"bool\"\n },\n {\n \"name\": \"enabled\",\n \"type\": \"bool\",\n \"internalType\": \"bool\"\n }\n ]\n }\n ],\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\"\n },\n {\n \"type\": \"function\",\n \"name\": \"configureTax\",\n \"inputs\": [\n {\n \"name\": \"key\",\n \"type\": \"tuple\",\n \"internalType\": \"struct PoolKey\",\n \"components\": [\n {\n \"name\": \"currency0\",\n \"type\": \"address\",\n \"internalType\": \"Currency\"\n },\n {\n \"name\": \"currency1\",\n \"type\": \"address\",\n \"internalType\": \"Currency\"\n },\n {\n \"name\": \"hooks\",\n \"type\": \"address\",\n \"internalType\": \"contract IHooks\"\n },\n {\n \"name\": \"poolManager\",\n \"type\": \"address\",\n \"internalType\": \"contract IPoolManager\"\n },\n {\n \"name\": \"fee\",\n \"type\": \"uint24\",\n \"internalType\": \"uint24\"\n },\n {\n \"name\": \"parameters\",\n \"type\": \"bytes32\",\n \"internalType\": \"bytes32\"\n }\n ]\n },\n {\n \"name\": \"cfg\",\n \"type\": \"tuple\",\n \"internalType\": \"struct LaunchTaxModule.TaxConfig\",\n \"components\": [\n {\n \"name\": \"buyBps\",\n \"type\": \"uint16\",\n \"internalType\": \"uint16\"\n },\n {\n \"name\": \"sellBps\",\n \"type\": \"uint16\",\n \"internalType\": \"uint16\"\n },\n {\n \"name\": \"expiresAt\",\n \"type\": \"uint40\",\n \"internalType\": \"uint40\"\n },\n {\n \"name\": \"creator\",\n \"type\": \"address\",\n \"internalType\": \"address\"\n },\n {\n \"name\": \"integrator\",\n \"type\": \"address\",\n \"internalType\": \"address\"\n },\n {\n \"name\": \"creatorBps\",\n \"type\": \"uint16\",\n \"internalType\": \"uint16\"\n },\n {\n \"name\": \"protocolBps\",\n \"type\": \"uint16\",\n \"internalType\": \"uint16\"\n },\n {\n \"name\": \"integratorBps\",\n \"type\": \"uint16\",\n \"internalType\": \"uint16\"\n }\n ]\n }\n ],\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\"\n },\n {\n \"type\": \"function\",\n \"name\": \"currentFee\",\n \"inputs\": [\n {\n \"name\": \"poolId\",\n \"type\": \"bytes32\",\n \"internalType\": \"PoolId\"\n }\n ],\n \"outputs\": [\n {\n \"name\": \"\",\n \"type\": \"uint24\",\n \"internalType\": \"uint24\"\n }\n ],\n \"stateMutability\": \"view\"\n },\n {\n \"type\": \"function\",\n \"name\": \"currentTaxRates\",\n \"inputs\": [\n {\n \"name\": \"poolId\",\n \"type\": \"bytes32\",\n \"internalType\": \"PoolId\"\n }\n ],\n \"outputs\": [\n {\n \"name\": \"buyBps\",\n \"type\": \"uint16\",\n \"internalType\": \"uint16\"\n },\n {\n \"name\": \"sellBps\",\n \"type\": \"uint16\",\n \"internalType\": \"uint16\"\n }\n ],\n \"stateMutability\": \"view\"\n },\n {\n \"type\": \"function\",\n \"name\": \"feeAt\",\n \"inputs\": [\n {\n \"name\": \"poolId\",\n \"type\": \"bytes32\",\n \"internalType\": \"PoolId\"\n },\n {\n \"name\": \"timestamp\",\n \"type\": \"uint256\",\n \"internalType\": \"uint256\"\n }\n ],\n \"outputs\": [\n {\n \"name\": \"\",\n \"type\": \"uint24\",\n \"internalType\": \"uint24\"\n }\n ],\n \"stateMutability\": \"view\"\n },\n {\n \"type\": \"function\",\n \"name\": \"getHooksRegistrationBitmap\",\n \"inputs\": [],\n \"outputs\": [\n {\n \"name\": \"\",\n \"type\": \"uint16\",\n \"internalType\": \"uint16\"\n }\n ],\n \"stateMutability\": \"pure\"\n },\n {\n \"type\": \"function\",\n \"name\": \"getLaunch\",\n \"inputs\": [\n {\n \"name\": \"poolId\",\n \"type\": \"bytes32\",\n \"internalType\": \"PoolId\"\n }\n ],\n \"outputs\": [\n {\n \"name\": \"\",\n \"type\": \"tuple\",\n \"internalType\": \"struct BinLaunchGuardHook.Launch\",\n \"components\": [\n {\n \"name\": \"owner\",\n \"type\": \"address\",\n \"internalType\": \"address\"\n },\n {\n \"name\": \"startTime\",\n \"type\": \"uint40\",\n \"internalType\": \"uint40\"\n },\n {\n \"name\": \"decaySeconds\",\n \"type\": \"uint32\",\n \"internalType\": \"uint32\"\n },\n {\n \"name\": \"enabled\",\n \"type\": \"bool\",\n \"internalType\": \"bool\"\n },\n {\n \"name\": \"initialFeeBips\",\n \"type\": \"uint24\",\n \"internalType\": \"uint24\"\n },\n {\n \"name\": \"finalFeeBips\",\n \"type\": \"uint24\",\n \"internalType\": \"uint24\"\n },\n {\n \"name\": \"maxBuyPerTx\",\n \"type\": \"uint128\",\n \"internalType\": \"uint128\"\n },\n {\n \"name\": \"launchTokenIsCurrency0\",\n \"type\": \"bool\",\n \"internalType\": \"bool\"\n },\n {\n \"name\": \"launched\",\n \"type\": \"bool\",\n \"internalType\": \"bool\"\n }\n ]\n }\n ],\n \"stateMutability\": \"view\"\n },\n {\n \"type\": \"function\",\n \"name\": \"getTax\",\n \"inputs\": [\n {\n \"name\": \"poolId\",\n \"type\": \"bytes32\",\n \"internalType\": \"PoolId\"\n }\n ],\n \"outputs\": [\n {\n \"name\": \"\",\n \"type\": \"tuple\",\n \"internalType\": \"struct LaunchTaxModule.Tax\",\n \"components\": [\n {\n \"name\": \"creator\",\n \"type\": \"address\",\n \"internalType\": \"address\"\n },\n {\n \"name\": \"buyBps\",\n \"type\": \"uint16\",\n \"internalType\": \"uint16\"\n },\n {\n \"name\": \"sellBps\",\n \"type\": \"uint16\",\n \"internalType\": \"uint16\"\n },\n {\n \"name\": \"expiresAt\",\n \"type\": \"uint40\",\n \"internalType\": \"uint40\"\n },\n {\n \"name\": \"creatorBps\",\n \"type\": \"uint16\",\n \"internalType\": \"uint16\"\n },\n {\n \"name\": \"integrator\",\n \"type\": \"address\",\n \"internalType\": \"address\"\n },\n {\n \"name\": \"protocolBps\",\n \"type\": \"uint16\",\n \"internalType\": \"uint16\"\n },\n {\n \"name\": \"integratorBps\",\n \"type\": \"uint16\",\n \"internalType\": \"uint16\"\n }\n ]\n }\n ],\n \"stateMutability\": \"view\"\n },\n {\n \"type\": \"function\",\n \"name\": \"launchClaimerOf\",\n \"inputs\": [\n {\n \"name\": \"token\",\n \"type\": \"address\",\n \"internalType\": \"address\"\n }\n ],\n \"outputs\": [\n {\n \"name\": \"claimer\",\n \"type\": \"address\",\n \"internalType\": \"address\"\n }\n ],\n \"stateMutability\": \"view\"\n },\n {\n \"type\": \"function\",\n \"name\": \"launchOwner\",\n \"inputs\": [\n {\n \"name\": \"poolId\",\n \"type\": \"bytes32\",\n \"internalType\": \"PoolId\"\n }\n ],\n \"outputs\": [\n {\n \"name\": \"\",\n \"type\": \"address\",\n \"internalType\": \"address\"\n }\n ],\n \"stateMutability\": \"view\"\n },\n {\n \"type\": \"function\",\n \"name\": \"pendingTax\",\n \"inputs\": [\n {\n \"name\": \"poolId\",\n \"type\": \"bytes32\",\n \"internalType\": \"PoolId\"\n },\n {\n \"name\": \"currency\",\n \"type\": \"address\",\n \"internalType\": \"Currency\"\n }\n ],\n \"outputs\": [\n {\n \"name\": \"\",\n \"type\": \"uint256\",\n \"internalType\": \"uint256\"\n }\n ],\n \"stateMutability\": \"view\"\n },\n {\n \"type\": \"function\",\n \"name\": \"poolManager\",\n \"inputs\": [],\n \"outputs\": [\n {\n \"name\": \"\",\n \"type\": \"address\",\n \"internalType\": \"contract IBinPoolManager\"\n }\n ],\n \"stateMutability\": \"view\"\n },\n {\n \"type\": \"function\",\n \"name\": \"protocolRecipient\",\n \"inputs\": [],\n \"outputs\": [\n {\n \"name\": \"\",\n \"type\": \"address\",\n \"internalType\": \"address\"\n }\n ],\n \"stateMutability\": \"view\"\n },\n {\n \"type\": \"function\",\n \"name\": \"redeem\",\n \"inputs\": [\n {\n \"name\": \"currency\",\n \"type\": \"address\",\n \"internalType\": \"Currency\"\n }\n ],\n \"outputs\": [\n {\n \"name\": \"amount\",\n \"type\": \"uint256\",\n \"internalType\": \"uint256\"\n }\n ],\n \"stateMutability\": \"nonpayable\"\n },\n {\n \"type\": \"function\",\n \"name\": \"setLaunchClaimer\",\n \"inputs\": [\n {\n \"name\": \"token\",\n \"type\": \"address\",\n \"internalType\": \"address\"\n },\n {\n \"name\": \"claimer\",\n \"type\": \"address\",\n \"internalType\": \"address\"\n }\n ],\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\"\n },\n {\n \"type\": \"function\",\n \"name\": \"settleTax\",\n \"inputs\": [\n {\n \"name\": \"poolId\",\n \"type\": \"bytes32\",\n \"internalType\": \"PoolId\"\n },\n {\n \"name\": \"currency\",\n \"type\": \"address\",\n \"internalType\": \"Currency\"\n }\n ],\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\"\n },\n {\n \"type\": \"function\",\n \"name\": \"skim\",\n \"inputs\": [\n {\n \"name\": \"currency\",\n \"type\": \"address\",\n \"internalType\": \"Currency\"\n }\n ],\n \"outputs\": [\n {\n \"name\": \"surplus\",\n \"type\": \"uint256\",\n \"internalType\": \"uint256\"\n }\n ],\n \"stateMutability\": \"nonpayable\"\n },\n {\n \"type\": \"function\",\n \"name\": \"taxRatesAt\",\n \"inputs\": [\n {\n \"name\": \"poolId\",\n \"type\": \"bytes32\",\n \"internalType\": \"PoolId\"\n },\n {\n \"name\": \"timestamp\",\n \"type\": \"uint256\",\n \"internalType\": \"uint256\"\n }\n ],\n \"outputs\": [\n {\n \"name\": \"buyBps\",\n \"type\": \"uint16\",\n \"internalType\": \"uint16\"\n },\n {\n \"name\": \"sellBps\",\n \"type\": \"uint16\",\n \"internalType\": \"uint16\"\n }\n ],\n \"stateMutability\": \"view\"\n },\n {\n \"type\": \"function\",\n \"name\": \"totalOwed\",\n \"inputs\": [\n {\n \"name\": \"currency\",\n \"type\": \"address\",\n \"internalType\": \"Currency\"\n }\n ],\n \"outputs\": [\n {\n \"name\": \"\",\n \"type\": \"uint256\",\n \"internalType\": \"uint256\"\n }\n ],\n \"stateMutability\": \"view\"\n },\n {\n \"type\": \"function\",\n \"name\": \"vault\",\n \"inputs\": [],\n \"outputs\": [\n {\n \"name\": \"\",\n \"type\": \"address\",\n \"internalType\": \"contract IVault\"\n }\n ],\n \"stateMutability\": \"view\"\n }\n];\n/**\n * `LaunchpadKitV2` - locked, multi-pool (CL and Bin) launches with a Safe-owned launch fee.\n *\n * 65 errors, 13 events, 53 functions - curated from the compiled artifact, not the full ABI.\n */\nexport const LAUNCHPAD_KIT_V2_ABI = [\n {\n \"type\": \"error\",\n \"name\": \"ActiveIdMoved\",\n \"inputs\": [\n {\n \"name\": \"index\",\n \"type\": \"uint256\",\n \"internalType\": \"uint256\"\n },\n {\n \"name\": \"expected\",\n \"type\": \"uint24\",\n \"internalType\": \"uint24\"\n },\n {\n \"name\": \"actual\",\n \"type\": \"uint24\",\n \"internalType\": \"uint24\"\n }\n ]\n },\n {\n \"type\": \"error\",\n \"name\": \"AddressEmptyCode\",\n \"inputs\": [\n {\n \"name\": \"target\",\n \"type\": \"address\",\n \"internalType\": \"address\"\n }\n ]\n },\n {\n \"type\": \"error\",\n \"name\": \"AddressInsufficientBalance\",\n \"inputs\": [\n {\n \"name\": \"account\",\n \"type\": \"address\",\n \"internalType\": \"address\"\n }\n ]\n },\n {\n \"type\": \"error\",\n \"name\": \"AllocationRecipientRequired\",\n \"inputs\": []\n },\n {\n \"type\": \"error\",\n \"name\": \"BinIdOutOfRange\",\n \"inputs\": [\n {\n \"name\": \"index\",\n \"type\": \"uint256\",\n \"internalType\": \"uint256\"\n },\n {\n \"name\": \"activeId\",\n \"type\": \"uint24\",\n \"internalType\": \"uint24\"\n },\n {\n \"name\": \"offset\",\n \"type\": \"uint24\",\n \"internalType\": \"uint24\"\n }\n ]\n },\n {\n \"type\": \"error\",\n \"name\": \"BinShapeNotAllowed\",\n \"inputs\": [\n {\n \"name\": \"tenant\",\n \"type\": \"address\",\n \"internalType\": \"address\"\n },\n {\n \"name\": \"shape\",\n \"type\": \"uint8\",\n \"internalType\": \"enum BinShape\"\n }\n ]\n },\n {\n \"type\": \"error\",\n \"name\": \"DuplicateLegPool\",\n \"inputs\": [\n {\n \"name\": \"poolId\",\n \"type\": \"bytes32\",\n \"internalType\": \"bytes32\"\n }\n ]\n },\n {\n \"type\": \"error\",\n \"name\": \"EmptyLeg\",\n \"inputs\": [\n {\n \"name\": \"index\",\n \"type\": \"uint256\",\n \"internalType\": \"uint256\"\n }\n ]\n },\n {\n \"type\": \"error\",\n \"name\": \"FailedInnerCall\",\n \"inputs\": []\n },\n {\n \"type\": \"error\",\n \"name\": \"HookClockMismatch\",\n \"inputs\": [\n {\n \"name\": \"hook\",\n \"type\": \"address\",\n \"internalType\": \"address\"\n }\n ]\n },\n {\n \"type\": \"error\",\n \"name\": \"HookFactoryMismatch\",\n \"inputs\": [\n {\n \"name\": \"hook\",\n \"type\": \"address\",\n \"internalType\": \"address\"\n },\n {\n \"name\": \"factory\",\n \"type\": \"address\",\n \"internalType\": \"address\"\n }\n ]\n },\n {\n \"type\": \"error\",\n \"name\": \"HookPoolManagerMismatch\",\n \"inputs\": [\n {\n \"name\": \"expected\",\n \"type\": \"address\",\n \"internalType\": \"address\"\n },\n {\n \"name\": \"actual\",\n \"type\": \"address\",\n \"internalType\": \"address\"\n }\n ]\n },\n {\n \"type\": \"error\",\n \"name\": \"HookTaxMismatch\",\n \"inputs\": [\n {\n \"name\": \"hook\",\n \"type\": \"address\",\n \"internalType\": \"address\"\n }\n ]\n },\n {\n \"type\": \"error\",\n \"name\": \"InsufficientLaunchFee\",\n \"inputs\": [\n {\n \"name\": \"required\",\n \"type\": \"uint256\",\n \"internalType\": \"uint256\"\n },\n {\n \"name\": \"sent\",\n \"type\": \"uint256\",\n \"internalType\": \"uint256\"\n }\n ]\n },\n {\n \"type\": \"error\",\n \"name\": \"IntegratorFeeAboveCap\",\n \"inputs\": [\n {\n \"name\": \"feeWei\",\n \"type\": \"uint256\",\n \"internalType\": \"uint256\"\n },\n {\n \"name\": \"capWei\",\n \"type\": \"uint256\",\n \"internalType\": \"uint256\"\n }\n ]\n },\n {\n \"type\": \"error\",\n \"name\": \"IntegratorFeeWithoutIntegrator\",\n \"inputs\": []\n },\n {\n \"type\": \"error\",\n \"name\": \"InvalidBinCap\",\n \"inputs\": [\n {\n \"name\": \"maxBinsPerLeg\",\n \"type\": \"uint16\",\n \"internalType\": \"uint16\"\n }\n ]\n },\n {\n \"type\": \"error\",\n \"name\": \"InvalidLegCap\",\n \"inputs\": [\n {\n \"name\": \"maxLegs\",\n \"type\": \"uint8\",\n \"internalType\": \"uint8\"\n }\n ]\n },\n {\n \"type\": \"error\",\n \"name\": \"InvalidLegCount\",\n \"inputs\": [\n {\n \"name\": \"count\",\n \"type\": \"uint256\",\n \"internalType\": \"uint256\"\n },\n {\n \"name\": \"maxLegs\",\n \"type\": \"uint8\",\n \"internalType\": \"uint8\"\n }\n ]\n },\n {\n \"type\": \"error\",\n \"name\": \"InvalidNotice\",\n \"inputs\": [\n {\n \"name\": \"noticeSeconds\",\n \"type\": \"uint32\",\n \"internalType\": \"uint32\"\n }\n ]\n },\n {\n \"type\": \"error\",\n \"name\": \"InvalidRecipient\",\n \"inputs\": [\n {\n \"name\": \"recipient\",\n \"type\": \"address\",\n \"internalType\": \"address\"\n }\n ]\n },\n {\n \"type\": \"error\",\n \"name\": \"InvalidSeedSupply\",\n \"inputs\": [\n {\n \"name\": \"seedSupply\",\n \"type\": \"uint256\",\n \"internalType\": \"uint256\"\n },\n {\n \"name\": \"totalSupply\",\n \"type\": \"uint256\",\n \"internalType\": \"uint256\"\n }\n ]\n },\n {\n \"type\": \"error\",\n \"name\": \"InvalidTenantConfig\",\n \"inputs\": []\n },\n {\n \"type\": \"error\",\n \"name\": \"KitRetainedBinShares\",\n \"inputs\": [\n {\n \"name\": \"index\",\n \"type\": \"uint256\",\n \"internalType\": \"uint256\"\n },\n {\n \"name\": \"binId\",\n \"type\": \"uint24\",\n \"internalType\": \"uint24\"\n },\n {\n \"name\": \"balance\",\n \"type\": \"uint256\",\n \"internalType\": \"uint256\"\n }\n ]\n },\n {\n \"type\": \"error\",\n \"name\": \"KitRetainedLaunchToken\",\n \"inputs\": [\n {\n \"name\": \"balance\",\n \"type\": \"uint256\",\n \"internalType\": \"uint256\"\n }\n ]\n },\n {\n \"type\": \"error\",\n \"name\": \"LaunchFeeAboveCap\",\n \"inputs\": [\n {\n \"name\": \"feeWei\",\n \"type\": \"uint256\",\n \"internalType\": \"uint256\"\n },\n {\n \"name\": \"capWei\",\n \"type\": \"uint256\",\n \"internalType\": \"uint256\"\n }\n ]\n },\n {\n \"type\": \"error\",\n \"name\": \"LaunchTokenAddressMismatch\",\n \"inputs\": [\n {\n \"name\": \"predicted\",\n \"type\": \"address\",\n \"internalType\": \"address\"\n },\n {\n \"name\": \"created\",\n \"type\": \"address\",\n \"internalType\": \"address\"\n }\n ]\n },\n {\n \"type\": \"error\",\n \"name\": \"LaunchTokenSupplyMismatch\",\n \"inputs\": [\n {\n \"name\": \"expected\",\n \"type\": \"uint256\",\n \"internalType\": \"uint256\"\n },\n {\n \"name\": \"received\",\n \"type\": \"uint256\",\n \"internalType\": \"uint256\"\n }\n ]\n },\n {\n \"type\": \"error\",\n \"name\": \"LegKeyMismatch\",\n \"inputs\": [\n {\n \"name\": \"index\",\n \"type\": \"uint256\",\n \"internalType\": \"uint256\"\n }\n ]\n },\n {\n \"type\": \"error\",\n \"name\": \"LegTooLarge\",\n \"inputs\": [\n {\n \"name\": \"index\",\n \"type\": \"uint256\",\n \"internalType\": \"uint256\"\n },\n {\n \"name\": \"amount\",\n \"type\": \"uint256\",\n \"internalType\": \"uint256\"\n }\n ]\n },\n {\n \"type\": \"error\",\n \"name\": \"LegWeightsDoNotSum\",\n \"inputs\": [\n {\n \"name\": \"sum\",\n \"type\": \"uint256\",\n \"internalType\": \"uint256\"\n }\n ]\n },\n {\n \"type\": \"error\",\n \"name\": \"LockNotRecorded\",\n \"inputs\": [\n {\n \"name\": \"index\",\n \"type\": \"uint256\",\n \"internalType\": \"uint256\"\n },\n {\n \"name\": \"lockId\",\n \"type\": \"uint256\",\n \"internalType\": \"uint256\"\n }\n ]\n },\n {\n \"type\": \"error\",\n \"name\": \"LockerFloorTooLow\",\n \"inputs\": [\n {\n \"name\": \"locker\",\n \"type\": \"address\",\n \"internalType\": \"address\"\n },\n {\n \"name\": \"minProtocolBps\",\n \"type\": \"uint16\",\n \"internalType\": \"uint16\"\n }\n ]\n },\n {\n \"type\": \"error\",\n \"name\": \"LockerMismatch\",\n \"inputs\": [\n {\n \"name\": \"locker\",\n \"type\": \"address\",\n \"internalType\": \"address\"\n }\n ]\n },\n {\n \"type\": \"error\",\n \"name\": \"MaxBuyRequiredByPreset\",\n \"inputs\": [\n {\n \"name\": \"preset\",\n \"type\": \"uint8\",\n \"internalType\": \"enum Preset\"\n }\n ]\n },\n {\n \"type\": \"error\",\n \"name\": \"NativeTransferFailed\",\n \"inputs\": [\n {\n \"name\": \"to\",\n \"type\": \"address\",\n \"internalType\": \"address\"\n },\n {\n \"name\": \"amount\",\n \"type\": \"uint256\",\n \"internalType\": \"uint256\"\n }\n ]\n },\n {\n \"type\": \"error\",\n \"name\": \"NoCode\",\n \"inputs\": [\n {\n \"name\": \"account\",\n \"type\": \"address\",\n \"internalType\": \"address\"\n }\n ]\n },\n {\n \"type\": \"error\",\n \"name\": \"NoParametersForCustomPreset\",\n \"inputs\": []\n },\n {\n \"type\": \"error\",\n \"name\": \"NoPendingLaunchFee\",\n \"inputs\": []\n },\n {\n \"type\": \"error\",\n \"name\": \"NotLaunchOperator\",\n \"inputs\": [\n {\n \"name\": \"token\",\n \"type\": \"address\",\n \"internalType\": \"address\"\n },\n {\n \"name\": \"caller\",\n \"type\": \"address\",\n \"internalType\": \"address\"\n }\n ]\n },\n {\n \"type\": \"error\",\n \"name\": \"NothingToClaim\",\n \"inputs\": []\n },\n {\n \"type\": \"error\",\n \"name\": \"NothingToRescue\",\n \"inputs\": [\n {\n \"name\": \"token\",\n \"type\": \"address\",\n \"internalType\": \"address\"\n }\n ]\n },\n {\n \"type\": \"error\",\n \"name\": \"OwnableInvalidOwner\",\n \"inputs\": [\n {\n \"name\": \"owner\",\n \"type\": \"address\",\n \"internalType\": \"address\"\n }\n ]\n },\n {\n \"type\": \"error\",\n \"name\": \"OwnableUnauthorizedAccount\",\n \"inputs\": [\n {\n \"name\": \"account\",\n \"type\": \"address\",\n \"internalType\": \"address\"\n }\n ]\n },\n {\n \"type\": \"error\",\n \"name\": \"PositionManagerMismatch\",\n \"inputs\": [\n {\n \"name\": \"positionManager\",\n \"type\": \"address\",\n \"internalType\": \"address\"\n }\n ]\n },\n {\n \"type\": \"error\",\n \"name\": \"PresetNotAllowed\",\n \"inputs\": [\n {\n \"name\": \"tenant\",\n \"type\": \"address\",\n \"internalType\": \"address\"\n },\n {\n \"name\": \"preset\",\n \"type\": \"uint8\",\n \"internalType\": \"enum Preset\"\n }\n ]\n },\n {\n \"type\": \"error\",\n \"name\": \"PresetUnavailableOnBin\",\n \"inputs\": [\n {\n \"name\": \"preset\",\n \"type\": \"uint8\",\n \"internalType\": \"enum Preset\"\n }\n ]\n },\n {\n \"type\": \"error\",\n \"name\": \"ProtocolFeeNotZero\",\n \"inputs\": [\n {\n \"name\": \"poolId\",\n \"type\": \"bytes32\",\n \"internalType\": \"bytes32\"\n },\n {\n \"name\": \"protocolFee\",\n \"type\": \"uint24\",\n \"internalType\": \"uint24\"\n }\n ]\n },\n {\n \"type\": \"error\",\n \"name\": \"QuoteHasNoCode\",\n \"inputs\": [\n {\n \"name\": \"quote\",\n \"type\": \"address\",\n \"internalType\": \"address\"\n }\n ]\n },\n {\n \"type\": \"error\",\n \"name\": \"QuoteIsLaunchToken\",\n \"inputs\": [\n {\n \"name\": \"quote\",\n \"type\": \"address\",\n \"internalType\": \"address\"\n }\n ]\n },\n {\n \"type\": \"error\",\n \"name\": \"QuoteNotAllowed\",\n \"inputs\": [\n {\n \"name\": \"tenant\",\n \"type\": \"address\",\n \"internalType\": \"address\"\n },\n {\n \"name\": \"quote\",\n \"type\": \"address\",\n \"internalType\": \"address\"\n }\n ]\n },\n {\n \"type\": \"error\",\n \"name\": \"RangeNotSingleSided\",\n \"inputs\": [\n {\n \"name\": \"index\",\n \"type\": \"uint256\",\n \"internalType\": \"uint256\"\n },\n {\n \"name\": \"tickLower\",\n \"type\": \"int24\",\n \"internalType\": \"int24\"\n },\n {\n \"name\": \"tickUpper\",\n \"type\": \"int24\",\n \"internalType\": \"int24\"\n },\n {\n \"name\": \"currentTick\",\n \"type\": \"int24\",\n \"internalType\": \"int24\"\n }\n ]\n },\n {\n \"type\": \"error\",\n \"name\": \"ReentrancyGuardReentrantCall\",\n \"inputs\": []\n },\n {\n \"type\": \"error\",\n \"name\": \"RenounceDisabled\",\n \"inputs\": []\n },\n {\n \"type\": \"error\",\n \"name\": \"RescueToZero\",\n \"inputs\": []\n },\n {\n \"type\": \"error\",\n \"name\": \"SafeERC20FailedOperation\",\n \"inputs\": [\n {\n \"name\": \"token\",\n \"type\": \"address\",\n \"internalType\": \"address\"\n }\n ]\n },\n {\n \"type\": \"error\",\n \"name\": \"SeedProducesNoLiquidity\",\n \"inputs\": [\n {\n \"name\": \"index\",\n \"type\": \"uint256\",\n \"internalType\": \"uint256\"\n }\n ]\n },\n {\n \"type\": \"error\",\n \"name\": \"StartDelayTooLong\",\n \"inputs\": [\n {\n \"name\": \"delaySeconds\",\n \"type\": \"uint32\",\n \"internalType\": \"uint32\"\n }\n ]\n },\n {\n \"type\": \"error\",\n \"name\": \"TaxNotAllowed\",\n \"inputs\": [\n {\n \"name\": \"tenant\",\n \"type\": \"address\",\n \"internalType\": \"address\"\n },\n {\n \"name\": \"bps\",\n \"type\": \"uint16\",\n \"internalType\": \"uint16\"\n }\n ]\n },\n {\n \"type\": \"error\",\n \"name\": \"TenantConfigMismatch\",\n \"inputs\": [\n {\n \"name\": \"tenant\",\n \"type\": \"address\",\n \"internalType\": \"address\"\n }\n ]\n },\n {\n \"type\": \"error\",\n \"name\": \"TenantNotActive\",\n \"inputs\": [\n {\n \"name\": \"tenant\",\n \"type\": \"address\",\n \"internalType\": \"address\"\n }\n ]\n },\n {\n \"type\": \"error\",\n \"name\": \"UnexpectedHookBitmap\",\n \"inputs\": [\n {\n \"name\": \"expected\",\n \"type\": \"uint16\",\n \"internalType\": \"uint16\"\n },\n {\n \"name\": \"actual\",\n \"type\": \"uint16\",\n \"internalType\": \"uint16\"\n }\n ]\n },\n {\n \"type\": \"error\",\n \"name\": \"UnknownLaunch\",\n \"inputs\": [\n {\n \"name\": \"token\",\n \"type\": \"address\",\n \"internalType\": \"address\"\n }\n ]\n },\n {\n \"type\": \"error\",\n \"name\": \"VaultMismatch\",\n \"inputs\": [\n {\n \"name\": \"component\",\n \"type\": \"address\",\n \"internalType\": \"address\"\n }\n ]\n },\n {\n \"type\": \"error\",\n \"name\": \"ZeroAddress\",\n \"inputs\": []\n },\n {\n \"type\": \"event\",\n \"name\": \"ERC20Rescued\",\n \"inputs\": [\n {\n \"name\": \"token\",\n \"type\": \"address\",\n \"indexed\": true,\n \"internalType\": \"address\"\n },\n {\n \"name\": \"to\",\n \"type\": \"address\",\n \"indexed\": true,\n \"internalType\": \"address\"\n },\n {\n \"name\": \"amount\",\n \"type\": \"uint256\",\n \"indexed\": false,\n \"internalType\": \"uint256\"\n }\n ],\n \"anonymous\": false\n },\n {\n \"type\": \"event\",\n \"name\": \"FeesClaimed\",\n \"inputs\": [\n {\n \"name\": \"account\",\n \"type\": \"address\",\n \"indexed\": true,\n \"internalType\": \"address\"\n },\n {\n \"name\": \"to\",\n \"type\": \"address\",\n \"indexed\": true,\n \"internalType\": \"address\"\n },\n {\n \"name\": \"amount\",\n \"type\": \"uint256\",\n \"indexed\": false,\n \"internalType\": \"uint256\"\n }\n ],\n \"anonymous\": false\n },\n {\n \"type\": \"event\",\n \"name\": \"FeesCredited\",\n \"inputs\": [\n {\n \"name\": \"account\",\n \"type\": \"address\",\n \"indexed\": true,\n \"internalType\": \"address\"\n },\n {\n \"name\": \"amount\",\n \"type\": \"uint256\",\n \"indexed\": false,\n \"internalType\": \"uint256\"\n }\n ],\n \"anonymous\": false\n },\n {\n \"type\": \"event\",\n \"name\": \"LaunchCreated\",\n \"inputs\": [\n {\n \"name\": \"token\",\n \"type\": \"address\",\n \"indexed\": true,\n \"internalType\": \"address\"\n },\n {\n \"name\": \"creator\",\n \"type\": \"address\",\n \"indexed\": true,\n \"internalType\": \"address\"\n },\n {\n \"name\": \"tenant\",\n \"type\": \"address\",\n \"indexed\": true,\n \"internalType\": \"address\"\n },\n {\n \"name\": \"launcher\",\n \"type\": \"address\",\n \"indexed\": false,\n \"internalType\": \"address\"\n },\n {\n \"name\": \"operator\",\n \"type\": \"address\",\n \"indexed\": false,\n \"internalType\": \"address\"\n },\n {\n \"name\": \"totalSupply\",\n \"type\": \"uint256\",\n \"indexed\": false,\n \"internalType\": \"uint256\"\n },\n {\n \"name\": \"seedSupply\",\n \"type\": \"uint256\",\n \"indexed\": false,\n \"internalType\": \"uint256\"\n },\n {\n \"name\": \"legCount\",\n \"type\": \"uint8\",\n \"indexed\": false,\n \"internalType\": \"uint8\"\n },\n {\n \"name\": \"startTime\",\n \"type\": \"uint40\",\n \"indexed\": false,\n \"internalType\": \"uint40\"\n },\n {\n \"name\": \"protocolFeeWei\",\n \"type\": \"uint256\",\n \"indexed\": false,\n \"internalType\": \"uint256\"\n },\n {\n \"name\": \"integrator\",\n \"type\": \"address\",\n \"indexed\": false,\n \"internalType\": \"address\"\n },\n {\n \"name\": \"integratorFeeWei\",\n \"type\": \"uint256\",\n \"indexed\": false,\n \"internalType\": \"uint256\"\n }\n ],\n \"anonymous\": false\n },\n {\n \"type\": \"event\",\n \"name\": \"LaunchFeeChanged\",\n \"inputs\": [\n {\n \"name\": \"previousWei\",\n \"type\": \"uint256\",\n \"indexed\": false,\n \"internalType\": \"uint256\"\n },\n {\n \"name\": \"newWei\",\n \"type\": \"uint256\",\n \"indexed\": false,\n \"internalType\": \"uint256\"\n }\n ],\n \"anonymous\": false\n },\n {\n \"type\": \"event\",\n \"name\": \"LaunchFeeIncreaseScheduled\",\n \"inputs\": [\n {\n \"name\": \"currentWei\",\n \"type\": \"uint256\",\n \"indexed\": false,\n \"internalType\": \"uint256\"\n },\n {\n \"name\": \"newWei\",\n \"type\": \"uint256\",\n \"indexed\": false,\n \"internalType\": \"uint256\"\n },\n {\n \"name\": \"effectiveAt\",\n \"type\": \"uint64\",\n \"indexed\": false,\n \"internalType\": \"uint64\"\n }\n ],\n \"anonymous\": false\n },\n {\n \"type\": \"event\",\n \"name\": \"LaunchLegCreated\",\n \"inputs\": [\n {\n \"name\": \"token\",\n \"type\": \"address\",\n \"indexed\": true,\n \"internalType\": \"address\"\n },\n {\n \"name\": \"poolId\",\n \"type\": \"bytes32\",\n \"indexed\": true,\n \"internalType\": \"bytes32\"\n },\n {\n \"name\": \"quote\",\n \"type\": \"address\",\n \"indexed\": true,\n \"internalType\": \"address\"\n },\n {\n \"name\": \"kind\",\n \"type\": \"uint8\",\n \"indexed\": false,\n \"internalType\": \"enum LegKind\"\n },\n {\n \"name\": \"lockId\",\n \"type\": \"uint256\",\n \"indexed\": false,\n \"internalType\": \"uint256\"\n },\n {\n \"name\": \"launchTokenSeeded\",\n \"type\": \"uint256\",\n \"indexed\": false,\n \"internalType\": \"uint256\"\n },\n {\n \"name\": \"weightBps\",\n \"type\": \"uint16\",\n \"indexed\": false,\n \"internalType\": \"uint16\"\n }\n ],\n \"anonymous\": false\n },\n {\n \"type\": \"event\",\n \"name\": \"LaunchReconfigured\",\n \"inputs\": [\n {\n \"name\": \"token\",\n \"type\": \"address\",\n \"indexed\": true,\n \"internalType\": \"address\"\n },\n {\n \"name\": \"operator\",\n \"type\": \"address\",\n \"indexed\": true,\n \"internalType\": \"address\"\n },\n {\n \"name\": \"startTime\",\n \"type\": \"uint40\",\n \"indexed\": false,\n \"internalType\": \"uint40\"\n },\n {\n \"name\": \"decaySeconds\",\n \"type\": \"uint32\",\n \"indexed\": false,\n \"internalType\": \"uint32\"\n },\n {\n \"name\": \"initialFeeBips\",\n \"type\": \"uint24\",\n \"indexed\": false,\n \"internalType\": \"uint24\"\n },\n {\n \"name\": \"finalFeeBips\",\n \"type\": \"uint24\",\n \"indexed\": false,\n \"internalType\": \"uint24\"\n },\n {\n \"name\": \"enabled\",\n \"type\": \"bool\",\n \"indexed\": false,\n \"internalType\": \"bool\"\n },\n {\n \"name\": \"taxBuyBps\",\n \"type\": \"uint16\",\n \"indexed\": false,\n \"internalType\": \"uint16\"\n },\n {\n \"name\": \"taxSellBps\",\n \"type\": \"uint16\",\n \"indexed\": false,\n \"internalType\": \"uint16\"\n },\n {\n \"name\": \"taxExpiresAt\",\n \"type\": \"uint40\",\n \"indexed\": false,\n \"internalType\": \"uint40\"\n }\n ],\n \"anonymous\": false\n },\n {\n \"type\": \"event\",\n \"name\": \"OwnershipTransferStarted\",\n \"inputs\": [\n {\n \"name\": \"previousOwner\",\n \"type\": \"address\",\n \"indexed\": true,\n \"internalType\": \"address\"\n },\n {\n \"name\": \"newOwner\",\n \"type\": \"address\",\n \"indexed\": true,\n \"internalType\": \"address\"\n }\n ],\n \"anonymous\": false\n },\n {\n \"type\": \"event\",\n \"name\": \"OwnershipTransferred\",\n \"inputs\": [\n {\n \"name\": \"previousOwner\",\n \"type\": \"address\",\n \"indexed\": true,\n \"internalType\": \"address\"\n },\n {\n \"name\": \"newOwner\",\n \"type\": \"address\",\n \"indexed\": true,\n \"internalType\": \"address\"\n }\n ],\n \"anonymous\": false\n },\n {\n \"type\": \"event\",\n \"name\": \"PendingLaunchFeeCancelled\",\n \"inputs\": [\n {\n \"name\": \"cancelledWei\",\n \"type\": \"uint256\",\n \"indexed\": false,\n \"internalType\": \"uint256\"\n },\n {\n \"name\": \"effectiveAt\",\n \"type\": \"uint64\",\n \"indexed\": false,\n \"internalType\": \"uint64\"\n }\n ],\n \"anonymous\": false\n },\n {\n \"type\": \"event\",\n \"name\": \"TenantConfigured\",\n \"inputs\": [\n {\n \"name\": \"tenant\",\n \"type\": \"address\",\n \"indexed\": true,\n \"internalType\": \"address\"\n },\n {\n \"name\": \"integrator\",\n \"type\": \"address\",\n \"indexed\": true,\n \"internalType\": \"address\"\n },\n {\n \"name\": \"integratorBps\",\n \"type\": \"uint16\",\n \"indexed\": false,\n \"internalType\": \"uint16\"\n },\n {\n \"name\": \"integratorLaunchFeeWei\",\n \"type\": \"uint96\",\n \"indexed\": false,\n \"internalType\": \"uint96\"\n },\n {\n \"name\": \"allowedPresets\",\n \"type\": \"uint8\",\n \"indexed\": false,\n \"internalType\": \"uint8\"\n },\n {\n \"name\": \"allowedBinShapes\",\n \"type\": \"uint8\",\n \"indexed\": false,\n \"internalType\": \"uint8\"\n },\n {\n \"name\": \"restrictQuotes\",\n \"type\": \"bool\",\n \"indexed\": false,\n \"internalType\": \"bool\"\n },\n {\n \"name\": \"active\",\n \"type\": \"bool\",\n \"indexed\": false,\n \"internalType\": \"bool\"\n },\n {\n \"name\": \"maxTaxBps\",\n \"type\": \"uint16\",\n \"indexed\": false,\n \"internalType\": \"uint16\"\n },\n {\n \"name\": \"taxIntegratorBps\",\n \"type\": \"uint16\",\n \"indexed\": false,\n \"internalType\": \"uint16\"\n }\n ],\n \"anonymous\": false\n },\n {\n \"type\": \"event\",\n \"name\": \"TenantQuoteSet\",\n \"inputs\": [\n {\n \"name\": \"tenant\",\n \"type\": \"address\",\n \"indexed\": true,\n \"internalType\": \"address\"\n },\n {\n \"name\": \"quote\",\n \"type\": \"address\",\n \"indexed\": true,\n \"internalType\": \"address\"\n },\n {\n \"name\": \"allowed\",\n \"type\": \"bool\",\n \"indexed\": false,\n \"internalType\": \"bool\"\n }\n ],\n \"anonymous\": false\n },\n {\n \"type\": \"function\",\n \"name\": \"BIN_HOOK_BITMAP\",\n \"inputs\": [],\n \"outputs\": [\n {\n \"name\": \"\",\n \"type\": \"uint16\",\n \"internalType\": \"uint16\"\n }\n ],\n \"stateMutability\": \"view\"\n },\n {\n \"type\": \"function\",\n \"name\": \"CLOCK_MODE\",\n \"inputs\": [],\n \"outputs\": [\n {\n \"name\": \"\",\n \"type\": \"string\",\n \"internalType\": \"string\"\n }\n ],\n \"stateMutability\": \"view\"\n },\n {\n \"type\": \"function\",\n \"name\": \"CL_HOOK_BITMAP\",\n \"inputs\": [],\n \"outputs\": [\n {\n \"name\": \"\",\n \"type\": \"uint16\",\n \"internalType\": \"uint16\"\n }\n ],\n \"stateMutability\": \"view\"\n },\n {\n \"type\": \"function\",\n \"name\": \"MAX_FEE_NOTICE_SECONDS\",\n \"inputs\": [],\n \"outputs\": [\n {\n \"name\": \"\",\n \"type\": \"uint32\",\n \"internalType\": \"uint32\"\n }\n ],\n \"stateMutability\": \"view\"\n },\n {\n \"type\": \"function\",\n \"name\": \"MAX_LEGS_HARD_CAP\",\n \"inputs\": [],\n \"outputs\": [\n {\n \"name\": \"\",\n \"type\": \"uint8\",\n \"internalType\": \"uint8\"\n }\n ],\n \"stateMutability\": \"view\"\n },\n {\n \"type\": \"function\",\n \"name\": \"MAX_START_DELAY_SECONDS\",\n \"inputs\": [],\n \"outputs\": [\n {\n \"name\": \"\",\n \"type\": \"uint32\",\n \"internalType\": \"uint32\"\n }\n ],\n \"stateMutability\": \"view\"\n },\n {\n \"type\": \"function\",\n \"name\": \"MIN_FEE_NOTICE_SECONDS\",\n \"inputs\": [],\n \"outputs\": [\n {\n \"name\": \"\",\n \"type\": \"uint32\",\n \"internalType\": \"uint32\"\n }\n ],\n \"stateMutability\": \"view\"\n },\n {\n \"type\": \"function\",\n \"name\": \"PROTOCOL_LP_FLOOR_BPS\",\n \"inputs\": [],\n \"outputs\": [\n {\n \"name\": \"\",\n \"type\": \"uint16\",\n \"internalType\": \"uint16\"\n }\n ],\n \"stateMutability\": \"view\"\n },\n {\n \"type\": \"function\",\n \"name\": \"binHook\",\n \"inputs\": [],\n \"outputs\": [\n {\n \"name\": \"\",\n \"type\": \"address\",\n \"internalType\": \"contract BinLaunchGuardHook\"\n }\n ],\n \"stateMutability\": \"view\"\n },\n {\n \"type\": \"function\",\n \"name\": \"binLocker\",\n \"inputs\": [],\n \"outputs\": [\n {\n \"name\": \"\",\n \"type\": \"address\",\n \"internalType\": \"contract LatchBinLPLocker\"\n }\n ],\n \"stateMutability\": \"view\"\n },\n {\n \"type\": \"function\",\n \"name\": \"binPoolManager\",\n \"inputs\": [],\n \"outputs\": [\n {\n \"name\": \"\",\n \"type\": \"address\",\n \"internalType\": \"contract IBinPoolManager\"\n }\n ],\n \"stateMutability\": \"view\"\n },\n {\n \"type\": \"function\",\n \"name\": \"binPositionManager\",\n \"inputs\": [],\n \"outputs\": [\n {\n \"name\": \"\",\n \"type\": \"address\",\n \"internalType\": \"contract IBinPositionManager\"\n }\n ],\n \"stateMutability\": \"view\"\n },\n {\n \"type\": \"function\",\n \"name\": \"cancelPendingLaunchFee\",\n \"inputs\": [],\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\"\n },\n {\n \"type\": \"function\",\n \"name\": \"clHook\",\n \"inputs\": [],\n \"outputs\": [\n {\n \"name\": \"\",\n \"type\": \"address\",\n \"internalType\": \"contract LaunchGuardHook\"\n }\n ],\n \"stateMutability\": \"view\"\n },\n {\n \"type\": \"function\",\n \"name\": \"clLocker\",\n \"inputs\": [],\n \"outputs\": [\n {\n \"name\": \"\",\n \"type\": \"address\",\n \"internalType\": \"contract LatchLPLocker\"\n }\n ],\n \"stateMutability\": \"view\"\n },\n {\n \"type\": \"function\",\n \"name\": \"clPoolManager\",\n \"inputs\": [],\n \"outputs\": [\n {\n \"name\": \"\",\n \"type\": \"address\",\n \"internalType\": \"contract ICLPoolManager\"\n }\n ],\n \"stateMutability\": \"view\"\n },\n {\n \"type\": \"function\",\n \"name\": \"clPositionManager\",\n \"inputs\": [],\n \"outputs\": [\n {\n \"name\": \"\",\n \"type\": \"address\",\n \"internalType\": \"contract ICLPositionManager\"\n }\n ],\n \"stateMutability\": \"view\"\n },\n {\n \"type\": \"function\",\n \"name\": \"claimFees\",\n \"inputs\": [\n {\n \"name\": \"to\",\n \"type\": \"address\",\n \"internalType\": \"address\"\n }\n ],\n \"outputs\": [\n {\n \"name\": \"amount\",\n \"type\": \"uint256\",\n \"internalType\": \"uint256\"\n }\n ],\n \"stateMutability\": \"nonpayable\"\n },\n {\n \"type\": \"function\",\n \"name\": \"computeLegKey\",\n \"inputs\": [\n {\n \"name\": \"token\",\n \"type\": \"address\",\n \"internalType\": \"address\"\n },\n {\n \"name\": \"leg\",\n \"type\": \"tuple\",\n \"internalType\": \"struct LegParams\",\n \"components\": [\n {\n \"name\": \"kind\",\n \"type\": \"uint8\",\n \"internalType\": \"enum LegKind\"\n },\n {\n \"name\": \"quote\",\n \"type\": \"address\",\n \"internalType\": \"address\"\n },\n {\n \"name\": \"weightBps\",\n \"type\": \"uint16\",\n \"internalType\": \"uint16\"\n },\n {\n \"name\": \"maxBuyPerTx\",\n \"type\": \"uint128\",\n \"internalType\": \"uint128\"\n },\n {\n \"name\": \"cl\",\n \"type\": \"tuple\",\n \"internalType\": \"struct CLLegParams\",\n \"components\": [\n {\n \"name\": \"tickSpacing\",\n \"type\": \"int24\",\n \"internalType\": \"int24\"\n },\n {\n \"name\": \"sqrtPriceX96\",\n \"type\": \"uint160\",\n \"internalType\": \"uint160\"\n },\n {\n \"name\": \"tickLower\",\n \"type\": \"int24\",\n \"internalType\": \"int24\"\n },\n {\n \"name\": \"tickUpper\",\n \"type\": \"int24\",\n \"internalType\": \"int24\"\n }\n ]\n },\n {\n \"name\": \"bin\",\n \"type\": \"tuple\",\n \"internalType\": \"struct BinLegParams\",\n \"components\": [\n {\n \"name\": \"binStep\",\n \"type\": \"uint16\",\n \"internalType\": \"uint16\"\n },\n {\n \"name\": \"activeId\",\n \"type\": \"uint24\",\n \"internalType\": \"uint24\"\n },\n {\n \"name\": \"shape\",\n \"type\": \"uint8\",\n \"internalType\": \"enum BinShape\"\n },\n {\n \"name\": \"binCount\",\n \"type\": \"uint16\",\n \"internalType\": \"uint16\"\n },\n {\n \"name\": \"offsets\",\n \"type\": \"uint24[]\",\n \"internalType\": \"uint24[]\"\n },\n {\n \"name\": \"weights\",\n \"type\": \"uint64[]\",\n \"internalType\": \"uint64[]\"\n },\n {\n \"name\": \"floorBins\",\n \"type\": \"uint16\",\n \"internalType\": \"uint16\"\n }\n ]\n }\n ]\n }\n ],\n \"outputs\": [\n {\n \"name\": \"key\",\n \"type\": \"tuple\",\n \"internalType\": \"struct PoolKey\",\n \"components\": [\n {\n \"name\": \"currency0\",\n \"type\": \"address\",\n \"internalType\": \"Currency\"\n },\n {\n \"name\": \"currency1\",\n \"type\": \"address\",\n \"internalType\": \"Currency\"\n },\n {\n \"name\": \"hooks\",\n \"type\": \"address\",\n \"internalType\": \"contract IHooks\"\n },\n {\n \"name\": \"poolManager\",\n \"type\": \"address\",\n \"internalType\": \"contract IPoolManager\"\n },\n {\n \"name\": \"fee\",\n \"type\": \"uint24\",\n \"internalType\": \"uint24\"\n },\n {\n \"name\": \"parameters\",\n \"type\": \"bytes32\",\n \"internalType\": \"bytes32\"\n }\n ]\n },\n {\n \"name\": \"poolId\",\n \"type\": \"bytes32\",\n \"internalType\": \"bytes32\"\n },\n {\n \"name\": \"launchTokenIsCurrency0\",\n \"type\": \"bool\",\n \"internalType\": \"bool\"\n }\n ],\n \"stateMutability\": \"view\"\n },\n {\n \"type\": \"function\",\n \"name\": \"createLaunch\",\n \"inputs\": [\n {\n \"name\": \"p\",\n \"type\": \"tuple\",\n \"internalType\": \"struct LaunchParamsV2\",\n \"components\": [\n {\n \"name\": \"name\",\n \"type\": \"string\",\n \"internalType\": \"string\"\n },\n {\n \"name\": \"symbol\",\n \"type\": \"string\",\n \"internalType\": \"string\"\n },\n {\n \"name\": \"metadataURI\",\n \"type\": \"string\",\n \"internalType\": \"string\"\n },\n {\n \"name\": \"userSalt\",\n \"type\": \"bytes32\",\n \"internalType\": \"bytes32\"\n },\n {\n \"name\": \"totalSupply\",\n \"type\": \"uint256\",\n \"internalType\": \"uint256\"\n },\n {\n \"name\": \"seedSupply\",\n \"type\": \"uint256\",\n \"internalType\": \"uint256\"\n },\n {\n \"name\": \"allocationRecipient\",\n \"type\": \"address\",\n \"internalType\": \"address\"\n },\n {\n \"name\": \"creator\",\n \"type\": \"address\",\n \"internalType\": \"address\"\n },\n {\n \"name\": \"launchOperator\",\n \"type\": \"address\",\n \"internalType\": \"address\"\n },\n {\n \"name\": \"launchSteward\",\n \"type\": \"address\",\n \"internalType\": \"address\"\n },\n {\n \"name\": \"tenant\",\n \"type\": \"address\",\n \"internalType\": \"address\"\n },\n {\n \"name\": \"integrator\",\n \"type\": \"address\",\n \"internalType\": \"address\"\n },\n {\n \"name\": \"integratorBps\",\n \"type\": \"uint16\",\n \"internalType\": \"uint16\"\n },\n {\n \"name\": \"integratorLaunchFeeWei\",\n \"type\": \"uint256\",\n \"internalType\": \"uint256\"\n },\n {\n \"name\": \"creatorBps\",\n \"type\": \"uint16\",\n \"internalType\": \"uint16\"\n },\n {\n \"name\": \"protocolBps\",\n \"type\": \"uint16\",\n \"internalType\": \"uint16\"\n },\n {\n \"name\": \"schedule\",\n \"type\": \"tuple\",\n \"internalType\": \"struct ScheduleParams\",\n \"components\": [\n {\n \"name\": \"preset\",\n \"type\": \"uint8\",\n \"internalType\": \"enum Preset\"\n },\n {\n \"name\": \"initialFeeBips\",\n \"type\": \"uint24\",\n \"internalType\": \"uint24\"\n },\n {\n \"name\": \"finalFeeBips\",\n \"type\": \"uint24\",\n \"internalType\": \"uint24\"\n },\n {\n \"name\": \"decaySeconds\",\n \"type\": \"uint32\",\n \"internalType\": \"uint32\"\n },\n {\n \"name\": \"enabled\",\n \"type\": \"bool\",\n \"internalType\": \"bool\"\n },\n {\n \"name\": \"startDelaySeconds\",\n \"type\": \"uint32\",\n \"internalType\": \"uint32\"\n }\n ]\n },\n {\n \"name\": \"tax\",\n \"type\": \"tuple\",\n \"internalType\": \"struct TaxParams\",\n \"components\": [\n {\n \"name\": \"buyBps\",\n \"type\": \"uint16\",\n \"internalType\": \"uint16\"\n },\n {\n \"name\": \"sellBps\",\n \"type\": \"uint16\",\n \"internalType\": \"uint16\"\n },\n {\n \"name\": \"taxSeconds\",\n \"type\": \"uint32\",\n \"internalType\": \"uint32\"\n },\n {\n \"name\": \"creatorBps\",\n \"type\": \"uint16\",\n \"internalType\": \"uint16\"\n },\n {\n \"name\": \"protocolBps\",\n \"type\": \"uint16\",\n \"internalType\": \"uint16\"\n },\n {\n \"name\": \"integratorBps\",\n \"type\": \"uint16\",\n \"internalType\": \"uint16\"\n }\n ]\n },\n {\n \"name\": \"legs\",\n \"type\": \"tuple[]\",\n \"internalType\": \"struct LegParams[]\",\n \"components\": [\n {\n \"name\": \"kind\",\n \"type\": \"uint8\",\n \"internalType\": \"enum LegKind\"\n },\n {\n \"name\": \"quote\",\n \"type\": \"address\",\n \"internalType\": \"address\"\n },\n {\n \"name\": \"weightBps\",\n \"type\": \"uint16\",\n \"internalType\": \"uint16\"\n },\n {\n \"name\": \"maxBuyPerTx\",\n \"type\": \"uint128\",\n \"internalType\": \"uint128\"\n },\n {\n \"name\": \"cl\",\n \"type\": \"tuple\",\n \"internalType\": \"struct CLLegParams\",\n \"components\": [\n {\n \"name\": \"tickSpacing\",\n \"type\": \"int24\",\n \"internalType\": \"int24\"\n },\n {\n \"name\": \"sqrtPriceX96\",\n \"type\": \"uint160\",\n \"internalType\": \"uint160\"\n },\n {\n \"name\": \"tickLower\",\n \"type\": \"int24\",\n \"internalType\": \"int24\"\n },\n {\n \"name\": \"tickUpper\",\n \"type\": \"int24\",\n \"internalType\": \"int24\"\n }\n ]\n },\n {\n \"name\": \"bin\",\n \"type\": \"tuple\",\n \"internalType\": \"struct BinLegParams\",\n \"components\": [\n {\n \"name\": \"binStep\",\n \"type\": \"uint16\",\n \"internalType\": \"uint16\"\n },\n {\n \"name\": \"activeId\",\n \"type\": \"uint24\",\n \"internalType\": \"uint24\"\n },\n {\n \"name\": \"shape\",\n \"type\": \"uint8\",\n \"internalType\": \"enum BinShape\"\n },\n {\n \"name\": \"binCount\",\n \"type\": \"uint16\",\n \"internalType\": \"uint16\"\n },\n {\n \"name\": \"offsets\",\n \"type\": \"uint24[]\",\n \"internalType\": \"uint24[]\"\n },\n {\n \"name\": \"weights\",\n \"type\": \"uint64[]\",\n \"internalType\": \"uint64[]\"\n },\n {\n \"name\": \"floorBins\",\n \"type\": \"uint16\",\n \"internalType\": \"uint16\"\n }\n ]\n }\n ]\n },\n {\n \"name\": \"listing\",\n \"type\": \"tuple\",\n \"internalType\": \"struct LaunchMetadata\",\n \"components\": [\n {\n \"name\": \"description\",\n \"type\": \"string\",\n \"internalType\": \"string\"\n },\n {\n \"name\": \"websiteURI\",\n \"type\": \"string\",\n \"internalType\": \"string\"\n },\n {\n \"name\": \"xHandle\",\n \"type\": \"string\",\n \"internalType\": \"string\"\n },\n {\n \"name\": \"telegramHandle\",\n \"type\": \"string\",\n \"internalType\": \"string\"\n }\n ]\n }\n ]\n }\n ],\n \"outputs\": [\n {\n \"name\": \"r\",\n \"type\": \"tuple\",\n \"internalType\": \"struct LaunchResultV2\",\n \"components\": [\n {\n \"name\": \"token\",\n \"type\": \"address\",\n \"internalType\": \"address\"\n },\n {\n \"name\": \"poolIds\",\n \"type\": \"bytes32[]\",\n \"internalType\": \"bytes32[]\"\n },\n {\n \"name\": \"lockIds\",\n \"type\": \"uint256[]\",\n \"internalType\": \"uint256[]\"\n },\n {\n \"name\": \"startTime\",\n \"type\": \"uint40\",\n \"internalType\": \"uint40\"\n },\n {\n \"name\": \"protocolFeeWei\",\n \"type\": \"uint256\",\n \"internalType\": \"uint256\"\n },\n {\n \"name\": \"integratorFeeWei\",\n \"type\": \"uint256\",\n \"internalType\": \"uint256\"\n }\n ]\n }\n ],\n \"stateMutability\": \"payable\"\n },\n {\n \"type\": \"function\",\n \"name\": \"feesOwed\",\n \"inputs\": [\n {\n \"name\": \"account\",\n \"type\": \"address\",\n \"internalType\": \"address\"\n }\n ],\n \"outputs\": [\n {\n \"name\": \"\",\n \"type\": \"uint256\",\n \"internalType\": \"uint256\"\n }\n ],\n \"stateMutability\": \"view\"\n },\n {\n \"type\": \"function\",\n \"name\": \"flushProtocolFees\",\n \"inputs\": [],\n \"outputs\": [\n {\n \"name\": \"amount\",\n \"type\": \"uint256\",\n \"internalType\": \"uint256\"\n }\n ],\n \"stateMutability\": \"nonpayable\"\n },\n {\n \"type\": \"function\",\n \"name\": \"getLaunch\",\n \"inputs\": [\n {\n \"name\": \"token\",\n \"type\": \"address\",\n \"internalType\": \"address\"\n }\n ],\n \"outputs\": [\n {\n \"name\": \"\",\n \"type\": \"tuple\",\n \"internalType\": \"struct LaunchRecordV2\",\n \"components\": [\n {\n \"name\": \"creator\",\n \"type\": \"address\",\n \"internalType\": \"address\"\n },\n {\n \"name\": \"createdAt\",\n \"type\": \"uint64\",\n \"internalType\": \"uint64\"\n },\n {\n \"name\": \"legCount\",\n \"type\": \"uint8\",\n \"internalType\": \"uint8\"\n },\n {\n \"name\": \"operator\",\n \"type\": \"address\",\n \"internalType\": \"address\"\n },\n {\n \"name\": \"startTime\",\n \"type\": \"uint40\",\n \"internalType\": \"uint40\"\n },\n {\n \"name\": \"tenant\",\n \"type\": \"address\",\n \"internalType\": \"address\"\n },\n {\n \"name\": \"integrator\",\n \"type\": \"address\",\n \"internalType\": \"address\"\n }\n ]\n }\n ],\n \"stateMutability\": \"view\"\n },\n {\n \"type\": \"function\",\n \"name\": \"getLeg\",\n \"inputs\": [\n {\n \"name\": \"poolId\",\n \"type\": \"bytes32\",\n \"internalType\": \"bytes32\"\n }\n ],\n \"outputs\": [\n {\n \"name\": \"\",\n \"type\": \"tuple\",\n \"internalType\": \"struct LegRecord\",\n \"components\": [\n {\n \"name\": \"launchToken\",\n \"type\": \"address\",\n \"internalType\": \"address\"\n },\n {\n \"name\": \"kind\",\n \"type\": \"uint8\",\n \"internalType\": \"enum LegKind\"\n },\n {\n \"name\": \"launchTokenIsCurrency0\",\n \"type\": \"bool\",\n \"internalType\": \"bool\"\n },\n {\n \"name\": \"lockId\",\n \"type\": \"uint256\",\n \"internalType\": \"uint256\"\n }\n ]\n }\n ],\n \"stateMutability\": \"view\"\n },\n {\n \"type\": \"function\",\n \"name\": \"isLockedLaunch\",\n \"inputs\": [\n {\n \"name\": \"poolId\",\n \"type\": \"bytes32\",\n \"internalType\": \"bytes32\"\n }\n ],\n \"outputs\": [\n {\n \"name\": \"\",\n \"type\": \"bool\",\n \"internalType\": \"bool\"\n }\n ],\n \"stateMutability\": \"view\"\n },\n {\n \"type\": \"function\",\n \"name\": \"launchFeeNoticeSeconds\",\n \"inputs\": [],\n \"outputs\": [\n {\n \"name\": \"\",\n \"type\": \"uint32\",\n \"internalType\": \"uint32\"\n }\n ],\n \"stateMutability\": \"view\"\n },\n {\n \"type\": \"function\",\n \"name\": \"launchFeeWei\",\n \"inputs\": [],\n \"outputs\": [\n {\n \"name\": \"\",\n \"type\": \"uint256\",\n \"internalType\": \"uint256\"\n }\n ],\n \"stateMutability\": \"view\"\n },\n {\n \"type\": \"function\",\n \"name\": \"launchOriginOf\",\n \"inputs\": [\n {\n \"name\": \"poolId\",\n \"type\": \"bytes32\",\n \"internalType\": \"bytes32\"\n }\n ],\n \"outputs\": [\n {\n \"name\": \"creator\",\n \"type\": \"address\",\n \"internalType\": \"address\"\n }\n ],\n \"stateMutability\": \"view\"\n },\n {\n \"type\": \"function\",\n \"name\": \"launchRegistry\",\n \"inputs\": [],\n \"outputs\": [\n {\n \"name\": \"\",\n \"type\": \"address\",\n \"internalType\": \"contract ILaunchRegistryWriter\"\n }\n ],\n \"stateMutability\": \"view\"\n },\n {\n \"type\": \"function\",\n \"name\": \"launchpadSteward\",\n \"inputs\": [],\n \"outputs\": [\n {\n \"name\": \"\",\n \"type\": \"address\",\n \"internalType\": \"address\"\n }\n ],\n \"stateMutability\": \"view\"\n },\n {\n \"type\": \"function\",\n \"name\": \"legsOf\",\n \"inputs\": [\n {\n \"name\": \"token\",\n \"type\": \"address\",\n \"internalType\": \"address\"\n }\n ],\n \"outputs\": [\n {\n \"name\": \"\",\n \"type\": \"bytes32[]\",\n \"internalType\": \"bytes32[]\"\n }\n ],\n \"stateMutability\": \"view\"\n },\n {\n \"type\": \"function\",\n \"name\": \"maxBinsPerLeg\",\n \"inputs\": [],\n \"outputs\": [\n {\n \"name\": \"\",\n \"type\": \"uint16\",\n \"internalType\": \"uint16\"\n }\n ],\n \"stateMutability\": \"view\"\n },\n {\n \"type\": \"function\",\n \"name\": \"maxIntegratorBps\",\n \"inputs\": [],\n \"outputs\": [\n {\n \"name\": \"\",\n \"type\": \"uint16\",\n \"internalType\": \"uint16\"\n }\n ],\n \"stateMutability\": \"view\"\n },\n {\n \"type\": \"function\",\n \"name\": \"maxIntegratorLaunchFeeWei\",\n \"inputs\": [],\n \"outputs\": [\n {\n \"name\": \"\",\n \"type\": \"uint256\",\n \"internalType\": \"uint256\"\n }\n ],\n \"stateMutability\": \"view\"\n },\n {\n \"type\": \"function\",\n \"name\": \"maxLaunchFeeWei\",\n \"inputs\": [],\n \"outputs\": [\n {\n \"name\": \"\",\n \"type\": \"uint256\",\n \"internalType\": \"uint256\"\n }\n ],\n \"stateMutability\": \"view\"\n },\n {\n \"type\": \"function\",\n \"name\": \"maxLegs\",\n \"inputs\": [],\n \"outputs\": [\n {\n \"name\": \"\",\n \"type\": \"uint8\",\n \"internalType\": \"uint8\"\n }\n ],\n \"stateMutability\": \"view\"\n },\n {\n \"type\": \"function\",\n \"name\": \"maxTaxBps\",\n \"inputs\": [],\n \"outputs\": [\n {\n \"name\": \"\",\n \"type\": \"uint16\",\n \"internalType\": \"uint16\"\n }\n ],\n \"stateMutability\": \"view\"\n },\n {\n \"type\": \"function\",\n \"name\": \"maxTaxIntegratorBps\",\n \"inputs\": [],\n \"outputs\": [\n {\n \"name\": \"\",\n \"type\": \"uint16\",\n \"internalType\": \"uint16\"\n }\n ],\n \"stateMutability\": \"view\"\n },\n {\n \"type\": \"function\",\n \"name\": \"owner\",\n \"inputs\": [],\n \"outputs\": [\n {\n \"name\": \"\",\n \"type\": \"address\",\n \"internalType\": \"address\"\n }\n ],\n \"stateMutability\": \"view\"\n },\n {\n \"type\": \"function\",\n \"name\": \"pendingLaunchFee\",\n \"inputs\": [],\n \"outputs\": [\n {\n \"name\": \"feeWei\",\n \"type\": \"uint256\",\n \"internalType\": \"uint256\"\n },\n {\n \"name\": \"effectiveAt\",\n \"type\": \"uint64\",\n \"internalType\": \"uint64\"\n }\n ],\n \"stateMutability\": \"view\"\n },\n {\n \"type\": \"function\",\n \"name\": \"pendingOwner\",\n \"inputs\": [],\n \"outputs\": [\n {\n \"name\": \"\",\n \"type\": \"address\",\n \"internalType\": \"address\"\n }\n ],\n \"stateMutability\": \"view\"\n },\n {\n \"type\": \"function\",\n \"name\": \"predictLaunchToken\",\n \"inputs\": [\n {\n \"name\": \"launcher\",\n \"type\": \"address\",\n \"internalType\": \"address\"\n },\n {\n \"name\": \"userSalt\",\n \"type\": \"bytes32\",\n \"internalType\": \"bytes32\"\n }\n ],\n \"outputs\": [\n {\n \"name\": \"\",\n \"type\": \"address\",\n \"internalType\": \"address\"\n }\n ],\n \"stateMutability\": \"view\"\n },\n {\n \"type\": \"function\",\n \"name\": \"protocolFeeRecipient\",\n \"inputs\": [],\n \"outputs\": [\n {\n \"name\": \"\",\n \"type\": \"address\",\n \"internalType\": \"address\"\n }\n ],\n \"stateMutability\": \"view\"\n },\n {\n \"type\": \"function\",\n \"name\": \"reconfigureLaunch\",\n \"inputs\": [\n {\n \"name\": \"token\",\n \"type\": \"address\",\n \"internalType\": \"address\"\n },\n {\n \"name\": \"keys\",\n \"type\": \"tuple[]\",\n \"internalType\": \"struct PoolKey[]\",\n \"components\": [\n {\n \"name\": \"currency0\",\n \"type\": \"address\",\n \"internalType\": \"Currency\"\n },\n {\n \"name\": \"currency1\",\n \"type\": \"address\",\n \"internalType\": \"Currency\"\n },\n {\n \"name\": \"hooks\",\n \"type\": \"address\",\n \"internalType\": \"contract IHooks\"\n },\n {\n \"name\": \"poolManager\",\n \"type\": \"address\",\n \"internalType\": \"contract IPoolManager\"\n },\n {\n \"name\": \"fee\",\n \"type\": \"uint24\",\n \"internalType\": \"uint24\"\n },\n {\n \"name\": \"parameters\",\n \"type\": \"bytes32\",\n \"internalType\": \"bytes32\"\n }\n ]\n },\n {\n \"name\": \"schedule\",\n \"type\": \"tuple\",\n \"internalType\": \"struct ScheduleParams\",\n \"components\": [\n {\n \"name\": \"preset\",\n \"type\": \"uint8\",\n \"internalType\": \"enum Preset\"\n },\n {\n \"name\": \"initialFeeBips\",\n \"type\": \"uint24\",\n \"internalType\": \"uint24\"\n },\n {\n \"name\": \"finalFeeBips\",\n \"type\": \"uint24\",\n \"internalType\": \"uint24\"\n },\n {\n \"name\": \"decaySeconds\",\n \"type\": \"uint32\",\n \"internalType\": \"uint32\"\n },\n {\n \"name\": \"enabled\",\n \"type\": \"bool\",\n \"internalType\": \"bool\"\n },\n {\n \"name\": \"startDelaySeconds\",\n \"type\": \"uint32\",\n \"internalType\": \"uint32\"\n }\n ]\n },\n {\n \"name\": \"tax\",\n \"type\": \"tuple\",\n \"internalType\": \"struct TaxParams\",\n \"components\": [\n {\n \"name\": \"buyBps\",\n \"type\": \"uint16\",\n \"internalType\": \"uint16\"\n },\n {\n \"name\": \"sellBps\",\n \"type\": \"uint16\",\n \"internalType\": \"uint16\"\n },\n {\n \"name\": \"taxSeconds\",\n \"type\": \"uint32\",\n \"internalType\": \"uint32\"\n },\n {\n \"name\": \"creatorBps\",\n \"type\": \"uint16\",\n \"internalType\": \"uint16\"\n },\n {\n \"name\": \"protocolBps\",\n \"type\": \"uint16\",\n \"internalType\": \"uint16\"\n },\n {\n \"name\": \"integratorBps\",\n \"type\": \"uint16\",\n \"internalType\": \"uint16\"\n }\n ]\n }\n ],\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\"\n },\n {\n \"type\": \"function\",\n \"name\": \"registerLaunchpad\",\n \"inputs\": [\n {\n \"name\": \"metadata\",\n \"type\": \"tuple\",\n \"internalType\": \"struct LaunchpadMetadata\",\n \"components\": [\n {\n \"name\": \"name\",\n \"type\": \"string\",\n \"internalType\": \"string\"\n },\n {\n \"name\": \"description\",\n \"type\": \"string\",\n \"internalType\": \"string\"\n },\n {\n \"name\": \"sourceURI\",\n \"type\": \"string\",\n \"internalType\": \"string\"\n },\n {\n \"name\": \"auditURI\",\n \"type\": \"string\",\n \"internalType\": \"string\"\n },\n {\n \"name\": \"websiteURI\",\n \"type\": \"string\",\n \"internalType\": \"string\"\n }\n ]\n }\n ],\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\"\n },\n {\n \"type\": \"function\",\n \"name\": \"rescueERC20\",\n \"inputs\": [\n {\n \"name\": \"token\",\n \"type\": \"address\",\n \"internalType\": \"address\"\n },\n {\n \"name\": \"to\",\n \"type\": \"address\",\n \"internalType\": \"address\"\n }\n ],\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\"\n },\n {\n \"type\": \"function\",\n \"name\": \"setLaunchFee\",\n \"inputs\": [\n {\n \"name\": \"newFeeWei\",\n \"type\": \"uint256\",\n \"internalType\": \"uint256\"\n }\n ],\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\"\n },\n {\n \"type\": \"function\",\n \"name\": \"setTenantConfig\",\n \"inputs\": [\n {\n \"name\": \"c\",\n \"type\": \"tuple\",\n \"internalType\": \"struct TenantConfig\",\n \"components\": [\n {\n \"name\": \"integrator\",\n \"type\": \"address\",\n \"internalType\": \"address\"\n },\n {\n \"name\": \"integratorBps\",\n \"type\": \"uint16\",\n \"internalType\": \"uint16\"\n },\n {\n \"name\": \"integratorLaunchFeeWei\",\n \"type\": \"uint96\",\n \"internalType\": \"uint96\"\n },\n {\n \"name\": \"allowedPresets\",\n \"type\": \"uint8\",\n \"internalType\": \"uint8\"\n },\n {\n \"name\": \"allowedBinShapes\",\n \"type\": \"uint8\",\n \"internalType\": \"uint8\"\n },\n {\n \"name\": \"restrictQuotes\",\n \"type\": \"bool\",\n \"internalType\": \"bool\"\n },\n {\n \"name\": \"active\",\n \"type\": \"bool\",\n \"internalType\": \"bool\"\n },\n {\n \"name\": \"maxTaxBps\",\n \"type\": \"uint16\",\n \"internalType\": \"uint16\"\n },\n {\n \"name\": \"taxIntegratorBps\",\n \"type\": \"uint16\",\n \"internalType\": \"uint16\"\n }\n ]\n }\n ],\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\"\n },\n {\n \"type\": \"function\",\n \"name\": \"setTenantQuote\",\n \"inputs\": [\n {\n \"name\": \"quote\",\n \"type\": \"address\",\n \"internalType\": \"address\"\n },\n {\n \"name\": \"allowed\",\n \"type\": \"bool\",\n \"internalType\": \"bool\"\n }\n ],\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\"\n },\n {\n \"type\": \"function\",\n \"name\": \"tenantConfig\",\n \"inputs\": [\n {\n \"name\": \"tenant\",\n \"type\": \"address\",\n \"internalType\": \"address\"\n }\n ],\n \"outputs\": [\n {\n \"name\": \"\",\n \"type\": \"tuple\",\n \"internalType\": \"struct TenantConfig\",\n \"components\": [\n {\n \"name\": \"integrator\",\n \"type\": \"address\",\n \"internalType\": \"address\"\n },\n {\n \"name\": \"integratorBps\",\n \"type\": \"uint16\",\n \"internalType\": \"uint16\"\n },\n {\n \"name\": \"integratorLaunchFeeWei\",\n \"type\": \"uint96\",\n \"internalType\": \"uint96\"\n },\n {\n \"name\": \"allowedPresets\",\n \"type\": \"uint8\",\n \"internalType\": \"uint8\"\n },\n {\n \"name\": \"allowedBinShapes\",\n \"type\": \"uint8\",\n \"internalType\": \"uint8\"\n },\n {\n \"name\": \"restrictQuotes\",\n \"type\": \"bool\",\n \"internalType\": \"bool\"\n },\n {\n \"name\": \"active\",\n \"type\": \"bool\",\n \"internalType\": \"bool\"\n },\n {\n \"name\": \"maxTaxBps\",\n \"type\": \"uint16\",\n \"internalType\": \"uint16\"\n },\n {\n \"name\": \"taxIntegratorBps\",\n \"type\": \"uint16\",\n \"internalType\": \"uint16\"\n }\n ]\n }\n ],\n \"stateMutability\": \"view\"\n },\n {\n \"type\": \"function\",\n \"name\": \"tenantQuoteAllowed\",\n \"inputs\": [\n {\n \"name\": \"tenant\",\n \"type\": \"address\",\n \"internalType\": \"address\"\n },\n {\n \"name\": \"quote\",\n \"type\": \"address\",\n \"internalType\": \"address\"\n }\n ],\n \"outputs\": [\n {\n \"name\": \"\",\n \"type\": \"bool\",\n \"internalType\": \"bool\"\n }\n ],\n \"stateMutability\": \"view\"\n },\n {\n \"type\": \"function\",\n \"name\": \"tokenFactory\",\n \"inputs\": [],\n \"outputs\": [\n {\n \"name\": \"\",\n \"type\": \"address\",\n \"internalType\": \"contract ILaunchTokenFactory\"\n }\n ],\n \"stateMutability\": \"view\"\n },\n {\n \"type\": \"function\",\n \"name\": \"totalFeesOwed\",\n \"inputs\": [],\n \"outputs\": [\n {\n \"name\": \"\",\n \"type\": \"uint256\",\n \"internalType\": \"uint256\"\n }\n ],\n \"stateMutability\": \"view\"\n }\n];\n/**\n * `LaunchLegs` - the kit's linked library. Errors only: it runs by DELEGATECALL inside `createLaunch`, so its reverts (every `BinShape*` rule R1-R6 among them) surface from the KIT's address. Merge it with `LAUNCHPAD_KIT_V2_ABI` to decode a failed launch.\n *\n * 27 errors - curated from the compiled artifact, not the full ABI.\n */\nexport const LAUNCH_LEGS_ABI = [\n {\n \"type\": \"error\",\n \"name\": \"ActiveIdMoved\",\n \"inputs\": [\n {\n \"name\": \"index\",\n \"type\": \"uint256\",\n \"internalType\": \"uint256\"\n },\n {\n \"name\": \"expected\",\n \"type\": \"uint24\",\n \"internalType\": \"uint24\"\n },\n {\n \"name\": \"actual\",\n \"type\": \"uint24\",\n \"internalType\": \"uint24\"\n }\n ]\n },\n {\n \"type\": \"error\",\n \"name\": \"AddressEmptyCode\",\n \"inputs\": [\n {\n \"name\": \"target\",\n \"type\": \"address\",\n \"internalType\": \"address\"\n }\n ]\n },\n {\n \"type\": \"error\",\n \"name\": \"AddressInsufficientBalance\",\n \"inputs\": [\n {\n \"name\": \"account\",\n \"type\": \"address\",\n \"internalType\": \"address\"\n }\n ]\n },\n {\n \"type\": \"error\",\n \"name\": \"BinIdOutOfRange\",\n \"inputs\": [\n {\n \"name\": \"index\",\n \"type\": \"uint256\",\n \"internalType\": \"uint256\"\n },\n {\n \"name\": \"activeId\",\n \"type\": \"uint24\",\n \"internalType\": \"uint24\"\n },\n {\n \"name\": \"offset\",\n \"type\": \"uint24\",\n \"internalType\": \"uint24\"\n }\n ]\n },\n {\n \"type\": \"error\",\n \"name\": \"BinShapeBadCount\",\n \"inputs\": [\n {\n \"name\": \"count\",\n \"type\": \"uint256\",\n \"internalType\": \"uint256\"\n },\n {\n \"name\": \"maxBins\",\n \"type\": \"uint256\",\n \"internalType\": \"uint256\"\n }\n ]\n },\n {\n \"type\": \"error\",\n \"name\": \"BinShapeDustBin\",\n \"inputs\": [\n {\n \"name\": \"index\",\n \"type\": \"uint256\",\n \"internalType\": \"uint256\"\n }\n ]\n },\n {\n \"type\": \"error\",\n \"name\": \"BinShapeGapBelowFloor\",\n \"inputs\": [\n {\n \"name\": \"index\",\n \"type\": \"uint256\",\n \"internalType\": \"uint256\"\n }\n ]\n },\n {\n \"type\": \"error\",\n \"name\": \"BinShapeInvalidFloor\",\n \"inputs\": [\n {\n \"name\": \"floorBins\",\n \"type\": \"uint256\",\n \"internalType\": \"uint256\"\n },\n {\n \"name\": \"count\",\n \"type\": \"uint256\",\n \"internalType\": \"uint256\"\n }\n ]\n },\n {\n \"type\": \"error\",\n \"name\": \"BinShapeLengthMismatch\",\n \"inputs\": [\n {\n \"name\": \"offsets\",\n \"type\": \"uint256\",\n \"internalType\": \"uint256\"\n },\n {\n \"name\": \"weights\",\n \"type\": \"uint256\",\n \"internalType\": \"uint256\"\n }\n ]\n },\n {\n \"type\": \"error\",\n \"name\": \"BinShapeNotMonotonic\",\n \"inputs\": [\n {\n \"name\": \"index\",\n \"type\": \"uint256\",\n \"internalType\": \"uint256\"\n }\n ]\n },\n {\n \"type\": \"error\",\n \"name\": \"BinShapeNotSingleSided\",\n \"inputs\": [\n {\n \"name\": \"index\",\n \"type\": \"uint256\",\n \"internalType\": \"uint256\"\n }\n ]\n },\n {\n \"type\": \"error\",\n \"name\": \"BinShapeWeightsDoNotSum\",\n \"inputs\": [\n {\n \"name\": \"sum\",\n \"type\": \"uint256\",\n \"internalType\": \"uint256\"\n }\n ]\n },\n {\n \"type\": \"error\",\n \"name\": \"BinShapeZeroWeight\",\n \"inputs\": [\n {\n \"name\": \"index\",\n \"type\": \"uint256\",\n \"internalType\": \"uint256\"\n }\n ]\n },\n {\n \"type\": \"error\",\n \"name\": \"FailedInnerCall\",\n \"inputs\": []\n },\n {\n \"type\": \"error\",\n \"name\": \"InvalidTick\",\n \"inputs\": [\n {\n \"name\": \"tick\",\n \"type\": \"int24\",\n \"internalType\": \"int24\"\n }\n ]\n },\n {\n \"type\": \"error\",\n \"name\": \"KitRetainedBinShares\",\n \"inputs\": [\n {\n \"name\": \"index\",\n \"type\": \"uint256\",\n \"internalType\": \"uint256\"\n },\n {\n \"name\": \"binId\",\n \"type\": \"uint24\",\n \"internalType\": \"uint24\"\n },\n {\n \"name\": \"balance\",\n \"type\": \"uint256\",\n \"internalType\": \"uint256\"\n }\n ]\n },\n {\n \"type\": \"error\",\n \"name\": \"KitRetainedLaunchToken\",\n \"inputs\": [\n {\n \"name\": \"balance\",\n \"type\": \"uint256\",\n \"internalType\": \"uint256\"\n }\n ]\n },\n {\n \"type\": \"error\",\n \"name\": \"LaunchTokenAddressMismatch\",\n \"inputs\": [\n {\n \"name\": \"predicted\",\n \"type\": \"address\",\n \"internalType\": \"address\"\n },\n {\n \"name\": \"created\",\n \"type\": \"address\",\n \"internalType\": \"address\"\n }\n ]\n },\n {\n \"type\": \"error\",\n \"name\": \"LaunchTokenSupplyMismatch\",\n \"inputs\": [\n {\n \"name\": \"expected\",\n \"type\": \"uint256\",\n \"internalType\": \"uint256\"\n },\n {\n \"name\": \"received\",\n \"type\": \"uint256\",\n \"internalType\": \"uint256\"\n }\n ]\n },\n {\n \"type\": \"error\",\n \"name\": \"LockNotRecorded\",\n \"inputs\": [\n {\n \"name\": \"index\",\n \"type\": \"uint256\",\n \"internalType\": \"uint256\"\n },\n {\n \"name\": \"lockId\",\n \"type\": \"uint256\",\n \"internalType\": \"uint256\"\n }\n ]\n },\n {\n \"type\": \"error\",\n \"name\": \"MaxBuyRequiredByPreset\",\n \"inputs\": [\n {\n \"name\": \"preset\",\n \"type\": \"uint8\",\n \"internalType\": \"enum Preset\"\n }\n ]\n },\n {\n \"type\": \"error\",\n \"name\": \"PresetUnavailableOnBin\",\n \"inputs\": [\n {\n \"name\": \"preset\",\n \"type\": \"uint8\",\n \"internalType\": \"enum Preset\"\n }\n ]\n },\n {\n \"type\": \"error\",\n \"name\": \"ProtocolFeeNotZero\",\n \"inputs\": [\n {\n \"name\": \"poolId\",\n \"type\": \"bytes32\",\n \"internalType\": \"bytes32\"\n },\n {\n \"name\": \"protocolFee\",\n \"type\": \"uint24\",\n \"internalType\": \"uint24\"\n }\n ]\n },\n {\n \"type\": \"error\",\n \"name\": \"RangeNotSingleSided\",\n \"inputs\": [\n {\n \"name\": \"index\",\n \"type\": \"uint256\",\n \"internalType\": \"uint256\"\n },\n {\n \"name\": \"tickLower\",\n \"type\": \"int24\",\n \"internalType\": \"int24\"\n },\n {\n \"name\": \"tickUpper\",\n \"type\": \"int24\",\n \"internalType\": \"int24\"\n },\n {\n \"name\": \"currentTick\",\n \"type\": \"int24\",\n \"internalType\": \"int24\"\n }\n ]\n },\n {\n \"type\": \"error\",\n \"name\": \"SafeCastOverflow\",\n \"inputs\": []\n },\n {\n \"type\": \"error\",\n \"name\": \"SafeERC20FailedOperation\",\n \"inputs\": [\n {\n \"name\": \"token\",\n \"type\": \"address\",\n \"internalType\": \"address\"\n }\n ]\n },\n {\n \"type\": \"error\",\n \"name\": \"SeedProducesNoLiquidity\",\n \"inputs\": [\n {\n \"name\": \"index\",\n \"type\": \"uint256\",\n \"internalType\": \"uint256\"\n }\n ]\n }\n];\n/**\n * `LaunchTokenFactory` - deterministic launch tokens; `launchTokenInitCodeHash` feeds off-chain prediction.\n *\n * 10 errors, 1 event, 7 functions - curated from the compiled artifact, not the full ABI.\n */\nexport const LAUNCH_TOKEN_FACTORY_ABI = [\n {\n \"type\": \"error\",\n \"name\": \"DeploymentInProgress\",\n \"inputs\": []\n },\n {\n \"type\": \"error\",\n \"name\": \"EmptyName\",\n \"inputs\": []\n },\n {\n \"type\": \"error\",\n \"name\": \"EmptySymbol\",\n \"inputs\": []\n },\n {\n \"type\": \"error\",\n \"name\": \"MetadataURITooLong\",\n \"inputs\": [\n {\n \"name\": \"length\",\n \"type\": \"uint256\",\n \"internalType\": \"uint256\"\n },\n {\n \"name\": \"max\",\n \"type\": \"uint256\",\n \"internalType\": \"uint256\"\n }\n ]\n },\n {\n \"type\": \"error\",\n \"name\": \"NameTooLong\",\n \"inputs\": [\n {\n \"name\": \"length\",\n \"type\": \"uint256\",\n \"internalType\": \"uint256\"\n },\n {\n \"name\": \"max\",\n \"type\": \"uint256\",\n \"internalType\": \"uint256\"\n }\n ]\n },\n {\n \"type\": \"error\",\n \"name\": \"NoDeploymentInProgress\",\n \"inputs\": []\n },\n {\n \"type\": \"error\",\n \"name\": \"SymbolTooLong\",\n \"inputs\": [\n {\n \"name\": \"length\",\n \"type\": \"uint256\",\n \"internalType\": \"uint256\"\n },\n {\n \"name\": \"max\",\n \"type\": \"uint256\",\n \"internalType\": \"uint256\"\n }\n ]\n },\n {\n \"type\": \"error\",\n \"name\": \"TokenAlreadyDeployed\",\n \"inputs\": [\n {\n \"name\": \"token\",\n \"type\": \"address\",\n \"internalType\": \"address\"\n }\n ]\n },\n {\n \"type\": \"error\",\n \"name\": \"ZeroRecipient\",\n \"inputs\": []\n },\n {\n \"type\": \"error\",\n \"name\": \"ZeroSupply\",\n \"inputs\": []\n },\n {\n \"type\": \"event\",\n \"name\": \"LaunchTokenCreated\",\n \"inputs\": [\n {\n \"name\": \"token\",\n \"type\": \"address\",\n \"indexed\": true,\n \"internalType\": \"address\"\n },\n {\n \"name\": \"deployer\",\n \"type\": \"address\",\n \"indexed\": true,\n \"internalType\": \"address\"\n },\n {\n \"name\": \"recipient\",\n \"type\": \"address\",\n \"indexed\": true,\n \"internalType\": \"address\"\n },\n {\n \"name\": \"salt\",\n \"type\": \"bytes32\",\n \"indexed\": false,\n \"internalType\": \"bytes32\"\n },\n {\n \"name\": \"name\",\n \"type\": \"string\",\n \"indexed\": false,\n \"internalType\": \"string\"\n },\n {\n \"name\": \"symbol\",\n \"type\": \"string\",\n \"indexed\": false,\n \"internalType\": \"string\"\n },\n {\n \"name\": \"metadataURI\",\n \"type\": \"string\",\n \"indexed\": false,\n \"internalType\": \"string\"\n },\n {\n \"name\": \"totalSupply\",\n \"type\": \"uint256\",\n \"indexed\": false,\n \"internalType\": \"uint256\"\n }\n ],\n \"anonymous\": false\n },\n {\n \"type\": \"function\",\n \"name\": \"MAX_METADATA_URI_BYTES\",\n \"inputs\": [],\n \"outputs\": [\n {\n \"name\": \"\",\n \"type\": \"uint256\",\n \"internalType\": \"uint256\"\n }\n ],\n \"stateMutability\": \"view\"\n },\n {\n \"type\": \"function\",\n \"name\": \"MAX_NAME_BYTES\",\n \"inputs\": [],\n \"outputs\": [\n {\n \"name\": \"\",\n \"type\": \"uint256\",\n \"internalType\": \"uint256\"\n }\n ],\n \"stateMutability\": \"view\"\n },\n {\n \"type\": \"function\",\n \"name\": \"MAX_SYMBOL_BYTES\",\n \"inputs\": [],\n \"outputs\": [\n {\n \"name\": \"\",\n \"type\": \"uint256\",\n \"internalType\": \"uint256\"\n }\n ],\n \"stateMutability\": \"view\"\n },\n {\n \"type\": \"function\",\n \"name\": \"deployerOf\",\n \"inputs\": [\n {\n \"name\": \"token\",\n \"type\": \"address\",\n \"internalType\": \"address\"\n }\n ],\n \"outputs\": [\n {\n \"name\": \"deployer\",\n \"type\": \"address\",\n \"internalType\": \"address\"\n }\n ],\n \"stateMutability\": \"view\"\n },\n {\n \"type\": \"function\",\n \"name\": \"isLaunchToken\",\n \"inputs\": [\n {\n \"name\": \"token\",\n \"type\": \"address\",\n \"internalType\": \"address\"\n }\n ],\n \"outputs\": [\n {\n \"name\": \"\",\n \"type\": \"bool\",\n \"internalType\": \"bool\"\n }\n ],\n \"stateMutability\": \"view\"\n },\n {\n \"type\": \"function\",\n \"name\": \"launchTokenInitCodeHash\",\n \"inputs\": [],\n \"outputs\": [\n {\n \"name\": \"\",\n \"type\": \"bytes32\",\n \"internalType\": \"bytes32\"\n }\n ],\n \"stateMutability\": \"view\"\n },\n {\n \"type\": \"function\",\n \"name\": \"predictTokenAddress\",\n \"inputs\": [\n {\n \"name\": \"deployer\",\n \"type\": \"address\",\n \"internalType\": \"address\"\n },\n {\n \"name\": \"salt\",\n \"type\": \"bytes32\",\n \"internalType\": \"bytes32\"\n }\n ],\n \"outputs\": [\n {\n \"name\": \"\",\n \"type\": \"address\",\n \"internalType\": \"address\"\n }\n ],\n \"stateMutability\": \"view\"\n }\n];\n/**\n * `LatchLPLocker` - the permanent CL position locker. `collectFees` and `skim` are permissionless.\n *\n * 23 errors, 6 events, 19 functions - curated from the compiled artifact, not the full ABI.\n */\nexport const LATCH_LP_LOCKER_ABI = [\n {\n \"type\": \"error\",\n \"name\": \"AlreadyLocked\",\n \"inputs\": [\n {\n \"name\": \"tokenId\",\n \"type\": \"uint256\",\n \"internalType\": \"uint256\"\n }\n ]\n },\n {\n \"type\": \"error\",\n \"name\": \"BpsDoNotSumToDenominator\",\n \"inputs\": [\n {\n \"name\": \"sum\",\n \"type\": \"uint256\",\n \"internalType\": \"uint256\"\n }\n ]\n },\n {\n \"type\": \"error\",\n \"name\": \"EmptyPosition\",\n \"inputs\": [\n {\n \"name\": \"tokenId\",\n \"type\": \"uint256\",\n \"internalType\": \"uint256\"\n }\n ]\n },\n {\n \"type\": \"error\",\n \"name\": \"HookInterceptsRemoval\",\n \"inputs\": [\n {\n \"name\": \"tokenId\",\n \"type\": \"uint256\",\n \"internalType\": \"uint256\"\n },\n {\n \"name\": \"hook\",\n \"type\": \"address\",\n \"internalType\": \"address\"\n }\n ]\n },\n {\n \"type\": \"error\",\n \"name\": \"IntegratorBpsTooHigh\",\n \"inputs\": [\n {\n \"name\": \"integratorBps\",\n \"type\": \"uint16\",\n \"internalType\": \"uint16\"\n },\n {\n \"name\": \"maxIntegratorBps\",\n \"type\": \"uint16\",\n \"internalType\": \"uint16\"\n }\n ]\n },\n {\n \"type\": \"error\",\n \"name\": \"InvalidBpsBounds\",\n \"inputs\": [\n {\n \"name\": \"minProtocolBps\",\n \"type\": \"uint16\",\n \"internalType\": \"uint16\"\n },\n {\n \"name\": \"maxProtocolBps\",\n \"type\": \"uint16\",\n \"internalType\": \"uint16\"\n },\n {\n \"name\": \"maxIntegratorBps\",\n \"type\": \"uint16\",\n \"internalType\": \"uint16\"\n }\n ]\n },\n {\n \"type\": \"error\",\n \"name\": \"InvalidCreator\",\n \"inputs\": [\n {\n \"name\": \"creator\",\n \"type\": \"address\",\n \"internalType\": \"address\"\n }\n ]\n },\n {\n \"type\": \"error\",\n \"name\": \"InvalidIntegrator\",\n \"inputs\": [\n {\n \"name\": \"integrator\",\n \"type\": \"address\",\n \"internalType\": \"address\"\n },\n {\n \"name\": \"integratorBps\",\n \"type\": \"uint16\",\n \"internalType\": \"uint16\"\n }\n ]\n },\n {\n \"type\": \"error\",\n \"name\": \"InvalidLockData\",\n \"inputs\": [\n {\n \"name\": \"length\",\n \"type\": \"uint256\",\n \"internalType\": \"uint256\"\n }\n ]\n },\n {\n \"type\": \"error\",\n \"name\": \"NotCreator\",\n \"inputs\": [\n {\n \"name\": \"tokenId\",\n \"type\": \"uint256\",\n \"internalType\": \"uint256\"\n },\n {\n \"name\": \"caller\",\n \"type\": \"address\",\n \"internalType\": \"address\"\n }\n ]\n },\n {\n \"type\": \"error\",\n \"name\": \"NotLocked\",\n \"inputs\": [\n {\n \"name\": \"tokenId\",\n \"type\": \"uint256\",\n \"internalType\": \"uint256\"\n }\n ]\n },\n {\n \"type\": \"error\",\n \"name\": \"NotOwnedByLocker\",\n \"inputs\": [\n {\n \"name\": \"tokenId\",\n \"type\": \"uint256\",\n \"internalType\": \"uint256\"\n }\n ]\n },\n {\n \"type\": \"error\",\n \"name\": \"NotPendingCreator\",\n \"inputs\": [\n {\n \"name\": \"tokenId\",\n \"type\": \"uint256\",\n \"internalType\": \"uint256\"\n },\n {\n \"name\": \"caller\",\n \"type\": \"address\",\n \"internalType\": \"address\"\n }\n ]\n },\n {\n \"type\": \"error\",\n \"name\": \"NotPositionManager\",\n \"inputs\": [\n {\n \"name\": \"caller\",\n \"type\": \"address\",\n \"internalType\": \"address\"\n }\n ]\n },\n {\n \"type\": \"error\",\n \"name\": \"NothingToClaim\",\n \"inputs\": []\n },\n {\n \"type\": \"error\",\n \"name\": \"NothingToSkim\",\n \"inputs\": []\n },\n {\n \"type\": \"error\",\n \"name\": \"PositionManagerHasNoVault\",\n \"inputs\": []\n },\n {\n \"type\": \"error\",\n \"name\": \"ProtocolBpsOutOfRange\",\n \"inputs\": [\n {\n \"name\": \"protocolBps\",\n \"type\": \"uint16\",\n \"internalType\": \"uint16\"\n },\n {\n \"name\": \"minProtocolBps\",\n \"type\": \"uint16\",\n \"internalType\": \"uint16\"\n },\n {\n \"name\": \"maxProtocolBps\",\n \"type\": \"uint16\",\n \"internalType\": \"uint16\"\n }\n ]\n },\n {\n \"type\": \"error\",\n \"name\": \"ProtocolRecipientIsLocker\",\n \"inputs\": []\n },\n {\n \"type\": \"error\",\n \"name\": \"ReentrancyGuardReentrantCall\",\n \"inputs\": []\n },\n {\n \"type\": \"error\",\n \"name\": \"SubscriberAttached\",\n \"inputs\": [\n {\n \"name\": \"tokenId\",\n \"type\": \"uint256\",\n \"internalType\": \"uint256\"\n },\n {\n \"name\": \"subscriber\",\n \"type\": \"address\",\n \"internalType\": \"address\"\n }\n ]\n },\n {\n \"type\": \"error\",\n \"name\": \"UnexpectedNativeSender\",\n \"inputs\": [\n {\n \"name\": \"sender\",\n \"type\": \"address\",\n \"internalType\": \"address\"\n }\n ]\n },\n {\n \"type\": \"error\",\n \"name\": \"ZeroAddress\",\n \"inputs\": []\n },\n {\n \"type\": \"event\",\n \"name\": \"Claimed\",\n \"inputs\": [\n {\n \"name\": \"account\",\n \"type\": \"address\",\n \"indexed\": true,\n \"internalType\": \"address\"\n },\n {\n \"name\": \"currency\",\n \"type\": \"address\",\n \"indexed\": true,\n \"internalType\": \"Currency\"\n },\n {\n \"name\": \"to\",\n \"type\": \"address\",\n \"indexed\": true,\n \"internalType\": \"address\"\n },\n {\n \"name\": \"amount\",\n \"type\": \"uint256\",\n \"indexed\": false,\n \"internalType\": \"uint256\"\n }\n ],\n \"anonymous\": false\n },\n {\n \"type\": \"event\",\n \"name\": \"CreatorTransferStarted\",\n \"inputs\": [\n {\n \"name\": \"tokenId\",\n \"type\": \"uint256\",\n \"indexed\": true,\n \"internalType\": \"uint256\"\n },\n {\n \"name\": \"creator\",\n \"type\": \"address\",\n \"indexed\": true,\n \"internalType\": \"address\"\n },\n {\n \"name\": \"pending\",\n \"type\": \"address\",\n \"indexed\": true,\n \"internalType\": \"address\"\n }\n ],\n \"anonymous\": false\n },\n {\n \"type\": \"event\",\n \"name\": \"CreatorTransferred\",\n \"inputs\": [\n {\n \"name\": \"tokenId\",\n \"type\": \"uint256\",\n \"indexed\": true,\n \"internalType\": \"uint256\"\n },\n {\n \"name\": \"previousCreator\",\n \"type\": \"address\",\n \"indexed\": true,\n \"internalType\": \"address\"\n },\n {\n \"name\": \"newCreator\",\n \"type\": \"address\",\n \"indexed\": true,\n \"internalType\": \"address\"\n }\n ],\n \"anonymous\": false\n },\n {\n \"type\": \"event\",\n \"name\": \"FeesCollected\",\n \"inputs\": [\n {\n \"name\": \"tokenId\",\n \"type\": \"uint256\",\n \"indexed\": true,\n \"internalType\": \"uint256\"\n },\n {\n \"name\": \"currency\",\n \"type\": \"address\",\n \"indexed\": true,\n \"internalType\": \"Currency\"\n },\n {\n \"name\": \"caller\",\n \"type\": \"address\",\n \"indexed\": true,\n \"internalType\": \"address\"\n },\n {\n \"name\": \"amount\",\n \"type\": \"uint256\",\n \"indexed\": false,\n \"internalType\": \"uint256\"\n },\n {\n \"name\": \"creatorShare\",\n \"type\": \"uint256\",\n \"indexed\": false,\n \"internalType\": \"uint256\"\n },\n {\n \"name\": \"integratorShare\",\n \"type\": \"uint256\",\n \"indexed\": false,\n \"internalType\": \"uint256\"\n },\n {\n \"name\": \"protocolShare\",\n \"type\": \"uint256\",\n \"indexed\": false,\n \"internalType\": \"uint256\"\n }\n ],\n \"anonymous\": false\n },\n {\n \"type\": \"event\",\n \"name\": \"PositionLocked\",\n \"inputs\": [\n {\n \"name\": \"tokenId\",\n \"type\": \"uint256\",\n \"indexed\": true,\n \"internalType\": \"uint256\"\n },\n {\n \"name\": \"poolId\",\n \"type\": \"bytes32\",\n \"indexed\": true,\n \"internalType\": \"PoolId\"\n },\n {\n \"name\": \"creator\",\n \"type\": \"address\",\n \"indexed\": true,\n \"internalType\": \"address\"\n },\n {\n \"name\": \"integrator\",\n \"type\": \"address\",\n \"indexed\": false,\n \"internalType\": \"address\"\n },\n {\n \"name\": \"creatorBps\",\n \"type\": \"uint16\",\n \"indexed\": false,\n \"internalType\": \"uint16\"\n },\n {\n \"name\": \"integratorBps\",\n \"type\": \"uint16\",\n \"indexed\": false,\n \"internalType\": \"uint16\"\n },\n {\n \"name\": \"protocolBps\",\n \"type\": \"uint16\",\n \"indexed\": false,\n \"internalType\": \"uint16\"\n },\n {\n \"name\": \"liquidity\",\n \"type\": \"uint128\",\n \"indexed\": false,\n \"internalType\": \"uint128\"\n },\n {\n \"name\": \"from\",\n \"type\": \"address\",\n \"indexed\": false,\n \"internalType\": \"address\"\n },\n {\n \"name\": \"operator\",\n \"type\": \"address\",\n \"indexed\": false,\n \"internalType\": \"address\"\n }\n ],\n \"anonymous\": false\n },\n {\n \"type\": \"event\",\n \"name\": \"Skimmed\",\n \"inputs\": [\n {\n \"name\": \"currency\",\n \"type\": \"address\",\n \"indexed\": true,\n \"internalType\": \"Currency\"\n },\n {\n \"name\": \"caller\",\n \"type\": \"address\",\n \"indexed\": true,\n \"internalType\": \"address\"\n },\n {\n \"name\": \"amount\",\n \"type\": \"uint256\",\n \"indexed\": false,\n \"internalType\": \"uint256\"\n }\n ],\n \"anonymous\": false\n },\n {\n \"type\": \"function\",\n \"name\": \"BPS_DENOMINATOR\",\n \"inputs\": [],\n \"outputs\": [\n {\n \"name\": \"\",\n \"type\": \"uint16\",\n \"internalType\": \"uint16\"\n }\n ],\n \"stateMutability\": \"view\"\n },\n {\n \"type\": \"function\",\n \"name\": \"acceptCreator\",\n \"inputs\": [\n {\n \"name\": \"tokenId\",\n \"type\": \"uint256\",\n \"internalType\": \"uint256\"\n }\n ],\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\"\n },\n {\n \"type\": \"function\",\n \"name\": \"claim\",\n \"inputs\": [\n {\n \"name\": \"currency\",\n \"type\": \"address\",\n \"internalType\": \"Currency\"\n },\n {\n \"name\": \"to\",\n \"type\": \"address\",\n \"internalType\": \"address\"\n }\n ],\n \"outputs\": [\n {\n \"name\": \"amount\",\n \"type\": \"uint256\",\n \"internalType\": \"uint256\"\n }\n ],\n \"stateMutability\": \"nonpayable\"\n },\n {\n \"type\": \"function\",\n \"name\": \"claimable\",\n \"inputs\": [\n {\n \"name\": \"account\",\n \"type\": \"address\",\n \"internalType\": \"address\"\n },\n {\n \"name\": \"currency\",\n \"type\": \"address\",\n \"internalType\": \"Currency\"\n }\n ],\n \"outputs\": [\n {\n \"name\": \"\",\n \"type\": \"uint256\",\n \"internalType\": \"uint256\"\n }\n ],\n \"stateMutability\": \"view\"\n },\n {\n \"type\": \"function\",\n \"name\": \"collectFees\",\n \"inputs\": [\n {\n \"name\": \"tokenId\",\n \"type\": \"uint256\",\n \"internalType\": \"uint256\"\n }\n ],\n \"outputs\": [\n {\n \"name\": \"amount0\",\n \"type\": \"uint256\",\n \"internalType\": \"uint256\"\n },\n {\n \"name\": \"amount1\",\n \"type\": \"uint256\",\n \"internalType\": \"uint256\"\n }\n ],\n \"stateMutability\": \"nonpayable\"\n },\n {\n \"type\": \"function\",\n \"name\": \"getLock\",\n \"inputs\": [\n {\n \"name\": \"tokenId\",\n \"type\": \"uint256\",\n \"internalType\": \"uint256\"\n }\n ],\n \"outputs\": [\n {\n \"name\": \"\",\n \"type\": \"tuple\",\n \"internalType\": \"struct Lock\",\n \"components\": [\n {\n \"name\": \"creator\",\n \"type\": \"address\",\n \"internalType\": \"address\"\n },\n {\n \"name\": \"creatorBps\",\n \"type\": \"uint16\",\n \"internalType\": \"uint16\"\n },\n {\n \"name\": \"integratorBps\",\n \"type\": \"uint16\",\n \"internalType\": \"uint16\"\n },\n {\n \"name\": \"protocolBps\",\n \"type\": \"uint16\",\n \"internalType\": \"uint16\"\n },\n {\n \"name\": \"lockedAt\",\n \"type\": \"uint48\",\n \"internalType\": \"uint48\"\n },\n {\n \"name\": \"integrator\",\n \"type\": \"address\",\n \"internalType\": \"address\"\n },\n {\n \"name\": \"currency0\",\n \"type\": \"address\",\n \"internalType\": \"Currency\"\n },\n {\n \"name\": \"currency1\",\n \"type\": \"address\",\n \"internalType\": \"Currency\"\n },\n {\n \"name\": \"poolId\",\n \"type\": \"bytes32\",\n \"internalType\": \"PoolId\"\n }\n ]\n }\n ],\n \"stateMutability\": \"view\"\n },\n {\n \"type\": \"function\",\n \"name\": \"isLocked\",\n \"inputs\": [\n {\n \"name\": \"tokenId\",\n \"type\": \"uint256\",\n \"internalType\": \"uint256\"\n }\n ],\n \"outputs\": [\n {\n \"name\": \"\",\n \"type\": \"bool\",\n \"internalType\": \"bool\"\n }\n ],\n \"stateMutability\": \"view\"\n },\n {\n \"type\": \"function\",\n \"name\": \"lockCount\",\n \"inputs\": [],\n \"outputs\": [\n {\n \"name\": \"\",\n \"type\": \"uint256\",\n \"internalType\": \"uint256\"\n }\n ],\n \"stateMutability\": \"view\"\n },\n {\n \"type\": \"function\",\n \"name\": \"maxIntegratorBps\",\n \"inputs\": [],\n \"outputs\": [\n {\n \"name\": \"\",\n \"type\": \"uint16\",\n \"internalType\": \"uint16\"\n }\n ],\n \"stateMutability\": \"view\"\n },\n {\n \"type\": \"function\",\n \"name\": \"maxProtocolBps\",\n \"inputs\": [],\n \"outputs\": [\n {\n \"name\": \"\",\n \"type\": \"uint16\",\n \"internalType\": \"uint16\"\n }\n ],\n \"stateMutability\": \"view\"\n },\n {\n \"type\": \"function\",\n \"name\": \"minProtocolBps\",\n \"inputs\": [],\n \"outputs\": [\n {\n \"name\": \"\",\n \"type\": \"uint16\",\n \"internalType\": \"uint16\"\n }\n ],\n \"stateMutability\": \"view\"\n },\n {\n \"type\": \"function\",\n \"name\": \"pendingCreator\",\n \"inputs\": [\n {\n \"name\": \"tokenId\",\n \"type\": \"uint256\",\n \"internalType\": \"uint256\"\n }\n ],\n \"outputs\": [\n {\n \"name\": \"\",\n \"type\": \"address\",\n \"internalType\": \"address\"\n }\n ],\n \"stateMutability\": \"view\"\n },\n {\n \"type\": \"function\",\n \"name\": \"positionManager\",\n \"inputs\": [],\n \"outputs\": [\n {\n \"name\": \"\",\n \"type\": \"address\",\n \"internalType\": \"contract ICLPositionManager\"\n }\n ],\n \"stateMutability\": \"view\"\n },\n {\n \"type\": \"function\",\n \"name\": \"protocolRecipient\",\n \"inputs\": [],\n \"outputs\": [\n {\n \"name\": \"\",\n \"type\": \"address\",\n \"internalType\": \"address\"\n }\n ],\n \"stateMutability\": \"view\"\n },\n {\n \"type\": \"function\",\n \"name\": \"skim\",\n \"inputs\": [\n {\n \"name\": \"currency\",\n \"type\": \"address\",\n \"internalType\": \"Currency\"\n }\n ],\n \"outputs\": [\n {\n \"name\": \"surplus\",\n \"type\": \"uint256\",\n \"internalType\": \"uint256\"\n }\n ],\n \"stateMutability\": \"nonpayable\"\n },\n {\n \"type\": \"function\",\n \"name\": \"splitAmount\",\n \"inputs\": [\n {\n \"name\": \"amount\",\n \"type\": \"uint256\",\n \"internalType\": \"uint256\"\n },\n {\n \"name\": \"creatorBps\",\n \"type\": \"uint16\",\n \"internalType\": \"uint16\"\n },\n {\n \"name\": \"integratorBps\",\n \"type\": \"uint16\",\n \"internalType\": \"uint16\"\n }\n ],\n \"outputs\": [\n {\n \"name\": \"creatorShare\",\n \"type\": \"uint256\",\n \"internalType\": \"uint256\"\n },\n {\n \"name\": \"integratorShare\",\n \"type\": \"uint256\",\n \"internalType\": \"uint256\"\n },\n {\n \"name\": \"protocolShare\",\n \"type\": \"uint256\",\n \"internalType\": \"uint256\"\n }\n ],\n \"stateMutability\": \"pure\"\n },\n {\n \"type\": \"function\",\n \"name\": \"totalOwed\",\n \"inputs\": [\n {\n \"name\": \"currency\",\n \"type\": \"address\",\n \"internalType\": \"Currency\"\n }\n ],\n \"outputs\": [\n {\n \"name\": \"amount\",\n \"type\": \"uint256\",\n \"internalType\": \"uint256\"\n }\n ],\n \"stateMutability\": \"view\"\n },\n {\n \"type\": \"function\",\n \"name\": \"transferCreator\",\n \"inputs\": [\n {\n \"name\": \"tokenId\",\n \"type\": \"uint256\",\n \"internalType\": \"uint256\"\n },\n {\n \"name\": \"newCreator\",\n \"type\": \"address\",\n \"internalType\": \"address\"\n }\n ],\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\"\n },\n {\n \"type\": \"function\",\n \"name\": \"vault\",\n \"inputs\": [],\n \"outputs\": [\n {\n \"name\": \"\",\n \"type\": \"address\",\n \"internalType\": \"address\"\n }\n ],\n \"stateMutability\": \"view\"\n }\n];\n/**\n * `LatchBinLPLocker` - the permanent Bin share locker. `collectFees` and `skim` are permissionless.\n *\n * 27 errors, 7 events, 27 functions - curated from the compiled artifact, not the full ABI.\n */\nexport const LATCH_BIN_LP_LOCKER_ABI = [\n {\n \"type\": \"error\",\n \"name\": \"BinIdsNotStrictlyIncreasing\",\n \"inputs\": [\n {\n \"name\": \"index\",\n \"type\": \"uint256\",\n \"internalType\": \"uint256\"\n }\n ]\n },\n {\n \"type\": \"error\",\n \"name\": \"BpsDoNotSumToDenominator\",\n \"inputs\": [\n {\n \"name\": \"sum\",\n \"type\": \"uint256\",\n \"internalType\": \"uint256\"\n }\n ]\n },\n {\n \"type\": \"error\",\n \"name\": \"EmptyBin\",\n \"inputs\": [\n {\n \"name\": \"binId\",\n \"type\": \"uint24\",\n \"internalType\": \"uint24\"\n }\n ]\n },\n {\n \"type\": \"error\",\n \"name\": \"HookInterceptsRemoval\",\n \"inputs\": [\n {\n \"name\": \"hook\",\n \"type\": \"address\",\n \"internalType\": \"address\"\n }\n ]\n },\n {\n \"type\": \"error\",\n \"name\": \"IntegratorBpsTooHigh\",\n \"inputs\": [\n {\n \"name\": \"integratorBps\",\n \"type\": \"uint16\",\n \"internalType\": \"uint16\"\n },\n {\n \"name\": \"maxIntegratorBps\",\n \"type\": \"uint16\",\n \"internalType\": \"uint16\"\n }\n ]\n },\n {\n \"type\": \"error\",\n \"name\": \"InvalidBinCount\",\n \"inputs\": [\n {\n \"name\": \"count\",\n \"type\": \"uint256\",\n \"internalType\": \"uint256\"\n },\n {\n \"name\": \"maxBinsPerLock\",\n \"type\": \"uint16\",\n \"internalType\": \"uint16\"\n }\n ]\n },\n {\n \"type\": \"error\",\n \"name\": \"InvalidBpsBounds\",\n \"inputs\": [\n {\n \"name\": \"minProtocolBps\",\n \"type\": \"uint16\",\n \"internalType\": \"uint16\"\n },\n {\n \"name\": \"maxProtocolBps\",\n \"type\": \"uint16\",\n \"internalType\": \"uint16\"\n },\n {\n \"name\": \"maxIntegratorBps\",\n \"type\": \"uint16\",\n \"internalType\": \"uint16\"\n }\n ]\n },\n {\n \"type\": \"error\",\n \"name\": \"InvalidCreator\",\n \"inputs\": [\n {\n \"name\": \"creator\",\n \"type\": \"address\",\n \"internalType\": \"address\"\n }\n ]\n },\n {\n \"type\": \"error\",\n \"name\": \"InvalidIntegrator\",\n \"inputs\": [\n {\n \"name\": \"integrator\",\n \"type\": \"address\",\n \"internalType\": \"address\"\n },\n {\n \"name\": \"integratorBps\",\n \"type\": \"uint16\",\n \"internalType\": \"uint16\"\n }\n ]\n },\n {\n \"type\": \"error\",\n \"name\": \"InvalidMaxBinsPerLock\",\n \"inputs\": [\n {\n \"name\": \"maxBinsPerLock\",\n \"type\": \"uint16\",\n \"internalType\": \"uint16\"\n }\n ]\n },\n {\n \"type\": \"error\",\n \"name\": \"LengthMismatch\",\n \"inputs\": [\n {\n \"name\": \"binIds\",\n \"type\": \"uint256\",\n \"internalType\": \"uint256\"\n },\n {\n \"name\": \"shares\",\n \"type\": \"uint256\",\n \"internalType\": \"uint256\"\n }\n ]\n },\n {\n \"type\": \"error\",\n \"name\": \"NotCreator\",\n \"inputs\": [\n {\n \"name\": \"lockId\",\n \"type\": \"uint256\",\n \"internalType\": \"uint256\"\n },\n {\n \"name\": \"caller\",\n \"type\": \"address\",\n \"internalType\": \"address\"\n }\n ]\n },\n {\n \"type\": \"error\",\n \"name\": \"NotLocked\",\n \"inputs\": [\n {\n \"name\": \"lockId\",\n \"type\": \"uint256\",\n \"internalType\": \"uint256\"\n }\n ]\n },\n {\n \"type\": \"error\",\n \"name\": \"NotPendingCreator\",\n \"inputs\": [\n {\n \"name\": \"lockId\",\n \"type\": \"uint256\",\n \"internalType\": \"uint256\"\n },\n {\n \"name\": \"caller\",\n \"type\": \"address\",\n \"internalType\": \"address\"\n }\n ]\n },\n {\n \"type\": \"error\",\n \"name\": \"NothingToClaim\",\n \"inputs\": []\n },\n {\n \"type\": \"error\",\n \"name\": \"NothingToCollect\",\n \"inputs\": [\n {\n \"name\": \"lockId\",\n \"type\": \"uint256\",\n \"internalType\": \"uint256\"\n }\n ]\n },\n {\n \"type\": \"error\",\n \"name\": \"NothingToSkim\",\n \"inputs\": []\n },\n {\n \"type\": \"error\",\n \"name\": \"PoolManagerMismatch\",\n \"inputs\": [\n {\n \"name\": \"poolManager\",\n \"type\": \"address\",\n \"internalType\": \"address\"\n }\n ]\n },\n {\n \"type\": \"error\",\n \"name\": \"PositionManagerHasNoPoolManager\",\n \"inputs\": []\n },\n {\n \"type\": \"error\",\n \"name\": \"PositionManagerHasNoVault\",\n \"inputs\": []\n },\n {\n \"type\": \"error\",\n \"name\": \"ProtocolBpsOutOfRange\",\n \"inputs\": [\n {\n \"name\": \"protocolBps\",\n \"type\": \"uint16\",\n \"internalType\": \"uint16\"\n },\n {\n \"name\": \"minProtocolBps\",\n \"type\": \"uint16\",\n \"internalType\": \"uint16\"\n },\n {\n \"name\": \"maxProtocolBps\",\n \"type\": \"uint16\",\n \"internalType\": \"uint16\"\n }\n ]\n },\n {\n \"type\": \"error\",\n \"name\": \"ProtocolRecipientIsLocker\",\n \"inputs\": []\n },\n {\n \"type\": \"error\",\n \"name\": \"ReentrancyGuardReentrantCall\",\n \"inputs\": []\n },\n {\n \"type\": \"error\",\n \"name\": \"SharesNotReceived\",\n \"inputs\": [\n {\n \"name\": \"binId\",\n \"type\": \"uint24\",\n \"internalType\": \"uint24\"\n },\n {\n \"name\": \"expected\",\n \"type\": \"uint256\",\n \"internalType\": \"uint256\"\n },\n {\n \"name\": \"received\",\n \"type\": \"uint256\",\n \"internalType\": \"uint256\"\n }\n ]\n },\n {\n \"type\": \"error\",\n \"name\": \"UnexpectedNativeSender\",\n \"inputs\": [\n {\n \"name\": \"sender\",\n \"type\": \"address\",\n \"internalType\": \"address\"\n }\n ]\n },\n {\n \"type\": \"error\",\n \"name\": \"ZeroAddress\",\n \"inputs\": []\n },\n {\n \"type\": \"error\",\n \"name\": \"ZeroShares\",\n \"inputs\": [\n {\n \"name\": \"binId\",\n \"type\": \"uint24\",\n \"internalType\": \"uint24\"\n }\n ]\n },\n {\n \"type\": \"event\",\n \"name\": \"BinsLocked\",\n \"inputs\": [\n {\n \"name\": \"lockId\",\n \"type\": \"uint256\",\n \"indexed\": true,\n \"internalType\": \"uint256\"\n },\n {\n \"name\": \"poolId\",\n \"type\": \"bytes32\",\n \"indexed\": true,\n \"internalType\": \"PoolId\"\n },\n {\n \"name\": \"creator\",\n \"type\": \"address\",\n \"indexed\": true,\n \"internalType\": \"address\"\n },\n {\n \"name\": \"integrator\",\n \"type\": \"address\",\n \"indexed\": false,\n \"internalType\": \"address\"\n },\n {\n \"name\": \"creatorBps\",\n \"type\": \"uint16\",\n \"indexed\": false,\n \"internalType\": \"uint16\"\n },\n {\n \"name\": \"integratorBps\",\n \"type\": \"uint16\",\n \"indexed\": false,\n \"internalType\": \"uint16\"\n },\n {\n \"name\": \"protocolBps\",\n \"type\": \"uint16\",\n \"indexed\": false,\n \"internalType\": \"uint16\"\n },\n {\n \"name\": \"binIds\",\n \"type\": \"uint24[]\",\n \"indexed\": false,\n \"internalType\": \"uint24[]\"\n },\n {\n \"name\": \"shares\",\n \"type\": \"uint256[]\",\n \"indexed\": false,\n \"internalType\": \"uint256[]\"\n },\n {\n \"name\": \"principals\",\n \"type\": \"uint256[]\",\n \"indexed\": false,\n \"internalType\": \"uint256[]\"\n },\n {\n \"name\": \"from\",\n \"type\": \"address\",\n \"indexed\": false,\n \"internalType\": \"address\"\n }\n ],\n \"anonymous\": false\n },\n {\n \"type\": \"event\",\n \"name\": \"Claimed\",\n \"inputs\": [\n {\n \"name\": \"account\",\n \"type\": \"address\",\n \"indexed\": true,\n \"internalType\": \"address\"\n },\n {\n \"name\": \"currency\",\n \"type\": \"address\",\n \"indexed\": true,\n \"internalType\": \"Currency\"\n },\n {\n \"name\": \"to\",\n \"type\": \"address\",\n \"indexed\": true,\n \"internalType\": \"address\"\n },\n {\n \"name\": \"amount\",\n \"type\": \"uint256\",\n \"indexed\": false,\n \"internalType\": \"uint256\"\n }\n ],\n \"anonymous\": false\n },\n {\n \"type\": \"event\",\n \"name\": \"CreatorTransferStarted\",\n \"inputs\": [\n {\n \"name\": \"lockId\",\n \"type\": \"uint256\",\n \"indexed\": true,\n \"internalType\": \"uint256\"\n },\n {\n \"name\": \"creator\",\n \"type\": \"address\",\n \"indexed\": true,\n \"internalType\": \"address\"\n },\n {\n \"name\": \"pending\",\n \"type\": \"address\",\n \"indexed\": true,\n \"internalType\": \"address\"\n }\n ],\n \"anonymous\": false\n },\n {\n \"type\": \"event\",\n \"name\": \"CreatorTransferred\",\n \"inputs\": [\n {\n \"name\": \"lockId\",\n \"type\": \"uint256\",\n \"indexed\": true,\n \"internalType\": \"uint256\"\n },\n {\n \"name\": \"previousCreator\",\n \"type\": \"address\",\n \"indexed\": true,\n \"internalType\": \"address\"\n },\n {\n \"name\": \"newCreator\",\n \"type\": \"address\",\n \"indexed\": true,\n \"internalType\": \"address\"\n }\n ],\n \"anonymous\": false\n },\n {\n \"type\": \"event\",\n \"name\": \"FeeSharesBurned\",\n \"inputs\": [\n {\n \"name\": \"lockId\",\n \"type\": \"uint256\",\n \"indexed\": true,\n \"internalType\": \"uint256\"\n },\n {\n \"name\": \"caller\",\n \"type\": \"address\",\n \"indexed\": true,\n \"internalType\": \"address\"\n },\n {\n \"name\": \"binIds\",\n \"type\": \"uint256[]\",\n \"indexed\": false,\n \"internalType\": \"uint256[]\"\n },\n {\n \"name\": \"sharesBurned\",\n \"type\": \"uint256[]\",\n \"indexed\": false,\n \"internalType\": \"uint256[]\"\n }\n ],\n \"anonymous\": false\n },\n {\n \"type\": \"event\",\n \"name\": \"FeesCollected\",\n \"inputs\": [\n {\n \"name\": \"lockId\",\n \"type\": \"uint256\",\n \"indexed\": true,\n \"internalType\": \"uint256\"\n },\n {\n \"name\": \"currency\",\n \"type\": \"address\",\n \"indexed\": true,\n \"internalType\": \"Currency\"\n },\n {\n \"name\": \"caller\",\n \"type\": \"address\",\n \"indexed\": true,\n \"internalType\": \"address\"\n },\n {\n \"name\": \"amount\",\n \"type\": \"uint256\",\n \"indexed\": false,\n \"internalType\": \"uint256\"\n },\n {\n \"name\": \"creatorShare\",\n \"type\": \"uint256\",\n \"indexed\": false,\n \"internalType\": \"uint256\"\n },\n {\n \"name\": \"integratorShare\",\n \"type\": \"uint256\",\n \"indexed\": false,\n \"internalType\": \"uint256\"\n },\n {\n \"name\": \"protocolShare\",\n \"type\": \"uint256\",\n \"indexed\": false,\n \"internalType\": \"uint256\"\n }\n ],\n \"anonymous\": false\n },\n {\n \"type\": \"event\",\n \"name\": \"Skimmed\",\n \"inputs\": [\n {\n \"name\": \"currency\",\n \"type\": \"address\",\n \"indexed\": true,\n \"internalType\": \"Currency\"\n },\n {\n \"name\": \"caller\",\n \"type\": \"address\",\n \"indexed\": true,\n \"internalType\": \"address\"\n },\n {\n \"name\": \"amount\",\n \"type\": \"uint256\",\n \"indexed\": false,\n \"internalType\": \"uint256\"\n }\n ],\n \"anonymous\": false\n },\n {\n \"type\": \"function\",\n \"name\": \"BPS_DENOMINATOR\",\n \"inputs\": [],\n \"outputs\": [\n {\n \"name\": \"\",\n \"type\": \"uint16\",\n \"internalType\": \"uint16\"\n }\n ],\n \"stateMutability\": \"view\"\n },\n {\n \"type\": \"function\",\n \"name\": \"MAX_BINS_HARD_CAP\",\n \"inputs\": [],\n \"outputs\": [\n {\n \"name\": \"\",\n \"type\": \"uint16\",\n \"internalType\": \"uint16\"\n }\n ],\n \"stateMutability\": \"view\"\n },\n {\n \"type\": \"function\",\n \"name\": \"acceptCreator\",\n \"inputs\": [\n {\n \"name\": \"lockId\",\n \"type\": \"uint256\",\n \"internalType\": \"uint256\"\n }\n ],\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\"\n },\n {\n \"type\": \"function\",\n \"name\": \"binPoolManager\",\n \"inputs\": [],\n \"outputs\": [\n {\n \"name\": \"\",\n \"type\": \"address\",\n \"internalType\": \"contract IBinPoolManager\"\n }\n ],\n \"stateMutability\": \"view\"\n },\n {\n \"type\": \"function\",\n \"name\": \"claim\",\n \"inputs\": [\n {\n \"name\": \"currency\",\n \"type\": \"address\",\n \"internalType\": \"Currency\"\n },\n {\n \"name\": \"to\",\n \"type\": \"address\",\n \"internalType\": \"address\"\n }\n ],\n \"outputs\": [\n {\n \"name\": \"amount\",\n \"type\": \"uint256\",\n \"internalType\": \"uint256\"\n }\n ],\n \"stateMutability\": \"nonpayable\"\n },\n {\n \"type\": \"function\",\n \"name\": \"claimable\",\n \"inputs\": [\n {\n \"name\": \"account\",\n \"type\": \"address\",\n \"internalType\": \"address\"\n },\n {\n \"name\": \"currency\",\n \"type\": \"address\",\n \"internalType\": \"Currency\"\n }\n ],\n \"outputs\": [\n {\n \"name\": \"\",\n \"type\": \"uint256\",\n \"internalType\": \"uint256\"\n }\n ],\n \"stateMutability\": \"view\"\n },\n {\n \"type\": \"function\",\n \"name\": \"collectFees\",\n \"inputs\": [\n {\n \"name\": \"lockId\",\n \"type\": \"uint256\",\n \"internalType\": \"uint256\"\n }\n ],\n \"outputs\": [\n {\n \"name\": \"amount0\",\n \"type\": \"uint256\",\n \"internalType\": \"uint256\"\n },\n {\n \"name\": \"amount1\",\n \"type\": \"uint256\",\n \"internalType\": \"uint256\"\n }\n ],\n \"stateMutability\": \"nonpayable\"\n },\n {\n \"type\": \"function\",\n \"name\": \"getLock\",\n \"inputs\": [\n {\n \"name\": \"lockId\",\n \"type\": \"uint256\",\n \"internalType\": \"uint256\"\n }\n ],\n \"outputs\": [\n {\n \"name\": \"\",\n \"type\": \"tuple\",\n \"internalType\": \"struct BinLock\",\n \"components\": [\n {\n \"name\": \"creator\",\n \"type\": \"address\",\n \"internalType\": \"address\"\n },\n {\n \"name\": \"creatorBps\",\n \"type\": \"uint16\",\n \"internalType\": \"uint16\"\n },\n {\n \"name\": \"integratorBps\",\n \"type\": \"uint16\",\n \"internalType\": \"uint16\"\n },\n {\n \"name\": \"protocolBps\",\n \"type\": \"uint16\",\n \"internalType\": \"uint16\"\n },\n {\n \"name\": \"lockedAt\",\n \"type\": \"uint48\",\n \"internalType\": \"uint48\"\n },\n {\n \"name\": \"integrator\",\n \"type\": \"address\",\n \"internalType\": \"address\"\n },\n {\n \"name\": \"binCount\",\n \"type\": \"uint16\",\n \"internalType\": \"uint16\"\n },\n {\n \"name\": \"poolId\",\n \"type\": \"bytes32\",\n \"internalType\": \"PoolId\"\n }\n ]\n }\n ],\n \"stateMutability\": \"view\"\n },\n {\n \"type\": \"function\",\n \"name\": \"getLockedBins\",\n \"inputs\": [\n {\n \"name\": \"lockId\",\n \"type\": \"uint256\",\n \"internalType\": \"uint256\"\n }\n ],\n \"outputs\": [\n {\n \"name\": \"binIds\",\n \"type\": \"uint24[]\",\n \"internalType\": \"uint24[]\"\n },\n {\n \"name\": \"shares\",\n \"type\": \"uint256[]\",\n \"internalType\": \"uint256[]\"\n },\n {\n \"name\": \"principals\",\n \"type\": \"uint256[]\",\n \"internalType\": \"uint256[]\"\n }\n ],\n \"stateMutability\": \"view\"\n },\n {\n \"type\": \"function\",\n \"name\": \"getPoolKey\",\n \"inputs\": [\n {\n \"name\": \"lockId\",\n \"type\": \"uint256\",\n \"internalType\": \"uint256\"\n }\n ],\n \"outputs\": [\n {\n \"name\": \"\",\n \"type\": \"tuple\",\n \"internalType\": \"struct PoolKey\",\n \"components\": [\n {\n \"name\": \"currency0\",\n \"type\": \"address\",\n \"internalType\": \"Currency\"\n },\n {\n \"name\": \"currency1\",\n \"type\": \"address\",\n \"internalType\": \"Currency\"\n },\n {\n \"name\": \"hooks\",\n \"type\": \"address\",\n \"internalType\": \"contract IHooks\"\n },\n {\n \"name\": \"poolManager\",\n \"type\": \"address\",\n \"internalType\": \"contract IPoolManager\"\n },\n {\n \"name\": \"fee\",\n \"type\": \"uint24\",\n \"internalType\": \"uint24\"\n },\n {\n \"name\": \"parameters\",\n \"type\": \"bytes32\",\n \"internalType\": \"bytes32\"\n }\n ]\n }\n ],\n \"stateMutability\": \"view\"\n },\n {\n \"type\": \"function\",\n \"name\": \"harvestableShares\",\n \"inputs\": [\n {\n \"name\": \"shares\",\n \"type\": \"uint256\",\n \"internalType\": \"uint256\"\n },\n {\n \"name\": \"principal\",\n \"type\": \"uint256\",\n \"internalType\": \"uint256\"\n },\n {\n \"name\": \"binReserveX\",\n \"type\": \"uint128\",\n \"internalType\": \"uint128\"\n },\n {\n \"name\": \"binReserveY\",\n \"type\": \"uint128\",\n \"internalType\": \"uint128\"\n },\n {\n \"name\": \"binLiquidity\",\n \"type\": \"uint256\",\n \"internalType\": \"uint256\"\n },\n {\n \"name\": \"binShares\",\n \"type\": \"uint256\",\n \"internalType\": \"uint256\"\n }\n ],\n \"outputs\": [\n {\n \"name\": \"burn\",\n \"type\": \"uint256\",\n \"internalType\": \"uint256\"\n }\n ],\n \"stateMutability\": \"pure\"\n },\n {\n \"type\": \"function\",\n \"name\": \"isLocked\",\n \"inputs\": [\n {\n \"name\": \"lockId\",\n \"type\": \"uint256\",\n \"internalType\": \"uint256\"\n }\n ],\n \"outputs\": [\n {\n \"name\": \"\",\n \"type\": \"bool\",\n \"internalType\": \"bool\"\n }\n ],\n \"stateMutability\": \"view\"\n },\n {\n \"type\": \"function\",\n \"name\": \"lock\",\n \"inputs\": [\n {\n \"name\": \"key\",\n \"type\": \"tuple\",\n \"internalType\": \"struct PoolKey\",\n \"components\": [\n {\n \"name\": \"currency0\",\n \"type\": \"address\",\n \"internalType\": \"Currency\"\n },\n {\n \"name\": \"currency1\",\n \"type\": \"address\",\n \"internalType\": \"Currency\"\n },\n {\n \"name\": \"hooks\",\n \"type\": \"address\",\n \"internalType\": \"contract IHooks\"\n },\n {\n \"name\": \"poolManager\",\n \"type\": \"address\",\n \"internalType\": \"contract IPoolManager\"\n },\n {\n \"name\": \"fee\",\n \"type\": \"uint24\",\n \"internalType\": \"uint24\"\n },\n {\n \"name\": \"parameters\",\n \"type\": \"bytes32\",\n \"internalType\": \"bytes32\"\n }\n ]\n },\n {\n \"name\": \"binIds\",\n \"type\": \"uint24[]\",\n \"internalType\": \"uint24[]\"\n },\n {\n \"name\": \"shares\",\n \"type\": \"uint256[]\",\n \"internalType\": \"uint256[]\"\n },\n {\n \"name\": \"p\",\n \"type\": \"tuple\",\n \"internalType\": \"struct LockParams\",\n \"components\": [\n {\n \"name\": \"creator\",\n \"type\": \"address\",\n \"internalType\": \"address\"\n },\n {\n \"name\": \"creatorBps\",\n \"type\": \"uint16\",\n \"internalType\": \"uint16\"\n },\n {\n \"name\": \"integrator\",\n \"type\": \"address\",\n \"internalType\": \"address\"\n },\n {\n \"name\": \"integratorBps\",\n \"type\": \"uint16\",\n \"internalType\": \"uint16\"\n },\n {\n \"name\": \"protocolBps\",\n \"type\": \"uint16\",\n \"internalType\": \"uint16\"\n }\n ]\n }\n ],\n \"outputs\": [\n {\n \"name\": \"lockId\",\n \"type\": \"uint256\",\n \"internalType\": \"uint256\"\n }\n ],\n \"stateMutability\": \"nonpayable\"\n },\n {\n \"type\": \"function\",\n \"name\": \"lockCount\",\n \"inputs\": [],\n \"outputs\": [\n {\n \"name\": \"\",\n \"type\": \"uint256\",\n \"internalType\": \"uint256\"\n }\n ],\n \"stateMutability\": \"view\"\n },\n {\n \"type\": \"function\",\n \"name\": \"maxBinsPerLock\",\n \"inputs\": [],\n \"outputs\": [\n {\n \"name\": \"\",\n \"type\": \"uint16\",\n \"internalType\": \"uint16\"\n }\n ],\n \"stateMutability\": \"view\"\n },\n {\n \"type\": \"function\",\n \"name\": \"maxIntegratorBps\",\n \"inputs\": [],\n \"outputs\": [\n {\n \"name\": \"\",\n \"type\": \"uint16\",\n \"internalType\": \"uint16\"\n }\n ],\n \"stateMutability\": \"view\"\n },\n {\n \"type\": \"function\",\n \"name\": \"maxProtocolBps\",\n \"inputs\": [],\n \"outputs\": [\n {\n \"name\": \"\",\n \"type\": \"uint16\",\n \"internalType\": \"uint16\"\n }\n ],\n \"stateMutability\": \"view\"\n },\n {\n \"type\": \"function\",\n \"name\": \"minProtocolBps\",\n \"inputs\": [],\n \"outputs\": [\n {\n \"name\": \"\",\n \"type\": \"uint16\",\n \"internalType\": \"uint16\"\n }\n ],\n \"stateMutability\": \"view\"\n },\n {\n \"type\": \"function\",\n \"name\": \"pendingCreator\",\n \"inputs\": [\n {\n \"name\": \"lockId\",\n \"type\": \"uint256\",\n \"internalType\": \"uint256\"\n }\n ],\n \"outputs\": [\n {\n \"name\": \"\",\n \"type\": \"address\",\n \"internalType\": \"address\"\n }\n ],\n \"stateMutability\": \"view\"\n },\n {\n \"type\": \"function\",\n \"name\": \"positionManager\",\n \"inputs\": [],\n \"outputs\": [\n {\n \"name\": \"\",\n \"type\": \"address\",\n \"internalType\": \"contract IBinPositionManager\"\n }\n ],\n \"stateMutability\": \"view\"\n },\n {\n \"type\": \"function\",\n \"name\": \"previewCollect\",\n \"inputs\": [\n {\n \"name\": \"lockId\",\n \"type\": \"uint256\",\n \"internalType\": \"uint256\"\n }\n ],\n \"outputs\": [\n {\n \"name\": \"sharesToBurn\",\n \"type\": \"uint256[]\",\n \"internalType\": \"uint256[]\"\n }\n ],\n \"stateMutability\": \"view\"\n },\n {\n \"type\": \"function\",\n \"name\": \"protocolRecipient\",\n \"inputs\": [],\n \"outputs\": [\n {\n \"name\": \"\",\n \"type\": \"address\",\n \"internalType\": \"address\"\n }\n ],\n \"stateMutability\": \"view\"\n },\n {\n \"type\": \"function\",\n \"name\": \"skim\",\n \"inputs\": [\n {\n \"name\": \"currency\",\n \"type\": \"address\",\n \"internalType\": \"Currency\"\n }\n ],\n \"outputs\": [\n {\n \"name\": \"surplus\",\n \"type\": \"uint256\",\n \"internalType\": \"uint256\"\n }\n ],\n \"stateMutability\": \"nonpayable\"\n },\n {\n \"type\": \"function\",\n \"name\": \"splitAmount\",\n \"inputs\": [\n {\n \"name\": \"amount\",\n \"type\": \"uint256\",\n \"internalType\": \"uint256\"\n },\n {\n \"name\": \"creatorBps\",\n \"type\": \"uint16\",\n \"internalType\": \"uint16\"\n },\n {\n \"name\": \"integratorBps\",\n \"type\": \"uint16\",\n \"internalType\": \"uint16\"\n }\n ],\n \"outputs\": [\n {\n \"name\": \"creatorShare\",\n \"type\": \"uint256\",\n \"internalType\": \"uint256\"\n },\n {\n \"name\": \"integratorShare\",\n \"type\": \"uint256\",\n \"internalType\": \"uint256\"\n },\n {\n \"name\": \"protocolShare\",\n \"type\": \"uint256\",\n \"internalType\": \"uint256\"\n }\n ],\n \"stateMutability\": \"pure\"\n },\n {\n \"type\": \"function\",\n \"name\": \"totalOwed\",\n \"inputs\": [\n {\n \"name\": \"currency\",\n \"type\": \"address\",\n \"internalType\": \"Currency\"\n }\n ],\n \"outputs\": [\n {\n \"name\": \"amount\",\n \"type\": \"uint256\",\n \"internalType\": \"uint256\"\n }\n ],\n \"stateMutability\": \"view\"\n },\n {\n \"type\": \"function\",\n \"name\": \"transferCreator\",\n \"inputs\": [\n {\n \"name\": \"lockId\",\n \"type\": \"uint256\",\n \"internalType\": \"uint256\"\n },\n {\n \"name\": \"newCreator\",\n \"type\": \"address\",\n \"internalType\": \"address\"\n }\n ],\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\"\n },\n {\n \"type\": \"function\",\n \"name\": \"vault\",\n \"inputs\": [],\n \"outputs\": [\n {\n \"name\": \"\",\n \"type\": \"address\",\n \"internalType\": \"address\"\n }\n ],\n \"stateMutability\": \"view\"\n }\n];\n/**\n * `LatchPadFactory` - clones a `LatchPad` per caller and makes it a kit tenant in one transaction, for a flat site fee (payable `createPad`; the Safe sets the fee inside an immutable cap, increases behind a notice).\n *\n * 18 errors, 10 events, 24 functions - curated from the compiled artifact, not the full ABI.\n */\nexport const LATCH_PAD_FACTORY_ABI = [\n {\n \"type\": \"error\",\n \"name\": \"AddressEmptyCode\",\n \"inputs\": [\n {\n \"name\": \"target\",\n \"type\": \"address\",\n \"internalType\": \"address\"\n }\n ]\n },\n {\n \"type\": \"error\",\n \"name\": \"AddressInsufficientBalance\",\n \"inputs\": [\n {\n \"name\": \"account\",\n \"type\": \"address\",\n \"internalType\": \"address\"\n }\n ]\n },\n {\n \"type\": \"error\",\n \"name\": \"ERC1167FailedCreateClone\",\n \"inputs\": []\n },\n {\n \"type\": \"error\",\n \"name\": \"FailedInnerCall\",\n \"inputs\": []\n },\n {\n \"type\": \"error\",\n \"name\": \"InsufficientPadFee\",\n \"inputs\": [\n {\n \"name\": \"required\",\n \"type\": \"uint256\",\n \"internalType\": \"uint256\"\n },\n {\n \"name\": \"sent\",\n \"type\": \"uint256\",\n \"internalType\": \"uint256\"\n }\n ]\n },\n {\n \"type\": \"error\",\n \"name\": \"InvalidNotice\",\n \"inputs\": [\n {\n \"name\": \"noticeSeconds\",\n \"type\": \"uint32\",\n \"internalType\": \"uint32\"\n }\n ]\n },\n {\n \"type\": \"error\",\n \"name\": \"NativeTransferFailed\",\n \"inputs\": [\n {\n \"name\": \"to\",\n \"type\": \"address\",\n \"internalType\": \"address\"\n },\n {\n \"name\": \"amount\",\n \"type\": \"uint256\",\n \"internalType\": \"uint256\"\n }\n ]\n },\n {\n \"type\": \"error\",\n \"name\": \"NoPendingPadFee\",\n \"inputs\": []\n },\n {\n \"type\": \"error\",\n \"name\": \"NothingToFlush\",\n \"inputs\": []\n },\n {\n \"type\": \"error\",\n \"name\": \"NothingToRescue\",\n \"inputs\": [\n {\n \"name\": \"token\",\n \"type\": \"address\",\n \"internalType\": \"address\"\n }\n ]\n },\n {\n \"type\": \"error\",\n \"name\": \"OwnableInvalidOwner\",\n \"inputs\": [\n {\n \"name\": \"owner\",\n \"type\": \"address\",\n \"internalType\": \"address\"\n }\n ]\n },\n {\n \"type\": \"error\",\n \"name\": \"OwnableUnauthorizedAccount\",\n \"inputs\": [\n {\n \"name\": \"account\",\n \"type\": \"address\",\n \"internalType\": \"address\"\n }\n ]\n },\n {\n \"type\": \"error\",\n \"name\": \"PadAlreadyExists\",\n \"inputs\": [\n {\n \"name\": \"pad\",\n \"type\": \"address\",\n \"internalType\": \"address\"\n }\n ]\n },\n {\n \"type\": \"error\",\n \"name\": \"PadFeeAboveCap\",\n \"inputs\": [\n {\n \"name\": \"feeWei\",\n \"type\": \"uint256\",\n \"internalType\": \"uint256\"\n },\n {\n \"name\": \"capWei\",\n \"type\": \"uint256\",\n \"internalType\": \"uint256\"\n }\n ]\n },\n {\n \"type\": \"error\",\n \"name\": \"ReentrancyGuardReentrantCall\",\n \"inputs\": []\n },\n {\n \"type\": \"error\",\n \"name\": \"RenounceDisabled\",\n \"inputs\": []\n },\n {\n \"type\": \"error\",\n \"name\": \"SafeERC20FailedOperation\",\n \"inputs\": [\n {\n \"name\": \"token\",\n \"type\": \"address\",\n \"internalType\": \"address\"\n }\n ]\n },\n {\n \"type\": \"error\",\n \"name\": \"ZeroAddress\",\n \"inputs\": []\n },\n {\n \"type\": \"event\",\n \"name\": \"ERC20Rescued\",\n \"inputs\": [\n {\n \"name\": \"token\",\n \"type\": \"address\",\n \"indexed\": true,\n \"internalType\": \"address\"\n },\n {\n \"name\": \"to\",\n \"type\": \"address\",\n \"indexed\": true,\n \"internalType\": \"address\"\n },\n {\n \"name\": \"amount\",\n \"type\": \"uint256\",\n \"indexed\": false,\n \"internalType\": \"uint256\"\n }\n ],\n \"anonymous\": false\n },\n {\n \"type\": \"event\",\n \"name\": \"OwnershipTransferStarted\",\n \"inputs\": [\n {\n \"name\": \"previousOwner\",\n \"type\": \"address\",\n \"indexed\": true,\n \"internalType\": \"address\"\n },\n {\n \"name\": \"newOwner\",\n \"type\": \"address\",\n \"indexed\": true,\n \"internalType\": \"address\"\n }\n ],\n \"anonymous\": false\n },\n {\n \"type\": \"event\",\n \"name\": \"OwnershipTransferred\",\n \"inputs\": [\n {\n \"name\": \"previousOwner\",\n \"type\": \"address\",\n \"indexed\": true,\n \"internalType\": \"address\"\n },\n {\n \"name\": \"newOwner\",\n \"type\": \"address\",\n \"indexed\": true,\n \"internalType\": \"address\"\n }\n ],\n \"anonymous\": false\n },\n {\n \"type\": \"event\",\n \"name\": \"PadCreated\",\n \"inputs\": [\n {\n \"name\": \"pad\",\n \"type\": \"address\",\n \"indexed\": true,\n \"internalType\": \"address\"\n },\n {\n \"name\": \"owner\",\n \"type\": \"address\",\n \"indexed\": true,\n \"internalType\": \"address\"\n },\n {\n \"name\": \"name\",\n \"type\": \"string\",\n \"indexed\": false,\n \"internalType\": \"string\"\n }\n ],\n \"anonymous\": false\n },\n {\n \"type\": \"event\",\n \"name\": \"PadFeeChanged\",\n \"inputs\": [\n {\n \"name\": \"previousWei\",\n \"type\": \"uint256\",\n \"indexed\": false,\n \"internalType\": \"uint256\"\n },\n {\n \"name\": \"newWei\",\n \"type\": \"uint256\",\n \"indexed\": false,\n \"internalType\": \"uint256\"\n }\n ],\n \"anonymous\": false\n },\n {\n \"type\": \"event\",\n \"name\": \"PadFeeIncreaseScheduled\",\n \"inputs\": [\n {\n \"name\": \"currentWei\",\n \"type\": \"uint256\",\n \"indexed\": false,\n \"internalType\": \"uint256\"\n },\n {\n \"name\": \"newWei\",\n \"type\": \"uint256\",\n \"indexed\": false,\n \"internalType\": \"uint256\"\n },\n {\n \"name\": \"effectiveAt\",\n \"type\": \"uint64\",\n \"indexed\": false,\n \"internalType\": \"uint64\"\n }\n ],\n \"anonymous\": false\n },\n {\n \"type\": \"event\",\n \"name\": \"PadFeePaid\",\n \"inputs\": [\n {\n \"name\": \"pad\",\n \"type\": \"address\",\n \"indexed\": true,\n \"internalType\": \"address\"\n },\n {\n \"name\": \"payer\",\n \"type\": \"address\",\n \"indexed\": true,\n \"internalType\": \"address\"\n },\n {\n \"name\": \"feeWei\",\n \"type\": \"uint256\",\n \"indexed\": false,\n \"internalType\": \"uint256\"\n }\n ],\n \"anonymous\": false\n },\n {\n \"type\": \"event\",\n \"name\": \"PadOriginRecorded\",\n \"inputs\": [\n {\n \"name\": \"pad\",\n \"type\": \"address\",\n \"indexed\": true,\n \"internalType\": \"address\"\n },\n {\n \"name\": \"creator\",\n \"type\": \"address\",\n \"indexed\": true,\n \"internalType\": \"address\"\n },\n {\n \"name\": \"userSalt\",\n \"type\": \"bytes32\",\n \"indexed\": true,\n \"internalType\": \"bytes32\"\n }\n ],\n \"anonymous\": false\n },\n {\n \"type\": \"event\",\n \"name\": \"PendingPadFeeCancelled\",\n \"inputs\": [\n {\n \"name\": \"cancelledWei\",\n \"type\": \"uint256\",\n \"indexed\": false,\n \"internalType\": \"uint256\"\n },\n {\n \"name\": \"effectiveAt\",\n \"type\": \"uint64\",\n \"indexed\": false,\n \"internalType\": \"uint64\"\n }\n ],\n \"anonymous\": false\n },\n {\n \"type\": \"event\",\n \"name\": \"ProtocolFeesFlushed\",\n \"inputs\": [\n {\n \"name\": \"to\",\n \"type\": \"address\",\n \"indexed\": true,\n \"internalType\": \"address\"\n },\n {\n \"name\": \"amount\",\n \"type\": \"uint256\",\n \"indexed\": false,\n \"internalType\": \"uint256\"\n },\n {\n \"name\": \"owed\",\n \"type\": \"uint256\",\n \"indexed\": false,\n \"internalType\": \"uint256\"\n }\n ],\n \"anonymous\": false\n },\n {\n \"type\": \"function\",\n \"name\": \"IMPLEMENTATION\",\n \"inputs\": [],\n \"outputs\": [\n {\n \"name\": \"\",\n \"type\": \"address\",\n \"internalType\": \"contract LatchPad\"\n }\n ],\n \"stateMutability\": \"view\"\n },\n {\n \"type\": \"function\",\n \"name\": \"KIT\",\n \"inputs\": [],\n \"outputs\": [\n {\n \"name\": \"\",\n \"type\": \"address\",\n \"internalType\": \"contract ILaunchpadKitV2\"\n }\n ],\n \"stateMutability\": \"view\"\n },\n {\n \"type\": \"function\",\n \"name\": \"MAX_FEE_NOTICE_SECONDS\",\n \"inputs\": [],\n \"outputs\": [\n {\n \"name\": \"\",\n \"type\": \"uint32\",\n \"internalType\": \"uint32\"\n }\n ],\n \"stateMutability\": \"view\"\n },\n {\n \"type\": \"function\",\n \"name\": \"MIN_FEE_NOTICE_SECONDS\",\n \"inputs\": [],\n \"outputs\": [\n {\n \"name\": \"\",\n \"type\": \"uint32\",\n \"internalType\": \"uint32\"\n }\n ],\n \"stateMutability\": \"view\"\n },\n {\n \"type\": \"function\",\n \"name\": \"cancelPendingPadFee\",\n \"inputs\": [],\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\"\n },\n {\n \"type\": \"function\",\n \"name\": \"createPad\",\n \"inputs\": [\n {\n \"name\": \"userSalt\",\n \"type\": \"bytes32\",\n \"internalType\": \"bytes32\"\n },\n {\n \"name\": \"name_\",\n \"type\": \"string\",\n \"internalType\": \"string\"\n },\n {\n \"name\": \"metadataURI_\",\n \"type\": \"string\",\n \"internalType\": \"string\"\n },\n {\n \"name\": \"config\",\n \"type\": \"tuple\",\n \"internalType\": \"struct TenantConfig\",\n \"components\": [\n {\n \"name\": \"integrator\",\n \"type\": \"address\",\n \"internalType\": \"address\"\n },\n {\n \"name\": \"integratorBps\",\n \"type\": \"uint16\",\n \"internalType\": \"uint16\"\n },\n {\n \"name\": \"integratorLaunchFeeWei\",\n \"type\": \"uint96\",\n \"internalType\": \"uint96\"\n },\n {\n \"name\": \"allowedPresets\",\n \"type\": \"uint8\",\n \"internalType\": \"uint8\"\n },\n {\n \"name\": \"allowedBinShapes\",\n \"type\": \"uint8\",\n \"internalType\": \"uint8\"\n },\n {\n \"name\": \"restrictQuotes\",\n \"type\": \"bool\",\n \"internalType\": \"bool\"\n },\n {\n \"name\": \"active\",\n \"type\": \"bool\",\n \"internalType\": \"bool\"\n },\n {\n \"name\": \"maxTaxBps\",\n \"type\": \"uint16\",\n \"internalType\": \"uint16\"\n },\n {\n \"name\": \"taxIntegratorBps\",\n \"type\": \"uint16\",\n \"internalType\": \"uint16\"\n }\n ]\n },\n {\n \"name\": \"allowedQuotes\",\n \"type\": \"address[]\",\n \"internalType\": \"address[]\"\n }\n ],\n \"outputs\": [\n {\n \"name\": \"pad\",\n \"type\": \"address\",\n \"internalType\": \"address\"\n }\n ],\n \"stateMutability\": \"payable\"\n },\n {\n \"type\": \"function\",\n \"name\": \"flushProtocolFees\",\n \"inputs\": [],\n \"outputs\": [\n {\n \"name\": \"amount\",\n \"type\": \"uint256\",\n \"internalType\": \"uint256\"\n }\n ],\n \"stateMutability\": \"nonpayable\"\n },\n {\n \"type\": \"function\",\n \"name\": \"isPad\",\n \"inputs\": [\n {\n \"name\": \"\",\n \"type\": \"address\",\n \"internalType\": \"address\"\n }\n ],\n \"outputs\": [\n {\n \"name\": \"\",\n \"type\": \"bool\",\n \"internalType\": \"bool\"\n }\n ],\n \"stateMutability\": \"view\"\n },\n {\n \"type\": \"function\",\n \"name\": \"maxPadFeeWei\",\n \"inputs\": [],\n \"outputs\": [\n {\n \"name\": \"\",\n \"type\": \"uint256\",\n \"internalType\": \"uint256\"\n }\n ],\n \"stateMutability\": \"view\"\n },\n {\n \"type\": \"function\",\n \"name\": \"owner\",\n \"inputs\": [],\n \"outputs\": [\n {\n \"name\": \"\",\n \"type\": \"address\",\n \"internalType\": \"address\"\n }\n ],\n \"stateMutability\": \"view\"\n },\n {\n \"type\": \"function\",\n \"name\": \"padAt\",\n \"inputs\": [\n {\n \"name\": \"index\",\n \"type\": \"uint256\",\n \"internalType\": \"uint256\"\n }\n ],\n \"outputs\": [\n {\n \"name\": \"\",\n \"type\": \"address\",\n \"internalType\": \"address\"\n }\n ],\n \"stateMutability\": \"view\"\n },\n {\n \"type\": \"function\",\n \"name\": \"padCount\",\n \"inputs\": [],\n \"outputs\": [\n {\n \"name\": \"\",\n \"type\": \"uint256\",\n \"internalType\": \"uint256\"\n }\n ],\n \"stateMutability\": \"view\"\n },\n {\n \"type\": \"function\",\n \"name\": \"padFeeNoticeSeconds\",\n \"inputs\": [],\n \"outputs\": [\n {\n \"name\": \"\",\n \"type\": \"uint32\",\n \"internalType\": \"uint32\"\n }\n ],\n \"stateMutability\": \"view\"\n },\n {\n \"type\": \"function\",\n \"name\": \"padFeeWei\",\n \"inputs\": [],\n \"outputs\": [\n {\n \"name\": \"\",\n \"type\": \"uint256\",\n \"internalType\": \"uint256\"\n }\n ],\n \"stateMutability\": \"view\"\n },\n {\n \"type\": \"function\",\n \"name\": \"padOrigin\",\n \"inputs\": [\n {\n \"name\": \"pad\",\n \"type\": \"address\",\n \"internalType\": \"address\"\n }\n ],\n \"outputs\": [\n {\n \"name\": \"creator\",\n \"type\": \"address\",\n \"internalType\": \"address\"\n },\n {\n \"name\": \"userSalt\",\n \"type\": \"bytes32\",\n \"internalType\": \"bytes32\"\n }\n ],\n \"stateMutability\": \"view\"\n },\n {\n \"type\": \"function\",\n \"name\": \"padSalt\",\n \"inputs\": [\n {\n \"name\": \"creator\",\n \"type\": \"address\",\n \"internalType\": \"address\"\n },\n {\n \"name\": \"userSalt\",\n \"type\": \"bytes32\",\n \"internalType\": \"bytes32\"\n }\n ],\n \"outputs\": [\n {\n \"name\": \"\",\n \"type\": \"bytes32\",\n \"internalType\": \"bytes32\"\n }\n ],\n \"stateMutability\": \"pure\"\n },\n {\n \"type\": \"function\",\n \"name\": \"pads\",\n \"inputs\": [\n {\n \"name\": \"start\",\n \"type\": \"uint256\",\n \"internalType\": \"uint256\"\n },\n {\n \"name\": \"end\",\n \"type\": \"uint256\",\n \"internalType\": \"uint256\"\n }\n ],\n \"outputs\": [\n {\n \"name\": \"page\",\n \"type\": \"address[]\",\n \"internalType\": \"address[]\"\n }\n ],\n \"stateMutability\": \"view\"\n },\n {\n \"type\": \"function\",\n \"name\": \"pendingOwner\",\n \"inputs\": [],\n \"outputs\": [\n {\n \"name\": \"\",\n \"type\": \"address\",\n \"internalType\": \"address\"\n }\n ],\n \"stateMutability\": \"view\"\n },\n {\n \"type\": \"function\",\n \"name\": \"pendingPadFee\",\n \"inputs\": [],\n \"outputs\": [\n {\n \"name\": \"feeWei\",\n \"type\": \"uint256\",\n \"internalType\": \"uint256\"\n },\n {\n \"name\": \"effectiveAt\",\n \"type\": \"uint64\",\n \"internalType\": \"uint64\"\n }\n ],\n \"stateMutability\": \"view\"\n },\n {\n \"type\": \"function\",\n \"name\": \"predictPad\",\n \"inputs\": [\n {\n \"name\": \"creator\",\n \"type\": \"address\",\n \"internalType\": \"address\"\n },\n {\n \"name\": \"userSalt\",\n \"type\": \"bytes32\",\n \"internalType\": \"bytes32\"\n }\n ],\n \"outputs\": [\n {\n \"name\": \"\",\n \"type\": \"address\",\n \"internalType\": \"address\"\n }\n ],\n \"stateMutability\": \"view\"\n },\n {\n \"type\": \"function\",\n \"name\": \"protocolFeeRecipient\",\n \"inputs\": [],\n \"outputs\": [\n {\n \"name\": \"\",\n \"type\": \"address\",\n \"internalType\": \"address\"\n }\n ],\n \"stateMutability\": \"view\"\n },\n {\n \"type\": \"function\",\n \"name\": \"protocolFeesOwed\",\n \"inputs\": [],\n \"outputs\": [\n {\n \"name\": \"\",\n \"type\": \"uint256\",\n \"internalType\": \"uint256\"\n }\n ],\n \"stateMutability\": \"view\"\n },\n {\n \"type\": \"function\",\n \"name\": \"rescueERC20\",\n \"inputs\": [\n {\n \"name\": \"token\",\n \"type\": \"address\",\n \"internalType\": \"address\"\n },\n {\n \"name\": \"to\",\n \"type\": \"address\",\n \"internalType\": \"address\"\n }\n ],\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\"\n },\n {\n \"type\": \"function\",\n \"name\": \"setPadFee\",\n \"inputs\": [\n {\n \"name\": \"newFeeWei\",\n \"type\": \"uint256\",\n \"internalType\": \"uint256\"\n }\n ],\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\"\n }\n];\n/**\n * `LatchSplitFactory` - Team splits: clones a `LatchSplit` for anyone. Two protocol levers set by the Safe inside immutable caps (a flat creation fee in native, and a protocol share of each split's inflow frozen into the split at creation); increases behind a notice, decreases immediate.\n *\n * 19 errors, 12 events, 23 functions - curated from the compiled artifact, not the full ABI.\n */\nexport const LATCH_SPLIT_FACTORY_ABI = [\n {\n \"type\": \"error\",\n \"name\": \"AddressEmptyCode\",\n \"inputs\": [\n {\n \"name\": \"target\",\n \"type\": \"address\",\n \"internalType\": \"address\"\n }\n ]\n },\n {\n \"type\": \"error\",\n \"name\": \"AddressInsufficientBalance\",\n \"inputs\": [\n {\n \"name\": \"account\",\n \"type\": \"address\",\n \"internalType\": \"address\"\n }\n ]\n },\n {\n \"type\": \"error\",\n \"name\": \"ERC1167FailedCreateClone\",\n \"inputs\": []\n },\n {\n \"type\": \"error\",\n \"name\": \"FailedInnerCall\",\n \"inputs\": []\n },\n {\n \"type\": \"error\",\n \"name\": \"InsufficientSplitFee\",\n \"inputs\": [\n {\n \"name\": \"required\",\n \"type\": \"uint256\",\n \"internalType\": \"uint256\"\n },\n {\n \"name\": \"sent\",\n \"type\": \"uint256\",\n \"internalType\": \"uint256\"\n }\n ]\n },\n {\n \"type\": \"error\",\n \"name\": \"InvalidNotice\",\n \"inputs\": [\n {\n \"name\": \"noticeSeconds\",\n \"type\": \"uint32\",\n \"internalType\": \"uint32\"\n }\n ]\n },\n {\n \"type\": \"error\",\n \"name\": \"NativeTransferFailed\",\n \"inputs\": [\n {\n \"name\": \"to\",\n \"type\": \"address\",\n \"internalType\": \"address\"\n },\n {\n \"name\": \"amount\",\n \"type\": \"uint256\",\n \"internalType\": \"uint256\"\n }\n ]\n },\n {\n \"type\": \"error\",\n \"name\": \"NoPendingChange\",\n \"inputs\": []\n },\n {\n \"type\": \"error\",\n \"name\": \"NothingToFlush\",\n \"inputs\": []\n },\n {\n \"type\": \"error\",\n \"name\": \"NothingToRescue\",\n \"inputs\": [\n {\n \"name\": \"token\",\n \"type\": \"address\",\n \"internalType\": \"address\"\n }\n ]\n },\n {\n \"type\": \"error\",\n \"name\": \"OwnableInvalidOwner\",\n \"inputs\": [\n {\n \"name\": \"owner\",\n \"type\": \"address\",\n \"internalType\": \"address\"\n }\n ]\n },\n {\n \"type\": \"error\",\n \"name\": \"OwnableUnauthorizedAccount\",\n \"inputs\": [\n {\n \"name\": \"account\",\n \"type\": \"address\",\n \"internalType\": \"address\"\n }\n ]\n },\n {\n \"type\": \"error\",\n \"name\": \"ProtocolShareAboveCap\",\n \"inputs\": [\n {\n \"name\": \"bps\",\n \"type\": \"uint16\",\n \"internalType\": \"uint16\"\n },\n {\n \"name\": \"capBps\",\n \"type\": \"uint16\",\n \"internalType\": \"uint16\"\n }\n ]\n },\n {\n \"type\": \"error\",\n \"name\": \"ProtocolShareAboveLimit\",\n \"inputs\": [\n {\n \"name\": \"inForceBps\",\n \"type\": \"uint16\",\n \"internalType\": \"uint16\"\n },\n {\n \"name\": \"limitBps\",\n \"type\": \"uint16\",\n \"internalType\": \"uint16\"\n }\n ]\n },\n {\n \"type\": \"error\",\n \"name\": \"ReentrancyGuardReentrantCall\",\n \"inputs\": []\n },\n {\n \"type\": \"error\",\n \"name\": \"RenounceDisabled\",\n \"inputs\": []\n },\n {\n \"type\": \"error\",\n \"name\": \"SafeERC20FailedOperation\",\n \"inputs\": [\n {\n \"name\": \"token\",\n \"type\": \"address\",\n \"internalType\": \"address\"\n }\n ]\n },\n {\n \"type\": \"error\",\n \"name\": \"SplitFeeAboveCap\",\n \"inputs\": [\n {\n \"name\": \"feeWei\",\n \"type\": \"uint256\",\n \"internalType\": \"uint256\"\n },\n {\n \"name\": \"capWei\",\n \"type\": \"uint256\",\n \"internalType\": \"uint256\"\n }\n ]\n },\n {\n \"type\": \"error\",\n \"name\": \"ZeroAddress\",\n \"inputs\": []\n },\n {\n \"type\": \"event\",\n \"name\": \"ERC20Rescued\",\n \"inputs\": [\n {\n \"name\": \"token\",\n \"type\": \"address\",\n \"indexed\": true,\n \"internalType\": \"address\"\n },\n {\n \"name\": \"to\",\n \"type\": \"address\",\n \"indexed\": true,\n \"internalType\": \"address\"\n },\n {\n \"name\": \"amount\",\n \"type\": \"uint256\",\n \"indexed\": false,\n \"internalType\": \"uint256\"\n }\n ],\n \"anonymous\": false\n },\n {\n \"type\": \"event\",\n \"name\": \"OwnershipTransferStarted\",\n \"inputs\": [\n {\n \"name\": \"previousOwner\",\n \"type\": \"address\",\n \"indexed\": true,\n \"internalType\": \"address\"\n },\n {\n \"name\": \"newOwner\",\n \"type\": \"address\",\n \"indexed\": true,\n \"internalType\": \"address\"\n }\n ],\n \"anonymous\": false\n },\n {\n \"type\": \"event\",\n \"name\": \"OwnershipTransferred\",\n \"inputs\": [\n {\n \"name\": \"previousOwner\",\n \"type\": \"address\",\n \"indexed\": true,\n \"internalType\": \"address\"\n },\n {\n \"name\": \"newOwner\",\n \"type\": \"address\",\n \"indexed\": true,\n \"internalType\": \"address\"\n }\n ],\n \"anonymous\": false\n },\n {\n \"type\": \"event\",\n \"name\": \"PendingProtocolShareCancelled\",\n \"inputs\": [\n {\n \"name\": \"cancelledBps\",\n \"type\": \"uint16\",\n \"indexed\": false,\n \"internalType\": \"uint16\"\n },\n {\n \"name\": \"effectiveAt\",\n \"type\": \"uint64\",\n \"indexed\": false,\n \"internalType\": \"uint64\"\n }\n ],\n \"anonymous\": false\n },\n {\n \"type\": \"event\",\n \"name\": \"PendingSplitFeeCancelled\",\n \"inputs\": [\n {\n \"name\": \"cancelledWei\",\n \"type\": \"uint256\",\n \"indexed\": false,\n \"internalType\": \"uint256\"\n },\n {\n \"name\": \"effectiveAt\",\n \"type\": \"uint64\",\n \"indexed\": false,\n \"internalType\": \"uint64\"\n }\n ],\n \"anonymous\": false\n },\n {\n \"type\": \"event\",\n \"name\": \"ProtocolFeesFlushed\",\n \"inputs\": [\n {\n \"name\": \"to\",\n \"type\": \"address\",\n \"indexed\": true,\n \"internalType\": \"address\"\n },\n {\n \"name\": \"amount\",\n \"type\": \"uint256\",\n \"indexed\": false,\n \"internalType\": \"uint256\"\n },\n {\n \"name\": \"owed\",\n \"type\": \"uint256\",\n \"indexed\": false,\n \"internalType\": \"uint256\"\n }\n ],\n \"anonymous\": false\n },\n {\n \"type\": \"event\",\n \"name\": \"ProtocolShareChanged\",\n \"inputs\": [\n {\n \"name\": \"previousBps\",\n \"type\": \"uint16\",\n \"indexed\": false,\n \"internalType\": \"uint16\"\n },\n {\n \"name\": \"newBps\",\n \"type\": \"uint16\",\n \"indexed\": false,\n \"internalType\": \"uint16\"\n }\n ],\n \"anonymous\": false\n },\n {\n \"type\": \"event\",\n \"name\": \"ProtocolShareIncreaseScheduled\",\n \"inputs\": [\n {\n \"name\": \"currentBps\",\n \"type\": \"uint16\",\n \"indexed\": false,\n \"internalType\": \"uint16\"\n },\n {\n \"name\": \"newBps\",\n \"type\": \"uint16\",\n \"indexed\": false,\n \"internalType\": \"uint16\"\n },\n {\n \"name\": \"effectiveAt\",\n \"type\": \"uint64\",\n \"indexed\": false,\n \"internalType\": \"uint64\"\n }\n ],\n \"anonymous\": false\n },\n {\n \"type\": \"event\",\n \"name\": \"SplitCreated\",\n \"inputs\": [\n {\n \"name\": \"split\",\n \"type\": \"address\",\n \"indexed\": true,\n \"internalType\": \"address\"\n },\n {\n \"name\": \"creator\",\n \"type\": \"address\",\n \"indexed\": true,\n \"internalType\": \"address\"\n },\n {\n \"name\": \"name\",\n \"type\": \"string\",\n \"indexed\": false,\n \"internalType\": \"string\"\n },\n {\n \"name\": \"protocolShareBps\",\n \"type\": \"uint16\",\n \"indexed\": false,\n \"internalType\": \"uint16\"\n }\n ],\n \"anonymous\": false\n },\n {\n \"type\": \"event\",\n \"name\": \"SplitFeeChanged\",\n \"inputs\": [\n {\n \"name\": \"previousWei\",\n \"type\": \"uint256\",\n \"indexed\": false,\n \"internalType\": \"uint256\"\n },\n {\n \"name\": \"newWei\",\n \"type\": \"uint256\",\n \"indexed\": false,\n \"internalType\": \"uint256\"\n }\n ],\n \"anonymous\": false\n },\n {\n \"type\": \"event\",\n \"name\": \"SplitFeeIncreaseScheduled\",\n \"inputs\": [\n {\n \"name\": \"currentWei\",\n \"type\": \"uint256\",\n \"indexed\": false,\n \"internalType\": \"uint256\"\n },\n {\n \"name\": \"newWei\",\n \"type\": \"uint256\",\n \"indexed\": false,\n \"internalType\": \"uint256\"\n },\n {\n \"name\": \"effectiveAt\",\n \"type\": \"uint64\",\n \"indexed\": false,\n \"internalType\": \"uint64\"\n }\n ],\n \"anonymous\": false\n },\n {\n \"type\": \"event\",\n \"name\": \"SplitFeePaid\",\n \"inputs\": [\n {\n \"name\": \"split\",\n \"type\": \"address\",\n \"indexed\": true,\n \"internalType\": \"address\"\n },\n {\n \"name\": \"payer\",\n \"type\": \"address\",\n \"indexed\": true,\n \"internalType\": \"address\"\n },\n {\n \"name\": \"feeWei\",\n \"type\": \"uint256\",\n \"indexed\": false,\n \"internalType\": \"uint256\"\n }\n ],\n \"anonymous\": false\n },\n {\n \"type\": \"function\",\n \"name\": \"IMPLEMENTATION\",\n \"inputs\": [],\n \"outputs\": [\n {\n \"name\": \"\",\n \"type\": \"address\",\n \"internalType\": \"contract LatchSplit\"\n }\n ],\n \"stateMutability\": \"view\"\n },\n {\n \"type\": \"function\",\n \"name\": \"cancelPendingProtocolShare\",\n \"inputs\": [],\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\"\n },\n {\n \"type\": \"function\",\n \"name\": \"cancelPendingSplitFee\",\n \"inputs\": [],\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\"\n },\n {\n \"type\": \"function\",\n \"name\": \"createSplit\",\n \"inputs\": [\n {\n \"name\": \"name_\",\n \"type\": \"string\",\n \"internalType\": \"string\"\n },\n {\n \"name\": \"payees\",\n \"type\": \"address[]\",\n \"internalType\": \"address[]\"\n },\n {\n \"name\": \"weights\",\n \"type\": \"uint96[]\",\n \"internalType\": \"uint96[]\"\n },\n {\n \"name\": \"labels\",\n \"type\": \"string[]\",\n \"internalType\": \"string[]\"\n },\n {\n \"name\": \"maxProtocolShareBps_\",\n \"type\": \"uint16\",\n \"internalType\": \"uint16\"\n }\n ],\n \"outputs\": [\n {\n \"name\": \"split\",\n \"type\": \"address\",\n \"internalType\": \"address\"\n }\n ],\n \"stateMutability\": \"payable\"\n },\n {\n \"type\": \"function\",\n \"name\": \"flushProtocolFees\",\n \"inputs\": [],\n \"outputs\": [\n {\n \"name\": \"amount\",\n \"type\": \"uint256\",\n \"internalType\": \"uint256\"\n }\n ],\n \"stateMutability\": \"nonpayable\"\n },\n {\n \"type\": \"function\",\n \"name\": \"isSplit\",\n \"inputs\": [\n {\n \"name\": \"\",\n \"type\": \"address\",\n \"internalType\": \"address\"\n }\n ],\n \"outputs\": [\n {\n \"name\": \"\",\n \"type\": \"bool\",\n \"internalType\": \"bool\"\n }\n ],\n \"stateMutability\": \"view\"\n },\n {\n \"type\": \"function\",\n \"name\": \"maxProtocolShareBps\",\n \"inputs\": [],\n \"outputs\": [\n {\n \"name\": \"\",\n \"type\": \"uint16\",\n \"internalType\": \"uint16\"\n }\n ],\n \"stateMutability\": \"view\"\n },\n {\n \"type\": \"function\",\n \"name\": \"maxSplitFeeWei\",\n \"inputs\": [],\n \"outputs\": [\n {\n \"name\": \"\",\n \"type\": \"uint256\",\n \"internalType\": \"uint256\"\n }\n ],\n \"stateMutability\": \"view\"\n },\n {\n \"type\": \"function\",\n \"name\": \"noticeSeconds\",\n \"inputs\": [],\n \"outputs\": [\n {\n \"name\": \"\",\n \"type\": \"uint32\",\n \"internalType\": \"uint32\"\n }\n ],\n \"stateMutability\": \"view\"\n },\n {\n \"type\": \"function\",\n \"name\": \"owner\",\n \"inputs\": [],\n \"outputs\": [\n {\n \"name\": \"\",\n \"type\": \"address\",\n \"internalType\": \"address\"\n }\n ],\n \"stateMutability\": \"view\"\n },\n {\n \"type\": \"function\",\n \"name\": \"pendingOwner\",\n \"inputs\": [],\n \"outputs\": [\n {\n \"name\": \"\",\n \"type\": \"address\",\n \"internalType\": \"address\"\n }\n ],\n \"stateMutability\": \"view\"\n },\n {\n \"type\": \"function\",\n \"name\": \"pendingProtocolShare\",\n \"inputs\": [],\n \"outputs\": [\n {\n \"name\": \"bps\",\n \"type\": \"uint16\",\n \"internalType\": \"uint16\"\n },\n {\n \"name\": \"effectiveAt\",\n \"type\": \"uint64\",\n \"internalType\": \"uint64\"\n }\n ],\n \"stateMutability\": \"view\"\n },\n {\n \"type\": \"function\",\n \"name\": \"pendingSplitFee\",\n \"inputs\": [],\n \"outputs\": [\n {\n \"name\": \"feeWei\",\n \"type\": \"uint256\",\n \"internalType\": \"uint256\"\n },\n {\n \"name\": \"effectiveAt\",\n \"type\": \"uint64\",\n \"internalType\": \"uint64\"\n }\n ],\n \"stateMutability\": \"view\"\n },\n {\n \"type\": \"function\",\n \"name\": \"protocolFeeRecipient\",\n \"inputs\": [],\n \"outputs\": [\n {\n \"name\": \"\",\n \"type\": \"address\",\n \"internalType\": \"address\"\n }\n ],\n \"stateMutability\": \"view\"\n },\n {\n \"type\": \"function\",\n \"name\": \"protocolFeesOwed\",\n \"inputs\": [],\n \"outputs\": [\n {\n \"name\": \"\",\n \"type\": \"uint256\",\n \"internalType\": \"uint256\"\n }\n ],\n \"stateMutability\": \"view\"\n },\n {\n \"type\": \"function\",\n \"name\": \"protocolShareBps\",\n \"inputs\": [],\n \"outputs\": [\n {\n \"name\": \"\",\n \"type\": \"uint16\",\n \"internalType\": \"uint16\"\n }\n ],\n \"stateMutability\": \"view\"\n },\n {\n \"type\": \"function\",\n \"name\": \"rescueERC20\",\n \"inputs\": [\n {\n \"name\": \"token\",\n \"type\": \"address\",\n \"internalType\": \"address\"\n },\n {\n \"name\": \"to\",\n \"type\": \"address\",\n \"internalType\": \"address\"\n }\n ],\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\"\n },\n {\n \"type\": \"function\",\n \"name\": \"setProtocolShare\",\n \"inputs\": [\n {\n \"name\": \"newBps\",\n \"type\": \"uint16\",\n \"internalType\": \"uint16\"\n }\n ],\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\"\n },\n {\n \"type\": \"function\",\n \"name\": \"setSplitFee\",\n \"inputs\": [\n {\n \"name\": \"newFeeWei\",\n \"type\": \"uint256\",\n \"internalType\": \"uint256\"\n }\n ],\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\"\n },\n {\n \"type\": \"function\",\n \"name\": \"splitAt\",\n \"inputs\": [\n {\n \"name\": \"index\",\n \"type\": \"uint256\",\n \"internalType\": \"uint256\"\n }\n ],\n \"outputs\": [\n {\n \"name\": \"\",\n \"type\": \"address\",\n \"internalType\": \"address\"\n }\n ],\n \"stateMutability\": \"view\"\n },\n {\n \"type\": \"function\",\n \"name\": \"splitCount\",\n \"inputs\": [],\n \"outputs\": [\n {\n \"name\": \"\",\n \"type\": \"uint256\",\n \"internalType\": \"uint256\"\n }\n ],\n \"stateMutability\": \"view\"\n },\n {\n \"type\": \"function\",\n \"name\": \"splitFeeWei\",\n \"inputs\": [],\n \"outputs\": [\n {\n \"name\": \"\",\n \"type\": \"uint256\",\n \"internalType\": \"uint256\"\n }\n ],\n \"stateMutability\": \"view\"\n },\n {\n \"type\": \"function\",\n \"name\": \"splits\",\n \"inputs\": [\n {\n \"name\": \"start\",\n \"type\": \"uint256\",\n \"internalType\": \"uint256\"\n },\n {\n \"name\": \"end\",\n \"type\": \"uint256\",\n \"internalType\": \"uint256\"\n }\n ],\n \"outputs\": [\n {\n \"name\": \"page\",\n \"type\": \"address[]\",\n \"internalType\": \"address[]\"\n }\n ],\n \"stateMutability\": \"view\"\n }\n];\n/**\n * `LatchSplit` - a team's revenue split: fixed payees and weights, no owner, pull payouts in native or any ERC-20, `collect` from Latch lockers / launch guards / RevShareHook and `collectKitFees` from the kit.\n *\n * 21 errors, 6 events, 32 functions - curated from the compiled artifact, not the full ABI.\n */\nexport const LATCH_SPLIT_ABI = [\n {\n \"type\": \"error\",\n \"name\": \"AddressEmptyCode\",\n \"inputs\": [\n {\n \"name\": \"target\",\n \"type\": \"address\",\n \"internalType\": \"address\"\n }\n ]\n },\n {\n \"type\": \"error\",\n \"name\": \"AlreadyInitialized\",\n \"inputs\": []\n },\n {\n \"type\": \"error\",\n \"name\": \"DuplicatePayee\",\n \"inputs\": [\n {\n \"name\": \"payee\",\n \"type\": \"address\",\n \"internalType\": \"address\"\n }\n ]\n },\n {\n \"type\": \"error\",\n \"name\": \"FailedInnerCall\",\n \"inputs\": []\n },\n {\n \"type\": \"error\",\n \"name\": \"InvalidLabel\",\n \"inputs\": [\n {\n \"name\": \"index\",\n \"type\": \"uint256\",\n \"internalType\": \"uint256\"\n }\n ]\n },\n {\n \"type\": \"error\",\n \"name\": \"InvalidName\",\n \"inputs\": []\n },\n {\n \"type\": \"error\",\n \"name\": \"LengthMismatch\",\n \"inputs\": []\n },\n {\n \"type\": \"error\",\n \"name\": \"MathOverflowedMulDiv\",\n \"inputs\": []\n },\n {\n \"type\": \"error\",\n \"name\": \"NoPayees\",\n \"inputs\": []\n },\n {\n \"type\": \"error\",\n \"name\": \"NoSuchSlot\",\n \"inputs\": [\n {\n \"name\": \"slot\",\n \"type\": \"uint256\",\n \"internalType\": \"uint256\"\n }\n ]\n },\n {\n \"type\": \"error\",\n \"name\": \"NotPayee\",\n \"inputs\": [\n {\n \"name\": \"account\",\n \"type\": \"address\",\n \"internalType\": \"address\"\n }\n ]\n },\n {\n \"type\": \"error\",\n \"name\": \"NotPendingPayee\",\n \"inputs\": [\n {\n \"name\": \"account\",\n \"type\": \"address\",\n \"internalType\": \"address\"\n }\n ]\n },\n {\n \"type\": \"error\",\n \"name\": \"NothingToRelease\",\n \"inputs\": []\n },\n {\n \"type\": \"error\",\n \"name\": \"OnlyFactory\",\n \"inputs\": []\n },\n {\n \"type\": \"error\",\n \"name\": \"ProtocolShareTooHigh\",\n \"inputs\": [\n {\n \"name\": \"bps\",\n \"type\": \"uint16\",\n \"internalType\": \"uint16\"\n }\n ]\n },\n {\n \"type\": \"error\",\n \"name\": \"ReentrancyGuardReentrantCall\",\n \"inputs\": []\n },\n {\n \"type\": \"error\",\n \"name\": \"SelfPayee\",\n \"inputs\": []\n },\n {\n \"type\": \"error\",\n \"name\": \"TooManyPayees\",\n \"inputs\": [\n {\n \"name\": \"count\",\n \"type\": \"uint256\",\n \"internalType\": \"uint256\"\n }\n ]\n },\n {\n \"type\": \"error\",\n \"name\": \"TransferFailed\",\n \"inputs\": [\n {\n \"name\": \"currency\",\n \"type\": \"address\",\n \"internalType\": \"Currency\"\n },\n {\n \"name\": \"to\",\n \"type\": \"address\",\n \"internalType\": \"address\"\n },\n {\n \"name\": \"amount\",\n \"type\": \"uint256\",\n \"internalType\": \"uint256\"\n }\n ]\n },\n {\n \"type\": \"error\",\n \"name\": \"ZeroAddress\",\n \"inputs\": []\n },\n {\n \"type\": \"error\",\n \"name\": \"ZeroWeight\",\n \"inputs\": [\n {\n \"name\": \"index\",\n \"type\": \"uint256\",\n \"internalType\": \"uint256\"\n }\n ]\n },\n {\n \"type\": \"event\",\n \"name\": \"Collected\",\n \"inputs\": [\n {\n \"name\": \"source\",\n \"type\": \"address\",\n \"indexed\": true,\n \"internalType\": \"address\"\n },\n {\n \"name\": \"currency\",\n \"type\": \"address\",\n \"indexed\": true,\n \"internalType\": \"Currency\"\n },\n {\n \"name\": \"amount\",\n \"type\": \"uint256\",\n \"indexed\": false,\n \"internalType\": \"uint256\"\n }\n ],\n \"anonymous\": false\n },\n {\n \"type\": \"event\",\n \"name\": \"PayeeTransferStarted\",\n \"inputs\": [\n {\n \"name\": \"slot\",\n \"type\": \"uint256\",\n \"indexed\": true,\n \"internalType\": \"uint256\"\n },\n {\n \"name\": \"payee\",\n \"type\": \"address\",\n \"indexed\": true,\n \"internalType\": \"address\"\n },\n {\n \"name\": \"newPayee\",\n \"type\": \"address\",\n \"indexed\": true,\n \"internalType\": \"address\"\n }\n ],\n \"anonymous\": false\n },\n {\n \"type\": \"event\",\n \"name\": \"PayeeTransferred\",\n \"inputs\": [\n {\n \"name\": \"slot\",\n \"type\": \"uint256\",\n \"indexed\": true,\n \"internalType\": \"uint256\"\n },\n {\n \"name\": \"previousPayee\",\n \"type\": \"address\",\n \"indexed\": true,\n \"internalType\": \"address\"\n },\n {\n \"name\": \"newPayee\",\n \"type\": \"address\",\n \"indexed\": true,\n \"internalType\": \"address\"\n }\n ],\n \"anonymous\": false\n },\n {\n \"type\": \"event\",\n \"name\": \"ProtocolReleased\",\n \"inputs\": [\n {\n \"name\": \"currency\",\n \"type\": \"address\",\n \"indexed\": true,\n \"internalType\": \"Currency\"\n },\n {\n \"name\": \"to\",\n \"type\": \"address\",\n \"indexed\": true,\n \"internalType\": \"address\"\n },\n {\n \"name\": \"amount\",\n \"type\": \"uint256\",\n \"indexed\": false,\n \"internalType\": \"uint256\"\n }\n ],\n \"anonymous\": false\n },\n {\n \"type\": \"event\",\n \"name\": \"Released\",\n \"inputs\": [\n {\n \"name\": \"slot\",\n \"type\": \"uint256\",\n \"indexed\": true,\n \"internalType\": \"uint256\"\n },\n {\n \"name\": \"payee\",\n \"type\": \"address\",\n \"indexed\": true,\n \"internalType\": \"address\"\n },\n {\n \"name\": \"currency\",\n \"type\": \"address\",\n \"indexed\": true,\n \"internalType\": \"Currency\"\n },\n {\n \"name\": \"to\",\n \"type\": \"address\",\n \"indexed\": false,\n \"internalType\": \"address\"\n },\n {\n \"name\": \"amount\",\n \"type\": \"uint256\",\n \"indexed\": false,\n \"internalType\": \"uint256\"\n }\n ],\n \"anonymous\": false\n },\n {\n \"type\": \"event\",\n \"name\": \"SplitInitialized\",\n \"inputs\": [\n {\n \"name\": \"creator\",\n \"type\": \"address\",\n \"indexed\": true,\n \"internalType\": \"address\"\n },\n {\n \"name\": \"name\",\n \"type\": \"string\",\n \"indexed\": false,\n \"internalType\": \"string\"\n },\n {\n \"name\": \"payees\",\n \"type\": \"address[]\",\n \"indexed\": false,\n \"internalType\": \"address[]\"\n },\n {\n \"name\": \"weights\",\n \"type\": \"uint96[]\",\n \"indexed\": false,\n \"internalType\": \"uint96[]\"\n },\n {\n \"name\": \"labels\",\n \"type\": \"string[]\",\n \"indexed\": false,\n \"internalType\": \"string[]\"\n },\n {\n \"name\": \"protocolShareBps\",\n \"type\": \"uint16\",\n \"indexed\": false,\n \"internalType\": \"uint16\"\n }\n ],\n \"anonymous\": false\n },\n {\n \"type\": \"function\",\n \"name\": \"BPS\",\n \"inputs\": [],\n \"outputs\": [\n {\n \"name\": \"\",\n \"type\": \"uint256\",\n \"internalType\": \"uint256\"\n }\n ],\n \"stateMutability\": \"view\"\n },\n {\n \"type\": \"function\",\n \"name\": \"FACTORY\",\n \"inputs\": [],\n \"outputs\": [\n {\n \"name\": \"\",\n \"type\": \"address\",\n \"internalType\": \"address\"\n }\n ],\n \"stateMutability\": \"view\"\n },\n {\n \"type\": \"function\",\n \"name\": \"MAX_LABEL_BYTES\",\n \"inputs\": [],\n \"outputs\": [\n {\n \"name\": \"\",\n \"type\": \"uint256\",\n \"internalType\": \"uint256\"\n }\n ],\n \"stateMutability\": \"view\"\n },\n {\n \"type\": \"function\",\n \"name\": \"MAX_NAME_BYTES\",\n \"inputs\": [],\n \"outputs\": [\n {\n \"name\": \"\",\n \"type\": \"uint256\",\n \"internalType\": \"uint256\"\n }\n ],\n \"stateMutability\": \"view\"\n },\n {\n \"type\": \"function\",\n \"name\": \"MAX_PAYEES\",\n \"inputs\": [],\n \"outputs\": [\n {\n \"name\": \"\",\n \"type\": \"uint256\",\n \"internalType\": \"uint256\"\n }\n ],\n \"stateMutability\": \"view\"\n },\n {\n \"type\": \"function\",\n \"name\": \"MAX_PROTOCOL_SHARE_BPS\",\n \"inputs\": [],\n \"outputs\": [\n {\n \"name\": \"\",\n \"type\": \"uint16\",\n \"internalType\": \"uint16\"\n }\n ],\n \"stateMutability\": \"view\"\n },\n {\n \"type\": \"function\",\n \"name\": \"PROTOCOL_RECIPIENT\",\n \"inputs\": [],\n \"outputs\": [\n {\n \"name\": \"\",\n \"type\": \"address\",\n \"internalType\": \"address\"\n }\n ],\n \"stateMutability\": \"view\"\n },\n {\n \"type\": \"function\",\n \"name\": \"acceptCreator\",\n \"inputs\": [\n {\n \"name\": \"locker\",\n \"type\": \"address\",\n \"internalType\": \"address\"\n },\n {\n \"name\": \"lockId\",\n \"type\": \"uint256\",\n \"internalType\": \"uint256\"\n }\n ],\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\"\n },\n {\n \"type\": \"function\",\n \"name\": \"acceptPayee\",\n \"inputs\": [\n {\n \"name\": \"slot\",\n \"type\": \"uint256\",\n \"internalType\": \"uint256\"\n }\n ],\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\"\n },\n {\n \"type\": \"function\",\n \"name\": \"collect\",\n \"inputs\": [\n {\n \"name\": \"source\",\n \"type\": \"address\",\n \"internalType\": \"address\"\n },\n {\n \"name\": \"currency\",\n \"type\": \"address\",\n \"internalType\": \"Currency\"\n }\n ],\n \"outputs\": [\n {\n \"name\": \"amount\",\n \"type\": \"uint256\",\n \"internalType\": \"uint256\"\n }\n ],\n \"stateMutability\": \"nonpayable\"\n },\n {\n \"type\": \"function\",\n \"name\": \"collectKitFees\",\n \"inputs\": [\n {\n \"name\": \"kit\",\n \"type\": \"address\",\n \"internalType\": \"address\"\n }\n ],\n \"outputs\": [\n {\n \"name\": \"amount\",\n \"type\": \"uint256\",\n \"internalType\": \"uint256\"\n }\n ],\n \"stateMutability\": \"nonpayable\"\n },\n {\n \"type\": \"function\",\n \"name\": \"initialize\",\n \"inputs\": [\n {\n \"name\": \"creator\",\n \"type\": \"address\",\n \"internalType\": \"address\"\n },\n {\n \"name\": \"name_\",\n \"type\": \"string\",\n \"internalType\": \"string\"\n },\n {\n \"name\": \"payees_\",\n \"type\": \"address[]\",\n \"internalType\": \"address[]\"\n },\n {\n \"name\": \"weights_\",\n \"type\": \"uint96[]\",\n \"internalType\": \"uint96[]\"\n },\n {\n \"name\": \"labels_\",\n \"type\": \"string[]\",\n \"internalType\": \"string[]\"\n },\n {\n \"name\": \"protocolShareBps_\",\n \"type\": \"uint16\",\n \"internalType\": \"uint16\"\n }\n ],\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\"\n },\n {\n \"type\": \"function\",\n \"name\": \"multicall\",\n \"inputs\": [\n {\n \"name\": \"data\",\n \"type\": \"bytes[]\",\n \"internalType\": \"bytes[]\"\n }\n ],\n \"outputs\": [\n {\n \"name\": \"results\",\n \"type\": \"bytes[]\",\n \"internalType\": \"bytes[]\"\n }\n ],\n \"stateMutability\": \"nonpayable\"\n },\n {\n \"type\": \"function\",\n \"name\": \"name\",\n \"inputs\": [],\n \"outputs\": [\n {\n \"name\": \"\",\n \"type\": \"string\",\n \"internalType\": \"string\"\n }\n ],\n \"stateMutability\": \"view\"\n },\n {\n \"type\": \"function\",\n \"name\": \"payeeCount\",\n \"inputs\": [],\n \"outputs\": [\n {\n \"name\": \"\",\n \"type\": \"uint256\",\n \"internalType\": \"uint256\"\n }\n ],\n \"stateMutability\": \"view\"\n },\n {\n \"type\": \"function\",\n \"name\": \"payees\",\n \"inputs\": [],\n \"outputs\": [\n {\n \"name\": \"accounts\",\n \"type\": \"address[]\",\n \"internalType\": \"address[]\"\n },\n {\n \"name\": \"weights\",\n \"type\": \"uint96[]\",\n \"internalType\": \"uint96[]\"\n }\n ],\n \"stateMutability\": \"view\"\n },\n {\n \"type\": \"function\",\n \"name\": \"pendingPayee\",\n \"inputs\": [\n {\n \"name\": \"\",\n \"type\": \"uint256\",\n \"internalType\": \"uint256\"\n }\n ],\n \"outputs\": [\n {\n \"name\": \"\",\n \"type\": \"address\",\n \"internalType\": \"address\"\n }\n ],\n \"stateMutability\": \"view\"\n },\n {\n \"type\": \"function\",\n \"name\": \"protocolReleasable\",\n \"inputs\": [\n {\n \"name\": \"currency\",\n \"type\": \"address\",\n \"internalType\": \"Currency\"\n }\n ],\n \"outputs\": [\n {\n \"name\": \"\",\n \"type\": \"uint256\",\n \"internalType\": \"uint256\"\n }\n ],\n \"stateMutability\": \"view\"\n },\n {\n \"type\": \"function\",\n \"name\": \"protocolReleased\",\n \"inputs\": [\n {\n \"name\": \"\",\n \"type\": \"address\",\n \"internalType\": \"Currency\"\n }\n ],\n \"outputs\": [\n {\n \"name\": \"\",\n \"type\": \"uint256\",\n \"internalType\": \"uint256\"\n }\n ],\n \"stateMutability\": \"view\"\n },\n {\n \"type\": \"function\",\n \"name\": \"protocolShareBps\",\n \"inputs\": [],\n \"outputs\": [\n {\n \"name\": \"\",\n \"type\": \"uint16\",\n \"internalType\": \"uint16\"\n }\n ],\n \"stateMutability\": \"view\"\n },\n {\n \"type\": \"function\",\n \"name\": \"releasable\",\n \"inputs\": [\n {\n \"name\": \"slot\",\n \"type\": \"uint256\",\n \"internalType\": \"uint256\"\n },\n {\n \"name\": \"currency\",\n \"type\": \"address\",\n \"internalType\": \"Currency\"\n }\n ],\n \"outputs\": [\n {\n \"name\": \"\",\n \"type\": \"uint256\",\n \"internalType\": \"uint256\"\n }\n ],\n \"stateMutability\": \"view\"\n },\n {\n \"type\": \"function\",\n \"name\": \"release\",\n \"inputs\": [\n {\n \"name\": \"slot\",\n \"type\": \"uint256\",\n \"internalType\": \"uint256\"\n },\n {\n \"name\": \"currency\",\n \"type\": \"address\",\n \"internalType\": \"Currency\"\n }\n ],\n \"outputs\": [\n {\n \"name\": \"amount\",\n \"type\": \"uint256\",\n \"internalType\": \"uint256\"\n }\n ],\n \"stateMutability\": \"nonpayable\"\n },\n {\n \"type\": \"function\",\n \"name\": \"releaseAll\",\n \"inputs\": [\n {\n \"name\": \"currency\",\n \"type\": \"address\",\n \"internalType\": \"Currency\"\n }\n ],\n \"outputs\": [\n {\n \"name\": \"paid\",\n \"type\": \"uint256\",\n \"internalType\": \"uint256\"\n }\n ],\n \"stateMutability\": \"nonpayable\"\n },\n {\n \"type\": \"function\",\n \"name\": \"releaseProtocol\",\n \"inputs\": [\n {\n \"name\": \"currency\",\n \"type\": \"address\",\n \"internalType\": \"Currency\"\n }\n ],\n \"outputs\": [\n {\n \"name\": \"amount\",\n \"type\": \"uint256\",\n \"internalType\": \"uint256\"\n }\n ],\n \"stateMutability\": \"nonpayable\"\n },\n {\n \"type\": \"function\",\n \"name\": \"releaseTo\",\n \"inputs\": [\n {\n \"name\": \"currency\",\n \"type\": \"address\",\n \"internalType\": \"Currency\"\n },\n {\n \"name\": \"to\",\n \"type\": \"address\",\n \"internalType\": \"address\"\n }\n ],\n \"outputs\": [\n {\n \"name\": \"amount\",\n \"type\": \"uint256\",\n \"internalType\": \"uint256\"\n }\n ],\n \"stateMutability\": \"nonpayable\"\n },\n {\n \"type\": \"function\",\n \"name\": \"released\",\n \"inputs\": [\n {\n \"name\": \"\",\n \"type\": \"address\",\n \"internalType\": \"Currency\"\n },\n {\n \"name\": \"\",\n \"type\": \"uint256\",\n \"internalType\": \"uint256\"\n }\n ],\n \"outputs\": [\n {\n \"name\": \"\",\n \"type\": \"uint256\",\n \"internalType\": \"uint256\"\n }\n ],\n \"stateMutability\": \"view\"\n },\n {\n \"type\": \"function\",\n \"name\": \"slotAt\",\n \"inputs\": [\n {\n \"name\": \"slot\",\n \"type\": \"uint256\",\n \"internalType\": \"uint256\"\n }\n ],\n \"outputs\": [\n {\n \"name\": \"payee\",\n \"type\": \"address\",\n \"internalType\": \"address\"\n },\n {\n \"name\": \"weight\",\n \"type\": \"uint96\",\n \"internalType\": \"uint96\"\n }\n ],\n \"stateMutability\": \"view\"\n },\n {\n \"type\": \"function\",\n \"name\": \"slotOf\",\n \"inputs\": [\n {\n \"name\": \"account\",\n \"type\": \"address\",\n \"internalType\": \"address\"\n }\n ],\n \"outputs\": [\n {\n \"name\": \"isPayee\",\n \"type\": \"bool\",\n \"internalType\": \"bool\"\n },\n {\n \"name\": \"slot\",\n \"type\": \"uint256\",\n \"internalType\": \"uint256\"\n }\n ],\n \"stateMutability\": \"view\"\n },\n {\n \"type\": \"function\",\n \"name\": \"totalReceived\",\n \"inputs\": [\n {\n \"name\": \"currency\",\n \"type\": \"address\",\n \"internalType\": \"Currency\"\n }\n ],\n \"outputs\": [\n {\n \"name\": \"\",\n \"type\": \"uint256\",\n \"internalType\": \"uint256\"\n }\n ],\n \"stateMutability\": \"view\"\n },\n {\n \"type\": \"function\",\n \"name\": \"totalReleased\",\n \"inputs\": [\n {\n \"name\": \"\",\n \"type\": \"address\",\n \"internalType\": \"Currency\"\n }\n ],\n \"outputs\": [\n {\n \"name\": \"\",\n \"type\": \"uint256\",\n \"internalType\": \"uint256\"\n }\n ],\n \"stateMutability\": \"view\"\n },\n {\n \"type\": \"function\",\n \"name\": \"totalWeight\",\n \"inputs\": [],\n \"outputs\": [\n {\n \"name\": \"\",\n \"type\": \"uint256\",\n \"internalType\": \"uint256\"\n }\n ],\n \"stateMutability\": \"view\"\n },\n {\n \"type\": \"function\",\n \"name\": \"transferPayee\",\n \"inputs\": [\n {\n \"name\": \"newPayee\",\n \"type\": \"address\",\n \"internalType\": \"address\"\n }\n ],\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\"\n }\n];\n/**\n * `LatchPositionLock` - time-lock any CLPositionManager position NFT until a date; the lock owner keeps collecting its fees, withdraws after `unlockAt`, may only extend. Flat native fee per lock (`LatchFeeGate`).\n *\n * 27 errors, 15 events, 32 functions - curated from the compiled artifact, not the full ABI.\n */\nexport const LATCH_POSITION_LOCK_ABI = [\n {\n \"type\": \"error\",\n \"name\": \"AddressEmptyCode\",\n \"inputs\": [\n {\n \"name\": \"target\",\n \"type\": \"address\",\n \"internalType\": \"address\"\n }\n ]\n },\n {\n \"type\": \"error\",\n \"name\": \"AddressInsufficientBalance\",\n \"inputs\": [\n {\n \"name\": \"account\",\n \"type\": \"address\",\n \"internalType\": \"address\"\n }\n ]\n },\n {\n \"type\": \"error\",\n \"name\": \"AlreadyLocked\",\n \"inputs\": [\n {\n \"name\": \"tokenId\",\n \"type\": \"uint256\",\n \"internalType\": \"uint256\"\n }\n ]\n },\n {\n \"type\": \"error\",\n \"name\": \"EmptyPosition\",\n \"inputs\": [\n {\n \"name\": \"tokenId\",\n \"type\": \"uint256\",\n \"internalType\": \"uint256\"\n }\n ]\n },\n {\n \"type\": \"error\",\n \"name\": \"FailedInnerCall\",\n \"inputs\": []\n },\n {\n \"type\": \"error\",\n \"name\": \"FeeAboveCap\",\n \"inputs\": [\n {\n \"name\": \"feeWei\",\n \"type\": \"uint256\",\n \"internalType\": \"uint256\"\n },\n {\n \"name\": \"capWei\",\n \"type\": \"uint256\",\n \"internalType\": \"uint256\"\n }\n ]\n },\n {\n \"type\": \"error\",\n \"name\": \"InsufficientFee\",\n \"inputs\": [\n {\n \"name\": \"required\",\n \"type\": \"uint256\",\n \"internalType\": \"uint256\"\n },\n {\n \"name\": \"sent\",\n \"type\": \"uint256\",\n \"internalType\": \"uint256\"\n }\n ]\n },\n {\n \"type\": \"error\",\n \"name\": \"InvalidNotice\",\n \"inputs\": [\n {\n \"name\": \"noticeSeconds\",\n \"type\": \"uint32\",\n \"internalType\": \"uint32\"\n }\n ]\n },\n {\n \"type\": \"error\",\n \"name\": \"InvalidOwner\",\n \"inputs\": [\n {\n \"name\": \"owner\",\n \"type\": \"address\",\n \"internalType\": \"address\"\n }\n ]\n },\n {\n \"type\": \"error\",\n \"name\": \"InvalidUnlock\",\n \"inputs\": [\n {\n \"name\": \"unlockAt\",\n \"type\": \"uint48\",\n \"internalType\": \"uint48\"\n }\n ]\n },\n {\n \"type\": \"error\",\n \"name\": \"NativeTransferFailed\",\n \"inputs\": [\n {\n \"name\": \"to\",\n \"type\": \"address\",\n \"internalType\": \"address\"\n },\n {\n \"name\": \"amount\",\n \"type\": \"uint256\",\n \"internalType\": \"uint256\"\n }\n ]\n },\n {\n \"type\": \"error\",\n \"name\": \"NoPendingFee\",\n \"inputs\": []\n },\n {\n \"type\": \"error\",\n \"name\": \"NotLater\",\n \"inputs\": [\n {\n \"name\": \"current\",\n \"type\": \"uint48\",\n \"internalType\": \"uint48\"\n },\n {\n \"name\": \"proposed\",\n \"type\": \"uint48\",\n \"internalType\": \"uint48\"\n }\n ]\n },\n {\n \"type\": \"error\",\n \"name\": \"NotLockOwner\",\n \"inputs\": [\n {\n \"name\": \"tokenId\",\n \"type\": \"uint256\",\n \"internalType\": \"uint256\"\n },\n {\n \"name\": \"caller\",\n \"type\": \"address\",\n \"internalType\": \"address\"\n }\n ]\n },\n {\n \"type\": \"error\",\n \"name\": \"NotLocked\",\n \"inputs\": [\n {\n \"name\": \"tokenId\",\n \"type\": \"uint256\",\n \"internalType\": \"uint256\"\n }\n ]\n },\n {\n \"type\": \"error\",\n \"name\": \"NotPendingOwner\",\n \"inputs\": [\n {\n \"name\": \"tokenId\",\n \"type\": \"uint256\",\n \"internalType\": \"uint256\"\n },\n {\n \"name\": \"caller\",\n \"type\": \"address\",\n \"internalType\": \"address\"\n }\n ]\n },\n {\n \"type\": \"error\",\n \"name\": \"NotPositionOwner\",\n \"inputs\": [\n {\n \"name\": \"tokenId\",\n \"type\": \"uint256\",\n \"internalType\": \"uint256\"\n },\n {\n \"name\": \"caller\",\n \"type\": \"address\",\n \"internalType\": \"address\"\n }\n ]\n },\n {\n \"type\": \"error\",\n \"name\": \"NothingToFlush\",\n \"inputs\": []\n },\n {\n \"type\": \"error\",\n \"name\": \"NothingToRescue\",\n \"inputs\": [\n {\n \"name\": \"token\",\n \"type\": \"address\",\n \"internalType\": \"address\"\n }\n ]\n },\n {\n \"type\": \"error\",\n \"name\": \"OwnableInvalidOwner\",\n \"inputs\": [\n {\n \"name\": \"owner\",\n \"type\": \"address\",\n \"internalType\": \"address\"\n }\n ]\n },\n {\n \"type\": \"error\",\n \"name\": \"OwnableUnauthorizedAccount\",\n \"inputs\": [\n {\n \"name\": \"account\",\n \"type\": \"address\",\n \"internalType\": \"address\"\n }\n ]\n },\n {\n \"type\": \"error\",\n \"name\": \"PositionIsLocked\",\n \"inputs\": [\n {\n \"name\": \"tokenId\",\n \"type\": \"uint256\",\n \"internalType\": \"uint256\"\n }\n ]\n },\n {\n \"type\": \"error\",\n \"name\": \"ReentrancyGuardReentrantCall\",\n \"inputs\": []\n },\n {\n \"type\": \"error\",\n \"name\": \"RenounceDisabled\",\n \"inputs\": []\n },\n {\n \"type\": \"error\",\n \"name\": \"SafeERC20FailedOperation\",\n \"inputs\": [\n {\n \"name\": \"token\",\n \"type\": \"address\",\n \"internalType\": \"address\"\n }\n ]\n },\n {\n \"type\": \"error\",\n \"name\": \"StillLocked\",\n \"inputs\": [\n {\n \"name\": \"tokenId\",\n \"type\": \"uint256\",\n \"internalType\": \"uint256\"\n },\n {\n \"name\": \"unlockAt\",\n \"type\": \"uint48\",\n \"internalType\": \"uint48\"\n }\n ]\n },\n {\n \"type\": \"error\",\n \"name\": \"ZeroAddress\",\n \"inputs\": []\n },\n {\n \"type\": \"event\",\n \"name\": \"ERC20Rescued\",\n \"inputs\": [\n {\n \"name\": \"token\",\n \"type\": \"address\",\n \"indexed\": true,\n \"internalType\": \"address\"\n },\n {\n \"name\": \"to\",\n \"type\": \"address\",\n \"indexed\": true,\n \"internalType\": \"address\"\n },\n {\n \"name\": \"amount\",\n \"type\": \"uint256\",\n \"indexed\": false,\n \"internalType\": \"uint256\"\n }\n ],\n \"anonymous\": false\n },\n {\n \"type\": \"event\",\n \"name\": \"FeeChanged\",\n \"inputs\": [\n {\n \"name\": \"previousWei\",\n \"type\": \"uint256\",\n \"indexed\": false,\n \"internalType\": \"uint256\"\n },\n {\n \"name\": \"newWei\",\n \"type\": \"uint256\",\n \"indexed\": false,\n \"internalType\": \"uint256\"\n }\n ],\n \"anonymous\": false\n },\n {\n \"type\": \"event\",\n \"name\": \"FeeIncreaseScheduled\",\n \"inputs\": [\n {\n \"name\": \"currentWei\",\n \"type\": \"uint256\",\n \"indexed\": false,\n \"internalType\": \"uint256\"\n },\n {\n \"name\": \"newWei\",\n \"type\": \"uint256\",\n \"indexed\": false,\n \"internalType\": \"uint256\"\n },\n {\n \"name\": \"effectiveAt\",\n \"type\": \"uint64\",\n \"indexed\": false,\n \"internalType\": \"uint64\"\n }\n ],\n \"anonymous\": false\n },\n {\n \"type\": \"event\",\n \"name\": \"FeePaid\",\n \"inputs\": [\n {\n \"name\": \"payer\",\n \"type\": \"address\",\n \"indexed\": true,\n \"internalType\": \"address\"\n },\n {\n \"name\": \"feeWei\",\n \"type\": \"uint256\",\n \"indexed\": false,\n \"internalType\": \"uint256\"\n }\n ],\n \"anonymous\": false\n },\n {\n \"type\": \"event\",\n \"name\": \"FeesCollected\",\n \"inputs\": [\n {\n \"name\": \"tokenId\",\n \"type\": \"uint256\",\n \"indexed\": true,\n \"internalType\": \"uint256\"\n },\n {\n \"name\": \"to\",\n \"type\": \"address\",\n \"indexed\": true,\n \"internalType\": \"address\"\n }\n ],\n \"anonymous\": false\n },\n {\n \"type\": \"event\",\n \"name\": \"LockExtended\",\n \"inputs\": [\n {\n \"name\": \"tokenId\",\n \"type\": \"uint256\",\n \"indexed\": true,\n \"internalType\": \"uint256\"\n },\n {\n \"name\": \"previousUnlockAt\",\n \"type\": \"uint48\",\n \"indexed\": false,\n \"internalType\": \"uint48\"\n },\n {\n \"name\": \"newUnlockAt\",\n \"type\": \"uint48\",\n \"indexed\": false,\n \"internalType\": \"uint48\"\n }\n ],\n \"anonymous\": false\n },\n {\n \"type\": \"event\",\n \"name\": \"LockOwnerTransferStarted\",\n \"inputs\": [\n {\n \"name\": \"tokenId\",\n \"type\": \"uint256\",\n \"indexed\": true,\n \"internalType\": \"uint256\"\n },\n {\n \"name\": \"owner\",\n \"type\": \"address\",\n \"indexed\": true,\n \"internalType\": \"address\"\n },\n {\n \"name\": \"newOwner\",\n \"type\": \"address\",\n \"indexed\": true,\n \"internalType\": \"address\"\n }\n ],\n \"anonymous\": false\n },\n {\n \"type\": \"event\",\n \"name\": \"LockOwnerTransferred\",\n \"inputs\": [\n {\n \"name\": \"tokenId\",\n \"type\": \"uint256\",\n \"indexed\": true,\n \"internalType\": \"uint256\"\n },\n {\n \"name\": \"previousOwner\",\n \"type\": \"address\",\n \"indexed\": true,\n \"internalType\": \"address\"\n },\n {\n \"name\": \"newOwner\",\n \"type\": \"address\",\n \"indexed\": true,\n \"internalType\": \"address\"\n }\n ],\n \"anonymous\": false\n },\n {\n \"type\": \"event\",\n \"name\": \"OwnershipTransferStarted\",\n \"inputs\": [\n {\n \"name\": \"previousOwner\",\n \"type\": \"address\",\n \"indexed\": true,\n \"internalType\": \"address\"\n },\n {\n \"name\": \"newOwner\",\n \"type\": \"address\",\n \"indexed\": true,\n \"internalType\": \"address\"\n }\n ],\n \"anonymous\": false\n },\n {\n \"type\": \"event\",\n \"name\": \"OwnershipTransferred\",\n \"inputs\": [\n {\n \"name\": \"previousOwner\",\n \"type\": \"address\",\n \"indexed\": true,\n \"internalType\": \"address\"\n },\n {\n \"name\": \"newOwner\",\n \"type\": \"address\",\n \"indexed\": true,\n \"internalType\": \"address\"\n }\n ],\n \"anonymous\": false\n },\n {\n \"type\": \"event\",\n \"name\": \"PendingFeeCancelled\",\n \"inputs\": [\n {\n \"name\": \"cancelledWei\",\n \"type\": \"uint256\",\n \"indexed\": false,\n \"internalType\": \"uint256\"\n },\n {\n \"name\": \"effectiveAt\",\n \"type\": \"uint64\",\n \"indexed\": false,\n \"internalType\": \"uint64\"\n }\n ],\n \"anonymous\": false\n },\n {\n \"type\": \"event\",\n \"name\": \"PositionLocked\",\n \"inputs\": [\n {\n \"name\": \"tokenId\",\n \"type\": \"uint256\",\n \"indexed\": true,\n \"internalType\": \"uint256\"\n },\n {\n \"name\": \"poolId\",\n \"type\": \"bytes32\",\n \"indexed\": true,\n \"internalType\": \"PoolId\"\n },\n {\n \"name\": \"owner\",\n \"type\": \"address\",\n \"indexed\": true,\n \"internalType\": \"address\"\n },\n {\n \"name\": \"unlockAt\",\n \"type\": \"uint48\",\n \"indexed\": false,\n \"internalType\": \"uint48\"\n },\n {\n \"name\": \"liquidity\",\n \"type\": \"uint128\",\n \"indexed\": false,\n \"internalType\": \"uint128\"\n },\n {\n \"name\": \"locker\",\n \"type\": \"address\",\n \"indexed\": false,\n \"internalType\": \"address\"\n }\n ],\n \"anonymous\": false\n },\n {\n \"type\": \"event\",\n \"name\": \"PositionRescued\",\n \"inputs\": [\n {\n \"name\": \"tokenId\",\n \"type\": \"uint256\",\n \"indexed\": true,\n \"internalType\": \"uint256\"\n },\n {\n \"name\": \"to\",\n \"type\": \"address\",\n \"indexed\": true,\n \"internalType\": \"address\"\n }\n ],\n \"anonymous\": false\n },\n {\n \"type\": \"event\",\n \"name\": \"PositionWithdrawn\",\n \"inputs\": [\n {\n \"name\": \"tokenId\",\n \"type\": \"uint256\",\n \"indexed\": true,\n \"internalType\": \"uint256\"\n },\n {\n \"name\": \"to\",\n \"type\": \"address\",\n \"indexed\": true,\n \"internalType\": \"address\"\n }\n ],\n \"anonymous\": false\n },\n {\n \"type\": \"event\",\n \"name\": \"ProtocolFeesFlushed\",\n \"inputs\": [\n {\n \"name\": \"to\",\n \"type\": \"address\",\n \"indexed\": true,\n \"internalType\": \"address\"\n },\n {\n \"name\": \"amount\",\n \"type\": \"uint256\",\n \"indexed\": false,\n \"internalType\": \"uint256\"\n },\n {\n \"name\": \"owed\",\n \"type\": \"uint256\",\n \"indexed\": false,\n \"internalType\": \"uint256\"\n }\n ],\n \"anonymous\": false\n },\n {\n \"type\": \"function\",\n \"name\": \"MAX_FEE_NOTICE_SECONDS\",\n \"inputs\": [],\n \"outputs\": [\n {\n \"name\": \"\",\n \"type\": \"uint32\",\n \"internalType\": \"uint32\"\n }\n ],\n \"stateMutability\": \"view\"\n },\n {\n \"type\": \"function\",\n \"name\": \"MAX_LOCK_SECONDS\",\n \"inputs\": [],\n \"outputs\": [\n {\n \"name\": \"\",\n \"type\": \"uint256\",\n \"internalType\": \"uint256\"\n }\n ],\n \"stateMutability\": \"view\"\n },\n {\n \"type\": \"function\",\n \"name\": \"MIN_FEE_NOTICE_SECONDS\",\n \"inputs\": [],\n \"outputs\": [\n {\n \"name\": \"\",\n \"type\": \"uint32\",\n \"internalType\": \"uint32\"\n }\n ],\n \"stateMutability\": \"view\"\n },\n {\n \"type\": \"function\",\n \"name\": \"acceptLockOwner\",\n \"inputs\": [\n {\n \"name\": \"tokenId\",\n \"type\": \"uint256\",\n \"internalType\": \"uint256\"\n }\n ],\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\"\n },\n {\n \"type\": \"function\",\n \"name\": \"acceptOwnership\",\n \"inputs\": [],\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\"\n },\n {\n \"type\": \"function\",\n \"name\": \"cancelPendingFee\",\n \"inputs\": [],\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\"\n },\n {\n \"type\": \"function\",\n \"name\": \"collectFees\",\n \"inputs\": [\n {\n \"name\": \"tokenId\",\n \"type\": \"uint256\",\n \"internalType\": \"uint256\"\n }\n ],\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\"\n },\n {\n \"type\": \"function\",\n \"name\": \"extend\",\n \"inputs\": [\n {\n \"name\": \"tokenId\",\n \"type\": \"uint256\",\n \"internalType\": \"uint256\"\n },\n {\n \"name\": \"newUnlockAt\",\n \"type\": \"uint48\",\n \"internalType\": \"uint48\"\n }\n ],\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\"\n },\n {\n \"type\": \"function\",\n \"name\": \"feeNoticeSeconds\",\n \"inputs\": [],\n \"outputs\": [\n {\n \"name\": \"\",\n \"type\": \"uint32\",\n \"internalType\": \"uint32\"\n }\n ],\n \"stateMutability\": \"view\"\n },\n {\n \"type\": \"function\",\n \"name\": \"feeWei\",\n \"inputs\": [],\n \"outputs\": [\n {\n \"name\": \"\",\n \"type\": \"uint256\",\n \"internalType\": \"uint256\"\n }\n ],\n \"stateMutability\": \"view\"\n },\n {\n \"type\": \"function\",\n \"name\": \"flushProtocolFees\",\n \"inputs\": [],\n \"outputs\": [\n {\n \"name\": \"amount\",\n \"type\": \"uint256\",\n \"internalType\": \"uint256\"\n }\n ],\n \"stateMutability\": \"nonpayable\"\n },\n {\n \"type\": \"function\",\n \"name\": \"getLock\",\n \"inputs\": [\n {\n \"name\": \"tokenId\",\n \"type\": \"uint256\",\n \"internalType\": \"uint256\"\n }\n ],\n \"outputs\": [\n {\n \"name\": \"\",\n \"type\": \"tuple\",\n \"internalType\": \"struct LatchPositionLock.PositionLock\",\n \"components\": [\n {\n \"name\": \"owner\",\n \"type\": \"address\",\n \"internalType\": \"address\"\n },\n {\n \"name\": \"lockedAt\",\n \"type\": \"uint48\",\n \"internalType\": \"uint48\"\n },\n {\n \"name\": \"unlockAt\",\n \"type\": \"uint48\",\n \"internalType\": \"uint48\"\n },\n {\n \"name\": \"pendingOwner\",\n \"type\": \"address\",\n \"internalType\": \"address\"\n },\n {\n \"name\": \"poolId\",\n \"type\": \"bytes32\",\n \"internalType\": \"PoolId\"\n },\n {\n \"name\": \"currency0\",\n \"type\": \"address\",\n \"internalType\": \"Currency\"\n },\n {\n \"name\": \"currency1\",\n \"type\": \"address\",\n \"internalType\": \"Currency\"\n },\n {\n \"name\": \"withdrawn\",\n \"type\": \"bool\",\n \"internalType\": \"bool\"\n }\n ]\n }\n ],\n \"stateMutability\": \"view\"\n },\n {\n \"type\": \"function\",\n \"name\": \"isLocked\",\n \"inputs\": [\n {\n \"name\": \"tokenId\",\n \"type\": \"uint256\",\n \"internalType\": \"uint256\"\n }\n ],\n \"outputs\": [\n {\n \"name\": \"\",\n \"type\": \"bool\",\n \"internalType\": \"bool\"\n }\n ],\n \"stateMutability\": \"view\"\n },\n {\n \"type\": \"function\",\n \"name\": \"lock\",\n \"inputs\": [\n {\n \"name\": \"tokenId\",\n \"type\": \"uint256\",\n \"internalType\": \"uint256\"\n },\n {\n \"name\": \"unlockAt\",\n \"type\": \"uint48\",\n \"internalType\": \"uint48\"\n },\n {\n \"name\": \"owner\",\n \"type\": \"address\",\n \"internalType\": \"address\"\n }\n ],\n \"outputs\": [],\n \"stateMutability\": \"payable\"\n },\n {\n \"type\": \"function\",\n \"name\": \"lockCount\",\n \"inputs\": [],\n \"outputs\": [\n {\n \"name\": \"\",\n \"type\": \"uint256\",\n \"internalType\": \"uint256\"\n }\n ],\n \"stateMutability\": \"view\"\n },\n {\n \"type\": \"function\",\n \"name\": \"lockIds\",\n \"inputs\": [\n {\n \"name\": \"start\",\n \"type\": \"uint256\",\n \"internalType\": \"uint256\"\n },\n {\n \"name\": \"end\",\n \"type\": \"uint256\",\n \"internalType\": \"uint256\"\n }\n ],\n \"outputs\": [\n {\n \"name\": \"page\",\n \"type\": \"uint256[]\",\n \"internalType\": \"uint256[]\"\n }\n ],\n \"stateMutability\": \"view\"\n },\n {\n \"type\": \"function\",\n \"name\": \"maxFeeWei\",\n \"inputs\": [],\n \"outputs\": [\n {\n \"name\": \"\",\n \"type\": \"uint256\",\n \"internalType\": \"uint256\"\n }\n ],\n \"stateMutability\": \"view\"\n },\n {\n \"type\": \"function\",\n \"name\": \"owner\",\n \"inputs\": [],\n \"outputs\": [\n {\n \"name\": \"\",\n \"type\": \"address\",\n \"internalType\": \"address\"\n }\n ],\n \"stateMutability\": \"view\"\n },\n {\n \"type\": \"function\",\n \"name\": \"pendingFee\",\n \"inputs\": [],\n \"outputs\": [\n {\n \"name\": \"newFeeWei\",\n \"type\": \"uint256\",\n \"internalType\": \"uint256\"\n },\n {\n \"name\": \"effectiveAt\",\n \"type\": \"uint64\",\n \"internalType\": \"uint64\"\n }\n ],\n \"stateMutability\": \"view\"\n },\n {\n \"type\": \"function\",\n \"name\": \"pendingOwner\",\n \"inputs\": [],\n \"outputs\": [\n {\n \"name\": \"\",\n \"type\": \"address\",\n \"internalType\": \"address\"\n }\n ],\n \"stateMutability\": \"view\"\n },\n {\n \"type\": \"function\",\n \"name\": \"poolLockCount\",\n \"inputs\": [\n {\n \"name\": \"poolId\",\n \"type\": \"bytes32\",\n \"internalType\": \"PoolId\"\n }\n ],\n \"outputs\": [\n {\n \"name\": \"\",\n \"type\": \"uint256\",\n \"internalType\": \"uint256\"\n }\n ],\n \"stateMutability\": \"view\"\n },\n {\n \"type\": \"function\",\n \"name\": \"poolLockIds\",\n \"inputs\": [\n {\n \"name\": \"poolId\",\n \"type\": \"bytes32\",\n \"internalType\": \"PoolId\"\n },\n {\n \"name\": \"start\",\n \"type\": \"uint256\",\n \"internalType\": \"uint256\"\n },\n {\n \"name\": \"end\",\n \"type\": \"uint256\",\n \"internalType\": \"uint256\"\n }\n ],\n \"outputs\": [\n {\n \"name\": \"page\",\n \"type\": \"uint256[]\",\n \"internalType\": \"uint256[]\"\n }\n ],\n \"stateMutability\": \"view\"\n },\n {\n \"type\": \"function\",\n \"name\": \"positionManager\",\n \"inputs\": [],\n \"outputs\": [\n {\n \"name\": \"\",\n \"type\": \"address\",\n \"internalType\": \"contract ICLPositionManager\"\n }\n ],\n \"stateMutability\": \"view\"\n },\n {\n \"type\": \"function\",\n \"name\": \"protocolFeeRecipient\",\n \"inputs\": [],\n \"outputs\": [\n {\n \"name\": \"\",\n \"type\": \"address\",\n \"internalType\": \"address\"\n }\n ],\n \"stateMutability\": \"view\"\n },\n {\n \"type\": \"function\",\n \"name\": \"protocolFeesOwed\",\n \"inputs\": [],\n \"outputs\": [\n {\n \"name\": \"\",\n \"type\": \"uint256\",\n \"internalType\": \"uint256\"\n }\n ],\n \"stateMutability\": \"view\"\n },\n {\n \"type\": \"function\",\n \"name\": \"renounceOwnership\",\n \"inputs\": [],\n \"outputs\": [],\n \"stateMutability\": \"pure\"\n },\n {\n \"type\": \"function\",\n \"name\": \"rescueERC20\",\n \"inputs\": [\n {\n \"name\": \"token\",\n \"type\": \"address\",\n \"internalType\": \"address\"\n },\n {\n \"name\": \"to\",\n \"type\": \"address\",\n \"internalType\": \"address\"\n }\n ],\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\"\n },\n {\n \"type\": \"function\",\n \"name\": \"rescuePosition\",\n \"inputs\": [\n {\n \"name\": \"tokenId\",\n \"type\": \"uint256\",\n \"internalType\": \"uint256\"\n },\n {\n \"name\": \"to\",\n \"type\": \"address\",\n \"internalType\": \"address\"\n }\n ],\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\"\n },\n {\n \"type\": \"function\",\n \"name\": \"setFee\",\n \"inputs\": [\n {\n \"name\": \"newFeeWei\",\n \"type\": \"uint256\",\n \"internalType\": \"uint256\"\n }\n ],\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\"\n },\n {\n \"type\": \"function\",\n \"name\": \"transferLockOwner\",\n \"inputs\": [\n {\n \"name\": \"tokenId\",\n \"type\": \"uint256\",\n \"internalType\": \"uint256\"\n },\n {\n \"name\": \"newOwner\",\n \"type\": \"address\",\n \"internalType\": \"address\"\n }\n ],\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\"\n },\n {\n \"type\": \"function\",\n \"name\": \"transferOwnership\",\n \"inputs\": [\n {\n \"name\": \"newOwner\",\n \"type\": \"address\",\n \"internalType\": \"address\"\n }\n ],\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\"\n },\n {\n \"type\": \"function\",\n \"name\": \"withdraw\",\n \"inputs\": [\n {\n \"name\": \"tokenId\",\n \"type\": \"uint256\",\n \"internalType\": \"uint256\"\n },\n {\n \"name\": \"to\",\n \"type\": \"address\",\n \"internalType\": \"address\"\n }\n ],\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\"\n }\n];\n/**\n * `LatchTokenLock` - ERC-20 / native time-locks and cliff + linear vesting with a fixed schedule; two-step beneficiary; flat native fee per lock (`LatchFeeGate`).\n *\n * 25 errors, 12 events, 30 functions - curated from the compiled artifact, not the full ABI.\n */\nexport const LATCH_TOKEN_LOCK_ABI = [\n {\n \"type\": \"error\",\n \"name\": \"AddressEmptyCode\",\n \"inputs\": [\n {\n \"name\": \"target\",\n \"type\": \"address\",\n \"internalType\": \"address\"\n }\n ]\n },\n {\n \"type\": \"error\",\n \"name\": \"AddressInsufficientBalance\",\n \"inputs\": [\n {\n \"name\": \"account\",\n \"type\": \"address\",\n \"internalType\": \"address\"\n }\n ]\n },\n {\n \"type\": \"error\",\n \"name\": \"FailedInnerCall\",\n \"inputs\": []\n },\n {\n \"type\": \"error\",\n \"name\": \"FeeAboveCap\",\n \"inputs\": [\n {\n \"name\": \"feeWei\",\n \"type\": \"uint256\",\n \"internalType\": \"uint256\"\n },\n {\n \"name\": \"capWei\",\n \"type\": \"uint256\",\n \"internalType\": \"uint256\"\n }\n ]\n },\n {\n \"type\": \"error\",\n \"name\": \"InsufficientFee\",\n \"inputs\": [\n {\n \"name\": \"required\",\n \"type\": \"uint256\",\n \"internalType\": \"uint256\"\n },\n {\n \"name\": \"sent\",\n \"type\": \"uint256\",\n \"internalType\": \"uint256\"\n }\n ]\n },\n {\n \"type\": \"error\",\n \"name\": \"InvalidBeneficiary\",\n \"inputs\": [\n {\n \"name\": \"beneficiary\",\n \"type\": \"address\",\n \"internalType\": \"address\"\n }\n ]\n },\n {\n \"type\": \"error\",\n \"name\": \"InvalidNotice\",\n \"inputs\": [\n {\n \"name\": \"noticeSeconds\",\n \"type\": \"uint32\",\n \"internalType\": \"uint32\"\n }\n ]\n },\n {\n \"type\": \"error\",\n \"name\": \"InvalidSchedule\",\n \"inputs\": [\n {\n \"name\": \"start\",\n \"type\": \"uint48\",\n \"internalType\": \"uint48\"\n },\n {\n \"name\": \"cliff\",\n \"type\": \"uint48\",\n \"internalType\": \"uint48\"\n },\n {\n \"name\": \"end\",\n \"type\": \"uint48\",\n \"internalType\": \"uint48\"\n }\n ]\n },\n {\n \"type\": \"error\",\n \"name\": \"MathOverflowedMulDiv\",\n \"inputs\": []\n },\n {\n \"type\": \"error\",\n \"name\": \"NativeTransferFailed\",\n \"inputs\": [\n {\n \"name\": \"to\",\n \"type\": \"address\",\n \"internalType\": \"address\"\n },\n {\n \"name\": \"amount\",\n \"type\": \"uint256\",\n \"internalType\": \"uint256\"\n }\n ]\n },\n {\n \"type\": \"error\",\n \"name\": \"NativeValueMismatch\",\n \"inputs\": [\n {\n \"name\": \"expected\",\n \"type\": \"uint256\",\n \"internalType\": \"uint256\"\n },\n {\n \"name\": \"sent\",\n \"type\": \"uint256\",\n \"internalType\": \"uint256\"\n }\n ]\n },\n {\n \"type\": \"error\",\n \"name\": \"NoPendingFee\",\n \"inputs\": []\n },\n {\n \"type\": \"error\",\n \"name\": \"NoSuchLock\",\n \"inputs\": [\n {\n \"name\": \"lockId\",\n \"type\": \"uint256\",\n \"internalType\": \"uint256\"\n }\n ]\n },\n {\n \"type\": \"error\",\n \"name\": \"NotBeneficiary\",\n \"inputs\": [\n {\n \"name\": \"lockId\",\n \"type\": \"uint256\",\n \"internalType\": \"uint256\"\n },\n {\n \"name\": \"caller\",\n \"type\": \"address\",\n \"internalType\": \"address\"\n }\n ]\n },\n {\n \"type\": \"error\",\n \"name\": \"NotPendingBeneficiary\",\n \"inputs\": [\n {\n \"name\": \"lockId\",\n \"type\": \"uint256\",\n \"internalType\": \"uint256\"\n },\n {\n \"name\": \"caller\",\n \"type\": \"address\",\n \"internalType\": \"address\"\n }\n ]\n },\n {\n \"type\": \"error\",\n \"name\": \"NothingToClaim\",\n \"inputs\": [\n {\n \"name\": \"lockId\",\n \"type\": \"uint256\",\n \"internalType\": \"uint256\"\n }\n ]\n },\n {\n \"type\": \"error\",\n \"name\": \"NothingToFlush\",\n \"inputs\": []\n },\n {\n \"type\": \"error\",\n \"name\": \"NothingToRescue\",\n \"inputs\": [\n {\n \"name\": \"currency\",\n \"type\": \"address\",\n \"internalType\": \"Currency\"\n }\n ]\n },\n {\n \"type\": \"error\",\n \"name\": \"OwnableInvalidOwner\",\n \"inputs\": [\n {\n \"name\": \"owner\",\n \"type\": \"address\",\n \"internalType\": \"address\"\n }\n ]\n },\n {\n \"type\": \"error\",\n \"name\": \"OwnableUnauthorizedAccount\",\n \"inputs\": [\n {\n \"name\": \"account\",\n \"type\": \"address\",\n \"internalType\": \"address\"\n }\n ]\n },\n {\n \"type\": \"error\",\n \"name\": \"ReentrancyGuardReentrantCall\",\n \"inputs\": []\n },\n {\n \"type\": \"error\",\n \"name\": \"RenounceDisabled\",\n \"inputs\": []\n },\n {\n \"type\": \"error\",\n \"name\": \"SafeERC20FailedOperation\",\n \"inputs\": [\n {\n \"name\": \"token\",\n \"type\": \"address\",\n \"internalType\": \"address\"\n }\n ]\n },\n {\n \"type\": \"error\",\n \"name\": \"ZeroAddress\",\n \"inputs\": []\n },\n {\n \"type\": \"error\",\n \"name\": \"ZeroAmount\",\n \"inputs\": []\n },\n {\n \"type\": \"event\",\n \"name\": \"BeneficiaryTransferStarted\",\n \"inputs\": [\n {\n \"name\": \"lockId\",\n \"type\": \"uint256\",\n \"indexed\": true,\n \"internalType\": \"uint256\"\n },\n {\n \"name\": \"beneficiary\",\n \"type\": \"address\",\n \"indexed\": true,\n \"internalType\": \"address\"\n },\n {\n \"name\": \"newBeneficiary\",\n \"type\": \"address\",\n \"indexed\": true,\n \"internalType\": \"address\"\n }\n ],\n \"anonymous\": false\n },\n {\n \"type\": \"event\",\n \"name\": \"BeneficiaryTransferred\",\n \"inputs\": [\n {\n \"name\": \"lockId\",\n \"type\": \"uint256\",\n \"indexed\": true,\n \"internalType\": \"uint256\"\n },\n {\n \"name\": \"previous\",\n \"type\": \"address\",\n \"indexed\": true,\n \"internalType\": \"address\"\n },\n {\n \"name\": \"newBeneficiary\",\n \"type\": \"address\",\n \"indexed\": true,\n \"internalType\": \"address\"\n }\n ],\n \"anonymous\": false\n },\n {\n \"type\": \"event\",\n \"name\": \"Claimed\",\n \"inputs\": [\n {\n \"name\": \"lockId\",\n \"type\": \"uint256\",\n \"indexed\": true,\n \"internalType\": \"uint256\"\n },\n {\n \"name\": \"beneficiary\",\n \"type\": \"address\",\n \"indexed\": true,\n \"internalType\": \"address\"\n },\n {\n \"name\": \"to\",\n \"type\": \"address\",\n \"indexed\": false,\n \"internalType\": \"address\"\n },\n {\n \"name\": \"amount\",\n \"type\": \"uint256\",\n \"indexed\": false,\n \"internalType\": \"uint256\"\n }\n ],\n \"anonymous\": false\n },\n {\n \"type\": \"event\",\n \"name\": \"FeeChanged\",\n \"inputs\": [\n {\n \"name\": \"previousWei\",\n \"type\": \"uint256\",\n \"indexed\": false,\n \"internalType\": \"uint256\"\n },\n {\n \"name\": \"newWei\",\n \"type\": \"uint256\",\n \"indexed\": false,\n \"internalType\": \"uint256\"\n }\n ],\n \"anonymous\": false\n },\n {\n \"type\": \"event\",\n \"name\": \"FeeIncreaseScheduled\",\n \"inputs\": [\n {\n \"name\": \"currentWei\",\n \"type\": \"uint256\",\n \"indexed\": false,\n \"internalType\": \"uint256\"\n },\n {\n \"name\": \"newWei\",\n \"type\": \"uint256\",\n \"indexed\": false,\n \"internalType\": \"uint256\"\n },\n {\n \"name\": \"effectiveAt\",\n \"type\": \"uint64\",\n \"indexed\": false,\n \"internalType\": \"uint64\"\n }\n ],\n \"anonymous\": false\n },\n {\n \"type\": \"event\",\n \"name\": \"FeePaid\",\n \"inputs\": [\n {\n \"name\": \"payer\",\n \"type\": \"address\",\n \"indexed\": true,\n \"internalType\": \"address\"\n },\n {\n \"name\": \"feeWei\",\n \"type\": \"uint256\",\n \"indexed\": false,\n \"internalType\": \"uint256\"\n }\n ],\n \"anonymous\": false\n },\n {\n \"type\": \"event\",\n \"name\": \"Locked\",\n \"inputs\": [\n {\n \"name\": \"lockId\",\n \"type\": \"uint256\",\n \"indexed\": true,\n \"internalType\": \"uint256\"\n },\n {\n \"name\": \"currency\",\n \"type\": \"address\",\n \"indexed\": true,\n \"internalType\": \"Currency\"\n },\n {\n \"name\": \"beneficiary\",\n \"type\": \"address\",\n \"indexed\": true,\n \"internalType\": \"address\"\n },\n {\n \"name\": \"amount\",\n \"type\": \"uint256\",\n \"indexed\": false,\n \"internalType\": \"uint256\"\n },\n {\n \"name\": \"start\",\n \"type\": \"uint48\",\n \"indexed\": false,\n \"internalType\": \"uint48\"\n },\n {\n \"name\": \"cliff\",\n \"type\": \"uint48\",\n \"indexed\": false,\n \"internalType\": \"uint48\"\n },\n {\n \"name\": \"end\",\n \"type\": \"uint48\",\n \"indexed\": false,\n \"internalType\": \"uint48\"\n },\n {\n \"name\": \"creator\",\n \"type\": \"address\",\n \"indexed\": false,\n \"internalType\": \"address\"\n }\n ],\n \"anonymous\": false\n },\n {\n \"type\": \"event\",\n \"name\": \"OwnershipTransferStarted\",\n \"inputs\": [\n {\n \"name\": \"previousOwner\",\n \"type\": \"address\",\n \"indexed\": true,\n \"internalType\": \"address\"\n },\n {\n \"name\": \"newOwner\",\n \"type\": \"address\",\n \"indexed\": true,\n \"internalType\": \"address\"\n }\n ],\n \"anonymous\": false\n },\n {\n \"type\": \"event\",\n \"name\": \"OwnershipTransferred\",\n \"inputs\": [\n {\n \"name\": \"previousOwner\",\n \"type\": \"address\",\n \"indexed\": true,\n \"internalType\": \"address\"\n },\n {\n \"name\": \"newOwner\",\n \"type\": \"address\",\n \"indexed\": true,\n \"internalType\": \"address\"\n }\n ],\n \"anonymous\": false\n },\n {\n \"type\": \"event\",\n \"name\": \"PendingFeeCancelled\",\n \"inputs\": [\n {\n \"name\": \"cancelledWei\",\n \"type\": \"uint256\",\n \"indexed\": false,\n \"internalType\": \"uint256\"\n },\n {\n \"name\": \"effectiveAt\",\n \"type\": \"uint64\",\n \"indexed\": false,\n \"internalType\": \"uint64\"\n }\n ],\n \"anonymous\": false\n },\n {\n \"type\": \"event\",\n \"name\": \"ProtocolFeesFlushed\",\n \"inputs\": [\n {\n \"name\": \"to\",\n \"type\": \"address\",\n \"indexed\": true,\n \"internalType\": \"address\"\n },\n {\n \"name\": \"amount\",\n \"type\": \"uint256\",\n \"indexed\": false,\n \"internalType\": \"uint256\"\n },\n {\n \"name\": \"owed\",\n \"type\": \"uint256\",\n \"indexed\": false,\n \"internalType\": \"uint256\"\n }\n ],\n \"anonymous\": false\n },\n {\n \"type\": \"event\",\n \"name\": \"SurplusRescued\",\n \"inputs\": [\n {\n \"name\": \"currency\",\n \"type\": \"address\",\n \"indexed\": true,\n \"internalType\": \"Currency\"\n },\n {\n \"name\": \"to\",\n \"type\": \"address\",\n \"indexed\": true,\n \"internalType\": \"address\"\n },\n {\n \"name\": \"amount\",\n \"type\": \"uint256\",\n \"indexed\": false,\n \"internalType\": \"uint256\"\n }\n ],\n \"anonymous\": false\n },\n {\n \"type\": \"function\",\n \"name\": \"MAX_FEE_NOTICE_SECONDS\",\n \"inputs\": [],\n \"outputs\": [\n {\n \"name\": \"\",\n \"type\": \"uint32\",\n \"internalType\": \"uint32\"\n }\n ],\n \"stateMutability\": \"view\"\n },\n {\n \"type\": \"function\",\n \"name\": \"MAX_LOCK_SECONDS\",\n \"inputs\": [],\n \"outputs\": [\n {\n \"name\": \"\",\n \"type\": \"uint256\",\n \"internalType\": \"uint256\"\n }\n ],\n \"stateMutability\": \"view\"\n },\n {\n \"type\": \"function\",\n \"name\": \"MIN_FEE_NOTICE_SECONDS\",\n \"inputs\": [],\n \"outputs\": [\n {\n \"name\": \"\",\n \"type\": \"uint32\",\n \"internalType\": \"uint32\"\n }\n ],\n \"stateMutability\": \"view\"\n },\n {\n \"type\": \"function\",\n \"name\": \"acceptBeneficiary\",\n \"inputs\": [\n {\n \"name\": \"lockId\",\n \"type\": \"uint256\",\n \"internalType\": \"uint256\"\n }\n ],\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\"\n },\n {\n \"type\": \"function\",\n \"name\": \"acceptOwnership\",\n \"inputs\": [],\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\"\n },\n {\n \"type\": \"function\",\n \"name\": \"beneficiaryLockIds\",\n \"inputs\": [\n {\n \"name\": \"account\",\n \"type\": \"address\",\n \"internalType\": \"address\"\n },\n {\n \"name\": \"start\",\n \"type\": \"uint256\",\n \"internalType\": \"uint256\"\n },\n {\n \"name\": \"end\",\n \"type\": \"uint256\",\n \"internalType\": \"uint256\"\n }\n ],\n \"outputs\": [\n {\n \"name\": \"\",\n \"type\": \"uint256[]\",\n \"internalType\": \"uint256[]\"\n }\n ],\n \"stateMutability\": \"view\"\n },\n {\n \"type\": \"function\",\n \"name\": \"cancelPendingFee\",\n \"inputs\": [],\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\"\n },\n {\n \"type\": \"function\",\n \"name\": \"claim\",\n \"inputs\": [\n {\n \"name\": \"lockId\",\n \"type\": \"uint256\",\n \"internalType\": \"uint256\"\n },\n {\n \"name\": \"to\",\n \"type\": \"address\",\n \"internalType\": \"address\"\n }\n ],\n \"outputs\": [\n {\n \"name\": \"amount\",\n \"type\": \"uint256\",\n \"internalType\": \"uint256\"\n }\n ],\n \"stateMutability\": \"nonpayable\"\n },\n {\n \"type\": \"function\",\n \"name\": \"claimable\",\n \"inputs\": [\n {\n \"name\": \"lockId\",\n \"type\": \"uint256\",\n \"internalType\": \"uint256\"\n }\n ],\n \"outputs\": [\n {\n \"name\": \"\",\n \"type\": \"uint256\",\n \"internalType\": \"uint256\"\n }\n ],\n \"stateMutability\": \"view\"\n },\n {\n \"type\": \"function\",\n \"name\": \"currencyLockCount\",\n \"inputs\": [\n {\n \"name\": \"currency\",\n \"type\": \"address\",\n \"internalType\": \"Currency\"\n }\n ],\n \"outputs\": [\n {\n \"name\": \"\",\n \"type\": \"uint256\",\n \"internalType\": \"uint256\"\n }\n ],\n \"stateMutability\": \"view\"\n },\n {\n \"type\": \"function\",\n \"name\": \"currencyLockIds\",\n \"inputs\": [\n {\n \"name\": \"currency\",\n \"type\": \"address\",\n \"internalType\": \"Currency\"\n },\n {\n \"name\": \"start\",\n \"type\": \"uint256\",\n \"internalType\": \"uint256\"\n },\n {\n \"name\": \"end\",\n \"type\": \"uint256\",\n \"internalType\": \"uint256\"\n }\n ],\n \"outputs\": [\n {\n \"name\": \"\",\n \"type\": \"uint256[]\",\n \"internalType\": \"uint256[]\"\n }\n ],\n \"stateMutability\": \"view\"\n },\n {\n \"type\": \"function\",\n \"name\": \"feeNoticeSeconds\",\n \"inputs\": [],\n \"outputs\": [\n {\n \"name\": \"\",\n \"type\": \"uint32\",\n \"internalType\": \"uint32\"\n }\n ],\n \"stateMutability\": \"view\"\n },\n {\n \"type\": \"function\",\n \"name\": \"feeWei\",\n \"inputs\": [],\n \"outputs\": [\n {\n \"name\": \"\",\n \"type\": \"uint256\",\n \"internalType\": \"uint256\"\n }\n ],\n \"stateMutability\": \"view\"\n },\n {\n \"type\": \"function\",\n \"name\": \"flushProtocolFees\",\n \"inputs\": [],\n \"outputs\": [\n {\n \"name\": \"amount\",\n \"type\": \"uint256\",\n \"internalType\": \"uint256\"\n }\n ],\n \"stateMutability\": \"nonpayable\"\n },\n {\n \"type\": \"function\",\n \"name\": \"getLock\",\n \"inputs\": [\n {\n \"name\": \"lockId\",\n \"type\": \"uint256\",\n \"internalType\": \"uint256\"\n }\n ],\n \"outputs\": [\n {\n \"name\": \"\",\n \"type\": \"tuple\",\n \"internalType\": \"struct LatchTokenLock.TokenLock\",\n \"components\": [\n {\n \"name\": \"currency\",\n \"type\": \"address\",\n \"internalType\": \"Currency\"\n },\n {\n \"name\": \"beneficiary\",\n \"type\": \"address\",\n \"internalType\": \"address\"\n },\n {\n \"name\": \"start\",\n \"type\": \"uint48\",\n \"internalType\": \"uint48\"\n },\n {\n \"name\": \"cliff\",\n \"type\": \"uint48\",\n \"internalType\": \"uint48\"\n },\n {\n \"name\": \"end\",\n \"type\": \"uint48\",\n \"internalType\": \"uint48\"\n },\n {\n \"name\": \"pendingBeneficiary\",\n \"type\": \"address\",\n \"internalType\": \"address\"\n },\n {\n \"name\": \"amount\",\n \"type\": \"uint256\",\n \"internalType\": \"uint256\"\n },\n {\n \"name\": \"claimed\",\n \"type\": \"uint256\",\n \"internalType\": \"uint256\"\n },\n {\n \"name\": \"creator\",\n \"type\": \"address\",\n \"internalType\": \"address\"\n }\n ]\n }\n ],\n \"stateMutability\": \"view\"\n },\n {\n \"type\": \"function\",\n \"name\": \"lock\",\n \"inputs\": [\n {\n \"name\": \"currency\",\n \"type\": \"address\",\n \"internalType\": \"Currency\"\n },\n {\n \"name\": \"amount\",\n \"type\": \"uint256\",\n \"internalType\": \"uint256\"\n },\n {\n \"name\": \"beneficiary\",\n \"type\": \"address\",\n \"internalType\": \"address\"\n },\n {\n \"name\": \"start\",\n \"type\": \"uint48\",\n \"internalType\": \"uint48\"\n },\n {\n \"name\": \"cliff\",\n \"type\": \"uint48\",\n \"internalType\": \"uint48\"\n },\n {\n \"name\": \"end\",\n \"type\": \"uint48\",\n \"internalType\": \"uint48\"\n }\n ],\n \"outputs\": [\n {\n \"name\": \"lockId\",\n \"type\": \"uint256\",\n \"internalType\": \"uint256\"\n }\n ],\n \"stateMutability\": \"payable\"\n },\n {\n \"type\": \"function\",\n \"name\": \"lockCount\",\n \"inputs\": [],\n \"outputs\": [\n {\n \"name\": \"\",\n \"type\": \"uint256\",\n \"internalType\": \"uint256\"\n }\n ],\n \"stateMutability\": \"view\"\n },\n {\n \"type\": \"function\",\n \"name\": \"maxFeeWei\",\n \"inputs\": [],\n \"outputs\": [\n {\n \"name\": \"\",\n \"type\": \"uint256\",\n \"internalType\": \"uint256\"\n }\n ],\n \"stateMutability\": \"view\"\n },\n {\n \"type\": \"function\",\n \"name\": \"owner\",\n \"inputs\": [],\n \"outputs\": [\n {\n \"name\": \"\",\n \"type\": \"address\",\n \"internalType\": \"address\"\n }\n ],\n \"stateMutability\": \"view\"\n },\n {\n \"type\": \"function\",\n \"name\": \"pendingFee\",\n \"inputs\": [],\n \"outputs\": [\n {\n \"name\": \"newFeeWei\",\n \"type\": \"uint256\",\n \"internalType\": \"uint256\"\n },\n {\n \"name\": \"effectiveAt\",\n \"type\": \"uint64\",\n \"internalType\": \"uint64\"\n }\n ],\n \"stateMutability\": \"view\"\n },\n {\n \"type\": \"function\",\n \"name\": \"pendingOwner\",\n \"inputs\": [],\n \"outputs\": [\n {\n \"name\": \"\",\n \"type\": \"address\",\n \"internalType\": \"address\"\n }\n ],\n \"stateMutability\": \"view\"\n },\n {\n \"type\": \"function\",\n \"name\": \"protocolFeeRecipient\",\n \"inputs\": [],\n \"outputs\": [\n {\n \"name\": \"\",\n \"type\": \"address\",\n \"internalType\": \"address\"\n }\n ],\n \"stateMutability\": \"view\"\n },\n {\n \"type\": \"function\",\n \"name\": \"protocolFeesOwed\",\n \"inputs\": [],\n \"outputs\": [\n {\n \"name\": \"\",\n \"type\": \"uint256\",\n \"internalType\": \"uint256\"\n }\n ],\n \"stateMutability\": \"view\"\n },\n {\n \"type\": \"function\",\n \"name\": \"renounceOwnership\",\n \"inputs\": [],\n \"outputs\": [],\n \"stateMutability\": \"pure\"\n },\n {\n \"type\": \"function\",\n \"name\": \"rescueSurplus\",\n \"inputs\": [\n {\n \"name\": \"currency\",\n \"type\": \"address\",\n \"internalType\": \"Currency\"\n },\n {\n \"name\": \"to\",\n \"type\": \"address\",\n \"internalType\": \"address\"\n }\n ],\n \"outputs\": [\n {\n \"name\": \"amount\",\n \"type\": \"uint256\",\n \"internalType\": \"uint256\"\n }\n ],\n \"stateMutability\": \"nonpayable\"\n },\n {\n \"type\": \"function\",\n \"name\": \"setFee\",\n \"inputs\": [\n {\n \"name\": \"newFeeWei\",\n \"type\": \"uint256\",\n \"internalType\": \"uint256\"\n }\n ],\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\"\n },\n {\n \"type\": \"function\",\n \"name\": \"totalHeld\",\n \"inputs\": [\n {\n \"name\": \"\",\n \"type\": \"address\",\n \"internalType\": \"Currency\"\n }\n ],\n \"outputs\": [\n {\n \"name\": \"\",\n \"type\": \"uint256\",\n \"internalType\": \"uint256\"\n }\n ],\n \"stateMutability\": \"view\"\n },\n {\n \"type\": \"function\",\n \"name\": \"transferBeneficiary\",\n \"inputs\": [\n {\n \"name\": \"lockId\",\n \"type\": \"uint256\",\n \"internalType\": \"uint256\"\n },\n {\n \"name\": \"newBeneficiary\",\n \"type\": \"address\",\n \"internalType\": \"address\"\n }\n ],\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\"\n },\n {\n \"type\": \"function\",\n \"name\": \"transferOwnership\",\n \"inputs\": [\n {\n \"name\": \"newOwner\",\n \"type\": \"address\",\n \"internalType\": \"address\"\n }\n ],\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\"\n },\n {\n \"type\": \"function\",\n \"name\": \"vestedAt\",\n \"inputs\": [\n {\n \"name\": \"lockId\",\n \"type\": \"uint256\",\n \"internalType\": \"uint256\"\n },\n {\n \"name\": \"timestamp\",\n \"type\": \"uint256\",\n \"internalType\": \"uint256\"\n }\n ],\n \"outputs\": [\n {\n \"name\": \"\",\n \"type\": \"uint256\",\n \"internalType\": \"uint256\"\n }\n ],\n \"stateMutability\": \"view\"\n }\n];\n/**\n * `LatchMultisend` - push native or an ERC-20 to up to 1,000 recipients in one atomic call; flat native fee per call (`LatchFeeGate`).\n *\n * 21 errors, 10 events, 20 functions - curated from the compiled artifact, not the full ABI.\n */\nexport const LATCH_MULTISEND_ABI = [\n {\n \"type\": \"error\",\n \"name\": \"AddressEmptyCode\",\n \"inputs\": [\n {\n \"name\": \"target\",\n \"type\": \"address\",\n \"internalType\": \"address\"\n }\n ]\n },\n {\n \"type\": \"error\",\n \"name\": \"AddressInsufficientBalance\",\n \"inputs\": [\n {\n \"name\": \"account\",\n \"type\": \"address\",\n \"internalType\": \"address\"\n }\n ]\n },\n {\n \"type\": \"error\",\n \"name\": \"FailedInnerCall\",\n \"inputs\": []\n },\n {\n \"type\": \"error\",\n \"name\": \"FeeAboveCap\",\n \"inputs\": [\n {\n \"name\": \"feeWei\",\n \"type\": \"uint256\",\n \"internalType\": \"uint256\"\n },\n {\n \"name\": \"capWei\",\n \"type\": \"uint256\",\n \"internalType\": \"uint256\"\n }\n ]\n },\n {\n \"type\": \"error\",\n \"name\": \"InsufficientFee\",\n \"inputs\": [\n {\n \"name\": \"required\",\n \"type\": \"uint256\",\n \"internalType\": \"uint256\"\n },\n {\n \"name\": \"sent\",\n \"type\": \"uint256\",\n \"internalType\": \"uint256\"\n }\n ]\n },\n {\n \"type\": \"error\",\n \"name\": \"InvalidNotice\",\n \"inputs\": [\n {\n \"name\": \"noticeSeconds\",\n \"type\": \"uint32\",\n \"internalType\": \"uint32\"\n }\n ]\n },\n {\n \"type\": \"error\",\n \"name\": \"LengthMismatch\",\n \"inputs\": [\n {\n \"name\": \"recipients\",\n \"type\": \"uint256\",\n \"internalType\": \"uint256\"\n },\n {\n \"name\": \"amounts\",\n \"type\": \"uint256\",\n \"internalType\": \"uint256\"\n }\n ]\n },\n {\n \"type\": \"error\",\n \"name\": \"NativeTransferFailed\",\n \"inputs\": [\n {\n \"name\": \"to\",\n \"type\": \"address\",\n \"internalType\": \"address\"\n },\n {\n \"name\": \"amount\",\n \"type\": \"uint256\",\n \"internalType\": \"uint256\"\n }\n ]\n },\n {\n \"type\": \"error\",\n \"name\": \"NativeValueTooLow\",\n \"inputs\": [\n {\n \"name\": \"required\",\n \"type\": \"uint256\",\n \"internalType\": \"uint256\"\n },\n {\n \"name\": \"sent\",\n \"type\": \"uint256\",\n \"internalType\": \"uint256\"\n }\n ]\n },\n {\n \"type\": \"error\",\n \"name\": \"NoPendingFee\",\n \"inputs\": []\n },\n {\n \"type\": \"error\",\n \"name\": \"NoRecipients\",\n \"inputs\": []\n },\n {\n \"type\": \"error\",\n \"name\": \"NothingToFlush\",\n \"inputs\": []\n },\n {\n \"type\": \"error\",\n \"name\": \"NothingToRescue\",\n \"inputs\": [\n {\n \"name\": \"token\",\n \"type\": \"address\",\n \"internalType\": \"address\"\n }\n ]\n },\n {\n \"type\": \"error\",\n \"name\": \"OwnableInvalidOwner\",\n \"inputs\": [\n {\n \"name\": \"owner\",\n \"type\": \"address\",\n \"internalType\": \"address\"\n }\n ]\n },\n {\n \"type\": \"error\",\n \"name\": \"OwnableUnauthorizedAccount\",\n \"inputs\": [\n {\n \"name\": \"account\",\n \"type\": \"address\",\n \"internalType\": \"address\"\n }\n ]\n },\n {\n \"type\": \"error\",\n \"name\": \"ReentrancyGuardReentrantCall\",\n \"inputs\": []\n },\n {\n \"type\": \"error\",\n \"name\": \"RenounceDisabled\",\n \"inputs\": []\n },\n {\n \"type\": \"error\",\n \"name\": \"SafeERC20FailedOperation\",\n \"inputs\": [\n {\n \"name\": \"token\",\n \"type\": \"address\",\n \"internalType\": \"address\"\n }\n ]\n },\n {\n \"type\": \"error\",\n \"name\": \"TooManyRecipients\",\n \"inputs\": [\n {\n \"name\": \"count\",\n \"type\": \"uint256\",\n \"internalType\": \"uint256\"\n }\n ]\n },\n {\n \"type\": \"error\",\n \"name\": \"ZeroAddress\",\n \"inputs\": []\n },\n {\n \"type\": \"error\",\n \"name\": \"ZeroRecipient\",\n \"inputs\": [\n {\n \"name\": \"index\",\n \"type\": \"uint256\",\n \"internalType\": \"uint256\"\n }\n ]\n },\n {\n \"type\": \"event\",\n \"name\": \"ERC20Rescued\",\n \"inputs\": [\n {\n \"name\": \"token\",\n \"type\": \"address\",\n \"indexed\": true,\n \"internalType\": \"address\"\n },\n {\n \"name\": \"to\",\n \"type\": \"address\",\n \"indexed\": true,\n \"internalType\": \"address\"\n },\n {\n \"name\": \"amount\",\n \"type\": \"uint256\",\n \"indexed\": false,\n \"internalType\": \"uint256\"\n }\n ],\n \"anonymous\": false\n },\n {\n \"type\": \"event\",\n \"name\": \"FeeChanged\",\n \"inputs\": [\n {\n \"name\": \"previousWei\",\n \"type\": \"uint256\",\n \"indexed\": false,\n \"internalType\": \"uint256\"\n },\n {\n \"name\": \"newWei\",\n \"type\": \"uint256\",\n \"indexed\": false,\n \"internalType\": \"uint256\"\n }\n ],\n \"anonymous\": false\n },\n {\n \"type\": \"event\",\n \"name\": \"FeeIncreaseScheduled\",\n \"inputs\": [\n {\n \"name\": \"currentWei\",\n \"type\": \"uint256\",\n \"indexed\": false,\n \"internalType\": \"uint256\"\n },\n {\n \"name\": \"newWei\",\n \"type\": \"uint256\",\n \"indexed\": false,\n \"internalType\": \"uint256\"\n },\n {\n \"name\": \"effectiveAt\",\n \"type\": \"uint64\",\n \"indexed\": false,\n \"internalType\": \"uint64\"\n }\n ],\n \"anonymous\": false\n },\n {\n \"type\": \"event\",\n \"name\": \"FeePaid\",\n \"inputs\": [\n {\n \"name\": \"payer\",\n \"type\": \"address\",\n \"indexed\": true,\n \"internalType\": \"address\"\n },\n {\n \"name\": \"feeWei\",\n \"type\": \"uint256\",\n \"indexed\": false,\n \"internalType\": \"uint256\"\n }\n ],\n \"anonymous\": false\n },\n {\n \"type\": \"event\",\n \"name\": \"MultisentNative\",\n \"inputs\": [\n {\n \"name\": \"sender\",\n \"type\": \"address\",\n \"indexed\": true,\n \"internalType\": \"address\"\n },\n {\n \"name\": \"recipients\",\n \"type\": \"uint256\",\n \"indexed\": false,\n \"internalType\": \"uint256\"\n },\n {\n \"name\": \"total\",\n \"type\": \"uint256\",\n \"indexed\": false,\n \"internalType\": \"uint256\"\n }\n ],\n \"anonymous\": false\n },\n {\n \"type\": \"event\",\n \"name\": \"MultisentToken\",\n \"inputs\": [\n {\n \"name\": \"sender\",\n \"type\": \"address\",\n \"indexed\": true,\n \"internalType\": \"address\"\n },\n {\n \"name\": \"token\",\n \"type\": \"address\",\n \"indexed\": true,\n \"internalType\": \"address\"\n },\n {\n \"name\": \"recipients\",\n \"type\": \"uint256\",\n \"indexed\": false,\n \"internalType\": \"uint256\"\n },\n {\n \"name\": \"total\",\n \"type\": \"uint256\",\n \"indexed\": false,\n \"internalType\": \"uint256\"\n }\n ],\n \"anonymous\": false\n },\n {\n \"type\": \"event\",\n \"name\": \"OwnershipTransferStarted\",\n \"inputs\": [\n {\n \"name\": \"previousOwner\",\n \"type\": \"address\",\n \"indexed\": true,\n \"internalType\": \"address\"\n },\n {\n \"name\": \"newOwner\",\n \"type\": \"address\",\n \"indexed\": true,\n \"internalType\": \"address\"\n }\n ],\n \"anonymous\": false\n },\n {\n \"type\": \"event\",\n \"name\": \"OwnershipTransferred\",\n \"inputs\": [\n {\n \"name\": \"previousOwner\",\n \"type\": \"address\",\n \"indexed\": true,\n \"internalType\": \"address\"\n },\n {\n \"name\": \"newOwner\",\n \"type\": \"address\",\n \"indexed\": true,\n \"internalType\": \"address\"\n }\n ],\n \"anonymous\": false\n },\n {\n \"type\": \"event\",\n \"name\": \"PendingFeeCancelled\",\n \"inputs\": [\n {\n \"name\": \"cancelledWei\",\n \"type\": \"uint256\",\n \"indexed\": false,\n \"internalType\": \"uint256\"\n },\n {\n \"name\": \"effectiveAt\",\n \"type\": \"uint64\",\n \"indexed\": false,\n \"internalType\": \"uint64\"\n }\n ],\n \"anonymous\": false\n },\n {\n \"type\": \"event\",\n \"name\": \"ProtocolFeesFlushed\",\n \"inputs\": [\n {\n \"name\": \"to\",\n \"type\": \"address\",\n \"indexed\": true,\n \"internalType\": \"address\"\n },\n {\n \"name\": \"amount\",\n \"type\": \"uint256\",\n \"indexed\": false,\n \"internalType\": \"uint256\"\n },\n {\n \"name\": \"owed\",\n \"type\": \"uint256\",\n \"indexed\": false,\n \"internalType\": \"uint256\"\n }\n ],\n \"anonymous\": false\n },\n {\n \"type\": \"function\",\n \"name\": \"MAX_FEE_NOTICE_SECONDS\",\n \"inputs\": [],\n \"outputs\": [\n {\n \"name\": \"\",\n \"type\": \"uint32\",\n \"internalType\": \"uint32\"\n }\n ],\n \"stateMutability\": \"view\"\n },\n {\n \"type\": \"function\",\n \"name\": \"MAX_RECIPIENTS\",\n \"inputs\": [],\n \"outputs\": [\n {\n \"name\": \"\",\n \"type\": \"uint256\",\n \"internalType\": \"uint256\"\n }\n ],\n \"stateMutability\": \"view\"\n },\n {\n \"type\": \"function\",\n \"name\": \"MIN_FEE_NOTICE_SECONDS\",\n \"inputs\": [],\n \"outputs\": [\n {\n \"name\": \"\",\n \"type\": \"uint32\",\n \"internalType\": \"uint32\"\n }\n ],\n \"stateMutability\": \"view\"\n },\n {\n \"type\": \"function\",\n \"name\": \"acceptOwnership\",\n \"inputs\": [],\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\"\n },\n {\n \"type\": \"function\",\n \"name\": \"cancelPendingFee\",\n \"inputs\": [],\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\"\n },\n {\n \"type\": \"function\",\n \"name\": \"feeNoticeSeconds\",\n \"inputs\": [],\n \"outputs\": [\n {\n \"name\": \"\",\n \"type\": \"uint32\",\n \"internalType\": \"uint32\"\n }\n ],\n \"stateMutability\": \"view\"\n },\n {\n \"type\": \"function\",\n \"name\": \"feeWei\",\n \"inputs\": [],\n \"outputs\": [\n {\n \"name\": \"\",\n \"type\": \"uint256\",\n \"internalType\": \"uint256\"\n }\n ],\n \"stateMutability\": \"view\"\n },\n {\n \"type\": \"function\",\n \"name\": \"flushProtocolFees\",\n \"inputs\": [],\n \"outputs\": [\n {\n \"name\": \"amount\",\n \"type\": \"uint256\",\n \"internalType\": \"uint256\"\n }\n ],\n \"stateMutability\": \"nonpayable\"\n },\n {\n \"type\": \"function\",\n \"name\": \"maxFeeWei\",\n \"inputs\": [],\n \"outputs\": [\n {\n \"name\": \"\",\n \"type\": \"uint256\",\n \"internalType\": \"uint256\"\n }\n ],\n \"stateMutability\": \"view\"\n },\n {\n \"type\": \"function\",\n \"name\": \"multisendNative\",\n \"inputs\": [\n {\n \"name\": \"recipients\",\n \"type\": \"address[]\",\n \"internalType\": \"address[]\"\n },\n {\n \"name\": \"amounts\",\n \"type\": \"uint256[]\",\n \"internalType\": \"uint256[]\"\n }\n ],\n \"outputs\": [],\n \"stateMutability\": \"payable\"\n },\n {\n \"type\": \"function\",\n \"name\": \"multisendToken\",\n \"inputs\": [\n {\n \"name\": \"token\",\n \"type\": \"address\",\n \"internalType\": \"address\"\n },\n {\n \"name\": \"recipients\",\n \"type\": \"address[]\",\n \"internalType\": \"address[]\"\n },\n {\n \"name\": \"amounts\",\n \"type\": \"uint256[]\",\n \"internalType\": \"uint256[]\"\n }\n ],\n \"outputs\": [],\n \"stateMutability\": \"payable\"\n },\n {\n \"type\": \"function\",\n \"name\": \"owner\",\n \"inputs\": [],\n \"outputs\": [\n {\n \"name\": \"\",\n \"type\": \"address\",\n \"internalType\": \"address\"\n }\n ],\n \"stateMutability\": \"view\"\n },\n {\n \"type\": \"function\",\n \"name\": \"pendingFee\",\n \"inputs\": [],\n \"outputs\": [\n {\n \"name\": \"newFeeWei\",\n \"type\": \"uint256\",\n \"internalType\": \"uint256\"\n },\n {\n \"name\": \"effectiveAt\",\n \"type\": \"uint64\",\n \"internalType\": \"uint64\"\n }\n ],\n \"stateMutability\": \"view\"\n },\n {\n \"type\": \"function\",\n \"name\": \"pendingOwner\",\n \"inputs\": [],\n \"outputs\": [\n {\n \"name\": \"\",\n \"type\": \"address\",\n \"internalType\": \"address\"\n }\n ],\n \"stateMutability\": \"view\"\n },\n {\n \"type\": \"function\",\n \"name\": \"protocolFeeRecipient\",\n \"inputs\": [],\n \"outputs\": [\n {\n \"name\": \"\",\n \"type\": \"address\",\n \"internalType\": \"address\"\n }\n ],\n \"stateMutability\": \"view\"\n },\n {\n \"type\": \"function\",\n \"name\": \"protocolFeesOwed\",\n \"inputs\": [],\n \"outputs\": [\n {\n \"name\": \"\",\n \"type\": \"uint256\",\n \"internalType\": \"uint256\"\n }\n ],\n \"stateMutability\": \"view\"\n },\n {\n \"type\": \"function\",\n \"name\": \"renounceOwnership\",\n \"inputs\": [],\n \"outputs\": [],\n \"stateMutability\": \"pure\"\n },\n {\n \"type\": \"function\",\n \"name\": \"rescueERC20\",\n \"inputs\": [\n {\n \"name\": \"token\",\n \"type\": \"address\",\n \"internalType\": \"address\"\n },\n {\n \"name\": \"to\",\n \"type\": \"address\",\n \"internalType\": \"address\"\n }\n ],\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\"\n },\n {\n \"type\": \"function\",\n \"name\": \"setFee\",\n \"inputs\": [\n {\n \"name\": \"newFeeWei\",\n \"type\": \"uint256\",\n \"internalType\": \"uint256\"\n }\n ],\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\"\n },\n {\n \"type\": \"function\",\n \"name\": \"transferOwnership\",\n \"inputs\": [\n {\n \"name\": \"newOwner\",\n \"type\": \"address\",\n \"internalType\": \"address\"\n }\n ],\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\"\n }\n];\n/**\n * `LatchDropFactory` - clones, funds and lists a `LatchMerkleDrop` in one call; flat native fee per drop (`LatchFeeGate`).\n *\n * 22 errors, 9 events, 26 functions - curated from the compiled artifact, not the full ABI.\n */\nexport const LATCH_DROP_FACTORY_ABI = [\n {\n \"type\": \"error\",\n \"name\": \"AddressEmptyCode\",\n \"inputs\": [\n {\n \"name\": \"target\",\n \"type\": \"address\",\n \"internalType\": \"address\"\n }\n ]\n },\n {\n \"type\": \"error\",\n \"name\": \"AddressInsufficientBalance\",\n \"inputs\": [\n {\n \"name\": \"account\",\n \"type\": \"address\",\n \"internalType\": \"address\"\n }\n ]\n },\n {\n \"type\": \"error\",\n \"name\": \"ERC1167FailedCreateClone\",\n \"inputs\": []\n },\n {\n \"type\": \"error\",\n \"name\": \"FailedInnerCall\",\n \"inputs\": []\n },\n {\n \"type\": \"error\",\n \"name\": \"FeeAboveCap\",\n \"inputs\": [\n {\n \"name\": \"feeWei\",\n \"type\": \"uint256\",\n \"internalType\": \"uint256\"\n },\n {\n \"name\": \"capWei\",\n \"type\": \"uint256\",\n \"internalType\": \"uint256\"\n }\n ]\n },\n {\n \"type\": \"error\",\n \"name\": \"InsufficientFee\",\n \"inputs\": [\n {\n \"name\": \"required\",\n \"type\": \"uint256\",\n \"internalType\": \"uint256\"\n },\n {\n \"name\": \"sent\",\n \"type\": \"uint256\",\n \"internalType\": \"uint256\"\n }\n ]\n },\n {\n \"type\": \"error\",\n \"name\": \"InvalidExpiry\",\n \"inputs\": [\n {\n \"name\": \"expiresAt\",\n \"type\": \"uint64\",\n \"internalType\": \"uint64\"\n }\n ]\n },\n {\n \"type\": \"error\",\n \"name\": \"InvalidNotice\",\n \"inputs\": [\n {\n \"name\": \"noticeSeconds\",\n \"type\": \"uint32\",\n \"internalType\": \"uint32\"\n }\n ]\n },\n {\n \"type\": \"error\",\n \"name\": \"MetadataTooLong\",\n \"inputs\": [\n {\n \"name\": \"length\",\n \"type\": \"uint256\",\n \"internalType\": \"uint256\"\n }\n ]\n },\n {\n \"type\": \"error\",\n \"name\": \"NativeTransferFailed\",\n \"inputs\": [\n {\n \"name\": \"to\",\n \"type\": \"address\",\n \"internalType\": \"address\"\n },\n {\n \"name\": \"amount\",\n \"type\": \"uint256\",\n \"internalType\": \"uint256\"\n }\n ]\n },\n {\n \"type\": \"error\",\n \"name\": \"NativeValueTooLow\",\n \"inputs\": [\n {\n \"name\": \"required\",\n \"type\": \"uint256\",\n \"internalType\": \"uint256\"\n },\n {\n \"name\": \"sent\",\n \"type\": \"uint256\",\n \"internalType\": \"uint256\"\n }\n ]\n },\n {\n \"type\": \"error\",\n \"name\": \"NoPendingFee\",\n \"inputs\": []\n },\n {\n \"type\": \"error\",\n \"name\": \"NothingToFlush\",\n \"inputs\": []\n },\n {\n \"type\": \"error\",\n \"name\": \"NothingToRescue\",\n \"inputs\": [\n {\n \"name\": \"token\",\n \"type\": \"address\",\n \"internalType\": \"address\"\n }\n ]\n },\n {\n \"type\": \"error\",\n \"name\": \"OwnableInvalidOwner\",\n \"inputs\": [\n {\n \"name\": \"owner\",\n \"type\": \"address\",\n \"internalType\": \"address\"\n }\n ]\n },\n {\n \"type\": \"error\",\n \"name\": \"OwnableUnauthorizedAccount\",\n \"inputs\": [\n {\n \"name\": \"account\",\n \"type\": \"address\",\n \"internalType\": \"address\"\n }\n ]\n },\n {\n \"type\": \"error\",\n \"name\": \"ReentrancyGuardReentrantCall\",\n \"inputs\": []\n },\n {\n \"type\": \"error\",\n \"name\": \"RenounceDisabled\",\n \"inputs\": []\n },\n {\n \"type\": \"error\",\n \"name\": \"SafeERC20FailedOperation\",\n \"inputs\": [\n {\n \"name\": \"token\",\n \"type\": \"address\",\n \"internalType\": \"address\"\n }\n ]\n },\n {\n \"type\": \"error\",\n \"name\": \"ZeroAddress\",\n \"inputs\": []\n },\n {\n \"type\": \"error\",\n \"name\": \"ZeroAmount\",\n \"inputs\": []\n },\n {\n \"type\": \"error\",\n \"name\": \"ZeroRoot\",\n \"inputs\": []\n },\n {\n \"type\": \"event\",\n \"name\": \"DropCreated\",\n \"inputs\": [\n {\n \"name\": \"drop\",\n \"type\": \"address\",\n \"indexed\": true,\n \"internalType\": \"address\"\n },\n {\n \"name\": \"creator\",\n \"type\": \"address\",\n \"indexed\": true,\n \"internalType\": \"address\"\n },\n {\n \"name\": \"currency\",\n \"type\": \"address\",\n \"indexed\": true,\n \"internalType\": \"Currency\"\n },\n {\n \"name\": \"amount\",\n \"type\": \"uint256\",\n \"indexed\": false,\n \"internalType\": \"uint256\"\n },\n {\n \"name\": \"merkleRoot\",\n \"type\": \"bytes32\",\n \"indexed\": false,\n \"internalType\": \"bytes32\"\n },\n {\n \"name\": \"expiresAt\",\n \"type\": \"uint64\",\n \"indexed\": false,\n \"internalType\": \"uint64\"\n },\n {\n \"name\": \"metadataURI\",\n \"type\": \"string\",\n \"indexed\": false,\n \"internalType\": \"string\"\n }\n ],\n \"anonymous\": false\n },\n {\n \"type\": \"event\",\n \"name\": \"ERC20Rescued\",\n \"inputs\": [\n {\n \"name\": \"token\",\n \"type\": \"address\",\n \"indexed\": true,\n \"internalType\": \"address\"\n },\n {\n \"name\": \"to\",\n \"type\": \"address\",\n \"indexed\": true,\n \"internalType\": \"address\"\n },\n {\n \"name\": \"amount\",\n \"type\": \"uint256\",\n \"indexed\": false,\n \"internalType\": \"uint256\"\n }\n ],\n \"anonymous\": false\n },\n {\n \"type\": \"event\",\n \"name\": \"FeeChanged\",\n \"inputs\": [\n {\n \"name\": \"previousWei\",\n \"type\": \"uint256\",\n \"indexed\": false,\n \"internalType\": \"uint256\"\n },\n {\n \"name\": \"newWei\",\n \"type\": \"uint256\",\n \"indexed\": false,\n \"internalType\": \"uint256\"\n }\n ],\n \"anonymous\": false\n },\n {\n \"type\": \"event\",\n \"name\": \"FeeIncreaseScheduled\",\n \"inputs\": [\n {\n \"name\": \"currentWei\",\n \"type\": \"uint256\",\n \"indexed\": false,\n \"internalType\": \"uint256\"\n },\n {\n \"name\": \"newWei\",\n \"type\": \"uint256\",\n \"indexed\": false,\n \"internalType\": \"uint256\"\n },\n {\n \"name\": \"effectiveAt\",\n \"type\": \"uint64\",\n \"indexed\": false,\n \"internalType\": \"uint64\"\n }\n ],\n \"anonymous\": false\n },\n {\n \"type\": \"event\",\n \"name\": \"FeePaid\",\n \"inputs\": [\n {\n \"name\": \"payer\",\n \"type\": \"address\",\n \"indexed\": true,\n \"internalType\": \"address\"\n },\n {\n \"name\": \"feeWei\",\n \"type\": \"uint256\",\n \"indexed\": false,\n \"internalType\": \"uint256\"\n }\n ],\n \"anonymous\": false\n },\n {\n \"type\": \"event\",\n \"name\": \"OwnershipTransferStarted\",\n \"inputs\": [\n {\n \"name\": \"previousOwner\",\n \"type\": \"address\",\n \"indexed\": true,\n \"internalType\": \"address\"\n },\n {\n \"name\": \"newOwner\",\n \"type\": \"address\",\n \"indexed\": true,\n \"internalType\": \"address\"\n }\n ],\n \"anonymous\": false\n },\n {\n \"type\": \"event\",\n \"name\": \"OwnershipTransferred\",\n \"inputs\": [\n {\n \"name\": \"previousOwner\",\n \"type\": \"address\",\n \"indexed\": true,\n \"internalType\": \"address\"\n },\n {\n \"name\": \"newOwner\",\n \"type\": \"address\",\n \"indexed\": true,\n \"internalType\": \"address\"\n }\n ],\n \"anonymous\": false\n },\n {\n \"type\": \"event\",\n \"name\": \"PendingFeeCancelled\",\n \"inputs\": [\n {\n \"name\": \"cancelledWei\",\n \"type\": \"uint256\",\n \"indexed\": false,\n \"internalType\": \"uint256\"\n },\n {\n \"name\": \"effectiveAt\",\n \"type\": \"uint64\",\n \"indexed\": false,\n \"internalType\": \"uint64\"\n }\n ],\n \"anonymous\": false\n },\n {\n \"type\": \"event\",\n \"name\": \"ProtocolFeesFlushed\",\n \"inputs\": [\n {\n \"name\": \"to\",\n \"type\": \"address\",\n \"indexed\": true,\n \"internalType\": \"address\"\n },\n {\n \"name\": \"amount\",\n \"type\": \"uint256\",\n \"indexed\": false,\n \"internalType\": \"uint256\"\n },\n {\n \"name\": \"owed\",\n \"type\": \"uint256\",\n \"indexed\": false,\n \"internalType\": \"uint256\"\n }\n ],\n \"anonymous\": false\n },\n {\n \"type\": \"function\",\n \"name\": \"IMPLEMENTATION\",\n \"inputs\": [],\n \"outputs\": [\n {\n \"name\": \"\",\n \"type\": \"address\",\n \"internalType\": \"contract LatchMerkleDrop\"\n }\n ],\n \"stateMutability\": \"view\"\n },\n {\n \"type\": \"function\",\n \"name\": \"MAX_DURATION\",\n \"inputs\": [],\n \"outputs\": [\n {\n \"name\": \"\",\n \"type\": \"uint64\",\n \"internalType\": \"uint64\"\n }\n ],\n \"stateMutability\": \"view\"\n },\n {\n \"type\": \"function\",\n \"name\": \"MAX_FEE_NOTICE_SECONDS\",\n \"inputs\": [],\n \"outputs\": [\n {\n \"name\": \"\",\n \"type\": \"uint32\",\n \"internalType\": \"uint32\"\n }\n ],\n \"stateMutability\": \"view\"\n },\n {\n \"type\": \"function\",\n \"name\": \"MAX_METADATA_BYTES\",\n \"inputs\": [],\n \"outputs\": [\n {\n \"name\": \"\",\n \"type\": \"uint256\",\n \"internalType\": \"uint256\"\n }\n ],\n \"stateMutability\": \"view\"\n },\n {\n \"type\": \"function\",\n \"name\": \"MIN_DURATION\",\n \"inputs\": [],\n \"outputs\": [\n {\n \"name\": \"\",\n \"type\": \"uint64\",\n \"internalType\": \"uint64\"\n }\n ],\n \"stateMutability\": \"view\"\n },\n {\n \"type\": \"function\",\n \"name\": \"MIN_FEE_NOTICE_SECONDS\",\n \"inputs\": [],\n \"outputs\": [\n {\n \"name\": \"\",\n \"type\": \"uint32\",\n \"internalType\": \"uint32\"\n }\n ],\n \"stateMutability\": \"view\"\n },\n {\n \"type\": \"function\",\n \"name\": \"acceptOwnership\",\n \"inputs\": [],\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\"\n },\n {\n \"type\": \"function\",\n \"name\": \"cancelPendingFee\",\n \"inputs\": [],\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\"\n },\n {\n \"type\": \"function\",\n \"name\": \"createDrop\",\n \"inputs\": [\n {\n \"name\": \"currency\",\n \"type\": \"address\",\n \"internalType\": \"Currency\"\n },\n {\n \"name\": \"amount\",\n \"type\": \"uint256\",\n \"internalType\": \"uint256\"\n },\n {\n \"name\": \"merkleRoot\",\n \"type\": \"bytes32\",\n \"internalType\": \"bytes32\"\n },\n {\n \"name\": \"expiresAt\",\n \"type\": \"uint64\",\n \"internalType\": \"uint64\"\n },\n {\n \"name\": \"metadataURI\",\n \"type\": \"string\",\n \"internalType\": \"string\"\n }\n ],\n \"outputs\": [\n {\n \"name\": \"drop\",\n \"type\": \"address\",\n \"internalType\": \"address\"\n }\n ],\n \"stateMutability\": \"payable\"\n },\n {\n \"type\": \"function\",\n \"name\": \"dropCount\",\n \"inputs\": [],\n \"outputs\": [\n {\n \"name\": \"\",\n \"type\": \"uint256\",\n \"internalType\": \"uint256\"\n }\n ],\n \"stateMutability\": \"view\"\n },\n {\n \"type\": \"function\",\n \"name\": \"drops\",\n \"inputs\": [\n {\n \"name\": \"start\",\n \"type\": \"uint256\",\n \"internalType\": \"uint256\"\n },\n {\n \"name\": \"end\",\n \"type\": \"uint256\",\n \"internalType\": \"uint256\"\n }\n ],\n \"outputs\": [\n {\n \"name\": \"\",\n \"type\": \"address[]\",\n \"internalType\": \"address[]\"\n }\n ],\n \"stateMutability\": \"view\"\n },\n {\n \"type\": \"function\",\n \"name\": \"dropsOf\",\n \"inputs\": [\n {\n \"name\": \"creator\",\n \"type\": \"address\",\n \"internalType\": \"address\"\n },\n {\n \"name\": \"start\",\n \"type\": \"uint256\",\n \"internalType\": \"uint256\"\n },\n {\n \"name\": \"end\",\n \"type\": \"uint256\",\n \"internalType\": \"uint256\"\n }\n ],\n \"outputs\": [\n {\n \"name\": \"\",\n \"type\": \"address[]\",\n \"internalType\": \"address[]\"\n }\n ],\n \"stateMutability\": \"view\"\n },\n {\n \"type\": \"function\",\n \"name\": \"feeNoticeSeconds\",\n \"inputs\": [],\n \"outputs\": [\n {\n \"name\": \"\",\n \"type\": \"uint32\",\n \"internalType\": \"uint32\"\n }\n ],\n \"stateMutability\": \"view\"\n },\n {\n \"type\": \"function\",\n \"name\": \"feeWei\",\n \"inputs\": [],\n \"outputs\": [\n {\n \"name\": \"\",\n \"type\": \"uint256\",\n \"internalType\": \"uint256\"\n }\n ],\n \"stateMutability\": \"view\"\n },\n {\n \"type\": \"function\",\n \"name\": \"flushProtocolFees\",\n \"inputs\": [],\n \"outputs\": [\n {\n \"name\": \"amount\",\n \"type\": \"uint256\",\n \"internalType\": \"uint256\"\n }\n ],\n \"stateMutability\": \"nonpayable\"\n },\n {\n \"type\": \"function\",\n \"name\": \"isDrop\",\n \"inputs\": [\n {\n \"name\": \"\",\n \"type\": \"address\",\n \"internalType\": \"address\"\n }\n ],\n \"outputs\": [\n {\n \"name\": \"\",\n \"type\": \"bool\",\n \"internalType\": \"bool\"\n }\n ],\n \"stateMutability\": \"view\"\n },\n {\n \"type\": \"function\",\n \"name\": \"maxFeeWei\",\n \"inputs\": [],\n \"outputs\": [\n {\n \"name\": \"\",\n \"type\": \"uint256\",\n \"internalType\": \"uint256\"\n }\n ],\n \"stateMutability\": \"view\"\n },\n {\n \"type\": \"function\",\n \"name\": \"owner\",\n \"inputs\": [],\n \"outputs\": [\n {\n \"name\": \"\",\n \"type\": \"address\",\n \"internalType\": \"address\"\n }\n ],\n \"stateMutability\": \"view\"\n },\n {\n \"type\": \"function\",\n \"name\": \"pendingFee\",\n \"inputs\": [],\n \"outputs\": [\n {\n \"name\": \"newFeeWei\",\n \"type\": \"uint256\",\n \"internalType\": \"uint256\"\n },\n {\n \"name\": \"effectiveAt\",\n \"type\": \"uint64\",\n \"internalType\": \"uint64\"\n }\n ],\n \"stateMutability\": \"view\"\n },\n {\n \"type\": \"function\",\n \"name\": \"pendingOwner\",\n \"inputs\": [],\n \"outputs\": [\n {\n \"name\": \"\",\n \"type\": \"address\",\n \"internalType\": \"address\"\n }\n ],\n \"stateMutability\": \"view\"\n },\n {\n \"type\": \"function\",\n \"name\": \"protocolFeeRecipient\",\n \"inputs\": [],\n \"outputs\": [\n {\n \"name\": \"\",\n \"type\": \"address\",\n \"internalType\": \"address\"\n }\n ],\n \"stateMutability\": \"view\"\n },\n {\n \"type\": \"function\",\n \"name\": \"protocolFeesOwed\",\n \"inputs\": [],\n \"outputs\": [\n {\n \"name\": \"\",\n \"type\": \"uint256\",\n \"internalType\": \"uint256\"\n }\n ],\n \"stateMutability\": \"view\"\n },\n {\n \"type\": \"function\",\n \"name\": \"renounceOwnership\",\n \"inputs\": [],\n \"outputs\": [],\n \"stateMutability\": \"pure\"\n },\n {\n \"type\": \"function\",\n \"name\": \"rescueERC20\",\n \"inputs\": [\n {\n \"name\": \"token\",\n \"type\": \"address\",\n \"internalType\": \"address\"\n },\n {\n \"name\": \"to\",\n \"type\": \"address\",\n \"internalType\": \"address\"\n }\n ],\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\"\n },\n {\n \"type\": \"function\",\n \"name\": \"setFee\",\n \"inputs\": [\n {\n \"name\": \"newFeeWei\",\n \"type\": \"uint256\",\n \"internalType\": \"uint256\"\n }\n ],\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\"\n },\n {\n \"type\": \"function\",\n \"name\": \"transferOwnership\",\n \"inputs\": [\n {\n \"name\": \"newOwner\",\n \"type\": \"address\",\n \"internalType\": \"address\"\n }\n ],\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\"\n }\n];\n/**\n * `LatchMerkleDrop` - one airdrop: a Merkle root of (index, account, amount), claimable until `expiresAt`, then swept by its creator. Contract accounts must claim for themselves.\n *\n * 16 errors, 3 events, 13 functions - curated from the compiled artifact, not the full ABI.\n */\nexport const LATCH_MERKLE_DROP_ABI = [\n {\n \"type\": \"error\",\n \"name\": \"AddressEmptyCode\",\n \"inputs\": [\n {\n \"name\": \"target\",\n \"type\": \"address\",\n \"internalType\": \"address\"\n }\n ]\n },\n {\n \"type\": \"error\",\n \"name\": \"AddressInsufficientBalance\",\n \"inputs\": [\n {\n \"name\": \"account\",\n \"type\": \"address\",\n \"internalType\": \"address\"\n }\n ]\n },\n {\n \"type\": \"error\",\n \"name\": \"AlreadyClaimed\",\n \"inputs\": [\n {\n \"name\": \"index\",\n \"type\": \"uint256\",\n \"internalType\": \"uint256\"\n }\n ]\n },\n {\n \"type\": \"error\",\n \"name\": \"AlreadyInitialized\",\n \"inputs\": []\n },\n {\n \"type\": \"error\",\n \"name\": \"ContractAccountMustClaimItself\",\n \"inputs\": [\n {\n \"name\": \"account\",\n \"type\": \"address\",\n \"internalType\": \"address\"\n },\n {\n \"name\": \"caller\",\n \"type\": \"address\",\n \"internalType\": \"address\"\n }\n ]\n },\n {\n \"type\": \"error\",\n \"name\": \"Expired\",\n \"inputs\": [\n {\n \"name\": \"expiresAt\",\n \"type\": \"uint64\",\n \"internalType\": \"uint64\"\n }\n ]\n },\n {\n \"type\": \"error\",\n \"name\": \"FailedInnerCall\",\n \"inputs\": []\n },\n {\n \"type\": \"error\",\n \"name\": \"InvalidProof\",\n \"inputs\": []\n },\n {\n \"type\": \"error\",\n \"name\": \"IsDropCurrency\",\n \"inputs\": []\n },\n {\n \"type\": \"error\",\n \"name\": \"NotCreator\",\n \"inputs\": [\n {\n \"name\": \"caller\",\n \"type\": \"address\",\n \"internalType\": \"address\"\n }\n ]\n },\n {\n \"type\": \"error\",\n \"name\": \"NotExpired\",\n \"inputs\": [\n {\n \"name\": \"expiresAt\",\n \"type\": \"uint64\",\n \"internalType\": \"uint64\"\n }\n ]\n },\n {\n \"type\": \"error\",\n \"name\": \"NothingToSweep\",\n \"inputs\": []\n },\n {\n \"type\": \"error\",\n \"name\": \"OnlyFactory\",\n \"inputs\": []\n },\n {\n \"type\": \"error\",\n \"name\": \"ReentrancyGuardReentrantCall\",\n \"inputs\": []\n },\n {\n \"type\": \"error\",\n \"name\": \"SafeERC20FailedOperation\",\n \"inputs\": [\n {\n \"name\": \"token\",\n \"type\": \"address\",\n \"internalType\": \"address\"\n }\n ]\n },\n {\n \"type\": \"error\",\n \"name\": \"ZeroAddress\",\n \"inputs\": []\n },\n {\n \"type\": \"event\",\n \"name\": \"Claimed\",\n \"inputs\": [\n {\n \"name\": \"index\",\n \"type\": \"uint256\",\n \"indexed\": true,\n \"internalType\": \"uint256\"\n },\n {\n \"name\": \"account\",\n \"type\": \"address\",\n \"indexed\": true,\n \"internalType\": \"address\"\n },\n {\n \"name\": \"amount\",\n \"type\": \"uint256\",\n \"indexed\": false,\n \"internalType\": \"uint256\"\n },\n {\n \"name\": \"caller\",\n \"type\": \"address\",\n \"indexed\": false,\n \"internalType\": \"address\"\n }\n ],\n \"anonymous\": false\n },\n {\n \"type\": \"event\",\n \"name\": \"OtherTokenRescued\",\n \"inputs\": [\n {\n \"name\": \"token\",\n \"type\": \"address\",\n \"indexed\": true,\n \"internalType\": \"address\"\n },\n {\n \"name\": \"to\",\n \"type\": \"address\",\n \"indexed\": true,\n \"internalType\": \"address\"\n },\n {\n \"name\": \"amount\",\n \"type\": \"uint256\",\n \"indexed\": false,\n \"internalType\": \"uint256\"\n }\n ],\n \"anonymous\": false\n },\n {\n \"type\": \"event\",\n \"name\": \"Swept\",\n \"inputs\": [\n {\n \"name\": \"to\",\n \"type\": \"address\",\n \"indexed\": true,\n \"internalType\": \"address\"\n },\n {\n \"name\": \"amount\",\n \"type\": \"uint256\",\n \"indexed\": false,\n \"internalType\": \"uint256\"\n }\n ],\n \"anonymous\": false\n },\n {\n \"type\": \"function\",\n \"name\": \"FACTORY\",\n \"inputs\": [],\n \"outputs\": [\n {\n \"name\": \"\",\n \"type\": \"address\",\n \"internalType\": \"address\"\n }\n ],\n \"stateMutability\": \"view\"\n },\n {\n \"type\": \"function\",\n \"name\": \"claim\",\n \"inputs\": [\n {\n \"name\": \"index\",\n \"type\": \"uint256\",\n \"internalType\": \"uint256\"\n },\n {\n \"name\": \"account\",\n \"type\": \"address\",\n \"internalType\": \"address\"\n },\n {\n \"name\": \"amount\",\n \"type\": \"uint256\",\n \"internalType\": \"uint256\"\n },\n {\n \"name\": \"proof\",\n \"type\": \"bytes32[]\",\n \"internalType\": \"bytes32[]\"\n }\n ],\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\"\n },\n {\n \"type\": \"function\",\n \"name\": \"claimedAmount\",\n \"inputs\": [],\n \"outputs\": [\n {\n \"name\": \"\",\n \"type\": \"uint256\",\n \"internalType\": \"uint256\"\n }\n ],\n \"stateMutability\": \"view\"\n },\n {\n \"type\": \"function\",\n \"name\": \"creator\",\n \"inputs\": [],\n \"outputs\": [\n {\n \"name\": \"\",\n \"type\": \"address\",\n \"internalType\": \"address\"\n }\n ],\n \"stateMutability\": \"view\"\n },\n {\n \"type\": \"function\",\n \"name\": \"currency\",\n \"inputs\": [],\n \"outputs\": [\n {\n \"name\": \"\",\n \"type\": \"address\",\n \"internalType\": \"Currency\"\n }\n ],\n \"stateMutability\": \"view\"\n },\n {\n \"type\": \"function\",\n \"name\": \"expiresAt\",\n \"inputs\": [],\n \"outputs\": [\n {\n \"name\": \"\",\n \"type\": \"uint64\",\n \"internalType\": \"uint64\"\n }\n ],\n \"stateMutability\": \"view\"\n },\n {\n \"type\": \"function\",\n \"name\": \"initialize\",\n \"inputs\": [\n {\n \"name\": \"creator_\",\n \"type\": \"address\",\n \"internalType\": \"address\"\n },\n {\n \"name\": \"currency_\",\n \"type\": \"address\",\n \"internalType\": \"Currency\"\n },\n {\n \"name\": \"totalAmount_\",\n \"type\": \"uint256\",\n \"internalType\": \"uint256\"\n },\n {\n \"name\": \"merkleRoot_\",\n \"type\": \"bytes32\",\n \"internalType\": \"bytes32\"\n },\n {\n \"name\": \"expiresAt_\",\n \"type\": \"uint64\",\n \"internalType\": \"uint64\"\n },\n {\n \"name\": \"metadataURI_\",\n \"type\": \"string\",\n \"internalType\": \"string\"\n }\n ],\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\"\n },\n {\n \"type\": \"function\",\n \"name\": \"isClaimed\",\n \"inputs\": [\n {\n \"name\": \"index\",\n \"type\": \"uint256\",\n \"internalType\": \"uint256\"\n }\n ],\n \"outputs\": [\n {\n \"name\": \"\",\n \"type\": \"bool\",\n \"internalType\": \"bool\"\n }\n ],\n \"stateMutability\": \"view\"\n },\n {\n \"type\": \"function\",\n \"name\": \"merkleRoot\",\n \"inputs\": [],\n \"outputs\": [\n {\n \"name\": \"\",\n \"type\": \"bytes32\",\n \"internalType\": \"bytes32\"\n }\n ],\n \"stateMutability\": \"view\"\n },\n {\n \"type\": \"function\",\n \"name\": \"metadataURI\",\n \"inputs\": [],\n \"outputs\": [\n {\n \"name\": \"\",\n \"type\": \"string\",\n \"internalType\": \"string\"\n }\n ],\n \"stateMutability\": \"view\"\n },\n {\n \"type\": \"function\",\n \"name\": \"rescueOtherToken\",\n \"inputs\": [\n {\n \"name\": \"token\",\n \"type\": \"address\",\n \"internalType\": \"address\"\n },\n {\n \"name\": \"to\",\n \"type\": \"address\",\n \"internalType\": \"address\"\n }\n ],\n \"outputs\": [\n {\n \"name\": \"amount\",\n \"type\": \"uint256\",\n \"internalType\": \"uint256\"\n }\n ],\n \"stateMutability\": \"nonpayable\"\n },\n {\n \"type\": \"function\",\n \"name\": \"sweep\",\n \"inputs\": [\n {\n \"name\": \"to\",\n \"type\": \"address\",\n \"internalType\": \"address\"\n }\n ],\n \"outputs\": [\n {\n \"name\": \"amount\",\n \"type\": \"uint256\",\n \"internalType\": \"uint256\"\n }\n ],\n \"stateMutability\": \"nonpayable\"\n },\n {\n \"type\": \"function\",\n \"name\": \"totalAmount\",\n \"inputs\": [],\n \"outputs\": [\n {\n \"name\": \"\",\n \"type\": \"uint256\",\n \"internalType\": \"uint256\"\n }\n ],\n \"stateMutability\": \"view\"\n }\n];\n/**\n * `LatchPad` - one transferable `LaunchpadKitV2` tenant. The pad is the tenant; the owner configures it; fees go to the integrator wallet the owner names, never to the pad.\n *\n * 14 errors, 4 events, 19 functions - curated from the compiled artifact, not the full ABI.\n */\nexport const LATCH_PAD_ABI = [\n {\n \"type\": \"error\",\n \"name\": \"AddressEmptyCode\",\n \"inputs\": [\n {\n \"name\": \"target\",\n \"type\": \"address\",\n \"internalType\": \"address\"\n }\n ]\n },\n {\n \"type\": \"error\",\n \"name\": \"AddressInsufficientBalance\",\n \"inputs\": [\n {\n \"name\": \"account\",\n \"type\": \"address\",\n \"internalType\": \"address\"\n }\n ]\n },\n {\n \"type\": \"error\",\n \"name\": \"AlreadyInitialized\",\n \"inputs\": []\n },\n {\n \"type\": \"error\",\n \"name\": \"FailedInnerCall\",\n \"inputs\": []\n },\n {\n \"type\": \"error\",\n \"name\": \"MetadataTooLong\",\n \"inputs\": [\n {\n \"name\": \"length\",\n \"type\": \"uint256\",\n \"internalType\": \"uint256\"\n },\n {\n \"name\": \"max\",\n \"type\": \"uint256\",\n \"internalType\": \"uint256\"\n }\n ]\n },\n {\n \"type\": \"error\",\n \"name\": \"NameLength\",\n \"inputs\": [\n {\n \"name\": \"length\",\n \"type\": \"uint256\",\n \"internalType\": \"uint256\"\n },\n {\n \"name\": \"min\",\n \"type\": \"uint256\",\n \"internalType\": \"uint256\"\n },\n {\n \"name\": \"max\",\n \"type\": \"uint256\",\n \"internalType\": \"uint256\"\n }\n ]\n },\n {\n \"type\": \"error\",\n \"name\": \"NativeTransferFailed\",\n \"inputs\": []\n },\n {\n \"type\": \"error\",\n \"name\": \"NotOwner\",\n \"inputs\": []\n },\n {\n \"type\": \"error\",\n \"name\": \"NotPendingOwner\",\n \"inputs\": []\n },\n {\n \"type\": \"error\",\n \"name\": \"NothingToRescue\",\n \"inputs\": []\n },\n {\n \"type\": \"error\",\n \"name\": \"PadCannotBeIntegrator\",\n \"inputs\": []\n },\n {\n \"type\": \"error\",\n \"name\": \"RenounceDisabled\",\n \"inputs\": []\n },\n {\n \"type\": \"error\",\n \"name\": \"SafeERC20FailedOperation\",\n \"inputs\": [\n {\n \"name\": \"token\",\n \"type\": \"address\",\n \"internalType\": \"address\"\n }\n ]\n },\n {\n \"type\": \"error\",\n \"name\": \"ZeroAddress\",\n \"inputs\": []\n },\n {\n \"type\": \"event\",\n \"name\": \"MetadataUpdated\",\n \"inputs\": [\n {\n \"name\": \"name\",\n \"type\": \"string\",\n \"indexed\": false,\n \"internalType\": \"string\"\n },\n {\n \"name\": \"metadataURI\",\n \"type\": \"string\",\n \"indexed\": false,\n \"internalType\": \"string\"\n }\n ],\n \"anonymous\": false\n },\n {\n \"type\": \"event\",\n \"name\": \"OwnershipTransferStarted\",\n \"inputs\": [\n {\n \"name\": \"previousOwner\",\n \"type\": \"address\",\n \"indexed\": true,\n \"internalType\": \"address\"\n },\n {\n \"name\": \"newOwner\",\n \"type\": \"address\",\n \"indexed\": true,\n \"internalType\": \"address\"\n }\n ],\n \"anonymous\": false\n },\n {\n \"type\": \"event\",\n \"name\": \"OwnershipTransferred\",\n \"inputs\": [\n {\n \"name\": \"previousOwner\",\n \"type\": \"address\",\n \"indexed\": true,\n \"internalType\": \"address\"\n },\n {\n \"name\": \"newOwner\",\n \"type\": \"address\",\n \"indexed\": true,\n \"internalType\": \"address\"\n }\n ],\n \"anonymous\": false\n },\n {\n \"type\": \"event\",\n \"name\": \"Rescued\",\n \"inputs\": [\n {\n \"name\": \"token\",\n \"type\": \"address\",\n \"indexed\": true,\n \"internalType\": \"address\"\n },\n {\n \"name\": \"to\",\n \"type\": \"address\",\n \"indexed\": true,\n \"internalType\": \"address\"\n },\n {\n \"name\": \"amountOrId\",\n \"type\": \"uint256\",\n \"indexed\": false,\n \"internalType\": \"uint256\"\n }\n ],\n \"anonymous\": false\n },\n {\n \"type\": \"function\",\n \"name\": \"FACTORY\",\n \"inputs\": [],\n \"outputs\": [\n {\n \"name\": \"\",\n \"type\": \"address\",\n \"internalType\": \"address\"\n }\n ],\n \"stateMutability\": \"view\"\n },\n {\n \"type\": \"function\",\n \"name\": \"KIT\",\n \"inputs\": [],\n \"outputs\": [\n {\n \"name\": \"\",\n \"type\": \"address\",\n \"internalType\": \"contract ILaunchpadKitV2\"\n }\n ],\n \"stateMutability\": \"view\"\n },\n {\n \"type\": \"function\",\n \"name\": \"MAX_METADATA_URI_BYTES\",\n \"inputs\": [],\n \"outputs\": [\n {\n \"name\": \"\",\n \"type\": \"uint256\",\n \"internalType\": \"uint256\"\n }\n ],\n \"stateMutability\": \"view\"\n },\n {\n \"type\": \"function\",\n \"name\": \"MAX_NAME_BYTES\",\n \"inputs\": [],\n \"outputs\": [\n {\n \"name\": \"\",\n \"type\": \"uint256\",\n \"internalType\": \"uint256\"\n }\n ],\n \"stateMutability\": \"view\"\n },\n {\n \"type\": \"function\",\n \"name\": \"MIN_NAME_BYTES\",\n \"inputs\": [],\n \"outputs\": [\n {\n \"name\": \"\",\n \"type\": \"uint256\",\n \"internalType\": \"uint256\"\n }\n ],\n \"stateMutability\": \"view\"\n },\n {\n \"type\": \"function\",\n \"name\": \"acceptOwnership\",\n \"inputs\": [],\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\"\n },\n {\n \"type\": \"function\",\n \"name\": \"configure\",\n \"inputs\": [\n {\n \"name\": \"config\",\n \"type\": \"tuple\",\n \"internalType\": \"struct TenantConfig\",\n \"components\": [\n {\n \"name\": \"integrator\",\n \"type\": \"address\",\n \"internalType\": \"address\"\n },\n {\n \"name\": \"integratorBps\",\n \"type\": \"uint16\",\n \"internalType\": \"uint16\"\n },\n {\n \"name\": \"integratorLaunchFeeWei\",\n \"type\": \"uint96\",\n \"internalType\": \"uint96\"\n },\n {\n \"name\": \"allowedPresets\",\n \"type\": \"uint8\",\n \"internalType\": \"uint8\"\n },\n {\n \"name\": \"allowedBinShapes\",\n \"type\": \"uint8\",\n \"internalType\": \"uint8\"\n },\n {\n \"name\": \"restrictQuotes\",\n \"type\": \"bool\",\n \"internalType\": \"bool\"\n },\n {\n \"name\": \"active\",\n \"type\": \"bool\",\n \"internalType\": \"bool\"\n },\n {\n \"name\": \"maxTaxBps\",\n \"type\": \"uint16\",\n \"internalType\": \"uint16\"\n },\n {\n \"name\": \"taxIntegratorBps\",\n \"type\": \"uint16\",\n \"internalType\": \"uint16\"\n }\n ]\n }\n ],\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\"\n },\n {\n \"type\": \"function\",\n \"name\": \"metadataURI\",\n \"inputs\": [],\n \"outputs\": [\n {\n \"name\": \"\",\n \"type\": \"string\",\n \"internalType\": \"string\"\n }\n ],\n \"stateMutability\": \"view\"\n },\n {\n \"type\": \"function\",\n \"name\": \"name\",\n \"inputs\": [],\n \"outputs\": [\n {\n \"name\": \"\",\n \"type\": \"string\",\n \"internalType\": \"string\"\n }\n ],\n \"stateMutability\": \"view\"\n },\n {\n \"type\": \"function\",\n \"name\": \"owner\",\n \"inputs\": [],\n \"outputs\": [\n {\n \"name\": \"\",\n \"type\": \"address\",\n \"internalType\": \"address\"\n }\n ],\n \"stateMutability\": \"view\"\n },\n {\n \"type\": \"function\",\n \"name\": \"pendingOwner\",\n \"inputs\": [],\n \"outputs\": [\n {\n \"name\": \"\",\n \"type\": \"address\",\n \"internalType\": \"address\"\n }\n ],\n \"stateMutability\": \"view\"\n },\n {\n \"type\": \"function\",\n \"name\": \"renounceOwnership\",\n \"inputs\": [],\n \"outputs\": [],\n \"stateMutability\": \"pure\"\n },\n {\n \"type\": \"function\",\n \"name\": \"rescueERC20\",\n \"inputs\": [\n {\n \"name\": \"token\",\n \"type\": \"address\",\n \"internalType\": \"address\"\n },\n {\n \"name\": \"to\",\n \"type\": \"address\",\n \"internalType\": \"address\"\n }\n ],\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\"\n },\n {\n \"type\": \"function\",\n \"name\": \"rescueERC721\",\n \"inputs\": [\n {\n \"name\": \"token\",\n \"type\": \"address\",\n \"internalType\": \"address\"\n },\n {\n \"name\": \"tokenId\",\n \"type\": \"uint256\",\n \"internalType\": \"uint256\"\n },\n {\n \"name\": \"to\",\n \"type\": \"address\",\n \"internalType\": \"address\"\n }\n ],\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\"\n },\n {\n \"type\": \"function\",\n \"name\": \"rescueNative\",\n \"inputs\": [\n {\n \"name\": \"to\",\n \"type\": \"address\",\n \"internalType\": \"address\"\n }\n ],\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\"\n },\n {\n \"type\": \"function\",\n \"name\": \"setMetadata\",\n \"inputs\": [\n {\n \"name\": \"name_\",\n \"type\": \"string\",\n \"internalType\": \"string\"\n },\n {\n \"name\": \"metadataURI_\",\n \"type\": \"string\",\n \"internalType\": \"string\"\n }\n ],\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\"\n },\n {\n \"type\": \"function\",\n \"name\": \"setQuote\",\n \"inputs\": [\n {\n \"name\": \"quote\",\n \"type\": \"address\",\n \"internalType\": \"address\"\n },\n {\n \"name\": \"allowed\",\n \"type\": \"bool\",\n \"internalType\": \"bool\"\n }\n ],\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\"\n },\n {\n \"type\": \"function\",\n \"name\": \"tenantConfig\",\n \"inputs\": [],\n \"outputs\": [\n {\n \"name\": \"\",\n \"type\": \"tuple\",\n \"internalType\": \"struct TenantConfig\",\n \"components\": [\n {\n \"name\": \"integrator\",\n \"type\": \"address\",\n \"internalType\": \"address\"\n },\n {\n \"name\": \"integratorBps\",\n \"type\": \"uint16\",\n \"internalType\": \"uint16\"\n },\n {\n \"name\": \"integratorLaunchFeeWei\",\n \"type\": \"uint96\",\n \"internalType\": \"uint96\"\n },\n {\n \"name\": \"allowedPresets\",\n \"type\": \"uint8\",\n \"internalType\": \"uint8\"\n },\n {\n \"name\": \"allowedBinShapes\",\n \"type\": \"uint8\",\n \"internalType\": \"uint8\"\n },\n {\n \"name\": \"restrictQuotes\",\n \"type\": \"bool\",\n \"internalType\": \"bool\"\n },\n {\n \"name\": \"active\",\n \"type\": \"bool\",\n \"internalType\": \"bool\"\n },\n {\n \"name\": \"maxTaxBps\",\n \"type\": \"uint16\",\n \"internalType\": \"uint16\"\n },\n {\n \"name\": \"taxIntegratorBps\",\n \"type\": \"uint16\",\n \"internalType\": \"uint16\"\n }\n ]\n }\n ],\n \"stateMutability\": \"view\"\n },\n {\n \"type\": \"function\",\n \"name\": \"transferOwnership\",\n \"inputs\": [\n {\n \"name\": \"newOwner\",\n \"type\": \"address\",\n \"internalType\": \"address\"\n }\n ],\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\"\n }\n];\n//# sourceMappingURL=abi.js.map","// SPDX-License-Identifier: MIT\n/**\n * The flat native fee every Latch utility charges (lockers, multisend, the\n * Merkle drop factory): one mechanism, read the same way on every contract.\n *\n * What the contracts guarantee, and therefore what this reader reports:\n * - `feeWei()` is the fee an action pays in the block the read was made in.\n * - An increase is announced and applies by itself `feeNoticeSeconds` later;\n * `pendingFee()` returns it until then, `(0, 0)` when there is none. A\n * decrease applies at once. Nothing is retroactive.\n * - The owner (the governance Safe) can never set a fee above `maxFeeWei`.\n * - A call that carries more than the fee is refunded the surplus in the same\n * transaction, so sending `feeSafeValue(terms)` never overpays in the end\n * and never reverts on a fee increase that lands between read and mine.\n *\n * The fee is ENFORCED BY THE CONTRACT. This module only reads it and sizes\n * `msg.value`; a caller who skips the SDK pays exactly the same.\n */\nimport { encodeFunctionData, zeroAddress } from \"viem\";\nimport { LATCH_MULTISEND_ABI } from \"../launchpad/generated/abi.js\";\n/** The `LatchFeeGate` members every utility shares (same selectors on each). */\nconst FEE_GATE_ABI = LATCH_MULTISEND_ABI;\nexport async function readFeeGate(client, address) {\n const r = (functionName) => client.readContract({ address, abi: FEE_GATE_ABI, functionName });\n const [feeWei, pending, capWei, notice, recipient, owedWei, owner] = await Promise.all([\n r(\"feeWei\"),\n r(\"pendingFee\"),\n r(\"maxFeeWei\"),\n r(\"feeNoticeSeconds\"),\n r(\"protocolFeeRecipient\"),\n r(\"protocolFeesOwed\"),\n r(\"owner\"),\n ]);\n return {\n address,\n feeWei,\n pendingFee: decodePendingUtilityFee(pending),\n capWei,\n noticeSeconds: Number(notice),\n recipient,\n owedWei,\n owner,\n };\n}\n/** `pendingFee()`'s `(newFeeWei, effectiveAt)`; `effectiveAt == 0` means none. */\nexport function decodePendingUtilityFee(raw) {\n const effectiveAt = BigInt(raw[1]);\n if (effectiveAt === 0n)\n return null;\n return { feeWei: raw[0], effectiveAt };\n}\n/**\n * The fee part of `msg.value`: `max(fee, pending fee)`. Covers a scheduled\n * increase that lands before the transaction mines; the contract refunds the\n * difference in the same call.\n */\nexport function feeSafeValue(terms) {\n const pending = terms.pendingFee === null ? 0n : terms.pendingFee.feeWei;\n return pending > terms.feeWei ? pending : terms.feeWei;\n}\n/** `true` when the fee a transaction pays may still change before it mines (an increase is announced). */\nexport function feeMayRise(terms) {\n return terms.pendingFee !== null && terms.pendingFee.feeWei > terms.feeWei;\n}\n/** Permissionless: pays every unit of native that is not held for users to the immutable recipient. */\nexport function buildFlushProtocolFees(address) {\n return { to: address, data: encodeFunctionData({ abi: FEE_GATE_ABI, functionName: \"flushProtocolFees\" }), value: 0n };\n}\nconst ERC20_APPROVE_ABI = [\n {\n type: \"function\",\n name: \"approve\",\n stateMutability: \"nonpayable\",\n inputs: [\n { name: \"spender\", type: \"address\" },\n { name: \"amount\", type: \"uint256\" },\n ],\n outputs: [{ name: \"\", type: \"bool\" }],\n },\n {\n type: \"function\",\n name: \"allowance\",\n stateMutability: \"view\",\n inputs: [\n { name: \"owner\", type: \"address\" },\n { name: \"spender\", type: \"address\" },\n ],\n outputs: [{ name: \"\", type: \"uint256\" }],\n },\n];\n/** `token.approve(spender, amount)`: an exact approval, never an unlimited one. */\nexport function buildErc20Approve(args) {\n return {\n to: args.token,\n data: encodeFunctionData({ abi: ERC20_APPROVE_ABI, functionName: \"approve\", args: [args.spender, args.amount] }),\n value: 0n,\n };\n}\nexport function readErc20Allowance(client, token, owner, spender) {\n return client.readContract({ address: token, abi: ERC20_APPROVE_ABI, functionName: \"allowance\", args: [owner, spender] });\n}\n/** The zero address: native currency in every Latch contract. */\nexport const NATIVE = zeroAddress;\nexport function isNative(currency) {\n return currency.toLowerCase() === zeroAddress;\n}\n//# sourceMappingURL=feeGate.js.map","// SPDX-License-Identifier: MIT\n/* ============================================================================\n Tick <-> sqrtPriceX96, and single-sided liquidity, in exact bigint.\n\n WHY THE SDK NEEDS THIS. `LaunchpadKitV2` decides whether a CL leg is\n single-sided against the tick CORE reports after `initialize`, not against the\n price the launcher typed. A range that looks single-sided at the typed price\n but shares a tick boundary with it reverts `RangeNotSingleSided`. So a UI that\n wants to answer \"will this revert?\" before the wallet opens has to compute the\n same tick core computes, to the unit.\n\n The two functions below reproduce the DEFINITIONS core uses:\n\n sqrtRatioAtTick(t) = sqrt(1.0001^t) * 2^96, rounded UP to Q64.96\n tickAtSqrtRatio(p) = the greatest t with sqrtRatioAtTick(t) <= p\n\n `sqrtRatioAtTick` evaluates 1.0001^(-|t|/2) as a product of per-bit Q128.128\n factors (the published constants of this curve: 2^128 / 1.0001^(2^(i-1))),\n inverts for positive ticks, and rounds up. `tickAtSqrtRatio` is a plain binary\n search over that function, so its correctness follows from the first one and\n from monotonicity, not from a second transcription. Both are checked against\n values read off the Solidity (`test/fixtures/kitV2Vectors.json`).\n ============================================================================ */\n/** Lowest tick core accepts. */\nexport const MIN_TICK = -887272;\n/** Highest tick core accepts. */\nexport const MAX_TICK = 887272;\n/** Smallest `tickSpacing` a CL pool accepts. */\nexport const MIN_TICK_SPACING = 1;\n/** Largest `tickSpacing` a CL pool accepts (`type(int16).max`). */\nexport const MAX_TICK_SPACING = 32767;\nconst SQRT_MIN = 4295128739n;\nconst SQRT_MAX = 1461446703485210103287273052203988822378723970342n;\nconst Q32 = 1n << 32n;\nconst Q96 = 1n << 96n;\nconst Q128 = 1n << 128n;\nconst MAX_UINT256 = (1n << 256n) - 1n;\nconst MAX_UINT128 = (1n << 128n) - 1n;\n/** Q128.128 factor for bit i of |tick|: 2^128 / sqrt(1.0001)^(2^i). Index 0 is bit 0x1. */\nconst BIT_FACTORS = [\n 0xfffcb933bd6fad37aa2d162d1a594001n,\n 0xfff97272373d413259a46990580e213an,\n 0xfff2e50f5f656932ef12357cf3c7fdccn,\n 0xffe5caca7e10e4e61c3624eaa0941cd0n,\n 0xffcb9843d60f6159c9db58835c926644n,\n 0xff973b41fa98c081472e6896dfb254c0n,\n 0xff2ea16466c96a3843ec78b326b52861n,\n 0xfe5dee046a99a2a811c461f1969c3053n,\n 0xfcbe86c7900a88aedcffc83b479aa3a4n,\n 0xf987a7253ac413176f2b074cf7815e54n,\n 0xf3392b0822b70005940c7a398e4b70f3n,\n 0xe7159475a2c29b7443b29c7fa6e889d9n,\n 0xd097f3bdfd2022b8845ad8f792aa5825n,\n 0xa9f746462d870fdf8a65dc1f90e061e5n,\n 0x70d869a156d2a1b890bb3df62baf32f7n,\n 0x31be135f97d08fd981231505542fcfa6n,\n 0x9aa508b5b7a84e1c677de54f3e99bc9n,\n 0x5d6af8dedb81196699c329225ee604n,\n 0x2216e584f5fa1ea926041bedfe98n,\n 0x48a170391f7dc42444e8fa2n,\n];\nfunction assertTick(tick) {\n if (!Number.isInteger(tick) || tick < MIN_TICK || tick > MAX_TICK) {\n throw new RangeError(`tick ${tick} is outside [${MIN_TICK}, ${MAX_TICK}]`);\n }\n}\n/** `sqrt(1.0001^tick) * 2^96` as core computes it (rounded up). */\nexport function sqrtRatioAtTick(tick) {\n assertTick(tick);\n const abs = Math.abs(tick);\n let ratio = Q128;\n for (let i = 0; i < BIT_FACTORS.length; i++) {\n if ((abs >> i) & 1)\n ratio = (ratio * BIT_FACTORS[i]) >> 128n;\n }\n // `ratio` is 1.0001^(-|t|/2) in Q128.128; for t=0 the loop leaves exactly 2^128.\n if (tick > 0)\n ratio = MAX_UINT256 / ratio;\n return (ratio >> 32n) + (ratio % Q32 === 0n ? 0n : 1n);\n}\n/**\n * The tick core stores for a `sqrtPriceX96`: the greatest tick whose sqrt ratio\n * is <= the price. Accepts `[MIN_SQRT_RATIO, MAX_SQRT_RATIO)`, as core does.\n */\nexport function tickAtSqrtRatio(sqrtPriceX96) {\n if (sqrtPriceX96 < SQRT_MIN || sqrtPriceX96 >= SQRT_MAX) {\n throw new RangeError(`sqrtPriceX96 ${sqrtPriceX96} is outside [${SQRT_MIN}, ${SQRT_MAX})`);\n }\n let lo = MIN_TICK; // sqrtRatioAtTick(lo) <= p always holds\n let hi = MAX_TICK; // sqrtRatioAtTick(hi) > p always holds, since p < SQRT_MAX\n while (hi - lo > 1) {\n const mid = Math.floor((lo + hi) / 2);\n if (sqrtRatioAtTick(mid) <= sqrtPriceX96)\n lo = mid;\n else\n hi = mid;\n }\n return lo;\n}\n/** `(MIN_TICK / spacing) * spacing`, truncating toward zero as Solidity does. */\nexport function minUsableTick(tickSpacing) {\n return Math.trunc(MIN_TICK / tickSpacing) * tickSpacing;\n}\n/** `(MAX_TICK / spacing) * spacing`. */\nexport function maxUsableTick(tickSpacing) {\n return Math.trunc(MAX_TICK / tickSpacing) * tickSpacing;\n}\nfunction toUint128(v) {\n if (v > MAX_UINT128)\n throw new RangeError(`liquidity ${v} does not fit uint128`);\n return v;\n}\n/**\n * `LiquidityAmounts.getLiquidityForAmounts` for the two shapes a single-sided\n * launch uses: price at or below the range (currency0 only) and price at or\n * above it (currency1 only). An in-range price is refused rather than computed:\n * the kit never seeds one, and the answer would invite a launch that reverts.\n *\n * @throws RangeError on uint128 overflow, as `SafeCast.toUint128` reverts.\n */\nexport function singleSidedLiquidity(args) {\n const a = sqrtRatioAtTick(args.tickLower);\n const b = sqrtRatioAtTick(args.tickUpper);\n if (a >= b)\n throw new RangeError(\"tickLower must be below tickUpper\");\n if (args.sqrtPriceX96 <= a) {\n const intermediate = (a * b) / Q96;\n return toUint128((args.amount * intermediate) / (b - a));\n }\n if (args.sqrtPriceX96 >= b) {\n return toUint128((args.amount * Q96) / (b - a));\n }\n throw new RangeError(\"the price is inside the range, so the position is not single-sided\");\n}\n//# sourceMappingURL=tickMath.js.map","// SPDX-License-Identifier: MIT\n/**\n * Token amounts a CL position's liquidity is worth at a price, rounded DOWN\n * (what a full withdrawal would return, before fees). The standard\n * concentrated-liquidity identities:\n *\n * price below the range: amount0 = L * (sb - sa) * 2^96 / (sb * sa), amount1 = 0\n * price inside the range: amount0 = L * (sb - sp) * 2^96 / (sb * sp),\n * amount1 = L * (sp - sa) / 2^96\n * price above the range: amount0 = 0, amount1 = L * (sb - sa) / 2^96\n *\n * with sa, sb the range edges' sqrt prices (`sqrtRatioAtTick`) and sp the\n * pool's `sqrtPriceX96`. \"Inside\" follows core: tickLower <= tick < tickUpper.\n */\nimport { sqrtRatioAtTick } from \"../launchpad/tickMath.js\";\nconst Q96 = 2n ** 96n;\nfunction amount0Delta(sa, sb, liquidity) {\n if (sa > sb)\n [sa, sb] = [sb, sa];\n if (sa === 0n)\n return 0n;\n // Two floor divisions, like core's getAmount0Delta(roundUp = false).\n return ((liquidity * Q96 * (sb - sa)) / sb) / sa;\n}\nfunction amount1Delta(sa, sb, liquidity) {\n if (sa > sb)\n [sa, sb] = [sb, sa];\n return (liquidity * (sb - sa)) / Q96;\n}\nexport function positionAmounts(args) {\n const { liquidity, tickLower, tickUpper, tick, sqrtPriceX96 } = args;\n const sa = sqrtRatioAtTick(tickLower);\n const sb = sqrtRatioAtTick(tickUpper);\n if (tick < tickLower)\n return { amount0: amount0Delta(sa, sb, liquidity), amount1: 0n, inRange: false };\n if (tick >= tickUpper)\n return { amount0: 0n, amount1: amount1Delta(sa, sb, liquidity), inRange: false };\n return {\n amount0: amount0Delta(sqrtPriceX96, sb, liquidity),\n amount1: amount1Delta(sa, sqrtPriceX96, liquidity),\n inRange: true,\n };\n}\n//# sourceMappingURL=clAmounts.js.map","// SPDX-License-Identifier: MIT\n// -----------------------------------------------------------------------------\n// GENERATED FILE - DO NOT EDIT BY HAND.\n// Produced by scripts/generate-trading-abi.mjs from the compiled contract ABIs.\n// Re-run `npm run generate` after the contracts are rebuilt.\n// -----------------------------------------------------------------------------\n/**\n * `UniversalRouter` — the swap entrypoint. Two `execute` overloads and the full error surface, which is what turns a failed swap into a diagnosable one.\n *\n * 44 errors, 2 events, 6 functions - curated from the compiled artifact, not the full ABI.\n */\nexport const UNIVERSAL_ROUTER_ABI = [\n {\n \"type\": \"error\",\n \"name\": \"BalanceTooLow\",\n \"inputs\": []\n },\n {\n \"type\": \"error\",\n \"name\": \"ContractLocked\",\n \"inputs\": []\n },\n {\n \"type\": \"error\",\n \"name\": \"DeltaNotNegative\",\n \"inputs\": [\n {\n \"name\": \"currency\",\n \"type\": \"address\",\n \"internalType\": \"Currency\"\n }\n ]\n },\n {\n \"type\": \"error\",\n \"name\": \"DeltaNotPositive\",\n \"inputs\": [\n {\n \"name\": \"currency\",\n \"type\": \"address\",\n \"internalType\": \"Currency\"\n }\n ]\n },\n {\n \"type\": \"error\",\n \"name\": \"ETHNotAccepted\",\n \"inputs\": []\n },\n {\n \"type\": \"error\",\n \"name\": \"EnforcedPause\",\n \"inputs\": []\n },\n {\n \"type\": \"error\",\n \"name\": \"ExactOutputUnfilled\",\n \"inputs\": [\n {\n \"name\": \"amountOutRequested\",\n \"type\": \"uint256\",\n \"internalType\": \"uint256\"\n },\n {\n \"name\": \"amountOutReceived\",\n \"type\": \"uint256\",\n \"internalType\": \"uint256\"\n }\n ]\n },\n {\n \"type\": \"error\",\n \"name\": \"ExecutionFailed\",\n \"inputs\": [\n {\n \"name\": \"commandIndex\",\n \"type\": \"uint256\",\n \"internalType\": \"uint256\"\n },\n {\n \"name\": \"message\",\n \"type\": \"bytes\",\n \"internalType\": \"bytes\"\n }\n ]\n },\n {\n \"type\": \"error\",\n \"name\": \"ExpectedPause\",\n \"inputs\": []\n },\n {\n \"type\": \"error\",\n \"name\": \"FromAddressIsNotOwner\",\n \"inputs\": []\n },\n {\n \"type\": \"error\",\n \"name\": \"InputLengthMismatch\",\n \"inputs\": []\n },\n {\n \"type\": \"error\",\n \"name\": \"InsufficientBalance\",\n \"inputs\": []\n },\n {\n \"type\": \"error\",\n \"name\": \"InsufficientETH\",\n \"inputs\": []\n },\n {\n \"type\": \"error\",\n \"name\": \"InsufficientToken\",\n \"inputs\": []\n },\n {\n \"type\": \"error\",\n \"name\": \"InvalidBips\",\n \"inputs\": []\n },\n {\n \"type\": \"error\",\n \"name\": \"InvalidCommandType\",\n \"inputs\": [\n {\n \"name\": \"commandType\",\n \"type\": \"uint256\",\n \"internalType\": \"uint256\"\n }\n ]\n },\n {\n \"type\": \"error\",\n \"name\": \"InvalidEthSender\",\n \"inputs\": []\n },\n {\n \"type\": \"error\",\n \"name\": \"InvalidPath\",\n \"inputs\": []\n },\n {\n \"type\": \"error\",\n \"name\": \"InvalidPoolAddress\",\n \"inputs\": []\n },\n {\n \"type\": \"error\",\n \"name\": \"InvalidPoolLength\",\n \"inputs\": []\n },\n {\n \"type\": \"error\",\n \"name\": \"InvalidReserves\",\n \"inputs\": []\n },\n {\n \"type\": \"error\",\n \"name\": \"LengthMismatch\",\n \"inputs\": []\n },\n {\n \"type\": \"error\",\n \"name\": \"NotVault\",\n \"inputs\": []\n },\n {\n \"type\": \"error\",\n \"name\": \"OwnableInvalidOwner\",\n \"inputs\": [\n {\n \"name\": \"owner\",\n \"type\": \"address\",\n \"internalType\": \"address\"\n }\n ]\n },\n {\n \"type\": \"error\",\n \"name\": \"OwnableUnauthorizedAccount\",\n \"inputs\": [\n {\n \"name\": \"account\",\n \"type\": \"address\",\n \"internalType\": \"address\"\n }\n ]\n },\n {\n \"type\": \"error\",\n \"name\": \"SafeCastOverflow\",\n \"inputs\": []\n },\n {\n \"type\": \"error\",\n \"name\": \"SliceOutOfBounds\",\n \"inputs\": []\n },\n {\n \"type\": \"error\",\n \"name\": \"StableInvalidAmountIn\",\n \"inputs\": []\n },\n {\n \"type\": \"error\",\n \"name\": \"StableInvalidPath\",\n \"inputs\": []\n },\n {\n \"type\": \"error\",\n \"name\": \"StableTooLittleReceived\",\n \"inputs\": []\n },\n {\n \"type\": \"error\",\n \"name\": \"StableTooMuchRequested\",\n \"inputs\": []\n },\n {\n \"type\": \"error\",\n \"name\": \"TooLittleReceived\",\n \"inputs\": [\n {\n \"name\": \"minAmountOutReceived\",\n \"type\": \"uint256\",\n \"internalType\": \"uint256\"\n },\n {\n \"name\": \"amountReceived\",\n \"type\": \"uint256\",\n \"internalType\": \"uint256\"\n }\n ]\n },\n {\n \"type\": \"error\",\n \"name\": \"TooMuchRequested\",\n \"inputs\": [\n {\n \"name\": \"maxAmountInRequested\",\n \"type\": \"uint256\",\n \"internalType\": \"uint256\"\n },\n {\n \"name\": \"amountRequested\",\n \"type\": \"uint256\",\n \"internalType\": \"uint256\"\n }\n ]\n },\n {\n \"type\": \"error\",\n \"name\": \"TransactionDeadlinePassed\",\n \"inputs\": []\n },\n {\n \"type\": \"error\",\n \"name\": \"UnsafeCast\",\n \"inputs\": []\n },\n {\n \"type\": \"error\",\n \"name\": \"UnsupportedAction\",\n \"inputs\": [\n {\n \"name\": \"action\",\n \"type\": \"uint256\",\n \"internalType\": \"uint256\"\n }\n ]\n },\n {\n \"type\": \"error\",\n \"name\": \"V2InvalidPath\",\n \"inputs\": []\n },\n {\n \"type\": \"error\",\n \"name\": \"V2TooLittleReceived\",\n \"inputs\": []\n },\n {\n \"type\": \"error\",\n \"name\": \"V2TooMuchRequested\",\n \"inputs\": []\n },\n {\n \"type\": \"error\",\n \"name\": \"V3InvalidAmountOut\",\n \"inputs\": []\n },\n {\n \"type\": \"error\",\n \"name\": \"V3InvalidCaller\",\n \"inputs\": []\n },\n {\n \"type\": \"error\",\n \"name\": \"V3InvalidSwap\",\n \"inputs\": []\n },\n {\n \"type\": \"error\",\n \"name\": \"V3TooLittleReceived\",\n \"inputs\": []\n },\n {\n \"type\": \"error\",\n \"name\": \"V3TooMuchRequested\",\n \"inputs\": []\n },\n {\n \"type\": \"event\",\n \"name\": \"Paused\",\n \"inputs\": [\n {\n \"name\": \"account\",\n \"type\": \"address\",\n \"indexed\": false,\n \"internalType\": \"address\"\n }\n ],\n \"anonymous\": false\n },\n {\n \"type\": \"event\",\n \"name\": \"Unpaused\",\n \"inputs\": [\n {\n \"name\": \"account\",\n \"type\": \"address\",\n \"indexed\": false,\n \"internalType\": \"address\"\n }\n ],\n \"anonymous\": false\n },\n {\n \"type\": \"function\",\n \"name\": \"binPoolManager\",\n \"inputs\": [],\n \"outputs\": [\n {\n \"name\": \"\",\n \"type\": \"address\",\n \"internalType\": \"contract IBinPoolManager\"\n }\n ],\n \"stateMutability\": \"view\"\n },\n {\n \"type\": \"function\",\n \"name\": \"clPoolManager\",\n \"inputs\": [],\n \"outputs\": [\n {\n \"name\": \"\",\n \"type\": \"address\",\n \"internalType\": \"contract ICLPoolManager\"\n }\n ],\n \"stateMutability\": \"view\"\n },\n {\n \"type\": \"function\",\n \"name\": \"execute\",\n \"inputs\": [\n {\n \"name\": \"commands\",\n \"type\": \"bytes\",\n \"internalType\": \"bytes\"\n },\n {\n \"name\": \"inputs\",\n \"type\": \"bytes[]\",\n \"internalType\": \"bytes[]\"\n }\n ],\n \"outputs\": [],\n \"stateMutability\": \"payable\"\n },\n {\n \"type\": \"function\",\n \"name\": \"execute\",\n \"inputs\": [\n {\n \"name\": \"commands\",\n \"type\": \"bytes\",\n \"internalType\": \"bytes\"\n },\n {\n \"name\": \"inputs\",\n \"type\": \"bytes[]\",\n \"internalType\": \"bytes[]\"\n },\n {\n \"name\": \"deadline\",\n \"type\": \"uint256\",\n \"internalType\": \"uint256\"\n }\n ],\n \"outputs\": [],\n \"stateMutability\": \"payable\"\n },\n {\n \"type\": \"function\",\n \"name\": \"paused\",\n \"inputs\": [],\n \"outputs\": [\n {\n \"name\": \"\",\n \"type\": \"bool\",\n \"internalType\": \"bool\"\n }\n ],\n \"stateMutability\": \"view\"\n },\n {\n \"type\": \"function\",\n \"name\": \"vault\",\n \"inputs\": [],\n \"outputs\": [\n {\n \"name\": \"\",\n \"type\": \"address\",\n \"internalType\": \"contract IVault\"\n }\n ],\n \"stateMutability\": \"view\"\n }\n];\n/**\n * `CLQuoter` — simulated swap output. Every function here REVERTS with the answer encoded in the revert data, so these are `eth_call`-only and cost gas if sent.\n *\n * 6 errors, 7 functions - curated from the compiled artifact, not the full ABI.\n */\nexport const CL_QUOTER_ABI = [\n {\n \"type\": \"error\",\n \"name\": \"NotEnoughLiquidity\",\n \"inputs\": [\n {\n \"name\": \"poolId\",\n \"type\": \"bytes32\",\n \"internalType\": \"PoolId\"\n }\n ]\n },\n {\n \"type\": \"error\",\n \"name\": \"NotSelf\",\n \"inputs\": []\n },\n {\n \"type\": \"error\",\n \"name\": \"NotVault\",\n \"inputs\": []\n },\n {\n \"type\": \"error\",\n \"name\": \"QuoteSwap\",\n \"inputs\": [\n {\n \"name\": \"amount\",\n \"type\": \"uint256\",\n \"internalType\": \"uint256\"\n }\n ]\n },\n {\n \"type\": \"error\",\n \"name\": \"UnexpectedCallSuccess\",\n \"inputs\": []\n },\n {\n \"type\": \"error\",\n \"name\": \"UnexpectedRevertBytes\",\n \"inputs\": [\n {\n \"name\": \"revertData\",\n \"type\": \"bytes\",\n \"internalType\": \"bytes\"\n }\n ]\n },\n {\n \"type\": \"function\",\n \"name\": \"poolManager\",\n \"inputs\": [],\n \"outputs\": [\n {\n \"name\": \"\",\n \"type\": \"address\",\n \"internalType\": \"contract ICLPoolManager\"\n }\n ],\n \"stateMutability\": \"view\"\n },\n {\n \"type\": \"function\",\n \"name\": \"quoteExactInput\",\n \"inputs\": [\n {\n \"name\": \"params\",\n \"type\": \"tuple\",\n \"internalType\": \"struct IQuoter.QuoteExactParams\",\n \"components\": [\n {\n \"name\": \"exactCurrency\",\n \"type\": \"address\",\n \"internalType\": \"Currency\"\n },\n {\n \"name\": \"path\",\n \"type\": \"tuple[]\",\n \"internalType\": \"struct PathKey[]\",\n \"components\": [\n {\n \"name\": \"intermediateCurrency\",\n \"type\": \"address\",\n \"internalType\": \"Currency\"\n },\n {\n \"name\": \"fee\",\n \"type\": \"uint24\",\n \"internalType\": \"uint24\"\n },\n {\n \"name\": \"hooks\",\n \"type\": \"address\",\n \"internalType\": \"contract IHooks\"\n },\n {\n \"name\": \"poolManager\",\n \"type\": \"address\",\n \"internalType\": \"contract IPoolManager\"\n },\n {\n \"name\": \"hookData\",\n \"type\": \"bytes\",\n \"internalType\": \"bytes\"\n },\n {\n \"name\": \"parameters\",\n \"type\": \"bytes32\",\n \"internalType\": \"bytes32\"\n }\n ]\n },\n {\n \"name\": \"exactAmount\",\n \"type\": \"uint128\",\n \"internalType\": \"uint128\"\n }\n ]\n }\n ],\n \"outputs\": [\n {\n \"name\": \"amountOut\",\n \"type\": \"uint256\",\n \"internalType\": \"uint256\"\n },\n {\n \"name\": \"gasEstimate\",\n \"type\": \"uint256\",\n \"internalType\": \"uint256\"\n }\n ],\n \"stateMutability\": \"nonpayable\"\n },\n {\n \"type\": \"function\",\n \"name\": \"quoteExactInputSingle\",\n \"inputs\": [\n {\n \"name\": \"params\",\n \"type\": \"tuple\",\n \"internalType\": \"struct IQuoter.QuoteExactSingleParams\",\n \"components\": [\n {\n \"name\": \"poolKey\",\n \"type\": \"tuple\",\n \"internalType\": \"struct PoolKey\",\n \"components\": [\n {\n \"name\": \"currency0\",\n \"type\": \"address\",\n \"internalType\": \"Currency\"\n },\n {\n \"name\": \"currency1\",\n \"type\": \"address\",\n \"internalType\": \"Currency\"\n },\n {\n \"name\": \"hooks\",\n \"type\": \"address\",\n \"internalType\": \"contract IHooks\"\n },\n {\n \"name\": \"poolManager\",\n \"type\": \"address\",\n \"internalType\": \"contract IPoolManager\"\n },\n {\n \"name\": \"fee\",\n \"type\": \"uint24\",\n \"internalType\": \"uint24\"\n },\n {\n \"name\": \"parameters\",\n \"type\": \"bytes32\",\n \"internalType\": \"bytes32\"\n }\n ]\n },\n {\n \"name\": \"zeroForOne\",\n \"type\": \"bool\",\n \"internalType\": \"bool\"\n },\n {\n \"name\": \"exactAmount\",\n \"type\": \"uint128\",\n \"internalType\": \"uint128\"\n },\n {\n \"name\": \"hookData\",\n \"type\": \"bytes\",\n \"internalType\": \"bytes\"\n }\n ]\n }\n ],\n \"outputs\": [\n {\n \"name\": \"amountOut\",\n \"type\": \"uint256\",\n \"internalType\": \"uint256\"\n },\n {\n \"name\": \"gasEstimate\",\n \"type\": \"uint256\",\n \"internalType\": \"uint256\"\n }\n ],\n \"stateMutability\": \"nonpayable\"\n },\n {\n \"type\": \"function\",\n \"name\": \"quoteExactInputSingleList\",\n \"inputs\": [\n {\n \"name\": \"params\",\n \"type\": \"tuple[]\",\n \"internalType\": \"struct IQuoter.QuoteExactSingleParams[]\",\n \"components\": [\n {\n \"name\": \"poolKey\",\n \"type\": \"tuple\",\n \"internalType\": \"struct PoolKey\",\n \"components\": [\n {\n \"name\": \"currency0\",\n \"type\": \"address\",\n \"internalType\": \"Currency\"\n },\n {\n \"name\": \"currency1\",\n \"type\": \"address\",\n \"internalType\": \"Currency\"\n },\n {\n \"name\": \"hooks\",\n \"type\": \"address\",\n \"internalType\": \"contract IHooks\"\n },\n {\n \"name\": \"poolManager\",\n \"type\": \"address\",\n \"internalType\": \"contract IPoolManager\"\n },\n {\n \"name\": \"fee\",\n \"type\": \"uint24\",\n \"internalType\": \"uint24\"\n },\n {\n \"name\": \"parameters\",\n \"type\": \"bytes32\",\n \"internalType\": \"bytes32\"\n }\n ]\n },\n {\n \"name\": \"zeroForOne\",\n \"type\": \"bool\",\n \"internalType\": \"bool\"\n },\n {\n \"name\": \"exactAmount\",\n \"type\": \"uint128\",\n \"internalType\": \"uint128\"\n },\n {\n \"name\": \"hookData\",\n \"type\": \"bytes\",\n \"internalType\": \"bytes\"\n }\n ]\n }\n ],\n \"outputs\": [\n {\n \"name\": \"amountIn\",\n \"type\": \"uint256\",\n \"internalType\": \"uint256\"\n },\n {\n \"name\": \"gasEstimate\",\n \"type\": \"uint256\",\n \"internalType\": \"uint256\"\n }\n ],\n \"stateMutability\": \"nonpayable\"\n },\n {\n \"type\": \"function\",\n \"name\": \"quoteExactOutput\",\n \"inputs\": [\n {\n \"name\": \"params\",\n \"type\": \"tuple\",\n \"internalType\": \"struct IQuoter.QuoteExactParams\",\n \"components\": [\n {\n \"name\": \"exactCurrency\",\n \"type\": \"address\",\n \"internalType\": \"Currency\"\n },\n {\n \"name\": \"path\",\n \"type\": \"tuple[]\",\n \"internalType\": \"struct PathKey[]\",\n \"components\": [\n {\n \"name\": \"intermediateCurrency\",\n \"type\": \"address\",\n \"internalType\": \"Currency\"\n },\n {\n \"name\": \"fee\",\n \"type\": \"uint24\",\n \"internalType\": \"uint24\"\n },\n {\n \"name\": \"hooks\",\n \"type\": \"address\",\n \"internalType\": \"contract IHooks\"\n },\n {\n \"name\": \"poolManager\",\n \"type\": \"address\",\n \"internalType\": \"contract IPoolManager\"\n },\n {\n \"name\": \"hookData\",\n \"type\": \"bytes\",\n \"internalType\": \"bytes\"\n },\n {\n \"name\": \"parameters\",\n \"type\": \"bytes32\",\n \"internalType\": \"bytes32\"\n }\n ]\n },\n {\n \"name\": \"exactAmount\",\n \"type\": \"uint128\",\n \"internalType\": \"uint128\"\n }\n ]\n }\n ],\n \"outputs\": [\n {\n \"name\": \"amountIn\",\n \"type\": \"uint256\",\n \"internalType\": \"uint256\"\n },\n {\n \"name\": \"gasEstimate\",\n \"type\": \"uint256\",\n \"internalType\": \"uint256\"\n }\n ],\n \"stateMutability\": \"nonpayable\"\n },\n {\n \"type\": \"function\",\n \"name\": \"quoteExactOutputSingle\",\n \"inputs\": [\n {\n \"name\": \"params\",\n \"type\": \"tuple\",\n \"internalType\": \"struct IQuoter.QuoteExactSingleParams\",\n \"components\": [\n {\n \"name\": \"poolKey\",\n \"type\": \"tuple\",\n \"internalType\": \"struct PoolKey\",\n \"components\": [\n {\n \"name\": \"currency0\",\n \"type\": \"address\",\n \"internalType\": \"Currency\"\n },\n {\n \"name\": \"currency1\",\n \"type\": \"address\",\n \"internalType\": \"Currency\"\n },\n {\n \"name\": \"hooks\",\n \"type\": \"address\",\n \"internalType\": \"contract IHooks\"\n },\n {\n \"name\": \"poolManager\",\n \"type\": \"address\",\n \"internalType\": \"contract IPoolManager\"\n },\n {\n \"name\": \"fee\",\n \"type\": \"uint24\",\n \"internalType\": \"uint24\"\n },\n {\n \"name\": \"parameters\",\n \"type\": \"bytes32\",\n \"internalType\": \"bytes32\"\n }\n ]\n },\n {\n \"name\": \"zeroForOne\",\n \"type\": \"bool\",\n \"internalType\": \"bool\"\n },\n {\n \"name\": \"exactAmount\",\n \"type\": \"uint128\",\n \"internalType\": \"uint128\"\n },\n {\n \"name\": \"hookData\",\n \"type\": \"bytes\",\n \"internalType\": \"bytes\"\n }\n ]\n }\n ],\n \"outputs\": [\n {\n \"name\": \"amountIn\",\n \"type\": \"uint256\",\n \"internalType\": \"uint256\"\n },\n {\n \"name\": \"gasEstimate\",\n \"type\": \"uint256\",\n \"internalType\": \"uint256\"\n }\n ],\n \"stateMutability\": \"nonpayable\"\n },\n {\n \"type\": \"function\",\n \"name\": \"vault\",\n \"inputs\": [],\n \"outputs\": [\n {\n \"name\": \"\",\n \"type\": \"address\",\n \"internalType\": \"contract IVault\"\n }\n ],\n \"stateMutability\": \"view\"\n }\n];\n/**\n * `BinQuoter` — simulated swap output for liquidity-book pools. Same `QuoteExactSingleParams` shape as the CL quoter (`zeroForOne` is `swapForY`), same revert-with-the-answer mechanics: `eth_call`-only.\n *\n * 6 errors, 7 functions - curated from the compiled artifact, not the full ABI.\n */\nexport const BIN_QUOTER_ABI = [\n {\n \"type\": \"error\",\n \"name\": \"NotEnoughLiquidity\",\n \"inputs\": [\n {\n \"name\": \"poolId\",\n \"type\": \"bytes32\",\n \"internalType\": \"PoolId\"\n }\n ]\n },\n {\n \"type\": \"error\",\n \"name\": \"NotSelf\",\n \"inputs\": []\n },\n {\n \"type\": \"error\",\n \"name\": \"NotVault\",\n \"inputs\": []\n },\n {\n \"type\": \"error\",\n \"name\": \"QuoteSwap\",\n \"inputs\": [\n {\n \"name\": \"amount\",\n \"type\": \"uint256\",\n \"internalType\": \"uint256\"\n }\n ]\n },\n {\n \"type\": \"error\",\n \"name\": \"UnexpectedCallSuccess\",\n \"inputs\": []\n },\n {\n \"type\": \"error\",\n \"name\": \"UnexpectedRevertBytes\",\n \"inputs\": [\n {\n \"name\": \"revertData\",\n \"type\": \"bytes\",\n \"internalType\": \"bytes\"\n }\n ]\n },\n {\n \"type\": \"function\",\n \"name\": \"poolManager\",\n \"inputs\": [],\n \"outputs\": [\n {\n \"name\": \"\",\n \"type\": \"address\",\n \"internalType\": \"contract IBinPoolManager\"\n }\n ],\n \"stateMutability\": \"view\"\n },\n {\n \"type\": \"function\",\n \"name\": \"quoteExactInput\",\n \"inputs\": [\n {\n \"name\": \"params\",\n \"type\": \"tuple\",\n \"internalType\": \"struct IQuoter.QuoteExactParams\",\n \"components\": [\n {\n \"name\": \"exactCurrency\",\n \"type\": \"address\",\n \"internalType\": \"Currency\"\n },\n {\n \"name\": \"path\",\n \"type\": \"tuple[]\",\n \"internalType\": \"struct PathKey[]\",\n \"components\": [\n {\n \"name\": \"intermediateCurrency\",\n \"type\": \"address\",\n \"internalType\": \"Currency\"\n },\n {\n \"name\": \"fee\",\n \"type\": \"uint24\",\n \"internalType\": \"uint24\"\n },\n {\n \"name\": \"hooks\",\n \"type\": \"address\",\n \"internalType\": \"contract IHooks\"\n },\n {\n \"name\": \"poolManager\",\n \"type\": \"address\",\n \"internalType\": \"contract IPoolManager\"\n },\n {\n \"name\": \"hookData\",\n \"type\": \"bytes\",\n \"internalType\": \"bytes\"\n },\n {\n \"name\": \"parameters\",\n \"type\": \"bytes32\",\n \"internalType\": \"bytes32\"\n }\n ]\n },\n {\n \"name\": \"exactAmount\",\n \"type\": \"uint128\",\n \"internalType\": \"uint128\"\n }\n ]\n }\n ],\n \"outputs\": [\n {\n \"name\": \"amountOut\",\n \"type\": \"uint256\",\n \"internalType\": \"uint256\"\n },\n {\n \"name\": \"gasEstimate\",\n \"type\": \"uint256\",\n \"internalType\": \"uint256\"\n }\n ],\n \"stateMutability\": \"nonpayable\"\n },\n {\n \"type\": \"function\",\n \"name\": \"quoteExactInputSingle\",\n \"inputs\": [\n {\n \"name\": \"params\",\n \"type\": \"tuple\",\n \"internalType\": \"struct IQuoter.QuoteExactSingleParams\",\n \"components\": [\n {\n \"name\": \"poolKey\",\n \"type\": \"tuple\",\n \"internalType\": \"struct PoolKey\",\n \"components\": [\n {\n \"name\": \"currency0\",\n \"type\": \"address\",\n \"internalType\": \"Currency\"\n },\n {\n \"name\": \"currency1\",\n \"type\": \"address\",\n \"internalType\": \"Currency\"\n },\n {\n \"name\": \"hooks\",\n \"type\": \"address\",\n \"internalType\": \"contract IHooks\"\n },\n {\n \"name\": \"poolManager\",\n \"type\": \"address\",\n \"internalType\": \"contract IPoolManager\"\n },\n {\n \"name\": \"fee\",\n \"type\": \"uint24\",\n \"internalType\": \"uint24\"\n },\n {\n \"name\": \"parameters\",\n \"type\": \"bytes32\",\n \"internalType\": \"bytes32\"\n }\n ]\n },\n {\n \"name\": \"zeroForOne\",\n \"type\": \"bool\",\n \"internalType\": \"bool\"\n },\n {\n \"name\": \"exactAmount\",\n \"type\": \"uint128\",\n \"internalType\": \"uint128\"\n },\n {\n \"name\": \"hookData\",\n \"type\": \"bytes\",\n \"internalType\": \"bytes\"\n }\n ]\n }\n ],\n \"outputs\": [\n {\n \"name\": \"amountOut\",\n \"type\": \"uint256\",\n \"internalType\": \"uint256\"\n },\n {\n \"name\": \"gasEstimate\",\n \"type\": \"uint256\",\n \"internalType\": \"uint256\"\n }\n ],\n \"stateMutability\": \"nonpayable\"\n },\n {\n \"type\": \"function\",\n \"name\": \"quoteExactInputSingleList\",\n \"inputs\": [\n {\n \"name\": \"params\",\n \"type\": \"tuple[]\",\n \"internalType\": \"struct IQuoter.QuoteExactSingleParams[]\",\n \"components\": [\n {\n \"name\": \"poolKey\",\n \"type\": \"tuple\",\n \"internalType\": \"struct PoolKey\",\n \"components\": [\n {\n \"name\": \"currency0\",\n \"type\": \"address\",\n \"internalType\": \"Currency\"\n },\n {\n \"name\": \"currency1\",\n \"type\": \"address\",\n \"internalType\": \"Currency\"\n },\n {\n \"name\": \"hooks\",\n \"type\": \"address\",\n \"internalType\": \"contract IHooks\"\n },\n {\n \"name\": \"poolManager\",\n \"type\": \"address\",\n \"internalType\": \"contract IPoolManager\"\n },\n {\n \"name\": \"fee\",\n \"type\": \"uint24\",\n \"internalType\": \"uint24\"\n },\n {\n \"name\": \"parameters\",\n \"type\": \"bytes32\",\n \"internalType\": \"bytes32\"\n }\n ]\n },\n {\n \"name\": \"zeroForOne\",\n \"type\": \"bool\",\n \"internalType\": \"bool\"\n },\n {\n \"name\": \"exactAmount\",\n \"type\": \"uint128\",\n \"internalType\": \"uint128\"\n },\n {\n \"name\": \"hookData\",\n \"type\": \"bytes\",\n \"internalType\": \"bytes\"\n }\n ]\n }\n ],\n \"outputs\": [\n {\n \"name\": \"amountIn\",\n \"type\": \"uint256\",\n \"internalType\": \"uint256\"\n },\n {\n \"name\": \"gasEstimate\",\n \"type\": \"uint256\",\n \"internalType\": \"uint256\"\n }\n ],\n \"stateMutability\": \"nonpayable\"\n },\n {\n \"type\": \"function\",\n \"name\": \"quoteExactOutput\",\n \"inputs\": [\n {\n \"name\": \"params\",\n \"type\": \"tuple\",\n \"internalType\": \"struct IQuoter.QuoteExactParams\",\n \"components\": [\n {\n \"name\": \"exactCurrency\",\n \"type\": \"address\",\n \"internalType\": \"Currency\"\n },\n {\n \"name\": \"path\",\n \"type\": \"tuple[]\",\n \"internalType\": \"struct PathKey[]\",\n \"components\": [\n {\n \"name\": \"intermediateCurrency\",\n \"type\": \"address\",\n \"internalType\": \"Currency\"\n },\n {\n \"name\": \"fee\",\n \"type\": \"uint24\",\n \"internalType\": \"uint24\"\n },\n {\n \"name\": \"hooks\",\n \"type\": \"address\",\n \"internalType\": \"contract IHooks\"\n },\n {\n \"name\": \"poolManager\",\n \"type\": \"address\",\n \"internalType\": \"contract IPoolManager\"\n },\n {\n \"name\": \"hookData\",\n \"type\": \"bytes\",\n \"internalType\": \"bytes\"\n },\n {\n \"name\": \"parameters\",\n \"type\": \"bytes32\",\n \"internalType\": \"bytes32\"\n }\n ]\n },\n {\n \"name\": \"exactAmount\",\n \"type\": \"uint128\",\n \"internalType\": \"uint128\"\n }\n ]\n }\n ],\n \"outputs\": [\n {\n \"name\": \"amountIn\",\n \"type\": \"uint256\",\n \"internalType\": \"uint256\"\n },\n {\n \"name\": \"gasEstimate\",\n \"type\": \"uint256\",\n \"internalType\": \"uint256\"\n }\n ],\n \"stateMutability\": \"nonpayable\"\n },\n {\n \"type\": \"function\",\n \"name\": \"quoteExactOutputSingle\",\n \"inputs\": [\n {\n \"name\": \"params\",\n \"type\": \"tuple\",\n \"internalType\": \"struct IQuoter.QuoteExactSingleParams\",\n \"components\": [\n {\n \"name\": \"poolKey\",\n \"type\": \"tuple\",\n \"internalType\": \"struct PoolKey\",\n \"components\": [\n {\n \"name\": \"currency0\",\n \"type\": \"address\",\n \"internalType\": \"Currency\"\n },\n {\n \"name\": \"currency1\",\n \"type\": \"address\",\n \"internalType\": \"Currency\"\n },\n {\n \"name\": \"hooks\",\n \"type\": \"address\",\n \"internalType\": \"contract IHooks\"\n },\n {\n \"name\": \"poolManager\",\n \"type\": \"address\",\n \"internalType\": \"contract IPoolManager\"\n },\n {\n \"name\": \"fee\",\n \"type\": \"uint24\",\n \"internalType\": \"uint24\"\n },\n {\n \"name\": \"parameters\",\n \"type\": \"bytes32\",\n \"internalType\": \"bytes32\"\n }\n ]\n },\n {\n \"name\": \"zeroForOne\",\n \"type\": \"bool\",\n \"internalType\": \"bool\"\n },\n {\n \"name\": \"exactAmount\",\n \"type\": \"uint128\",\n \"internalType\": \"uint128\"\n },\n {\n \"name\": \"hookData\",\n \"type\": \"bytes\",\n \"internalType\": \"bytes\"\n }\n ]\n }\n ],\n \"outputs\": [\n {\n \"name\": \"amountIn\",\n \"type\": \"uint256\",\n \"internalType\": \"uint256\"\n },\n {\n \"name\": \"gasEstimate\",\n \"type\": \"uint256\",\n \"internalType\": \"uint256\"\n }\n ],\n \"stateMutability\": \"nonpayable\"\n },\n {\n \"type\": \"function\",\n \"name\": \"vault\",\n \"inputs\": [],\n \"outputs\": [\n {\n \"name\": \"\",\n \"type\": \"address\",\n \"internalType\": \"contract IVault\"\n }\n ],\n \"stateMutability\": \"view\"\n }\n];\n/**\n * `CLPositionManager` — liquidity positions as ERC-721. `modifyLiquidities` takes an encoded action plan, not named arguments; the reads below are what a portfolio screen needs.\n *\n * 31 errors, 5 events, 21 functions - curated from the compiled artifact, not the full ABI.\n */\nexport const CL_POSITION_MANAGER_ABI = [\n {\n \"type\": \"error\",\n \"name\": \"AlreadySubscribed\",\n \"inputs\": [\n {\n \"name\": \"tokenId\",\n \"type\": \"uint256\",\n \"internalType\": \"uint256\"\n },\n {\n \"name\": \"subscriber\",\n \"type\": \"address\",\n \"internalType\": \"address\"\n }\n ]\n },\n {\n \"type\": \"error\",\n \"name\": \"BurnNotificationReverted\",\n \"inputs\": [\n {\n \"name\": \"subscriber\",\n \"type\": \"address\",\n \"internalType\": \"address\"\n },\n {\n \"name\": \"reason\",\n \"type\": \"bytes\",\n \"internalType\": \"bytes\"\n }\n ]\n },\n {\n \"type\": \"error\",\n \"name\": \"ContractLocked\",\n \"inputs\": []\n },\n {\n \"type\": \"error\",\n \"name\": \"DeadlinePassed\",\n \"inputs\": [\n {\n \"name\": \"deadline\",\n \"type\": \"uint256\",\n \"internalType\": \"uint256\"\n }\n ]\n },\n {\n \"type\": \"error\",\n \"name\": \"DeltaNotNegative\",\n \"inputs\": [\n {\n \"name\": \"currency\",\n \"type\": \"address\",\n \"internalType\": \"Currency\"\n }\n ]\n },\n {\n \"type\": \"error\",\n \"name\": \"DeltaNotPositive\",\n \"inputs\": [\n {\n \"name\": \"currency\",\n \"type\": \"address\",\n \"internalType\": \"Currency\"\n }\n ]\n },\n {\n \"type\": \"error\",\n \"name\": \"GasLimitTooLow\",\n \"inputs\": []\n },\n {\n \"type\": \"error\",\n \"name\": \"InputLengthMismatch\",\n \"inputs\": []\n },\n {\n \"type\": \"error\",\n \"name\": \"InsufficientBalance\",\n \"inputs\": []\n },\n {\n \"type\": \"error\",\n \"name\": \"InvalidContractSignature\",\n \"inputs\": []\n },\n {\n \"type\": \"error\",\n \"name\": \"InvalidEthSender\",\n \"inputs\": []\n },\n {\n \"type\": \"error\",\n \"name\": \"InvalidSignature\",\n \"inputs\": []\n },\n {\n \"type\": \"error\",\n \"name\": \"InvalidSignatureLength\",\n \"inputs\": []\n },\n {\n \"type\": \"error\",\n \"name\": \"InvalidSigner\",\n \"inputs\": []\n },\n {\n \"type\": \"error\",\n \"name\": \"InvalidTick\",\n \"inputs\": [\n {\n \"name\": \"tick\",\n \"type\": \"int24\",\n \"internalType\": \"int24\"\n }\n ]\n },\n {\n \"type\": \"error\",\n \"name\": \"InvalidTokenID\",\n \"inputs\": []\n },\n {\n \"type\": \"error\",\n \"name\": \"MaximumAmountExceeded\",\n \"inputs\": [\n {\n \"name\": \"maximumAmount\",\n \"type\": \"uint128\",\n \"internalType\": \"uint128\"\n },\n {\n \"name\": \"amountRequested\",\n \"type\": \"uint128\",\n \"internalType\": \"uint128\"\n }\n ]\n },\n {\n \"type\": \"error\",\n \"name\": \"MinimumAmountInsufficient\",\n \"inputs\": [\n {\n \"name\": \"minimumAmount\",\n \"type\": \"uint128\",\n \"internalType\": \"uint128\"\n },\n {\n \"name\": \"amountReceived\",\n \"type\": \"uint128\",\n \"internalType\": \"uint128\"\n }\n ]\n },\n {\n \"type\": \"error\",\n \"name\": \"ModifyLiquidityNotificationReverted\",\n \"inputs\": [\n {\n \"name\": \"subscriber\",\n \"type\": \"address\",\n \"internalType\": \"address\"\n },\n {\n \"name\": \"reason\",\n \"type\": \"bytes\",\n \"internalType\": \"bytes\"\n }\n ]\n },\n {\n \"type\": \"error\",\n \"name\": \"NoCodeSubscriber\",\n \"inputs\": []\n },\n {\n \"type\": \"error\",\n \"name\": \"NoSelfPermit\",\n \"inputs\": []\n },\n {\n \"type\": \"error\",\n \"name\": \"NonceAlreadyUsed\",\n \"inputs\": []\n },\n {\n \"type\": \"error\",\n \"name\": \"NotApproved\",\n \"inputs\": [\n {\n \"name\": \"caller\",\n \"type\": \"address\",\n \"internalType\": \"address\"\n }\n ]\n },\n {\n \"type\": \"error\",\n \"name\": \"NotSubscribed\",\n \"inputs\": []\n },\n {\n \"type\": \"error\",\n \"name\": \"NotVault\",\n \"inputs\": []\n },\n {\n \"type\": \"error\",\n \"name\": \"SafeCastOverflow\",\n \"inputs\": []\n },\n {\n \"type\": \"error\",\n \"name\": \"SignatureDeadlineExpired\",\n \"inputs\": []\n },\n {\n \"type\": \"error\",\n \"name\": \"SubscriptionReverted\",\n \"inputs\": [\n {\n \"name\": \"subscriber\",\n \"type\": \"address\",\n \"internalType\": \"address\"\n },\n {\n \"name\": \"reason\",\n \"type\": \"bytes\",\n \"internalType\": \"bytes\"\n }\n ]\n },\n {\n \"type\": \"error\",\n \"name\": \"Unauthorized\",\n \"inputs\": []\n },\n {\n \"type\": \"error\",\n \"name\": \"UnsupportedAction\",\n \"inputs\": [\n {\n \"name\": \"action\",\n \"type\": \"uint256\",\n \"internalType\": \"uint256\"\n }\n ]\n },\n {\n \"type\": \"error\",\n \"name\": \"VaultMustBeUnlocked\",\n \"inputs\": []\n },\n {\n \"type\": \"event\",\n \"name\": \"Approval\",\n \"inputs\": [\n {\n \"name\": \"owner\",\n \"type\": \"address\",\n \"indexed\": true,\n \"internalType\": \"address\"\n },\n {\n \"name\": \"spender\",\n \"type\": \"address\",\n \"indexed\": true,\n \"internalType\": \"address\"\n },\n {\n \"name\": \"id\",\n \"type\": \"uint256\",\n \"indexed\": true,\n \"internalType\": \"uint256\"\n }\n ],\n \"anonymous\": false\n },\n {\n \"type\": \"event\",\n \"name\": \"ApprovalForAll\",\n \"inputs\": [\n {\n \"name\": \"owner\",\n \"type\": \"address\",\n \"indexed\": true,\n \"internalType\": \"address\"\n },\n {\n \"name\": \"operator\",\n \"type\": \"address\",\n \"indexed\": true,\n \"internalType\": \"address\"\n },\n {\n \"name\": \"approved\",\n \"type\": \"bool\",\n \"indexed\": false,\n \"internalType\": \"bool\"\n }\n ],\n \"anonymous\": false\n },\n {\n \"type\": \"event\",\n \"name\": \"MintPosition\",\n \"inputs\": [\n {\n \"name\": \"tokenId\",\n \"type\": \"uint256\",\n \"indexed\": true,\n \"internalType\": \"uint256\"\n }\n ],\n \"anonymous\": false\n },\n {\n \"type\": \"event\",\n \"name\": \"ModifyLiquidity\",\n \"inputs\": [\n {\n \"name\": \"tokenId\",\n \"type\": \"uint256\",\n \"indexed\": true,\n \"internalType\": \"uint256\"\n },\n {\n \"name\": \"liquidityChange\",\n \"type\": \"int256\",\n \"indexed\": false,\n \"internalType\": \"int256\"\n },\n {\n \"name\": \"feesAccrued\",\n \"type\": \"int256\",\n \"indexed\": false,\n \"internalType\": \"BalanceDelta\"\n }\n ],\n \"anonymous\": false\n },\n {\n \"type\": \"event\",\n \"name\": \"Transfer\",\n \"inputs\": [\n {\n \"name\": \"from\",\n \"type\": \"address\",\n \"indexed\": true,\n \"internalType\": \"address\"\n },\n {\n \"name\": \"to\",\n \"type\": \"address\",\n \"indexed\": true,\n \"internalType\": \"address\"\n },\n {\n \"name\": \"id\",\n \"type\": \"uint256\",\n \"indexed\": true,\n \"internalType\": \"uint256\"\n }\n ],\n \"anonymous\": false\n },\n {\n \"type\": \"function\",\n \"name\": \"WETH9\",\n \"inputs\": [],\n \"outputs\": [\n {\n \"name\": \"\",\n \"type\": \"address\",\n \"internalType\": \"contract IWETH9\"\n }\n ],\n \"stateMutability\": \"view\"\n },\n {\n \"type\": \"function\",\n \"name\": \"approve\",\n \"inputs\": [\n {\n \"name\": \"spender\",\n \"type\": \"address\",\n \"internalType\": \"address\"\n },\n {\n \"name\": \"id\",\n \"type\": \"uint256\",\n \"internalType\": \"uint256\"\n }\n ],\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\"\n },\n {\n \"type\": \"function\",\n \"name\": \"balanceOf\",\n \"inputs\": [\n {\n \"name\": \"owner\",\n \"type\": \"address\",\n \"internalType\": \"address\"\n }\n ],\n \"outputs\": [\n {\n \"name\": \"\",\n \"type\": \"uint256\",\n \"internalType\": \"uint256\"\n }\n ],\n \"stateMutability\": \"view\"\n },\n {\n \"type\": \"function\",\n \"name\": \"clPoolManager\",\n \"inputs\": [],\n \"outputs\": [\n {\n \"name\": \"\",\n \"type\": \"address\",\n \"internalType\": \"contract ICLPoolManager\"\n }\n ],\n \"stateMutability\": \"view\"\n },\n {\n \"type\": \"function\",\n \"name\": \"getApproved\",\n \"inputs\": [\n {\n \"name\": \"\",\n \"type\": \"uint256\",\n \"internalType\": \"uint256\"\n }\n ],\n \"outputs\": [\n {\n \"name\": \"\",\n \"type\": \"address\",\n \"internalType\": \"address\"\n }\n ],\n \"stateMutability\": \"view\"\n },\n {\n \"type\": \"function\",\n \"name\": \"getPoolAndPositionInfo\",\n \"inputs\": [\n {\n \"name\": \"tokenId\",\n \"type\": \"uint256\",\n \"internalType\": \"uint256\"\n }\n ],\n \"outputs\": [\n {\n \"name\": \"poolKey\",\n \"type\": \"tuple\",\n \"internalType\": \"struct PoolKey\",\n \"components\": [\n {\n \"name\": \"currency0\",\n \"type\": \"address\",\n \"internalType\": \"Currency\"\n },\n {\n \"name\": \"currency1\",\n \"type\": \"address\",\n \"internalType\": \"Currency\"\n },\n {\n \"name\": \"hooks\",\n \"type\": \"address\",\n \"internalType\": \"contract IHooks\"\n },\n {\n \"name\": \"poolManager\",\n \"type\": \"address\",\n \"internalType\": \"contract IPoolManager\"\n },\n {\n \"name\": \"fee\",\n \"type\": \"uint24\",\n \"internalType\": \"uint24\"\n },\n {\n \"name\": \"parameters\",\n \"type\": \"bytes32\",\n \"internalType\": \"bytes32\"\n }\n ]\n },\n {\n \"name\": \"info\",\n \"type\": \"uint256\",\n \"internalType\": \"CLPositionInfo\"\n }\n ],\n \"stateMutability\": \"view\"\n },\n {\n \"type\": \"function\",\n \"name\": \"getPositionLiquidity\",\n \"inputs\": [\n {\n \"name\": \"tokenId\",\n \"type\": \"uint256\",\n \"internalType\": \"uint256\"\n }\n ],\n \"outputs\": [\n {\n \"name\": \"liquidity\",\n \"type\": \"uint128\",\n \"internalType\": \"uint128\"\n }\n ],\n \"stateMutability\": \"view\"\n },\n {\n \"type\": \"function\",\n \"name\": \"initializePool\",\n \"inputs\": [\n {\n \"name\": \"key\",\n \"type\": \"tuple\",\n \"internalType\": \"struct PoolKey\",\n \"components\": [\n {\n \"name\": \"currency0\",\n \"type\": \"address\",\n \"internalType\": \"Currency\"\n },\n {\n \"name\": \"currency1\",\n \"type\": \"address\",\n \"internalType\": \"Currency\"\n },\n {\n \"name\": \"hooks\",\n \"type\": \"address\",\n \"internalType\": \"contract IHooks\"\n },\n {\n \"name\": \"poolManager\",\n \"type\": \"address\",\n \"internalType\": \"contract IPoolManager\"\n },\n {\n \"name\": \"fee\",\n \"type\": \"uint24\",\n \"internalType\": \"uint24\"\n },\n {\n \"name\": \"parameters\",\n \"type\": \"bytes32\",\n \"internalType\": \"bytes32\"\n }\n ]\n },\n {\n \"name\": \"sqrtPriceX96\",\n \"type\": \"uint160\",\n \"internalType\": \"uint160\"\n }\n ],\n \"outputs\": [\n {\n \"name\": \"\",\n \"type\": \"int24\",\n \"internalType\": \"int24\"\n }\n ],\n \"stateMutability\": \"payable\"\n },\n {\n \"type\": \"function\",\n \"name\": \"isApprovedForAll\",\n \"inputs\": [\n {\n \"name\": \"\",\n \"type\": \"address\",\n \"internalType\": \"address\"\n },\n {\n \"name\": \"\",\n \"type\": \"address\",\n \"internalType\": \"address\"\n }\n ],\n \"outputs\": [\n {\n \"name\": \"\",\n \"type\": \"bool\",\n \"internalType\": \"bool\"\n }\n ],\n \"stateMutability\": \"view\"\n },\n {\n \"type\": \"function\",\n \"name\": \"modifyLiquidities\",\n \"inputs\": [\n {\n \"name\": \"payload\",\n \"type\": \"bytes\",\n \"internalType\": \"bytes\"\n },\n {\n \"name\": \"deadline\",\n \"type\": \"uint256\",\n \"internalType\": \"uint256\"\n }\n ],\n \"outputs\": [],\n \"stateMutability\": \"payable\"\n },\n {\n \"type\": \"function\",\n \"name\": \"modifyLiquiditiesWithoutLock\",\n \"inputs\": [\n {\n \"name\": \"actions\",\n \"type\": \"bytes\",\n \"internalType\": \"bytes\"\n },\n {\n \"name\": \"params\",\n \"type\": \"bytes[]\",\n \"internalType\": \"bytes[]\"\n }\n ],\n \"outputs\": [],\n \"stateMutability\": \"payable\"\n },\n {\n \"type\": \"function\",\n \"name\": \"nextTokenId\",\n \"inputs\": [],\n \"outputs\": [\n {\n \"name\": \"\",\n \"type\": \"uint256\",\n \"internalType\": \"uint256\"\n }\n ],\n \"stateMutability\": \"view\"\n },\n {\n \"type\": \"function\",\n \"name\": \"ownerOf\",\n \"inputs\": [\n {\n \"name\": \"id\",\n \"type\": \"uint256\",\n \"internalType\": \"uint256\"\n }\n ],\n \"outputs\": [\n {\n \"name\": \"owner\",\n \"type\": \"address\",\n \"internalType\": \"address\"\n }\n ],\n \"stateMutability\": \"view\"\n },\n {\n \"type\": \"function\",\n \"name\": \"permit2\",\n \"inputs\": [],\n \"outputs\": [\n {\n \"name\": \"\",\n \"type\": \"address\",\n \"internalType\": \"contract IAllowanceTransfer\"\n }\n ],\n \"stateMutability\": \"view\"\n },\n {\n \"type\": \"function\",\n \"name\": \"poolKeys\",\n \"inputs\": [\n {\n \"name\": \"poolId\",\n \"type\": \"bytes25\",\n \"internalType\": \"bytes25\"\n }\n ],\n \"outputs\": [\n {\n \"name\": \"currency0\",\n \"type\": \"address\",\n \"internalType\": \"Currency\"\n },\n {\n \"name\": \"currency1\",\n \"type\": \"address\",\n \"internalType\": \"Currency\"\n },\n {\n \"name\": \"hooks\",\n \"type\": \"address\",\n \"internalType\": \"contract IHooks\"\n },\n {\n \"name\": \"poolManager\",\n \"type\": \"address\",\n \"internalType\": \"contract IPoolManager\"\n },\n {\n \"name\": \"fee\",\n \"type\": \"uint24\",\n \"internalType\": \"uint24\"\n },\n {\n \"name\": \"parameters\",\n \"type\": \"bytes32\",\n \"internalType\": \"bytes32\"\n }\n ],\n \"stateMutability\": \"view\"\n },\n {\n \"type\": \"function\",\n \"name\": \"positionInfo\",\n \"inputs\": [\n {\n \"name\": \"tokenId\",\n \"type\": \"uint256\",\n \"internalType\": \"uint256\"\n }\n ],\n \"outputs\": [\n {\n \"name\": \"info\",\n \"type\": \"uint256\",\n \"internalType\": \"CLPositionInfo\"\n }\n ],\n \"stateMutability\": \"view\"\n },\n {\n \"type\": \"function\",\n \"name\": \"positions\",\n \"inputs\": [\n {\n \"name\": \"tokenId\",\n \"type\": \"uint256\",\n \"internalType\": \"uint256\"\n }\n ],\n \"outputs\": [\n {\n \"name\": \"poolKey\",\n \"type\": \"tuple\",\n \"internalType\": \"struct PoolKey\",\n \"components\": [\n {\n \"name\": \"currency0\",\n \"type\": \"address\",\n \"internalType\": \"Currency\"\n },\n {\n \"name\": \"currency1\",\n \"type\": \"address\",\n \"internalType\": \"Currency\"\n },\n {\n \"name\": \"hooks\",\n \"type\": \"address\",\n \"internalType\": \"contract IHooks\"\n },\n {\n \"name\": \"poolManager\",\n \"type\": \"address\",\n \"internalType\": \"contract IPoolManager\"\n },\n {\n \"name\": \"fee\",\n \"type\": \"uint24\",\n \"internalType\": \"uint24\"\n },\n {\n \"name\": \"parameters\",\n \"type\": \"bytes32\",\n \"internalType\": \"bytes32\"\n }\n ]\n },\n {\n \"name\": \"tickLower\",\n \"type\": \"int24\",\n \"internalType\": \"int24\"\n },\n {\n \"name\": \"tickUpper\",\n \"type\": \"int24\",\n \"internalType\": \"int24\"\n },\n {\n \"name\": \"liquidity\",\n \"type\": \"uint128\",\n \"internalType\": \"uint128\"\n },\n {\n \"name\": \"feeGrowthInside0LastX128\",\n \"type\": \"uint256\",\n \"internalType\": \"uint256\"\n },\n {\n \"name\": \"feeGrowthInside1LastX128\",\n \"type\": \"uint256\",\n \"internalType\": \"uint256\"\n },\n {\n \"name\": \"_subscriber\",\n \"type\": \"address\",\n \"internalType\": \"contract ICLSubscriber\"\n }\n ],\n \"stateMutability\": \"view\"\n },\n {\n \"type\": \"function\",\n \"name\": \"setApprovalForAll\",\n \"inputs\": [\n {\n \"name\": \"operator\",\n \"type\": \"address\",\n \"internalType\": \"address\"\n },\n {\n \"name\": \"approved\",\n \"type\": \"bool\",\n \"internalType\": \"bool\"\n }\n ],\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\"\n },\n {\n \"type\": \"function\",\n \"name\": \"tokenURI\",\n \"inputs\": [\n {\n \"name\": \"tokenId\",\n \"type\": \"uint256\",\n \"internalType\": \"uint256\"\n }\n ],\n \"outputs\": [\n {\n \"name\": \"\",\n \"type\": \"string\",\n \"internalType\": \"string\"\n }\n ],\n \"stateMutability\": \"view\"\n },\n {\n \"type\": \"function\",\n \"name\": \"transferFrom\",\n \"inputs\": [\n {\n \"name\": \"from\",\n \"type\": \"address\",\n \"internalType\": \"address\"\n },\n {\n \"name\": \"to\",\n \"type\": \"address\",\n \"internalType\": \"address\"\n },\n {\n \"name\": \"id\",\n \"type\": \"uint256\",\n \"internalType\": \"uint256\"\n }\n ],\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\"\n },\n {\n \"type\": \"function\",\n \"name\": \"vault\",\n \"inputs\": [],\n \"outputs\": [\n {\n \"name\": \"\",\n \"type\": \"address\",\n \"internalType\": \"contract IVault\"\n }\n ],\n \"stateMutability\": \"view\"\n }\n];\n/**\n * `BinPositionManager` — liquidity-book positions as per-bin fungible shares (ERC-1155-like, no `uri` and no receiver callback). `modifyLiquidities` takes the same encoded action plan; `initializePool` opens a pool at a bin id; the reads are what a positions screen needs.\n *\n * 24 errors, 2 events, 14 functions - curated from the compiled artifact, not the full ABI.\n */\nexport const BIN_POSITION_MANAGER_ABI = [\n {\n \"type\": \"error\",\n \"name\": \"AddLiquidityInputActiveIdMismatch\",\n \"inputs\": []\n },\n {\n \"type\": \"error\",\n \"name\": \"BinFungibleToken_AddressThisOrZero\",\n \"inputs\": []\n },\n {\n \"type\": \"error\",\n \"name\": \"BinFungibleToken_BurnExceedsBalance\",\n \"inputs\": [\n {\n \"name\": \"from\",\n \"type\": \"address\",\n \"internalType\": \"address\"\n },\n {\n \"name\": \"id\",\n \"type\": \"uint256\",\n \"internalType\": \"uint256\"\n },\n {\n \"name\": \"amount\",\n \"type\": \"uint256\",\n \"internalType\": \"uint256\"\n }\n ]\n },\n {\n \"type\": \"error\",\n \"name\": \"BinFungibleToken_InvalidLength\",\n \"inputs\": []\n },\n {\n \"type\": \"error\",\n \"name\": \"BinFungibleToken_SelfApproval\",\n \"inputs\": [\n {\n \"name\": \"owner\",\n \"type\": \"address\",\n \"internalType\": \"address\"\n }\n ]\n },\n {\n \"type\": \"error\",\n \"name\": \"BinFungibleToken_SpenderNotApproved\",\n \"inputs\": [\n {\n \"name\": \"from\",\n \"type\": \"address\",\n \"internalType\": \"address\"\n },\n {\n \"name\": \"spender\",\n \"type\": \"address\",\n \"internalType\": \"address\"\n }\n ]\n },\n {\n \"type\": \"error\",\n \"name\": \"BinFungibleToken_TransferExceedsBalance\",\n \"inputs\": [\n {\n \"name\": \"from\",\n \"type\": \"address\",\n \"internalType\": \"address\"\n },\n {\n \"name\": \"id\",\n \"type\": \"uint256\",\n \"internalType\": \"uint256\"\n },\n {\n \"name\": \"amount\",\n \"type\": \"uint256\",\n \"internalType\": \"uint256\"\n }\n ]\n },\n {\n \"type\": \"error\",\n \"name\": \"ContractLocked\",\n \"inputs\": []\n },\n {\n \"type\": \"error\",\n \"name\": \"DeadlinePassed\",\n \"inputs\": [\n {\n \"name\": \"deadline\",\n \"type\": \"uint256\",\n \"internalType\": \"uint256\"\n }\n ]\n },\n {\n \"type\": \"error\",\n \"name\": \"DeltaNotNegative\",\n \"inputs\": [\n {\n \"name\": \"currency\",\n \"type\": \"address\",\n \"internalType\": \"Currency\"\n }\n ]\n },\n {\n \"type\": \"error\",\n \"name\": \"DeltaNotPositive\",\n \"inputs\": [\n {\n \"name\": \"currency\",\n \"type\": \"address\",\n \"internalType\": \"Currency\"\n }\n ]\n },\n {\n \"type\": \"error\",\n \"name\": \"IdOverflows\",\n \"inputs\": [\n {\n \"name\": \"\",\n \"type\": \"int256\",\n \"internalType\": \"int256\"\n }\n ]\n },\n {\n \"type\": \"error\",\n \"name\": \"IdSlippageCaught\",\n \"inputs\": [\n {\n \"name\": \"activeIdDesired\",\n \"type\": \"uint256\",\n \"internalType\": \"uint256\"\n },\n {\n \"name\": \"idSlippage\",\n \"type\": \"uint256\",\n \"internalType\": \"uint256\"\n },\n {\n \"name\": \"activeId\",\n \"type\": \"uint24\",\n \"internalType\": \"uint24\"\n }\n ]\n },\n {\n \"type\": \"error\",\n \"name\": \"InputLengthMismatch\",\n \"inputs\": []\n },\n {\n \"type\": \"error\",\n \"name\": \"InsufficientBalance\",\n \"inputs\": []\n },\n {\n \"type\": \"error\",\n \"name\": \"InvalidEthSender\",\n \"inputs\": []\n },\n {\n \"type\": \"error\",\n \"name\": \"InvalidTokenID\",\n \"inputs\": []\n },\n {\n \"type\": \"error\",\n \"name\": \"LiquiditySlippageCaught\",\n \"inputs\": [\n {\n \"name\": \"binId\",\n \"type\": \"uint24\",\n \"internalType\": \"uint24\"\n },\n {\n \"name\": \"minLiquidity\",\n \"type\": \"uint256\",\n \"internalType\": \"uint256\"\n },\n {\n \"name\": \"liquidityMinted\",\n \"type\": \"uint256\",\n \"internalType\": \"uint256\"\n }\n ]\n },\n {\n \"type\": \"error\",\n \"name\": \"MaximumAmountExceeded\",\n \"inputs\": [\n {\n \"name\": \"maximumAmount\",\n \"type\": \"uint128\",\n \"internalType\": \"uint128\"\n },\n {\n \"name\": \"amountRequested\",\n \"type\": \"uint128\",\n \"internalType\": \"uint128\"\n }\n ]\n },\n {\n \"type\": \"error\",\n \"name\": \"MinimumAmountInsufficient\",\n \"inputs\": [\n {\n \"name\": \"minimumAmount\",\n \"type\": \"uint128\",\n \"internalType\": \"uint128\"\n },\n {\n \"name\": \"amountReceived\",\n \"type\": \"uint128\",\n \"internalType\": \"uint128\"\n }\n ]\n },\n {\n \"type\": \"error\",\n \"name\": \"NotVault\",\n \"inputs\": []\n },\n {\n \"type\": \"error\",\n \"name\": \"SafeCastOverflow\",\n \"inputs\": []\n },\n {\n \"type\": \"error\",\n \"name\": \"UnsupportedAction\",\n \"inputs\": [\n {\n \"name\": \"action\",\n \"type\": \"uint256\",\n \"internalType\": \"uint256\"\n }\n ]\n },\n {\n \"type\": \"error\",\n \"name\": \"VaultMustBeUnlocked\",\n \"inputs\": []\n },\n {\n \"type\": \"event\",\n \"name\": \"ApprovalForAll\",\n \"inputs\": [\n {\n \"name\": \"account\",\n \"type\": \"address\",\n \"indexed\": true,\n \"internalType\": \"address\"\n },\n {\n \"name\": \"sender\",\n \"type\": \"address\",\n \"indexed\": true,\n \"internalType\": \"address\"\n },\n {\n \"name\": \"approved\",\n \"type\": \"bool\",\n \"indexed\": false,\n \"internalType\": \"bool\"\n }\n ],\n \"anonymous\": false\n },\n {\n \"type\": \"event\",\n \"name\": \"TransferBatch\",\n \"inputs\": [\n {\n \"name\": \"sender\",\n \"type\": \"address\",\n \"indexed\": true,\n \"internalType\": \"address\"\n },\n {\n \"name\": \"from\",\n \"type\": \"address\",\n \"indexed\": true,\n \"internalType\": \"address\"\n },\n {\n \"name\": \"to\",\n \"type\": \"address\",\n \"indexed\": true,\n \"internalType\": \"address\"\n },\n {\n \"name\": \"ids\",\n \"type\": \"uint256[]\",\n \"indexed\": false,\n \"internalType\": \"uint256[]\"\n },\n {\n \"name\": \"amounts\",\n \"type\": \"uint256[]\",\n \"indexed\": false,\n \"internalType\": \"uint256[]\"\n }\n ],\n \"anonymous\": false\n },\n {\n \"type\": \"function\",\n \"name\": \"WETH9\",\n \"inputs\": [],\n \"outputs\": [\n {\n \"name\": \"\",\n \"type\": \"address\",\n \"internalType\": \"contract IWETH9\"\n }\n ],\n \"stateMutability\": \"view\"\n },\n {\n \"type\": \"function\",\n \"name\": \"approveForAll\",\n \"inputs\": [\n {\n \"name\": \"operator\",\n \"type\": \"address\",\n \"internalType\": \"address\"\n },\n {\n \"name\": \"approved\",\n \"type\": \"bool\",\n \"internalType\": \"bool\"\n }\n ],\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\"\n },\n {\n \"type\": \"function\",\n \"name\": \"balanceOf\",\n \"inputs\": [\n {\n \"name\": \"\",\n \"type\": \"address\",\n \"internalType\": \"address\"\n },\n {\n \"name\": \"\",\n \"type\": \"uint256\",\n \"internalType\": \"uint256\"\n }\n ],\n \"outputs\": [\n {\n \"name\": \"\",\n \"type\": \"uint256\",\n \"internalType\": \"uint256\"\n }\n ],\n \"stateMutability\": \"view\"\n },\n {\n \"type\": \"function\",\n \"name\": \"balanceOfBatch\",\n \"inputs\": [\n {\n \"name\": \"owners\",\n \"type\": \"address[]\",\n \"internalType\": \"address[]\"\n },\n {\n \"name\": \"ids\",\n \"type\": \"uint256[]\",\n \"internalType\": \"uint256[]\"\n }\n ],\n \"outputs\": [\n {\n \"name\": \"balances\",\n \"type\": \"uint256[]\",\n \"internalType\": \"uint256[]\"\n }\n ],\n \"stateMutability\": \"view\"\n },\n {\n \"type\": \"function\",\n \"name\": \"batchTransferFrom\",\n \"inputs\": [\n {\n \"name\": \"from\",\n \"type\": \"address\",\n \"internalType\": \"address\"\n },\n {\n \"name\": \"to\",\n \"type\": \"address\",\n \"internalType\": \"address\"\n },\n {\n \"name\": \"ids\",\n \"type\": \"uint256[]\",\n \"internalType\": \"uint256[]\"\n },\n {\n \"name\": \"amounts\",\n \"type\": \"uint256[]\",\n \"internalType\": \"uint256[]\"\n }\n ],\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\"\n },\n {\n \"type\": \"function\",\n \"name\": \"binPoolManager\",\n \"inputs\": [],\n \"outputs\": [\n {\n \"name\": \"\",\n \"type\": \"address\",\n \"internalType\": \"contract IBinPoolManager\"\n }\n ],\n \"stateMutability\": \"view\"\n },\n {\n \"type\": \"function\",\n \"name\": \"initializePool\",\n \"inputs\": [\n {\n \"name\": \"key\",\n \"type\": \"tuple\",\n \"internalType\": \"struct PoolKey\",\n \"components\": [\n {\n \"name\": \"currency0\",\n \"type\": \"address\",\n \"internalType\": \"Currency\"\n },\n {\n \"name\": \"currency1\",\n \"type\": \"address\",\n \"internalType\": \"Currency\"\n },\n {\n \"name\": \"hooks\",\n \"type\": \"address\",\n \"internalType\": \"contract IHooks\"\n },\n {\n \"name\": \"poolManager\",\n \"type\": \"address\",\n \"internalType\": \"contract IPoolManager\"\n },\n {\n \"name\": \"fee\",\n \"type\": \"uint24\",\n \"internalType\": \"uint24\"\n },\n {\n \"name\": \"parameters\",\n \"type\": \"bytes32\",\n \"internalType\": \"bytes32\"\n }\n ]\n },\n {\n \"name\": \"activeId\",\n \"type\": \"uint24\",\n \"internalType\": \"uint24\"\n }\n ],\n \"outputs\": [],\n \"stateMutability\": \"payable\"\n },\n {\n \"type\": \"function\",\n \"name\": \"isApprovedForAll\",\n \"inputs\": [\n {\n \"name\": \"\",\n \"type\": \"address\",\n \"internalType\": \"address\"\n },\n {\n \"name\": \"\",\n \"type\": \"address\",\n \"internalType\": \"address\"\n }\n ],\n \"outputs\": [\n {\n \"name\": \"\",\n \"type\": \"bool\",\n \"internalType\": \"bool\"\n }\n ],\n \"stateMutability\": \"view\"\n },\n {\n \"type\": \"function\",\n \"name\": \"modifyLiquidities\",\n \"inputs\": [\n {\n \"name\": \"payload\",\n \"type\": \"bytes\",\n \"internalType\": \"bytes\"\n },\n {\n \"name\": \"deadline\",\n \"type\": \"uint256\",\n \"internalType\": \"uint256\"\n }\n ],\n \"outputs\": [],\n \"stateMutability\": \"payable\"\n },\n {\n \"type\": \"function\",\n \"name\": \"modifyLiquiditiesWithoutLock\",\n \"inputs\": [\n {\n \"name\": \"actions\",\n \"type\": \"bytes\",\n \"internalType\": \"bytes\"\n },\n {\n \"name\": \"params\",\n \"type\": \"bytes[]\",\n \"internalType\": \"bytes[]\"\n }\n ],\n \"outputs\": [],\n \"stateMutability\": \"payable\"\n },\n {\n \"type\": \"function\",\n \"name\": \"permit2\",\n \"inputs\": [],\n \"outputs\": [\n {\n \"name\": \"\",\n \"type\": \"address\",\n \"internalType\": \"contract IAllowanceTransfer\"\n }\n ],\n \"stateMutability\": \"view\"\n },\n {\n \"type\": \"function\",\n \"name\": \"positions\",\n \"inputs\": [\n {\n \"name\": \"tokenId\",\n \"type\": \"uint256\",\n \"internalType\": \"uint256\"\n }\n ],\n \"outputs\": [\n {\n \"name\": \"\",\n \"type\": \"tuple\",\n \"internalType\": \"struct PoolKey\",\n \"components\": [\n {\n \"name\": \"currency0\",\n \"type\": \"address\",\n \"internalType\": \"Currency\"\n },\n {\n \"name\": \"currency1\",\n \"type\": \"address\",\n \"internalType\": \"Currency\"\n },\n {\n \"name\": \"hooks\",\n \"type\": \"address\",\n \"internalType\": \"contract IHooks\"\n },\n {\n \"name\": \"poolManager\",\n \"type\": \"address\",\n \"internalType\": \"contract IPoolManager\"\n },\n {\n \"name\": \"fee\",\n \"type\": \"uint24\",\n \"internalType\": \"uint24\"\n },\n {\n \"name\": \"parameters\",\n \"type\": \"bytes32\",\n \"internalType\": \"bytes32\"\n }\n ]\n },\n {\n \"name\": \"\",\n \"type\": \"uint24\",\n \"internalType\": \"uint24\"\n }\n ],\n \"stateMutability\": \"view\"\n },\n {\n \"type\": \"function\",\n \"name\": \"totalSupply\",\n \"inputs\": [\n {\n \"name\": \"\",\n \"type\": \"uint256\",\n \"internalType\": \"uint256\"\n }\n ],\n \"outputs\": [\n {\n \"name\": \"\",\n \"type\": \"uint256\",\n \"internalType\": \"uint256\"\n }\n ],\n \"stateMutability\": \"view\"\n },\n {\n \"type\": \"function\",\n \"name\": \"vault\",\n \"inputs\": [],\n \"outputs\": [\n {\n \"name\": \"\",\n \"type\": \"address\",\n \"internalType\": \"contract IVault\"\n }\n ],\n \"stateMutability\": \"view\"\n }\n];\n//# sourceMappingURL=abi.js.map","// SPDX-License-Identifier: MIT\n/**\n * Liquidity held PERMANENTLY by the protocol's LP lockers: `LatchLPLocker`\n * (CL position NFTs) and `LatchBinLPLocker` (Bin shares). Every Kit v2 launch\n * seeds its pools into them. Neither contract has any withdraw path: a\n * position or a share that enters is never removed (only its fees are\n * harvested). So these read as \"locked permanently (LP locker)\", distinct from\n * `LatchPositionLock`'s \"time-locked until <date>\".\n *\n * DISCOVERY.\n * CL The locker keys locks by position token id, which is not a sequence,\n * so the positions in a pool are found from its `PositionLocked` logs\n * (`poolId` is an indexed topic). `findClLpLockerTokenIds` scans ONE\n * block range; a caller whose RPC caps log ranges windows it.\n * `readClLpLockerPositions` then reads each record and the position.\n * Bin Lock ids are `1..lockCount`, so every lock is enumerable with no log\n * scan; `readBinLpLockerLocks({ poolId })` keeps those of the pool.\n *\n * WHAT A BIN LOCK'S SHARE MEANS. A Bin pool has no single \"active liquidity\";\n * liquidity sits in discrete bins, each with its own shares. For every locked\n * bin the locked fraction is exact: locked shares / `getBin(...).totalShares`,\n * and the tokens it is worth are that fraction of the bin's reserves (floor).\n * The pool-level figure reported is the locked fraction of the ACTIVE bin (the\n * one that trades at the current price), the Bin analogue of CL active\n * liquidity. A pool-wide percentage across all bins is NOT computed: it would\n * need every bin of the pool, and a sum of shares across bins is not a common\n * unit. Amounts across locked bins are summed per token and are exact.\n */\nimport { getAbiItem, parseAbiItem } from \"viem\";\nimport { CL_POSITION_MANAGER_ABI } from \"../trading/generated/abi.js\";\nimport { LATCH_BIN_LP_LOCKER_ABI, LATCH_LP_LOCKER_ABI } from \"../launchpad/generated/abi.js\";\nimport { positionAmounts } from \"./clAmounts.js\";\nimport { readCLPoolState } from \"./position.js\";\nconst CL_POSITION_LOCKED = getAbiItem({ abi: LATCH_LP_LOCKER_ABI, name: \"PositionLocked\" });\nconst BIN_POOL_ABI = [\n parseAbiItem(\"function getSlot0(bytes32 id) view returns (uint24 activeId, uint24 protocolFee, uint24 lpFee)\"),\n parseAbiItem(\"function getBin(bytes32 id, uint24 binId) view returns (uint128 binReserveX, uint128 binReserveY, uint256 binLiquidity, uint256 totalShares)\"),\n];\n/** Token ids the CL LP locker received for `poolId` (or for any pool when omitted) in one block range. */\nexport async function findClLpLockerTokenIds(client, locker, range, poolId) {\n const logs = await client.getLogs({\n address: locker,\n event: CL_POSITION_LOCKED,\n ...(poolId !== undefined ? { args: { poolId } } : {}),\n fromBlock: range.fromBlock,\n toBlock: range.toBlock,\n });\n const out = [];\n for (const l of logs) {\n const tokenId = l.args.tokenId;\n const pid = l.args.poolId;\n if (tokenId === undefined || pid === undefined)\n continue;\n if (!out.some((o) => o.tokenId === tokenId))\n out.push({ tokenId, poolId: pid });\n }\n return out;\n}\n/** The CL LP locker's record and position for each token id (non-locked ids are dropped). */\nexport async function readClLpLockerPositions(client, locker, tokenIds, pools = new Map()) {\n if (tokenIds.length === 0)\n return [];\n const posm = await client.readContract({ address: locker, abi: LATCH_LP_LOCKER_ABI, functionName: \"positionManager\" });\n const rows = await Promise.all(tokenIds.map(async (tokenId) => {\n const [locked, rec, p] = await Promise.all([\n client.readContract({ address: locker, abi: LATCH_LP_LOCKER_ABI, functionName: \"isLocked\", args: [tokenId] }),\n client.readContract({ address: locker, abi: LATCH_LP_LOCKER_ABI, functionName: \"getLock\", args: [tokenId] }),\n client.readContract({ address: posm, abi: CL_POSITION_MANAGER_ABI, functionName: \"positions\", args: [tokenId] }),\n ]);\n if (!locked)\n return null;\n const tickLower = Number(p[1]);\n const tickUpper = Number(p[2]);\n const liquidity = p[3];\n const poolId = rec.poolId;\n const pool = pools.get(poolId.toLowerCase()) ?? null;\n const a = pool === null ? null : positionAmounts({ liquidity, tickLower, tickUpper, tick: pool.tick, sqrtPriceX96: pool.sqrtPriceX96 });\n return {\n kind: \"cl-lp-locker\",\n locker,\n tokenId,\n poolId,\n currency0: rec.currency0,\n currency1: rec.currency1,\n creator: rec.creator,\n lockedAt: BigInt(rec.lockedAt),\n tickLower,\n tickUpper,\n liquidity,\n amount0: a?.amount0 ?? null,\n amount1: a?.amount1 ?? null,\n inRange: a?.inRange ?? null,\n };\n }));\n return rows.filter((r) => r !== null);\n}\n/** Every Bin LP-locker lock, or those of one pool, with per-bin exact shares and amounts. */\nexport async function readBinLpLockerLocks(client, locker, opts = {}) {\n const [count, poolManager] = await Promise.all([\n client.readContract({ address: locker, abi: LATCH_BIN_LP_LOCKER_ABI, functionName: \"lockCount\" }),\n client.readContract({ address: locker, abi: LATCH_BIN_LP_LOCKER_ABI, functionName: \"binPoolManager\" }),\n ]);\n const total = Number(count);\n const max = opts.maxLocks ?? 2_000;\n const first = total > max ? total - max + 1 : 1;\n const ids = [];\n for (let i = first; i <= total; i++)\n ids.push(BigInt(i));\n const recs = await Promise.all(ids.map((id) => client.readContract({ address: locker, abi: LATCH_BIN_LP_LOCKER_ABI, functionName: \"getLock\", args: [id] })));\n const want = opts.poolId?.toLowerCase();\n const picked = ids.map((id, i) => ({ id, rec: recs[i] })).filter((x) => want === undefined || x.rec.poolId.toLowerCase() === want);\n const locks = await Promise.all(picked.map(async ({ id, rec }) => {\n const [key, bins] = await Promise.all([\n client.readContract({ address: locker, abi: LATCH_BIN_LP_LOCKER_ABI, functionName: \"getPoolKey\", args: [id] }),\n client.readContract({ address: locker, abi: LATCH_BIN_LP_LOCKER_ABI, functionName: \"getLockedBins\", args: [id] }),\n ]);\n const [binIds, shares] = bins;\n const poolId = rec.poolId;\n const states = await Promise.all(binIds.map((b) => client.readContract({ address: poolManager, abi: BIN_POOL_ABI, functionName: \"getBin\", args: [poolId, Number(b)] })));\n let amount0 = 0n;\n let amount1 = 0n;\n const out = binIds.map((b, i) => {\n const [rx, ry, , ts] = states[i];\n const s = shares[i] ?? 0n;\n const x = ts === 0n ? 0n : (BigInt(rx) * s) / ts;\n const y = ts === 0n ? 0n : (BigInt(ry) * s) / ts;\n amount0 += x;\n amount1 += y;\n return { binId: Number(b), shares: s, totalShares: ts, shareBps: ts === 0n ? null : Number((s * 10000n) / ts), amountX: x, amountY: y };\n });\n return {\n kind: \"bin-lp-locker\",\n locker,\n lockId: id,\n poolId,\n currency0: key.currency0,\n currency1: key.currency1,\n creator: rec.creator,\n lockedAt: BigInt(rec.lockedAt),\n bins: out,\n amount0,\n amount1,\n };\n }));\n return { locks, total, truncated: first > 1 };\n}\n/** Pure: a Bin pool's permanent summary from its locks and its active bin. */\nexport function summarizeBinPermanent(poolId, locks, active) {\n let amount0 = 0n;\n let amount1 = 0n;\n let activeShares = 0n;\n for (const l of locks) {\n amount0 += l.amount0;\n amount1 += l.amount1;\n for (const b of l.bins)\n if (active !== null && b.binId === active.activeId)\n activeShares += b.shares;\n }\n const activeBinLockedBps = active === null || active.totalShares === 0n || activeShares === 0n ? null : Number((activeShares * 10000n) / active.totalShares);\n return { poolId, activeId: active?.activeId ?? null, locks, amount0, amount1, activeBinLockedBps };\n}\n/** One Bin pool's permanent locks, its active bin, and the locked fraction of that bin. */\nexport async function readBinPoolPermanent(client, locker, poolId) {\n const { locks } = await readBinLpLockerLocks(client, locker, { poolId });\n const poolManager = await client.readContract({ address: locker, abi: LATCH_BIN_LP_LOCKER_ABI, functionName: \"binPoolManager\" });\n const active = await client\n .readContract({ address: poolManager, abi: BIN_POOL_ABI, functionName: \"getSlot0\", args: [poolId] })\n .then(async ([activeId]) => {\n const [, , , ts] = await client.readContract({ address: poolManager, abi: BIN_POOL_ABI, functionName: \"getBin\", args: [poolId, Number(activeId)] });\n return { activeId: Number(activeId), totalShares: ts };\n })\n .catch(() => null);\n return summarizeBinPermanent(poolId, locks, active);\n}\n/**\n * Pure: how much of `token` the protocol's LP lockers hold permanently, per\n * pool. CL amounts need prices (positions read with pool states); a position\n * without them counts 0 and `unpriced` says how many were skipped.\n */\nexport function permanentTokenPools(token, cl, bin) {\n const t = token.toLowerCase();\n const by = new Map();\n let unpriced = 0;\n const add = (poolId, kind, c0, c1, a0, a1) => {\n const is0 = c0.toLowerCase() === t;\n if (!is0 && c1.toLowerCase() !== t)\n return;\n const amt = is0 ? a0 : a1;\n if (amt === null)\n unpriced += 1;\n const k = `${kind}:${poolId.toLowerCase()}`;\n const e = by.get(k) ?? { poolId, kind, pairedWith: is0 ? c1 : c0, amount: 0n, locks: 0 };\n e.amount += amt ?? 0n;\n e.locks += 1;\n by.set(k, e);\n };\n for (const p of cl)\n add(p.poolId, p.kind, p.currency0, p.currency1, p.amount0, p.amount1);\n for (const l of bin)\n add(l.poolId, l.kind, l.currency0, l.currency1, l.amount0, l.amount1);\n const pools = [...by.values()];\n return { pools, total: pools.reduce((s, p) => s + p.amount, 0n), unpriced };\n}\n/**\n * `readClLpLockerPositions` with prices: reads the locker's position manager,\n * its CL pool manager and each pool's state, so every position carries its\n * token amounts and whether it is in range.\n */\nexport async function readClLpLockerPositionsPriced(client, locker, tokenIds) {\n const bare = await readClLpLockerPositions(client, locker, tokenIds);\n if (bare.length === 0)\n return bare;\n const posm = await client.readContract({ address: locker, abi: LATCH_LP_LOCKER_ABI, functionName: \"positionManager\" });\n const poolManager = await client.readContract({ address: posm, abi: CL_POSITION_MANAGER_ABI, functionName: \"clPoolManager\" });\n const ids = [...new Set(bare.map((p) => p.poolId.toLowerCase()))];\n const states = await Promise.all(ids.map((id) => readCLPoolState(client, poolManager, id).catch(() => null)));\n const pools = new Map(ids.map((id, i) => [id, states[i] ?? null]));\n return bare.map((p) => {\n const pool = pools.get(p.poolId.toLowerCase()) ?? null;\n if (pool === null)\n return p;\n const a = positionAmounts({ liquidity: p.liquidity, tickLower: p.tickLower, tickUpper: p.tickUpper, tick: pool.tick, sqrtPriceX96: pool.sqrtPriceX96 });\n return { ...p, amount0: a.amount0, amount1: a.amount1, inRange: a.inRange };\n });\n}\n/** One CL pool's permanent positions and its state, from the CL LP locker alone (no time-lock contract needed). */\nexport async function readClPoolPermanent(client, locker, poolId, src) {\n const posm = await client.readContract({ address: locker, abi: LATCH_LP_LOCKER_ABI, functionName: \"positionManager\" });\n const poolManager = await client.readContract({ address: posm, abi: CL_POSITION_MANAGER_ABI, functionName: \"clPoolManager\" });\n const ids = src.tokenIds ?? (src.logRange ? (await findClLpLockerTokenIds(client, locker, src.logRange, poolId)).map((x) => x.tokenId) : []);\n const pool = await readCLPoolState(client, poolManager, poolId).catch(() => null);\n const pools = new Map([[poolId.toLowerCase(), pool]]);\n const permanent = (await readClLpLockerPositions(client, locker, ids, pools)).filter((p) => p.poolId.toLowerCase() === poolId.toLowerCase());\n return { pool, permanent };\n}\n//# sourceMappingURL=lpLockers.js.map","// SPDX-License-Identifier: MIT\n/**\n * `LatchPositionLock`: time-locked CL liquidity positions.\n *\n * A lock holds one `CLPositionManager` NFT until `unlockAt`. Until then nobody\n * can remove its liquidity or move the NFT; the lock owner keeps collecting\n * its swap fees (`collectFees`, permissionless, pays only the lock owner) and\n * withdraws the NFT after `unlockAt`. A lock can be extended, never shortened.\n * The lock owner rotates two-step.\n *\n * HOW MUCH OF A POOL IS LOCKED, and why it is not \"% of LP tokens\". A CL pool\n * has no LP token and no single \"total liquidity\": liquidity lives in tick\n * ranges. The one pool-wide figure core stores is the ACTIVE liquidity at the\n * current tick (`CLPoolManager.getLiquidity(poolId)`), which is exactly the sum\n * of the liquidity of every position whose range contains the current tick.\n * A locked position contributes to it when `tickLower <= tick < tickUpper`.\n * So `lockedActiveBps` = (liquidity of live, in-range locked positions) /\n * (pool active liquidity), in the same units, exact at the block read. It says\n * nothing about liquidity outside the current price, and it moves when the\n * price moves. Locked positions out of range are listed with their token\n * amounts and counted separately (`outOfRangeLive`).\n *\n * Independently authored against the contract's compiled ABI and documented\n * rules (`packages/launchpad/src/lock/LatchPositionLock.sol`).\n */\nimport { encodeFunctionData, getAddress, isAddress, zeroAddress } from \"viem\";\nimport { CL_POSITION_MANAGER_ABI } from \"../trading/generated/abi.js\";\nimport { LATCH_POSITION_LOCK_ABI } from \"../launchpad/generated/abi.js\";\nimport { feeSafeValue } from \"../utilities/feeGate.js\";\nimport { positionAmounts } from \"./clAmounts.js\";\nimport { findClLpLockerTokenIds, readClLpLockerPositions } from \"./lpLockers.js\";\n/** `MAX_LOCK_SECONDS`: the longest lock accepted, from the block it is made in. */\nexport const POSITION_LOCK_MAX_SECONDS = 100n * 365n * 86400n;\nconst CL_POOL_STATE_ABI = [\n {\n type: \"function\",\n name: \"getSlot0\",\n stateMutability: \"view\",\n inputs: [{ name: \"id\", type: \"bytes32\" }],\n outputs: [\n { name: \"sqrtPriceX96\", type: \"uint160\" },\n { name: \"tick\", type: \"int24\" },\n { name: \"protocolFee\", type: \"uint24\" },\n { name: \"lpFee\", type: \"uint24\" },\n ],\n },\n {\n type: \"function\",\n name: \"getLiquidity\",\n stateMutability: \"view\",\n inputs: [{ name: \"id\", type: \"bytes32\" }],\n outputs: [{ name: \"liquidity\", type: \"uint128\" }],\n },\n];\nexport function positionLockStatus(r, nowSeconds) {\n if (r.withdrawn)\n return \"withdrawn\";\n return nowSeconds < r.unlockAt ? \"locked\" : \"unlockable\";\n}\n/** Seconds until `unlockAt` (0 once reached). */\nexport function secondsUntil(target, nowSeconds) {\n return target > nowSeconds ? target - nowSeconds : 0n;\n}\n/** `getLock(tokenId)` → a record, or `null` when the position was never locked here. */\nexport function decodePositionLock(lock, tokenId, raw) {\n if (raw.owner === zeroAddress)\n return null;\n return {\n lock,\n tokenId,\n owner: raw.owner,\n pendingOwner: raw.pendingOwner === zeroAddress ? null : raw.pendingOwner,\n lockedAt: BigInt(raw.lockedAt),\n unlockAt: BigInt(raw.unlockAt),\n poolId: raw.poolId,\n currency0: raw.currency0,\n currency1: raw.currency1,\n withdrawn: raw.withdrawn,\n };\n}\nexport async function readPositionLockContext(client, lock) {\n const positionManager = await client.readContract({ address: lock, abi: LATCH_POSITION_LOCK_ABI, functionName: \"positionManager\" });\n const poolManager = await client.readContract({ address: positionManager, abi: CL_POSITION_MANAGER_ABI, functionName: \"clPoolManager\" });\n return { lock, positionManager, poolManager };\n}\nexport async function readPositionLock(client, lock, tokenId) {\n const raw = await client.readContract({ address: lock, abi: LATCH_POSITION_LOCK_ABI, functionName: \"getLock\", args: [tokenId] });\n return decodePositionLock(lock, tokenId, raw);\n}\nasync function readAllPages(count, page, pageSize) {\n const out = [];\n for (let start = 0n; start < count; start += pageSize) {\n out.push(...(await page(start, start + pageSize)));\n }\n return out;\n}\n/**\n * Every token id ever locked (in lock order), or every one in `poolId`. The\n * contract's lists include withdrawn locks; `getLock` tells them apart.\n */\nexport async function readPositionLockIds(client, lock, opts = {}) {\n const pageSize = opts.pageSize ?? 500n;\n if (opts.poolId !== undefined) {\n const poolId = opts.poolId;\n const count = await client.readContract({ address: lock, abi: LATCH_POSITION_LOCK_ABI, functionName: \"poolLockCount\", args: [poolId] });\n return readAllPages(count, (s, e) => client.readContract({ address: lock, abi: LATCH_POSITION_LOCK_ABI, functionName: \"poolLockIds\", args: [poolId, s, e] }), pageSize);\n }\n const count = await client.readContract({ address: lock, abi: LATCH_POSITION_LOCK_ABI, functionName: \"lockCount\" });\n return readAllPages(count, (s, e) => client.readContract({ address: lock, abi: LATCH_POSITION_LOCK_ABI, functionName: \"lockIds\", args: [s, e] }), pageSize);\n}\nexport async function readCLPoolState(client, poolManager, poolId) {\n const [slot0, activeLiquidity] = await Promise.all([\n client.readContract({ address: poolManager, abi: CL_POOL_STATE_ABI, functionName: \"getSlot0\", args: [poolId] }),\n client.readContract({ address: poolManager, abi: CL_POOL_STATE_ABI, functionName: \"getLiquidity\", args: [poolId] }),\n ]);\n // An uninitialized id reads as zeros on the CL manager (a Bin pool id, say): no state, not a zero price.\n if (slot0[0] === 0n)\n throw new Error(`pool ${poolId} is not initialized on this CL pool manager`);\n return { poolId, sqrtPriceX96: slot0[0], tick: Number(slot0[1]), lpFee: Number(slot0[3]), activeLiquidity };\n}\n/** Unix seconds of the latest block: the clock `unlockAt` is compared against. */\nexport async function readChainNow(client) {\n const b = await client.getBlock({ blockTag: \"latest\" });\n return b.timestamp;\n}\nasync function describeLocks(client, ctx, records, now, pools) {\n return Promise.all(records.map(async (r) => {\n const status = positionLockStatus(r, now);\n if (status === \"withdrawn\") {\n return { ...r, status, tickLower: null, tickUpper: null, liquidity: null, amount0: null, amount1: null, inRange: null };\n }\n const p = await client.readContract({ address: ctx.positionManager, abi: CL_POSITION_MANAGER_ABI, functionName: \"positions\", args: [r.tokenId] });\n const tickLower = Number(p[1]);\n const tickUpper = Number(p[2]);\n const liquidity = p[3];\n const pool = pools.get(r.poolId.toLowerCase()) ?? null;\n if (pool === null)\n return { ...r, status, tickLower, tickUpper, liquidity, amount0: null, amount1: null, inRange: null };\n const a = positionAmounts({ liquidity, tickLower, tickUpper, tick: pool.tick, sqrtPriceX96: pool.sqrtPriceX96 });\n return { ...r, status, tickLower, tickUpper, liquidity, amount0: a.amount0, amount1: a.amount1, inRange: a.inRange };\n }));\n}\n/** Pure: the per-pool figures from its described locks. */\nexport function summarizePoolLocks(args) {\n let liveCount = 0;\n let lockedCount = 0;\n let lockedActiveLiquidity = 0n;\n let lockedAmount0 = 0n;\n let lockedAmount1 = 0n;\n let outOfRangeLocked = 0;\n let nextUnlockAt = null;\n let lastUnlockAt = null;\n for (const l of args.locks) {\n if (l.status === \"withdrawn\")\n continue;\n liveCount += 1;\n if (l.status !== \"locked\")\n continue;\n lockedCount += 1;\n if (nextUnlockAt === null || l.unlockAt < nextUnlockAt)\n nextUnlockAt = l.unlockAt;\n if (lastUnlockAt === null || l.unlockAt > lastUnlockAt)\n lastUnlockAt = l.unlockAt;\n lockedAmount0 += l.amount0 ?? 0n;\n lockedAmount1 += l.amount1 ?? 0n;\n if (l.inRange === true && l.liquidity !== null)\n lockedActiveLiquidity += l.liquidity;\n else if (l.inRange === false)\n outOfRangeLocked += 1;\n }\n const permanent = args.permanent ?? [];\n let permanentActiveLiquidity = 0n;\n let permanentAmount0 = 0n;\n let permanentAmount1 = 0n;\n let permanentOutOfRange = 0;\n for (const p of permanent) {\n permanentAmount0 += p.amount0 ?? 0n;\n permanentAmount1 += p.amount1 ?? 0n;\n if (p.inRange === true)\n permanentActiveLiquidity += p.liquidity;\n else if (p.inRange === false)\n permanentOutOfRange += 1;\n }\n const active = args.pool?.activeLiquidity ?? 0n;\n const bps = (v) => (active === 0n ? null : Number((v * 10000n) / active));\n return {\n timeLockedActiveLiquidity: lockedActiveLiquidity,\n timeLockedActiveBps: bps(lockedActiveLiquidity),\n timeLockedAmount0: lockedAmount0,\n timeLockedAmount1: lockedAmount1,\n permanent,\n permanentActiveLiquidity,\n permanentActiveBps: bps(permanentActiveLiquidity),\n permanentAmount0,\n permanentAmount1,\n permanentOutOfRange,\n poolId: args.poolId,\n currency0: args.currency0,\n currency1: args.currency1,\n pool: args.pool,\n locks: args.locks,\n liveCount,\n lockedCount,\n lockedActiveLiquidity: lockedActiveLiquidity + permanentActiveLiquidity,\n lockedActiveBps: bps(lockedActiveLiquidity + permanentActiveLiquidity),\n lockedAmount0: lockedAmount0 + permanentAmount0,\n lockedAmount1: lockedAmount1 + permanentAmount1,\n outOfRangeLocked,\n nextUnlockAt,\n lastUnlockAt,\n };\n}\nasync function readRecords(client, lock, ids) {\n const recs = await Promise.all(ids.map((id) => readPositionLock(client, lock, id)));\n return recs.filter((r) => r !== null);\n}\nasync function readPools(client, poolManager, poolIds) {\n const unique = [...new Set(poolIds.map((p) => p.toLowerCase()))];\n const states = await Promise.all(unique.map((id) => readCLPoolState(client, poolManager, id).catch(() => null)));\n return new Map(unique.map((id, i) => [id, states[i] ?? null]));\n}\n/** Every lock in one pool, with the pool's state and the locked share of its active liquidity. */\nexport async function readPoolLocks(client, lock, poolId, opts = {}) {\n const ctx = opts.context ?? (await readPositionLockContext(client, lock));\n const [ids, now] = await Promise.all([readPositionLockIds(client, lock, { poolId }), opts.now ?? readChainNow(client)]);\n const records = await readRecords(client, lock, ids);\n const pools = await readPools(client, ctx.poolManager, [poolId]);\n const locks = await describeLocks(client, ctx, records, now, pools);\n const first = records[0];\n const pool = pools.get(poolId.toLowerCase()) ?? null;\n let permanent = [];\n if (opts.lpLocker) {\n const ids = opts.lpLockerTokenIds ??\n (opts.lpLockerLogRange ? (await findClLpLockerTokenIds(client, opts.lpLocker, opts.lpLockerLogRange, poolId)).map((x) => x.tokenId) : []);\n permanent = (await readClLpLockerPositions(client, opts.lpLocker, ids, pools)).filter((p) => p.poolId.toLowerCase() === poolId.toLowerCase());\n }\n const c0 = first?.currency0 ?? permanent[0]?.currency0 ?? zeroAddress;\n const c1 = first?.currency1 ?? permanent[0]?.currency1 ?? zeroAddress;\n return {\n ...summarizePoolLocks({ poolId, currency0: c0, currency1: c1, pool, locks, permanent }),\n now,\n };\n}\n/**\n * The explorer: every pool with at least one lock, each summarised. Reads\n * every lock record (paged) and every live position once. `maxLocks` bounds\n * the read on a very large lock contract; the result says when it was hit.\n */\nexport async function readPositionLockDirectory(client, lock, opts = {}) {\n const ctx = opts.context ?? (await readPositionLockContext(client, lock));\n const [allIds, now] = await Promise.all([readPositionLockIds(client, lock), opts.now ?? readChainNow(client)]);\n const max = opts.maxLocks ?? 2_000;\n const ids = allIds.length > max ? allIds.slice(allIds.length - max) : allIds;\n const records = await readRecords(client, lock, ids);\n // Permanent positions first (without prices), so their pools are read with the rest.\n const bare = opts.lpLocker && opts.lpLockerTokenIds && opts.lpLockerTokenIds.length > 0 ? await readClLpLockerPositions(client, opts.lpLocker, opts.lpLockerTokenIds) : [];\n const pools = await readPools(client, ctx.poolManager, [...records.filter((r) => !r.withdrawn).map((r) => r.poolId), ...bare.map((p) => p.poolId)]);\n const permanent = bare.map((p) => {\n const pool = pools.get(p.poolId.toLowerCase()) ?? null;\n if (pool === null)\n return p;\n const a = positionAmounts({ liquidity: p.liquidity, tickLower: p.tickLower, tickUpper: p.tickUpper, tick: pool.tick, sqrtPriceX96: pool.sqrtPriceX96 });\n return { ...p, amount0: a.amount0, amount1: a.amount1, inRange: a.inRange };\n });\n const locks = await describeLocks(client, ctx, records, now, pools);\n const byPool = new Map();\n const slot = (poolId, c0, c1) => {\n const k = poolId.toLowerCase();\n let e = byPool.get(k);\n if (!e)\n byPool.set(k, (e = { locks: [], permanent: [], poolId, c0, c1 }));\n return e;\n };\n for (const l of locks)\n slot(l.poolId, l.currency0, l.currency1).locks.push(l);\n for (const p of permanent)\n slot(p.poolId, p.currency0, p.currency1).permanent.push(p);\n const out = [];\n for (const e of byPool.values()) {\n out.push(summarizePoolLocks({ poolId: e.poolId, currency0: e.c0, currency1: e.c1, pool: pools.get(e.poolId.toLowerCase()) ?? null, locks: e.locks, permanent: e.permanent }));\n }\n return { pools: out, totalLocks: allIds.length, truncated: allIds.length > ids.length, now, permanentPositions: permanent.length };\n}\n/** Every lock (any pool) whose CURRENT lock owner or pending owner is `account`. */\nexport async function readPositionLocksOf(client, lock, account, opts = {}) {\n const ids = await readPositionLockIds(client, lock);\n const max = opts.maxLocks ?? 2_000;\n const records = await readRecords(client, lock, ids.length > max ? ids.slice(ids.length - max) : ids);\n const a = account.toLowerCase();\n return records.filter((r) => r.owner.toLowerCase() === a || r.pendingOwner?.toLowerCase() === a);\n}\n/** The rules `lock` enforces on its arguments, checked before asking a wallet. */\nexport function validatePositionLock(args) {\n const issues = [];\n if (args.unlockAt <= args.nowSeconds)\n issues.push({ field: \"unlockAt\", message: \"The unlock date must be in the future.\" });\n else if (args.unlockAt > args.nowSeconds + POSITION_LOCK_MAX_SECONDS) {\n issues.push({ field: \"unlockAt\", message: \"A lock may last at most 100 years from now.\" });\n }\n if (args.unlockAt >= 2n ** 48n)\n issues.push({ field: \"unlockAt\", message: \"The unlock date does not fit a uint48.\" });\n if (!isAddress(args.owner.trim(), { strict: false }))\n issues.push({ field: \"owner\", message: \"The lock owner is not an address.\" });\n else {\n const o = args.owner.trim().toLowerCase();\n if (o === zeroAddress)\n issues.push({ field: \"owner\", message: \"The lock owner cannot be the zero address.\" });\n if (args.lock !== undefined && o === args.lock.toLowerCase())\n issues.push({ field: \"owner\", message: \"The lock contract cannot own a lock.\" });\n }\n return issues;\n}\n/** `positionManager.approve(lock, tokenId)`: the step before `lock`. */\nexport function buildApprovePositionForLock(args) {\n return {\n to: args.positionManager,\n data: encodeFunctionData({ abi: CL_POSITION_MANAGER_ABI, functionName: \"approve\", args: [args.lock, args.tokenId] }),\n value: 0n,\n };\n}\n/** Whether `lock` may already move `tokenId` for `owner` (approved for the token, or for all). */\nexport async function readPositionApproval(client, args) {\n const [approved, forAll] = await Promise.all([\n client.readContract({ address: args.positionManager, abi: CL_POSITION_MANAGER_ABI, functionName: \"getApproved\", args: [args.tokenId] }),\n client.readContract({ address: args.positionManager, abi: CL_POSITION_MANAGER_ABI, functionName: \"isApprovedForAll\", args: [args.owner, args.lock] }),\n ]);\n return forAll || approved.toLowerCase() === args.lock.toLowerCase();\n}\n/** `lock(tokenId, unlockAt, owner)` with the fee's safe value (the surplus is refunded in the same call). */\nexport function buildLockPosition(args) {\n return {\n to: args.lock,\n data: encodeFunctionData({ abi: LATCH_POSITION_LOCK_ABI, functionName: \"lock\", args: [args.tokenId, Number(args.unlockAt), getAddress(args.owner)] }),\n value: feeSafeValue(args.terms),\n };\n}\nexport function buildExtendPositionLock(args) {\n return {\n to: args.lock,\n data: encodeFunctionData({ abi: LATCH_POSITION_LOCK_ABI, functionName: \"extend\", args: [args.tokenId, Number(args.newUnlockAt)] }),\n value: 0n,\n };\n}\n/** Permissionless; the fees always go to the lock owner. */\nexport function buildCollectLockedFees(args) {\n return { to: args.lock, data: encodeFunctionData({ abi: LATCH_POSITION_LOCK_ABI, functionName: \"collectFees\", args: [args.tokenId] }), value: 0n };\n}\nexport function buildWithdrawPosition(args) {\n return {\n to: args.lock,\n data: encodeFunctionData({ abi: LATCH_POSITION_LOCK_ABI, functionName: \"withdraw\", args: [args.tokenId, getAddress(args.to)] }),\n value: 0n,\n };\n}\n/** Offer the lock to `newOwner` (zero withdraws a pending offer). */\nexport function buildTransferLockOwner(args) {\n return {\n to: args.lock,\n data: encodeFunctionData({ abi: LATCH_POSITION_LOCK_ABI, functionName: \"transferLockOwner\", args: [args.tokenId, getAddress(args.newOwner)] }),\n value: 0n,\n };\n}\nexport function buildAcceptLockOwner(args) {\n return { to: args.lock, data: encodeFunctionData({ abi: LATCH_POSITION_LOCK_ABI, functionName: \"acceptLockOwner\", args: [args.tokenId] }), value: 0n };\n}\n//# sourceMappingURL=position.js.map","// SPDX-License-Identifier: MIT\n/**\n * `LatchTokenLock`: ERC-20 / native time-locks and vesting.\n *\n * A lock holds `amount` of one currency for a beneficiary and releases it on a\n * schedule fixed at creation: nothing before `cliff`, then linearly from\n * `start` to `end` (a plain time-lock is `start == cliff == end`). No key can\n * shorten, revoke or redirect it. The beneficiary claims to any address and\n * rotates two-step.\n *\n * vested(t) = 0 if t < cliff\n * = amount if t >= end\n * = floor(amount * (t - start) / (end - start)) otherwise\n *\n * `vestedAt` here is that formula, bit for bit, so a UI can draw the schedule\n * without a read per point; `claimable` on chain stays the authority.\n *\n * \"% OF SUPPLY LOCKED\" is computed two ways, and both are labelled:\n * - `heldBps`: `totalHeld(currency)` / `totalSupply()`: what the contract\n * still holds for locks, vested-but-unclaimed included;\n * - `unvestedBps`: sum of (amount - vested(now)) / `totalSupply()`: what no\n * beneficiary can take yet.\n * Native has no `totalSupply`, so both are `null` for it.\n *\n * Independently authored against the compiled ABI and the documented rules of\n * `packages/launchpad/src/lock/LatchTokenLock.sol`.\n */\nimport { encodeFunctionData, getAddress, isAddress, zeroAddress } from \"viem\";\nimport { LATCH_TOKEN_LOCK_ABI } from \"../launchpad/generated/abi.js\";\nimport { feeSafeValue, isNative } from \"../utilities/feeGate.js\";\nimport { readChainNow } from \"./position.js\";\n/** `MAX_LOCK_SECONDS`: `end` at most this far after the block the lock is made in. */\nexport const TOKEN_LOCK_MAX_SECONDS = 100n * 365n * 86400n;\n/** A plain time-lock: everything at `unlockAt`. */\nexport function timeLockSchedule(unlockAt) {\n return { start: unlockAt, cliff: unlockAt, end: unlockAt };\n}\n/**\n * Cliff + linear: vesting accrues from `start`, nothing is claimable before\n * `start + cliffSeconds`, everything is vested at `start + durationSeconds`.\n * `cliffSeconds = 0` is plain linear vesting.\n */\nexport function cliffLinearSchedule(args) {\n return { start: args.start, cliff: args.start + args.cliffSeconds, end: args.start + args.durationSeconds };\n}\n/** The contract's `_vested`, exactly (floor division). */\nexport function vestedAt(lock, t) {\n if (t < lock.cliff)\n return 0n;\n if (t >= lock.end)\n return lock.amount;\n return (lock.amount * (t - lock.start)) / (lock.end - lock.start);\n}\n/** Vested and not yet claimed at `t`. */\nexport function claimableAt(lock, t) {\n const v = vestedAt(lock, t);\n return v > lock.claimed ? v - lock.claimed : 0n;\n}\n/** The rules `lock` enforces on its arguments. */\nexport function validateTokenLock(args) {\n const issues = [];\n if (!isAddress(args.currency.trim(), { strict: false }))\n issues.push({ field: \"currency\", message: \"The token is not an address.\" });\n if (args.amount <= 0n)\n issues.push({ field: \"amount\", message: \"Lock an amount above zero.\" });\n if (!isAddress(args.beneficiary.trim(), { strict: false }))\n issues.push({ field: \"beneficiary\", message: \"The beneficiary is not an address.\" });\n else {\n const b = args.beneficiary.trim().toLowerCase();\n if (b === zeroAddress)\n issues.push({ field: \"beneficiary\", message: \"The beneficiary cannot be the zero address.\" });\n if (args.lock !== undefined && b === args.lock.toLowerCase())\n issues.push({ field: \"beneficiary\", message: \"The lock contract cannot be the beneficiary.\" });\n }\n const { start, cliff, end } = args.schedule;\n if (!(start <= cliff && cliff <= end))\n issues.push({ field: \"schedule\", message: \"The schedule must satisfy start <= cliff <= end.\" });\n if (end <= args.nowSeconds)\n issues.push({ field: \"schedule\", message: \"The end of the schedule must be in the future.\" });\n else if (end > args.nowSeconds + TOKEN_LOCK_MAX_SECONDS)\n issues.push({ field: \"schedule\", message: \"The schedule may end at most 100 years from now.\" });\n if (start < 0n || end >= 2n ** 48n)\n issues.push({ field: \"schedule\", message: \"Dates must fit a uint48.\" });\n return issues;\n}\nexport function decodeTokenLock(lock, lockId, raw) {\n return {\n lock,\n lockId,\n currency: raw.currency,\n beneficiary: raw.beneficiary,\n pendingBeneficiary: raw.pendingBeneficiary === zeroAddress ? null : raw.pendingBeneficiary,\n start: BigInt(raw.start),\n cliff: BigInt(raw.cliff),\n end: BigInt(raw.end),\n amount: raw.amount,\n claimed: raw.claimed,\n creator: raw.creator,\n };\n}\nexport function viewTokenLock(r, now) {\n const vested = vestedAt(r, now);\n const claimable = vested > r.claimed ? vested - r.claimed : 0n;\n const status = r.claimed >= r.amount ? \"claimed\" : now < r.cliff ? \"cliff\" : now >= r.end ? \"vested\" : \"vesting\";\n return { ...r, vested, claimable, unvested: r.amount - vested, status };\n}\nexport async function readTokenLock(client, lock, lockId) {\n const raw = await client.readContract({ address: lock, abi: LATCH_TOKEN_LOCK_ABI, functionName: \"getLock\", args: [lockId] });\n return decodeTokenLock(lock, lockId, raw);\n}\nasync function pages(count, page, size = 500n) {\n const out = [];\n for (let s = 0n; s < count; s += size)\n out.push(...(await page(s, s + size)));\n return out;\n}\nasync function readViews(client, lock, ids, now) {\n const recs = await Promise.all(ids.map((id) => readTokenLock(client, lock, id)));\n return recs.map((r) => viewTokenLock(r, now));\n}\nconst TOTAL_SUPPLY_ABI = [{ type: \"function\", name: \"totalSupply\", stateMutability: \"view\", inputs: [], outputs: [{ name: \"\", type: \"uint256\" }] }];\nexport function summarizeCurrencyLocks(args) {\n let unvested = 0n;\n let nextCliffOrEnd = null;\n let lastEnd = null;\n for (const l of args.locks) {\n unvested += l.unvested;\n if (l.unvested === 0n)\n continue;\n const next = args.now < l.cliff ? l.cliff : l.end;\n if (nextCliffOrEnd === null || next < nextCliffOrEnd)\n nextCliffOrEnd = next;\n if (lastEnd === null || l.end > lastEnd)\n lastEnd = l.end;\n }\n const ts = args.totalSupply;\n const bps = (v) => (ts === null || ts === 0n ? null : Number((v * 10000n) / ts));\n return {\n currency: args.currency,\n locks: args.locks,\n totalHeld: args.totalHeld,\n unvested,\n totalSupply: ts,\n heldBps: bps(args.totalHeld),\n unvestedBps: bps(unvested),\n nextCliffOrEnd,\n lastEnd,\n };\n}\n/** Every lock of one currency, with its totals and share of supply. */\nexport async function readCurrencyLocks(client, lock, currency, opts = {}) {\n const [count, totalHeld, totalSupply, now] = await Promise.all([\n client.readContract({ address: lock, abi: LATCH_TOKEN_LOCK_ABI, functionName: \"currencyLockCount\", args: [currency] }),\n client.readContract({ address: lock, abi: LATCH_TOKEN_LOCK_ABI, functionName: \"totalHeld\", args: [currency] }),\n isNative(currency)\n ? Promise.resolve(null)\n : client.readContract({ address: currency, abi: TOTAL_SUPPLY_ABI, functionName: \"totalSupply\" }).catch(() => null),\n opts.now ?? readChainNow(client),\n ]);\n const ids = await pages(count, (s, e) => client.readContract({ address: lock, abi: LATCH_TOKEN_LOCK_ABI, functionName: \"currencyLockIds\", args: [currency, s, e] }));\n const locks = await readViews(client, lock, ids, now);\n return { ...summarizeCurrencyLocks({ currency, locks, totalHeld, totalSupply, now }), now };\n}\n/**\n * Locks `account` is the CURRENT beneficiary of, or has been offered. The\n * contract's per-beneficiary list keeps past beneficiaries too; they are\n * filtered out here by reading each lock.\n */\nexport async function readBeneficiaryLocks(client, lock, account, opts = {}) {\n const now = opts.now ?? (await readChainNow(client));\n // The per-beneficiary list has no count view; page until a short page.\n const ids = [];\n const size = 500n;\n for (let s = 0n;; s += size) {\n const page = await client.readContract({ address: lock, abi: LATCH_TOKEN_LOCK_ABI, functionName: \"beneficiaryLockIds\", args: [account, s, s + size] });\n ids.push(...page);\n if (BigInt(page.length) < size)\n break;\n }\n const unique = [...new Set(ids)];\n const views = await readViews(client, lock, unique, now);\n const a = account.toLowerCase();\n return { locks: views.filter((v) => v.beneficiary.toLowerCase() === a), now };\n}\n/**\n * Every lock (newest `maxLocks`), grouped by currency with totals and share of\n * supply. Also the way to find a lock offered to an address: an offer is not\n * in the new beneficiary's own list until it is accepted.\n */\nexport async function readTokenLockDirectory(client, lock, opts = {}) {\n const [count, now] = await Promise.all([\n client.readContract({ address: lock, abi: LATCH_TOKEN_LOCK_ABI, functionName: \"lockCount\" }),\n opts.now ?? readChainNow(client),\n ]);\n const total = Number(count);\n const max = opts.maxLocks ?? 2_000;\n const first = total > max ? total - max : 0;\n const ids = [];\n for (let i = first; i < total; i++)\n ids.push(BigInt(i));\n const views = await readViews(client, lock, ids, now);\n const by = new Map();\n for (const v of views) {\n const k = v.currency.toLowerCase();\n const l = by.get(k);\n if (l)\n l.push(v);\n else\n by.set(k, [v]);\n }\n const currencies = await Promise.all([...by.values()].map(async (locks) => {\n const currency = locks[0].currency;\n const [totalHeld, totalSupply] = await Promise.all([\n client.readContract({ address: lock, abi: LATCH_TOKEN_LOCK_ABI, functionName: \"totalHeld\", args: [currency] }),\n isNative(currency) ? Promise.resolve(null) : client.readContract({ address: currency, abi: TOTAL_SUPPLY_ABI, functionName: \"totalSupply\" }).catch(() => null),\n ]);\n return summarizeCurrencyLocks({ currency, locks, totalHeld, totalSupply, now });\n }));\n return { currencies, totalLocks: total, truncated: first > 0, now };\n}\n/* ------------------------------------------------------------------ builds --- */\n/**\n * `lock(currency, amount, beneficiary, start, cliff, end)`. Native: the value\n * is `amount` plus the fee's safe value; ERC-20: the fee only, after an exact\n * `approve(lock, amount)` (see `buildErc20Approve`). The surplus is refunded.\n */\nexport function buildTokenLock(args) {\n const fee = feeSafeValue(args.terms);\n return {\n to: args.lock,\n data: encodeFunctionData({\n abi: LATCH_TOKEN_LOCK_ABI,\n functionName: \"lock\",\n args: [\n getAddress(args.currency),\n args.amount,\n getAddress(args.beneficiary),\n Number(args.schedule.start),\n Number(args.schedule.cliff),\n Number(args.schedule.end),\n ],\n }),\n value: isNative(args.currency) ? args.amount + fee : fee,\n };\n}\nexport function buildClaimTokenLock(args) {\n return {\n to: args.lock,\n data: encodeFunctionData({ abi: LATCH_TOKEN_LOCK_ABI, functionName: \"claim\", args: [args.lockId, getAddress(args.to)] }),\n value: 0n,\n };\n}\nexport function buildTransferBeneficiary(args) {\n return {\n to: args.lock,\n data: encodeFunctionData({ abi: LATCH_TOKEN_LOCK_ABI, functionName: \"transferBeneficiary\", args: [args.lockId, getAddress(args.newBeneficiary)] }),\n value: 0n,\n };\n}\nexport function buildAcceptBeneficiary(args) {\n return { to: args.lock, data: encodeFunctionData({ abi: LATCH_TOKEN_LOCK_ABI, functionName: \"acceptBeneficiary\", args: [args.lockId] }), value: 0n };\n}\n//# sourceMappingURL=token.js.map","/**\n * Public RPC endpoints for every Latch Protocol target chain.\n *\n * Every endpoint below was PROBED, not collected from a list. Each one answered\n * `eth_chainId` with the expected id, served `eth_blockNumber` three times, and was\n * timed by the median of those three. Endpoints that 404'd, 403'd, rate-limited,\n * returned the wrong chain, or failed to resolve were dropped rather than shipped as\n * dead fallbacks — a dead entry is worse than a short list, because a fallback\n * transport spends a retry on it before reaching a provider that works.\n *\n * Ordered fastest-first by measured latency, which is also the order a fallback\n * transport should try them in.\n *\n * CHAIN ID IS NOT PROOF OF CHAIN. Since 2026-09-19 every endpoint here has also been\n * matched against a pinned GENESIS HASH (or, on the chains that serve no historical\n * block, against a settled block read from an endpoint already in this file). The\n * collision is real: chainid.network lists **Wanchain Testnet at chain id 999**, which\n * is HyperEVM's id, and a Wanchain node answers `eth_chainId` and `eth_blockNumber`\n * exactly like a healthy HyperEVM one. `scripts/probe-rpcs.mjs` keeps it as a standing\n * negative control and rejects it on every run. The per-endpoint `identity` field in\n * `rpc-probe-results.json` records which of the two checks settled each URL.\n *\n * SELECTION RULE, applied after the probe: fastest first, at most TWO endpoints per\n * operator, and the chain's own canonical endpoint always included where it was\n * reachable. Five is the target. Chains that carry fewer than five carry fewer\n * because fewer exist — see `THIN_ENDPOINT_CHAINS`; the list is never padded.\n *\n * And, added 2026-09-19: **a verified endpoint beats an unverifiable one.** Where a\n * host could not be reached from the probing machine but was verified on an earlier\n * run, it is kept ONLY if dropping it would leave the chain thinner; otherwise it is\n * replaced by something this run could actually measure. Entries kept that way carry\n * their LAST measured latency and an `unverified 2026-09-19` marker, so nobody reads a\n * stale number as a fresh one.\n *\n * Probed 2026-09-10; re-probed in full 2026-09-19 against an enlarged candidate list\n * (see `scripts/harvest-rpcs.mjs`). Public endpoints rot: re-run\n * `scripts/probe-rpcs.mjs` before relying on this in production, and expect some of\n * these to have gone away.\n *\n * NONE of these carry an API key. Never add a credentialed URL to this file — it is\n * committed. Keyed providers belong in the environment; see `resolveEndpoints`.\n * That is not a theoretical rule: chainid.network's own Sepolia entry ships a\n * FILLED-IN Alchemy key, so the harvester rejects opaque path segments outright.\n *\n * ---------------------------------------------------------------------------\n * WHAT chainid.network/chains.json GAVE US, AND WHAT IT GOT WRONG\n * ---------------------------------------------------------------------------\n *\n * Harvested 2026-09-19 (2,763 chains). It produced 24 candidates we did not have, of\n * which SIX survived the probe and ship here: `robinhood-rpc.publicnode.com`,\n * `rpc.sepolia.ethpandaops.io`, `xrpc.cl/sepolia`, and (already candidates, confirmed)\n * the BSC dataseed mirrors. Useful, and worth re-running. It is NOT a source of truth:\n *\n * * chain id **999 in chains.json is Wanchain Testnet**, not HyperEVM. HyperEVM\n * mainnet is ABSENT from the file entirely — only \"Hyperliquid EVM Testnet\" at 998\n * is listed. Harvesting id 999 and trusting the chain id would wire a Wanchain node\n * into HyperEVM's fallback list, and every health check would stay green. Chain 999\n * is therefore skipped by the harvester AND used as the probe's negative control.\n * DO NOT \"fix\" this by trusting the list.\n * * it carries live credentials: `eth-sepolia.g.alchemy.com/v2/<32-char key>` sits in\n * the Sepolia entry. A `${PLACEHOLDER}` filter alone would have let it through.\n * * of our target chains it knows only one RPC each for HyperEVM(no), Monad,\n * Plasma, Stable and Stable Testnet — it adds nothing on the chains\n * where we are thinnest, which is precisely where we needed help.\n *\n * ---------------------------------------------------------------------------\n * NOT PRESENT, and why\n * ---------------------------------------------------------------------------\n *\n * * Arc MAINNET (5042). **THIS CHANGED ON 2026-09-19 and the old note below is kept\n * only for the history.** Arc mainnet now HAS public RPC: eight hosts answered\n * `eth_chainId` = 5042, served `eth_blockNumber` (head ~21,746,650) and agreed\n * UNANIMOUSLY on a genesis hash of\n * `0x09944e07412986bb417fd0006c89ffb71ee523d68ce2017ec2dabc944c42edad` —\n * Circle's `rpc.mainnet.arc.io` plus its drpc/quicknode/blockdaemon variants,\n * `arc.drpc.org`, `arc-mainnet.drpc.org`, `5042.rpc.thirdweb.com` and\n * `rpc.beamrpc.com`. That hash is now pinned in `scripts/probe-rpcs.mjs`.\n *\n * It is STILL NOT LISTED HERE, and that is a decision rather than an oversight:\n * Arc mainnet is not one of the fifteen target chains, and the decimals\n * contradiction recorded below is unresolved. Adding a chain to this file is the\n * step before somebody prices a pool on it. That needs the owner, not a probe.\n *\n * The original note, 2026-09-10: \"It exists and it is live, but it has NO public\n * RPC. Circle's own mainnet hosts resolve and answer 401/403, and thirdweb's\n * `5042.rpc.thirdweb.com` answers `eth_chainId` out of a config table while\n * failing every `eth_blockNumber` — alive to a chainId check, dead to a real\n * request.\" Arc TESTNET (5042002) is fully supported below. Do not add Arc\n * mainnet from memory: probe it first.\n *\n * PROBED AGAIN 2026-09-12 with a candidate supplied by the project owner,\n * `https://rpc.arc-scan.org`. STILL NOT USABLE. DNS resolves and TCP\n * connects in ~46ms, then the TLS handshake fails (curl exit 35, HTTP\n * status 000); `https://arc-scan.org` itself behaves identically. A\n * control request to a known-good host from the same machine returned\n * 200, so this is the endpoint rather than the network. Neither\n * `eth_chainId` nor `eth_blockNumber` was answerable, so chain id 5042 is\n * still UNCONFIRMED from here — it has never been read off a live node.\n *\n * The rest of the owner's config is recorded so it is not lost, and\n * because one field needs care when the chain does become reachable:\n *\n * chainId 5042 · rpc https://rpc.arc-scan.org\n * explorer https://arc-scan.org\n * quoteIsGasToken true · nativeDecimals 18 · quoteDecimals 6\n *\n * THE DECIMALS ARE CONTRADICTORY AND MUST BE SETTLED ON CHAIN FIRST.\n * The owner's config says `quoteDecimals: 6`. Arc's own Connect RPC page,\n * read from a browser that can reach it, says plainly:\n *\n * Chain ID 5042 USDC - 18 decimals\n *\n * USDC is 6 decimals everywhere else it exists, so 18 here is either a\n * deliberate native-gas representation (a gas token has to be 18 to behave\n * like ether in the EVM) sitting alongside a 6-decimal ERC-20 of the same\n * name, or one of the two sources is wrong. Both readings are plausible\n * and they differ by 10^12.\n *\n * That is the same quantity that would have opened a USDG pool on\n * Robinhood at a million times the intended price. `sqrtPriceX96` encodes\n * the ratio in RAW units, so this is not a display concern — it is the\n * opening price of a pool, fixed permanently at initialize.\n *\n * Resolve it by reading `decimals()` off the actual token contract before\n * any pool is priced, and record BOTH the gas-token and ERC-20 answers if\n * they turn out to differ. Do not let a default of 18, or of 6, anywhere\n * near an Arc tick.\n *\n * * `rpc.xlayer.tech` (X Layer's own canonical endpoint) and roughly a dozen\n * other hosts — `ethereum-rpc.publicnode.com`, `eth.llamarpc.com`,\n * `rpc.mevblocker.io`, `sepolia.gateway.tenderly.co` among them. These fail\n * the TLS handshake from the machine this probe ran on (schannel\n * SEC_E_INVALID_TOKEN / OpenSSL \"wrong version number\", over both IPv4 and\n * IPv6, with and without SNI), which is a local network filter rather than a\n * statement about the endpoint. They are UNVERIFIED, not known-dead. Re-probe\n * from unfiltered network before concluding anything about them, and if they\n * work there they belong in this file.\n *\n * * `*.gateway.tatum.io` — answers, but the free tier is FIVE requests per\n * minute and `eth_call` is paid-only. It would 429 in normal use.\n *\n * * `rpc.flashbots.net` and `rpc.flashbots.net/fast` — REMOVED from Ethereum on\n * 2026-09-19, after shipping since 2026-09-10. They pass a chain-id and a\n * `eth_blockNumber` check perfectly, which is how they got in, but they are\n * TRANSACTION-SUBMISSION endpoints: `eth_call` answers **HTTP 403** and\n * `eth_getCode` **HTTP 504**. Every read this SDK makes is an `eth_call` or an\n * `eth_getCode`, so the entry could never have served one — it could only spend a\n * fallback attempt and a 403 before the request reached a provider that works.\n * The old probe recorded this as `eip1153: null` (\"could not be asked\"), which was\n * accurate and was not loud enough. Lesson kept: an endpoint that cannot answer\n * `eth_call` is not a read endpoint, whatever else it answers.\n *\n * * `1rpc.io/linea` and `1rpc.io/sepolia` — REMOVED 2026-09-19. Both answer\n * `-32001 \"You've reached the usage limit for your current plan\"` on a single\n * cold request. Stated honestly: the probe itself hits 1rpc.io on several chains\n * in one run, so this MAY be our own quota rather than a permanent state. They are\n * dropped because verified replacements existed on both chains, not because\n * 1rpc.io is condemned. Re-probe from a fresh IP before concluding.\n *\n * * `rpc.nodeflare.app/robinhood/public` — REMOVED 2026-09-19 (HTTP 403 to a plain\n * `eth_chainId`). It was already last in the Robinhood list for answering 429\n * \"1 per 10s\" per IP; it has now stopped answering at all from here.\n *\n * * `plasma.drpc.org`, `stable-testnet.drpc.org` — answer\n * `eth_chainId` and then HTTP 400 to `eth_blockNumber`. The same config-table\n * shape dRPC shows for chains it does not really carry.\n *\n * * Six `*.gateway.tenderly.co` hostnames (ink, monad, plasma, stable,\n * stable-testnet, and the bare `gateway.tenderly.co`) failed the\n * TLS handshake from the probing machine on 2026-09-19 — curl reports schannel\n * `SEC_E_INVALID_TOKEN`, the same local-filter signature described above, and\n * `base.gateway.tenderly.co` answered fine from the same machine in the same run.\n * So this is NOT a statement that Tenderly is down. Where a verified replacement\n * existed they were dropped for it (ink, monad, sepolia); where the chain would\n * have got thinner they are kept, last, marked `unverified 2026-09-19`.\n */\nexport const CHAIN_RPCS = {\n ethereum: {\n chainId: 1,\n name: 'Ethereum',\n supportsEip1153: true,\n /* 2026-09-19: `rpc.flashbots.net` dropped — it 403s every `eth_call` (see the\n header); `gateway.tenderly.co/public/mainnet` dropped for two endpoints this run\n could measure. Nine Ethereum endpoints verified, all by genesis. */\n endpoints: [\n { url: 'https://1.rpc.thirdweb.com', latencyMs: 37, eip1153: true },\n { url: 'https://eth.drpc.org', latencyMs: 57, eip1153: true },\n { url: 'https://eth-mainnet.public.blastapi.io', latencyMs: 99, eip1153: true },\n { url: 'https://eth.rpc.blxrbdn.com', latencyMs: 101, eip1153: true },\n { url: 'https://0xrpc.io/eth', latencyMs: 185, eip1153: true },\n ],\n },\n base: {\n chainId: 8453,\n name: 'Base',\n supportsEip1153: true,\n endpoints: [\n { url: 'https://8453.rpc.thirdweb.com', latencyMs: 43, eip1153: true },\n { url: 'https://base.drpc.org', latencyMs: 46, eip1153: true },\n { url: 'https://base.gateway.tenderly.co', latencyMs: 96, eip1153: true },\n { url: 'https://base-mainnet.public.blastapi.io', latencyMs: 105, eip1153: true },\n { url: 'https://mainnet.base.org', latencyMs: 114, eip1153: true },\n ],\n },\n bsc: {\n chainId: 56,\n name: 'BNB Smart Chain',\n supportsEip1153: true,\n endpoints: [\n /* BSC is the one chain with real surplus: EIGHTEEN endpoints verified on\n 2026-09-19, spread over eight operators, every one by genesis. The set below is\n unchanged — the dataseed mirrors (bnbchain/defibit/ninicoin 1-4) differ by\n single-digit milliseconds, which is noise, and churning the shipped list for\n noise costs review attention and buys nothing. */\n { url: 'https://56.rpc.thirdweb.com', latencyMs: 45, eip1153: true },\n { url: 'https://bsc-dataseed.bnbchain.org', latencyMs: 90, eip1153: true },\n { url: 'https://bsc-dataseed1.ninicoin.io', latencyMs: 93, eip1153: true },\n { url: 'https://bsc-dataseed1.defibit.io', latencyMs: 102, eip1153: true },\n { url: 'https://bsc-rpc.publicnode.com', latencyMs: 131, eip1153: true },\n ],\n },\n /**\n * Linea — Consensys zkEVM L2.\n *\n * EIP-1153 answered true on all six probed endpoints. Caveat worth carrying:\n * on a zkEVM, `eth_call` is executed by the node's EVM, not by the prover, so a\n * successful TSTORE `eth_call` is strong evidence rather than proof that a\n * PROVEN transaction supports it. `script/BackendGuard.sol` is the authoritative\n * check, because it runs on chain at deploy time. Do not skip it here.\n */\n linea: {\n chainId: 59144,\n name: 'Linea',\n supportsEip1153: true,\n /* FOUR on 2026-09-19, down from five: `1rpc.io/linea` now answers -32001 \"usage\n limit for your current plan\" on a cold request (see the header — that may be our\n own quota). Seven other candidates were tried; blockpi and omniatech 521,\n blastapi 403, decubate/onfinality/tenderly unreachable from here. Linea is now\n in THIN_ENDPOINT_CHAINS. */\n endpoints: [\n { url: 'https://linea.drpc.org', latencyMs: 61, eip1153: true },\n { url: 'https://59144.rpc.thirdweb.com', latencyMs: 106, eip1153: true },\n { url: 'https://rpc.linea.build', latencyMs: 118, eip1153: true },\n { url: 'https://linea-rpc.publicnode.com', latencyMs: 132, eip1153: true },\n ],\n },\n /**\n * Robinhood Chain — Robinhood's own L2. Five endpoints, five operators.\n *\n * All five answered `eth_chainId` with 4663, served `eth_blockNumber`, executed a\n * TSTORE probe, and matched the pinned genesis\n * `0xaad15f3d…09305c`, so both chain identity and EIP-1153 are confirmed per\n * endpoint rather than inferred from one.\n *\n * Changes on 2026-09-19:\n * + `robinhood-rpc.publicnode.com` — new, from chains.json, fully verified.\n * − `rpc.nodeflare.app/robinhood/public` — HTTP 403 to a plain `eth_chainId` now.\n * It was already last for answering 429 \"1 per 10s\" per IP.\n *\n * Two candidates are still REJECTED rather than padded in:\n * `lb.routeme.sh/rpc/evm/4663` returned no usable JSON-RPC response at all.\n * `robinhood.drpc.org` used to answer eth_chainId with the correct 4663\n * from a config table while rejecting eth_blockNumber\n * and eth_call. On 2026-09-19 it PASSED everything\n * (116 ms, genesis, TSTORE) — recorded, but not\n * shipped on one clean run after a history of\n * half-answers. Promote it on the next green probe.\n * The two `wss://` endpoints are out of scope: the transports here are http.\n */\n robinhood: {\n chainId: 4663,\n name: 'Robinhood Chain',\n supportsEip1153: true,\n /* Ordered for READS under load, not by single-request latency (owner decision 2026-09-19, \"yes\" to\n moving the canonical RPC first). nodeflare was first on latency, but it answers 429 \"1 per 10s\"\n per IP and 403 to a batch, so a page's burst of reads failed there first and then fell through;\n a production build of /app made 59 of its 123 requests to it. The canonical endpoint leads\n even though three others measured faster. nodeflare, which used to be the last resort, is\n gone entirely — it 403s now. */\n endpoints: [\n { url: 'https://rpc.mainnet.chain.robinhood.com', latencyMs: 108, eip1153: true },\n { url: 'https://rpc.ordofi.network', latencyMs: 51, eip1153: true },\n { url: 'https://robinhood.rpc.blxrbdn.com', latencyMs: 81, eip1153: true },\n { url: 'https://robinhood-rpc.publicnode.com', latencyMs: 122, eip1153: true },\n { url: 'https://rpc-robinhood.blockmachine.io', latencyMs: 205, eip1153: true },\n ],\n },\n /**\n * Ink — Kraken's OP-Stack L2. Two of the five are Ink's own gel/qnd nodes.\n * 2026-09-19: `ink.gateway.tenderly.co` replaced by `ink-rpc.publicnode.com`, which\n * this run could actually measure (the Tenderly host failed the TLS handshake from\n * the probing machine — see the header; it is unverified, not known-dead).\n */\n ink: {\n chainId: 57073,\n name: 'Ink',\n supportsEip1153: true,\n endpoints: [\n { url: 'https://ink.drpc.org', latencyMs: 67, eip1153: true },\n { url: 'https://rpc-qnd.inkonchain.com', latencyMs: 115, eip1153: true },\n { url: 'https://rpc-gel.inkonchain.com', latencyMs: 166, eip1153: true },\n { url: 'https://57073.rpc.thirdweb.com', latencyMs: 183, eip1153: true },\n { url: 'https://ink-rpc.publicnode.com', latencyMs: 289, eip1153: true },\n ],\n },\n /**\n * X Layer — OKX's Polygon-CDK zkEVM. FOUR endpoints, not five.\n *\n * X Layer's own canonical endpoint `rpc.xlayer.tech` could not be reached from\n * the probing machine (TLS handshake refused before any HTTP; see the header).\n * It is unverified rather than dead, and if it answers from your network it\n * should be added. `xlayerrpc.okx.com` is OKX-operated and does answer, so the\n * operator is represented either way.\n *\n * Same zkEVM caveat as Linea: TSTORE succeeded in `eth_call` on three\n * independent endpoints, which is not the same as a proven transaction.\n * `BackendGuard` decides at deploy time.\n */\n xlayer: {\n chainId: 196,\n name: 'X Layer',\n supportsEip1153: true,\n endpoints: [\n { url: 'https://xlayer.drpc.org', latencyMs: 59, eip1153: true },\n { url: 'https://xlayerrpc.okx.com', latencyMs: 181, eip1153: true },\n { url: 'https://196.rpc.thirdweb.com', latencyMs: 205, eip1153: true },\n { url: 'https://api.zan.top/xlayer-mainnet', latencyMs: 234, eip1153: null },\n ],\n },\n /**\n * HyperEVM. **Its chain id, 999, is SHARED with Wanchain Testnet** — that is the\n * collision the genesis check exists for, and `scripts/probe-rpcs.mjs` keeps a\n * Wanchain node in its candidate list permanently so every run has to reject it.\n *\n * Only two of these serve block 0 at all (Hyperliquid's OWN canonical node answers\n * \"invalid block height: 0\" while serving block 1 happily), so the other three were\n * settled by the live cross-check instead — a settled block whose hash matches what\n * `rpc.purroofgroup.com` says about the same height. Both are recorded per endpoint\n * in `rpc-probe-results.json`.\n *\n * 2026-09-19: `rpc.hypurrscan.io` (141 ms, and it refuses every low block) replaced\n * by `hyperliquid-rpc.publicnode.com` (125 ms).\n */\n hyperevm: {\n chainId: 999,\n name: 'HyperEVM',\n supportsEip1153: true,\n endpoints: [\n { url: 'https://rpc.purroofgroup.com', latencyMs: 44, eip1153: true },\n { url: 'https://hyperliquid.drpc.org', latencyMs: 52, eip1153: true },\n { url: 'https://999.rpc.thirdweb.com', latencyMs: 103, eip1153: true },\n { url: 'https://hyperliquid-rpc.publicnode.com', latencyMs: 125, eip1153: true },\n { url: 'https://rpc.hyperliquid.xyz/evm', latencyMs: 141, eip1153: true },\n ],\n },\n monad: {\n chainId: 143,\n name: 'Monad',\n supportsEip1153: true,\n endpoints: [\n /* 2026-09-19: `monad.gateway.tenderly.co` (unreachable from the probing machine)\n replaced by `monad.drpc.org`, a new operator this run verified by cross-check —\n dRPC serves no low block on Monad, so genesis could not settle it. */\n { url: 'https://rpc.monad.xyz', latencyMs: 55, eip1153: true },\n { url: 'https://143.rpc.thirdweb.com', latencyMs: 70, eip1153: true },\n { url: 'https://rpc2.monad.xyz', latencyMs: 96, eip1153: true },\n { url: 'https://api.zan.top/monad-mainnet', latencyMs: 236, eip1153: null },\n { url: 'https://monad.drpc.org', latencyMs: 266, eip1153: null },\n ],\n },\n /**\n * Plasma — stablecoin-settlement L1. THREE endpoints; no fourth exists publicly.\n * Ten candidates tried on 2026-09-19: drpc 400, publicnode 404, blockpi 402, ankr\n * 403, onfinality 429, blastapi/stakely unreachable. chains.json knows exactly one.\n */\n plasma: {\n chainId: 9745,\n name: 'Plasma',\n supportsEip1153: true,\n endpoints: [\n { url: 'https://rpc.plasma.to', latencyMs: 96, eip1153: true },\n { url: 'https://9745.rpc.thirdweb.com', latencyMs: 119, eip1153: true },\n // unverified 2026-09-19 (TLS handshake refused from the probing machine, the\n // local-filter signature). Last measured 2026-09-10. Kept because dropping it\n // would leave Plasma on two.\n { url: 'https://plasma.gateway.tenderly.co', latencyMs: 115, eip1153: true },\n ],\n },\n /**\n * Stable — stablecoin-gas L1. FOUR endpoints.\n *\n * Stable has NO GENESIS PIN: every endpoint returns null for block 0, and for blocks\n * 1, 2, 10, 1_000, 100_000 and 1_000_000, while serving head-100_000 fine. They are\n * pruned nodes with a moving history floor, so no fixed low block can be pinned.\n * All three verified endpoints were settled by the live cross-check instead.\n */\n stable: {\n chainId: 988,\n name: 'Stable',\n supportsEip1153: true,\n endpoints: [\n { url: 'https://stable.drpc.org', latencyMs: 58, eip1153: true },\n { url: 'https://rpc.stable.xyz', latencyMs: 174, eip1153: true },\n { url: 'https://988.rpc.thirdweb.com', latencyMs: 203, eip1153: true },\n // unverified 2026-09-19, as Plasma's above. Last measured 2026-09-10.\n { url: 'https://stable.gateway.tenderly.co', latencyMs: 97, eip1153: true },\n ],\n },\n /**\n * Anubis Network — owner asked for it as a deploy target 2026-09-24. Every line below was read\n * from the chain that day, not from its documentation.\n *\n * ONE endpoint, and it is the chain's own. No third-party provider carries 6714, so there is no\n * fallback: if this host is down, the chain is unreachable to us. That is a real availability\n * difference from every other entry here (all have 3-5) and it is why `latchTransport`'s\n * fall-through has nothing to fall through to. It is also SLOW — 0.79-1.51 s over five samples,\n * against 59-289 ms elsewhere — which matters because the SDK transport's budget is 12 s and a\n * heavy eth_call can approach it.\n *\n * Explorer: https://anubisscan.io (owner-supplied 2026-09-24).\n *\n * Verified on chain 2026-09-24: chainId 0x1a3a, Geth/v1.0.1 fork, head 14,737,414, genesis\n * 0xa77aaf0bb685a9b0b1dfd6f1ad887e39315a578ae320758aadc24557893df1de, gasLimit 100,000,000,\n * difficulty 0x2 (PoA), 20-28 transactions per block, so it is in real use.\n *\n * NOT Nitro, checked rather than assumed: the EVM's `block.number` (14,737,437) and\n * `eth_blockNumber` (14,737,438) agree, so the two-clocks trap that makes every block-denominated\n * value wrong on Robinhood does NOT apply here.\n *\n * NATIVE IS 18 DECIMALS, settled by arithmetic rather than by the docs — the Arc lesson.\n * `baseFeePerGas` is 0 (EIP-1559 headers present but the base fee floors at zero), so the sum\n * uses `eth_gasPrice` = 12 gwei: a 21,000-gas transfer costs 2.52e14 base units, which is\n * 0.000252 at 18 decimals and 252,000,000 at 6. Only one of those is a transfer fee.\n *\n * ⚠ THE INFRASTRUCTURE LATCH ASSUMES IS NOT THERE. Read 2026-09-24, all ABSENT: CreateX\n * (0xba5Ed0…ba5Ed), Multicall3 (0xcA11bde0…CA11), both Safe singletons and both Safe proxy\n * factories, the Arachnid deterministic deployment proxy (0x4e59b448…), and Permit2. The Safe\n * singleton factory (0x914d7Fec…) IS present, so Safe can be bootstrapped. Deploying Latch here\n * therefore costs more than a normal chain: without CreateX the mined addresses cannot be\n * reproduced and the same-address-on-every-chain claim breaks, and `permit2` and `weth` are\n * REQUIRED non-null fields in the deployments table. None of that is in this file's scope — an\n * endpoints entry is the RPC, not a deployment — but it is recorded here because this is where\n * somebody will look first.\n *\n * ⚠ AND THEY CANNOT SIMPLY BE DEPLOYED, which is the sharper half. All four of those\n * singletons reach the same address on every chain by replaying a PRESIGNED transaction that\n * carries no chainId in its signature. This RPC refuses those:\n *\n * eth_sendRawTransaction -> \"only replay-protected (EIP-155) transactions allowed over RPC\"\n *\n * Probed 2026-09-24 with an unprotected legacy transaction from an unfunded throwaway key, so\n * nothing could execute and the rejection reason IS the result. Base answered the same probe\n * with \"nonce too low\" — i.e. it accepted the unprotected signature and failed on state — which\n * is the control that makes the Anubis answer mean what it says.\n *\n * THE DISTINCTION THAT DECIDES WHAT TO DO: this is a NODE POLICY, not a consensus rule. It is\n * geth's `--rpc.allow-unprotected-txs`, off by default since v1.10. So the chain itself can\n * almost certainly include such a transaction — it is this endpoint that will not forward one.\n * The cheap fix is to ask the Anubis operators either to deploy the standard singletons\n * themselves (most chains do) or to expose one node with the flag on. Deploying non-canonical\n * equivalents is the fallback, and it is the one that breaks the same-address-on-every-chain\n * claim, so it is an owner decision rather than an implementation detail.\n *\n * ✅ THE SAFE IS THE EXCEPTION, AND IT IS THE ONE THAT MATTERS. Computed 2026-09-24 from Safe's\n * real creation bytecode (@safe-global/safe-contracts), zero salt:\n *\n * SafeProxyFactory 1.4.1 via 0x914d7Fec… -> 0x4e1DCf7AD4e460CfD30791CCC4F9c8a4f820ec67 MATCH\n * Safe singleton 1.4.1 via 0x914d7Fec… -> 0x41675C099F32341bf84BFc5382aF534df5C7461a MATCH\n * (the same two via the Arachnid proxy instead -> different addresses, no match)\n *\n * So the canonical Safe addresses come from the SAFE SINGLETON FACTORY, which is present on this\n * chain and is reached by an ORDINARY EIP-155 transaction. The unprotected-transaction refusal\n * does not block Safe at all: deploy 1.4.1 through that factory and the addresses ARE canonical.\n * The governance Safe is then a CREATE2 proxy of that factory, so the same owners, threshold and\n * saltNonce reproduce 0x715a…3432 — the highest-value address in the system keeps its identity\n * here even though CreateX and Permit2 cannot. Still to recover: the saltNonce of the existing\n * Safe, which is in its creation transaction on Robinhood or Sepolia.\n *\n * Method note, because the first attempt was WRONG and looked right: computing this from\n * `codeHash` in @safe-global/safe-deployments reproduces NEITHER address. That field is the\n * RUNTIME hash — proved by matching it against keccak(eth_getCode) on Base — while CREATE2 needs\n * the CREATION-code hash. Those numbers were discarded rather than reported.\n *\n * ✅ PROVEN ON A FORK OF 6714, not argued (2026-09-24, `anvil --fork-url`):\n *\n * SafeProxyFactory 1.4.1 -> 0x4e1DCf7AD4e460CfD30791CCC4F9c8a4f820ec67 deployed, canonical\n * Safe singleton 1.4.1 -> 0x41675C099F32341bf84BFc5382aF534df5C7461a deployed, canonical\n *\n * Both through 0x914d7Fec with an ORDINARY transaction, both at the address Safe publishes.\n *\n * AND THE FACTORY IS NOT SAFE-SPECIFIC. Its 69 bytes are the classic minimal CREATE2 deployer\n * — calldata is a 32-byte salt followed by initcode — so it will deploy ANY contract\n * deterministically. That is the answer to \"can we deploy on Anubis without the chain team\":\n * yes, entirely. Permit2, Multicall3, a CreateX instance and every Latch contract can go\n * through it at addresses that are REPRODUCIBLE from (factory, salt, initcode) rather than\n * dependent on a deployer nonce that any interleaved transaction would shift.\n *\n * What is still NOT canonical there: CreateX, Permit2, Multicall3 and the Arachnid proxy, whose\n * published addresses all derive from the Arachnid route. Ours would live at Latch-specific\n * addresses. The user-visible consequence is multi-chain Launchpad identity —\n * `readPadAcrossChains` compares addresses — and that is a product decision, not a blocker.\n */\n anubis: {\n chainId: 6714,\n name: 'Anubis Network',\n supportsEip1153: true,\n endpoints: [\n // TSTORE/TLOAD returned 1 from eth_call on 2026-09-24, so the DEFAULT build profile\n // (cancun / EIP-1153) is the right one here. As with Linea and X Layer, an eth_call is not\n // the same as a proven transaction; BackendGuard decides at deploy time.\n { url: 'https://rpc.anubispace.org', latencyMs: 803, eip1153: true },\n ],\n },\n sepolia: {\n chainId: 11155111,\n name: 'Ethereum Sepolia',\n supportsEip1153: true,\n /* Tenderly's public gateway was kept-but-last on 2026-09-19 morning, on the theory that its\n failure was local. It is now GONE, because the re-probe found two endpoints that answer:\n a production /app had been spending 9 requests on it before reaching a working provider,\n and \"kept in case it is local\" is only worth a slot when nothing verified can fill it.\n `1rpc.io/sepolia` went with it (plan usage limit). */\n endpoints: [\n { url: 'https://11155111.rpc.thirdweb.com', latencyMs: 46, eip1153: true },\n { url: 'https://ethereum-sepolia-rpc.publicnode.com', latencyMs: 131, eip1153: true },\n { url: 'https://0xrpc.io/sep', latencyMs: 194, eip1153: true },\n { url: 'https://rpc.sepolia.ethpandaops.io', latencyMs: 207, eip1153: true },\n /* `xrpc.cl/sepolia` REMOVED 2026-09-26: it answers eth_getLogs over the release range with an\n EMPTY list and no error, where publicnode and ethpandaops return all 10 Initialize logs for\n the same query. A wrong answer is worse than a refusal: the failover only moves on after an\n error, so whenever this endpoint was reached, pools and swaps silently read as zero (the\n dashboard's \"no swaps yet\" and /pools' \"no pools\" on a chain that has both). */\n ],\n },\n /* Monad Testnet (10143) was REMOVED on 2026-09-24 — owner decision, \"we are not using monad\n testnet\". Monad MAINNET (143) stays; only the testnet is gone. Its RPC certification survives\n in `docs/chain-certification.md` as a measurement that was paid for, but it is not a target and\n nothing should read it back in. */\n /**\n * Stable Testnet. THREE endpoints, and no genesis pin for the same reason as Stable:\n * the nodes serve no block older than roughly head-100_000, so identity here rests\n * on the live cross-check.\n */\n stableTestnet: {\n chainId: 2201,\n name: 'Stable Testnet',\n supportsEip1153: true,\n endpoints: [\n { url: 'https://rpc.testnet.stable.xyz', latencyMs: 176, eip1153: true },\n { url: 'https://2201.rpc.thirdweb.com', latencyMs: 255, eip1153: true },\n // unverified 2026-09-19 (local TLS filter). Last measured 2026-09-10. Kept\n // because the alternative is two.\n { url: 'https://stable-testnet.gateway.tenderly.co', latencyMs: 103, eip1153: true },\n ],\n },\n /**\n * Arc Testnet — Circle's USDC-gas L1, testnet.\n *\n * Nine hostnames answer, but they front only FIVE operators: Circle, dRPC,\n * QuickNode, Blockdaemon and thirdweb. Circle publishes each partner on both\n * `*.arc.io` (its docs) and `*.arc.network` (ethereum-lists), and dRPC answers\n * on `arc-testnet.drpc.org` as well. One hostname per operator is listed here,\n * because two names in front of one node is not failover — it is one outage\n * counted twice.\n */\n arcTestnet: {\n chainId: 5042002,\n name: 'Arc Testnet',\n supportsEip1153: true,\n /* All NINE hostnames answered on 2026-09-19 and all nine matched the pinned genesis;\n the five below are one per operator, re-ordered by this run's latency. */\n endpoints: [\n { url: 'https://5042002.rpc.thirdweb.com', latencyMs: 42, eip1153: true },\n { url: 'https://rpc.quicknode.testnet.arc.io', latencyMs: 61, eip1153: true },\n { url: 'https://rpc.drpc.testnet.arc.io', latencyMs: 65, eip1153: true },\n { url: 'https://rpc.testnet.arc.io', latencyMs: 70, eip1153: true },\n { url: 'https://rpc.blockdaemon.testnet.arc.io', latencyMs: 171, eip1153: true },\n ],\n },\n};\n/**\n * Chains with only ONE verified public endpoint, where a fallback transport cannot\n * fail over at all.\n *\n * Still EMPTY after the 2026-09-19 re-probe: every target chain has at least three\n * independent public endpoints (the thinnest are Plasma and Stable Testnet, on three).\n * It was not empty before — Monad, Plasma, Stable, Sepolia, Stable Testnet and Arc\n * Testnet each had exactly one on 2026-09-09.\n *\n * Kept as an exported, empty list rather than deleted, because it is the assertion\n * a deploy check should make, and it will stop being empty the moment a chain is\n * added ahead of its provider ecosystem.\n *\n * IT STOPPED BEING EMPTY ON 2026-09-24, exactly as that sentence predicted. Anubis\n * Network (6714) is carried by its own node and nothing else — no third-party provider\n * serves 6714 — so `latchTransport` has nothing to fall through to and the chain is\n * unreachable to us whenever that one host is. Treat a self-hosted or paid node via\n * `LATCH_RPC_6714` as a REQUIREMENT there, not an optimisation.\n */\nexport const SINGLE_ENDPOINT_CHAINS = ['anubis'];\n/**\n * Chains carrying FEWER than the five-endpoint target.\n *\n * These are not failures of the probe: no fifth public endpoint was found for them.\n * They still fail over, but with less headroom, and on a rate-limited day they will\n * degrade first. On these chains treat a paid or self-hosted node supplied through\n * `LATCH_RPC_<chainId>` as a requirement rather than an optimisation.\n *\n * This list MUST name exactly the chains whose `endpoints` array is shorter than\n * `ENDPOINT_TARGET` — `transport.ts` reports `belowTarget` as the AND of the two, so a\n * chain missing from here is silently reported as healthy. `linea` joined on 2026-09-19\n * (four, after `1rpc.io/linea` hit its plan limit). Monad Testnet was removed 2026-09-24.\n */\nexport const THIN_ENDPOINT_CHAINS = [\n // One endpoint, so it is in SINGLE_ENDPOINT_CHAINS as well — the two lists are not\n // exclusive, and `transport.ts` reports `belowTarget` from this one.\n 'anubis',\n 'linea',\n 'xlayer',\n 'plasma',\n 'stable',\n 'stableTestnet',\n // 4 since 2026-09-26: xrpc.cl/sepolia removed for answering getLogs with an empty list.\n 'sepolia',\n];\n/** The number of public endpoints this file aims to carry per chain. */\nexport const ENDPOINT_TARGET = 5;\nconst BY_ID = new Map(Object.values(CHAIN_RPCS).map((c) => [c.chainId, c]));\nexport function chainById(chainId) {\n return BY_ID.get(chainId);\n}\n/**\n * Ordered endpoint URLs for a chain, private providers first.\n *\n * A keyed provider is always preferable to a public one: public endpoints rate-limit,\n * lag, and disappear. Supply yours via env (`LATCH_RPC_<CHAINID>`, comma-separated for\n * several) and they are tried before the public list, which then acts as a safety net.\n *\n * THE PUBLIC SAFETY NET IS NOT ALWAYS WANTED. A caller-supplied RPC that points at a LOCAL or\n * private-network node (a devnet on 127.0.0.1, an anvil fork, a node on 10.x / 192.168.x) is used\n * ALONE by default: behind it the public list is the REAL chain, so a failed local request — a\n * signed `eth_sendRawTransaction` among them — would silently fall through to mainnet. Pass\n * `publicFallback` to decide explicitly either way (`false` for any exclusive endpoint, `true` to\n * keep the net behind a local node on purpose).\n *\n * @param chainId target chain\n * @param env process environment, injected so this stays testable and browser-safe\n * @param opts `publicFallback`: append the chain's public endpoints behind the supplied ones.\n * Default: true, unless a supplied endpoint is local / private-network (see `isLocalRpcUrl`).\n */\nexport function resolveEndpoints(chainId, env = {}, opts = {}) {\n const priv = suppliedEndpoints(chainId, env);\n const fallback = opts.publicFallback ?? !priv.some(isLocalRpcUrl);\n if (priv.length > 0 && !fallback)\n return [...new Set(priv)];\n const pub = chainById(chainId)?.endpoints.map((e) => e.url) ?? [];\n // de-dupe while preserving order, private first\n return [...new Set([...priv, ...pub])];\n}\n/** The endpoints a caller supplied for `chainId` (`LATCH_RPC_<chainId>`, comma-separated). */\nfunction suppliedEndpoints(chainId, env) {\n return (env[`LATCH_RPC_${chainId}`] ?? '')\n .split(',')\n .map((s) => s.trim())\n .filter(Boolean);\n}\n/**\n * True for an RPC URL that names a local or private-network host: `localhost` / `*.localhost`,\n * loopback (127.0.0.0/8, ::1), 0.0.0.0, RFC 1918 (10/8, 172.16/12, 192.168/16), link-local\n * (169.254/16), `*.local` and `host.docker.internal`. Such a node is a devnet or a fork, never the\n * chain itself, and must not have the real chain's public endpoints behind it.\n */\nexport function isLocalRpcUrl(url) {\n let host;\n try {\n host = new URL(url).hostname.toLowerCase().replace(/^\\[|\\]$/g, '');\n }\n catch {\n return false;\n }\n if (host === 'localhost' || host.endsWith('.localhost') || host.endsWith('.local') || host === 'host.docker.internal')\n return true;\n if (host === '::1' || host === '0.0.0.0')\n return true;\n const m = /^(\\d{1,3})\\.(\\d{1,3})\\.(\\d{1,3})\\.(\\d{1,3})$/.exec(host);\n if (m === null)\n return false;\n const a = Number(m[1]);\n const b = Number(m[2]);\n return a === 127 || a === 10 || (a === 172 && b >= 16 && b <= 31) || (a === 192 && b === 168) || (a === 169 && b === 254);\n}\n/**\n * Public endpoints VERIFIED to answer a whole-history `eth_getLogs` in ONE request,\n * per chain. Each URL must also appear in that chain's `CHAIN_RPCS` list; this table\n * only REORDERS, it never adds an endpoint.\n *\n * WHY A SEPARATE ORDERING, RATHER THAN MOVING THESE FIRST IN `CHAIN_RPCS`. The two\n * orderings answer different questions. `CHAIN_RPCS` is ranked by `eth_blockNumber`\n * latency, which is what an `eth_call` cares about. A log scan cares about something\n * the latency probe never measured: the maximum block span an endpoint will serve.\n * On Robinhood the fastest endpoints refuse a wide range outright, and with\n * `rank: false` a fallback transport restarts at endpoint 1 on EVERY request — so a\n * windowed scan of ~280 windows paid a refusal or a 429 at each of the first four\n * endpoints before reaching the one that would have served the whole range at once.\n * Reordering reads globally to fix logs would trade a measured read order for an\n * unmeasured one; routing only `eth_getLogs` through this list fixes logs and leaves\n * reads exactly as probed.\n *\n * Probed 2026-09-14 from a residential connection, `eth_getLogs` over the CL pool\n * manager from the protocol's deployment block (60,111,836) to `latest` — a span of\n * 2,540,270 blocks:\n *\n * rpc.mainnet.chain.robinhood.com served it, 6 of 6 sequential requests, 0.15-0.21 s,\n * CORS `access-control-allow-origin: *`\n * rpc.nodeflare.app/robinhood/public served it once, then HTTP 429 \"1 per 10s\" per IP\n * (and by 2026-09-19 it 403s everything — removed\n * from CHAIN_RPCS entirely, so it is moot)\n * rpc-robinhood.blockmachine.io -32602 \"span 2540270 blocks exceeds maximum 10000\"\n * rpc.ordofi.network -32005 \"the network is busy\"\n * robinhood.rpc.blxrbdn.com HTTP 403 \"Request forbidden by administrative rules\"\n *\n * Only the first is listed: one successful request followed by a 10-second lockout\n * is not \"verified for full-range logs\". Re-probe before adding anything.\n */\nexport const LOG_RANGE_ENDPOINTS = {\n 4663: [\"https://rpc.mainnet.chain.robinhood.com\"],\n /* Sepolia, 2026-09-26. The same Initialize query over the release range, repeated per endpoint:\n rpc.sepolia.ethpandaops.io 3, 3 (the full, identical answer every time)\n ethereum-sepolia-rpc.publicnode.com 3, 2 (load-balanced backends disagree; no error)\n 11155111.rpc.thirdweb.com \"Request exceeds defined limit\" (an error: fine)\n 0xrpc.io/sep eth_getLogs not available (an error: fine)\n An endpoint that answers SHORT without an error is the dangerous kind, because the failover\n only moves on after an error. ethpandaops goes first for logs; the rest stay as fallback. */\n 11155111: [\"https://rpc.sepolia.ethpandaops.io\"],\n /* Base, 2026-09-27, before any Latch contract exists there (so the indexer's first pass is\n ready): WETH Deposit logs, each query repeated three times per endpoint.\n 2,000 blocks mainnet.base.org 5,981 x3 · thirdweb \"Log response size exceeded\" ·\n tenderly \"invalid params\" · drpc \"ranges over 10000 blocks…\" (free plan) ·\n blastapi \"up to a 10 block range\"\n 200 blocks mainnet.base.org, thirdweb, tenderly 542 x3 each (identical) · drpc and\n blastapi refuse as above\n Every refusal is an ERROR, which the failover moves past; no endpoint answered short\n without one (the Sepolia hazard). mainnet.base.org is the only one that served the wide\n window, so it goes first for logs. Re-probe once Latch's own contracts are on Base. */\n 8453: [\"https://mainnet.base.org\"],\n};\n/**\n * Ordered endpoint URLs for `eth_getLogs` on a chain: private providers first (as in\n * `resolveEndpoints`), then the endpoints verified for full-range logs in\n * `LOG_RANGE_ENDPOINTS`, then every other public endpoint in its probed order.\n *\n * The SET of URLs is exactly `resolveEndpoints(chainId, env)`; only the order differs.\n *\n * @param chainId target chain\n * @param env process environment, injected so this stays testable and browser-safe\n */\nexport function resolveLogEndpoints(chainId, env = {}, opts = {}) {\n const all = resolveEndpoints(chainId, env, opts);\n const priv = (env[`LATCH_RPC_${chainId}`] ?? \"\")\n .split(\",\")\n .map((s) => s.trim())\n .filter(Boolean);\n const verified = (LOG_RANGE_ENDPOINTS[chainId] ?? []).filter((u) => all.includes(u));\n return [...new Set([...priv, ...verified, ...all])];\n}\n//# sourceMappingURL=endpoints.js.map","import { HttpRequestError, TimeoutError, http } from 'viem';\nconst health = new Map();\n/** Refused locally because the endpoint is in cooldown. Nothing was sent. */\nexport class EndpointCoolingDownError extends HttpRequestError {\n name = 'EndpointCoolingDownError';\n retryAt;\n constructor(url, retryAt) {\n super({ url, details: `endpoint cooling down after failures; next attempt after ${new Date(retryAt).toISOString()}` });\n this.retryAt = retryAt;\n }\n}\n/** Statuses that say the ENDPOINT is not serving us, as opposed to the request being wrong. */\nfunction coolsOnStatus(status) {\n return status === undefined || status === 401 || status === 403 || status === 408 || status === 429 || status >= 500;\n}\nfunction isEndpointFailure(e, coolOnTimeout) {\n if (e instanceof EndpointCoolingDownError)\n return false;\n if (e instanceof TimeoutError)\n return coolOnTimeout;\n if (e instanceof HttpRequestError)\n return coolsOnStatus(e.status);\n return false;\n}\n/** The cooldown for `url` as of now: `null` when it may be asked. */\nexport function endpointCooldown(url, now = Date.now()) {\n const h = health.get(url);\n return h !== undefined && now < h.until ? { until: h.until, fails: h.fails } : null;\n}\n/** Forget every endpoint's history (tests, or a manual \"retry now\"). */\nexport function resetEndpointCooldowns() {\n health.clear();\n}\n/** Record a failure against `url` and return the time it may be asked again. */\nexport function noteEndpointFailure(url, opts = {}, now = Date.now()) {\n const base = opts.baseMs ?? 15_000;\n const max = opts.maxMs ?? 120_000;\n const h = health.get(url) ?? { fails: 0, until: 0 };\n /* Already cooling: a sibling request from the same burst failed first. One outage is one failure,\n not one per request in flight — escalating per request put a page's first burst of ~20 reads\n straight onto the 2-minute ceiling. */\n if (now < h.until)\n return h.until;\n h.fails += 1;\n h.until = now + Math.min(max, base * 2 ** (h.fails - 1));\n health.set(url, h);\n return h.until;\n}\n/** viem `http(url)` with endpoint cooldown. Drop-in inside a `fallback([...])`. */\nexport function cooledHttp(url, config = {}, opts = {}) {\n const inner = http(url, config);\n const coolOnTimeout = opts.coolOnTimeout ?? true;\n return ((params) => {\n const t = inner(params);\n const request = (async (args, options) => {\n const cooling = endpointCooldown(url);\n if (cooling !== null)\n throw new EndpointCoolingDownError(url, cooling.until);\n try {\n const out = await t.request(args, options);\n health.delete(url);\n return out;\n }\n catch (e) {\n if (isEndpointFailure(e, coolOnTimeout))\n noteEndpointFailure(url, opts);\n throw e;\n }\n });\n return { ...t, request };\n });\n}\n//# sourceMappingURL=cooldown.js.map","import { fallback } from 'viem';\nimport { cooledHttp } from './cooldown.js';\nimport { chainById, resolveEndpoints, SINGLE_ENDPOINT_CHAINS, THIN_ENDPOINT_CHAINS, ENDPOINT_TARGET, CHAIN_RPCS, } from './endpoints.js';\nexport class UnknownChainError extends Error {\n chainId;\n constructor(chainId) {\n super(`No RPC endpoints known for chain ${chainId}. Add it to CHAIN_RPCS after probing it, ` +\n `or pass one via LATCH_RPC_${chainId}.`);\n this.chainId = chainId;\n this.name = 'UnknownChainError';\n }\n}\n/**\n * Build a failover transport for a chain id.\n *\n * @throws UnknownChainError when the chain is neither known nor supplied via env.\n * Failing loudly beats silently falling back to a default chain — a transport that\n * quietly points at the wrong network is how testnet calls end up on mainnet.\n */\nexport function latchTransport(chainId, opts = {}) {\n const { env = {}, rank = false, retryCount = 2, perEndpointRetries = 0, timeout = 10_000, httpConfig, cooldown = {}, publicFallback, } = opts;\n const urls = resolveEndpoints(chainId, env, publicFallback === undefined ? {} : { publicFallback });\n if (urls.length === 0)\n throw new UnknownChainError(chainId);\n return fallback(urls.map((url) => cooledHttp(url, { retryCount: perEndpointRetries, timeout, ...httpConfig }, cooldown === false ? { baseMs: 0, maxMs: 0 } : cooldown)), { rank, retryCount });\n}\n/** Same, by chain key, for call sites that know the chain at author time. */\nexport function latchTransportFor(key, opts = {}) {\n return latchTransport(CHAIN_RPCS[key].chainId, opts);\n}\n/**\n * How much failover each chain actually has.\n *\n * Call this at startup and surface the result rather than discovering it during an\n * incident. As of the 2026-09-10 probe nothing is a single point of failure any\n * more, but X Layer, Plasma, Stable and Stable Testnet are still below the\n * five-endpoint target — on those, a dedicated node supplied through\n * `LATCH_RPC_<chainId>` is a requirement rather than an optimisation.\n */\nexport function redundancyReport(env = {}) {\n return Object.entries(CHAIN_RPCS).map(([key, cfg]) => {\n const count = resolveEndpoints(cfg.chainId, env).length;\n return {\n chainId: cfg.chainId,\n name: cfg.name,\n endpointCount: count,\n singlePointOfFailure: count < 2 && SINGLE_ENDPOINT_CHAINS.includes(key),\n belowTarget: count < ENDPOINT_TARGET && THIN_ENDPOINT_CHAINS.includes(key),\n };\n });\n}\n/**\n * Assert a chain's build backend matches its EIP-1153 support.\n *\n * Mirrors `script/BackendGuard.sol` on the TypeScript side: deploying the transient\n * build to a chain without EIP-1153 produces contracts that revert on every lock.\n */\nexport function assertBackendMatchesChain(chainId, builtWithEip1153) {\n const cfg = chainById(chainId);\n if (!cfg)\n throw new UnknownChainError(chainId);\n if (cfg.supportsEip1153 !== builtWithEip1153) {\n throw new Error(`Backend mismatch for ${cfg.name} (${chainId}): chain supportsEip1153=${cfg.supportsEip1153} ` +\n `but this build was compiled with eip1153=${builtWithEip1153}.`);\n }\n}\n//# sourceMappingURL=transport.js.map","// SPDX-License-Identifier: MIT\n/**\n * Display formatting and user-input parsing.\n *\n * Parsing is the security-relevant half: a mis-parsed decimal string becomes a\n * wrong `amountIn`, and `parseUnits` will happily truncate extra decimal places.\n * {@link parseAmount} refuses ambiguous input instead of guessing.\n */\n\nimport { formatUnits, parseUnits } from \"viem\";\n\n/** A rejected amount string, with a reason suitable for showing to a user. */\nexport interface AmountParseFailure {\n readonly ok: false;\n readonly reason:\n | \"empty\"\n | \"not-a-number\"\n | \"negative\"\n | \"too-many-decimals\"\n | \"zero\";\n readonly message: string;\n}\n\n/** A successfully parsed amount. */\nexport interface AmountParseSuccess {\n readonly ok: true;\n readonly value: bigint;\n}\n\nexport type AmountParseResult = AmountParseSuccess | AmountParseFailure;\n\nconst NUMERIC = /^\\d*(?:\\.\\d*)?$/;\n\n/**\n * Parses a user-entered decimal string into the token's smallest unit.\n *\n * @param allowZero when `false` (default) a zero amount is rejected, since a\n * zero-amount swap is never what the user meant.\n */\nexport function parseAmount(\n input: string,\n decimals: number,\n allowZero = false,\n): AmountParseResult {\n const trimmed = input.trim();\n if (trimmed === \"\" || trimmed === \".\") {\n return { ok: false, reason: \"empty\", message: \"Enter an amount\" };\n }\n if (trimmed.startsWith(\"-\")) {\n return { ok: false, reason: \"negative\", message: \"Amount must be positive\" };\n }\n if (!NUMERIC.test(trimmed)) {\n return { ok: false, reason: \"not-a-number\", message: \"Amount must be a number\" };\n }\n const [, fraction = \"\"] = trimmed.split(\".\");\n if (fraction.length > decimals) {\n return {\n ok: false,\n reason: \"too-many-decimals\",\n message: `This token has ${decimals} decimals; ${fraction.length} were entered`,\n };\n }\n const value = parseUnits(trimmed, decimals);\n if (value === 0n && !allowZero) {\n return { ok: false, reason: \"zero\", message: \"Enter an amount greater than zero\" };\n }\n return { ok: true, value };\n}\n\n/**\n * Formats a smallest-unit amount for display.\n *\n * Trims trailing zeros and caps the visible fraction, but never rounds a value\n * up to a non-zero display when it is zero, and never shows `0` for a non-zero\n * dust amount - it shows `<0.0001` instead.\n */\nexport function formatAmount(\n value: bigint,\n decimals: number,\n maxFractionDigits = 6,\n): string {\n if (value === 0n) return \"0\";\n const negative = value < 0n;\n const raw = formatUnits(negative ? -value : value, decimals);\n const [whole = \"0\", fraction = \"\"] = raw.split(\".\");\n const sign = negative ? \"-\" : \"\";\n\n if (fraction === \"\") return `${sign}${groupThousands(whole)}`;\n\n const trimmed = fraction.slice(0, maxFractionDigits).replace(/0+$/, \"\");\n if (trimmed === \"\") {\n // Non-zero, but smaller than the display precision.\n if (whole === \"0\") {\n const epsilon = `0.${\"0\".repeat(Math.max(0, maxFractionDigits - 1))}1`;\n return `${sign}<${epsilon}`;\n }\n return `${sign}${groupThousands(whole)}`;\n }\n return `${sign}${groupThousands(whole)}.${trimmed}`;\n}\n\nfunction groupThousands(whole: string): string {\n return whole.replace(/\\B(?=(\\d{3})+(?!\\d))/g, \",\");\n}\n\n/** Formats a rate for display, e.g. `1 A = 1,234.5678 B`. */\nexport function formatRate(\n rate: number | null,\n symbolIn: string,\n symbolOut: string,\n): string {\n if (rate === null || !Number.isFinite(rate) || rate <= 0) return \"-\";\n const digits = rate >= 1000 ? 2 : rate >= 1 ? 4 : 6;\n return `1 ${symbolIn} = ${rate.toLocaleString(undefined, {\n maximumFractionDigits: digits,\n })} ${symbolOut}`;\n}\n\n/** Formats a bps value as a percentage string. */\nexport function formatPercentFromBps(bps: number | null): string {\n if (bps === null) return \"unknown\";\n const percent = bps / 100;\n if (percent > 0 && percent < 0.01) return \"<0.01%\";\n return `${percent.toFixed(2)}%`;\n}\n\n/** Formats a pips value (1e6 = 100%) as a percentage string. */\nexport function formatPercentFromPips(pips: number): string {\n const percent = pips / 10_000;\n if (percent > 0 && percent < 0.001) return \"<0.001%\";\n return `${trimTrailingZeros(percent.toFixed(3))}%`;\n}\n\nfunction trimTrailingZeros(value: string): string {\n return value.includes(\".\") ? value.replace(/\\.?0+$/, \"\") : value;\n}\n\n/** Shortens an address for display: `0x1234...cdef`. */\nexport function shortAddress(address: string): string {\n if (address.length <= 12) return address;\n return `${address.slice(0, 6)}...${address.slice(-4)}`;\n}\n\n/** Formats a remaining duration in seconds as a compact `1d 4h 3m` string. */\nexport function formatDuration(totalSeconds: number): string {\n if (!Number.isFinite(totalSeconds) || totalSeconds <= 0) return \"0s\";\n const seconds = Math.floor(totalSeconds);\n const days = Math.floor(seconds / 86_400);\n const hours = Math.floor((seconds % 86_400) / 3_600);\n const minutes = Math.floor((seconds % 3_600) / 60);\n const secs = seconds % 60;\n const parts: string[] = [];\n if (days > 0) parts.push(`${days}d`);\n if (hours > 0) parts.push(`${hours}h`);\n if (minutes > 0 && days === 0) parts.push(`${minutes}m`);\n if (parts.length === 0) parts.push(`${secs}s`);\n return parts.join(\" \");\n}\n\n/** Formats a unix timestamp for display in the viewer's locale. */\nexport function formatTimestamp(unixSeconds: bigint | number): string {\n const ms = Number(unixSeconds) * 1000;\n if (!Number.isFinite(ms)) return \"-\";\n return new Date(ms).toLocaleString();\n}\n","// SPDX-License-Identifier: MIT\n/**\n * The lock reads with no React in them: one pool's locks or one token's locks,\n * read through the MIT SDK (`@latchprotocol/sdk/lock`). `usePoolLocks` /\n * `useTokenLocks` wrap these as resources; the framework-free embed\n * (`latch-embed.js`) calls them directly.\n */\n\nimport { erc20Abi, zeroAddress, type Address, type Hex, type PublicClient } from \"viem\";\nimport {\n findClLpLockerTokenIds,\n permanentTokenPools,\n readBinLpLockerLocks,\n readBinPoolPermanent,\n readChainNow,\n readClLpLockerPositionsPriced,\n readClPoolPermanent,\n readCurrencyLocks,\n readPoolLocks,\n summarizePoolLocks,\n type BinPoolPermanentSummary,\n type CurrencyLockSummary,\n type PoolLockSummary,\n type TokenPermanentPool,\n} from \"@latchprotocol/sdk/lock\";\n\nimport type { LocksTokenMeta, LpLockerSource } from \"./model.js\";\nimport { shortAddress } from \"../core/format.js\";\n\n/** What a lock read needs beyond the addresses. */\nexport interface LocksReadOptions {\n readonly native?: NativeCurrencyMeta;\n /** The protocol's LP lockers: their permanent liquidity is read and counted. */\n readonly lp?: LpLockerSource;\n}\n\n/** Native currency display facts (address zero). */\nexport interface NativeCurrencyMeta {\n readonly symbol: string;\n readonly decimals: number;\n}\n\nexport const DEFAULT_NATIVE: NativeCurrencyMeta = { symbol: \"ETH\", decimals: 18 };\n\n/**\n * Symbol and decimals as the token answers them. Read here rather than through\n * the SDK's kit reader so the framework-free embed does not carry the kit's ABI.\n */\nasync function metaOf(client: PublicClient, address: Address, native: NativeCurrencyMeta): Promise<LocksTokenMeta> {\n if (address.toLowerCase() === zeroAddress) return { address: zeroAddress, symbol: native.symbol, decimals: native.decimals };\n const [symbol, decimals] = await Promise.all([\n client.readContract({ address, abi: erc20Abi, functionName: \"symbol\" }).catch(() => null),\n client.readContract({ address, abi: erc20Abi, functionName: \"decimals\" }).catch(() => null),\n ]);\n return { address, symbol: symbol ?? shortAddress(address), decimals: decimals === null ? null : Number(decimals) };\n}\n\nexport interface PoolLocksData {\n /** CL: time locks and the CL LP locker's permanent positions. Bin pool: an empty summary. */\n readonly summary: PoolLockSummary;\n /** Bin pool: what the Bin LP locker holds forever; `null` for a CL pool. */\n readonly bin: BinPoolPermanentSummary | null;\n readonly currency0: LocksTokenMeta;\n readonly currency1: LocksTokenMeta;\n /** The chain's `block.timestamp` when read. */\n readonly chainNow: bigint;\n /** `Date.now()` when read, to advance `chainNow` locally. */\n readonly readAtMs: number;\n}\n\nexport interface TokenLocksData {\n /** `null` when no token lock is deployed (only LP-locker liquidity is read). */\n readonly summary: CurrencyLockSummary | null;\n /** How much of the token the LP lockers hold forever, per pool; `null` when no LP locker was given. */\n readonly permanent: { readonly pools: readonly TokenPermanentPool[]; readonly total: bigint; readonly unpriced: number } | null;\n readonly token: LocksTokenMeta;\n readonly chainNow: bigint;\n readonly readAtMs: number;\n}\n\n\nasync function clLockerTokenIds(client: PublicClient, lp: LpLockerSource, poolId?: Hex): Promise<readonly bigint[]> {\n if (!lp.lpLocker) return [];\n if (lp.lpLockerTokenIds) return lp.lpLockerTokenIds;\n if (lp.lpLockerFromBlock === undefined) return [];\n const toBlock = await client.getBlockNumber();\n return (await findClLpLockerTokenIds(client, lp.lpLocker, { fromBlock: lp.lpLockerFromBlock, toBlock }, poolId)).map((x) => x.tokenId);\n}\n\n/**\n * Every lock in one pool (the SDK's `readPoolLocks`), with both currencies'\n * metadata. The loader behind {@link usePoolLocks}, usable without React (the\n * framework-free embed reads through it).\n */\nexport async function fetchPoolLocks(\n client: PublicClient,\n positionLock: Address | null,\n poolId: Hex,\n options: LocksReadOptions = {},\n): Promise<PoolLocksData> {\n const native = options.native ?? DEFAULT_NATIVE;\n const lp = options.lp ?? {};\n if (lp.poolType === \"bin\") {\n const [bin, now] = await Promise.all([readBinPoolPermanent(client, lp.binLpLocker as Address, poolId), readChainNow(client)]);\n const readAtMs = Date.now();\n const f = bin.locks[0];\n const [currency0, currency1] = await Promise.all([metaOf(client, f?.currency0 ?? zeroAddress, native), metaOf(client, f?.currency1 ?? zeroAddress, native)]);\n const summary = summarizePoolLocks({ poolId, currency0: currency0.address, currency1: currency1.address, pool: null, locks: [] });\n return { summary, bin, currency0, currency1, chainNow: now, readAtMs };\n }\n const ids = await clLockerTokenIds(client, lp, poolId);\n let summary: PoolLockSummary;\n let chainNow: bigint;\n if (positionLock !== null) {\n const s = await readPoolLocks(client, positionLock, poolId, { lpLocker: lp.lpLocker ?? null, lpLockerTokenIds: ids });\n summary = s;\n chainNow = s.now;\n } else {\n const [perm, now] = await Promise.all([readClPoolPermanent(client, lp.lpLocker as Address, poolId, { tokenIds: ids }), readChainNow(client)]);\n const f = perm.permanent[0];\n summary = summarizePoolLocks({ poolId, currency0: f?.currency0 ?? zeroAddress, currency1: f?.currency1 ?? zeroAddress, pool: perm.pool, locks: [], permanent: perm.permanent });\n chainNow = now;\n }\n const readAtMs = Date.now();\n const [currency0, currency1] = await Promise.all([metaOf(client, summary.currency0, native), metaOf(client, summary.currency1, native)]);\n return { summary, bin: null, currency0, currency1, chainNow, readAtMs };\n}\n\n/** Whether {@link fetchPoolLocks} has anything to read for this target. */\nexport function poolLocksEnabled(positionLock: Address | null, lp: LpLockerSource = {}): boolean {\n return lp.poolType === \"bin\" ? !!lp.binLpLocker : positionLock !== null || !!lp.lpLocker;\n}\n\n/**\n * Every lock of one token (the SDK's `readCurrencyLocks`), with its metadata\n * and what the LP lockers hold of it. The loader behind {@link useTokenLocks}.\n */\nexport async function fetchTokenLocks(\n client: PublicClient,\n tokenLock: Address | null,\n token: Address,\n options: LocksReadOptions = {},\n): Promise<TokenLocksData> {\n const native = options.native ?? DEFAULT_NATIVE;\n const lp = options.lp ?? {};\n const hasLp = !!lp.lpLocker || !!lp.binLpLocker;\n const [summary, meta, now, permanent] = await Promise.all([\n tokenLock === null ? Promise.resolve(null) : readCurrencyLocks(client, tokenLock, token),\n metaOf(client, token, native),\n readChainNow(client),\n hasLp\n ? (async () => {\n const ids = await clLockerTokenIds(client, lp);\n const [cl, bin] = await Promise.all([\n lp.lpLocker ? readClLpLockerPositionsPriced(client, lp.lpLocker, ids) : Promise.resolve([]),\n lp.binLpLocker ? readBinLpLockerLocks(client, lp.binLpLocker).then((r) => r.locks) : Promise.resolve([]),\n ]);\n return permanentTokenPools(token, cl, bin);\n })()\n : Promise.resolve(null),\n ]);\n return { summary, permanent, token: meta, chainNow: summary?.now ?? now, readAtMs: Date.now() };\n}\n","// SPDX-License-Identifier: MIT\r\n/**\r\n * Locks: the pure half of `LocksBadge` / `LocksPanel`.\r\n *\r\n * Everything here turns what the SDK read from chain (`readPoolLocks`,\r\n * `readCurrencyLocks` in `@latchprotocol/sdk/lock`) into words, with no\r\n * estimate added. Two rules the copy never breaks:\r\n *\r\n * - A CL pool has no LP token. The pool figure is the locked share of the\r\n * pool's ACTIVE liquidity at the current tick (`lockedActiveBps`), and it is\r\n * called exactly that. When the pool has no active liquidity the share is\r\n * \"not measurable\", never 0% and never 100%.\r\n * - Time is the chain's `block.timestamp`, the clock the contracts compare\r\n * `unlockAt` against. Callers pass `now` from the chain, never `Date.now()`.\r\n *\r\n * - Two kinds of lock, never blurred: \"time-locked until <date>\"\r\n * (`LatchPositionLock`, `LatchTokenLock`) and \"locked permanently (LP\r\n * locker)\" (`LatchLPLocker` / `LatchBinLPLocker`, which hold every Kit v2\r\n * launch's seed liquidity and have NO withdraw path). Permanent in-range CL\r\n * liquidity counts in the locked share and is also shown on its own. A Bin\r\n * pool's permanent figure is the locked fraction of its ACTIVE bin.\r\n *\r\n * No USD anywhere: amounts are token units with a symbol.\r\n */\r\n\r\nimport type { Address, Hex } from \"viem\";\r\nimport { vestedAt, type BinPoolPermanentSummary, type CurrencyLockSummary, type PoolLockSummary, type PositionLockStatus, type TokenLockView, type TokenPermanentPool } from \"@latchprotocol/sdk/lock\";\r\n\r\n/** Which locks a widget shows. `null` lock address = the chain has no address for it; surfaces say \"coming soon\". */\r\nexport type LocksTarget =\r\n | ({ readonly kind: \"pool\"; readonly poolId: Hex; readonly positionLock: Address | null } & LpLockerSource)\r\n | ({ readonly kind: \"token\"; readonly token: Address; readonly tokenLock: Address | null } & LpLockerSource);\r\n\r\n/**\r\n * The protocol's permanent LP lockers (the address book's `launchpadV2.clLPLocker`\r\n * / `binLPLocker`). CL positions are found from the locker's `PositionLocked`\r\n * logs: pass their token ids when you know them, or `lpLockerFromBlock` (the\r\n * locker's deploy block) and one log scan to the latest block is made. Bin locks\r\n * are enumerable and need neither. All optional: omitted = not counted.\r\n */\r\nexport interface LpLockerSource {\r\n readonly lpLocker?: Address | null;\r\n readonly binLpLocker?: Address | null;\r\n readonly lpLockerTokenIds?: readonly bigint[];\r\n readonly lpLockerFromBlock?: bigint;\r\n /** A pool target that is a Bin pool: its permanent share is read from the Bin locker. */\r\n readonly poolType?: \"cl\" | \"bin\";\r\n}\r\n\r\n/** Token display facts. `decimals: null` means amounts are shown in base units. */\r\nexport interface LocksTokenMeta {\r\n readonly address: Address;\r\n readonly symbol: string;\r\n readonly decimals: number | null;\r\n}\r\n\r\n/** The Latch lock page for a target: `<siteUrl>/app/locks/pool/<poolId>` or `/app/locks/token/<address>`. */\r\nexport function lockPageUrl(\r\n siteUrl: string,\r\n target: Pick<LocksTarget, \"kind\"> & { readonly poolId?: Hex; readonly token?: Address },\r\n opts: { readonly pathBase?: string; readonly query?: string } = {},\r\n): string {\r\n const base = siteUrl.replace(/\\/+$/, \"\");\r\n const path = `/${(opts.pathBase ?? \"/app/locks\").replace(/^\\/+|\\/+$/g, \"\")}`;\r\n const q = opts.query ? `?${opts.query.replace(/^\\?/, \"\")}` : \"\";\r\n if (target.kind === \"pool\") return `${base}${path}/pool/${target.poolId ?? \"\"}${q}`;\r\n return `${base}${path}/token/${target.token ?? \"\"}${q}`;\r\n}\r\n\r\n/** Basis points as a percentage: 8234 → \"82.34%\", 10000 → \"100%\", 1 → \"0.01%\". */\r\nexport function formatLockBps(bps: number): string {\r\n const whole = Math.floor(bps / 100);\r\n const frac = bps % 100;\r\n return frac === 0 ? `${whole}%` : `${whole}.${String(frac).padStart(2, \"0\")}%`;\r\n}\r\n\r\n/** `12d 04h 03m` above a day, `4h 03m 20s` below, `now` at zero. */\r\nexport function formatCountdown(seconds: bigint): string {\r\n if (seconds <= 0n) return \"now\";\r\n const s = Number(seconds);\r\n const d = Math.floor(s / 86_400);\r\n const h = Math.floor((s % 86_400) / 3600);\r\n const m = Math.floor((s % 3600) / 60);\r\n const sec = s % 60;\r\n const p = (n: number): string => String(n).padStart(2, \"0\");\r\n if (d >= 365) return `${Math.floor(d / 365)}y ${d % 365}d`;\r\n if (d > 0) return `${d}d ${p(h)}h ${p(m)}m`;\r\n if (h > 0) return `${h}h ${p(m)}m ${p(sec)}s`;\r\n return `${m}m ${p(sec)}s`;\r\n}\r\n\r\n/** Unix seconds → \"2026-10-01 14:05 UTC\". */\r\nexport function formatUtc(unixSeconds: bigint): string {\r\n return `${new Date(Number(unixSeconds) * 1000).toISOString().replace(\"T\", \" \").slice(0, 16)} UTC`;\r\n}\r\n\r\n/** Exact decimal, trimmed, never \"0\" for a non-zero amount. */\r\nexport function formatLockAmount(value: bigint, meta: Pick<LocksTokenMeta, \"symbol\" | \"decimals\">, maxFrac = 6): string {\r\n if (meta.decimals === null) return `${value.toLocaleString(\"en-US\")} base units ${meta.symbol}`;\r\n if (value === 0n) return `0 ${meta.symbol}`;\r\n const base = 10n ** BigInt(meta.decimals);\r\n const whole = value / base;\r\n const frac = (value % base).toString().padStart(meta.decimals, \"0\").slice(0, maxFrac).replace(/0+$/, \"\");\r\n if (whole === 0n && frac === \"\") return `<0.${\"0\".repeat(Math.max(0, maxFrac - 1))}1 ${meta.symbol}`;\r\n return `${whole.toLocaleString(\"en-US\")}${frac === \"\" ? \"\" : `.${frac}`} ${meta.symbol}`;\r\n}\r\n\r\n/** The badge's words. `countdownTo` is the moment the countdown runs to (chain seconds). */\r\nexport interface LocksBadgeView {\r\n /** `locked`: something is locked now. `open`: locks exist, none still locked. `none`: no lock at all. */\r\n readonly tone: \"locked\" | \"open\" | \"none\";\r\n readonly headline: string;\r\n readonly detail: string | null;\r\n readonly countdownTo: bigint | null;\r\n /** What the countdown is to, e.g. \"first unlock\". */\r\n readonly countdownLabel: string | null;\r\n}\r\n\r\nconst plural = (n: number, one: string, many: string): string => `${n.toLocaleString(\"en-US\")} ${n === 1 ? one : many}`;\r\n\r\n/** A pool: the locked share of active liquidity (time-locked + permanent), and the soonest unlock. */\r\nexport function poolBadgeView(\r\n s: Pick<PoolLockSummary, \"locks\" | \"liveCount\" | \"lockedCount\" | \"lockedActiveBps\" | \"outOfRangeLocked\" | \"nextUnlockAt\" | \"lastUnlockAt\" | \"pool\"> &\r\n Partial<Pick<PoolLockSummary, \"permanent\" | \"permanentActiveBps\" | \"timeLockedActiveBps\" | \"permanentOutOfRange\">>,\r\n): LocksBadgeView {\r\n const permanent = s.permanent ?? [];\r\n const hasPermanent = permanent.length > 0;\r\n if (s.locks.length === 0 && !hasPermanent) {\r\n return { tone: \"none\", headline: \"No locked liquidity\", detail: \"No position in this pool is time-locked (LatchPositionLock) or held permanently by the protocol's LP locker.\", countdownTo: null, countdownLabel: null };\r\n }\r\n if (s.lockedCount === 0 && !hasPermanent) {\r\n const open = s.liveCount;\r\n return {\r\n tone: \"open\",\r\n headline: \"No time-locked positions now\",\r\n detail:\r\n open > 0\r\n ? `${plural(open, \"lock is\", \"locks are\")} past the unlock date and can be withdrawn by the lock owner.`\r\n : \"Every lock on this pool has been withdrawn.\",\r\n countdownTo: null,\r\n countdownLabel: null,\r\n };\r\n }\r\n const headline =\r\n s.lockedActiveBps === null\r\n ? hasPermanent && s.lockedCount === 0\r\n ? \"Locked permanently (LP locker) · share of active liquidity not measurable\"\r\n : `${plural(s.lockedCount + permanent.length, \"locked position\", \"locked positions\")} · share of active liquidity not measurable`\r\n : `${formatLockBps(s.lockedActiveBps)} of active liquidity locked`;\r\n const parts: string[] = [];\r\n if (s.lockedActiveBps === null) {\r\n parts.push(s.pool === null ? \"The pool's state could not be read.\" : \"The pool has no liquidity at the current price, so no share can be measured.\");\r\n } else {\r\n const split: string[] = [];\r\n if (hasPermanent) split.push(`${formatLockBps(s.permanentActiveBps ?? 0)} locked permanently (LP locker, no withdraw path)`);\r\n if (s.lockedCount > 0) split.push(`${formatLockBps(s.timeLockedActiveBps ?? 0)} time-locked until a date`);\r\n parts.push(`${split.join(\", \")}. The share is of liquidity at the current price and moves with it.`);\r\n const out = s.outOfRangeLocked + (s.permanentOutOfRange ?? 0);\r\n if (out > 0) parts.push(`${plural(out, \"locked position is\", \"locked positions are\")} out of range and not counted.`);\r\n }\r\n if (s.lastUnlockAt !== null && s.nextUnlockAt !== null && s.lastUnlockAt !== s.nextUnlockAt) parts.push(`Last time-lock unlock ${formatUtc(s.lastUnlockAt)}.`);\r\n return {\r\n tone: \"locked\",\r\n headline,\r\n detail: parts.join(\" \"),\r\n countdownTo: s.nextUnlockAt,\r\n countdownLabel: s.nextUnlockAt === null ? null : `first time-lock unlock ${formatUtc(s.nextUnlockAt)}`,\r\n };\r\n}\r\n\r\n/** A Bin pool: what the protocol's Bin LP locker holds forever. */\r\nexport function binPoolBadgeView(\r\n b: Pick<BinPoolPermanentSummary, \"locks\" | \"activeBinLockedBps\" | \"amount0\" | \"amount1\">,\r\n c0: Pick<LocksTokenMeta, \"symbol\" | \"decimals\">,\r\n c1: Pick<LocksTokenMeta, \"symbol\" | \"decimals\">,\r\n): LocksBadgeView {\r\n if (b.locks.length === 0) {\r\n return { tone: \"none\", headline: \"No locked liquidity\", detail: \"The protocol's Bin LP locker holds nothing in this pool. Time locks cover CL positions only.\", countdownTo: null, countdownLabel: null };\r\n }\r\n const amounts = `${formatLockAmount(b.amount0, c0)} + ${formatLockAmount(b.amount1, c1)}`;\r\n const bins = b.locks.reduce((n, l) => n + l.bins.length, 0);\r\n return {\r\n tone: \"locked\",\r\n headline: b.activeBinLockedBps === null ? \"Locked permanently (LP locker)\" : `${formatLockBps(b.activeBinLockedBps)} of the active bin locked permanently (LP locker)`,\r\n detail: `${amounts} held forever by the Bin LP locker across ${plural(bins, \"bin\", \"bins\")}.${b.activeBinLockedBps === null ? \" No lock holds the bin that trades at the current price.\" : \" The share is of the bin that trades at the current price; a pool-wide share across all bins is not computed.\"}`,\r\n countdownTo: null,\r\n countdownLabel: null,\r\n };\r\n}\r\n\r\n/** A token: the share of `totalSupply` held for locks and not yet vested. */\r\nexport function tokenBadgeView(\r\n s: Pick<CurrencyLockSummary, \"locks\" | \"totalHeld\" | \"unvested\" | \"heldBps\" | \"unvestedBps\" | \"nextCliffOrEnd\" | \"lastEnd\"> & { readonly totalSupply?: bigint | null },\r\n meta: Pick<LocksTokenMeta, \"symbol\" | \"decimals\">,\r\n lp: { readonly pools: readonly TokenPermanentPool[]; readonly total: bigint } | null = null,\r\n): LocksBadgeView {\r\n const lpLine =\r\n lp !== null && lp.pools.length > 0\r\n ? `${formatLockAmount(lp.total, meta)}${s.totalSupply ? ` (${formatLockBps(Number((lp.total * 10_000n) / s.totalSupply))} of supply)` : \"\"} locked permanently as pool liquidity (LP locker) in ${plural(lp.pools.length, \"pool\", \"pools\")}, at the current price.`\r\n : null;\r\n if (s.locks.length === 0 && lpLine !== null) {\r\n return { tone: \"locked\", headline: `${meta.symbol} liquidity locked permanently (LP locker)`, detail: `${lpLine} No time lock or vesting of ${meta.symbol} with the Latch token lock.`, countdownTo: null, countdownLabel: null };\r\n }\r\n if (s.locks.length === 0) {\r\n return { tone: \"none\", headline: `No ${meta.symbol} locked`, detail: \"No lock of this token has been made with the Latch token lock.\", countdownTo: null, countdownLabel: null };\r\n }\r\n if (s.totalHeld === 0n) {\r\n return {\r\n tone: lpLine !== null ? \"locked\" : \"open\",\r\n headline: lpLine !== null ? `${meta.symbol} liquidity locked permanently (LP locker)` : `No ${meta.symbol} locked now`,\r\n detail: `${plural(s.locks.length, \"time lock has\", \"time locks have\")} been fully released and claimed.${lpLine !== null ? ` ${lpLine}` : \"\"}`,\r\n countdownTo: null,\r\n countdownLabel: null,\r\n };\r\n }\r\n const headline =\r\n s.heldBps === null ? `${formatLockAmount(s.totalHeld, meta)} held in locks` : `${formatLockBps(s.heldBps)} of supply held in locks`;\r\n const parts: string[] = [];\r\n parts.push(\r\n s.unvestedBps === null\r\n ? `${formatLockAmount(s.unvested, meta)} not yet vested.`\r\n : `${formatLockBps(s.unvestedBps)} of supply (${formatLockAmount(s.unvested, meta)}) not yet vested; the rest is vested and waiting to be claimed.`,\r\n );\r\n if (s.lastEnd !== null) parts.push(`Fully vested ${formatUtc(s.lastEnd)}.`);\r\n if (lpLine !== null) parts.push(lpLine);\r\n return {\r\n tone: s.unvested > 0n ? \"locked\" : \"open\",\r\n headline,\r\n detail: parts.join(\" \"),\r\n countdownTo: s.nextCliffOrEnd,\r\n countdownLabel: s.nextCliffOrEnd === null ? null : `next release ${formatUtc(s.nextCliffOrEnd)}`,\r\n };\r\n}\r\n\r\nexport const POSITION_STATUS_LABEL: Record<PositionLockStatus, string> = {\r\n locked: \"Locked\",\r\n unlockable: \"Unlockable\",\r\n withdrawn: \"Withdrawn\",\r\n};\r\n\r\nexport const TOKEN_STATUS_LABEL: Record<TokenLockView[\"status\"], string> = {\r\n cliff: \"Before cliff\",\r\n vesting: \"Vesting\",\r\n vested: \"Fully vested\",\r\n claimed: \"Claimed\",\r\n};\r\n\r\n/** `vested / amount` in basis points (floor), for a vesting bar. */\r\nexport function vestedBps(l: Pick<TokenLockView, \"vested\" | \"amount\">): number {\r\n return l.amount === 0n ? 0 : Number((l.vested * 10_000n) / l.amount);\r\n}\r\n\r\n/** The chain's `now` at a later wall-clock moment: `chainNow` read at `readAtMs`, advanced by elapsed seconds. */\r\nexport function advanceChainNow(chainNow: bigint, readAtMs: number, nowMs: number): bigint {\r\n return chainNow + BigInt(Math.max(0, Math.floor((nowMs - readAtMs) / 1000)));\r\n}\r\n\r\n/* ------------------------------------------------------------ chart views --- */\r\n\r\n/** One part of a share bar. `bps` is floored; `nonZero` keeps a sub-0.01% part visible (\"<0.01%\"). */\r\nexport interface SharePart {\r\n readonly key: \"permanent\" | \"time\" | \"unvested\" | \"vested\" | \"lp\";\r\n readonly label: string;\r\n readonly bps: number;\r\n readonly nonZero: boolean;\r\n}\r\n\r\n/** A whole split into locked parts; the rest of the bar is \"not locked\". */\r\nexport interface ShareBarView {\r\n readonly parts: readonly SharePart[];\r\n /** What the share is OF: \"of active liquidity\", \"of the active bin\", \"of supply\". */\r\n readonly of: string;\r\n readonly restBps: number;\r\n}\r\n\r\nconst bpsOf = (part: bigint, whole: bigint): number => {\r\n const b = (part * 10_000n) / whole;\r\n return Number(b > 10_000n ? 10_000n : b);\r\n};\r\n\r\nfunction bar(parts: SharePart[], of: string): ShareBarView {\r\n return { parts: parts.filter((p) => p.bps > 0 || p.nonZero), of, restBps: Math.max(0, 10_000 - parts.reduce((n, p) => n + p.bps, 0)) };\r\n}\r\n\r\n/** A CL pool's active liquidity: permanent (LP locker) and time-locked. `null` when no share is measurable. */\r\nexport function poolShareBar(\r\n s: Pick<PoolLockSummary, \"pool\" | \"lockedActiveLiquidity\"> & Partial<Pick<PoolLockSummary, \"permanentActiveLiquidity\" | \"timeLockedActiveLiquidity\">>,\r\n): ShareBarView | null {\r\n const active = s.pool?.activeLiquidity ?? 0n;\r\n if (s.pool === null || active === 0n) return null;\r\n const perm = s.permanentActiveLiquidity ?? 0n;\r\n const time = s.timeLockedActiveLiquidity ?? s.lockedActiveLiquidity - perm;\r\n return bar(\r\n [\r\n { key: \"permanent\", label: \"Locked permanently (LP locker)\", bps: bpsOf(perm, active), nonZero: perm > 0n },\r\n { key: \"time\", label: \"Time-locked until a date\", bps: bpsOf(time, active), nonZero: time > 0n },\r\n ],\r\n \"of active liquidity\",\r\n );\r\n}\r\n\r\n/** A Bin pool's active bin: the permanent share. `null` when no lock holds it. */\r\nexport function binShareBar(b: Pick<BinPoolPermanentSummary, \"activeBinLockedBps\">): ShareBarView | null {\r\n if (b.activeBinLockedBps === null) return null;\r\n return bar([{ key: \"permanent\", label: \"Locked permanently (LP locker)\", bps: b.activeBinLockedBps, nonZero: b.activeBinLockedBps > 0 }], \"of the active bin\");\r\n}\r\n\r\n/** A token's supply: unvested, vested-unclaimed, and (optionally) its side of permanent LP. `null` without a supply. */\r\nexport function tokenShareBar(\r\n s: Pick<CurrencyLockSummary, \"totalHeld\" | \"unvested\"> & { readonly totalSupply?: bigint | null },\r\n lpTotal: bigint | null = null,\r\n): ShareBarView | null {\r\n const ts = s.totalSupply ?? null;\r\n if (ts === null || ts === 0n) return null;\r\n const vested = s.totalHeld > s.unvested ? s.totalHeld - s.unvested : 0n;\r\n const lp = lpTotal ?? 0n;\r\n return bar(\r\n [\r\n { key: \"unvested\", label: \"Not yet vested\", bps: bpsOf(s.unvested, ts), nonZero: s.unvested > 0n },\r\n { key: \"vested\", label: \"Vested, not yet claimed\", bps: bpsOf(vested, ts), nonZero: vested > 0n },\r\n { key: \"lp\", label: \"In permanent LP (LP locker)\", bps: bpsOf(lp, ts), nonZero: lp > 0n },\r\n ],\r\n \"of supply\",\r\n );\r\n}\r\n\r\n/** A point of a release schedule: `t` unix seconds, `vested` summed over the locks (the contract's `_vested`). */\r\nexport interface SchedulePoint {\r\n readonly t: bigint;\r\n readonly vested: bigint;\r\n}\r\n\r\n/**\r\n * The cumulative release schedule of one token's locks: every start, the\r\n * second before and of each cliff, every end, `now`, and `samples` evenly\r\n * spaced points between, each computed with the SDK's `vestedAt`. A SCHEDULE\r\n * of fixed on-chain terms, not a history of claims. `null` when it has no length.\r\n */\r\nexport function releaseSchedule(\r\n locks: readonly Pick<TokenLockView, \"start\" | \"cliff\" | \"end\" | \"amount\">[],\r\n now: bigint | null,\r\n samples = 24,\r\n): { readonly points: readonly SchedulePoint[]; readonly total: bigint } | null {\r\n if (locks.length === 0) return null;\r\n const lo = locks.reduce((m, l) => (l.start < m ? l.start : m), locks[0]!.start);\r\n const hi = locks.reduce((m, l) => (l.end > m ? l.end : m), locks[0]!.end);\r\n if (hi <= lo) return null;\r\n const xs = new Set<bigint>([lo, hi]);\r\n if (now !== null && now > lo && now < hi) xs.add(now);\r\n for (const l of locks) {\r\n xs.add(l.start);\r\n xs.add(l.end);\r\n if (l.cliff > l.start) {\r\n xs.add(l.cliff - 1n);\r\n xs.add(l.cliff);\r\n }\r\n }\r\n const step = (hi - lo) / BigInt(samples);\r\n if (step > 0n) for (let i = 1n; i < BigInt(samples); i++) xs.add(lo + step * i);\r\n const points = [...xs]\r\n .sort((a, b) => (a < b ? -1 : a > b ? 1 : 0))\r\n .map((t) => ({ t, vested: locks.reduce((sum, l) => sum + vestedAt(l, t), 0n) }));\r\n return { points, total: locks.reduce((sum, l) => sum + l.amount, 0n) };\r\n}\r\n\r\n/** A share bar from figures already in basis points (the trust read's pool facts). */\r\nexport function shareBarFromBps(parts: readonly { readonly key: SharePart[\"key\"]; readonly label: string; readonly bps: number | null }[], of: string): ShareBarView | null {\r\n if (parts.every((p) => p.bps === null)) return null;\r\n return bar(\r\n parts.map((p) => ({ key: p.key, label: p.label, bps: p.bps ?? 0, nonZero: false })),\r\n of,\r\n );\r\n}\r\n","// SPDX-License-Identifier: MIT\n/**\n * The \"Locked by Latch\" embed badge: its words, pure.\n *\n * The same reads as `LocksBadge`, cut to what a project site shows beside its\n * token or pool. The badge says only what was read:\n *\n * pool \"X% of active liquidity locked\" / \"Locked permanently (LP locker)\"\n * / \"No locked liquidity\" (delegates to `poolBadgeView`)\n * token \"Y% of supply locked\" - the share of supply no beneficiary can\n * take yet (`unvested / totalSupply`), not what merely sits in the\n * locker; plus the permanent LP-locker liquidity when there is some.\n *\n * It never says \"safe\" or \"rug-proof\": a lock is a lock until its date, and\n * that is all the badge claims.\n */\n\nimport type { PoolLocksData, TokenLocksData } from \"./fetch.js\";\nimport { binPoolBadgeView, formatLockAmount, formatLockBps, formatUtc, poolBadgeView, type LocksBadgeView } from \"./model.js\";\n\n/** A pool badge from a pool read (CL or Bin). */\nexport function poolEmbedView(d: PoolLocksData): LocksBadgeView {\n return d.bin !== null ? binPoolBadgeView(d.bin, d.currency0, d.currency1) : poolBadgeView(d.summary);\n}\n\n/** A token badge: the share of supply still locked, and any permanent LP-locker liquidity. */\nexport function tokenEmbedView(d: TokenLocksData): LocksBadgeView {\n const s = d.summary;\n const meta = d.token;\n const lp = d.permanent !== null && d.permanent.pools.length > 0 ? d.permanent : null;\n const supply = s?.totalSupply ?? null;\n const lpLine =\n lp === null\n ? null\n : `${formatLockAmount(lp.total, meta)}${supply !== null && supply > 0n ? ` (${formatLockBps(Number((lp.total * 10_000n) / supply))} of supply)` : \"\"} locked permanently as liquidity (LP locker)`;\n if (s !== null && s.unvested > 0n) {\n const headline = s.unvestedBps === null ? `${formatLockAmount(s.unvested, meta)} locked` : s.unvestedBps === 0 ? \"<0.01% of supply locked\" : `${formatLockBps(s.unvestedBps)} of supply locked`;\n const parts = [`Not yet vested in ${s.locks.length === 1 ? \"1 Latch token lock\" : `${s.locks.length.toLocaleString(\"en-US\")} Latch token locks`}.`];\n if (lpLine !== null) parts.push(`${lpLine}.`);\n return { tone: \"locked\", headline, detail: parts.join(\" \"), countdownTo: s.nextCliffOrEnd, countdownLabel: s.nextCliffOrEnd === null ? null : `next release ${formatUtc(s.nextCliffOrEnd)}` };\n }\n if (lpLine !== null) {\n return { tone: \"locked\", headline: \"Liquidity locked permanently (LP locker)\", detail: `${lpLine}.`, countdownTo: null, countdownLabel: null };\n }\n if (s !== null && s.locks.length > 0) {\n return { tone: \"open\", headline: `No ${meta.symbol} locked now`, detail: \"Every Latch token lock of it has fully vested.\", countdownTo: null, countdownLabel: null };\n }\n return { tone: \"none\", headline: `No ${meta.symbol} locked`, detail: \"No Latch token lock or LP-locker liquidity holds it.\", countdownTo: null, countdownLabel: null };\n}\n","// SPDX-License-Identifier: MIT\n/**\n * The CL LP locker's position ids for one pool (or every pool), from its\n * `PositionLocked` logs, scanned in windows so an RPC that caps `eth_getLogs`\n * ranges still returns every log rather than an error or a truncated list.\n *\n * A window that fails is split in half and retried, down to `minWindow`; a\n * window that still fails throws - a partial scan is never passed off as a\n * complete one.\n */\n\nimport type { Address, Hex, PublicClient } from \"viem\";\nimport { findClLpLockerTokenIds } from \"@latchprotocol/sdk/lock\";\n\nexport interface ScanOptions {\n readonly fromBlock: bigint;\n readonly toBlock?: bigint;\n /** First window size; default 500,000 blocks. */\n readonly window?: bigint;\n /** Smallest window before giving up; default 2,000 blocks. */\n readonly minWindow?: bigint;\n}\n\n/** Pure: `[from, to]` split into consecutive windows of at most `size` blocks. */\nexport function blockWindows(from: bigint, to: bigint, size: bigint): { from: bigint; to: bigint }[] {\n if (size <= 0n) throw new RangeError(\"window size must be positive\");\n const out: { from: bigint; to: bigint }[] = [];\n for (let a = from; a <= to; a += size) out.push({ from: a, to: a + size - 1n > to ? to : a + size - 1n });\n return out;\n}\n\nexport async function scanClLpLockerTokenIds(client: PublicClient, locker: Address, opts: ScanOptions, poolId?: Hex): Promise<bigint[]> {\n const to = opts.toBlock ?? (await client.getBlockNumber());\n const minWindow = opts.minWindow ?? 2_000n;\n const seen = new Set<string>();\n const out: bigint[] = [];\n const scan = async (from: bigint, until: bigint): Promise<void> => {\n try {\n const found = await findClLpLockerTokenIds(client, locker, { fromBlock: from, toBlock: until }, poolId);\n for (const f of found) {\n const k = f.tokenId.toString();\n if (!seen.has(k)) {\n seen.add(k);\n out.push(f.tokenId);\n }\n }\n } catch (error) {\n const span = until - from + 1n;\n if (span <= minWindow) throw error;\n const mid = from + span / 2n;\n await scan(from, mid - 1n);\n await scan(mid, until);\n }\n };\n for (const w of blockWindows(opts.fromBlock, to, opts.window ?? 500_000n)) await scan(w.from, w.to);\n return out;\n}\n","// SPDX-License-Identifier: MIT\n/**\n * The stylesheet, as a string.\n *\n * It lives in TypeScript rather than a `.css` file for one reason: the web\n * component renders into a shadow root, and a shadow root cannot see the host\n * page's stylesheets. The same source therefore has to be injectable in three\n * places - a `<style>` in the document head for React hosts, a\n * `CSSStyleSheet` adopted by each shadow root, and `dist/styles.css` for hosts\n * that prefer a `<link>`. One source, no drift.\n *\n * ## Theming\n *\n * Every colour, radius and font is a `--latch-*` custom property declared on\n * `.latch-widget`. Overriding one from the host page is enough to restyle the\n * widget; nothing is hardcoded inside a rule. Light is the base, dark is applied\n * by `[data-latch-theme=\"dark\"]` and by `prefers-color-scheme` when the theme is\n * left on `system`.\n *\n * The layout is single-column and fluid from 280px up, because these widgets\n * are expected to live in narrow sidebars.\n */\n\n/** The complete widget stylesheet. */\nexport const WIDGET_CSS = `\n.latch-widget {\n /* Palette */\n --latch-bg: #ffffff;\n --latch-bg-elevated: #f6f7f9;\n --latch-bg-sunken: #eceef2;\n --latch-border: #dfe3e8;\n --latch-border-strong: #c4cad3;\n --latch-text: #10131a;\n --latch-text-muted: #5c6472;\n --latch-text-inverted: #ffffff;\n --latch-accent: #3b5bdb;\n --latch-accent-hover: #2f49b2;\n --latch-accent-text: #ffffff;\n --latch-success: #157347;\n --latch-warning: #9a6700;\n --latch-warning-bg: #fff8e1;\n --latch-danger: #b42318;\n --latch-danger-bg: #fef3f2;\n --latch-focus: #3b5bdb;\n /* The compact swap's Buy side: the CVD-safe \"up\" colour, with a dark label (6:1). */\n --latch-buy: #1f9e89;\n --latch-buy-hover: #23b39b;\n --latch-buy-text: #04060c;\n\n /* Shape and type */\n --latch-radius: 14px;\n --latch-radius-sm: 9px;\n --latch-font: \"IBM Plex Sans\", system-ui, -apple-system, \"Segoe UI\", Roboto, sans-serif;\n --latch-font-mono: \"IBM Plex Mono\", ui-monospace, SFMono-Regular, \"SF Mono\", Menlo, monospace;\n --latch-font-size: 14px;\n --latch-font-size-sm: 12px;\n --latch-font-size-lg: 22px;\n --latch-gap: 12px;\n --latch-padding: 16px;\n --latch-control-height: 44px;\n --latch-shadow: 0 1px 2px rgba(16, 19, 26, 0.06), 0 8px 24px rgba(16, 19, 26, 0.06);\n\n box-sizing: border-box;\n display: flex;\n flex-direction: column;\n gap: var(--latch-gap);\n width: 100%;\n min-width: 0;\n max-width: 480px;\n padding: var(--latch-padding);\n background: var(--latch-bg);\n color: var(--latch-text);\n border: 1px solid var(--latch-border);\n border-radius: var(--latch-radius);\n box-shadow: var(--latch-shadow);\n font-family: var(--latch-font);\n font-size: var(--latch-font-size);\n line-height: 1.45;\n}\n\n.latch-widget *,\n.latch-widget *::before,\n.latch-widget *::after {\n box-sizing: inherit;\n}\n\n/* Text takes the WIDGET's ink, not the host page's. A host rule such as\n \\`h2 { color: var(--ink) }\\` otherwise beats inheritance: a dark-themed widget\n on a light page drew its title in the page's near-black on the widget's\n near-black (1.1:1, axe, the locker embed 2026-09-26). Specificity (0,1,0)\n beats any element selector; every widget class rule below comes later and\n still sets its own colour. A host's own content in a slot is left alone. */\n.latch-widget :where(h1, h2, h3, h4, h5, h6, p, label, legend, dt, dd, li, th, td, figcaption, caption):where(:not(.latch-slot *)) {\n color: inherit;\n}\n\n.latch-widget[data-latch-theme=\"dark\"] {\n --latch-bg: #14161b;\n --latch-bg-elevated: #1c1f26;\n --latch-bg-sunken: #23262f;\n --latch-border: #2b2f38;\n --latch-border-strong: #3d4350;\n --latch-text: #f2f4f8;\n --latch-text-muted: #98a1b1;\n --latch-text-inverted: #14161b;\n --latch-accent: #6b8afd;\n --latch-accent-hover: #849dff;\n --latch-accent-text: #0b0d12;\n --latch-success: #4ade80;\n --latch-warning: #fbbf5c;\n --latch-warning-bg: #33280f;\n --latch-danger: #ff8a80;\n --latch-danger-bg: #3a1a17;\n --latch-focus: #849dff;\n --latch-shadow: 0 1px 2px rgba(0, 0, 0, 0.4), 0 8px 24px rgba(0, 0, 0, 0.35);\n}\n\n@media (prefers-color-scheme: dark) {\n .latch-widget[data-latch-theme=\"system\"] {\n --latch-bg: #14161b;\n --latch-bg-elevated: #1c1f26;\n --latch-bg-sunken: #23262f;\n --latch-border: #2b2f38;\n --latch-border-strong: #3d4350;\n --latch-text: #f2f4f8;\n --latch-text-muted: #98a1b1;\n --latch-text-inverted: #14161b;\n --latch-accent: #6b8afd;\n --latch-accent-hover: #849dff;\n --latch-accent-text: #0b0d12;\n --latch-success: #4ade80;\n --latch-warning: #fbbf5c;\n --latch-warning-bg: #33280f;\n --latch-danger: #ff8a80;\n --latch-danger-bg: #3a1a17;\n --latch-focus: #849dff;\n --latch-shadow: 0 1px 2px rgba(0, 0, 0, 0.4), 0 8px 24px rgba(0, 0, 0, 0.35);\n }\n}\n\n.latch-header {\n display: flex;\n align-items: baseline;\n justify-content: space-between;\n gap: 8px;\n flex-wrap: wrap;\n}\n\n.latch-title {\n margin: 0;\n font-size: 16px;\n font-weight: 650;\n}\n\n.latch-subtitle {\n margin: 0;\n color: var(--latch-text-muted);\n font-size: var(--latch-font-size-sm);\n}\n\n.latch-mock-banner {\n display: flex;\n gap: 8px;\n align-items: flex-start;\n padding: 10px 12px;\n border: 1px solid var(--latch-warning);\n border-radius: var(--latch-radius-sm);\n background: var(--latch-warning-bg);\n color: var(--latch-warning);\n font-size: var(--latch-font-size-sm);\n font-weight: 600;\n}\n\n.latch-mock-banner span {\n font-weight: 500;\n}\n\n.latch-field {\n display: flex;\n flex-direction: column;\n gap: 6px;\n padding: 12px;\n background: var(--latch-bg-elevated);\n border: 1px solid var(--latch-border);\n border-radius: var(--latch-radius-sm);\n}\n\n.latch-field-row {\n display: flex;\n align-items: center;\n gap: 8px;\n flex-wrap: wrap;\n}\n\n.latch-label {\n display: block;\n color: var(--latch-text-muted);\n font-size: var(--latch-font-size-sm);\n font-weight: 600;\n letter-spacing: 0.01em;\n}\n\n.latch-amount-input {\n flex: 1 1 120px;\n min-width: 0;\n padding: 0;\n border: 0;\n background: transparent;\n color: var(--latch-text);\n font-family: var(--latch-font);\n font-size: var(--latch-font-size-lg);\n font-weight: 600;\n line-height: 1.2;\n}\n\n.latch-amount-input::placeholder {\n color: var(--latch-text-muted);\n font-weight: 500;\n}\n\n.latch-amount-input:focus-visible,\n.latch-select:focus-visible,\n.latch-button:focus-visible,\n.latch-icon-button:focus-visible,\n.latch-slider:focus-visible,\n.latch-chip:focus-visible {\n outline: 2px solid var(--latch-focus);\n outline-offset: 2px;\n border-radius: 4px;\n}\n\n.latch-select {\n flex: 0 1 auto;\n max-width: 100%;\n height: 34px;\n padding: 0 8px;\n background: var(--latch-bg);\n color: var(--latch-text);\n border: 1px solid var(--latch-border-strong);\n border-radius: 999px;\n font-family: inherit;\n font-size: var(--latch-font-size);\n font-weight: 600;\n cursor: pointer;\n}\n\n.latch-meta {\n display: flex;\n justify-content: space-between;\n gap: 8px;\n color: var(--latch-text-muted);\n font-size: var(--latch-font-size-sm);\n}\n\n.latch-meta-value {\n font-variant-numeric: tabular-nums;\n}\n\n.latch-switch-row {\n display: flex;\n justify-content: center;\n margin: -6px 0;\n}\n\n.latch-icon-button {\n display: inline-flex;\n align-items: center;\n justify-content: center;\n width: 32px;\n height: 32px;\n padding: 0;\n background: var(--latch-bg);\n color: var(--latch-text);\n border: 1px solid var(--latch-border-strong);\n border-radius: 999px;\n cursor: pointer;\n font-size: 15px;\n line-height: 1;\n}\n\n.latch-icon-button:hover {\n background: var(--latch-bg-sunken);\n}\n\n.latch-summary {\n display: flex;\n flex-direction: column;\n gap: 6px;\n padding: 12px;\n background: var(--latch-bg-sunken);\n border-radius: var(--latch-radius-sm);\n font-size: var(--latch-font-size-sm);\n}\n\n.latch-summary dl {\n display: flex;\n flex-direction: column;\n gap: 6px;\n margin: 0;\n}\n\n.latch-summary-row {\n display: flex;\n align-items: baseline;\n justify-content: space-between;\n gap: 10px;\n}\n\n.latch-summary-row dt {\n color: var(--latch-text-muted);\n min-width: 0;\n}\n\n.latch-summary-row dd {\n margin: 0;\n text-align: right;\n font-variant-numeric: tabular-nums;\n overflow-wrap: anywhere;\n}\n\n.latch-summary-row[data-latch-emphasis=\"fee\"] dd {\n color: var(--latch-accent);\n font-weight: 650;\n}\n\n.latch-summary-row[data-latch-severity=\"high\"] dd,\n.latch-summary-row[data-latch-severity=\"severe\"] dd {\n color: var(--latch-danger);\n font-weight: 650;\n}\n\n.latch-route {\n display: flex;\n flex-wrap: wrap;\n align-items: center;\n gap: 4px;\n font-size: var(--latch-font-size-sm);\n color: var(--latch-text-muted);\n}\n\n.latch-route-token {\n padding: 2px 8px;\n background: var(--latch-bg);\n border: 1px solid var(--latch-border);\n border-radius: 999px;\n color: var(--latch-text);\n font-weight: 600;\n}\n\n.latch-button {\n display: inline-flex;\n align-items: center;\n justify-content: center;\n gap: 8px;\n width: 100%;\n min-height: var(--latch-control-height);\n padding: 0 16px;\n background: var(--latch-accent);\n color: var(--latch-accent-text);\n border: 1px solid transparent;\n border-radius: var(--latch-radius-sm);\n font-family: inherit;\n font-size: 15px;\n font-weight: 650;\n cursor: pointer;\n}\n\n.latch-button:hover:not(:disabled) {\n background: var(--latch-accent-hover);\n}\n\n.latch-button:disabled {\n opacity: 0.55;\n cursor: not-allowed;\n}\n\n.latch-button[data-latch-variant=\"secondary\"] {\n background: var(--latch-bg-elevated);\n color: var(--latch-text);\n border-color: var(--latch-border-strong);\n}\n\n.latch-button[data-latch-variant=\"danger\"] {\n background: var(--latch-danger);\n color: var(--latch-text-inverted);\n}\n\n.latch-status {\n min-height: 18px;\n margin: 0;\n font-size: var(--latch-font-size-sm);\n color: var(--latch-text-muted);\n}\n\n.latch-status[data-latch-tone=\"error\"] {\n color: var(--latch-danger);\n}\n\n.latch-status[data-latch-tone=\"success\"] {\n color: var(--latch-success);\n}\n\n.latch-error {\n padding: 10px 12px;\n background: var(--latch-danger-bg);\n border: 1px solid var(--latch-danger);\n border-radius: var(--latch-radius-sm);\n color: var(--latch-danger);\n font-size: var(--latch-font-size-sm);\n overflow-wrap: anywhere;\n}\n\n.latch-tabs {\n display: flex;\n gap: 4px;\n padding: 3px;\n background: var(--latch-bg-sunken);\n border-radius: 999px;\n}\n\n.latch-chip {\n flex: 1 1 0;\n min-width: 0;\n padding: 7px 10px;\n background: transparent;\n color: var(--latch-text-muted);\n border: 0;\n border-radius: 999px;\n font-family: inherit;\n font-size: var(--latch-font-size-sm);\n font-weight: 650;\n cursor: pointer;\n white-space: nowrap;\n overflow: hidden;\n text-overflow: ellipsis;\n}\n\n.latch-chip[aria-selected=\"true\"],\n.latch-chip[aria-pressed=\"true\"] {\n background: var(--latch-bg);\n color: var(--latch-text);\n box-shadow: 0 1px 2px rgba(0, 0, 0, 0.08);\n}\n\n.latch-progress {\n height: 8px;\n background: var(--latch-bg-sunken);\n border-radius: 999px;\n overflow: hidden;\n}\n\n.latch-progress-fill {\n height: 100%;\n background: var(--latch-accent);\n border-radius: 999px;\n transition: width 200ms ease;\n}\n\n.latch-slider {\n width: 100%;\n accent-color: var(--latch-accent);\n}\n\n.latch-range-grid {\n display: grid;\n grid-template-columns: repeat(2, minmax(0, 1fr));\n gap: 8px;\n}\n\n.latch-range-grid input {\n width: 100%;\n min-width: 0;\n height: 36px;\n padding: 0 10px;\n background: var(--latch-bg);\n color: var(--latch-text);\n border: 1px solid var(--latch-border-strong);\n border-radius: var(--latch-radius-sm);\n font-family: var(--latch-font-mono);\n font-size: var(--latch-font-size);\n}\n\n.latch-curve {\n display: block;\n width: 100%;\n height: auto;\n border-radius: var(--latch-radius-sm);\n background: var(--latch-bg-sunken);\n}\n\n.latch-visually-hidden {\n position: absolute;\n width: 1px;\n height: 1px;\n margin: -1px;\n padding: 0;\n border: 0;\n clip: rect(0 0 0 0);\n clip-path: inset(50%);\n overflow: hidden;\n white-space: nowrap;\n}\n\n.latch-footer {\n display: flex;\n justify-content: space-between;\n gap: 8px;\n color: var(--latch-text-muted);\n font-size: 11px;\n}\n\n.latch-footer a {\n color: inherit;\n}\n\n.latch-launch-legs {\n display: grid;\n gap: 16px;\n}\n\n.latch-empty {\n margin: 0;\n color: var(--latch-text-muted);\n font-size: 13px;\n line-height: 1.5;\n}\n\n@media (max-width: 380px) {\n .latch-widget {\n --latch-padding: 12px;\n --latch-font-size-lg: 20px;\n }\n\n .latch-range-grid {\n grid-template-columns: minmax(0, 1fr);\n }\n}\n\n@media (prefers-reduced-motion: reduce) {\n .latch-progress-fill {\n transition: none;\n }\n}\n\n/* ============================================================================\n Swap surface (SwapWidget): panels, big inputs, token buttons, dialog,\n popover, CTA, details. Every colour is a --latch-* token above.\n ============================================================================ */\n\n.latch-swap { max-width: 480px; }\n.latch-swap__form { display: flex; flex-direction: column; gap: 4px; }\n\n.latch-panel {\n background: var(--latch-bg-elevated);\n border: 1px solid transparent;\n border-radius: var(--latch-radius);\n padding: 14px 16px 12px;\n transition: border-color 120ms ease, background 120ms ease;\n}\n.latch-panel:focus-within { border-color: var(--latch-border-strong); background: var(--latch-bg); }\n/* The amount field draws no outline of its own (it is the panel's big number), so the PANEL carries\n the keyboard focus ring; the border-strong change alone was invisible on a dark theme (WCAG 2.4.7). */\n.latch-panel:has(.latch-big-input:focus-visible) { border-color: var(--latch-focus); box-shadow: 0 0 0 1px var(--latch-focus); }\n.latch-panel__top { display: flex; justify-content: space-between; align-items: center; min-height: 18px; }\n.latch-panel__balance { font-size: var(--latch-font-size-sm); color: var(--latch-text-muted); display: inline-flex; gap: 8px; align-items: center; }\n/* Quick amounts under \"You pay\": real fractions of the balance just read, one row of equal chips. */\n.latch-portions { display: grid; grid-template-columns: repeat(auto-fit, minmax(52px, 1fr)); gap: 8px; margin-top: 12px; }\n.latch-portion {\n font: inherit; font-size: var(--latch-font-size-sm); font-weight: 600; min-height: 36px; padding: 0 8px; border-radius: var(--latch-radius-sm);\n border: 1px solid var(--latch-border); background: var(--latch-bg); color: var(--latch-text); cursor: pointer;\n transition: border-color 120ms, color 120ms;\n}\n.latch-portion:hover { border-color: var(--latch-accent); color: var(--latch-accent); }\n.latch-portion:focus-visible { outline: 2px solid var(--latch-focus); outline-offset: 2px; }\n\n/* The compact variant's Buy / Sell pill, in the header where the title was. */\n.latch-sides {\n flex: 1 1 auto; display: grid; grid-template-columns: 1fr 1fr; gap: 4px; padding: 4px; min-width: 0;\n border: 1px solid var(--latch-border); border-radius: 999px; background: var(--latch-bg-sunken);\n}\n.latch-sides__btn {\n min-height: 40px; border: 0; border-radius: 999px; background: transparent; color: var(--latch-text);\n font: inherit; font-weight: 600; cursor: pointer; transition: background 120ms, color 120ms;\n}\n.latch-sides__btn:hover { background: var(--latch-bg-elevated); }\n.latch-sides__btn:focus-visible { outline: 2px solid var(--latch-focus); outline-offset: 2px; }\n.latch-sides__btn[data-latch-side=\"buy\"][aria-pressed=\"true\"] { background: var(--latch-buy); color: var(--latch-buy-text); }\n.latch-sides__btn[data-latch-side=\"sell\"][aria-pressed=\"true\"] { background: var(--latch-accent); color: var(--latch-accent-text); }\n.latch-swap .latch-header:has(.latch-sides) { align-items: center; flex-wrap: nowrap; }\n\n/* The compact variant's lines, always visible above the button, one fee per line. */\n.latch-lines { margin: 8px 0 0; padding: 4px 4px 0; display: grid; gap: 8px; }\n.latch-lines .latch-details__row { font-size: 13px; }\n.latch-lines output { font: inherit; transition: opacity 150ms; }\n.latch-lines output.is-refreshing { opacity: 0.55; }\n.latch-swap__form[data-latch-variant=\"compact\"][data-latch-swap-side=\"buy\"] .latch-cta { background: var(--latch-buy); color: var(--latch-buy-text); }\n.latch-swap__form[data-latch-variant=\"compact\"][data-latch-swap-side=\"buy\"] .latch-cta:hover:not(:disabled) { background: var(--latch-buy-hover); }\n.latch-panel__main { display: flex; align-items: center; gap: 12px; margin-top: 6px; }\n.latch-big-input {\n flex: 1 1 auto; min-width: 0; width: 100%;\n font-family: var(--latch-font); font-size: 32px; font-weight: 500; letter-spacing: -0.01em;\n background: transparent; border: 0; color: var(--latch-text); padding: 4px 0; outline: none;\n}\n.latch-big-input::placeholder, .latch-big-input__placeholder { color: var(--latch-text-muted); opacity: 0.7; }\n.latch-big-input--out { display: block; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; transition: opacity 150ms; }\n.latch-big-input--out.is-refreshing { opacity: 0.55; }\n.latch-panel__error { margin: 6px 0 0; font-size: var(--latch-font-size-sm); color: var(--latch-danger); }\n.latch-panel__note { margin: 6px 0 0; font-size: var(--latch-font-size-sm); color: var(--latch-text-muted); }\n\n.latch-token-button {\n flex: 0 0 auto; display: inline-flex; align-items: center; gap: 8px;\n padding: 6px 10px 6px 6px; border-radius: 999px; font: inherit; font-weight: 650; cursor: pointer;\n background: var(--latch-bg); color: var(--latch-text); border: 1px solid var(--latch-border);\n box-shadow: 0 1px 2px rgba(0,0,0,0.06); transition: border-color 120ms, transform 80ms;\n}\n.latch-token-button:hover { border-color: var(--latch-border-strong); }\n.latch-token-button:active { transform: scale(0.98); }\n.latch-token-button__chevron { color: var(--latch-text-muted); font-size: 12px; }\n.latch-token-button--locked { cursor: default; box-shadow: none; background: var(--latch-bg-sunken); }\n.latch-token-button--locked:hover { border-color: var(--latch-border); }\n.latch-slot { display: block; }\n.latch-slot--header { margin-top: -4px; }\n.latch-token-logo { border-radius: 50%; object-fit: cover; flex-shrink: 0; background: var(--latch-bg-sunken); }\n.latch-token-logo--initials {\n display: inline-flex; align-items: center; justify-content: center; font-weight: 700;\n color: #fff; letter-spacing: 0.01em; text-shadow: 0 1px 1px rgba(0, 0, 0, 0.25);\n background: linear-gradient(140deg, hsl(var(--latch-mono-hue, 215) 62% 52%), hsl(calc(var(--latch-mono-hue, 215) + 28) 58% 34%));\n box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.12);\n}\n\n.latch-flip { display: flex; justify-content: center; height: 0; position: relative; z-index: 1; }\n.latch-flip__button {\n position: relative; top: -16px; width: 36px; height: 36px; border-radius: 12px; cursor: pointer;\n background: var(--latch-bg); border: 4px solid var(--latch-bg); color: var(--latch-text);\n box-shadow: 0 0 0 1px var(--latch-border); font-size: 16px; line-height: 1;\n display: inline-flex; align-items: center; justify-content: center; transition: transform 160ms ease, background 120ms;\n}\n.latch-flip__button:hover { background: var(--latch-bg-sunken); transform: rotate(180deg); }\n\n.latch-cta {\n margin-top: 8px; width: 100%; height: 52px; border: 0; border-radius: var(--latch-radius);\n background: var(--latch-accent); color: var(--latch-accent-text); font: inherit; font-size: 17px; font-weight: 700;\n cursor: pointer; display: inline-flex; align-items: center; justify-content: center; gap: 10px;\n transition: background 120ms, transform 80ms, opacity 120ms;\n}\n.latch-cta:hover:not(:disabled) { background: var(--latch-accent-hover); }\n.latch-cta:active:not(:disabled) { transform: scale(0.995); }\n.latch-cta:disabled { background: var(--latch-bg-sunken); color: var(--latch-text-muted); cursor: not-allowed; }\n.latch-cta[data-latch-busy=\"true\"] { opacity: 0.85; cursor: progress; }\n.latch-spinner {\n width: 16px; height: 16px; border-radius: 50%; border: 2px solid currentColor; border-right-color: transparent;\n animation: latch-spin 0.8s linear infinite;\n}\n@keyframes latch-spin { to { transform: rotate(360deg); } }\n\n.latch-ack {\n display: flex; gap: 10px; align-items: flex-start; margin-top: 6px; padding: 10px 12px;\n border-radius: var(--latch-radius-sm); background: var(--latch-warning-bg); color: var(--latch-text); font-size: var(--latch-font-size-sm);\n}\n.latch-ack input { margin-top: 2px; }\n\n.latch-details { margin-top: 8px; border: 1px solid var(--latch-border); border-radius: var(--latch-radius-sm); overflow: hidden; }\n.latch-details__toggle {\n width: 100%; display: flex; justify-content: space-between; align-items: center; gap: 8px;\n padding: 10px 12px; background: transparent; border: 0; font: inherit; color: var(--latch-text); cursor: pointer; text-align: left;\n}\n.latch-details__toggle:hover { background: var(--latch-bg-elevated); }\n.latch-details__rate { font-weight: 600; cursor: pointer; }\n.latch-details__hint { display: inline-flex; gap: 10px; align-items: center; color: var(--latch-text-muted); font-size: var(--latch-font-size-sm); }\n.latch-details__list { margin: 0; padding: 4px 12px 10px; display: grid; gap: 6px; border-top: 1px solid var(--latch-border); }\n.latch-details__row { display: flex; justify-content: space-between; gap: 12px; font-size: var(--latch-font-size-sm); }\n.latch-details__row dt { color: var(--latch-text-muted); }\n.latch-details__row dd { margin: 0; text-align: right; color: var(--latch-text); overflow-wrap: anywhere; }\n[data-latch-severity=\"high\"] { color: var(--latch-danger) !important; }\n[data-latch-severity=\"medium\"] { color: var(--latch-warning) !important; }\n\n.latch-settings-trigger { display: inline-flex; align-items: center; gap: 6px; width: auto; padding: 0 10px; border-radius: 999px; }\n.latch-settings-trigger__value { font-size: var(--latch-font-size-sm); font-weight: 600; }\n\n/* Overlays. Portalled into .latch-widget, so they inherit the tokens. */\n.latch-overlay { position: fixed; inset: 0; background: rgba(0, 0, 0, 0.45); backdrop-filter: blur(2px); animation: latch-fade 120ms ease; z-index: 50; }\n.latch-dialog {\n position: fixed; left: 50%; top: 50%; transform: translate(-50%, -50%); z-index: 51;\n width: min(420px, calc(100vw - 32px)); max-height: min(640px, calc(100vh - 32px));\n display: flex; flex-direction: column; gap: 10px;\n background: var(--latch-bg); color: var(--latch-text); border: 1px solid var(--latch-border);\n border-radius: var(--latch-radius); box-shadow: var(--latch-shadow); padding: 14px 14px 8px;\n font-family: var(--latch-font); font-size: var(--latch-font-size); animation: latch-pop 140ms ease;\n}\n@keyframes latch-fade { from { opacity: 0; } }\n@keyframes latch-pop { from { opacity: 0; transform: translate(-50%, -48%) scale(0.98); } }\n.latch-dialog__head { display: flex; justify-content: space-between; align-items: center; }\n.latch-dialog__title { margin: 0; font-size: 17px; font-weight: 700; display: inline-flex; align-items: center; gap: 8px; }\n.latch-dialog__count {\n font-size: 11px; font-weight: 600; padding: 2px 8px; border-radius: 999px; font-variant-numeric: tabular-nums;\n color: var(--latch-text-muted); background: var(--latch-bg-elevated); border: 1px solid var(--latch-border);\n}\n.latch-search-wrap { position: relative; display: flex; align-items: center; }\n.latch-search-wrap__icon { position: absolute; left: 14px; color: var(--latch-text-muted); pointer-events: none; }\n.latch-search-wrap__clear {\n position: absolute; right: 8px; width: 28px; height: 28px; border-radius: 999px; border: 0; cursor: pointer;\n background: var(--latch-bg-sunken); color: var(--latch-text-muted); font-size: 16px; line-height: 1;\n}\n.latch-search-wrap__clear:hover { color: var(--latch-text); }\n.latch-search {\n width: 100%; font: inherit; font-size: 16px; padding: 12px 40px; border-radius: 999px;\n border: 1px solid var(--latch-border); background: var(--latch-bg-elevated); color: var(--latch-text); outline: none;\n transition: border-color 120ms, box-shadow 120ms;\n}\n.latch-search:focus { border-color: var(--latch-accent); box-shadow: 0 0 0 3px color-mix(in srgb, var(--latch-accent) 22%, transparent); }\n.latch-common { display: flex; flex-wrap: wrap; gap: 8px; padding-bottom: 4px; }\n.latch-chip--token {\n flex: 0 0 auto; display: inline-flex; align-items: center; gap: 8px; min-height: 36px; padding: 0 14px 0 6px;\n border-radius: 999px; border: 1px solid var(--latch-border); background: var(--latch-bg-elevated); color: var(--latch-text);\n font-weight: 600; transition: border-color 120ms, background 120ms;\n}\n.latch-chip--token:hover { border-color: color-mix(in srgb, var(--latch-accent) 55%, var(--latch-border)); }\n.latch-chip--token[aria-pressed=\"true\"] { border-color: var(--latch-accent); background: color-mix(in srgb, var(--latch-accent) 14%, var(--latch-bg-elevated)); }\n.latch-token-list { list-style: none; margin: 0 -14px; padding: 6px 8px 8px; overflow-y: auto; border-top: 1px solid var(--latch-border); }\n.latch-token-row {\n width: 100%; display: flex; align-items: center; gap: 12px; padding: 10px; min-height: 56px; background: transparent; border: 0;\n border-radius: 12px; font: inherit; color: var(--latch-text); cursor: pointer; text-align: left; transition: background 100ms;\n}\n.latch-token-row:hover:not(:disabled), .latch-token-row:focus-visible { background: var(--latch-bg-elevated); outline: none; }\n.latch-token-row:focus-visible { box-shadow: inset 0 0 0 2px var(--latch-accent); }\n.latch-token-row[aria-selected=\"true\"] { background: color-mix(in srgb, var(--latch-accent) 10%, transparent); }\n.latch-token-row:disabled { opacity: 0.4; cursor: not-allowed; }\n.latch-token-row--note { color: var(--latch-text-muted); font-size: var(--latch-font-size-sm); cursor: default; min-height: 0; }\n.latch-token-row--empty { justify-content: center; text-align: center; padding: 28px 16px; }\n.latch-token-row__main { display: flex; flex-direction: column; gap: 2px; min-width: 0; flex: 1; }\n.latch-token-row__symbol { font-weight: 650; font-size: 15px; display: inline-flex; align-items: center; flex-wrap: wrap; }\n.latch-token-row__name { font-size: var(--latch-font-size-sm); color: var(--latch-text-muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }\n.latch-token-row__balance { display: flex; flex-direction: column; align-items: flex-end; font-variant-numeric: tabular-nums; color: var(--latch-text); font-weight: 600; }\n.latch-token-row__balance-sym { font-size: 11px; font-weight: 500; color: var(--latch-text-muted); }\n.latch-token-row__check { color: var(--latch-accent); font-weight: 700; font-size: 15px; margin-left: 4px; }\n@media (prefers-reduced-motion: reduce) {\n .latch-token-row, .latch-chip--token, .latch-search { transition: none; }\n}\n.latch-token-row--unlisted { background: color-mix(in srgb, var(--latch-warning) 8%, transparent); }\n.latch-token-row__badges { display: inline-flex; flex-wrap: wrap; gap: 4px; margin-left: 8px; vertical-align: middle; }\n.latch-badge {\n display: inline-block; padding: 1px 6px; border-radius: 999px; font-size: 11px; font-weight: 600; line-height: 16px; letter-spacing: 0.01em;\n border: 1px solid var(--latch-border); background: var(--latch-bg-elevated); color: var(--latch-text-muted); white-space: nowrap;\n}\n.latch-badge[data-latch-tone=\"info\"] { color: var(--latch-accent); border-color: color-mix(in srgb, var(--latch-accent) 35%, transparent); }\n.latch-badge[data-latch-tone=\"warn\"] { color: var(--latch-warning); border-color: color-mix(in srgb, var(--latch-warning) 45%, transparent); }\n.latch-token-group { list-style: none; }\n.latch-token-group__label {\n display: block; padding: 8px 14px 4px; font-size: 11px; font-weight: 700; text-transform: uppercase; letter-spacing: 0.06em;\n color: var(--latch-text-muted); border-top: 1px solid var(--latch-border);\n}\n.latch-token-group:first-child .latch-token-group__label { border-top: 0; }\n.latch-token-group__list { list-style: none; margin: 0; padding: 0; }\n\n.latch-popover {\n z-index: 51; width: min(320px, calc(100vw - 32px)); background: var(--latch-bg); color: var(--latch-text);\n border: 1px solid var(--latch-border); border-radius: var(--latch-radius); box-shadow: var(--latch-shadow); padding: 12px;\n display: flex; flex-direction: column; gap: 8px; font-family: var(--latch-font); font-size: var(--latch-font-size); animation: latch-fade 120ms ease;\n}\n.latch-popover__row { display: flex; justify-content: space-between; align-items: center; }\n.latch-popover__value { font-size: var(--latch-font-size-sm); color: var(--latch-text-muted); }\n.latch-custom-slippage { display: inline-flex; align-items: center; gap: 4px; flex: 0 0 auto; }\n.latch-custom-slippage input {\n width: 56px; font: inherit; font-size: var(--latch-font-size-sm); padding: 6px 8px; border-radius: 999px;\n border: 1px solid var(--latch-border); background: var(--latch-bg); color: var(--latch-text); text-align: right; outline: none;\n}\n.latch-custom-slippage input:focus { border-color: var(--latch-accent); }\n.latch-note { margin: 0; font-size: var(--latch-font-size-sm); color: var(--latch-text-muted); }\n.latch-note--warn { color: var(--latch-warning); }\n.latch-footer--brand { justify-content: center; color: var(--latch-text-muted); font-size: 11px; }\n.latch-footer a { color: var(--latch-accent); text-decoration: none; }\n\n/* ============================================================================\n Locks (LocksBadge, LocksPanel): the locked share and a countdown. Every\n colour is a --latch-* token above.\n ============================================================================ */\n.latch-locks { gap: 6px; }\n.latch-locks--badge { display: inline-flex; flex-direction: column; width: auto; max-width: 100%; padding: 10px 14px; box-shadow: none; border-radius: var(--latch-radius-sm); }\n.latch-locks--panel { max-width: none; }\n.latch-locks__headline { margin: 0; display: flex; align-items: baseline; gap: 8px; font-weight: 600; overflow-wrap: anywhere; }\n.latch-locks__headline--muted { color: var(--latch-text-muted); font-weight: 500; }\n.latch-locks__headline--error { color: var(--latch-danger); font-weight: 500; }\n.latch-locks__dot { flex: 0 0 auto; width: 9px; height: 9px; border-radius: 50%; background: var(--latch-text-muted); transform: translateY(-1px); }\n.latch-locks__dot--locked { background: var(--latch-success); }\n.latch-locks__dot--open { background: var(--latch-warning); }\n.latch-locks__dot--none { background: var(--latch-border-strong); }\n.latch-locks__countdown { margin: 0; font-size: var(--latch-font-size-sm); color: var(--latch-text-muted); overflow-wrap: anywhere; }\n.latch-locks__timer { font-family: var(--latch-font-mono); font-variant-numeric: tabular-nums; color: var(--latch-text); }\n.latch-locks__link { font-size: var(--latch-font-size-sm); color: var(--latch-accent); text-decoration: none; font-weight: 600; }\n.latch-locks__link:hover { text-decoration: underline; }\n.latch-locks__link:focus-visible { outline: 2px solid var(--latch-focus); outline-offset: 2px; border-radius: 4px; }\n.latch-locks__list { list-style: none; margin: 4px 0 0; padding: 0; display: grid; gap: 8px; }\n.latch-locks__item { display: grid; gap: 6px; padding: 10px 12px; border: 1px solid var(--latch-border); border-radius: var(--latch-radius-sm); background: var(--latch-bg-elevated); min-width: 0; }\n.latch-locks__item[data-status=\"withdrawn\"], .latch-locks__item[data-status=\"claimed\"] { opacity: 0.72; }\n.latch-locks__row { display: flex; justify-content: space-between; align-items: center; gap: 8px; }\n.latch-locks__status { flex: 0 0 auto; padding: 1px 8px; border: 1px solid currentColor; border-radius: 999px; font-size: 11px; font-weight: 650; white-space: nowrap; }\n.latch-locks__status--locked, .latch-locks__status--cliff, .latch-locks__status--vesting { color: var(--latch-success); }\n.latch-locks__status--unlockable, .latch-locks__status--vested { color: var(--latch-warning); }\n.latch-locks__status--withdrawn, .latch-locks__status--claimed { color: var(--latch-text-muted); }\n.latch-locks__status--permanent { color: var(--latch-accent, var(--latch-success)); }\n.latch-locks__facts { margin: 0; display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 6px 12px; font-size: var(--latch-font-size-sm); }\n.latch-locks__facts div { min-width: 0; }\n.latch-locks__facts dt { color: var(--latch-text-muted); }\n.latch-locks__facts dd { margin: 0; overflow-wrap: anywhere; font-variant-numeric: tabular-nums; }\n\n/* Lock charts (lockCharts.tsx): a locked-share bar that grows in, and a release\n schedule that draws on. Motion off under prefers-reduced-motion. */\n.latch-sharebar { display: grid; gap: 6px; min-width: 0; }\n.latch-locks--badge .latch-sharebar { min-width: 180px; }\n.latch-sharebar__track { height: 8px; border-radius: 999px; overflow: hidden; background: var(--latch-bg-sunken); }\n.latch-sharebar__grow { display: flex; height: 100%; transform-origin: left center; animation: latch-grow 0.9s cubic-bezier(0.22, 1, 0.36, 1) both; }\n.latch-sharebar__part { flex: 0 0 auto; height: 100%; }\n.latch-sharebar__part + .latch-sharebar__part { box-shadow: inset 2px 0 0 var(--latch-bg); }\n.latch-sharebar__part--permanent, .latch-sharebar__part--lp { background: var(--latch-success); }\n.latch-sharebar__part--time, .latch-sharebar__part--unvested { background: var(--latch-accent); }\n.latch-sharebar__part--vested { background: var(--latch-accent); opacity: 0.45; }\n.latch-sharebar__key { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 2px 12px; font-size: 11px; color: var(--latch-text-muted); font-variant-numeric: tabular-nums; }\n.latch-sharebar__key li { display: inline-flex; align-items: center; gap: 5px; }\n.latch-sharebar__sw { display: inline-block; width: 8px; height: 8px; border-radius: 2px; }\n.latch-spark { margin: 2px 0 0; display: grid; gap: 4px; }\n.latch-spark__svg { display: block; width: 100%; height: 44px; overflow: visible; cursor: crosshair; border-radius: 4px; }\n.latch-spark__svg:focus-visible { outline: 2px solid var(--latch-focus); outline-offset: 2px; }\n.latch-spark__base { stroke: var(--latch-border); stroke-width: 1; }\n.latch-spark__line { stroke: var(--latch-accent); stroke-width: 2; stroke-linejoin: round; stroke-linecap: round; stroke-dasharray: 2000; animation: latch-draw 1.3s cubic-bezier(0.22, 1, 0.36, 1) both; }\n.latch-spark__now { stroke: var(--latch-text-muted); stroke-width: 1; stroke-dasharray: 3 3; }\n.latch-spark__cross { stroke: var(--latch-accent); stroke-width: 1; opacity: 0.6; }\n.latch-spark__cap { font-size: 11px; color: var(--latch-text-muted); overflow-wrap: anywhere; }\n.latch-locks .latch-progress-fill, .latch-locker .latch-progress-fill { transform-origin: left center; animation: latch-grow 0.9s cubic-bezier(0.22, 1, 0.36, 1) both; }\n@keyframes latch-grow { from { transform: scaleX(0.02); } to { transform: scaleX(1); } }\n@keyframes latch-draw { from { stroke-dashoffset: 2000; } to { stroke-dashoffset: 0; } }\n@media (prefers-reduced-motion: reduce) {\n .latch-sharebar__grow, .latch-spark__line, .latch-locks .latch-progress-fill, .latch-locker .latch-progress-fill { animation: none; transform: none; stroke-dashoffset: 0; }\n}\n\n/* ============================================================================\n Token trust (TokenTrustPanel): labelled rows, each with its source.\n ============================================================================ */\n.latch-trust { max-width: none; gap: 8px; }\n.latch-trust__list { margin: 0; display: grid; gap: 0; }\n.latch-trust__row { display: grid; grid-template-columns: minmax(120px, 180px) 1fr; gap: 4px 14px; padding: 9px 0; border-top: 1px solid var(--latch-border); min-width: 0; }\n.latch-trust__row:first-child { border-top: 0; }\n@media (max-width: 520px) { .latch-trust__row { grid-template-columns: 1fr; } }\n.latch-trust__label { color: var(--latch-text-muted); font-size: var(--latch-font-size-sm); font-weight: 600; }\n.latch-trust__value { margin: 0; min-width: 0; display: grid; gap: 3px; }\n.latch-trust__headline { margin: 0; display: flex; align-items: baseline; gap: 8px; font-weight: 600; overflow-wrap: anywhere; }\n.latch-trust__detail { margin: 0; font-size: var(--latch-font-size-sm); color: var(--latch-text-muted); overflow-wrap: anywhere; }\n.latch-trust__source { margin: 0; display: flex; flex-wrap: wrap; gap: 2px 10px; font-family: var(--latch-font-mono); font-size: 11px; color: var(--latch-text-muted); overflow-wrap: anywhere; }\n.latch-trust__source a { color: inherit; text-decoration: underline; text-decoration-color: var(--latch-border-strong); }\n.latch-trust__source a:hover { color: var(--latch-accent); }\n.latch-trust__dot { flex: 0 0 auto; width: 9px; height: 9px; border-radius: 50%; background: var(--latch-border-strong); transform: translateY(-1px); }\n.latch-trust__dot--locked { background: var(--latch-success); }\n.latch-trust__dot--neutral { background: var(--latch-text-muted); }\n.latch-trust__dot--caution { background: var(--latch-warning); }\n.latch-trust__dot--flagged, .latch-trust__dot--error { background: var(--latch-danger); }\n.latch-trust__row[data-tone=\"flagged\"] .latch-trust__headline, .latch-trust__row[data-tone=\"error\"] .latch-trust__headline { color: var(--latch-danger); }\n.latch-trust__subhead { margin: 6px 0 0; font-size: 13px; font-weight: 700; text-transform: uppercase; letter-spacing: 0.05em; color: var(--latch-text-muted); }\n.latch-trust__pool { display: grid; gap: 4px; padding: 10px 12px; border: 1px solid var(--latch-border); border-radius: var(--latch-radius-sm); background: var(--latch-bg-elevated); min-width: 0; }\n.latch-trust__pool-head { display: flex; flex-wrap: wrap; align-items: baseline; gap: 6px 12px; }\n.latch-trust__pool-head code { font-family: var(--latch-font-mono); font-size: 11px; color: var(--latch-text-muted); }\n.latch-trust__found { margin: 0; font-size: 11px; color: var(--latch-text-muted); }\n.latch-trust__link { font-size: var(--latch-font-size-sm); color: var(--latch-accent); text-decoration: none; font-weight: 600; margin-left: auto; }\n.latch-trust__link:hover { text-decoration: underline; }\n.latch-trust__state { margin: 0; color: var(--latch-text-muted); }\n.latch-trust__state--error { color: var(--latch-danger); }\n.latch-trust__retry { font: inherit; background: none; border: 0; padding: 0; color: var(--latch-accent); cursor: pointer; text-decoration: underline; }\n\n/* ============================================================================\n Locker (LockerWidget): lock a position, lock or vest tokens, manage locks.\n ============================================================================ */\n.latch-locker { gap: 10px; }\n.latch-locker__tabs { display: flex; gap: 4px; padding: 3px; border-radius: 999px; background: var(--latch-bg-sunken); }\n.latch-locker__tab { flex: 1; font: inherit; font-size: var(--latch-font-size-sm); font-weight: 600; padding: 7px 10px; border: 0; border-radius: 999px; background: transparent; color: var(--latch-text-muted); cursor: pointer; }\n.latch-locker__tab[aria-selected=\"true\"] { background: var(--latch-bg); color: var(--latch-text); box-shadow: var(--latch-shadow); }\n.latch-locker__field { display: grid; gap: 4px; font-size: var(--latch-font-size-sm); }\n.latch-locker__field > span { color: var(--latch-text-muted); font-weight: 600; }\n.latch-locker__input { width: 100%; font: inherit; padding: 10px 12px; border-radius: var(--latch-radius-sm); border: 1px solid var(--latch-border); background: var(--latch-bg-elevated); color: var(--latch-text); outline: none; min-width: 0; }\n.latch-locker__input:focus { border-color: var(--latch-accent); }\n.latch-locker__row2 { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }\n@media (max-width: 420px) { .latch-locker__row2 { grid-template-columns: 1fr; } }\n.latch-locker__issues { margin: 0; padding-left: 18px; color: var(--latch-danger); font-size: var(--latch-font-size-sm); }\n.latch-locker__fee { margin: 0; padding: 8px 10px; border-radius: var(--latch-radius-sm); background: var(--latch-bg-elevated); font-size: var(--latch-font-size-sm); display: grid; gap: 2px; }\n.latch-locker__fee strong { font-variant-numeric: tabular-nums; }\n.latch-locker__steps { margin: 0; padding-left: 18px; display: grid; gap: 2px; font-size: var(--latch-font-size-sm); color: var(--latch-text-muted); }\n.latch-locker__steps li[data-state=\"done\"] { color: var(--latch-success); }\n.latch-locker__steps li[data-state=\"active\"] { color: var(--latch-text); font-weight: 600; }\n.latch-locker__status { margin: 0; font-size: var(--latch-font-size-sm); overflow-wrap: anywhere; }\n.latch-locker__status[data-kind=\"error\"] { color: var(--latch-danger); }\n.latch-locker__status[data-kind=\"success\"] { color: var(--latch-success); }\n.latch-locker__actions { display: flex; flex-wrap: wrap; gap: 6px; }\n.latch-locker__btn { font: inherit; font-size: var(--latch-font-size-sm); font-weight: 600; padding: 6px 12px; border-radius: 999px; border: 1px solid var(--latch-border-strong); background: var(--latch-bg); color: var(--latch-text); cursor: pointer; }\n.latch-locker__btn:hover:not(:disabled) { border-color: var(--latch-accent); color: var(--latch-accent); }\n.latch-locker__btn:disabled { opacity: 0.5; cursor: not-allowed; }\n.latch-locker__choice { display: flex; gap: 12px; flex-wrap: wrap; font-size: var(--latch-font-size-sm); }\n.latch-locker__choice label { display: inline-flex; gap: 6px; align-items: center; cursor: pointer; }\n\n/* ============================================================================\n The Latch mark (brand kit masters/latch-mark.svg, loaded as shipped, never\n redrawn). 24 px wide is the kit's minimum; the margin is its clear space\n (the height of the hook's eye at this size).\n ============================================================================ */\n.latch-brand { display: flex; align-items: center; gap: 6px; margin: 0; font-size: 11px; color: var(--latch-text-muted); }\n.latch-brand__mark { flex: 0 0 auto; width: 24px; height: auto; margin: 4px; display: block; }\n.latch-brand__spacer { flex: 1; }\n\n\n/* ============================================================================\n Touch (pointer: coarse): 44px targets, and inputs at 16px so iOS Safari does\n not zoom the host page when a field is focused.\n ============================================================================ */\n@media (pointer: coarse) {\n .latch-widget input:not([type=\"checkbox\"]):not([type=\"radio\"]):not([type=\"range\"]),\n .latch-widget select,\n .latch-widget textarea,\n .latch-locker input:not([type=\"checkbox\"]):not([type=\"radio\"]):not([type=\"range\"]),\n .latch-locker select { font-size: max(16px, 1em); }\n .latch-portion, .latch-chip, .latch-select, .latch-settings-trigger, .latch-icon-button,\n .latch-locker__tab, .latch-locker__input, .latch-locker__btn, .latch-button, .latch-token-button { min-height: 44px; }\n .latch-locker__choice label { min-height: 44px; }\n}\n`;\n\nconst STYLE_ELEMENT_ID = \"latch-widgets-styles\";\n\n/**\n * Injects the stylesheet into the document once.\n *\n * React hosts call this automatically the first time a styled widget mounts.\n * Hosts that bundle CSS themselves can import `@latchprotocol/widgets/styles.css`\n * instead and never call it.\n */\nexport function injectWidgetStyles(target: Document | ShadowRoot | null = globalThis.document ?? null): void {\n if (target === null) return;\n const root: Document | ShadowRoot = target;\n if (root.getElementById(STYLE_ELEMENT_ID) !== null) return;\n\n const doc = \"createElement\" in root ? root : root.ownerDocument;\n if (doc === null) return;\n const style = doc.createElement(\"style\");\n style.id = STYLE_ELEMENT_ID;\n style.textContent = WIDGET_CSS;\n const parent = \"head\" in root && root.head !== null ? root.head : root;\n parent.appendChild(style);\n}\n","// SPDX-License-Identifier: MIT\n/**\n * `<latch-lock-badge>`: the lock badge for any web page, with no framework.\n *\n * ```html\n * <script src=\"https://<latch site>/embed/latch-embed.js\" defer></script>\n * <latch-lock-badge chain=\"4663\" pool=\"0x…\"></latch-lock-badge>\n * <latch-lock-badge chain=\"4663\" token=\"0x…\" site=\"https://<latch site>\"></latch-lock-badge>\n * ```\n *\n * Attributes:\n * chain chain id (required); must be a chain in the SDK's address book\n * pool a pool id (bytes32), or\n * token a token address\n * pool-type `cl` (default) or `bin`\n * rpc an RPC URL to read through instead of the chain's public RPCs\n * site the Latch site origin; with it the badge links to its public\n * lock page (`/locks/pool/<id>?net=<chain>`); without it, no link\n * theme `light` | `dark` | `system` (default)\n * refresh seconds between re-reads (default 60, 0 = never)\n *\n * It reads the chain directly, through the MIT SDK, with the same readers as\n * `LocksBadge`, and renders plain DOM into a shadow root: no React, no wallet,\n * no writes. The words are only what was read (see `../locks/embedModel.ts`).\n */\n\nimport { createClient, http, isAddress, type Address, type Hex, type PublicClient } from \"viem\";\nimport { getBlock, getBlockNumber, getLogs, readContract } from \"viem/actions\";\nimport { getDeployment } from \"@latchprotocol/sdk/deployments\";\nimport { latchTransport } from \"@latchprotocol/sdk\";\n\nimport { fetchPoolLocks, fetchTokenLocks, type PoolLocksData, type TokenLocksData } from \"../locks/fetch.js\";\nimport { poolEmbedView, tokenEmbedView } from \"../locks/embedModel.js\";\nimport { advanceChainNow, formatCountdown, lockPageUrl, type LocksBadgeView } from \"../locks/model.js\";\nimport { scanClLpLockerTokenIds } from \"../locks/scan.js\";\nimport { WIDGET_CSS } from \"../styles/css.js\";\n\nexport const LOCK_BADGE_TAG = \"latch-lock-badge\";\n\n/* Latch chrome in the brand kit's colours and type: on dark grounds Latch Blue\n and Success (\"locked\"); on light grounds Deep Blue and the widget's darker\n green, which keep 4.5:1 for text. IBM Plex Sans / Mono first, then the host's\n own stack when Plex is not loaded. A host overrides with --latch-brand-*. */\nconst HOST_CSS = `\n:host { display: inline-block; max-width: 100%; vertical-align: middle; }\n.latch-embed-badge[data-latch-theme] {\n --latch-accent: var(--latch-brand-accent, #0A63E0);\n --latch-font: var(--latch-brand-font, \"IBM Plex Sans\", system-ui, -apple-system, \"Segoe UI\", sans-serif);\n --latch-font-mono: var(--latch-brand-font-mono, \"IBM Plex Mono\", ui-monospace, monospace);\n}\n.latch-embed-badge[data-latch-theme=\"dark\"] { --latch-accent: var(--latch-brand-accent, #2B8BFF); --latch-success: var(--latch-brand-success, #5FD39A); }\n@media (prefers-color-scheme: dark) {\n .latch-embed-badge[data-latch-theme=\"system\"] { --latch-accent: var(--latch-brand-accent, #2B8BFF); --latch-success: var(--latch-brand-success, #5FD39A); }\n}\n:host([hidden]) { display: none; }\n.latch-embed-badge { gap: 4px; }\n.latch-embed-badge__retry { font: inherit; font-size: 11px; background: none; border: 0; padding: 0; color: var(--latch-accent); cursor: pointer; text-decoration: underline; }\n`;\n\nconst ElementBase: typeof HTMLElement = typeof HTMLElement === \"undefined\" ? (class {} as unknown as typeof HTMLElement) : HTMLElement;\n\n/** CL LP-locker ids per chain, scanned once per page load and shared by every badge. */\nconst lpIdCache = new Map<string, Promise<bigint[]>>();\n\ntype Parsed =\n | { readonly ok: false; readonly message: string }\n | {\n readonly ok: true;\n readonly chainId: number;\n readonly target: { readonly kind: \"pool\"; readonly poolId: Hex; readonly poolType: \"cl\" | \"bin\" } | { readonly kind: \"token\"; readonly token: Address };\n };\n\n/** Pure: the element's attributes, validated. */\nexport function parseLockBadgeAttributes(get: (name: string) => string | null): Parsed {\n const chain = Number(get(\"chain\") ?? \"\");\n if (!Number.isInteger(chain) || chain <= 0) return { ok: false, message: \"Set the chain attribute to a chain id, e.g. chain=\\\"4663\\\".\" };\n const pool = get(\"pool\");\n const token = get(\"token\");\n if (pool !== null && pool !== \"\") {\n if (!/^0x[0-9a-fA-F]{64}$/.test(pool)) return { ok: false, message: \"The pool attribute is not a 32-byte pool id.\" };\n const t = (get(\"pool-type\") ?? \"cl\").toLowerCase();\n return { ok: true, chainId: chain, target: { kind: \"pool\", poolId: pool as Hex, poolType: t === \"bin\" ? \"bin\" : \"cl\" } };\n }\n if (token !== null && token !== \"\") {\n if (!isAddress(token, { strict: false })) return { ok: false, message: \"The token attribute is not an address.\" };\n return { ok: true, chainId: chain, target: { kind: \"token\", token: token as Address } };\n }\n return { ok: false, message: \"Set a pool or a token attribute.\" };\n}\n\ntype State =\n | { readonly k: \"message\"; readonly tone: \"none\" | \"error\"; readonly text: string; readonly retry: boolean }\n | { readonly k: \"loading\" }\n | { readonly k: \"ready\"; readonly view: LocksBadgeView; readonly chainNow: bigint; readonly readAtMs: number; readonly href: string | null };\n\nexport class LatchLockBadgeElement extends ElementBase {\n static get observedAttributes(): readonly string[] {\n return [\"chain\", \"pool\", \"token\", \"pool-type\", \"rpc\", \"site\", \"theme\", \"refresh\"];\n }\n\n #shadow: ShadowRoot | null = null;\n #root: HTMLDivElement | null = null;\n #state: State = { k: \"loading\" };\n #read = 0;\n #refreshTimer: ReturnType<typeof setInterval> | null = null;\n #tickTimer: ReturnType<typeof setInterval> | null = null;\n #client: { key: string; client: PublicClient } | null = null;\n\n connectedCallback(): void {\n if (this.#shadow === null) {\n this.#shadow = this.attachShadow({ mode: \"open\" });\n const style = document.createElement(\"style\");\n style.textContent = `${WIDGET_CSS}\\n${HOST_CSS}`;\n this.#shadow.appendChild(style);\n this.#root = document.createElement(\"div\");\n this.#shadow.appendChild(this.#root);\n }\n this.#start();\n }\n\n disconnectedCallback(): void {\n this.#stopTimers();\n this.#read += 1;\n }\n\n attributeChangedCallback(): void {\n if (this.#shadow !== null && this.isConnected) this.#start();\n }\n\n #stopTimers(): void {\n if (this.#refreshTimer !== null) clearInterval(this.#refreshTimer);\n if (this.#tickTimer !== null) clearInterval(this.#tickTimer);\n this.#refreshTimer = null;\n this.#tickTimer = null;\n }\n\n #start(): void {\n this.#stopTimers();\n this.#state = { k: \"loading\" };\n this.#render();\n void this.#load();\n const refresh = Number(this.getAttribute(\"refresh\") ?? \"60\");\n if (Number.isFinite(refresh) && refresh > 0) this.#refreshTimer = setInterval(() => void this.#load(), Math.max(15, refresh) * 1000);\n this.#tickTimer = setInterval(() => {\n if (this.#state.k === \"ready\" && this.#state.view.countdownTo !== null) this.#render();\n }, 1000);\n }\n\n #clientFor(chainId: number): PublicClient {\n const rpc = this.getAttribute(\"rpc\");\n const key = `${chainId}|${rpc ?? \"\"}`;\n if (this.#client?.key === key) return this.#client.client;\n const transport = rpc !== null && rpc.trim() !== \"\" ? http(rpc.trim()) : latchTransport(chainId);\n /* Only the four actions the lock readers call: a full public client would\n carry signature verification and every other action into the bundle. */\n const base = createClient({ transport });\n const client = {\n ...base,\n readContract: (args: unknown) => readContract(base, args as never),\n getBlock: (args?: unknown) => getBlock(base, args as never),\n getBlockNumber: (args?: unknown) => getBlockNumber(base, args as never),\n getLogs: (args?: unknown) => getLogs(base, args as never),\n } as unknown as PublicClient;\n this.#client = { key, client };\n return client;\n }\n\n async #load(): Promise<void> {\n const id = ++this.#read;\n const parsed = parseLockBadgeAttributes((n) => this.getAttribute(n));\n if (!parsed.ok) return this.#set(id, { k: \"message\", tone: \"error\", text: parsed.message, retry: false });\n const d = getDeployment(parsed.chainId);\n if (d === undefined) return this.#set(id, { k: \"message\", tone: \"none\", text: `Latch does not support chain ${parsed.chainId}.`, retry: false });\n const native = { symbol: d.nativeCurrency.symbol, decimals: d.nativeCurrency.decimals };\n const clLocker = d.launchpadV2.clLPLocker;\n const binLocker = d.launchpadV2.binLPLocker;\n const t = parsed.target;\n const hasLocker = t.kind === \"pool\" ? (t.poolType === \"bin\" ? binLocker !== null : d.positionLock !== null || clLocker !== null) : d.tokenLock !== null || clLocker !== null || binLocker !== null;\n if (!hasLocker) return this.#set(id, { k: \"message\", tone: \"none\", text: `Latch locks are coming soon on ${d.name}.`, retry: false });\n try {\n const client = this.#clientFor(parsed.chainId);\n let ids: bigint[] = [];\n if (clLocker !== null && !(t.kind === \"pool\" && t.poolType === \"bin\")) {\n const k = `${parsed.chainId}|${clLocker.toLowerCase()}|${this.getAttribute(\"rpc\") ?? \"\"}`;\n let p = lpIdCache.get(k);\n if (p === undefined) {\n p = scanClLpLockerTokenIds(client, clLocker, { fromBlock: d.deployedAtBlock });\n lpIdCache.set(k, p);\n p.catch(() => lpIdCache.delete(k));\n }\n ids = await p;\n }\n const lp = {\n ...(clLocker !== null ? { lpLocker: clLocker, lpLockerTokenIds: ids } : {}),\n ...(binLocker !== null ? { binLpLocker: binLocker } : {}),\n };\n let data: PoolLocksData | TokenLocksData;\n let view: LocksBadgeView;\n if (t.kind === \"pool\") {\n const pd = await fetchPoolLocks(client, d.positionLock, t.poolId, { native, lp: { ...lp, poolType: t.poolType } });\n data = pd;\n view = poolEmbedView(pd);\n } else {\n const td = await fetchTokenLocks(client, d.tokenLock, t.token, { native, lp });\n data = td;\n view = tokenEmbedView(td);\n }\n const site = this.getAttribute(\"site\");\n const href =\n site === null || site.trim() === \"\"\n ? null\n : lockPageUrl(site.trim(), t.kind === \"pool\" ? { kind: \"pool\", poolId: t.poolId } : { kind: \"token\", token: t.token }, { pathBase: \"/locks\", query: `net=${d.key}` });\n this.#set(id, { k: \"ready\", view, chainNow: data.chainNow, readAtMs: data.readAtMs, href });\n } catch {\n /* A failed refresh keeps the last good read on screen. */\n if (this.#state.k === \"ready\") return;\n this.#set(id, { k: \"message\", tone: \"error\", text: \"Locks could not be read: the chain did not answer.\", retry: true });\n }\n }\n\n #set(id: number, state: State): void {\n if (id !== this.#read) return;\n this.#state = state;\n this.#render();\n }\n\n #render(): void {\n const root = this.#root;\n if (root === null) return;\n const theme = this.getAttribute(\"theme\");\n const s = this.#state;\n const box = document.createElement(\"div\");\n box.className = \"latch-widget latch-locks latch-locks--badge latch-embed-badge\";\n box.dataset[\"latchTheme\"] = theme === \"light\" || theme === \"dark\" ? theme : \"system\";\n const line = (cls: string, text: string, tone?: string): HTMLParagraphElement => {\n const p = document.createElement(\"p\");\n p.className = cls;\n if (tone !== undefined) {\n const dot = document.createElement(\"span\");\n dot.className = `latch-locks__dot latch-locks__dot--${tone}`;\n dot.setAttribute(\"aria-hidden\", \"true\");\n p.appendChild(dot);\n }\n const span = document.createElement(\"span\");\n span.textContent = text;\n p.appendChild(span);\n return p;\n };\n if (s.k === \"loading\") {\n box.appendChild(line(\"latch-locks__headline latch-locks__headline--muted\", \"Reading locks…\"));\n box.setAttribute(\"role\", \"status\");\n } else if (s.k === \"message\") {\n const p = line(`latch-locks__headline${s.tone === \"error\" ? \" latch-locks__headline--error\" : \"\"}`, s.text, s.tone === \"none\" ? \"none\" : undefined);\n box.appendChild(p);\n if (s.retry) {\n const b = document.createElement(\"button\");\n b.type = \"button\";\n b.className = \"latch-embed-badge__retry\";\n b.textContent = \"Retry\";\n b.addEventListener(\"click\", () => this.#start());\n box.appendChild(b);\n }\n } else {\n const headline = line(\"latch-locks__headline\", s.view.headline, s.view.tone);\n headline.title = s.view.detail ?? \"\";\n box.dataset[\"tone\"] = s.view.tone;\n box.appendChild(headline);\n if (s.view.countdownTo !== null) {\n const now = advanceChainNow(s.chainNow, s.readAtMs, Date.now());\n const p = document.createElement(\"p\");\n p.className = \"latch-locks__countdown\";\n const timer = document.createElement(\"span\");\n timer.className = \"latch-locks__timer\";\n timer.textContent = formatCountdown(s.view.countdownTo - now);\n p.append(timer, ` to ${s.view.countdownLabel ?? \"the next unlock\"}`);\n box.appendChild(p);\n }\n }\n const brand = document.createElement(\"p\");\n brand.className = \"latch-brand\";\n const site = this.getAttribute(\"site\");\n if (site !== null && site.trim() !== \"\") {\n /* The brand kit's mark, as shipped, from the Latch site: never redrawn, 24 px (the kit's\n minimum WIDTH here; the kit states 24px tall as the floor and this clears it).\n\n THE VECTOR, AND THE RIGHT ONE FOR THE GROUND. This pointed at `latch-mark-blue.png`,\n which no longer exists — the kit that replaced it drops the flat single-blue mark, so\n every third-party page embedding this badge was 404ing the image. The retired mark was\n one flat blue that read on either ground; the current one is TWO-TONE, so it needs the\n `-onlight` master on a light ground or the dark half disappears.\n\n The element already resolves its own theme (see `data-latch-theme` above), including\n `system` via matchMedia, so this reads the same value rather than guessing.\n\n INTRINSIC SIZE IS THE REAL viewBox (665 x 765), not the display size. The old code set\n 24 x 30, which is 0.800 against the master's 0.869 — a ~9% horizontal squash the moment\n the stylesheet had not loaded, against the kit's own \"do not stretch\" rule. The CSS\n (`.latch-brand__mark { width: 24px; height: auto }`) decides how big it draws; these\n attributes only reserve the correct shape. */\n const mark = document.createElement(\"img\");\n mark.className = \"latch-brand__mark\";\n /* `system` is the DEFAULT and the common case for an embed — it runs inside somebody else's\n page — so it must be resolved, not lumped in with dark. Treating it as dark would show\n the dark-ground mark on every light-themed host site. */\n const declared = box.dataset[\"latchTheme\"];\n const light =\n declared === \"light\" ||\n (declared === \"system\" &&\n typeof window.matchMedia === \"function\" &&\n window.matchMedia(\"(prefers-color-scheme: light)\").matches);\n const ground = light ? \"-onlight\" : \"\";\n mark.src = `${site.trim().replace(/\\/+$/, \"\")}/brand/masters/latch-mark${ground}.svg`;\n mark.width = 665;\n mark.height = 765;\n mark.alt = \"Latch\";\n brand.appendChild(mark);\n }\n const src = document.createElement(\"span\");\n src.textContent = \"Read from chain\";\n brand.appendChild(src);\n const spacer = document.createElement(\"span\");\n spacer.className = \"latch-brand__spacer\";\n brand.appendChild(spacer);\n if (s.k === \"ready\" && s.href !== null) {\n const a = document.createElement(\"a\");\n a.className = \"latch-locks__link\";\n a.href = s.href;\n a.target = \"_blank\";\n a.rel = \"noopener\";\n a.textContent = \"Lock details →\";\n brand.appendChild(a);\n }\n box.appendChild(brand);\n root.replaceChildren(box);\n }\n}\n\n/** Registers `<latch-lock-badge>`. Safe to call twice. */\nexport function defineLatchLockBadge(): void {\n if (typeof customElements === \"undefined\") return;\n if (customElements.get(LOCK_BADGE_TAG) === undefined) customElements.define(LOCK_BADGE_TAG, LatchLockBadgeElement);\n}\n","// SPDX-License-Identifier: MIT\n/**\n * `latch-embed.js`: the standalone, framework-free embed bundle.\n *\n * One `<script>` tag registers `<latch-lock-badge>` (see `./embed/lockBadge.ts`)\n * on any page - no React, no bundler, no wallet. Everything it needs (viem, the\n * MIT SDK's lock readers and the address book) is inside the bundle, so it\n * reads the chain directly through the chain's public RPCs, or the `rpc`\n * attribute's.\n *\n * ```html\n * <script src=\"https://<latch site>/embed/latch-embed.js\" defer></script>\n * <latch-lock-badge chain=\"4663\" pool=\"0x…\" site=\"https://<latch site>\"></latch-lock-badge>\n * ```\n *\n * Built by `vite.embed.config.ts` as `dist/latch-embed.js` (IIFE, global\n * `LatchEmbed`) and `dist/latch-embed.mjs` (ESM).\n */\n\nimport { defineLatchLockBadge } from \"./embed/lockBadge.js\";\n\ndefineLatchLockBadge();\n\nexport { LOCK_BADGE_TAG, LatchLockBadgeElement, defineLatchLockBadge, parseLockBadgeAttributes } from \"./embed/lockBadge.js\";\n"],"names":["version","BaseError","shortMessage","args","details","docsPath","message","execTyped","regex","string","bytesRegex","integerRegex","isTupleRegex","tupleRegex","formatAbiParameter","abiParameter","type","length","i","component","result","formatAbiParameters","abiParameters","params","formatAbiItem","abiItem","errorSignatureRegex","isErrorSignature","signature","execErrorSignature","eventSignatureRegex","isEventSignature","execEventSignature","functionSignatureRegex","isFunctionSignature","execFunctionSignature","structSignatureRegex","isStructSignature","execStructSignature","constructorSignatureRegex","isConstructorSignature","execConstructorSignature","fallbackSignatureRegex","isFallbackSignature","execFallbackSignature","receiveSignatureRegex","isReceiveSignature","eventModifiers","functionModifiers","InvalidAbiItemError","UnknownTypeError","UnknownSolidityTypeError","InvalidParameterError","param","SolidityProtectedKeywordError","name","InvalidModifierError","modifier","InvalidFunctionModifierError","InvalidAbiTypeParameterError","InvalidSignatureError","UnknownSignatureError","InvalidStructSignatureError","CircularReferenceError","InvalidParenthesisError","current","depth","getParameterCacheKey","structs","structKey","struct","propertyKey","property","parameterCache","parseSignature","parseFunctionSignature","parseEventSignature","parseErrorSignature","parseConstructorSignature","parseFallbackSignature","match","inputParams","splitParameters","inputs","inputLength","parseAbiParameter","outputs","outputParams","outputLength","abiParameterWithoutTupleRegex","abiParameterWithTupleRegex","dynamicIntegerRegex","options","parameterCacheKey","isTuple","isSolidityKeyword","indexed","components","components_","isSolidityType","isValidDataLocation","char","tail","protectedKeywordsRegex","isArray","parseStructs","signatures","shallowStructs","signaturesLength","properties","propertiesLength","k","trimmed","resolvedStructs","entries","entriesLength","parameters","resolveStructs","typeWithoutTupleRegex","ancestors","array","parseAbi","abi","parseAbiItem","signature_","getAction","client","actionFn","action_implicit","action_explicit","includeName","InvalidDefinitionTypeError","formatAbiParams","formatAbiParam","isHex","value","strict","size","errorConfig","docsBaseUrl","docsSlug","docsUrl","fn","walk","err","AbiConstructorNotFoundError","AbiConstructorParamsNotFoundError","AbiDecodingDataSizeTooSmallError","data","AbiDecodingZeroDataError","cause","AbiEncodingArrayLengthMismatchError","expectedLength","givenLength","AbiEncodingBytesSizeMismatchError","expectedSize","AbiEncodingLengthMismatchError","AbiErrorInputsNotFoundError","errorName","AbiErrorNotFoundError","AbiErrorSignatureNotFoundError","AbiEventSignatureEmptyTopicsError","AbiEventSignatureNotFoundError","AbiEventNotFoundError","eventName","AbiFunctionNotFoundError","functionName","AbiFunctionOutputsNotFoundError","AbiFunctionSignatureNotFoundError","AbiItemAmbiguityError","x","y","DecodeLogDataMismatch","DecodeLogTopicsMismatch","InvalidAbiEncodingTypeError","InvalidAbiDecodingTypeError","InvalidArrayError","FilterTypeNotSupportedError","SliceOffsetOutOfBoundsError","offset","position","targetSize","InvalidBytesLengthError","pad","hexOrBytes","dir","padHex","padBytes","hex_","hex","SizeExceedsPaddingSizeError","bytes","paddedBytes","padEnd","max","min","signed","InvalidBytesBooleanError","SizeOverflowError","givenSize","maxSize","trim","sliceLength","assertSize","size_","hexToBigInt","opts","hexToNumber","number","IntegerOutOfRangeError","hexes","_v","toHex","numberToHex","stringToHex","boolToHex","bytesToHex","value_","maxValue","minValue","suffix","encoder","toBytes","numberToBytes","boolToBytes","hexToBytes","stringToBytes","charCodeMap","charCodeToBase16","hexString","index","j","nibbleLeft","nibbleRight","U32_MASK64","_32n","fromBig","n","le","split","lst","len","Ah","Al","h","l","rotlSH","s","rotlSL","rotlBH","rotlBL","isBytes","a","anumber","abytes","b","lengths","aexists","instance","checkFinished","aoutput","out","u32","arr","clean","arrays","isLE","byteSwap","word","byteSwap32","swap32IfBE","u","utf8ToBytes","str","Hash","createHasher","hashCons","hashC","msg","tmp","_0n","_1n","_2n","_7n","_256n","_0x71n","SHA3_PI","SHA3_ROTL","_SHA3_IOTA","round","R","t","IOTAS","SHA3_IOTA_H","SHA3_IOTA_L","rotlH","rotlL","keccakP","rounds","B","idx1","idx0","B0","B1","Th","Tl","curH","curL","shift","PI","Keccak","blockLen","outputLen","enableXOF","state","pos","take","bufferOut","to","gen","keccak_256","keccak256","to_","hash","hashSignature","sig","normalizeSignature","active","level","valid","toSignature","def","def_","toSignatureHash","toEventSelector","InvalidAddressError","address","LruMap","key","firstKey","checksumAddressCache","checksumAddress","address_","chainId","hexAddress","addressRegex","isAddressCache","isAddress","cacheKey","concat","values","concatHex","concatBytes","acc","slice","start","end","sliceHex","sliceBytes","assertStartOffset","assertEndOffset","encodeAbiParameters","preparedParams","prepareParams","encodeParams","prepareParam","arrayComponents","getArrayComponents","encodeArray","encodeTuple","encodeAddress","encodeBool","encodeNumber","encodeBytes","encodeString","staticSize","dynamic","encoded","staticParams","dynamicParams","dynamicSize","dynamicChild","isDynamicType","preparedParam","paramSize","bytesSize","hexValue","partsLength","parts","param_","matches","toFunctionSelector","getAbiItem","isSelector","abiItems","matchedAbiItem","arg","isArgOfType","ambiguousTypes","getAmbiguousTypes","argType","abiParameterType","sourceParameters","targetParameters","parameterIndex","sourceParameter","targetParameter","types","encodeEventTopics","item","topics","indexedInputs","args_","_","encodeArg","definition","parseAccount","account","prepareEncodeFunctionData","encodeFunctionData","panicReasons","solidityError","solidityPanic","NegativeOffsetError","PositionOutOfBoundsError","RecursiveReadLimitExceededError","count","limit","staticCursor","position_","byte","oldPosition","createCursor","recursiveReadLimit","cursor","bytesToBigInt","bytesToBool","bytes_","bytesToNumber","bytesToString","decodeAbiParameters","consumed","consumed_","decodeParameter","staticPosition","decodeArray","decodeTuple","decodeAddress","decodeBool","decodeBytes","decodeNumber","decodeString","sizeOfLength","sizeOfOffset","startOfData","hasDynamicChild","hasUnnamedChild","decodeErrorResult","stringify","replacer","space","formatAbiItemWithArgs","includeFunctionName","input","exponents","format","decimals","InvalidDecimalsError","display","negative","integer","fraction","formatEther","wei","unit","formatGwei","Value.formatEther","Value.formatGwei","AccountStateConflictError","StateAssignmentConflictError","prettyStateMapping","stateMapping","pretty","slot","prettyStateOverride","stateOverride","val","prettyPrint","maxLength","getContractAddress","getAbortError","signal","error","isAbortError","getUrl","url","parsed","CallExecutionError","account_","chain","gas","gasPrice","maxFeePerGas","maxPriorityFeePerGas","nonce","prettyArgs","ContractFunctionExecutionError","contractAddress","sender","formattedArgs","functionWithParams","ContractFunctionRevertedError","decodedData","metaMessages","reason","errorArgs","firstArg","errorWithParams","ContractFunctionZeroDataError","CounterfactualDeploymentFailedError","factory","RawContractError","HttpRequestError","body","headers","status","ResponseBodyTooLargeError","RpcRequestError","TimeoutError","unknownErrorCode","RpcError","code","ProviderRpcError","ParseRpcError","InvalidRequestRpcError","MethodNotFoundRpcError","method","InvalidParamsRpcError","InternalRpcError","InvalidInputRpcError","ResourceNotFoundRpcError","ResourceUnavailableRpcError","TransactionRejectedRpcError","MethodNotSupportedRpcError","LimitExceededRpcError","JsonRpcVersionUnsupportedError","UserRejectedRequestError","UnauthorizedProviderError","UnsupportedProviderMethodError","ProviderDisconnectedError","ChainDisconnectedError","SwitchChainError","UnsupportedNonOptionalCapabilityError","UnsupportedChainIdError","DuplicateIdError","UnknownBundleIdError","BundleTooLargeError","AtomicReadyWalletRejectedUpgradeError","AtomicityNotSupportedError","WalletConnectSessionSettlementError","UnknownRpcError","EXECUTION_REVERTED_ERROR_CODE","getContractError","ExecutionRevertedError","FeeCapTooHighError","FeeCapTooLowError","NonceTooHighError","NonceTooLowError","NonceMaxValueError","InsufficientFundsError","IntrinsicGasTooHighError","IntrinsicGasTooLowError","TransactionTypeNotSupportedError","TipAboveFeeCapError","UnknownNodeError","getNodeError","executionRevertedError","e","extract","extract_","formatted","keys","rpcTransactionType","formatTransactionRequest","request","rpcRequest","formatAuthorizationList","authorizationList","authorization","serializeStateMapping","serializeAccountStateOverride","balance","stateDiff","rpcAccountStateOverride","serializeStateOverride","rpcStateOverride","accountState","maxUint256","assertRequest","BlockNotFoundError","blockHash","blockNumber","identifier","transactionType","formatTransaction","transaction","transaction_","formatBlock","block","transactions","getBlock","blockTag","includeTransactions_","includeTransactions","blockNumberHex","formatBlockParameter","requireCanonical","isAddressEqual","formatLog","log","decodeEventLog","strict_","argTopics","isUnnamed","missingIndexedInputs","argIndex","topic","decodeTopic","nonIndexedInputs","inputsToDecode","dataIndex","parseEventLogs","logs","abiTopics","formattedLog","abiTopic","event","includesArgs","matchArgs","isEqual","getLogs","fromBlock","toBlock","events_","events","formattedLogs","decodeFunctionResult","getVersion","docs","showVersion","Hex.SizeExceedsPaddingSizeError","fromNumber","padLeft","internal.pad","Errors.BaseError","toRpc","withdrawal","Hex.fromNumber","blockOverrides","Withdrawal.toRpc","multicall3Abi","batchGatewayAbi","erc20Abi","aggregate3Signature","deploylessCallViaBytecodeBytecode","deploylessCallViaFactoryBytecode","multicall3Bytecode","ChainDoesNotSupportContract","contract","ClientChainNotConfiguredError","encodeDeployData","bytecode","description","getChainContractAddress","getCallError","withResolvers","resolve","reject","resolve_","reject_","schedulerCache","createBatchScheduler","id","shouldSplitBatch","wait","sort","exec","scheduler","getScheduler","flush","getBatchedArgs","setScheduler","promise","call","batch","accessList","blobs","data_","factoryData","maxFeePerBlobGas","requestOptions","rest","deploylessCallViaBytecode","deploylessCallViaFactory","deploylessCall","toDeploylessCallViaBytecodeData","toDeploylessCallViaFactoryData","rpcBlockOverrides","BlockOverrides.toRpc","chainFormat","shouldPerformMulticall","deployless","multicallAddress","getMulticallAddress","hasStateOverrideForAddress","scheduleMulticall","base","response","getRevertErrorData","offchainLookup","offchainLookupSignature","ccip","request_","requestOptionsId","requestOptionsIds","getRequestOptionsId","nextId","batchSize","multicallAddress_","blockId","stateOverrideKey","schedule","requests","calls","calldata","multicallRequest","returnData","success","stateOverrideAddress","readContract","time","cleanup","onAbort","timeout","promiseCache","responseCache","getCache","buildCache","cache","withCache","cacheTime","getBlockNumber","withRetry","delay_","retryCount","shouldRetry","attemptRetry","retry","delay","buffer","uid","createClient","ccipRead","dataSuffix","tokens","experimental_blockTag","blockTime","defaultPollingInterval","pollingInterval","config","transport","extend","extendFn","extended","combined","isPlainObject","prototype","decodeFunctionData","encodeErrorResult","encodeFunctionResult","localBatchGatewayUrl","localBatchGatewayRequest","ccipRequest","queries","failures","responses","query","encodeError","withDedupe","enabled","buildRequest","overrideOptions","dedupe","methods","retryDelay","requestId","hashString","err_","retryAfter","seed","h1","h2","ch","OffchainLookupError","callbackSelector","extraData","urls","OffchainLookupResponseMalformedError","OffchainLookupSenderMismatchError","offchainLookupAbiItem","callData","ccipRequest_","withTimeout","errorInstance","timeoutId","controller","createIdStore","idCache","defaultMaxResponseBodySize","getHttpRpcClient","url_","headers_url","parseUrl","fetchFn","maxResponseBodySize","onRequest","onResponse","fetchOptions","signal_","init","responseBody","readResponseBody","contentLength","reader","decoder","done","credentials","zeroAddress","createTransport","uid_","fallback","transports_","rank","shouldThrow_","shouldThrow","transports","includes","fetch","include","exclude","rankOptions","rankTransports","interval","onTransports","ping","sampleCount","weights","stabilityWeight","latencyWeight","samples","rankTransports_","sample","transport_","maxLatency","latency","scores","latencies","latencyScore","successes","stabilityScore","UrlRequiredError","signalId","signalIds","getSignalId","http","onFetchRequest","onFetchResponse","raw","retryCount_","timeout_","rpcClient","CANONICAL_1_4_1","SAFE_CONTRACTS","DEPLOYMENTS_TABLE","LATCH_DEPLOYMENTS","LATCH_CHAIN_IDS","isLatchChainId","getDeployment","LATCH_LP_LOCKER_ABI","LATCH_BIN_LP_LOCKER_ABI","LATCH_POSITION_LOCK_ABI","LATCH_TOKEN_LOCK_ABI","isNative","currency","MIN_TICK","MAX_TICK","Q32","Q128","MAX_UINT256","BIT_FACTORS","assertTick","tick","sqrtRatioAtTick","abs","ratio","Q96","amount0Delta","sa","sb","liquidity","amount1Delta","positionAmounts","tickLower","tickUpper","sqrtPriceX96","CL_POSITION_MANAGER_ABI","CL_POSITION_LOCKED","BIN_POOL_ABI","findClLpLockerTokenIds","locker","range","poolId","tokenId","pid","o","readClLpLockerPositions","tokenIds","pools","posm","locked","rec","p","pool","r","readBinLpLockerLocks","poolManager","total","first","ids","recs","want","picked","bins","binIds","shares","states","amount0","amount1","rx","ry","ts","summarizeBinPermanent","locks","activeShares","activeBinLockedBps","readBinPoolPermanent","activeId","permanentTokenPools","token","cl","bin","by","unpriced","add","kind","c0","c1","a0","a1","is0","amt","readClLpLockerPositionsPriced","bare","readCLPoolState","readClPoolPermanent","src","permanent","CL_POOL_STATE_ABI","positionLockStatus","nowSeconds","decodePositionLock","lock","readPositionLockContext","positionManager","readPositionLock","readAllPages","page","pageSize","readPositionLockIds","slot0","activeLiquidity","readChainNow","describeLocks","ctx","records","now","summarizePoolLocks","liveCount","lockedCount","lockedActiveLiquidity","lockedAmount0","lockedAmount1","outOfRangeLocked","nextUnlockAt","lastUnlockAt","permanentActiveLiquidity","permanentAmount0","permanentAmount1","permanentOutOfRange","bps","v","readRecords","readPools","poolIds","unique","readPoolLocks","vestedAt","decodeTokenLock","lockId","viewTokenLock","vested","claimable","readTokenLock","pages","readViews","TOTAL_SUPPLY_ABI","summarizeCurrencyLocks","unvested","nextCliffOrEnd","lastEnd","next","readCurrencyLocks","totalHeld","totalSupply","CHAIN_RPCS","BY_ID","c","chainById","resolveEndpoints","env","priv","suppliedEndpoints","isLocalRpcUrl","pub","host","m","health","EndpointCoolingDownError","retryAt","__publicField","coolsOnStatus","isEndpointFailure","coolOnTimeout","endpointCooldown","noteEndpointFailure","cooledHttp","inner","cooling","UnknownChainError","latchTransport","perEndpointRetries","httpConfig","cooldown","publicFallback","shortAddress","DEFAULT_NATIVE","metaOf","native","symbol","clLockerTokenIds","lp","fetchPoolLocks","positionLock","readAtMs","f","currency0","currency1","summary","chainNow","perm","fetchTokenLocks","tokenLock","hasLp","meta","lockPageUrl","siteUrl","target","path","q","formatLockBps","whole","frac","formatCountdown","seconds","d","sec","formatUtc","unixSeconds","formatLockAmount","maxFrac","plural","one","many","poolBadgeView","hasPermanent","open","headline","binPoolBadgeView","amounts","advanceChainNow","nowMs","poolEmbedView","tokenEmbedView","supply","lpLine","blockWindows","from","scanClLpLockerTokenIds","minWindow","seen","scan","until","found","span","mid","w","WIDGET_CSS","LOCK_BADGE_TAG","HOST_CSS","ElementBase","lpIdCache","parseLockBadgeAttributes","get","LatchLockBadgeElement","__privateAdd","_LatchLockBadgeElement_instances","_shadow","_root","_state","_read","_refreshTimer","_tickTimer","_client","__privateGet","__privateSet","style","__privateMethod","start_fn","stopTimers_fn","render_fn","load_fn","refresh","clientFor_fn","rpc","__privateWrapper","set_fn","clLocker","binLocker","view","pd","td","site","href","root","theme","box","line","cls","text","tone","dot","timer","brand","mark","declared","ground","spacer","defineLatchLockBadge"],"mappings":"isBAAO,MAAMA,EAAU,cCChB,MAAMC,WAAkB,KAAM,CACjC,YAAYC,EAAcC,EAAO,GAAI,CACjC,MAAMC,EAAUD,EAAK,iBAAiBF,GAChCE,EAAK,MAAM,QACXA,EAAK,OAAO,QACRA,EAAK,MAAM,QACXA,EAAK,QACTE,EAAWF,EAAK,iBAAiBF,IACjCE,EAAK,MAAM,UAAYA,EAAK,SAE5BG,EAAU,CACZJ,GAAgB,qBAChB,GACA,GAAIC,EAAK,aAAe,CAAC,GAAGA,EAAK,aAAc,EAAE,EAAI,GACrD,GAAIE,EAAW,CAAC,4BAA4BA,CAAQ,EAAE,EAAI,GAC1D,GAAID,EAAU,CAAC,YAAYA,CAAO,EAAE,EAAI,GACxC,oBAAoBJ,CAAO,EACvC,EAAU,KAAK;AAAA,CAAI,EACX,MAAMM,CAAO,EACb,OAAO,eAAe,KAAM,UAAW,CACnC,WAAY,GACZ,aAAc,GACd,SAAU,GACV,MAAO,MACnB,CAAS,EACD,OAAO,eAAe,KAAM,WAAY,CACpC,WAAY,GACZ,aAAc,GACd,SAAU,GACV,MAAO,MACnB,CAAS,EACD,OAAO,eAAe,KAAM,eAAgB,CACxC,WAAY,GACZ,aAAc,GACd,SAAU,GACV,MAAO,MACnB,CAAS,EACD,OAAO,eAAe,KAAM,eAAgB,CACxC,WAAY,GACZ,aAAc,GACd,SAAU,GACV,MAAO,MACnB,CAAS,EACD,OAAO,eAAe,KAAM,OAAQ,CAChC,WAAY,GACZ,aAAc,GACd,SAAU,GACV,MAAO,cACnB,CAAS,EACGH,EAAK,QACL,KAAK,MAAQA,EAAK,OACtB,KAAK,QAAUC,EACf,KAAK,SAAWC,EAChB,KAAK,aAAeF,EAAK,aACzB,KAAK,aAAeD,CACxB,CACJ,ECvDO,SAASK,EAAUC,EAAOC,EAAQ,CAErC,OAD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,UACd,KAAM,YACN,KAAM,SACtB,CACA,EACQ,gBAAiB,OACjB,KAAM,UACd,CACA,EACaC,GAAkB,CAC3B,CACI,KAAM,QACN,KAAM,WACN,gBAAiB,OACjB,OAAQ,CACJ,CACI,KAAM,UACN,KAAM,UACN,WAAY,CACR,CACI,KAAM,UACN,KAAM,QAC9B,EACoB,CACI,KAAM,WACN,KAAM,MAC9B,EACoB,CACI,KAAM,QACN,KAAM,MAC9B,CACA,CACA,CACA,EACQ,QAAS,CACL,CACI,KAAM,SACN,KAAM,UACtB,EACY,CACI,KAAM,UACN,KAAM,WACtB,CACA,CACA,EACI,CACI,KAAM,YACN,KAAM,QACN,OAAQ,CACJ,CACI,KAAM,SACN,KAAM,QACtB,EACY,CACI,KAAM,SACN,KAAM,SACtB,CACA,CACA,CACA,EA2OaC,GAAW,CACpB,CACI,KAAM,QACN,KAAM,WACN,OAAQ,CACJ,CACI,QAAS,GACT,KAAM,QACN,KAAM,SACtB,EACY,CACI,QAAS,GACT,KAAM,UACN,KAAM,SACtB,EACY,CACI,QAAS,GACT,KAAM,QACN,KAAM,SACtB,CACA,CACA,EACI,CACI,KAAM,QACN,KAAM,WACN,OAAQ,CACJ,CACI,QAAS,GACT,KAAM,OACN,KAAM,SACtB,EACY,CACI,QAAS,GACT,KAAM,KACN,KAAM,SACtB,EACY,CACI,QAAS,GACT,KAAM,QACN,KAAM,SACtB,CACA,CACA,EACI,CACI,KAAM,WACN,KAAM,YACN,gBAAiB,OACjB,OAAQ,CACJ,CACI,KAAM,QACN,KAAM,SACtB,EACY,CACI,KAAM,UACN,KAAM,SACtB,CACA,EACQ,QAAS,CACL,CACI,KAAM,SACtB,CACA,CACA,EACI,CACI,KAAM,WACN,KAAM,UACN,gBAAiB,aACjB,OAAQ,CACJ,CACI,KAAM,UACN,KAAM,SACtB,EACY,CACI,KAAM,SACN,KAAM,SACtB,CACA,EACQ,QAAS,CACL,CACI,KAAM,MACtB,CACA,CACA,EACI,CACI,KAAM,WACN,KA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ChBw5B,EAAM,YAAYx5B,CAAC,CACrB,CACAi5B,EAAI,YAAYO,CAAK,EACrBT,EAAK,gBAAgBE,CAAG,CAC1B,EAIK,SAASY,IAA6B,CACvC,OAAO,eAAmB,KAC1B,eAAe,IAAIlD,EAAc,IAAM,QAAW,eAAe,OAAOA,GAAgBM,EAAqB,CACnH,CChUA,OAAA4C,GAAA","x_google_ignoreList":[0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25,26,27,28,29,30,31,32,33,34,35,36,37,38,39,40,41,42,43,44,45,46,47,48,49,50,51,52,53,54,55,56,57,58,59,60,61,62,63,64,65,66,67,68,69,70,71,72,73,74,75,76,77,78,79,80,81,82,83,84,85,86,87,88,89,90,91,92,93,94,95,96,97,98,99,100,101,102,103,104,105,106,107,108,109,110,111,112,113,114,115,116,117,118,119,120,121,122,123,124,125,126,127,128,129,130]}
|