timelock-sdk 0.0.50 → 0.0.52

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.
@@ -21,7 +21,7 @@ var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__ge
21
21
  }) : target, mod));
22
22
 
23
23
  //#endregion
24
- const require_optionsMarket = require('./optionsMarket-PBduSBXF.cjs');
24
+ const require_optionsMarket = require('./optionsMarket-DEFMUI2G.cjs');
25
25
  let viem = require("viem");
26
26
  viem = __toESM(viem);
27
27
  let viem_chains = require("viem/chains");
@@ -56,7 +56,7 @@ const getTimelockLens = (client) => (0, viem.getContract)({
56
56
  address: timelockLenses[client.chain.id],
57
57
  client
58
58
  });
59
- const timelockLenses = { [viem_chains.monadTestnet.id]: "0xe9021c9130bE6651357E23b89EB1b69cbadB5Db7" };
59
+ const timelockLenses = { [viem_chains.monadTestnet.id]: "0xb2A8DDe5885FAEC1487e0894Ad84F35f2F15EB7B" };
60
60
  const uniswapMathLenses = { [viem_chains.monadTestnet.id]: "0x4C8375D1F6D5F452e92e211C1D3E7a44F78dFc95" };
61
61
 
62
62
  //#endregion
@@ -420,4 +420,4 @@ Object.defineProperty(exports, 'zero', {
420
420
  return zero;
421
421
  }
422
422
  });
423
- //# sourceMappingURL=numberUtils-BKQtAolx.cjs.map
423
+ //# sourceMappingURL=numberUtils-CkwkoxOr.cjs.map
@@ -1 +1 @@
1
- {"version":3,"file":"numberUtils-BKQtAolx.cjs","names":["erc20Abi","optionsMarketAbi","uniswapMathLensAbi","lensAbi","timelockLenses: Record<number, Address>","monadTestnet","uniswapMathLenses: Record<number, Address>","TickMath","JSBI","Big","SqrtPriceMath","zero: Amount","Big"],"sources":["../src/lib/contracts.ts","../src/lib/liquidityUtils.ts","../src/lib/numberUtils.ts"],"sourcesContent":["import type {Address, Client, PublicClient, GetContractReturnType} from 'viem';\nimport {getContract} from 'viem';\nimport {monadTestnet} from 'viem/chains';\n\nimport {erc20Abi} from '~/abis/erc20';\nimport {lensAbi} from '~/abis/lens';\nimport {uniswapMathLensAbi} from '~/abis/uniswapMathLens';\nimport {optionsMarketAbi} from '~/abis/optionsMarket';\n\nexport type TimelockMarket = GetContractReturnType<\n typeof optionsMarketAbi,\n Client,\n Address\n>;\nexport type TimelockLens = GetContractReturnType<\n typeof lensAbi,\n Client,\n Address\n>;\nexport type UniswapMathLens = GetContractReturnType<\n typeof uniswapMathLensAbi,\n Client,\n Address\n>;\n\nexport type TimelockMarketData = Awaited<\n ReturnType<TimelockLens['read']['getMarketData']>\n> & {address: Address};\n\nexport const getErc20 = (address: Address, client: Client) =>\n getContract({abi: erc20Abi, address, client});\n\nexport const getTimelockMarket = (\n address: Address,\n client: Client,\n): TimelockMarket => {\n return getContract({abi: optionsMarketAbi, address, client});\n};\n\nexport const getUniswapMathLens = (client: Client | PublicClient) =>\n getContract({\n abi: uniswapMathLensAbi,\n address: uniswapMathLenses[client.chain!.id],\n client,\n });\n\nexport const getTimelockLens = (client: Client | PublicClient) =>\n getContract({\n abi: lensAbi,\n address: timelockLenses[client.chain!.id],\n client,\n });\n\nexport const timelockLenses: Record<number, Address> = {\n [monadTestnet.id]: '0xe9021c9130bE6651357E23b89EB1b69cbadB5Db7',\n};\nexport const uniswapMathLenses: Record<number, Address> = {\n [monadTestnet.id]: '0x4C8375D1F6D5F452e92e211C1D3E7a44F78dFc95',\n};\n","import {SqrtPriceMath, TickMath} from '@uniswap/v3-sdk';\nimport Big from 'big.js';\nimport JSBI from 'jsbi';\n\nexport const PRICE_PRECISION = BigInt(1e18);\n\nexport const getPriceAtTick = (tick: number) => {\n const sqrtRatioX96 = BigInt(TickMath.getSqrtRatioAtTick(tick).toString());\n\n const priceX192 = sqrtRatioX96 * sqrtRatioX96;\n const price = (priceX192 * PRICE_PRECISION) / BigInt(2 ** 192);\n\n return price;\n};\n\nexport const getTickAtPrice = (price: bigint) => {\n const priceX192 = (price * BigInt(2 ** 192)) / PRICE_PRECISION;\n const sqrtPriceX96 = JSBI.BigInt(\n new Big(priceX192.toString()).sqrt().toFixed(0),\n );\n return TickMath.getTickAtSqrtRatio(sqrtPriceX96);\n};\n\nexport const roundTickDown = (tick: number, spacing: number) => {\n const rem = tick % spacing;\n if (rem >= 0) return tick - rem;\n return tick - rem - spacing;\n};\n\nexport const roundTickUp = (tick: number, spacing: number) => {\n const rem = tick % spacing;\n if (rem === 0) return tick;\n if (rem > 0) return tick - rem + spacing;\n return tick - rem;\n};\n\nexport const token0ToToken1 = (amount0: bigint, tick: number) => {\n const price = getPriceAtTick(tick);\n return (amount0 * price) / PRICE_PRECISION;\n};\n\nexport const token1ToToken0 = (amount1: bigint, tick: number) => {\n const price = getPriceAtTick(tick);\n return (amount1 * PRICE_PRECISION) / price;\n};\n\nexport const liquiditiesToAmount0 = (\n liquidities: bigint[],\n startTick: number,\n tickSpacing: number,\n) => {\n let amount0 = BigInt(0);\n\n for (let i = 0; i < liquidities.length; i++) {\n const liquidity = liquidities[i];\n if (liquidity === BigInt(0)) continue;\n\n const tickLower = startTick + tickSpacing * i;\n const tickUpper = tickLower + tickSpacing;\n\n const sqrtRatioAX96 = TickMath.getSqrtRatioAtTick(tickLower);\n const sqrtRatioBX96 = TickMath.getSqrtRatioAtTick(tickUpper);\n const liquidityJSBI = JSBI.BigInt(liquidity.toString());\n\n const amount0Delta = SqrtPriceMath.getAmount0Delta(\n sqrtRatioAX96,\n sqrtRatioBX96,\n liquidityJSBI,\n false,\n );\n amount0 += BigInt(amount0Delta.toString());\n }\n return amount0;\n};\n\nexport const liquiditiesToAmount1 = (\n liquidities: bigint[],\n startTick: number,\n tickSpacing: number,\n) => {\n let amount1 = BigInt(0);\n\n for (let i = 0; i < liquidities.length; i++) {\n const liquidity = liquidities[i];\n if (liquidity === BigInt(0)) continue;\n\n const tickLower = startTick + tickSpacing * i;\n const tickUpper = tickLower + tickSpacing;\n\n const sqrtRatioAX96 = TickMath.getSqrtRatioAtTick(tickLower);\n const sqrtRatioBX96 = TickMath.getSqrtRatioAtTick(tickUpper);\n const liquidityJSBI = JSBI.BigInt(liquidity.toString());\n\n const amount1Delta = SqrtPriceMath.getAmount1Delta(\n sqrtRatioAX96,\n sqrtRatioBX96,\n liquidityJSBI,\n false,\n );\n amount1 += BigInt(amount1Delta.toString());\n }\n return amount1;\n};\n\nexport const liquiditiesToAmounts = (\n liquidities: bigint[],\n startTick: number,\n currentTick: number,\n tickSpacing: number,\n) => {\n let amount0 = 0n;\n let amount1 = 0n;\n\n const sqrtRatioX96 = TickMath.getSqrtRatioAtTick(currentTick);\n\n for (let i = 0; i < liquidities.length; i++) {\n const liquidity = liquidities[i];\n if (liquidity === BigInt(0)) continue;\n\n const tickLower = startTick + tickSpacing * i;\n const tickUpper = tickLower + tickSpacing;\n\n const sqrtRatioAX96 = TickMath.getSqrtRatioAtTick(tickLower);\n const sqrtRatioBX96 = TickMath.getSqrtRatioAtTick(tickUpper);\n const liquidityJSBI = JSBI.BigInt(liquidity.toString());\n\n if (currentTick < tickLower) {\n const delta0 = SqrtPriceMath.getAmount0Delta(\n sqrtRatioAX96,\n sqrtRatioBX96,\n liquidityJSBI,\n false,\n );\n amount0 += BigInt(delta0.toString());\n } else if (currentTick >= tickUpper) {\n const delta1 = SqrtPriceMath.getAmount1Delta(\n sqrtRatioAX96,\n sqrtRatioBX96,\n liquidityJSBI,\n false,\n );\n amount1 += BigInt(delta1.toString());\n } else {\n const delta0 = SqrtPriceMath.getAmount0Delta(\n sqrtRatioX96,\n sqrtRatioBX96,\n liquidityJSBI,\n false,\n );\n const delta1 = SqrtPriceMath.getAmount1Delta(\n sqrtRatioAX96,\n sqrtRatioX96,\n liquidityJSBI,\n false,\n );\n amount0 += BigInt(delta0.toString());\n amount1 += BigInt(delta1.toString());\n }\n }\n return [amount0, amount1];\n};\n","import Big from 'big.js';\n\nexport type Amount = {\n scaled: bigint;\n unscaled: Big;\n decimals: number;\n formatted: string;\n};\n\nexport const zero: Amount = {\n scaled: 0n,\n unscaled: Big(0),\n decimals: 18,\n formatted: '0',\n};\n\nexport const wrapAmount = (scaled: bigint, decimals: number): Amount => {\n const unscaled = unscaleAmount(scaled, decimals);\n const formatted = formatAmount(unscaled);\n return {scaled, unscaled, decimals, formatted};\n};\n\nexport const wrapAmountUnscaled = (\n unscaled: Big | number | string,\n decimals: number,\n): Amount => {\n unscaled = Big(unscaled);\n const scaled = scaleAmount(unscaled, decimals);\n const formatted = formatAmount(unscaled);\n return {scaled, unscaled, decimals, formatted};\n};\n\nexport const wrapPrice = (\n scaled: bigint,\n decimals0: number,\n decimals1: number,\n): Amount => {\n const unscaled = unscalePrice(scaled, decimals0, decimals1);\n const formatted = formatAmount(unscaled);\n return {scaled, unscaled, decimals: 36 + decimals1 - decimals0, formatted};\n};\n\nexport const wrapPriceUnscaled = (\n unscaled: Big | number | string,\n decimals0: number,\n decimals1: number,\n): Amount => {\n unscaled = Big(unscaled);\n const scaled = scalePrice(unscaled, decimals0, decimals1);\n const formatted = formatAmount(unscaled);\n return {scaled, unscaled, decimals: 36 + decimals1 - decimals0, formatted};\n};\n\nexport const unscaleAmount = (scaled: bigint, decimals: number) => {\n return new Big(scaled.toString()).div(new Big(10).pow(decimals));\n};\n\nexport const scaleAmount = (\n unscaled: Big | number | string,\n decimals: number,\n) => {\n return BigInt(\n Big(unscaled).mul(new Big(10).pow(decimals)).round().toFixed(0),\n );\n};\n\nexport const unscalePrice = (\n scaled: bigint,\n decimals0: number,\n decimals1: number,\n precision = 18,\n) => {\n return new Big(scaled.toString())\n .mul(new Big(10).pow(decimals0))\n .div(new Big(10).pow(decimals1))\n .div(new Big(10).pow(precision));\n};\n\nexport const scalePrice = (\n unscaled: Big | number | string,\n decimals0: number,\n decimals1: number,\n precision = 18,\n) => {\n return BigInt(\n Big(unscaled)\n .mul(new Big(10).pow(precision))\n .mul(new Big(10).pow(decimals1))\n .div(new Big(10).pow(decimals0))\n .round()\n .toFixed(0),\n );\n};\n\nexport const formatAmount = (value?: Big | number | string) => {\n if (value === undefined) return '-';\n // return value < 1 ? value.toPrecision(2) : value.toFixed(2);\n return formatCondensed(Big(value).toFixed(100));\n};\n\nexport const formatVagueAmount = (value: number | bigint) => {\n value = Number(value);\n if (value === 0) return '0';\n\n const formatted = value.toExponential(2);\n return formatted.replace(/\\.?0+e/, 'e').replace(/e\\+/, 'e');\n};\n\nexport const formatCondensed = (\n input: string | number,\n decimals = 2,\n): string => {\n const str = (typeof input === 'number' ? input.toFixed(20) : input)\n .replace(/(\\.\\d*?)0+$/, '$1')\n .replace(/\\.$/, '');\n\n const [whole, decimal] = str.split('.');\n\n const formattedWhole = whole.replace(/\\B(?=(\\d{3})+(?!\\d))/g, ',');\n if (!decimal) return formattedWhole;\n\n const leadingZeroMatch = decimal.match(/^(0{3,})/);\n\n if (leadingZeroMatch) {\n const zeroCount = leadingZeroMatch[1].length;\n const subscript = toSubscript(zeroCount.toString());\n const remaining = decimal.slice(zeroCount);\n\n const twoDigits = remaining.slice(0, decimals);\n return `${formattedWhole}.0${subscript}${twoDigits}`;\n } else {\n // No subscript needed, find first 2 significant digits\n const nonZeroStart = decimal.search(/[1-9]/); // Find first non-zero digit\n\n if (nonZeroStart === -1) {\n return formattedWhole; // All zeros\n }\n const significantPart = decimal.slice(nonZeroStart);\n const twoDigits = significantPart.slice(0, decimals);\n const leadingZeros = decimal.slice(0, nonZeroStart);\n\n return `${formattedWhole}.${leadingZeros}${twoDigits}`;\n }\n};\n\nconst toSubscript = (input: string) => {\n return input.replace(/[0-9]/g, m => '₀₁₂₃₄₅₆₇₈₉'[+m]);\n};\n\nexport const formatUSD = (value: Big | string | number): string => {\n return '$' + formatAmount(value);\n};\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AA6BA,MAAa,YAAY,SAAkB,iCAC7B;CAAC,KAAKA;CAAU;CAAS;CAAO,CAAC;AAE/C,MAAa,qBACX,SACA,WACmB;AACnB,8BAAmB;EAAC,KAAKC;EAAkB;EAAS;EAAO,CAAC;;AAG9D,MAAa,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G,CAEQ,MAAM,IAAI;CAEvC,MAAM,iBAAiB,MAAM,QAAQ,yBAAyB,IAAI;AAClE,KAAI,CAAC,QAAS,QAAO;CAErB,MAAM,mBAAmB,QAAQ,MAAM,WAAW;AAElD,KAAI,kBAAkB;EACpB,MAAM,YAAY,iBAAiB,GAAG;AAKtC,SAAO,GAAG,eAAe,IAJP,YAAY,UAAU,UAAU,CAAC,GACjC,QAAQ,MAAM,UAAU,CAEd,MAAM,GAAG,SAAS;QAEzC;EAEL,MAAM,eAAe,QAAQ,OAAO,QAAQ;AAE5C,MAAI,iBAAiB,GACnB,QAAO;EAGT,MAAM,YADkB,QAAQ,MAAM,aAAa,CACjB,MAAM,GAAG,SAAS;AAGpD,SAAO,GAAG,eAAe,GAFJ,QAAQ,MAAM,GAAG,aAAa,GAER;;;AAI/C,MAAM,eAAe,UAAkB;AACrC,QAAO,MAAM,QAAQ,WAAU,MAAK,aAAa,CAAC,GAAG;;AAGvD,MAAa,aAAa,UAAyC;AACjE,QAAO,MAAM,aAAa,MAAM"}
1
+ {"version":3,"file":"numberUtils-CkwkoxOr.cjs","names":["erc20Abi","optionsMarketAbi","uniswapMathLensAbi","lensAbi","timelockLenses: Record<number, Address>","monadTestnet","uniswapMathLenses: Record<number, Address>","TickMath","JSBI","Big","SqrtPriceMath","zero: Amount","Big"],"sources":["../src/lib/contracts.ts","../src/lib/liquidityUtils.ts","../src/lib/numberUtils.ts"],"sourcesContent":["import type {Address, Client, PublicClient, GetContractReturnType} from 'viem';\nimport {getContract} from 'viem';\nimport {monadTestnet} from 'viem/chains';\n\nimport {erc20Abi} from '~/abis/erc20';\nimport {lensAbi} from '~/abis/lens';\nimport {uniswapMathLensAbi} from '~/abis/uniswapMathLens';\nimport {optionsMarketAbi} from '~/abis/optionsMarket';\n\nexport type TimelockMarket = GetContractReturnType<\n typeof optionsMarketAbi,\n Client,\n Address\n>;\nexport type TimelockLens = GetContractReturnType<\n typeof lensAbi,\n Client,\n Address\n>;\nexport type UniswapMathLens = GetContractReturnType<\n typeof uniswapMathLensAbi,\n Client,\n Address\n>;\n\nexport type TimelockMarketData = Awaited<\n ReturnType<TimelockLens['read']['getMarketData']>\n> & {address: Address};\n\nexport const getErc20 = (address: Address, client: Client) =>\n getContract({abi: erc20Abi, address, client});\n\nexport const getTimelockMarket = (\n address: Address,\n client: Client,\n): TimelockMarket => {\n return getContract({abi: optionsMarketAbi, address, client});\n};\n\nexport const getUniswapMathLens = (client: Client | PublicClient) =>\n getContract({\n abi: uniswapMathLensAbi,\n address: uniswapMathLenses[client.chain!.id],\n client,\n });\n\nexport const getTimelockLens = (client: Client | PublicClient) =>\n getContract({\n abi: lensAbi,\n address: timelockLenses[client.chain!.id],\n client,\n });\n\nexport const timelockLenses: Record<number, Address> = {\n [monadTestnet.id]: '0xb2A8DDe5885FAEC1487e0894Ad84F35f2F15EB7B',\n};\nexport const uniswapMathLenses: Record<number, Address> = {\n [monadTestnet.id]: '0x4C8375D1F6D5F452e92e211C1D3E7a44F78dFc95',\n};\n","import {SqrtPriceMath, TickMath} from '@uniswap/v3-sdk';\nimport Big from 'big.js';\nimport JSBI from 'jsbi';\n\nexport const PRICE_PRECISION = BigInt(1e18);\n\nexport const getPriceAtTick = (tick: number) => {\n const sqrtRatioX96 = BigInt(TickMath.getSqrtRatioAtTick(tick).toString());\n\n const priceX192 = sqrtRatioX96 * sqrtRatioX96;\n const price = (priceX192 * PRICE_PRECISION) / BigInt(2 ** 192);\n\n return price;\n};\n\nexport const getTickAtPrice = (price: bigint) => {\n const priceX192 = (price * BigInt(2 ** 192)) / PRICE_PRECISION;\n const sqrtPriceX96 = JSBI.BigInt(\n new Big(priceX192.toString()).sqrt().toFixed(0),\n );\n return TickMath.getTickAtSqrtRatio(sqrtPriceX96);\n};\n\nexport const roundTickDown = (tick: number, spacing: number) => {\n const rem = tick % spacing;\n if (rem >= 0) return tick - rem;\n return tick - rem - spacing;\n};\n\nexport const roundTickUp = (tick: number, spacing: number) => {\n const rem = tick % spacing;\n if (rem === 0) return tick;\n if (rem > 0) return tick - rem + spacing;\n return tick - rem;\n};\n\nexport const token0ToToken1 = (amount0: bigint, tick: number) => {\n const price = getPriceAtTick(tick);\n return (amount0 * price) / PRICE_PRECISION;\n};\n\nexport const token1ToToken0 = (amount1: bigint, tick: number) => {\n const price = getPriceAtTick(tick);\n return (amount1 * PRICE_PRECISION) / price;\n};\n\nexport const liquiditiesToAmount0 = (\n liquidities: bigint[],\n startTick: number,\n tickSpacing: number,\n) => {\n let amount0 = BigInt(0);\n\n for (let i = 0; i < liquidities.length; i++) {\n const liquidity = liquidities[i];\n if (liquidity === BigInt(0)) continue;\n\n const tickLower = startTick + tickSpacing * i;\n const tickUpper = tickLower + tickSpacing;\n\n const sqrtRatioAX96 = TickMath.getSqrtRatioAtTick(tickLower);\n const sqrtRatioBX96 = TickMath.getSqrtRatioAtTick(tickUpper);\n const liquidityJSBI = JSBI.BigInt(liquidity.toString());\n\n const amount0Delta = SqrtPriceMath.getAmount0Delta(\n sqrtRatioAX96,\n sqrtRatioBX96,\n liquidityJSBI,\n false,\n );\n amount0 += BigInt(amount0Delta.toString());\n }\n return amount0;\n};\n\nexport const liquiditiesToAmount1 = (\n liquidities: bigint[],\n startTick: number,\n tickSpacing: number,\n) => {\n let amount1 = BigInt(0);\n\n for (let i = 0; i < liquidities.length; i++) {\n const liquidity = liquidities[i];\n if (liquidity === BigInt(0)) continue;\n\n const tickLower = startTick + tickSpacing * i;\n const tickUpper = tickLower + tickSpacing;\n\n const sqrtRatioAX96 = TickMath.getSqrtRatioAtTick(tickLower);\n const sqrtRatioBX96 = TickMath.getSqrtRatioAtTick(tickUpper);\n const liquidityJSBI = JSBI.BigInt(liquidity.toString());\n\n const amount1Delta = SqrtPriceMath.getAmount1Delta(\n sqrtRatioAX96,\n sqrtRatioBX96,\n liquidityJSBI,\n false,\n );\n amount1 += BigInt(amount1Delta.toString());\n }\n return amount1;\n};\n\nexport const liquiditiesToAmounts = (\n liquidities: bigint[],\n startTick: number,\n currentTick: number,\n tickSpacing: number,\n) => {\n let amount0 = 0n;\n let amount1 = 0n;\n\n const sqrtRatioX96 = TickMath.getSqrtRatioAtTick(currentTick);\n\n for (let i = 0; i < liquidities.length; i++) {\n const liquidity = liquidities[i];\n if (liquidity === BigInt(0)) continue;\n\n const tickLower = startTick + tickSpacing * i;\n const tickUpper = tickLower + tickSpacing;\n\n const sqrtRatioAX96 = TickMath.getSqrtRatioAtTick(tickLower);\n const sqrtRatioBX96 = TickMath.getSqrtRatioAtTick(tickUpper);\n const liquidityJSBI = JSBI.BigInt(liquidity.toString());\n\n if (currentTick < tickLower) {\n const delta0 = SqrtPriceMath.getAmount0Delta(\n sqrtRatioAX96,\n sqrtRatioBX96,\n liquidityJSBI,\n false,\n );\n amount0 += BigInt(delta0.toString());\n } else if (currentTick >= tickUpper) {\n const delta1 = SqrtPriceMath.getAmount1Delta(\n sqrtRatioAX96,\n sqrtRatioBX96,\n liquidityJSBI,\n false,\n );\n amount1 += BigInt(delta1.toString());\n } else {\n const delta0 = SqrtPriceMath.getAmount0Delta(\n sqrtRatioX96,\n sqrtRatioBX96,\n liquidityJSBI,\n false,\n );\n const delta1 = SqrtPriceMath.getAmount1Delta(\n sqrtRatioAX96,\n sqrtRatioX96,\n liquidityJSBI,\n false,\n );\n amount0 += BigInt(delta0.toString());\n amount1 += BigInt(delta1.toString());\n }\n }\n return [amount0, amount1];\n};\n","import Big from 'big.js';\n\nexport type Amount = {\n scaled: bigint;\n unscaled: Big;\n decimals: number;\n formatted: string;\n};\n\nexport const zero: Amount = {\n scaled: 0n,\n unscaled: Big(0),\n decimals: 18,\n formatted: '0',\n};\n\nexport const wrapAmount = (scaled: bigint, decimals: number): Amount => {\n const unscaled = unscaleAmount(scaled, decimals);\n const formatted = formatAmount(unscaled);\n return {scaled, unscaled, decimals, formatted};\n};\n\nexport const wrapAmountUnscaled = (\n unscaled: Big | number | string,\n decimals: number,\n): Amount => {\n unscaled = Big(unscaled);\n const scaled = scaleAmount(unscaled, decimals);\n const formatted = formatAmount(unscaled);\n return {scaled, unscaled, decimals, formatted};\n};\n\nexport const wrapPrice = (\n scaled: bigint,\n decimals0: number,\n decimals1: number,\n): Amount => {\n const unscaled = unscalePrice(scaled, decimals0, decimals1);\n const formatted = formatAmount(unscaled);\n return {scaled, unscaled, decimals: 36 + decimals1 - decimals0, formatted};\n};\n\nexport const wrapPriceUnscaled = (\n unscaled: Big | number | string,\n decimals0: number,\n decimals1: number,\n): Amount => {\n unscaled = Big(unscaled);\n const scaled = scalePrice(unscaled, decimals0, decimals1);\n const formatted = formatAmount(unscaled);\n return {scaled, unscaled, decimals: 36 + decimals1 - decimals0, formatted};\n};\n\nexport const unscaleAmount = (scaled: bigint, decimals: number) => {\n return new Big(scaled.toString()).div(new Big(10).pow(decimals));\n};\n\nexport const scaleAmount = (\n unscaled: Big | number | string,\n decimals: number,\n) => {\n return BigInt(\n Big(unscaled).mul(new Big(10).pow(decimals)).round().toFixed(0),\n );\n};\n\nexport const unscalePrice = (\n scaled: bigint,\n decimals0: number,\n decimals1: number,\n precision = 18,\n) => {\n return new Big(scaled.toString())\n .mul(new Big(10).pow(decimals0))\n .div(new Big(10).pow(decimals1))\n .div(new Big(10).pow(precision));\n};\n\nexport const scalePrice = (\n unscaled: Big | number | string,\n decimals0: number,\n decimals1: number,\n precision = 18,\n) => {\n return BigInt(\n Big(unscaled)\n .mul(new Big(10).pow(precision))\n .mul(new Big(10).pow(decimals1))\n .div(new Big(10).pow(decimals0))\n .round()\n .toFixed(0),\n );\n};\n\nexport const formatAmount = (value?: Big | number | string) => {\n if (value === undefined) return '-';\n // return value < 1 ? value.toPrecision(2) : value.toFixed(2);\n return formatCondensed(Big(value).toFixed(100));\n};\n\nexport const formatVagueAmount = (value: number | bigint) => {\n value = Number(value);\n if (value === 0) return '0';\n\n const formatted = value.toExponential(2);\n return formatted.replace(/\\.?0+e/, 'e').replace(/e\\+/, 'e');\n};\n\nexport const formatCondensed = (\n input: string | number,\n decimals = 2,\n): string => {\n const str = (typeof input === 'number' ? input.toFixed(20) : input)\n .replace(/(\\.\\d*?)0+$/, '$1')\n .replace(/\\.$/, '');\n\n const [whole, decimal] = str.split('.');\n\n const formattedWhole = whole.replace(/\\B(?=(\\d{3})+(?!\\d))/g, ',');\n if (!decimal) return formattedWhole;\n\n const leadingZeroMatch = decimal.match(/^(0{3,})/);\n\n if (leadingZeroMatch) {\n const zeroCount = leadingZeroMatch[1].length;\n const subscript = toSubscript(zeroCount.toString());\n const remaining = decimal.slice(zeroCount);\n\n const twoDigits = remaining.slice(0, decimals);\n return `${formattedWhole}.0${subscript}${twoDigits}`;\n } else {\n // No subscript needed, find first 2 significant digits\n const nonZeroStart = decimal.search(/[1-9]/); // Find first non-zero digit\n\n if (nonZeroStart === -1) {\n return formattedWhole; // All zeros\n }\n const significantPart = decimal.slice(nonZeroStart);\n const twoDigits = significantPart.slice(0, decimals);\n const leadingZeros = decimal.slice(0, nonZeroStart);\n\n return `${formattedWhole}.${leadingZeros}${twoDigits}`;\n }\n};\n\nconst toSubscript = (input: string) => {\n return input.replace(/[0-9]/g, m => '₀₁₂₃₄₅₆₇₈₉'[+m]);\n};\n\nexport const formatUSD = (value: Big | string | number): string => {\n return '$' + formatAmount(value);\n};\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AA6BA,MAAa,YAAY,SAAkB,iCAC7B;CAAC,KAAKA;CAAU;CAAS;CAAO,CAAC;AAE/C,MAAa,qBACX,SACA,WACmB;AACnB,8BAAmB;EAAC,KAAKC;EAAkB;EAAS;EAAO,CAAC;;AAG9D,MAAa,sBAAsB,iCACrB;CACV,KAAKC;CACL,SAAS,kBAAkB,OAAO,MAAO;CACzC;CACD,CAAC;AAEJ,MAAa,mBAAmB,iCAClB;CACV,KAAKC;CACL,SAAS,eAAe,OAAO,MAAO;CACtC;CACD,CAAC;AAEJ,MAAaC,iBAA0C,GACpDC,yBAAa,KAAK,8CACpB;AACD,MAAaC,oBAA6C,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AU,UAAU,CAAC,GACjC,QAAQ,MAAM,UAAU,CAEd,MAAM,GAAG,SAAS;QAEzC;EAEL,MAAM,eAAe,QAAQ,OAAO,QAAQ;AAE5C,MAAI,iBAAiB,GACnB,QAAO;EAGT,MAAM,YADkB,QAAQ,MAAM,aAAa,CACjB,MAAM,GAAG,SAAS;AAGpD,SAAO,GAAG,eAAe,GAFJ,QAAQ,MAAM,GAAG,aAAa,GAER;;;AAI/C,MAAM,eAAe,UAAkB;AACrC,QAAO,MAAM,QAAQ,WAAU,MAAK,aAAa,CAAC,GAAG;;AAGvD,MAAa,aAAa,UAAyC;AACjE,QAAO,MAAM,aAAa,MAAM"}
@@ -1,4 +1,4 @@
1
- import { i as erc20Abi$1, n as uniswapMathLensAbi, r as lensAbi, t as optionsMarketAbi } from "./optionsMarket-CvArD6d_.js";
1
+ import { i as erc20Abi$1, n as uniswapMathLensAbi, r as lensAbi, t as optionsMarketAbi } from "./optionsMarket-BDBU1gUS.js";
2
2
  import { getContract } from "viem";
3
3
  import { monadTestnet } from "viem/chains";
4
4
  import { SqrtPriceMath, TickMath } from "@uniswap/v3-sdk";
@@ -28,7 +28,7 @@ const getTimelockLens = (client) => getContract({
28
28
  address: timelockLenses[client.chain.id],
29
29
  client
30
30
  });
31
- const timelockLenses = { [monadTestnet.id]: "0xe9021c9130bE6651357E23b89EB1b69cbadB5Db7" };
31
+ const timelockLenses = { [monadTestnet.id]: "0xb2A8DDe5885FAEC1487e0894Ad84F35f2F15EB7B" };
32
32
  const uniswapMathLenses = { [monadTestnet.id]: "0x4C8375D1F6D5F452e92e211C1D3E7a44F78dFc95" };
33
33
 
34
34
  //#endregion
@@ -213,4 +213,4 @@ const formatUSD = (value) => {
213
213
 
214
214
  //#endregion
215
215
  export { token1ToToken0 as C, getUniswapMathLens as D, getTimelockMarket as E, timelockLenses as O, token0ToToken1 as S, getTimelockLens as T, liquiditiesToAmount0 as _, scaleAmount as a, roundTickDown as b, unscalePrice as c, wrapPrice as d, wrapPriceUnscaled as f, getTickAtPrice as g, getPriceAtTick as h, formatVagueAmount as i, uniswapMathLenses as k, wrapAmount as l, PRICE_PRECISION as m, formatCondensed as n, scalePrice as o, zero as p, formatUSD as r, unscaleAmount as s, formatAmount as t, wrapAmountUnscaled as u, liquiditiesToAmount1 as v, getErc20 as w, roundTickUp as x, liquiditiesToAmounts as y };
216
- //# sourceMappingURL=numberUtils-Dk0TuHnT.js.map
216
+ //# sourceMappingURL=numberUtils-Cznv1Tfa.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"numberUtils-Dk0TuHnT.js","names":["erc20Abi","timelockLenses: Record<number, Address>","uniswapMathLenses: Record<number, Address>","zero: Amount"],"sources":["../src/lib/contracts.ts","../src/lib/liquidityUtils.ts","../src/lib/numberUtils.ts"],"sourcesContent":["import type {Address, Client, PublicClient, GetContractReturnType} from 'viem';\nimport {getContract} from 'viem';\nimport {monadTestnet} from 'viem/chains';\n\nimport {erc20Abi} from '~/abis/erc20';\nimport {lensAbi} from '~/abis/lens';\nimport {uniswapMathLensAbi} from '~/abis/uniswapMathLens';\nimport {optionsMarketAbi} from '~/abis/optionsMarket';\n\nexport type TimelockMarket = GetContractReturnType<\n typeof optionsMarketAbi,\n Client,\n Address\n>;\nexport type TimelockLens = GetContractReturnType<\n typeof lensAbi,\n Client,\n Address\n>;\nexport type UniswapMathLens = GetContractReturnType<\n typeof uniswapMathLensAbi,\n Client,\n Address\n>;\n\nexport type TimelockMarketData = Awaited<\n ReturnType<TimelockLens['read']['getMarketData']>\n> & {address: Address};\n\nexport const getErc20 = (address: Address, client: Client) =>\n getContract({abi: erc20Abi, address, client});\n\nexport const getTimelockMarket = (\n address: Address,\n client: Client,\n): TimelockMarket => {\n return getContract({abi: optionsMarketAbi, address, client});\n};\n\nexport const getUniswapMathLens = (client: Client | PublicClient) =>\n getContract({\n abi: uniswapMathLensAbi,\n address: uniswapMathLenses[client.chain!.id],\n client,\n });\n\nexport const getTimelockLens = (client: Client | PublicClient) =>\n getContract({\n abi: lensAbi,\n address: timelockLenses[client.chain!.id],\n client,\n });\n\nexport const timelockLenses: Record<number, Address> = {\n [monadTestnet.id]: '0xe9021c9130bE6651357E23b89EB1b69cbadB5Db7',\n};\nexport const uniswapMathLenses: Record<number, Address> = {\n [monadTestnet.id]: '0x4C8375D1F6D5F452e92e211C1D3E7a44F78dFc95',\n};\n","import {SqrtPriceMath, TickMath} from '@uniswap/v3-sdk';\nimport Big from 'big.js';\nimport JSBI from 'jsbi';\n\nexport const PRICE_PRECISION = BigInt(1e18);\n\nexport const getPriceAtTick = (tick: number) => {\n const sqrtRatioX96 = BigInt(TickMath.getSqrtRatioAtTick(tick).toString());\n\n const priceX192 = sqrtRatioX96 * sqrtRatioX96;\n const price = (priceX192 * PRICE_PRECISION) / BigInt(2 ** 192);\n\n return price;\n};\n\nexport const getTickAtPrice = (price: bigint) => {\n const priceX192 = (price * BigInt(2 ** 192)) / PRICE_PRECISION;\n const sqrtPriceX96 = JSBI.BigInt(\n new Big(priceX192.toString()).sqrt().toFixed(0),\n );\n return TickMath.getTickAtSqrtRatio(sqrtPriceX96);\n};\n\nexport const roundTickDown = (tick: number, spacing: number) => {\n const rem = tick % spacing;\n if (rem >= 0) return tick - rem;\n return tick - rem - spacing;\n};\n\nexport const roundTickUp = (tick: number, spacing: number) => {\n const rem = tick % spacing;\n if (rem === 0) return tick;\n if (rem > 0) return tick - rem + spacing;\n return tick - rem;\n};\n\nexport const token0ToToken1 = (amount0: bigint, tick: number) => {\n const price = getPriceAtTick(tick);\n return (amount0 * price) / PRICE_PRECISION;\n};\n\nexport const token1ToToken0 = (amount1: bigint, tick: number) => {\n const price = getPriceAtTick(tick);\n return (amount1 * PRICE_PRECISION) / price;\n};\n\nexport const liquiditiesToAmount0 = (\n liquidities: bigint[],\n startTick: number,\n tickSpacing: number,\n) => {\n let amount0 = BigInt(0);\n\n for (let i = 0; i < liquidities.length; i++) {\n const liquidity = liquidities[i];\n if (liquidity === BigInt(0)) continue;\n\n const tickLower = startTick + tickSpacing * i;\n const tickUpper = tickLower + tickSpacing;\n\n const sqrtRatioAX96 = TickMath.getSqrtRatioAtTick(tickLower);\n const sqrtRatioBX96 = TickMath.getSqrtRatioAtTick(tickUpper);\n const liquidityJSBI = JSBI.BigInt(liquidity.toString());\n\n const amount0Delta = SqrtPriceMath.getAmount0Delta(\n sqrtRatioAX96,\n sqrtRatioBX96,\n liquidityJSBI,\n false,\n );\n amount0 += BigInt(amount0Delta.toString());\n }\n return amount0;\n};\n\nexport const liquiditiesToAmount1 = (\n liquidities: bigint[],\n startTick: number,\n tickSpacing: number,\n) => {\n let amount1 = BigInt(0);\n\n for (let i = 0; i < liquidities.length; i++) {\n const liquidity = liquidities[i];\n if (liquidity === BigInt(0)) continue;\n\n const tickLower = startTick + tickSpacing * i;\n const tickUpper = tickLower + tickSpacing;\n\n const sqrtRatioAX96 = TickMath.getSqrtRatioAtTick(tickLower);\n const sqrtRatioBX96 = TickMath.getSqrtRatioAtTick(tickUpper);\n const liquidityJSBI = JSBI.BigInt(liquidity.toString());\n\n const amount1Delta = SqrtPriceMath.getAmount1Delta(\n sqrtRatioAX96,\n sqrtRatioBX96,\n liquidityJSBI,\n false,\n );\n amount1 += BigInt(amount1Delta.toString());\n }\n return amount1;\n};\n\nexport const liquiditiesToAmounts = (\n liquidities: bigint[],\n startTick: number,\n currentTick: number,\n tickSpacing: number,\n) => {\n let amount0 = 0n;\n let amount1 = 0n;\n\n const sqrtRatioX96 = TickMath.getSqrtRatioAtTick(currentTick);\n\n for (let i = 0; i < liquidities.length; i++) {\n const liquidity = liquidities[i];\n if (liquidity === BigInt(0)) continue;\n\n const tickLower = startTick + tickSpacing * i;\n const tickUpper = tickLower + tickSpacing;\n\n const sqrtRatioAX96 = TickMath.getSqrtRatioAtTick(tickLower);\n const sqrtRatioBX96 = TickMath.getSqrtRatioAtTick(tickUpper);\n const liquidityJSBI = JSBI.BigInt(liquidity.toString());\n\n if (currentTick < tickLower) {\n const delta0 = SqrtPriceMath.getAmount0Delta(\n sqrtRatioAX96,\n sqrtRatioBX96,\n liquidityJSBI,\n false,\n );\n amount0 += BigInt(delta0.toString());\n } else if (currentTick >= tickUpper) {\n const delta1 = SqrtPriceMath.getAmount1Delta(\n sqrtRatioAX96,\n sqrtRatioBX96,\n liquidityJSBI,\n false,\n );\n amount1 += BigInt(delta1.toString());\n } else {\n const delta0 = SqrtPriceMath.getAmount0Delta(\n sqrtRatioX96,\n sqrtRatioBX96,\n liquidityJSBI,\n false,\n );\n const delta1 = SqrtPriceMath.getAmount1Delta(\n sqrtRatioAX96,\n sqrtRatioX96,\n liquidityJSBI,\n false,\n );\n amount0 += BigInt(delta0.toString());\n amount1 += BigInt(delta1.toString());\n }\n }\n return [amount0, amount1];\n};\n","import Big from 'big.js';\n\nexport type Amount = {\n scaled: bigint;\n unscaled: Big;\n decimals: number;\n formatted: string;\n};\n\nexport const zero: Amount = {\n scaled: 0n,\n unscaled: Big(0),\n decimals: 18,\n formatted: '0',\n};\n\nexport const wrapAmount = (scaled: bigint, decimals: number): Amount => {\n const unscaled = unscaleAmount(scaled, decimals);\n const formatted = formatAmount(unscaled);\n return {scaled, unscaled, decimals, formatted};\n};\n\nexport const wrapAmountUnscaled = (\n unscaled: Big | number | string,\n decimals: number,\n): Amount => {\n unscaled = Big(unscaled);\n const scaled = scaleAmount(unscaled, decimals);\n const formatted = formatAmount(unscaled);\n return {scaled, unscaled, decimals, formatted};\n};\n\nexport const wrapPrice = (\n scaled: bigint,\n decimals0: number,\n decimals1: number,\n): Amount => {\n const unscaled = unscalePrice(scaled, decimals0, decimals1);\n const formatted = formatAmount(unscaled);\n return {scaled, unscaled, decimals: 36 + decimals1 - decimals0, formatted};\n};\n\nexport const wrapPriceUnscaled = (\n unscaled: Big | number | string,\n decimals0: number,\n decimals1: number,\n): Amount => {\n unscaled = Big(unscaled);\n const scaled = scalePrice(unscaled, decimals0, decimals1);\n const formatted = formatAmount(unscaled);\n return {scaled, unscaled, decimals: 36 + decimals1 - decimals0, formatted};\n};\n\nexport const unscaleAmount = (scaled: bigint, decimals: number) => {\n return new Big(scaled.toString()).div(new Big(10).pow(decimals));\n};\n\nexport const scaleAmount = (\n unscaled: Big | number | string,\n decimals: number,\n) => {\n return BigInt(\n Big(unscaled).mul(new Big(10).pow(decimals)).round().toFixed(0),\n );\n};\n\nexport const unscalePrice = (\n scaled: bigint,\n decimals0: number,\n decimals1: number,\n precision = 18,\n) => {\n return new Big(scaled.toString())\n .mul(new Big(10).pow(decimals0))\n .div(new Big(10).pow(decimals1))\n .div(new Big(10).pow(precision));\n};\n\nexport const scalePrice = (\n unscaled: Big | number | string,\n decimals0: number,\n decimals1: number,\n precision = 18,\n) => {\n return BigInt(\n Big(unscaled)\n .mul(new Big(10).pow(precision))\n .mul(new Big(10).pow(decimals1))\n .div(new Big(10).pow(decimals0))\n .round()\n .toFixed(0),\n );\n};\n\nexport const formatAmount = (value?: Big | number | string) => {\n if (value === undefined) return '-';\n // return value < 1 ? value.toPrecision(2) : value.toFixed(2);\n return formatCondensed(Big(value).toFixed(100));\n};\n\nexport const formatVagueAmount = (value: number | bigint) => {\n value = Number(value);\n if (value === 0) return '0';\n\n const formatted = value.toExponential(2);\n return formatted.replace(/\\.?0+e/, 'e').replace(/e\\+/, 'e');\n};\n\nexport const formatCondensed = (\n input: string | number,\n decimals = 2,\n): string => {\n const str = (typeof input === 'number' ? input.toFixed(20) : input)\n .replace(/(\\.\\d*?)0+$/, '$1')\n .replace(/\\.$/, '');\n\n const [whole, decimal] = str.split('.');\n\n const formattedWhole = whole.replace(/\\B(?=(\\d{3})+(?!\\d))/g, ',');\n if (!decimal) return formattedWhole;\n\n const leadingZeroMatch = decimal.match(/^(0{3,})/);\n\n if (leadingZeroMatch) {\n const zeroCount = leadingZeroMatch[1].length;\n const subscript = toSubscript(zeroCount.toString());\n const remaining = decimal.slice(zeroCount);\n\n const twoDigits = remaining.slice(0, decimals);\n return `${formattedWhole}.0${subscript}${twoDigits}`;\n } else {\n // No subscript needed, find first 2 significant digits\n const nonZeroStart = decimal.search(/[1-9]/); // Find first non-zero digit\n\n if (nonZeroStart === -1) {\n return formattedWhole; // All zeros\n }\n const significantPart = decimal.slice(nonZeroStart);\n const twoDigits = significantPart.slice(0, decimals);\n const leadingZeros = decimal.slice(0, nonZeroStart);\n\n return `${formattedWhole}.${leadingZeros}${twoDigits}`;\n }\n};\n\nconst toSubscript = (input: string) => {\n return input.replace(/[0-9]/g, m => '₀₁₂₃₄₅₆₇₈₉'[+m]);\n};\n\nexport const formatUSD = (value: Big | string | number): string => {\n return '$' + formatAmount(value);\n};\n"],"mappings":";;;;;;;;AA6BA,MAAa,YAAY,SAAkB,WACzC,YAAY;CAAC,KAAKA;CAAU;CAAS;CAAO,CAAC;AAE/C,MAAa,qBACX,SACA,WACmB;AACnB,QAAO,YAAY;EAAC,KAAK;EAAkB;EAAS;EAAO,CAAC;;AAG9D,MAAa,sBAAsB,WACjC,YAAY;CACV,KAAK;CACL,SAAS,kBAAkB,OAAO,MAAO;CACzC;CACD,CAAC;AAEJ,MAAa,mBAAmB,WAC9B,YAAY;CACV,KAAK;CACL,SAAS,eAAe,OAAO,MAAO;CACtC;CACD,CAAC;AAEJ,MAAaC,iBAA0C,GACpD,aAAa,KAAK,8CACpB;AACD,MAAaC,oBAA6C,GACvD,aAAa,KAAK,8CACpB;;;;ACtDD,MAAa,kBAAkB,OAAO,kBAAK;AAE3C,MAAa,kBAAkB,SAAiB;CAC9C,MAAM,eAAe,OAAO,SAAS,mBAAmB,KAAK,CAAC,UAAU,CAAC;AAKzE,QAHkB,eAAe,eACN,kBAAmB,OAAO,KAAK,IAAI;;AAKhE,MAAa,kBAAkB,UAAkB;CAC/C,MAAM,YAAa,QAAQ,OAAO,KAAK,IAAI,GAAI;CAC/C,MAAM,eAAe,KAAK,OACxB,IAAI,IAAI,UAAU,UAAU,CAAC,CAAC,MAAM,CAAC,QAAQ,EAAE,CAChD;AACD,QAAO,SAAS,mBAAmB,aAAa;;AAGlD,M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","names":["erc20Abi","timelockLenses: Record<number, Address>","uniswapMathLenses: Record<number, Address>","zero: Amount"],"sources":["../src/lib/contracts.ts","../src/lib/liquidityUtils.ts","../src/lib/numberUtils.ts"],"sourcesContent":["import type {Address, Client, PublicClient, GetContractReturnType} from 'viem';\nimport {getContract} from 'viem';\nimport {monadTestnet} from 'viem/chains';\n\nimport {erc20Abi} from '~/abis/erc20';\nimport {lensAbi} from '~/abis/lens';\nimport {uniswapMathLensAbi} from '~/abis/uniswapMathLens';\nimport {optionsMarketAbi} from '~/abis/optionsMarket';\n\nexport type TimelockMarket = GetContractReturnType<\n typeof optionsMarketAbi,\n Client,\n Address\n>;\nexport type TimelockLens = GetContractReturnType<\n typeof lensAbi,\n Client,\n Address\n>;\nexport type UniswapMathLens = GetContractReturnType<\n typeof uniswapMathLensAbi,\n Client,\n Address\n>;\n\nexport type TimelockMarketData = Awaited<\n ReturnType<TimelockLens['read']['getMarketData']>\n> & {address: Address};\n\nexport const getErc20 = (address: Address, client: Client) =>\n getContract({abi: erc20Abi, address, client});\n\nexport const getTimelockMarket = (\n address: Address,\n client: Client,\n): TimelockMarket => {\n return getContract({abi: optionsMarketAbi, address, client});\n};\n\nexport const getUniswapMathLens = (client: Client | PublicClient) =>\n getContract({\n abi: uniswapMathLensAbi,\n address: uniswapMathLenses[client.chain!.id],\n client,\n });\n\nexport const getTimelockLens = (client: Client | PublicClient) =>\n getContract({\n abi: lensAbi,\n address: timelockLenses[client.chain!.id],\n client,\n });\n\nexport const timelockLenses: Record<number, Address> = {\n [monadTestnet.id]: '0xb2A8DDe5885FAEC1487e0894Ad84F35f2F15EB7B',\n};\nexport const uniswapMathLenses: Record<number, Address> = {\n [monadTestnet.id]: '0x4C8375D1F6D5F452e92e211C1D3E7a44F78dFc95',\n};\n","import {SqrtPriceMath, TickMath} from '@uniswap/v3-sdk';\nimport Big from 'big.js';\nimport JSBI from 'jsbi';\n\nexport const PRICE_PRECISION = BigInt(1e18);\n\nexport const getPriceAtTick = (tick: number) => {\n const sqrtRatioX96 = BigInt(TickMath.getSqrtRatioAtTick(tick).toString());\n\n const priceX192 = sqrtRatioX96 * sqrtRatioX96;\n const price = (priceX192 * PRICE_PRECISION) / BigInt(2 ** 192);\n\n return price;\n};\n\nexport const getTickAtPrice = (price: bigint) => {\n const priceX192 = (price * BigInt(2 ** 192)) / PRICE_PRECISION;\n const sqrtPriceX96 = JSBI.BigInt(\n new Big(priceX192.toString()).sqrt().toFixed(0),\n );\n return TickMath.getTickAtSqrtRatio(sqrtPriceX96);\n};\n\nexport const roundTickDown = (tick: number, spacing: number) => {\n const rem = tick % spacing;\n if (rem >= 0) return tick - rem;\n return tick - rem - spacing;\n};\n\nexport const roundTickUp = (tick: number, spacing: number) => {\n const rem = tick % spacing;\n if (rem === 0) return tick;\n if (rem > 0) return tick - rem + spacing;\n return tick - rem;\n};\n\nexport const token0ToToken1 = (amount0: bigint, tick: number) => {\n const price = getPriceAtTick(tick);\n return (amount0 * price) / PRICE_PRECISION;\n};\n\nexport const token1ToToken0 = (amount1: bigint, tick: number) => {\n const price = getPriceAtTick(tick);\n return (amount1 * PRICE_PRECISION) / price;\n};\n\nexport const liquiditiesToAmount0 = (\n liquidities: bigint[],\n startTick: number,\n tickSpacing: number,\n) => {\n let amount0 = BigInt(0);\n\n for (let i = 0; i < liquidities.length; i++) {\n const liquidity = liquidities[i];\n if (liquidity === BigInt(0)) continue;\n\n const tickLower = startTick + tickSpacing * i;\n const tickUpper = tickLower + tickSpacing;\n\n const sqrtRatioAX96 = TickMath.getSqrtRatioAtTick(tickLower);\n const sqrtRatioBX96 = TickMath.getSqrtRatioAtTick(tickUpper);\n const liquidityJSBI = JSBI.BigInt(liquidity.toString());\n\n const amount0Delta = SqrtPriceMath.getAmount0Delta(\n sqrtRatioAX96,\n sqrtRatioBX96,\n liquidityJSBI,\n false,\n );\n amount0 += BigInt(amount0Delta.toString());\n }\n return amount0;\n};\n\nexport const liquiditiesToAmount1 = (\n liquidities: bigint[],\n startTick: number,\n tickSpacing: number,\n) => {\n let amount1 = BigInt(0);\n\n for (let i = 0; i < liquidities.length; i++) {\n const liquidity = liquidities[i];\n if (liquidity === BigInt(0)) continue;\n\n const tickLower = startTick + tickSpacing * i;\n const tickUpper = tickLower + tickSpacing;\n\n const sqrtRatioAX96 = TickMath.getSqrtRatioAtTick(tickLower);\n const sqrtRatioBX96 = TickMath.getSqrtRatioAtTick(tickUpper);\n const liquidityJSBI = JSBI.BigInt(liquidity.toString());\n\n const amount1Delta = SqrtPriceMath.getAmount1Delta(\n sqrtRatioAX96,\n sqrtRatioBX96,\n liquidityJSBI,\n false,\n );\n amount1 += BigInt(amount1Delta.toString());\n }\n return amount1;\n};\n\nexport const liquiditiesToAmounts = (\n liquidities: bigint[],\n startTick: number,\n currentTick: number,\n tickSpacing: number,\n) => {\n let amount0 = 0n;\n let amount1 = 0n;\n\n const sqrtRatioX96 = TickMath.getSqrtRatioAtTick(currentTick);\n\n for (let i = 0; i < liquidities.length; i++) {\n const liquidity = liquidities[i];\n if (liquidity === BigInt(0)) continue;\n\n const tickLower = startTick + tickSpacing * i;\n const tickUpper = tickLower + tickSpacing;\n\n const sqrtRatioAX96 = TickMath.getSqrtRatioAtTick(tickLower);\n const sqrtRatioBX96 = TickMath.getSqrtRatioAtTick(tickUpper);\n const liquidityJSBI = JSBI.BigInt(liquidity.toString());\n\n if (currentTick < tickLower) {\n const delta0 = SqrtPriceMath.getAmount0Delta(\n sqrtRatioAX96,\n sqrtRatioBX96,\n liquidityJSBI,\n false,\n );\n amount0 += BigInt(delta0.toString());\n } else if (currentTick >= tickUpper) {\n const delta1 = SqrtPriceMath.getAmount1Delta(\n sqrtRatioAX96,\n sqrtRatioBX96,\n liquidityJSBI,\n false,\n );\n amount1 += BigInt(delta1.toString());\n } else {\n const delta0 = SqrtPriceMath.getAmount0Delta(\n sqrtRatioX96,\n sqrtRatioBX96,\n liquidityJSBI,\n false,\n );\n const delta1 = SqrtPriceMath.getAmount1Delta(\n sqrtRatioAX96,\n sqrtRatioX96,\n liquidityJSBI,\n false,\n );\n amount0 += BigInt(delta0.toString());\n amount1 += BigInt(delta1.toString());\n }\n }\n return [amount0, amount1];\n};\n","import Big from 'big.js';\n\nexport type Amount = {\n scaled: bigint;\n unscaled: Big;\n decimals: number;\n formatted: string;\n};\n\nexport const zero: Amount = {\n scaled: 0n,\n unscaled: Big(0),\n decimals: 18,\n formatted: '0',\n};\n\nexport const wrapAmount = (scaled: bigint, decimals: number): Amount => {\n const unscaled = unscaleAmount(scaled, decimals);\n const formatted = formatAmount(unscaled);\n return {scaled, unscaled, decimals, formatted};\n};\n\nexport const wrapAmountUnscaled = (\n unscaled: Big | number | string,\n decimals: number,\n): Amount => {\n unscaled = Big(unscaled);\n const scaled = scaleAmount(unscaled, decimals);\n const formatted = formatAmount(unscaled);\n return {scaled, unscaled, decimals, formatted};\n};\n\nexport const wrapPrice = (\n scaled: bigint,\n decimals0: number,\n decimals1: number,\n): Amount => {\n const unscaled = unscalePrice(scaled, decimals0, decimals1);\n const formatted = formatAmount(unscaled);\n return {scaled, unscaled, decimals: 36 + decimals1 - decimals0, formatted};\n};\n\nexport const wrapPriceUnscaled = (\n unscaled: Big | number | string,\n decimals0: number,\n decimals1: number,\n): Amount => {\n unscaled = Big(unscaled);\n const scaled = scalePrice(unscaled, decimals0, decimals1);\n const formatted = formatAmount(unscaled);\n return {scaled, unscaled, decimals: 36 + decimals1 - decimals0, formatted};\n};\n\nexport const unscaleAmount = (scaled: bigint, decimals: number) => {\n return new Big(scaled.toString()).div(new Big(10).pow(decimals));\n};\n\nexport const scaleAmount = (\n unscaled: Big | number | string,\n decimals: number,\n) => {\n return BigInt(\n Big(unscaled).mul(new Big(10).pow(decimals)).round().toFixed(0),\n );\n};\n\nexport const unscalePrice = (\n scaled: bigint,\n decimals0: number,\n decimals1: number,\n precision = 18,\n) => {\n return new Big(scaled.toString())\n .mul(new Big(10).pow(decimals0))\n .div(new Big(10).pow(decimals1))\n .div(new Big(10).pow(precision));\n};\n\nexport const scalePrice = (\n unscaled: Big | number | string,\n decimals0: number,\n decimals1: number,\n precision = 18,\n) => {\n return BigInt(\n Big(unscaled)\n .mul(new Big(10).pow(precision))\n .mul(new Big(10).pow(decimals1))\n .div(new Big(10).pow(decimals0))\n .round()\n .toFixed(0),\n );\n};\n\nexport const formatAmount = (value?: Big | number | string) => {\n if (value === undefined) return '-';\n // return value < 1 ? value.toPrecision(2) : value.toFixed(2);\n return formatCondensed(Big(value).toFixed(100));\n};\n\nexport const formatVagueAmount = (value: number | bigint) => {\n value = Number(value);\n if (value === 0) return '0';\n\n const formatted = value.toExponential(2);\n return formatted.replace(/\\.?0+e/, 'e').replace(/e\\+/, 'e');\n};\n\nexport const formatCondensed = (\n input: string | number,\n decimals = 2,\n): string => {\n const str = (typeof input === 'number' ? input.toFixed(20) : input)\n .replace(/(\\.\\d*?)0+$/, '$1')\n .replace(/\\.$/, '');\n\n const [whole, decimal] = str.split('.');\n\n const formattedWhole = whole.replace(/\\B(?=(\\d{3})+(?!\\d))/g, ',');\n if (!decimal) return formattedWhole;\n\n const leadingZeroMatch = decimal.match(/^(0{3,})/);\n\n if (leadingZeroMatch) {\n const zeroCount = leadingZeroMatch[1].length;\n const subscript = toSubscript(zeroCount.toString());\n const remaining = decimal.slice(zeroCount);\n\n const twoDigits = remaining.slice(0, decimals);\n return `${formattedWhole}.0${subscript}${twoDigits}`;\n } else {\n // No subscript needed, find first 2 significant digits\n const nonZeroStart = decimal.search(/[1-9]/); // Find first non-zero digit\n\n if (nonZeroStart === -1) {\n return formattedWhole; // All zeros\n }\n const significantPart = decimal.slice(nonZeroStart);\n const twoDigits = significantPart.slice(0, decimals);\n const leadingZeros = decimal.slice(0, nonZeroStart);\n\n return `${formattedWhole}.${leadingZeros}${twoDigits}`;\n }\n};\n\nconst toSubscript = (input: string) => {\n return input.replace(/[0-9]/g, m => '₀₁₂₃₄₅₆₇₈₉'[+m]);\n};\n\nexport const formatUSD = (value: Big | string | number): string => {\n return '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UAAU,IAAI,CAAC,QAAQ,OAAO,IAAI;;AAG7D,MAAa,mBACX,OACA,WAAW,MACA;CAKX,MAAM,CAAC,OAAO,YAJD,OAAO,UAAU,WAAW,MAAM,QAAQ,GAAG,GAAG,OAC1D,QAAQ,eAAe,KAAK,CAC5B,QAAQ,OAAO,GAAG,CAEQ,MAAM,IAAI;CAEvC,MAAM,iBAAiB,MAAM,QAAQ,yBAAyB,IAAI;AAClE,KAAI,CAAC,QAAS,QAAO;CAErB,MAAM,mBAAmB,QAAQ,MAAM,WAAW;AAElD,KAAI,kBAAkB;EACpB,MAAM,YAAY,iBAAiB,GAAG;AAKtC,SAAO,GAAG,eAAe,IAJP,YAAY,UAAU,UAAU,CAAC,GACjC,QAAQ,MAAM,UAAU,CAEd,MAAM,GAAG,SAAS;QAEzC;EAEL,MAAM,eAAe,QAAQ,OAAO,QAAQ;AAE5C,MAAI,iBAAiB,GACnB,QAAO;EAGT,MAAM,YADkB,QAAQ,MAAM,aAAa,CACjB,MAAM,GAAG,SAAS;AAGpD,SAAO,GAAG,eAAe,GAFJ,QAAQ,MAAM,GAAG,aAAa,GAER;;;AAI/C,MAAM,eAAe,UAAkB;AACrC,QAAO,MAAM,QAAQ,WAAU,MAAK,aAAa,CAAC,GAAG;;AAGvD,MAAa,aAAa,UAAyC;AACjE,QAAO,MAAM,aAAa,MAAM"}
@@ -376,21 +376,11 @@ const lensAbi = [
376
376
  type: "uint256",
377
377
  internalType: "uint256"
378
378
  },
379
- {
380
- name: "premiumPaid",
381
- type: "uint128",
382
- internalType: "uint128"
383
- },
384
379
  {
385
380
  name: "expiresAt",
386
381
  type: "uint64",
387
382
  internalType: "uint64"
388
383
  },
389
- {
390
- name: "createdAt",
391
- type: "uint64",
392
- internalType: "uint64"
393
- },
394
384
  {
395
385
  name: "liquidities",
396
386
  type: "uint128[]",
@@ -652,21 +642,11 @@ const lensAbi = [
652
642
  type: "uint256",
653
643
  internalType: "uint256"
654
644
  },
655
- {
656
- name: "premiumPaid",
657
- type: "uint128",
658
- internalType: "uint128"
659
- },
660
645
  {
661
646
  name: "expiresAt",
662
647
  type: "uint64",
663
648
  internalType: "uint64"
664
649
  },
665
- {
666
- name: "createdAt",
667
- type: "uint64",
668
- internalType: "uint64"
669
- },
670
650
  {
671
651
  name: "liquidities",
672
652
  type: "uint128[]",
@@ -763,21 +743,11 @@ const lensAbi = [
763
743
  type: "uint256",
764
744
  internalType: "uint256"
765
745
  },
766
- {
767
- name: "premiumPaid",
768
- type: "uint128",
769
- internalType: "uint128"
770
- },
771
746
  {
772
747
  name: "expiresAt",
773
748
  type: "uint64",
774
749
  internalType: "uint64"
775
750
  },
776
- {
777
- name: "createdAt",
778
- type: "uint64",
779
- internalType: "uint64"
780
- },
781
751
  {
782
752
  name: "liquidities",
783
753
  type: "uint128[]",
@@ -974,21 +944,11 @@ const lensAbi = [
974
944
  type: "uint256",
975
945
  internalType: "uint256"
976
946
  },
977
- {
978
- name: "premiumPaid",
979
- type: "uint128",
980
- internalType: "uint128"
981
- },
982
947
  {
983
948
  name: "expiresAt",
984
949
  type: "uint64",
985
950
  internalType: "uint64"
986
951
  },
987
- {
988
- name: "createdAt",
989
- type: "uint64",
990
- internalType: "uint64"
991
- },
992
952
  {
993
953
  name: "liquidities",
994
954
  type: "uint128[]",
@@ -2696,4 +2656,4 @@ const optionsMarketAbi = [
2696
2656
 
2697
2657
  //#endregion
2698
2658
  export { erc20Abi as i, uniswapMathLensAbi as n, lensAbi as r, optionsMarketAbi as t };
2699
- //# sourceMappingURL=optionsMarket-CvArD6d_.js.map
2659
+ //# sourceMappingURL=optionsMarket-BDBU1gUS.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"optionsMarket-BDBU1gUS.js","names":[],"sources":["../src/abis/erc20.ts","../src/abis/lens.ts","../src/abis/uniswapMathLens.ts","../src/abis/optionsMarket.ts"],"sourcesContent":["export const erc20Abi = [\n {\n type: 'constructor',\n inputs: [\n {name: 'name_', type: 'string', internalType: 'string'},\n {name: 'symbol_', type: 'string', internalType: 'string'},\n ],\n stateMutability: 'nonpayable',\n },\n {\n type: 'function',\n name: 'allowance',\n inputs: [\n {name: 'owner', type: 'address', internalType: 'address'},\n {name: 'spender', type: 'address', internalType: 'address'},\n ],\n outputs: [{name: '', type: 'uint256', internalType: 'uint256'}],\n stateMutability: 'view',\n },\n {\n type: 'function',\n name: 'approve',\n inputs: [\n {name: 'spender', type: 'address', internalType: 'address'},\n {name: 'amount', type: 'uint256', internalType: 'uint256'},\n ],\n outputs: [{name: '', type: 'bool', internalType: 'bool'}],\n stateMutability: 'nonpayable',\n },\n {\n type: 'function',\n name: 'balanceOf',\n inputs: [{name: 'account', type: 'address', internalType: 'address'}],\n outputs: [{name: '', type: 'uint256', internalType: 'uint256'}],\n stateMutability: 'view',\n },\n {\n type: 'function',\n name: 'decimals',\n inputs: [],\n outputs: [{name: '', type: 'uint8', internalType: 'uint8'}],\n stateMutability: 'view',\n },\n {\n type: 'function',\n name: 'decreaseAllowance',\n inputs: [\n {name: 'spender', type: 'address', internalType: 'address'},\n {\n name: 'subtractedValue',\n type: 'uint256',\n internalType: 'uint256',\n },\n ],\n outputs: [{name: '', type: 'bool', internalType: 'bool'}],\n stateMutability: 'nonpayable',\n },\n {\n type: 'function',\n name: 'increaseAllowance',\n inputs: [\n {name: 'spender', type: 'address', internalType: 'address'},\n {name: 'addedValue', type: 'uint256', internalType: 'uint256'},\n ],\n outputs: [{name: '', type: 'bool', internalType: 'bool'}],\n stateMutability: 'nonpayable',\n },\n {\n type: 'function',\n name: 'name',\n inputs: [],\n outputs: [{name: '', type: 'string', internalType: 'string'}],\n stateMutability: 'view',\n },\n {\n type: 'function',\n name: 'symbol',\n inputs: [],\n outputs: [{name: '', type: 'string', internalType: 'string'}],\n stateMutability: 'view',\n },\n {\n type: 'function',\n name: 'totalSupply',\n inputs: [],\n outputs: [{name: '', type: 'uint256', internalType: 'uint256'}],\n stateMutability: 'view',\n },\n {\n type: 'function',\n name: 'transfer',\n inputs: [\n {name: 'to', type: 'address', internalType: 'address'},\n {name: 'amount', type: 'uint256', internalType: 'uint256'},\n ],\n outputs: [{name: '', type: 'bool', internalType: 'bool'}],\n stateMutability: 'nonpayable',\n },\n {\n type: 'function',\n name: 'transferFrom',\n inputs: [\n {name: 'from', type: 'address', internalType: 'address'},\n {name: 'to', type: 'address', internalType: 'address'},\n {name: 'amount', type: 'uint256', internalType: 'uint256'},\n ],\n outputs: [{name: '', type: 'bool', internalType: 'bool'}],\n stateMutability: 'nonpayable',\n },\n] as const;\n","export const lensAbi = [\n {\n type: 'function',\n name: 'batchGetRefTick',\n inputs: [\n {\n name: 'vault',\n type: 'address',\n internalType: 'contract TimelockSingleOwnerVault',\n },\n {name: 'tickLower', type: 'int24[]', internalType: 'int24[]'},\n ],\n outputs: [{name: 'refTicks', type: 'int24[]', internalType: 'int24[]'}],\n stateMutability: 'view',\n },\n {\n type: 'function',\n name: 'getAllBlocks',\n inputs: [\n {\n name: 'vault',\n type: 'address',\n internalType: 'contract TimelockVaultCore',\n },\n ],\n outputs: [\n {\n name: 'blocks',\n type: 'tuple[]',\n internalType: 'struct TimelockLens.LiquidityBlockData[]',\n components: [\n {name: 'tickLower', type: 'int24', internalType: 'int24'},\n {name: 'tickUpper', type: 'int24', internalType: 'int24'},\n {\n name: 'prevTickLower',\n type: 'int24',\n internalType: 'int24',\n },\n {\n name: 'totalLiquidity',\n type: 'uint128',\n internalType: 'uint128',\n },\n {\n name: 'borrowedLiquidity',\n type: 'uint128',\n internalType: 'uint128',\n },\n {\n name: 'totalAmount0',\n type: 'uint256',\n internalType: 'uint256',\n },\n {\n name: 'totalAmount1',\n type: 'uint256',\n internalType: 'uint256',\n },\n {\n name: 'borrowedAmount0',\n type: 'uint256',\n internalType: 'uint256',\n },\n {\n name: 'borrowedAmount1',\n type: 'uint256',\n internalType: 'uint256',\n },\n ],\n },\n ],\n stateMutability: 'view',\n },\n {\n type: 'function',\n name: 'getExpiredOptions',\n inputs: [\n {\n name: 'market',\n type: 'address',\n internalType: 'contract TimelockOptionsMarket',\n },\n {name: 'startId', type: 'uint256', internalType: 'uint256'},\n {name: 'limit', type: 'uint256', internalType: 'uint256'},\n ],\n outputs: [\n {\n name: 'expiredOptions',\n type: 'tuple[]',\n internalType: 'struct TimelockLens.OptionData[]',\n components: [\n {\n name: 'optionId',\n type: 'uint256',\n internalType: 'uint256',\n },\n {name: 'owner', type: 'address', internalType: 'address'},\n {name: 'optionType', type: 'uint8', internalType: 'uint8'},\n {name: 'leftTick', type: 'int24', internalType: 'int24'},\n {name: 'strikeTick', type: 'int24', internalType: 'int24'},\n {name: 'entryTick', type: 'int24', internalType: 'int24'},\n {\n name: 'strikePrice',\n type: 'uint256',\n internalType: 'uint256',\n },\n {\n name: 'entryPrice',\n type: 'uint256',\n internalType: 'uint256',\n },\n {\n name: 'optionAssetBorrowed',\n type: 'uint256',\n internalType: 'uint256',\n },\n {\n name: 'payoutAssetBorrowed',\n type: 'uint256',\n internalType: 'uint256',\n },\n {\n name: 'optionAssetToRepay',\n type: 'uint256',\n internalType: 'uint256',\n },\n {\n name: 'payoutAssetToRepay',\n type: 'uint256',\n internalType: 'uint256',\n },\n {\n name: 'positionSize',\n type: 'uint256',\n internalType: 'uint256',\n },\n {\n name: 'netOptionAssetToRepay',\n type: 'uint256',\n internalType: 'uint256',\n },\n {name: 'expiresAt', type: 'uint64', internalType: 'uint64'},\n {\n name: 'liquidities',\n type: 'uint128[]',\n internalType: 'uint128[]',\n },\n ],\n },\n {name: 'nextStartId', type: 'uint256', internalType: 'uint256'},\n {name: 'hasMore', type: 'bool', internalType: 'bool'},\n ],\n stateMutability: 'view',\n },\n {\n type: 'function',\n name: 'getLiquidityAtTick',\n inputs: [\n {\n name: 'vault',\n type: 'address',\n internalType: 'contract TimelockSingleOwnerVault',\n },\n {name: 'tickLower', type: 'int24', internalType: 'int24'},\n ],\n outputs: [\n {\n name: 'totalLiquidity',\n type: 'uint128',\n internalType: 'uint128',\n },\n {\n name: 'borrowedLiquidity',\n type: 'uint128',\n internalType: 'uint128',\n },\n ],\n stateMutability: 'view',\n },\n {\n type: 'function',\n name: 'getMarketData',\n inputs: [\n {\n name: 'market',\n type: 'address',\n internalType: 'contract TimelockOptionsMarket',\n },\n ],\n outputs: [\n {\n name: 'marketData',\n type: 'tuple',\n internalType: 'struct TimelockLens.TimelockMarketData',\n components: [\n {\n name: 'optionAssetIsToken0',\n type: 'bool',\n internalType: 'bool',\n },\n {\n name: 'vault',\n type: 'address',\n internalType: 'contract ITimelockVault',\n },\n {\n name: 'pool',\n type: 'address',\n internalType: 'contract IUniswapV3Pool',\n },\n {\n name: 'optionAsset',\n type: 'address',\n internalType: 'address',\n },\n {\n name: 'payoutAsset',\n type: 'address',\n internalType: 'address',\n },\n {\n name: 'optionAssetDecimals',\n type: 'uint8',\n internalType: 'uint8',\n },\n {\n name: 'payoutAssetDecimals',\n type: 'uint8',\n internalType: 'uint8',\n },\n {\n name: 'optionAssetSymbol',\n type: 'string',\n internalType: 'string',\n },\n {\n name: 'payoutAssetSymbol',\n type: 'string',\n internalType: 'string',\n },\n {\n name: 'optionAssetName',\n type: 'string',\n internalType: 'string',\n },\n {\n name: 'payoutAssetName',\n type: 'string',\n internalType: 'string',\n },\n {\n name: 'optionsCount',\n type: 'uint256',\n internalType: 'uint256',\n },\n ],\n },\n ],\n stateMutability: 'view',\n },\n {\n type: 'function',\n name: 'getMaxPositionSize',\n inputs: [\n {\n name: 'market',\n type: 'address',\n internalType: 'contract TimelockOptionsMarket',\n },\n {name: 'strikeTick', type: 'int24', internalType: 'int24'},\n {\n name: 'maxBorrowableRange',\n type: 'int24',\n internalType: 'int24',\n },\n ],\n outputs: [\n {name: 'maxCallSize', type: 'uint256', internalType: 'uint256'},\n {name: 'maxPutSize', type: 'uint256', internalType: 'uint256'},\n ],\n stateMutability: 'view',\n },\n {\n type: 'function',\n name: 'getMaxPositionSizeAtCurrentTick',\n inputs: [\n {\n name: 'market',\n type: 'address',\n internalType: 'contract TimelockOptionsMarket',\n },\n {\n name: 'maxBorrowableRange',\n type: 'int24',\n internalType: 'int24',\n },\n ],\n outputs: [\n {name: 'maxCallSize', type: 'uint256', internalType: 'uint256'},\n {name: 'maxPutSize', type: 'uint256', internalType: 'uint256'},\n ],\n stateMutability: 'view',\n },\n {\n type: 'function',\n name: 'getOptionData',\n inputs: [\n {\n name: 'market',\n type: 'address',\n internalType: 'contract TimelockOptionsMarket',\n },\n {name: 'optionId', type: 'uint256', internalType: 'uint256'},\n ],\n outputs: [\n {\n name: '',\n type: 'tuple',\n internalType: 'struct TimelockLens.OptionData',\n components: [\n {\n name: 'optionId',\n type: 'uint256',\n internalType: 'uint256',\n },\n {name: 'owner', type: 'address', internalType: 'address'},\n {name: 'optionType', type: 'uint8', internalType: 'uint8'},\n {name: 'leftTick', type: 'int24', internalType: 'int24'},\n {name: 'strikeTick', type: 'int24', internalType: 'int24'},\n {name: 'entryTick', type: 'int24', internalType: 'int24'},\n {\n name: 'strikePrice',\n type: 'uint256',\n internalType: 'uint256',\n },\n {\n name: 'entryPrice',\n type: 'uint256',\n internalType: 'uint256',\n },\n {\n name: 'optionAssetBorrowed',\n type: 'uint256',\n internalType: 'uint256',\n },\n {\n name: 'payoutAssetBorrowed',\n type: 'uint256',\n internalType: 'uint256',\n },\n {\n name: 'optionAssetToRepay',\n type: 'uint256',\n internalType: 'uint256',\n },\n {\n name: 'payoutAssetToRepay',\n type: 'uint256',\n internalType: 'uint256',\n },\n {\n name: 'positionSize',\n type: 'uint256',\n internalType: 'uint256',\n },\n {\n name: 'netOptionAssetToRepay',\n type: 'uint256',\n internalType: 'uint256',\n },\n {name: 'expiresAt', type: 'uint64', internalType: 'uint64'},\n {\n name: 'liquidities',\n type: 'uint128[]',\n internalType: 'uint128[]',\n },\n ],\n },\n ],\n stateMutability: 'view',\n },\n {\n type: 'function',\n name: 'getOptionsData',\n inputs: [\n {\n name: 'market',\n type: 'address',\n internalType: 'contract TimelockOptionsMarket',\n },\n {\n name: 'optionIds',\n type: 'uint256[]',\n internalType: 'uint256[]',\n },\n ],\n outputs: [\n {\n name: 'optionsData',\n type: 'tuple[]',\n internalType: 'struct TimelockLens.OptionData[]',\n components: [\n {\n name: 'optionId',\n type: 'uint256',\n internalType: 'uint256',\n },\n {name: 'owner', type: 'address', internalType: 'address'},\n {name: 'optionType', type: 'uint8', internalType: 'uint8'},\n {name: 'leftTick', type: 'int24', internalType: 'int24'},\n {name: 'strikeTick', type: 'int24', internalType: 'int24'},\n {name: 'entryTick', type: 'int24', internalType: 'int24'},\n {\n name: 'strikePrice',\n type: 'uint256',\n internalType: 'uint256',\n },\n {\n name: 'entryPrice',\n type: 'uint256',\n internalType: 'uint256',\n },\n {\n name: 'optionAssetBorrowed',\n type: 'uint256',\n internalType: 'uint256',\n },\n {\n name: 'payoutAssetBorrowed',\n type: 'uint256',\n internalType: 'uint256',\n },\n {\n name: 'optionAssetToRepay',\n type: 'uint256',\n internalType: 'uint256',\n },\n {\n name: 'payoutAssetToRepay',\n type: 'uint256',\n internalType: 'uint256',\n },\n {\n name: 'positionSize',\n type: 'uint256',\n internalType: 'uint256',\n },\n {\n name: 'netOptionAssetToRepay',\n type: 'uint256',\n internalType: 'uint256',\n },\n {name: 'expiresAt', type: 'uint64', internalType: 'uint64'},\n {\n name: 'liquidities',\n type: 'uint128[]',\n internalType: 'uint128[]',\n },\n ],\n },\n ],\n stateMutability: 'view',\n },\n {\n type: 'function',\n name: 'getPoolData',\n inputs: [\n {\n name: 'pool',\n type: 'address',\n internalType: 'contract IUniswapV3Pool',\n },\n ],\n outputs: [\n {\n name: 'poolData',\n type: 'tuple',\n internalType: 'struct TimelockLens.UniswapPoolData',\n components: [\n {name: 'token0', type: 'address', internalType: 'address'},\n {name: 'token1', type: 'address', internalType: 'address'},\n {\n name: 'token0Decimals',\n type: 'uint8',\n internalType: 'uint8',\n },\n {\n name: 'token1Decimals',\n type: 'uint8',\n internalType: 'uint8',\n },\n {\n name: 'token0Symbol',\n type: 'string',\n internalType: 'string',\n },\n {\n name: 'token1Symbol',\n type: 'string',\n internalType: 'string',\n },\n {\n name: 'token0Name',\n type: 'string',\n internalType: 'string',\n },\n {\n name: 'token1Name',\n type: 'string',\n internalType: 'string',\n },\n {name: 'tickSpacing', type: 'int24', internalType: 'int24'},\n {name: 'fee', type: 'uint24', internalType: 'uint24'},\n ],\n },\n ],\n stateMutability: 'view',\n },\n {\n type: 'function',\n name: 'getRefTick',\n inputs: [\n {\n name: 'vault',\n type: 'address',\n internalType: 'contract TimelockSingleOwnerVault',\n },\n {name: 'tickLower', type: 'int24', internalType: 'int24'},\n ],\n outputs: [{name: 'refTick', type: 'int24', internalType: 'int24'}],\n stateMutability: 'view',\n },\n {\n type: 'function',\n name: 'getUserOptions',\n inputs: [\n {\n name: 'market',\n type: 'address',\n internalType: 'contract TimelockOptionsMarket',\n },\n {name: 'user', type: 'address', internalType: 'address'},\n {name: 'startId', type: 'uint256', internalType: 'uint256'},\n {name: 'limit', type: 'uint256', internalType: 'uint256'},\n ],\n outputs: [\n {\n name: 'userOptions',\n type: 'tuple[]',\n internalType: 'struct TimelockLens.OptionData[]',\n components: [\n {\n name: 'optionId',\n type: 'uint256',\n internalType: 'uint256',\n },\n {name: 'owner', type: 'address', internalType: 'address'},\n {name: 'optionType', type: 'uint8', internalType: 'uint8'},\n {name: 'leftTick', type: 'int24', internalType: 'int24'},\n {name: 'strikeTick', type: 'int24', internalType: 'int24'},\n {name: 'entryTick', type: 'int24', internalType: 'int24'},\n {\n name: 'strikePrice',\n type: 'uint256',\n internalType: 'uint256',\n },\n {\n name: 'entryPrice',\n type: 'uint256',\n internalType: 'uint256',\n },\n {\n name: 'optionAssetBorrowed',\n type: 'uint256',\n internalType: 'uint256',\n },\n {\n name: 'payoutAssetBorrowed',\n type: 'uint256',\n internalType: 'uint256',\n },\n {\n name: 'optionAssetToRepay',\n type: 'uint256',\n internalType: 'uint256',\n },\n {\n name: 'payoutAssetToRepay',\n type: 'uint256',\n internalType: 'uint256',\n },\n {\n name: 'positionSize',\n type: 'uint256',\n internalType: 'uint256',\n },\n {\n name: 'netOptionAssetToRepay',\n type: 'uint256',\n internalType: 'uint256',\n },\n {name: 'expiresAt', type: 'uint64', internalType: 'uint64'},\n {\n name: 'liquidities',\n type: 'uint128[]',\n internalType: 'uint128[]',\n },\n ],\n },\n {name: 'nextStartId', type: 'uint256', internalType: 'uint256'},\n {name: 'hasMore', type: 'bool', internalType: 'bool'},\n ],\n stateMutability: 'view',\n },\n {\n type: 'function',\n name: 'getVaultTVL',\n inputs: [\n {\n name: 'vault',\n type: 'address',\n internalType: 'contract TimelockVaultCore',\n },\n ],\n outputs: [\n {\n name: 'totalAmount0',\n type: 'uint256',\n internalType: 'uint256',\n },\n {\n name: 'totalAmount1',\n type: 'uint256',\n internalType: 'uint256',\n },\n {\n name: 'borrowedAmount0',\n type: 'uint256',\n internalType: 'uint256',\n },\n {\n name: 'borrowedAmount1',\n type: 'uint256',\n internalType: 'uint256',\n },\n {name: 'tvl0', type: 'uint256', internalType: 'uint256'},\n {name: 'tvl1', type: 'uint256', internalType: 'uint256'},\n {name: 'blocksCount', type: 'uint256', internalType: 'uint256'},\n ],\n stateMutability: 'view',\n },\n] as const;\n","export const uniswapMathLensAbi = [\n {\n type: 'function',\n name: 'batchGetAmount0ForLiquidity',\n inputs: [\n {\n name: 'sqrtRatioAX96',\n type: 'uint160[]',\n internalType: 'uint160[]',\n },\n {\n name: 'sqrtRatioBX96',\n type: 'uint160[]',\n internalType: 'uint160[]',\n },\n {\n name: 'liquidity',\n type: 'uint128[]',\n internalType: 'uint128[]',\n },\n ],\n outputs: [{name: 'amounts0', type: 'uint256[]', internalType: 'uint256[]'}],\n stateMutability: 'pure',\n },\n {\n type: 'function',\n name: 'batchGetAmount0ForLiquidityTicks',\n inputs: [\n {name: 'tickA', type: 'int24[]', internalType: 'int24[]'},\n {name: 'tickB', type: 'int24[]', internalType: 'int24[]'},\n {\n name: 'liquidity',\n type: 'uint128[]',\n internalType: 'uint128[]',\n },\n ],\n outputs: [{name: 'amounts0', type: 'uint256[]', internalType: 'uint256[]'}],\n stateMutability: 'pure',\n },\n {\n type: 'function',\n name: 'batchGetAmount1ForLiquidity',\n inputs: [\n {\n name: 'sqrtRatioAX96',\n type: 'uint160[]',\n internalType: 'uint160[]',\n },\n {\n name: 'sqrtRatioBX96',\n type: 'uint160[]',\n internalType: 'uint160[]',\n },\n {\n name: 'liquidity',\n type: 'uint128[]',\n internalType: 'uint128[]',\n },\n ],\n outputs: [{name: 'amounts1', type: 'uint256[]', internalType: 'uint256[]'}],\n stateMutability: 'pure',\n },\n {\n type: 'function',\n name: 'batchGetAmount1ForLiquidityTicks',\n inputs: [\n {name: 'tickA', type: 'int24[]', internalType: 'int24[]'},\n {name: 'tickB', type: 'int24[]', internalType: 'int24[]'},\n {\n name: 'liquidity',\n type: 'uint128[]',\n internalType: 'uint128[]',\n },\n ],\n outputs: [{name: 'amounts1', type: 'uint256[]', internalType: 'uint256[]'}],\n stateMutability: 'pure',\n },\n {\n type: 'function',\n name: 'batchGetAmountsForLiquidity',\n inputs: [\n {\n name: 'sqrtRatioX96',\n type: 'uint160[]',\n internalType: 'uint160[]',\n },\n {\n name: 'sqrtRatioAX96',\n type: 'uint160[]',\n internalType: 'uint160[]',\n },\n {\n name: 'sqrtRatioBX96',\n type: 'uint160[]',\n internalType: 'uint160[]',\n },\n {\n name: 'liquidity',\n type: 'uint128[]',\n internalType: 'uint128[]',\n },\n ],\n outputs: [\n {\n name: 'amounts0',\n type: 'uint256[]',\n internalType: 'uint256[]',\n },\n {name: 'amounts1', type: 'uint256[]', internalType: 'uint256[]'},\n ],\n stateMutability: 'pure',\n },\n {\n type: 'function',\n name: 'batchGetAmountsForLiquidityTicks',\n inputs: [\n {name: 'tick', type: 'int24[]', internalType: 'int24[]'},\n {name: 'tickA', type: 'int24[]', internalType: 'int24[]'},\n {name: 'tickB', type: 'int24[]', internalType: 'int24[]'},\n {\n name: 'liquidity',\n type: 'uint128[]',\n internalType: 'uint128[]',\n },\n ],\n outputs: [\n {\n name: 'amounts0',\n type: 'uint256[]',\n internalType: 'uint256[]',\n },\n {name: 'amounts1', type: 'uint256[]', internalType: 'uint256[]'},\n ],\n stateMutability: 'pure',\n },\n {\n type: 'function',\n name: 'batchGetLiquidityForAmount0',\n inputs: [\n {\n name: 'sqrtRatioAX96',\n type: 'uint160[]',\n internalType: 'uint160[]',\n },\n {\n name: 'sqrtRatioBX96',\n type: 'uint160[]',\n internalType: 'uint160[]',\n },\n {name: 'amount0', type: 'uint256[]', internalType: 'uint256[]'},\n ],\n outputs: [\n {\n name: 'liquidities',\n type: 'uint128[]',\n internalType: 'uint128[]',\n },\n ],\n stateMutability: 'pure',\n },\n {\n type: 'function',\n name: 'batchGetLiquidityForAmount0Ticks',\n inputs: [\n {name: 'tickA', type: 'int24[]', internalType: 'int24[]'},\n {name: 'tickB', type: 'int24[]', internalType: 'int24[]'},\n {name: 'amount0', type: 'uint256[]', internalType: 'uint256[]'},\n ],\n outputs: [\n {\n name: 'liquidities',\n type: 'uint128[]',\n internalType: 'uint128[]',\n },\n ],\n stateMutability: 'pure',\n },\n {\n type: 'function',\n name: 'batchGetLiquidityForAmount1',\n inputs: [\n {\n name: 'sqrtRatioAX96',\n type: 'uint160[]',\n internalType: 'uint160[]',\n },\n {\n name: 'sqrtRatioBX96',\n type: 'uint160[]',\n internalType: 'uint160[]',\n },\n {name: 'amount1', type: 'uint256[]', internalType: 'uint256[]'},\n ],\n outputs: [\n {\n name: 'liquidities',\n type: 'uint128[]',\n internalType: 'uint128[]',\n },\n ],\n stateMutability: 'pure',\n },\n {\n type: 'function',\n name: 'batchGetLiquidityForAmount1Ticks',\n inputs: [\n {name: 'tickA', type: 'int24[]', internalType: 'int24[]'},\n {name: 'tickB', type: 'int24[]', internalType: 'int24[]'},\n {name: 'amount1', type: 'uint256[]', internalType: 'uint256[]'},\n ],\n outputs: [\n {\n name: 'liquidities',\n type: 'uint128[]',\n internalType: 'uint128[]',\n },\n ],\n stateMutability: 'pure',\n },\n {\n type: 'function',\n name: 'batchGetLiquidityForAmounts',\n inputs: [\n {\n name: 'sqrtRatioX96',\n type: 'uint160[]',\n internalType: 'uint160[]',\n },\n {\n name: 'sqrtRatioAX96',\n type: 'uint160[]',\n internalType: 'uint160[]',\n },\n {\n name: 'sqrtRatioBX96',\n type: 'uint160[]',\n internalType: 'uint160[]',\n },\n {name: 'amount0', type: 'uint256[]', internalType: 'uint256[]'},\n {name: 'amount1', type: 'uint256[]', internalType: 'uint256[]'},\n ],\n outputs: [\n {\n name: 'liquidities',\n type: 'uint128[]',\n internalType: 'uint128[]',\n },\n ],\n stateMutability: 'pure',\n },\n {\n type: 'function',\n name: 'batchGetLiquidityForAmountsTicks',\n inputs: [\n {name: 'tick', type: 'int24[]', internalType: 'int24[]'},\n {name: 'tickA', type: 'int24[]', internalType: 'int24[]'},\n {name: 'tickB', type: 'int24[]', internalType: 'int24[]'},\n {name: 'amount0', type: 'uint256[]', internalType: 'uint256[]'},\n {name: 'amount1', type: 'uint256[]', internalType: 'uint256[]'},\n ],\n outputs: [\n {\n name: 'liquidities',\n type: 'uint128[]',\n internalType: 'uint128[]',\n },\n ],\n stateMutability: 'pure',\n },\n {\n type: 'function',\n name: 'batchGetPriceAtTick',\n inputs: [{name: 'ticks', type: 'int24[]', internalType: 'int24[]'}],\n outputs: [{name: 'prices', type: 'uint256[]', internalType: 'uint256[]'}],\n stateMutability: 'pure',\n },\n {\n type: 'function',\n name: 'getAmount0ForLiquidity',\n inputs: [\n {\n name: 'sqrtRatioAX96',\n type: 'uint160',\n internalType: 'uint160',\n },\n {\n name: 'sqrtRatioBX96',\n type: 'uint160',\n internalType: 'uint160',\n },\n {name: 'liquidity', type: 'uint128', internalType: 'uint128'},\n ],\n outputs: [{name: 'amount0', type: 'uint256', internalType: 'uint256'}],\n stateMutability: 'pure',\n },\n {\n type: 'function',\n name: 'getAmount0ForLiquidityTicks',\n inputs: [\n {name: 'tickA', type: 'int24', internalType: 'int24'},\n {name: 'tickB', type: 'int24', internalType: 'int24'},\n {name: 'liquidity', type: 'uint128', internalType: 'uint128'},\n ],\n outputs: [{name: 'amount0', type: 'uint256', internalType: 'uint256'}],\n stateMutability: 'pure',\n },\n {\n type: 'function',\n name: 'getAmount1ForLiquidity',\n inputs: [\n {\n name: 'sqrtRatioAX96',\n type: 'uint160',\n internalType: 'uint160',\n },\n {\n name: 'sqrtRatioBX96',\n type: 'uint160',\n internalType: 'uint160',\n },\n {name: 'liquidity', type: 'uint128', internalType: 'uint128'},\n ],\n outputs: [{name: 'amount1', type: 'uint256', internalType: 'uint256'}],\n stateMutability: 'pure',\n },\n {\n type: 'function',\n name: 'getAmount1ForLiquidityTicks',\n inputs: [\n {name: 'tickA', type: 'int24', internalType: 'int24'},\n {name: 'tickB', type: 'int24', internalType: 'int24'},\n {name: 'liquidity', type: 'uint128', internalType: 'uint128'},\n ],\n outputs: [{name: 'amount1', type: 'uint256', internalType: 'uint256'}],\n stateMutability: 'pure',\n },\n {\n type: 'function',\n name: 'getAmountsForLiquidity',\n inputs: [\n {\n name: 'sqrtRatioX96',\n type: 'uint160',\n internalType: 'uint160',\n },\n {\n name: 'sqrtRatioAX96',\n type: 'uint160',\n internalType: 'uint160',\n },\n {\n name: 'sqrtRatioBX96',\n type: 'uint160',\n internalType: 'uint160',\n },\n {name: 'liquidity', type: 'uint128', internalType: 'uint128'},\n ],\n outputs: [\n {name: 'amount0', type: 'uint256', internalType: 'uint256'},\n {name: 'amount1', type: 'uint256', internalType: 'uint256'},\n ],\n stateMutability: 'pure',\n },\n {\n type: 'function',\n name: 'getAmountsForLiquidityTicks',\n inputs: [\n {name: 'tick', type: 'int24', internalType: 'int24'},\n {name: 'tickA', type: 'int24', internalType: 'int24'},\n {name: 'tickB', type: 'int24', internalType: 'int24'},\n {name: 'liquidity', type: 'uint128', internalType: 'uint128'},\n ],\n outputs: [\n {name: 'amount0', type: 'uint256', internalType: 'uint256'},\n {name: 'amount1', type: 'uint256', internalType: 'uint256'},\n ],\n stateMutability: 'pure',\n },\n {\n type: 'function',\n name: 'getLiquidityForAmount0',\n inputs: [\n {\n name: 'sqrtRatioAX96',\n type: 'uint160',\n internalType: 'uint160',\n },\n {\n name: 'sqrtRatioBX96',\n type: 'uint160',\n internalType: 'uint160',\n },\n {name: 'amount0', type: 'uint256', internalType: 'uint256'},\n ],\n outputs: [{name: 'liquidity', type: 'uint128', internalType: 'uint128'}],\n stateMutability: 'pure',\n },\n {\n type: 'function',\n name: 'getLiquidityForAmount0Ticks',\n inputs: [\n {name: 'tickA', type: 'int24', internalType: 'int24'},\n {name: 'tickB', type: 'int24', internalType: 'int24'},\n {name: 'amount0', type: 'uint256', internalType: 'uint256'},\n ],\n outputs: [{name: 'liquidity', type: 'uint128', internalType: 'uint128'}],\n stateMutability: 'pure',\n },\n {\n type: 'function',\n name: 'getLiquidityForAmount1',\n inputs: [\n {\n name: 'sqrtRatioAX96',\n type: 'uint160',\n internalType: 'uint160',\n },\n {\n name: 'sqrtRatioBX96',\n type: 'uint160',\n internalType: 'uint160',\n },\n {name: 'amount1', type: 'uint256', internalType: 'uint256'},\n ],\n outputs: [{name: 'liquidity', type: 'uint128', internalType: 'uint128'}],\n stateMutability: 'pure',\n },\n {\n type: 'function',\n name: 'getLiquidityForAmount1Ticks',\n inputs: [\n {name: 'tickA', type: 'int24', internalType: 'int24'},\n {name: 'tickB', type: 'int24', internalType: 'int24'},\n {name: 'amount1', type: 'uint256', internalType: 'uint256'},\n ],\n outputs: [{name: 'liquidity', type: 'uint128', internalType: 'uint128'}],\n stateMutability: 'pure',\n },\n {\n type: 'function',\n name: 'getLiquidityForAmounts',\n inputs: [\n {\n name: 'sqrtRatioX96',\n type: 'uint160',\n internalType: 'uint160',\n },\n {\n name: 'sqrtRatioAX96',\n type: 'uint160',\n internalType: 'uint160',\n },\n {\n name: 'sqrtRatioBX96',\n type: 'uint160',\n internalType: 'uint160',\n },\n {name: 'amount0', type: 'uint256', internalType: 'uint256'},\n {name: 'amount1', type: 'uint256', internalType: 'uint256'},\n ],\n outputs: [{name: 'liquidity', type: 'uint128', internalType: 'uint128'}],\n stateMutability: 'pure',\n },\n {\n type: 'function',\n name: 'getLiquidityForAmountsTicks',\n inputs: [\n {name: 'tick', type: 'int24', internalType: 'int24'},\n {name: 'tickA', type: 'int24', internalType: 'int24'},\n {name: 'tickB', type: 'int24', internalType: 'int24'},\n {name: 'amount0', type: 'uint256', internalType: 'uint256'},\n {name: 'amount1', type: 'uint256', internalType: 'uint256'},\n ],\n outputs: [{name: 'liquidity', type: 'uint128', internalType: 'uint128'}],\n stateMutability: 'pure',\n },\n {\n type: 'function',\n name: 'getPriceAtTick',\n inputs: [{name: 'tick', type: 'int24', internalType: 'int24'}],\n outputs: [{name: '', type: 'uint256', internalType: 'uint256'}],\n stateMutability: 'pure',\n },\n] as const;\n","export const optionsMarketAbi = [\n {\n type: 'constructor',\n inputs: [\n {\n name: '_vault',\n type: 'address',\n internalType: 'contract ITimelockVault',\n },\n {\n name: '_optionPricing',\n type: 'address',\n internalType: 'contract IOptionPricing',\n },\n {\n name: '_feeStrategy',\n type: 'address',\n internalType: 'contract IFeeStrategy',\n },\n {\n name: '_feeRecipient',\n type: 'address',\n internalType: 'address',\n },\n {\n name: '_guardian',\n type: 'address',\n internalType: 'contract TimelockGuardian',\n },\n {\n name: '_optionAssetIsToken0',\n type: 'bool',\n internalType: 'bool',\n },\n ],\n stateMutability: 'nonpayable',\n },\n {\n type: 'function',\n name: 'DUST_THRESHOLD',\n inputs: [],\n outputs: [{name: '', type: 'uint256', internalType: 'uint256'}],\n stateMutability: 'view',\n },\n {\n type: 'function',\n name: 'MAX_STEPS',\n inputs: [],\n outputs: [{name: '', type: 'uint256', internalType: 'uint256'}],\n stateMutability: 'view',\n },\n {\n type: 'function',\n name: 'calculatePremium',\n inputs: [\n {name: 'optionType', type: 'uint8', internalType: 'uint8'},\n {\n name: 'optionAmount',\n type: 'uint256',\n internalType: 'uint256',\n },\n {name: 'strikeTick', type: 'int24', internalType: 'int24'},\n {name: 'duration', type: 'uint32', internalType: 'uint32'},\n ],\n outputs: [\n {name: 'premium', type: 'uint256', internalType: 'uint256'},\n {name: 'protocolFee', type: 'uint256', internalType: 'uint256'},\n ],\n stateMutability: 'view',\n },\n {\n type: 'function',\n name: 'emergencyWithdraw',\n inputs: [\n {\n name: 'tokens',\n type: 'address[]',\n internalType: 'contract IERC20[]',\n },\n ],\n outputs: [],\n stateMutability: 'nonpayable',\n },\n {\n type: 'function',\n name: 'exerciseOption',\n inputs: [\n {name: 'optionId', type: 'uint256', internalType: 'uint256'},\n {\n name: 'liquidities',\n type: 'uint128[]',\n internalType: 'uint128[]',\n },\n {name: 'minPayout', type: 'uint256', internalType: 'uint256'},\n {\n name: 'swapper',\n type: 'address',\n internalType: 'contract ISwapper',\n },\n {name: 'swapperData', type: 'bytes', internalType: 'bytes'},\n {name: 'refTick', type: 'int24', internalType: 'int24'},\n ],\n outputs: [{name: 'payout', type: 'uint256', internalType: 'uint256'}],\n stateMutability: 'nonpayable',\n },\n {\n type: 'function',\n name: 'extendOption',\n inputs: [\n {name: 'optionId', type: 'uint256', internalType: 'uint256'},\n {name: 'duration', type: 'uint32', internalType: 'uint32'},\n {name: 'maxPremium', type: 'uint256', internalType: 'uint256'},\n ],\n outputs: [{name: 'totalPremium', type: 'uint256', internalType: 'uint256'}],\n stateMutability: 'nonpayable',\n },\n {\n type: 'function',\n name: 'feeRecipient',\n inputs: [],\n outputs: [{name: '', type: 'address', internalType: 'address'}],\n stateMutability: 'view',\n },\n {\n type: 'function',\n name: 'feeStrategy',\n inputs: [],\n outputs: [\n {\n name: '',\n type: 'address',\n internalType: 'contract IFeeStrategy',\n },\n ],\n stateMutability: 'view',\n },\n {\n type: 'function',\n name: 'getOption',\n inputs: [{name: 'optionId', type: 'uint256', internalType: 'uint256'}],\n outputs: [\n {\n name: '',\n type: 'tuple',\n internalType: 'struct TimelockOptionsMarket.OptionData',\n components: [\n {name: 'owner', type: 'address', internalType: 'address'},\n {name: 'extendable', type: 'bool', internalType: 'bool'},\n {name: 'optionType', type: 'uint8', internalType: 'uint8'},\n {name: 'strikeTick', type: 'int24', internalType: 'int24'},\n {name: 'entryTick', type: 'int24', internalType: 'int24'},\n {name: 'expiresAt', type: 'uint32', internalType: 'uint32'},\n {\n name: 'liquidities',\n type: 'uint128[]',\n internalType: 'uint128[]',\n },\n ],\n },\n ],\n stateMutability: 'view',\n },\n {\n type: 'function',\n name: 'guardian',\n inputs: [],\n outputs: [\n {\n name: '',\n type: 'address',\n internalType: 'contract TimelockGuardian',\n },\n ],\n stateMutability: 'view',\n },\n {\n type: 'function',\n name: 'liquiditiesToAmounts',\n inputs: [\n {name: 'startTick', type: 'int24', internalType: 'int24'},\n {\n name: 'liquidities',\n type: 'uint128[]',\n internalType: 'uint128[]',\n },\n {name: 'optionType', type: 'uint8', internalType: 'uint8'},\n ],\n outputs: [\n {\n name: 'optionAssetToRepay',\n type: 'uint256',\n internalType: 'uint256',\n },\n {\n name: 'payoutAssetToRepay',\n type: 'uint256',\n internalType: 'uint256',\n },\n {\n name: 'optionAssetBorrowed',\n type: 'uint256',\n internalType: 'uint256',\n },\n {\n name: 'payoutAssetBorrowed',\n type: 'uint256',\n internalType: 'uint256',\n },\n {name: 'currentTick', type: 'int24', internalType: 'int24'},\n ],\n stateMutability: 'view',\n },\n {\n type: 'function',\n name: 'maxDuration',\n inputs: [],\n outputs: [{name: '', type: 'uint32', internalType: 'uint32'}],\n stateMutability: 'view',\n },\n {\n type: 'function',\n name: 'maxOptionAmount',\n inputs: [],\n outputs: [{name: '', type: 'uint256', internalType: 'uint256'}],\n stateMutability: 'view',\n },\n {\n type: 'function',\n name: 'minDuration',\n inputs: [],\n outputs: [{name: '', type: 'uint32', internalType: 'uint32'}],\n stateMutability: 'view',\n },\n {\n type: 'function',\n name: 'minOptionAmount',\n inputs: [],\n outputs: [{name: '', type: 'uint256', internalType: 'uint256'}],\n stateMutability: 'view',\n },\n {\n type: 'function',\n name: 'mintOption',\n inputs: [\n {name: 'optionType', type: 'uint8', internalType: 'uint8'},\n {name: 'amount', type: 'uint256', internalType: 'uint256'},\n {name: 'strikeTick', type: 'int24', internalType: 'int24'},\n {name: 'duration', type: 'uint32', internalType: 'uint32'},\n {name: 'maxPremium', type: 'uint256', internalType: 'uint256'},\n {name: 'extendable', type: 'bool', internalType: 'bool'},\n {name: 'refTick', type: 'int24', internalType: 'int24'},\n ],\n outputs: [\n {name: 'optionId', type: 'uint256', internalType: 'uint256'},\n {name: 'finalAmount', type: 'uint256', internalType: 'uint256'},\n {name: 'totalPremium', type: 'uint256', internalType: 'uint256'},\n ],\n stateMutability: 'nonpayable',\n },\n {\n type: 'function',\n name: 'nextOptionId',\n inputs: [],\n outputs: [{name: '', type: 'uint256', internalType: 'uint256'}],\n stateMutability: 'view',\n },\n {\n type: 'function',\n name: 'optionAsset',\n inputs: [],\n outputs: [{name: '', type: 'address', internalType: 'contract IERC20'}],\n stateMutability: 'view',\n },\n {\n type: 'function',\n name: 'optionAssetIsToken0',\n inputs: [],\n outputs: [{name: '', type: 'bool', internalType: 'bool'}],\n stateMutability: 'view',\n },\n {\n type: 'function',\n name: 'optionPricing',\n inputs: [],\n outputs: [\n {\n name: '',\n type: 'address',\n internalType: 'contract IOptionPricing',\n },\n ],\n stateMutability: 'view',\n },\n {\n type: 'function',\n name: 'owner',\n inputs: [],\n outputs: [{name: '', type: 'address', internalType: 'address'}],\n stateMutability: 'view',\n },\n {\n type: 'function',\n name: 'payoutAsset',\n inputs: [],\n outputs: [{name: '', type: 'address', internalType: 'contract IERC20'}],\n stateMutability: 'view',\n },\n {\n type: 'function',\n name: 'pool',\n inputs: [],\n outputs: [\n {\n name: '',\n type: 'address',\n internalType: 'contract IUniswapV3Pool',\n },\n ],\n stateMutability: 'view',\n },\n {\n type: 'function',\n name: 'renounceOwnership',\n inputs: [],\n outputs: [],\n stateMutability: 'nonpayable',\n },\n {\n type: 'function',\n name: 'tickSpacing',\n inputs: [],\n outputs: [{name: '', type: 'int24', internalType: 'int24'}],\n stateMutability: 'view',\n },\n {\n type: 'function',\n name: 'token0',\n inputs: [],\n outputs: [{name: '', type: 'address', internalType: 'contract IERC20'}],\n stateMutability: 'view',\n },\n {\n type: 'function',\n name: 'token1',\n inputs: [],\n outputs: [{name: '', type: 'address', internalType: 'contract IERC20'}],\n stateMutability: 'view',\n },\n {\n type: 'function',\n name: 'transferOwnership',\n inputs: [{name: 'newOwner', type: 'address', internalType: 'address'}],\n outputs: [],\n stateMutability: 'nonpayable',\n },\n {\n type: 'function',\n name: 'updateAddresses',\n inputs: [\n {\n name: '_optionPricing',\n type: 'address',\n internalType: 'contract IOptionPricing',\n },\n {\n name: '_feeStrategy',\n type: 'address',\n internalType: 'contract IFeeStrategy',\n },\n {\n name: '_feeRecipient',\n type: 'address',\n internalType: 'address',\n },\n ],\n outputs: [],\n stateMutability: 'nonpayable',\n },\n {\n type: 'function',\n name: 'updateBounds',\n inputs: [\n {\n name: '_minOptionAmount',\n type: 'uint256',\n internalType: 'uint256',\n },\n {\n name: '_maxOptionAmount',\n type: 'uint256',\n internalType: 'uint256',\n },\n {name: '_minDuration', type: 'uint32', internalType: 'uint32'},\n {name: '_maxDuration', type: 'uint32', internalType: 'uint32'},\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 ITimelockVault',\n },\n ],\n stateMutability: 'view',\n },\n {\n type: 'event',\n name: 'ExerciseOption',\n inputs: [\n {\n name: 'optionId',\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: 'liquidities',\n type: 'uint128[]',\n indexed: false,\n internalType: 'uint128[]',\n },\n {\n name: 'currentTick',\n type: 'int24',\n indexed: false,\n internalType: 'int24',\n },\n {\n name: 'payout',\n type: 'uint256',\n indexed: false,\n internalType: 'uint256',\n },\n ],\n anonymous: false,\n },\n {\n type: 'event',\n name: 'ExtendOption',\n inputs: [\n {\n name: 'optionId',\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: 'premium',\n type: 'uint256',\n indexed: false,\n internalType: 'uint256',\n },\n {\n name: 'newExpiresAt',\n type: 'uint32',\n indexed: false,\n internalType: 'uint32',\n },\n ],\n anonymous: false,\n },\n {\n type: 'event',\n name: 'FeesWithdrawn',\n inputs: [\n {\n name: 'fees0',\n type: 'uint256',\n indexed: false,\n internalType: 'uint256',\n },\n {\n name: 'fees1',\n type: 'uint256',\n indexed: false,\n internalType: 'uint256',\n },\n ],\n anonymous: false,\n },\n {\n type: 'event',\n name: 'MintOption',\n inputs: [\n {\n name: 'optionId',\n type: 'uint256',\n indexed: true,\n internalType: 'uint256',\n },\n {\n name: 'buyer',\n type: 'address',\n indexed: true,\n internalType: 'address',\n },\n {\n name: 'optionType',\n type: 'uint8',\n indexed: false,\n internalType: 'uint8',\n },\n {\n name: 'strikeTick',\n type: 'int24',\n indexed: false,\n internalType: 'int24',\n },\n {\n name: 'currentTick',\n type: 'int24',\n indexed: false,\n internalType: 'int24',\n },\n {\n name: 'expiresAt',\n type: 'uint32',\n indexed: false,\n internalType: 'uint32',\n },\n {\n name: 'premium',\n type: 'uint128',\n indexed: false,\n internalType: 'uint128',\n },\n {\n name: 'protocolFee',\n type: 'uint128',\n indexed: false,\n internalType: 'uint128',\n },\n {\n name: 'liquidities',\n type: 'uint128[]',\n indexed: false,\n internalType: 'uint128[]',\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 {type: 'error', name: 'AmountOutOfBounds', inputs: []},\n {type: 'error', name: 'DurationOutOfBounds', inputs: []},\n {type: 'error', name: 'InsufficientLiquidity', inputs: []},\n {type: 'error', name: 'InvalidArrayLength', inputs: []},\n {type: 'error', name: 'InvalidOptionType', inputs: []},\n {\n type: 'error',\n name: 'InvalidTickRange',\n inputs: [\n {name: 'tickLower', type: 'int24', internalType: 'int24'},\n {name: 'tickUpper', type: 'int24', internalType: 'int24'},\n ],\n },\n {type: 'error', name: 'NotEnoughPayout', inputs: []},\n {type: 'error', name: 'NotOptionOwner', inputs: []},\n {type: 'error', name: 'OptionNotFound', inputs: []},\n {\n type: 'error',\n name: 'OwnableInvalidOwner',\n inputs: [{name: 'owner', type: 'address', internalType: 'address'}],\n },\n {\n type: 'error',\n name: 'OwnableUnauthorizedAccount',\n inputs: [{name: 'account', type: 'address', internalType: 'address'}],\n },\n {type: 'error', name: 'PremiumTooHigh', inputs: []},\n {type: 'error', name: 'ReentrancyGuardReentrantCall', inputs: []},\n {\n type: 'error',\n name: 'SafeERC20FailedOperation',\n inputs: [{name: 'token', type: 'address', internalType: 'address'}],\n },\n {type: 'error', name: 'SwapFailed', inputs: []},\n {type: 'error', name: 'TradingPaused', inputs: []},\n {type: 'error', name: 'WithdrawNotAllowed', inputs: []},\n {type: 'error', name: 'ZeroAddress', inputs: []},\n] as const;\n"],"mappings":";AAAA,MAAa,WAAW;CACtB;EACE,MAAM;EACN,QAAQ,CACN;GAAC,MAAM;GAAS,MAAM;GAAU,cAAc;GAAS,EACvD;GAAC,MAAM;GAAW,MAAM;GAAU,cAAc;GAAS,CAC1D;EACD,iBAAiB;EAClB;CACD;EACE,MAAM;EACN,MAAM;EACN,QAAQ,CACN;GAAC,MAAM;GAAS,MAAM;GAAW,cAAc;GAAU,EACzD;GAAC,MAAM;GAAW,MAAM;GAAW,cAAc;GAAU,CAC5D;EACD,SAAS,CAAC;GAAC,MAAM;GAAI,MAAM;GAAW,cAAc;GAAU,CAAC;EAC/D,iBAAiB;EAClB;CACD;EACE,MAAM;EACN,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AAc;IAAU;GAC/D;IAAC,MAAM;IAAW,MAAM;IAAQ,cAAc;IAAO;GACtD;EACD,iBAAiB;EAClB;CACD;EACE,MAAM;EACN,MAAM;EACN,QAAQ,CACN;GACE,MAAM;GACN,MAAM;GACN,cAAc;GACf,EACD;GAAC,MAAM;GAAa,MAAM;GAAS,cAAc;GAAQ,CAC1D;EACD,SAAS,CACP;GACE,MAAM;GACN,MAAM;GACN,cAAc;GACf,EACD;GACE,MAAM;GACN,MAAM;GACN,cAAc;GACf,CACF;EACD,iBAAiB;EAClB;CACD;EACE,MAAM;EACN,MAAM;EACN,QAAQ,CACN;GACE,MAAM;GACN,MAAM;GACN,cAAc;GACf,CACF;EACD,SAAS,CACP;GACE,MAAM;GACN,MAAM;GACN,cAAc;GACd,YAAY;IACV;KACE,MAAM;KACN,MAAM;KACN,cAAc;KACf;IACD;KACE,MAAM;KACN,MAAM;KACN,cAAc;KACf;IACD;KACE,MAAM;KACN,MAAM;KACN,cAAc;KACf;IACD;KACE,MAAM;KACN,MAAM;KACN,cAAc;KACf;IACD;KACE,MAAM;KACN,MAAM;KACN,cAAc;KACf;IACD;KACE,MAAM;KACN,MAAM;KACN,cAAc;KACf;IACD;KACE,MAAM;KACN,MAAM;KACN,cAAc;KACf;IACD;KACE,MAAM;KACN,MAAM;KACN,cAAc;KACf;IACD;KACE,MAAM;KACN,MAAM;KACN,cAAc;KACf;IACD;KACE,MAAM;KACN,MAAM;KACN,cAAc;KACf;IACD;KACE,MAAM;KACN,MAAM;KACN,cAAc;KACf;IACD;KACE,MAAM;KACN,MAAM;KACN,cAAc;KACf;IACF;GACF,CACF;EACD,iBAAiB;EAClB;CACD;EACE,MAAM;EACN,MAAM;EACN,QAAQ;GACN;IACE,MAAM;IACN,MAAM;IACN,cAAc;IACf;GACD;IAAC,MAAM;IAAc,MAAM;IAAS,cAAc;IAAQ;GAC1D;IACE,MAAM;IACN,MAAM;IACN,cAAc;IACf;GACF;EACD,SAAS,CACP;GAAC,MAAM;G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M;MACN,MAAM;MACN,cAAc;MACf;KACD;MACE,MAAM;MACN,MAAM;MACN,cAAc;MACf;KACD;MACE,MAAM;MACN,MAAM;MACN,cAAc;MACf;KACD;MACE,MAAM;MACN,MAAM;MACN,cAAc;MACf;KACD;MACE,MAAM;MACN,MAAM;MACN,cAAc;MACf;KACD;MACE,MAAM;MACN,MAAM;MACN,cAAc;MACf;KACD;MACE,MAAM;MACN,MAAM;MACN,cAAc;MACf;KACD;MACE,MAAM;MACN,MAAM;MACN,cAAc;MACf;KACD;MAAC,MAAM;MAAa,MAAM;MAAU,cAAc;MAAS;KAC3D;MACE,MAAM;MACN,MAAM;MACN,cAAc;MACf;KACF;IACF;GACD;IAAC,MAAM;IAAe,MAAM;IAAW,cAAc;IAAU;GAC/D;IAAC,MAAM;IAAW,MAAM;IAAQ,cAAc;IAAO;GACtD;EACD,iBAAiB;EAClB;CACD;EACE,MAAM;EACN,MAAM;EACN,QAAQ,CACN;GACE,MAAM;GACN,MAAM;GACN,cAAc;GACf,CACF;EACD,SAAS;GACP;IACE,MAAM;IACN,MAAM;IACN,cAAc;IACf;GACD;IACE,MAAM;IACN,MAAM;IACN,cAAc;IACf;GACD;IACE,MAAM;IACN,MAAM;IACN,cAAc;IACf;GACD;IACE,MAAM;IACN,MAAM;IACN,cAAc;IACf;GACD;IAAC,MAAM;IAAQ,MAAM;IAAW,cAAc;IAAU;GACxD;IAAC,MAAM;IAAQ,MAAM;IAAW,cAAc;IAAU;GACxD;IAAC,MAAM;IAAe,MAAM;IAAW,cAAc;IAAU;GAChE;EACD,iBAAiB;EAClB;CACF;;;;AC3oBD,MAAa,qBAAqB;CAChC;EACE,MAAM;EACN,MAAM;EACN,QAAQ;GACN;IACE,MAAM;IACN,MAAM;IACN,cAAc;IACf;GACD;IACE,MAAM;IACN,MAAM;IACN,cAAc;IACf;GACD;IACE,MAAM;IACN,MAAM;IACN,cAAc;IACf;GACF;EACD,SAAS,CAAC;GAAC,MAAM;GAAY,MAAM;GAAa,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AClB;CACD;EACE,MAAM;EACN,MAAM;EACN,QAAQ;GACN;IACE,MAAM;IACN,MAAM;IACN,SAAS;IACT,cAAc;IACf;GACD;IACE,MAAM;IACN,MAAM;IACN,SAAS;IACT,cAAc;IACf;GACD;IACE,MAAM;IACN,MAAM;IACN,SAAS;IACT,cAAc;IACf;GACD;IACE,MAAM;IACN,MAAM;IACN,SAAS;IACT,cAAc;IACf;GACD;IACE,MAAM;IACN,MAAM;IACN,SAAS;IACT,cAAc;IACf;GACF;EACD,WAAW;EACZ;CACD;EACE,MAAM;EACN,MAAM;EACN,QAAQ;GACN;IACE,MAAM;IACN,MAAM;IACN,SAAS;IACT,cAAc;IACf;GACD;IACE,MAAM;IACN,MAAM;IACN,SAAS;IACT,cAAc;IACf;GACD;IACE,MAAM;IACN,MAAM;IACN,SAAS;IACT,cAAc;IACf;GACD;IACE,MAAM;IACN,MAAM;IACN,SAAS;IACT,cAAc;IACf;GACF;EACD,WAAW;EACZ;CACD;EACE,MAAM;EACN,MAAM;EACN,QAAQ,CACN;GACE,MAAM;GACN,MAAM;GACN,SAAS;GACT,cAAc;GACf,EACD;GACE,MAAM;GACN,MAAM;GACN,SAAS;GACT,cAAc;GACf,CACF;EACD,WAAW;EACZ;CACD;EACE,MAAM;EACN,MAAM;EACN,QAAQ;GACN;IACE,MAAM;IACN,MAAM;IACN,SAAS;IACT,cAAc;IACf;GACD;IACE,MAAM;IACN,MAAM;IACN,SAAS;IACT,cAAc;IACf;GACD;IACE,MAAM;IACN,MAAM;IACN,SAAS;IACT,cAAc;IACf;GACD;IACE,MAAM;IACN,MAAM;IACN,SAAS;IACT,cAAc;IACf;GACD;IACE,MAAM;IACN,MAAM;IACN,SAAS;IACT,cAAc;IACf;GACD;IACE,MAAM;IACN,MAAM;IACN,SAAS;IACT,cAAc;IACf;GACD;IACE,MAAM;IACN,MAAM;IACN,SAAS;IACT,cAAc;IACf;GACD;IACE,MAAM;IACN,MAAM;IACN,SAAS;IACT,cAAc;IACf;GAC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AAU,CAAC;EACpE;CACD;EAAC,MAAM;EAAS,MAAM;EAAc,QAAQ,EAAE;EAAC;CAC/C;EAAC,MAAM;EAAS,MAAM;EAAiB,QAAQ,EAAE;EAAC;CAClD;EAAC,MAAM;EAAS,MAAM;EAAsB,QAAQ,EAAE;EAAC;CACvD;EAAC,MAAM;EAAS,MAAM;EAAe,QAAQ,EAAE;EAAC;CACjD"}
@@ -377,21 +377,11 @@ const lensAbi = [
377
377
  type: "uint256",
378
378
  internalType: "uint256"
379
379
  },
380
- {
381
- name: "premiumPaid",
382
- type: "uint128",
383
- internalType: "uint128"
384
- },
385
380
  {
386
381
  name: "expiresAt",
387
382
  type: "uint64",
388
383
  internalType: "uint64"
389
384
  },
390
- {
391
- name: "createdAt",
392
- type: "uint64",
393
- internalType: "uint64"
394
- },
395
385
  {
396
386
  name: "liquidities",
397
387
  type: "uint128[]",
@@ -653,21 +643,11 @@ const lensAbi = [
653
643
  type: "uint256",
654
644
  internalType: "uint256"
655
645
  },
656
- {
657
- name: "premiumPaid",
658
- type: "uint128",
659
- internalType: "uint128"
660
- },
661
646
  {
662
647
  name: "expiresAt",
663
648
  type: "uint64",
664
649
  internalType: "uint64"
665
650
  },
666
- {
667
- name: "createdAt",
668
- type: "uint64",
669
- internalType: "uint64"
670
- },
671
651
  {
672
652
  name: "liquidities",
673
653
  type: "uint128[]",
@@ -764,21 +744,11 @@ const lensAbi = [
764
744
  type: "uint256",
765
745
  internalType: "uint256"
766
746
  },
767
- {
768
- name: "premiumPaid",
769
- type: "uint128",
770
- internalType: "uint128"
771
- },
772
747
  {
773
748
  name: "expiresAt",
774
749
  type: "uint64",
775
750
  internalType: "uint64"
776
751
  },
777
- {
778
- name: "createdAt",
779
- type: "uint64",
780
- internalType: "uint64"
781
- },
782
752
  {
783
753
  name: "liquidities",
784
754
  type: "uint128[]",
@@ -975,21 +945,11 @@ const lensAbi = [
975
945
  type: "uint256",
976
946
  internalType: "uint256"
977
947
  },
978
- {
979
- name: "premiumPaid",
980
- type: "uint128",
981
- internalType: "uint128"
982
- },
983
948
  {
984
949
  name: "expiresAt",
985
950
  type: "uint64",
986
951
  internalType: "uint64"
987
952
  },
988
- {
989
- name: "createdAt",
990
- type: "uint64",
991
- internalType: "uint64"
992
- },
993
953
  {
994
954
  name: "liquidities",
995
955
  type: "uint128[]",
@@ -2720,4 +2680,4 @@ Object.defineProperty(exports, 'uniswapMathLensAbi', {
2720
2680
  return uniswapMathLensAbi;
2721
2681
  }
2722
2682
  });
2723
- //# sourceMappingURL=optionsMarket-PBduSBXF.cjs.map
2683
+ //# sourceMappingURL=optionsMarket-DEFMUI2G.cjs.map