@panoptic-eng/sdk 1.0.33 → 1.0.34

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/index.js CHANGED
@@ -1,8 +1,8 @@
1
- import { BASE_CHAIN_ID, BASE_DEPLOYMENT, BASE_ETH_USDC_5BPS_MARKET, BASE_HYPOVAULT_ADDRESSES, BASE_HYPOVAULT_CORE_ADDRESSES, BASE_HYPOVAULT_MANAGER_ADDRESSES, BASE_HYPOVAULT_MANAGER_TURNKEY_SIGNERS, BASE_PANOPTIC_POOL_ADDRESSES, BASE_PANOPTIC_V2_ADDRESSES, BORROW_INDEX_BITS, BPS_SCALE, CHAIN_DEPLOYMENTS, MAINNET_CHAIN_ID, MAINNET_DEPLOYMENT, MAINNET_PANOPTIC_V2_ADDRESSES, MARKET_EPOCH_BITS, MARKET_EPOCH_SHIFT, Multicall3Abi, RATE_AT_TARGET_BITS, SECONDS_PER_YEAR, SEPOLIA_CHAIN_ID, SEPOLIA_DEPLOYMENT, SEPOLIA_ETH_USDC_5BPS_MARKET, SEPOLIA_HYPOVAULT_ADDRESSES, SEPOLIA_HYPOVAULT_CORE_ADDRESSES, SEPOLIA_HYPOVAULT_MANAGER_ADDRESSES, SEPOLIA_HYPOVAULT_MANAGER_TURNKEY_SIGNERS, SEPOLIA_PANOPTIC_POOL_ADDRESSES, SEPOLIA_PANOPTIC_V2_ADDRESSES, StateViewAbi, UNREALIZED_INTEREST_BITS, VAULT_DISPLAY_NAMES_PER_CHAIN, VAULT_DISPLAY_NAME_RESOLVERS_PER_CHAIN, WAD$2 as WAD, annualizePerSecondRateWad, deriveSupplyRatePerSecWad, formatPerSecondRateWadAsAprPct, formatPerSecondRateWadAsApyPct, getAccountCollateral$1 as getAccountCollateral, getChainDeployment, getCollateralData$1 as getCollateralData, getEthUsdcMarket, getIrmCurrent, getIrmCurve, isSupportedChain, packMarketState, ratePerSecWadToAprPct, requireChainDeployment, resolveVaultDisplayName, utilizationBpsToWad, utilizationPctToWad } from "./irm-JPcV9ykY.js";
1
+ import { BASE_CHAIN_ID, BASE_DEPLOYMENT, BASE_ETH_USDC_5BPS_MARKET, BASE_HYPOVAULT_ADDRESSES, BASE_HYPOVAULT_CORE_ADDRESSES, BASE_HYPOVAULT_MANAGER_ADDRESSES, BASE_HYPOVAULT_MANAGER_TURNKEY_SIGNERS, BASE_PANOPTIC_POOL_ADDRESSES, BASE_PANOPTIC_V2_ADDRESSES, BORROW_INDEX_BITS, BPS_SCALE, CHAIN_DEPLOYMENTS, MAINNET_CHAIN_ID, MAINNET_DEPLOYMENT, MAINNET_ETH_USDC_5BPS_V3_PANOPTIC_POOL_ADDRESSES, MAINNET_PANOPTIC_V2_ADDRESSES, MAINNET_RISK_ENGINES, MARKET_EPOCH_BITS, MARKET_EPOCH_SHIFT, Multicall3Abi, RATE_AT_TARGET_BITS, SECONDS_PER_YEAR, SEPOLIA_CHAIN_ID, SEPOLIA_DEPLOYMENT, SEPOLIA_ETH_USDC_5BPS_MARKET, SEPOLIA_HYPOVAULT_ADDRESSES, SEPOLIA_HYPOVAULT_CORE_ADDRESSES, SEPOLIA_HYPOVAULT_MANAGER_ADDRESSES, SEPOLIA_HYPOVAULT_MANAGER_TURNKEY_SIGNERS, SEPOLIA_PANOPTIC_POOL_ADDRESSES, SEPOLIA_PANOPTIC_V2_ADDRESSES, StateViewAbi, UNREALIZED_INTEREST_BITS, VAULT_DISPLAY_NAMES_PER_CHAIN, VAULT_DISPLAY_NAME_RESOLVERS_PER_CHAIN, WAD$2 as WAD, annualizePerSecondRateWad, deriveSupplyRatePerSecWad, formatPerSecondRateWadAsAprPct, formatPerSecondRateWadAsApyPct, getAccountCollateral$1 as getAccountCollateral, getChainDeployment, getCollateralData$1 as getCollateralData, getEthUsdcMarket, getIrmCurrent, getIrmCurve, isSupportedChain, packMarketState, ratePerSecWadToAprPct, requireChainDeployment, resolveVaultDisplayName, utilizationBpsToWad, utilizationPctToWad } from "./irm-DnM96-X4.js";
2
2
  import { collateralTrackerV2Abi, getPoolMetadata, panopticFactoryV3Abi, panopticFactoryV4Abi, panopticPoolV2Abi, panopticQueryAbi$1 as panopticQueryAbi, riskEngineAbi, semiFungiblePositionManagerV3Abi, semiFungiblePositionManagerV4Abi } from "./position-C8rkkKhi.js";
3
3
  import { tickToSqrtPriceX96 } from "./greeks-GysWXct-.js";
4
- import { BaseError, ContractFunctionExecutionError, ContractFunctionRevertedError, encodeAbiParameters, encodeFunctionData, encodePacked, keccak256, maxUint256, parseAbi, zeroAddress } from "viem";
5
- import { readContract, simulateContract, writeContract } from "viem/actions";
4
+ import { BaseError, ContractFunctionExecutionError, ContractFunctionRevertedError, concat, encodeAbiParameters, encodeFunctionData, encodePacked, getAddress, keccak256, maxUint256, parseAbi, toBytes, zeroAddress } from "viem";
5
+ import { getBlockNumber, readContract, simulateContract, writeContract } from "viem/actions";
6
6
  import Decimal from "decimal.js";
7
7
  import { useCallback, useEffect, useMemo, useRef, useState } from "react";
8
8
  import { useAccount, useReadContract, useSimulateContract, useWaitForTransactionReceipt, useWriteContract } from "wagmi";
@@ -15191,11 +15191,11 @@ const UsdcPlpVaultBaseProdConfig = {
15191
15191
 
15192
15192
  //#endregion
15193
15193
  //#region src/hypoVault/hypoVaultManagerConfigs/usdcPlpVaultMainnetProdConfig.ts
15194
- const MAINNET_DEPLOYMENT$3 = requireChainDeployment(MAINNET_CHAIN_ID);
15195
- const MAINNET_ETH_USDC_MARKET = getEthUsdcMarket(MAINNET_DEPLOYMENT$3);
15196
- const MAINNET_HYPOVAULT_ADDRESSES$1 = MAINNET_DEPLOYMENT$3.hypovault.vaults;
15197
- const MAINNET_HYPOVAULT_MANAGER_ADDRESSES$1 = MAINNET_DEPLOYMENT$3.hypovault.managers;
15198
- const MAINNET_PANOPTIC_POOL_ADDRESSES$1 = MAINNET_DEPLOYMENT$3.panoptic.pool;
15194
+ const MAINNET_DEPLOYMENT$5 = requireChainDeployment(MAINNET_CHAIN_ID);
15195
+ const MAINNET_ETH_USDC_MARKET = getEthUsdcMarket(MAINNET_DEPLOYMENT$5);
15196
+ const MAINNET_HYPOVAULT_ADDRESSES$1 = MAINNET_DEPLOYMENT$5.hypovault.vaults;
15197
+ const MAINNET_HYPOVAULT_MANAGER_ADDRESSES$1 = MAINNET_DEPLOYMENT$5.hypovault.managers;
15198
+ const MAINNET_PANOPTIC_POOL_ADDRESSES$1 = MAINNET_DEPLOYMENT$5.panoptic.pool;
15199
15199
  const MAINNET_LEGACY_PANOPTIC_POOL_ADDRESSES$1 = {
15200
15200
  panopticPool: "0x000000007588B488d180899cDEa2080a886D2441",
15201
15201
  collateralTracker0: "0x6cd0186Fb4c32B6fD23279bBE0022506958216f9",
@@ -15353,10 +15353,10 @@ const WethPlpVaultBaseProdConfig = {
15353
15353
 
15354
15354
  //#endregion
15355
15355
  //#region src/hypoVault/hypoVaultManagerConfigs/wethPlpVaultMainnetProdConfig.ts
15356
- const MAINNET_DEPLOYMENT$2 = requireChainDeployment(MAINNET_CHAIN_ID);
15357
- const MAINNET_HYPOVAULT_ADDRESSES = MAINNET_DEPLOYMENT$2.hypovault.vaults;
15358
- const MAINNET_HYPOVAULT_MANAGER_ADDRESSES = MAINNET_DEPLOYMENT$2.hypovault.managers;
15359
- const MAINNET_PANOPTIC_POOL_ADDRESSES = MAINNET_DEPLOYMENT$2.panoptic.pool;
15356
+ const MAINNET_DEPLOYMENT$4 = requireChainDeployment(MAINNET_CHAIN_ID);
15357
+ const MAINNET_HYPOVAULT_ADDRESSES = MAINNET_DEPLOYMENT$4.hypovault.vaults;
15358
+ const MAINNET_HYPOVAULT_MANAGER_ADDRESSES = MAINNET_DEPLOYMENT$4.hypovault.managers;
15359
+ const MAINNET_PANOPTIC_POOL_ADDRESSES = MAINNET_DEPLOYMENT$4.panoptic.pool;
15360
15360
  const MAINNET_LEGACY_PANOPTIC_POOL_ADDRESSES = {
15361
15361
  panopticPool: "0x000000007588B488d180899cDEa2080a886D2441",
15362
15362
  collateralTracker0: "0x6cd0186Fb4c32B6fD23279bBE0022506958216f9",
@@ -15503,10 +15503,18 @@ function getHypoVaultConfigForVault(vaultAddress, chainId, options) {
15503
15503
  //#region src/hypoVault/hypoVaultManagerArtifacts/poolInfosConfig.ts
15504
15504
  const SEPOLIA_DEPLOYMENT$1 = requireChainDeployment(SEPOLIA_CHAIN_ID);
15505
15505
  const BASE_DEPLOYMENT$1 = requireChainDeployment(BASE_CHAIN_ID);
15506
- const MAINNET_DEPLOYMENT$1 = requireChainDeployment(MAINNET_CHAIN_ID);
15506
+ const MAINNET_DEPLOYMENT$3 = requireChainDeployment(MAINNET_CHAIN_ID);
15507
15507
  const MAX_PRICE_DEVIATION = 100;
15508
15508
  const WSPCXX_USDC_MAX_PRICE_DEVIATION = 1e4;
15509
15509
  const DEFAULT_TRIGGER_TICK = 150;
15510
+ const MAINNET_ETH_USDC_5BPS_V3_POOL = MAINNET_DEPLOYMENT$3.panoptic.additionalPools?.ethUsdc5bpsV3;
15511
+ if (MAINNET_ETH_USDC_5BPS_V3_POOL === void 0) throw new Error("Missing mainnet ETH/USDC 5bps v3 Panoptic pool deployment");
15512
+ const MAINNET_ETH_USDC_5BPS_V3_POOL_INFO = {
15513
+ maxPriceDeviation: MAX_PRICE_DEVIATION,
15514
+ pool: MAINNET_ETH_USDC_5BPS_V3_POOL.panopticPool,
15515
+ token0: "0xA0b86991c6218b36c1d19D4a2e9Eb0cE3606eB48",
15516
+ token1: "0xC02aaA39b223FE8D0A0e5C4F27eAD9083C756Cc2"
15517
+ };
15510
15518
  const SEPOLIA_DEFAULT_POOL_INFOS = [{
15511
15519
  maxPriceDeviation: MAX_PRICE_DEVIATION,
15512
15520
  pool: SEPOLIA_DEPLOYMENT$1.panoptic.pool.panopticPool,
@@ -15523,23 +15531,27 @@ const BASE_DEFAULT_POOL_INFOS = [{
15523
15531
  const BASE_VAULT_ADDRESSES = BASE_DEPLOYMENT$1.hypovault.vaults;
15524
15532
  const MAINNET_DEFAULT_POOL_INFOS = [{
15525
15533
  maxPriceDeviation: MAX_PRICE_DEVIATION,
15526
- pool: MAINNET_DEPLOYMENT$1.panoptic.pool.panopticPool,
15527
- token0: getEthUsdcMarket(MAINNET_DEPLOYMENT$1).currency0,
15528
- token1: getEthUsdcMarket(MAINNET_DEPLOYMENT$1).currency1
15529
- }];
15530
- const MAINNET_USDC_PLP_POOL_INFOS = [...MAINNET_DEFAULT_POOL_INFOS, {
15531
- maxPriceDeviation: WSPCXX_USDC_MAX_PRICE_DEVIATION,
15532
- pool: "0x0f34e6fCda264349Db10d445BD95f529cbe88090",
15533
- token0: "0x8e2eeD8b8B5E13Ea7BF38e50d7821d2C57309072",
15534
- token1: "0xA0b86991c6218b36c1d19D4a2e9Eb0cE3606eB48"
15535
- }];
15534
+ pool: MAINNET_DEPLOYMENT$3.panoptic.pool.panopticPool,
15535
+ token0: getEthUsdcMarket(MAINNET_DEPLOYMENT$3).currency0,
15536
+ token1: getEthUsdcMarket(MAINNET_DEPLOYMENT$3).currency1
15537
+ }, MAINNET_ETH_USDC_5BPS_V3_POOL_INFO];
15538
+ const MAINNET_USDC_PLP_POOL_INFOS = [
15539
+ MAINNET_DEFAULT_POOL_INFOS[0],
15540
+ {
15541
+ maxPriceDeviation: WSPCXX_USDC_MAX_PRICE_DEVIATION,
15542
+ pool: "0x0f34e6fCda264349Db10d445BD95f529cbe88090",
15543
+ token0: "0x8e2eeD8b8B5E13Ea7BF38e50d7821d2C57309072",
15544
+ token1: "0xA0b86991c6218b36c1d19D4a2e9Eb0cE3606eB48"
15545
+ },
15546
+ MAINNET_ETH_USDC_5BPS_V3_POOL_INFO
15547
+ ];
15536
15548
  const MAINNET_LEGACY_DEFAULT_POOL_INFOS = [{
15537
15549
  maxPriceDeviation: MAX_PRICE_DEVIATION,
15538
15550
  pool: "0x000000007588B488d180899cDEa2080a886D2441",
15539
- token0: getEthUsdcMarket(MAINNET_DEPLOYMENT$1).currency0,
15540
- token1: getEthUsdcMarket(MAINNET_DEPLOYMENT$1).currency1
15551
+ token0: getEthUsdcMarket(MAINNET_DEPLOYMENT$3).currency0,
15552
+ token1: getEthUsdcMarket(MAINNET_DEPLOYMENT$3).currency1
15541
15553
  }];
15542
- const MAINNET_VAULT_ADDRESSES = MAINNET_DEPLOYMENT$1.hypovault.vaults;
15554
+ const MAINNET_VAULT_ADDRESSES = MAINNET_DEPLOYMENT$3.hypovault.vaults;
15543
15555
  const MAINNET_LEGACY_VAULT_ADDRESSES = {
15544
15556
  wethPlpVault: "0x779a2aa634A004b3a3f3b322083744869BBC6D66",
15545
15557
  usdcPlpVault: "0x963Fe9c93bc353602656ee4051A75114bA74d6c5"
@@ -15574,6 +15586,14 @@ const MainnetUSDCPLPVaultPoolInfos = {
15574
15586
  triggerTick: DEFAULT_TRIGGER_TICK
15575
15587
  }))
15576
15588
  };
15589
+ /** Production accountant input before the ETH/USDC 5bps v3 pool authorization executes. */
15590
+ const MainnetUSDCPLPPreviousVaultPoolInfos = {
15591
+ vaultAddress: MAINNET_VAULT_ADDRESSES.usdcPlpVault,
15592
+ poolInfos: MAINNET_USDC_PLP_POOL_INFOS.slice(0, 2).map((poolInfo) => ({
15593
+ ...poolInfo,
15594
+ triggerTick: DEFAULT_TRIGGER_TICK
15595
+ }))
15596
+ };
15577
15597
  const MainnetUSDCPLPLegacyVaultPoolInfos = {
15578
15598
  vaultAddress: MAINNET_LEGACY_VAULT_ADDRESSES.usdcPlpVault,
15579
15599
  poolInfos: MAINNET_LEGACY_DEFAULT_POOL_INFOS.map((poolInfo) => ({
@@ -15591,6 +15611,14 @@ const MainnetWETHPLPVaultPoolInfos = {
15591
15611
  triggerTick: DEFAULT_TRIGGER_TICK
15592
15612
  }))
15593
15613
  };
15614
+ /** Production accountant input before the ETH/USDC 5bps v3 pool authorization executes. */
15615
+ const MainnetWETHPLPPreviousVaultPoolInfos = {
15616
+ vaultAddress: MAINNET_VAULT_ADDRESSES.wethPlpVault,
15617
+ poolInfos: MAINNET_DEFAULT_POOL_INFOS.slice(0, 1).map((poolInfo) => ({
15618
+ ...poolInfo,
15619
+ triggerTick: DEFAULT_TRIGGER_TICK
15620
+ }))
15621
+ };
15594
15622
  const MainnetWETHPLPLegacyVaultPoolInfos = {
15595
15623
  vaultAddress: MAINNET_LEGACY_VAULT_ADDRESSES.wethPlpVault,
15596
15624
  poolInfos: MAINNET_LEGACY_DEFAULT_POOL_INFOS.map((poolInfo) => ({
@@ -15619,6 +15647,641 @@ const SepoliaWETHPLPVaultPoolInfos = {
15619
15647
  }))
15620
15648
  };
15621
15649
 
15650
+ //#endregion
15651
+ //#region src/hypoVault/hypoVaultManagerArtifacts/createStrategistLeavesArtifact.ts
15652
+ const DIGEST_COMPOSITION = [
15653
+ "Bytes20(DECODER_AND_SANITIZER_ADDRESS)",
15654
+ "Bytes20(TARGET_ADDRESS)",
15655
+ "Bytes1(CAN_SEND_VALUE)",
15656
+ "Bytes4(TARGET_FUNCTION_SELECTOR)",
15657
+ "Bytes{N*20}(ADDRESS_ARGUMENT_0,...,ADDRESS_ARGUMENT_N)"
15658
+ ];
15659
+ const EMPTY_DEFINITION = {
15660
+ description: "",
15661
+ target: zeroAddress,
15662
+ functionSignature: "",
15663
+ addressArguments: [],
15664
+ canSendValue: false
15665
+ };
15666
+ function efficientHash$1(a, b) {
15667
+ return keccak256(encodePacked(["bytes32", "bytes32"], a < b ? [a, b] : [b, a]));
15668
+ }
15669
+ function nextPowerOfTwo(value) {
15670
+ let capacity = 1;
15671
+ while (capacity < value) capacity *= 2;
15672
+ return capacity;
15673
+ }
15674
+ function functionSelector(signature) {
15675
+ return keccak256(toBytes(signature)).slice(0, 10);
15676
+ }
15677
+ function buildLeaf(definition, decoderAndSanitizerAddress) {
15678
+ const selector = functionSelector(definition.functionSignature);
15679
+ const packedArgumentAddresses = definition.addressArguments.length === 0 ? "0x" : concat(definition.addressArguments.map((address) => getAddress(address)));
15680
+ const rawDigest = concat([encodePacked([
15681
+ "address",
15682
+ "address",
15683
+ "bool",
15684
+ "bytes4"
15685
+ ], [
15686
+ getAddress(decoderAndSanitizerAddress),
15687
+ getAddress(definition.target),
15688
+ definition.canSendValue,
15689
+ selector
15690
+ ]), packedArgumentAddresses]);
15691
+ return {
15692
+ AddressArguments: definition.addressArguments,
15693
+ CanSendValue: definition.canSendValue,
15694
+ DecoderAndSanitizerAddress: getAddress(decoderAndSanitizerAddress),
15695
+ Description: definition.description,
15696
+ FunctionSelector: selector,
15697
+ FunctionSignature: definition.functionSignature,
15698
+ LeafDigest: keccak256(rawDigest),
15699
+ PackedArgumentAddresses: packedArgumentAddresses,
15700
+ TargetAddress: getAddress(definition.target)
15701
+ };
15702
+ }
15703
+ function buildMerkleTree(leafDigests) {
15704
+ if (leafDigests.length === 0) throw new Error("Strategist Merkle tree requires at least one leaf digest");
15705
+ const layersFromLeaves = [[...leafDigests]];
15706
+ while (layersFromLeaves[layersFromLeaves.length - 1]?.length !== 1) {
15707
+ const currentLayer = layersFromLeaves[layersFromLeaves.length - 1];
15708
+ if (currentLayer === void 0 || currentLayer.length % 2 !== 0) throw new Error("Strategist Merkle tree layers must contain an even number of nodes");
15709
+ const parentLayer = [];
15710
+ for (let index = 0; index < currentLayer.length; index += 2) {
15711
+ const left = currentLayer[index];
15712
+ const right = currentLayer[index + 1];
15713
+ if (left === void 0 || right === void 0) throw new Error("Strategist Merkle tree contains an incomplete pair");
15714
+ parentLayer.push(efficientHash$1(left, right));
15715
+ }
15716
+ layersFromLeaves.push(parentLayer);
15717
+ }
15718
+ return Object.fromEntries([...layersFromLeaves].reverse().map((layer, index) => [String(index), layer]));
15719
+ }
15720
+ function createStrategistLeavesArtifact(metadata, definitions) {
15721
+ if (definitions.length === 0) throw new Error("Strategist artifact requires at least one permission leaf");
15722
+ const treeCapacity = nextPowerOfTwo(definitions.length);
15723
+ const leafs = definitions.map((definition) => buildLeaf(definition, metadata.decoderAndSanitizerAddress));
15724
+ const emptyLeaf = buildLeaf(EMPTY_DEFINITION, zeroAddress);
15725
+ while (leafs.length < treeCapacity) leafs.push(emptyLeaf);
15726
+ const merkleTree = buildMerkleTree(leafs.map((leaf) => leaf.LeafDigest));
15727
+ const root = merkleTree["0"]?.[0];
15728
+ if (root === void 0) throw new Error("Strategist Merkle tree root was not generated");
15729
+ return {
15730
+ metadata: {
15731
+ AccountantAddress: getAddress(metadata.accountantAddress),
15732
+ BoringVaultAddress: getAddress(metadata.boringVaultAddress),
15733
+ DecoderAndSanitizerAddress: getAddress(metadata.decoderAndSanitizerAddress),
15734
+ DigestComposition: DIGEST_COMPOSITION,
15735
+ LeafCount: definitions.length,
15736
+ ManageRoot: root,
15737
+ ManagerAddress: getAddress(metadata.managerAddress),
15738
+ TreeCapacity: treeCapacity
15739
+ },
15740
+ leafs,
15741
+ MerkleTree: merkleTree
15742
+ };
15743
+ }
15744
+
15745
+ //#endregion
15746
+ //#region src/hypoVault/hypoVaultManagerArtifacts/MainnetUSDCPLPStrategistLeaves.ts
15747
+ const VAULT$1 = "0x236d0558f06cd60780b232d4Ec4c92d2cb7e4D18";
15748
+ const DECODER$1 = "0xC87c45d2dbE5acb56013e2591427ECC84Fa251E6";
15749
+ const USDC$1 = "0xA0b86991c6218b36c1d19D4a2e9Eb0cE3606eB48";
15750
+ const CURRENT_POOL$1 = "0x00000000563b70d704f4c6675a5f6ac989fbae13";
15751
+ const CURRENT_PO_ETH$1 = "0x1e46b0289B7E0F710E2Db8Ab87800dd782D624f7";
15752
+ const CURRENT_PO_USDC$1 = "0x12bF31955522BAC337D93e1bC0a39F68D8BDa216";
15753
+ const WSPCXX_PO_USDC = "0x141cc517a6276542B59732Fd85C1A2C536eF7aCA";
15754
+ const NEW_POOL$1 = "0x00000000009C7B687e833559e34503f64d7ed7c4";
15755
+ const NEW_PO_USDC$1 = "0x3CCdA7d5E841d6543D90BcEc20b36a724C184DE9";
15756
+ const NEW_PO_WETH$1 = "0x69E9f9e44E5F52237493b980dd7306198C64A4E4";
15757
+ const WETH$1 = "0xC02aaA39b223FE8D0A0e5C4F27eAD9083C756Cc2";
15758
+ const DISPATCH_SIGNATURE$1 = "dispatch(uint256[],uint256[],uint128[],int24[3][],bool,uint256)";
15759
+ const MAINNET_USDC_PLP_STRATEGIST_LEAF_DEFINITIONS = [
15760
+ {
15761
+ description: "Approve poUSDC to spend USDC",
15762
+ target: USDC$1,
15763
+ functionSignature: "approve(address,uint256)",
15764
+ addressArguments: [CURRENT_PO_USDC$1],
15765
+ canSendValue: false
15766
+ },
15767
+ {
15768
+ description: "Deposit USDC for poUSDC",
15769
+ target: CURRENT_PO_USDC$1,
15770
+ functionSignature: "deposit(uint256,address)",
15771
+ addressArguments: [VAULT$1],
15772
+ canSendValue: false
15773
+ },
15774
+ {
15775
+ description: "Withdraw USDC from poUSDC",
15776
+ target: CURRENT_PO_USDC$1,
15777
+ functionSignature: "withdraw(uint256,address,address)",
15778
+ addressArguments: [VAULT$1, VAULT$1],
15779
+ canSendValue: false
15780
+ },
15781
+ {
15782
+ description: "Withdraw USDC from poUSDC (with open positions)",
15783
+ target: CURRENT_PO_USDC$1,
15784
+ functionSignature: "withdraw(uint256,address,address,uint256[],bool)",
15785
+ addressArguments: [VAULT$1, VAULT$1],
15786
+ canSendValue: false
15787
+ },
15788
+ {
15789
+ description: "Mint poUSDC using USDC",
15790
+ target: CURRENT_PO_USDC$1,
15791
+ functionSignature: "mint(uint256,address)",
15792
+ addressArguments: [VAULT$1],
15793
+ canSendValue: false
15794
+ },
15795
+ {
15796
+ description: "Redeem poUSDC for USDC",
15797
+ target: CURRENT_PO_USDC$1,
15798
+ functionSignature: "redeem(uint256,address,address)",
15799
+ addressArguments: [VAULT$1, VAULT$1],
15800
+ canSendValue: false
15801
+ },
15802
+ {
15803
+ description: "Dispatch mint/burn options on PanopticPool",
15804
+ target: CURRENT_POOL$1,
15805
+ functionSignature: DISPATCH_SIGNATURE$1,
15806
+ addressArguments: [],
15807
+ canSendValue: false
15808
+ },
15809
+ {
15810
+ description: "Withdraw ETH from poETH",
15811
+ target: CURRENT_PO_ETH$1,
15812
+ functionSignature: "withdraw(uint256,address,address)",
15813
+ addressArguments: [VAULT$1, VAULT$1],
15814
+ canSendValue: false
15815
+ },
15816
+ {
15817
+ description: "Withdraw ETH from poETH (with open positions)",
15818
+ target: CURRENT_PO_ETH$1,
15819
+ functionSignature: "withdraw(uint256,address,address,uint256[],bool)",
15820
+ addressArguments: [VAULT$1, VAULT$1],
15821
+ canSendValue: false
15822
+ },
15823
+ {
15824
+ description: "Approve wSPCXx poUSDC to spend USDC",
15825
+ target: USDC$1,
15826
+ functionSignature: "approve(address,uint256)",
15827
+ addressArguments: [WSPCXX_PO_USDC],
15828
+ canSendValue: false
15829
+ },
15830
+ {
15831
+ description: "Deposit USDC for wSPCXx poUSDC",
15832
+ target: WSPCXX_PO_USDC,
15833
+ functionSignature: "deposit(uint256,address)",
15834
+ addressArguments: [VAULT$1],
15835
+ canSendValue: false
15836
+ },
15837
+ {
15838
+ description: "Withdraw USDC from wSPCXx poUSDC",
15839
+ target: WSPCXX_PO_USDC,
15840
+ functionSignature: "withdraw(uint256,address,address)",
15841
+ addressArguments: [VAULT$1, VAULT$1],
15842
+ canSendValue: false
15843
+ },
15844
+ {
15845
+ description: "Deposit ETH for poETH (payable)",
15846
+ target: CURRENT_PO_ETH$1,
15847
+ functionSignature: "deposit(uint256,address)",
15848
+ addressArguments: [VAULT$1],
15849
+ canSendValue: true
15850
+ },
15851
+ {
15852
+ description: "Mint poETH using ETH (payable)",
15853
+ target: CURRENT_PO_ETH$1,
15854
+ functionSignature: "mint(uint256,address)",
15855
+ addressArguments: [VAULT$1],
15856
+ canSendValue: true
15857
+ },
15858
+ {
15859
+ description: "Redeem poETH for ETH",
15860
+ target: CURRENT_PO_ETH$1,
15861
+ functionSignature: "redeem(uint256,address,address)",
15862
+ addressArguments: [VAULT$1, VAULT$1],
15863
+ canSendValue: false
15864
+ },
15865
+ {
15866
+ description: "Approve poUSDC v3 to spend USDC",
15867
+ target: USDC$1,
15868
+ functionSignature: "approve(address,uint256)",
15869
+ addressArguments: [NEW_PO_USDC$1],
15870
+ canSendValue: false
15871
+ },
15872
+ {
15873
+ description: "Deposit USDC for poUSDC v3",
15874
+ target: NEW_PO_USDC$1,
15875
+ functionSignature: "deposit(uint256,address)",
15876
+ addressArguments: [VAULT$1],
15877
+ canSendValue: false
15878
+ },
15879
+ {
15880
+ description: "Withdraw USDC from poUSDC v3",
15881
+ target: NEW_PO_USDC$1,
15882
+ functionSignature: "withdraw(uint256,address,address)",
15883
+ addressArguments: [VAULT$1, VAULT$1],
15884
+ canSendValue: false
15885
+ },
15886
+ {
15887
+ description: "Withdraw USDC from poUSDC v3 (with open positions)",
15888
+ target: NEW_PO_USDC$1,
15889
+ functionSignature: "withdraw(uint256,address,address,uint256[],bool)",
15890
+ addressArguments: [VAULT$1, VAULT$1],
15891
+ canSendValue: false
15892
+ },
15893
+ {
15894
+ description: "Mint poUSDC v3 using USDC",
15895
+ target: NEW_PO_USDC$1,
15896
+ functionSignature: "mint(uint256,address)",
15897
+ addressArguments: [VAULT$1],
15898
+ canSendValue: false
15899
+ },
15900
+ {
15901
+ description: "Redeem poUSDC v3 for USDC",
15902
+ target: NEW_PO_USDC$1,
15903
+ functionSignature: "redeem(uint256,address,address)",
15904
+ addressArguments: [VAULT$1, VAULT$1],
15905
+ canSendValue: false
15906
+ },
15907
+ {
15908
+ description: "Dispatch mint/burn options on PanopticPool",
15909
+ target: NEW_POOL$1,
15910
+ functionSignature: DISPATCH_SIGNATURE$1,
15911
+ addressArguments: [],
15912
+ canSendValue: false
15913
+ },
15914
+ {
15915
+ description: "Approve poWETH v3 to spend WETH",
15916
+ target: WETH$1,
15917
+ functionSignature: "approve(address,uint256)",
15918
+ addressArguments: [NEW_PO_WETH$1],
15919
+ canSendValue: false
15920
+ },
15921
+ {
15922
+ description: "Deposit WETH for poWETH v3",
15923
+ target: NEW_PO_WETH$1,
15924
+ functionSignature: "deposit(uint256,address)",
15925
+ addressArguments: [VAULT$1],
15926
+ canSendValue: false
15927
+ },
15928
+ {
15929
+ description: "Withdraw WETH from poWETH v3",
15930
+ target: NEW_PO_WETH$1,
15931
+ functionSignature: "withdraw(uint256,address,address)",
15932
+ addressArguments: [VAULT$1, VAULT$1],
15933
+ canSendValue: false
15934
+ },
15935
+ {
15936
+ description: "Withdraw WETH from poWETH v3 (with open positions)",
15937
+ target: NEW_PO_WETH$1,
15938
+ functionSignature: "withdraw(uint256,address,address,uint256[],bool)",
15939
+ addressArguments: [VAULT$1, VAULT$1],
15940
+ canSendValue: false
15941
+ },
15942
+ {
15943
+ description: "Mint poWETH v3 using WETH",
15944
+ target: NEW_PO_WETH$1,
15945
+ functionSignature: "mint(uint256,address)",
15946
+ addressArguments: [VAULT$1],
15947
+ canSendValue: false
15948
+ },
15949
+ {
15950
+ description: "Redeem poWETH v3 for WETH",
15951
+ target: NEW_PO_WETH$1,
15952
+ functionSignature: "redeem(uint256,address,address)",
15953
+ addressArguments: [VAULT$1, VAULT$1],
15954
+ canSendValue: false
15955
+ }
15956
+ ];
15957
+ const MAINNET_USDC_PLP_STRATEGIST_ARTIFACT_METADATA = {
15958
+ accountantAddress: "0x65aA902AE3135658587FFC36ED51B61c927114e1",
15959
+ boringVaultAddress: VAULT$1,
15960
+ decoderAndSanitizerAddress: DECODER$1,
15961
+ managerAddress: "0x2ce65016366ef7320078e0758D58Cf1038bc7C4e"
15962
+ };
15963
+ /** Production permissions before the ETH/USDC 5bps v3 pool authorization executes. */
15964
+ const MainnetUSDCPLPPreviousStrategistLeaves = createStrategistLeavesArtifact(MAINNET_USDC_PLP_STRATEGIST_ARTIFACT_METADATA, MAINNET_USDC_PLP_STRATEGIST_LEAF_DEFINITIONS.slice(0, 12));
15965
+ /** Production permissions after the ETH/USDC 5bps v3 pool authorization executes. */
15966
+ const MainnetUSDCPLPStrategistLeaves = createStrategistLeavesArtifact(MAINNET_USDC_PLP_STRATEGIST_ARTIFACT_METADATA, MAINNET_USDC_PLP_STRATEGIST_LEAF_DEFINITIONS);
15967
+
15968
+ //#endregion
15969
+ //#region src/hypoVault/hypoVaultManagerArtifacts/MainnetWETHPLPStrategistLeaves.ts
15970
+ const MAINNET_DEPLOYMENT$2 = requireChainDeployment(MAINNET_CHAIN_ID);
15971
+ const NEW_POOL_DEPLOYMENT = MAINNET_DEPLOYMENT$2.panoptic.additionalPools?.ethUsdc5bpsV3;
15972
+ if (NEW_POOL_DEPLOYMENT === void 0) throw new Error("Missing mainnet ETH/USDC 5bps v3 Panoptic pool deployment");
15973
+ const VAULT = MAINNET_DEPLOYMENT$2.hypovault.vaults.wethPlpVault;
15974
+ const DECODER = MAINNET_DEPLOYMENT$2.hypovault.core.collateralTrackerDecoderAndSanitizer;
15975
+ const CURRENT_POOL = MAINNET_DEPLOYMENT$2.panoptic.pool.panopticPool;
15976
+ const CURRENT_PO_ETH = MAINNET_DEPLOYMENT$2.panoptic.pool.collateralTracker0;
15977
+ const CURRENT_PO_USDC = MAINNET_DEPLOYMENT$2.panoptic.pool.collateralTracker1;
15978
+ const NEW_POOL = NEW_POOL_DEPLOYMENT.panopticPool;
15979
+ const NEW_PO_USDC = NEW_POOL_DEPLOYMENT.collateralTracker0;
15980
+ const NEW_PO_WETH = NEW_POOL_DEPLOYMENT.collateralTracker1;
15981
+ const USDC = "0xA0b86991c6218b36c1d19D4a2e9Eb0cE3606eB48";
15982
+ const WETH = "0xC02aaA39b223FE8D0A0e5C4F27eAD9083C756Cc2";
15983
+ const DISPATCH_SIGNATURE = "dispatch(uint256[],uint256[],uint128[],int24[3][],bool,uint256)";
15984
+ const MAINNET_WETH_PLP_STRATEGIST_LEAF_DEFINITIONS = [
15985
+ {
15986
+ description: "Deposit ETH for poETH (payable)",
15987
+ target: CURRENT_PO_ETH,
15988
+ functionSignature: "deposit(uint256,address)",
15989
+ addressArguments: [VAULT],
15990
+ canSendValue: true
15991
+ },
15992
+ {
15993
+ description: "Withdraw ETH from poETH",
15994
+ target: CURRENT_PO_ETH,
15995
+ functionSignature: "withdraw(uint256,address,address)",
15996
+ addressArguments: [VAULT, VAULT],
15997
+ canSendValue: false
15998
+ },
15999
+ {
16000
+ description: "Withdraw ETH from poETH (with open positions)",
16001
+ target: CURRENT_PO_ETH,
16002
+ functionSignature: "withdraw(uint256,address,address,uint256[],bool)",
16003
+ addressArguments: [VAULT, VAULT],
16004
+ canSendValue: false
16005
+ },
16006
+ {
16007
+ description: "Mint poETH using ETH (payable)",
16008
+ target: CURRENT_PO_ETH,
16009
+ functionSignature: "mint(uint256,address)",
16010
+ addressArguments: [VAULT],
16011
+ canSendValue: true
16012
+ },
16013
+ {
16014
+ description: "Redeem poETH for ETH",
16015
+ target: CURRENT_PO_ETH,
16016
+ functionSignature: "redeem(uint256,address,address)",
16017
+ addressArguments: [VAULT, VAULT],
16018
+ canSendValue: false
16019
+ },
16020
+ {
16021
+ description: "Dispatch mint/burn options on PanopticPool",
16022
+ target: CURRENT_POOL,
16023
+ functionSignature: DISPATCH_SIGNATURE,
16024
+ addressArguments: [],
16025
+ canSendValue: false
16026
+ },
16027
+ {
16028
+ description: "Wrap ETH to WETH",
16029
+ target: WETH,
16030
+ functionSignature: "deposit()",
16031
+ addressArguments: [],
16032
+ canSendValue: true
16033
+ },
16034
+ {
16035
+ description: "Unwrap WETH to ETH",
16036
+ target: WETH,
16037
+ functionSignature: "withdraw(uint256)",
16038
+ addressArguments: [],
16039
+ canSendValue: false
16040
+ },
16041
+ {
16042
+ description: "Withdraw USDC from poUSDC",
16043
+ target: CURRENT_PO_USDC,
16044
+ functionSignature: "withdraw(uint256,address,address)",
16045
+ addressArguments: [VAULT, VAULT],
16046
+ canSendValue: false
16047
+ },
16048
+ {
16049
+ description: "Withdraw USDC from poUSDC (with open positions)",
16050
+ target: CURRENT_PO_USDC,
16051
+ functionSignature: "withdraw(uint256,address,address,uint256[],bool)",
16052
+ addressArguments: [VAULT, VAULT],
16053
+ canSendValue: false
16054
+ },
16055
+ {
16056
+ description: "Approve poUSDC to spend USDC",
16057
+ target: USDC,
16058
+ functionSignature: "approve(address,uint256)",
16059
+ addressArguments: [CURRENT_PO_USDC],
16060
+ canSendValue: false
16061
+ },
16062
+ {
16063
+ description: "Deposit USDC for poUSDC",
16064
+ target: CURRENT_PO_USDC,
16065
+ functionSignature: "deposit(uint256,address)",
16066
+ addressArguments: [VAULT],
16067
+ canSendValue: false
16068
+ },
16069
+ {
16070
+ description: "Mint poUSDC using USDC",
16071
+ target: CURRENT_PO_USDC,
16072
+ functionSignature: "mint(uint256,address)",
16073
+ addressArguments: [VAULT],
16074
+ canSendValue: false
16075
+ },
16076
+ {
16077
+ description: "Redeem poUSDC for USDC",
16078
+ target: CURRENT_PO_USDC,
16079
+ functionSignature: "redeem(uint256,address,address)",
16080
+ addressArguments: [VAULT, VAULT],
16081
+ canSendValue: false
16082
+ },
16083
+ {
16084
+ description: "Approve poWETH v3 to spend WETH",
16085
+ target: WETH,
16086
+ functionSignature: "approve(address,uint256)",
16087
+ addressArguments: [NEW_PO_WETH],
16088
+ canSendValue: false
16089
+ },
16090
+ {
16091
+ description: "Deposit WETH for poWETH v3",
16092
+ target: NEW_PO_WETH,
16093
+ functionSignature: "deposit(uint256,address)",
16094
+ addressArguments: [VAULT],
16095
+ canSendValue: false
16096
+ },
16097
+ {
16098
+ description: "Withdraw WETH from poWETH v3",
16099
+ target: NEW_PO_WETH,
16100
+ functionSignature: "withdraw(uint256,address,address)",
16101
+ addressArguments: [VAULT, VAULT],
16102
+ canSendValue: false
16103
+ },
16104
+ {
16105
+ description: "Withdraw WETH from poWETH v3 (with open positions)",
16106
+ target: NEW_PO_WETH,
16107
+ functionSignature: "withdraw(uint256,address,address,uint256[],bool)",
16108
+ addressArguments: [VAULT, VAULT],
16109
+ canSendValue: false
16110
+ },
16111
+ {
16112
+ description: "Mint poWETH v3 using WETH",
16113
+ target: NEW_PO_WETH,
16114
+ functionSignature: "mint(uint256,address)",
16115
+ addressArguments: [VAULT],
16116
+ canSendValue: false
16117
+ },
16118
+ {
16119
+ description: "Redeem poWETH v3 for WETH",
16120
+ target: NEW_PO_WETH,
16121
+ functionSignature: "redeem(uint256,address,address)",
16122
+ addressArguments: [VAULT, VAULT],
16123
+ canSendValue: false
16124
+ },
16125
+ {
16126
+ description: "Dispatch mint/burn options on PanopticPool",
16127
+ target: NEW_POOL,
16128
+ functionSignature: DISPATCH_SIGNATURE,
16129
+ addressArguments: [],
16130
+ canSendValue: false
16131
+ },
16132
+ {
16133
+ description: "Approve poUSDC v3 to spend USDC",
16134
+ target: USDC,
16135
+ functionSignature: "approve(address,uint256)",
16136
+ addressArguments: [NEW_PO_USDC],
16137
+ canSendValue: false
16138
+ },
16139
+ {
16140
+ description: "Deposit USDC for poUSDC v3",
16141
+ target: NEW_PO_USDC,
16142
+ functionSignature: "deposit(uint256,address)",
16143
+ addressArguments: [VAULT],
16144
+ canSendValue: false
16145
+ },
16146
+ {
16147
+ description: "Withdraw USDC from poUSDC v3",
16148
+ target: NEW_PO_USDC,
16149
+ functionSignature: "withdraw(uint256,address,address)",
16150
+ addressArguments: [VAULT, VAULT],
16151
+ canSendValue: false
16152
+ },
16153
+ {
16154
+ description: "Withdraw USDC from poUSDC v3 (with open positions)",
16155
+ target: NEW_PO_USDC,
16156
+ functionSignature: "withdraw(uint256,address,address,uint256[],bool)",
16157
+ addressArguments: [VAULT, VAULT],
16158
+ canSendValue: false
16159
+ },
16160
+ {
16161
+ description: "Mint poUSDC v3 using USDC",
16162
+ target: NEW_PO_USDC,
16163
+ functionSignature: "mint(uint256,address)",
16164
+ addressArguments: [VAULT],
16165
+ canSendValue: false
16166
+ },
16167
+ {
16168
+ description: "Redeem poUSDC v3 for USDC",
16169
+ target: NEW_PO_USDC,
16170
+ functionSignature: "redeem(uint256,address,address)",
16171
+ addressArguments: [VAULT, VAULT],
16172
+ canSendValue: false
16173
+ }
16174
+ ];
16175
+ const MAINNET_WETH_PLP_STRATEGIST_ARTIFACT_METADATA = {
16176
+ accountantAddress: MAINNET_DEPLOYMENT$2.hypovault.core.accountant,
16177
+ boringVaultAddress: VAULT,
16178
+ decoderAndSanitizerAddress: DECODER,
16179
+ managerAddress: MAINNET_DEPLOYMENT$2.hypovault.managers.wethPlpVaultManager
16180
+ };
16181
+ /** Production permissions before the ETH/USDC 5bps v3 pool authorization executes. */
16182
+ const MainnetWETHPLPPreviousStrategistLeaves = createStrategistLeavesArtifact(MAINNET_WETH_PLP_STRATEGIST_ARTIFACT_METADATA, MAINNET_WETH_PLP_STRATEGIST_LEAF_DEFINITIONS.slice(0, 10));
16183
+ /** Production permissions after the ETH/USDC 5bps v3 pool authorization executes. */
16184
+ const MainnetWETHPLPStrategistLeaves = createStrategistLeavesArtifact(MAINNET_WETH_PLP_STRATEGIST_ARTIFACT_METADATA, MAINNET_WETH_PLP_STRATEGIST_LEAF_DEFINITIONS);
16185
+
16186
+ //#endregion
16187
+ //#region src/hypoVault/mainnetV3Authorization.ts
16188
+ const MAINNET_DEPLOYMENT$1 = requireChainDeployment(MAINNET_CHAIN_ID);
16189
+ const POOL_INFO_ARRAY_ABI = {
16190
+ type: "tuple[]",
16191
+ components: [
16192
+ {
16193
+ name: "pool",
16194
+ type: "address"
16195
+ },
16196
+ {
16197
+ name: "token0",
16198
+ type: "address"
16199
+ },
16200
+ {
16201
+ name: "token1",
16202
+ type: "address"
16203
+ },
16204
+ {
16205
+ name: "maxPriceDeviation",
16206
+ type: "int24"
16207
+ }
16208
+ ]
16209
+ };
16210
+ function hashPoolInfos(poolInfos) {
16211
+ return keccak256(encodeAbiParameters([POOL_INFO_ARRAY_ABI], [poolInfos.map((poolInfo) => ({
16212
+ pool: getAddress(poolInfo.pool),
16213
+ token0: getAddress(poolInfo.token0),
16214
+ token1: getAddress(poolInfo.token1),
16215
+ maxPriceDeviation: poolInfo.maxPriceDeviation
16216
+ }))]));
16217
+ }
16218
+ function generation(poolInfos, strategistLeaves) {
16219
+ return {
16220
+ poolInfos,
16221
+ strategistLeaves,
16222
+ poolHash: hashPoolInfos(poolInfos),
16223
+ manageRoot: strategistLeaves.metadata.ManageRoot
16224
+ };
16225
+ }
16226
+ const MAINNET_V3_AUTHORIZATION_TRANSITIONS = [{
16227
+ vaultAddress: MAINNET_DEPLOYMENT$1.hypovault.vaults.wethPlpVault,
16228
+ managerAddress: MAINNET_DEPLOYMENT$1.hypovault.managers.wethPlpVaultManager,
16229
+ strategistAddress: MAINNET_DEPLOYMENT$1.hypovault.turnkeySigners.wethPlpVaultManager,
16230
+ previous: generation(MainnetWETHPLPPreviousVaultPoolInfos.poolInfos, MainnetWETHPLPPreviousStrategistLeaves),
16231
+ next: generation(MainnetWETHPLPVaultPoolInfos.poolInfos, MainnetWETHPLPStrategistLeaves)
16232
+ }, {
16233
+ vaultAddress: MAINNET_DEPLOYMENT$1.hypovault.vaults.usdcPlpVault,
16234
+ managerAddress: MAINNET_DEPLOYMENT$1.hypovault.managers.usdcPlpVaultManager,
16235
+ strategistAddress: MAINNET_DEPLOYMENT$1.hypovault.turnkeySigners.usdcPlpVaultManager,
16236
+ previous: generation(MainnetUSDCPLPPreviousVaultPoolInfos.poolInfos, MainnetUSDCPLPPreviousStrategistLeaves),
16237
+ next: generation(MainnetUSDCPLPVaultPoolInfos.poolInfos, MainnetUSDCPLPStrategistLeaves)
16238
+ }];
16239
+ function findTransition(chainId, vaultAddress) {
16240
+ if (chainId !== MAINNET_CHAIN_ID) return null;
16241
+ const normalizedVault = vaultAddress.toLowerCase();
16242
+ return MAINNET_V3_AUTHORIZATION_TRANSITIONS.find((transition) => transition.vaultAddress.toLowerCase() === normalizedVault) ?? null;
16243
+ }
16244
+ /** Returns both known generations without reading chain state. */
16245
+ function getMainnetV3AuthorizationGenerations({ chainId, vaultAddress }) {
16246
+ const transition = findTransition(chainId, vaultAddress);
16247
+ return transition === null ? null : {
16248
+ previous: transition.previous,
16249
+ next: transition.next
16250
+ };
16251
+ }
16252
+ /**
16253
+ * Selects the exact artifact generation authorized by both the accountant and manager.
16254
+ * A mixed or unknown state is rejected: using only one side of the transition would
16255
+ * make either NAV calculation or strategist proof verification fail.
16256
+ */
16257
+ async function resolveMainnetV3AuthorizationArtifacts({ viemClient, chainId, vaultAddress, blockNumber }) {
16258
+ const transition = findTransition(chainId, vaultAddress);
16259
+ if (transition === null) return null;
16260
+ const resolvedBlockNumber = blockNumber ?? await getBlockNumber(viemClient);
16261
+ const [poolHash, manageRoot] = await Promise.all([readContract(viemClient, {
16262
+ address: MAINNET_DEPLOYMENT$1.hypovault.core.accountant,
16263
+ abi: PanopticVaultAccountantAbi,
16264
+ functionName: "vaultHashes",
16265
+ args: [transition.vaultAddress, 0n],
16266
+ blockNumber: resolvedBlockNumber
16267
+ }), readContract(viemClient, {
16268
+ address: transition.managerAddress,
16269
+ abi: HypoVaultManagerWithMerkleVerificationAbi,
16270
+ functionName: "manageRoot",
16271
+ args: [transition.strategistAddress],
16272
+ blockNumber: resolvedBlockNumber
16273
+ })]);
16274
+ for (const version of ["next", "previous"]) {
16275
+ const candidate = transition[version];
16276
+ if (poolHash === candidate.poolHash && manageRoot === candidate.manageRoot) return {
16277
+ version,
16278
+ blockNumber: resolvedBlockNumber,
16279
+ ...candidate
16280
+ };
16281
+ }
16282
+ throw new Error(`Unsupported or inconsistent mainnet v3 authorization state for vault ${transition.vaultAddress}: accountant pool hash ${poolHash}, manager root ${manageRoot}`);
16283
+ }
16284
+
15622
16285
  //#endregion
15623
16286
  //#region src/hypoVault/utils/buildManagerInput.ts
15624
16287
  const NATIVE_ZERO_ADDRESS = "0x0000000000000000000000000000000000000000";
@@ -16103,7 +16766,12 @@ async function resolveVaultTokenIdsByPool({ viemClient, chainId, vaultAddress, m
16103
16766
  return tokenIdsByPool;
16104
16767
  }
16105
16768
  async function buildVaultManagerInput({ viemClient, chainId, vaultAddress, underlyingToken, managerAddress, panopticSubgraphUrl, fetchFn }) {
16106
- const poolInfos = getVaultPoolInfos(vaultAddress, chainId);
16769
+ const authorization = await resolveMainnetV3AuthorizationArtifacts({
16770
+ viemClient,
16771
+ chainId,
16772
+ vaultAddress
16773
+ });
16774
+ const poolInfos = authorization?.poolInfos ?? getVaultPoolInfos(vaultAddress, chainId);
16107
16775
  if (poolInfos.length === 0) return DEFAULT_MANAGER_INPUT$1;
16108
16776
  const tokenIds = await resolveVaultTokenIdsByPool({
16109
16777
  viemClient,
@@ -16122,7 +16790,13 @@ async function buildVaultManagerInput({ viemClient, chainId, vaultAddress, under
16122
16790
  });
16123
16791
  }
16124
16792
  async function buildVaultManagerInputAtBlock({ viemClient, chainId, vaultAddress, underlyingToken, blockNumber, managerAddress, panopticSubgraphUrl, fetchFn }) {
16125
- const poolInfos = getVaultPoolInfos(vaultAddress, chainId);
16793
+ const authorization = await resolveMainnetV3AuthorizationArtifacts({
16794
+ viemClient,
16795
+ chainId,
16796
+ vaultAddress,
16797
+ blockNumber
16798
+ });
16799
+ const poolInfos = authorization?.poolInfos ?? getVaultPoolInfos(vaultAddress, chainId);
16126
16800
  if (poolInfos.length === 0) return DEFAULT_MANAGER_INPUT$1;
16127
16801
  const tokenIds = await resolveVaultTokenIdsByPool({
16128
16802
  viemClient,
@@ -18078,12 +18752,12 @@ const MainnetLegacyWETHPLPStrategistLeaves = {
18078
18752
  };
18079
18753
 
18080
18754
  //#endregion
18081
- //#region src/hypoVault/hypoVaultManagerArtifacts/MainnetUSDCPLPStrategistLeaves.ts
18082
- const MainnetUSDCPLPStrategistLeaves = {
18755
+ //#region src/hypoVault/hypoVaultManagerArtifacts/SepoliaUSDCPLPStrategistLeaves.ts
18756
+ const SepoliaUSDCPLPStrategistLeaves = {
18083
18757
  metadata: {
18084
- AccountantAddress: "0x65aA902AE3135658587FFC36ED51B61c927114e1",
18085
- BoringVaultAddress: "0x236d0558f06cd60780b232d4Ec4c92d2cb7e4D18",
18086
- DecoderAndSanitizerAddress: "0xC87c45d2dbE5acb56013e2591427ECC84Fa251E6",
18758
+ AccountantAddress: "0x25BBef1DF262c24aa1AACD1F7eCeEcc1a7AD08ab",
18759
+ BoringVaultAddress: "0xdd7a8d6c6975488e801129bC84302d74e2361208",
18760
+ DecoderAndSanitizerAddress: "0xb899BE50BAF25BBB3A3ca3403256B3c703E5AB5d",
18087
18761
  DigestComposition: [
18088
18762
  "Bytes20(DECODER_AND_SANITIZER_ADDRESS)",
18089
18763
  "Bytes20(TARGET_ADDRESS)",
@@ -18091,565 +18765,91 @@ const MainnetUSDCPLPStrategistLeaves = {
18091
18765
  "Bytes4(TARGET_FUNCTION_SELECTOR)",
18092
18766
  "Bytes{N*20}(ADDRESS_ARGUMENT_0,...,ADDRESS_ARGUMENT_N)"
18093
18767
  ],
18094
- LeafCount: 12,
18095
- ManageRoot: "0xed7d4ae055fd62c6edc93bd676456748f52fe4f4b78f60ab3ef6394bacc31b5d",
18096
- ManagerAddress: "0x2ce65016366ef7320078e0758D58Cf1038bc7C4e",
18097
- TreeCapacity: 16
18768
+ LeafCount: 7,
18769
+ ManageRoot: "0xa1b9500717e9d72ec1ccd50a4eba78b7d076bb7a528bec91ef95120057dddb09",
18770
+ ManagerAddress: "0xFB5aa3e0b46F3859D90B14b52ffd287013b5Ec53",
18771
+ TreeCapacity: 8
18098
18772
  },
18099
18773
  leafs: [
18100
18774
  {
18101
- AddressArguments: ["0x12bF31955522BAC337D93e1bC0a39F68D8BDa216"],
18775
+ AddressArguments: ["0x7A5D178492dbdABcbBc6201D1021BEE145d48604"],
18102
18776
  CanSendValue: false,
18103
- DecoderAndSanitizerAddress: "0xC87c45d2dbE5acb56013e2591427ECC84Fa251E6",
18777
+ DecoderAndSanitizerAddress: "0xb899BE50BAF25BBB3A3ca3403256B3c703E5AB5d",
18104
18778
  Description: "Approve poUSDC to spend USDC",
18105
18779
  FunctionSelector: "0x095ea7b3",
18106
18780
  FunctionSignature: "approve(address,uint256)",
18107
- LeafDigest: "0xa4ff0f9069d415056a5ca71d6f564b3cb9948639de45f81830c44c3c13d5c0d6",
18108
- PackedArgumentAddresses: "0x12bf31955522bac337d93e1bc0a39f68d8bda216",
18109
- TargetAddress: "0xA0b86991c6218b36c1d19D4a2e9Eb0cE3606eB48"
18781
+ LeafDigest: "0x9461e89d49750d5907202338d134c6daddb0896535eae9c430d55d2cee82f59e",
18782
+ PackedArgumentAddresses: "0x7a5d178492dbdabcbbc6201d1021bee145d48604",
18783
+ TargetAddress: "0xFFFeD8254566B7F800f6D8CDb843ec75AE49B07A"
18110
18784
  },
18111
18785
  {
18112
- AddressArguments: ["0x236d0558f06cd60780b232d4Ec4c92d2cb7e4D18"],
18786
+ AddressArguments: ["0xdd7a8d6c6975488e801129bC84302d74e2361208"],
18113
18787
  CanSendValue: false,
18114
- DecoderAndSanitizerAddress: "0xC87c45d2dbE5acb56013e2591427ECC84Fa251E6",
18788
+ DecoderAndSanitizerAddress: "0xb899BE50BAF25BBB3A3ca3403256B3c703E5AB5d",
18115
18789
  Description: "Deposit USDC for poUSDC",
18116
18790
  FunctionSelector: "0x6e553f65",
18117
18791
  FunctionSignature: "deposit(uint256,address)",
18118
- LeafDigest: "0xbb2c673192faea1e2c7bcf47132061066ff342c42176e91889a5876d9ae3ef77",
18119
- PackedArgumentAddresses: "0x236d0558f06cd60780b232d4ec4c92d2cb7e4d18",
18120
- TargetAddress: "0x12bF31955522BAC337D93e1bC0a39F68D8BDa216"
18792
+ LeafDigest: "0x9c93ec90c7ea88615dd65b6ff43ac7f98ed84b1c140101cc2ccdf098e608c9be",
18793
+ PackedArgumentAddresses: "0xdd7a8d6c6975488e801129bc84302d74e2361208",
18794
+ TargetAddress: "0x7A5D178492dbdABcbBc6201D1021BEE145d48604"
18121
18795
  },
18122
18796
  {
18123
- AddressArguments: ["0x236d0558f06cd60780b232d4Ec4c92d2cb7e4D18", "0x236d0558f06cd60780b232d4Ec4c92d2cb7e4D18"],
18797
+ AddressArguments: ["0xdd7a8d6c6975488e801129bC84302d74e2361208", "0xdd7a8d6c6975488e801129bC84302d74e2361208"],
18124
18798
  CanSendValue: false,
18125
- DecoderAndSanitizerAddress: "0xC87c45d2dbE5acb56013e2591427ECC84Fa251E6",
18799
+ DecoderAndSanitizerAddress: "0xb899BE50BAF25BBB3A3ca3403256B3c703E5AB5d",
18126
18800
  Description: "Withdraw USDC from poUSDC",
18127
18801
  FunctionSelector: "0xb460af94",
18128
18802
  FunctionSignature: "withdraw(uint256,address,address)",
18129
- LeafDigest: "0x174f9b40456f664fa1a0f9f2fb904df68f567720f7453dd62195297240bfcaf7",
18130
- PackedArgumentAddresses: "0x236d0558f06cd60780b232d4ec4c92d2cb7e4d18236d0558f06cd60780b232d4ec4c92d2cb7e4d18",
18131
- TargetAddress: "0x12bF31955522BAC337D93e1bC0a39F68D8BDa216"
18803
+ LeafDigest: "0xad29e2070420c9e71c54289506f2bedf1db470c77e6162e1d6558e281ded2bff",
18804
+ PackedArgumentAddresses: "0xdd7a8d6c6975488e801129bc84302d74e2361208dd7a8d6c6975488e801129bc84302d74e2361208",
18805
+ TargetAddress: "0x7A5D178492dbdABcbBc6201D1021BEE145d48604"
18132
18806
  },
18133
18807
  {
18134
- AddressArguments: ["0x236d0558f06cd60780b232d4Ec4c92d2cb7e4D18", "0x236d0558f06cd60780b232d4Ec4c92d2cb7e4D18"],
18808
+ AddressArguments: ["0xdd7a8d6c6975488e801129bC84302d74e2361208", "0xdd7a8d6c6975488e801129bC84302d74e2361208"],
18135
18809
  CanSendValue: false,
18136
- DecoderAndSanitizerAddress: "0xC87c45d2dbE5acb56013e2591427ECC84Fa251E6",
18810
+ DecoderAndSanitizerAddress: "0xb899BE50BAF25BBB3A3ca3403256B3c703E5AB5d",
18137
18811
  Description: "Withdraw USDC from poUSDC (with open positions)",
18138
18812
  FunctionSelector: "0xe51161ba",
18139
18813
  FunctionSignature: "withdraw(uint256,address,address,uint256[],bool)",
18140
- LeafDigest: "0x6c17d228bfbb30e970580cfaf2503a7a205836f8120b536fe94623204ac3d100",
18141
- PackedArgumentAddresses: "0x236d0558f06cd60780b232d4ec4c92d2cb7e4d18236d0558f06cd60780b232d4ec4c92d2cb7e4d18",
18142
- TargetAddress: "0x12bF31955522BAC337D93e1bC0a39F68D8BDa216"
18814
+ LeafDigest: "0x38a43f1c9c27df6ee14372a33dd96c6a9bc3e2b401778d3ec21155a70cb513db",
18815
+ PackedArgumentAddresses: "0xdd7a8d6c6975488e801129bc84302d74e2361208dd7a8d6c6975488e801129bc84302d74e2361208",
18816
+ TargetAddress: "0x7A5D178492dbdABcbBc6201D1021BEE145d48604"
18143
18817
  },
18144
18818
  {
18145
- AddressArguments: ["0x236d0558f06cd60780b232d4Ec4c92d2cb7e4D18"],
18819
+ AddressArguments: ["0xdd7a8d6c6975488e801129bC84302d74e2361208"],
18146
18820
  CanSendValue: false,
18147
- DecoderAndSanitizerAddress: "0xC87c45d2dbE5acb56013e2591427ECC84Fa251E6",
18821
+ DecoderAndSanitizerAddress: "0xb899BE50BAF25BBB3A3ca3403256B3c703E5AB5d",
18148
18822
  Description: "Mint poUSDC using USDC",
18149
18823
  FunctionSelector: "0x94bf804d",
18150
18824
  FunctionSignature: "mint(uint256,address)",
18151
- LeafDigest: "0xb47becce43e16f164eeebe57151b3a474a5810fad1bad8c8c502c82a534a0398",
18152
- PackedArgumentAddresses: "0x236d0558f06cd60780b232d4ec4c92d2cb7e4d18",
18153
- TargetAddress: "0x12bF31955522BAC337D93e1bC0a39F68D8BDa216"
18825
+ LeafDigest: "0x562c2d451550cc51d46d40c3dc94c3e087a52562fdc46b304dca2ab88f4e19a8",
18826
+ PackedArgumentAddresses: "0xdd7a8d6c6975488e801129bc84302d74e2361208",
18827
+ TargetAddress: "0x7A5D178492dbdABcbBc6201D1021BEE145d48604"
18154
18828
  },
18155
18829
  {
18156
- AddressArguments: ["0x236d0558f06cd60780b232d4Ec4c92d2cb7e4D18", "0x236d0558f06cd60780b232d4Ec4c92d2cb7e4D18"],
18830
+ AddressArguments: ["0xdd7a8d6c6975488e801129bC84302d74e2361208", "0xdd7a8d6c6975488e801129bC84302d74e2361208"],
18157
18831
  CanSendValue: false,
18158
- DecoderAndSanitizerAddress: "0xC87c45d2dbE5acb56013e2591427ECC84Fa251E6",
18832
+ DecoderAndSanitizerAddress: "0xb899BE50BAF25BBB3A3ca3403256B3c703E5AB5d",
18159
18833
  Description: "Redeem poUSDC for USDC",
18160
18834
  FunctionSelector: "0xba087652",
18161
18835
  FunctionSignature: "redeem(uint256,address,address)",
18162
- LeafDigest: "0xc91cc83e9b2230b47bb390d3be17407f42c3b9348cc6596803c269dec49e8d51",
18163
- PackedArgumentAddresses: "0x236d0558f06cd60780b232d4ec4c92d2cb7e4d18236d0558f06cd60780b232d4ec4c92d2cb7e4d18",
18164
- TargetAddress: "0x12bF31955522BAC337D93e1bC0a39F68D8BDa216"
18836
+ LeafDigest: "0xd02acf42be262c0a898ec5ac6d5915b9bdbc9ab17b6901e1724869dee69b8a77",
18837
+ PackedArgumentAddresses: "0xdd7a8d6c6975488e801129bc84302d74e2361208dd7a8d6c6975488e801129bc84302d74e2361208",
18838
+ TargetAddress: "0x7A5D178492dbdABcbBc6201D1021BEE145d48604"
18165
18839
  },
18166
18840
  {
18167
18841
  AddressArguments: [],
18168
18842
  CanSendValue: false,
18169
- DecoderAndSanitizerAddress: "0xC87c45d2dbE5acb56013e2591427ECC84Fa251E6",
18843
+ DecoderAndSanitizerAddress: "0xb899BE50BAF25BBB3A3ca3403256B3c703E5AB5d",
18170
18844
  Description: "Dispatch mint/burn options on PanopticPool",
18171
18845
  FunctionSelector: "0xc25813aa",
18172
18846
  FunctionSignature: "dispatch(uint256[],uint256[],uint128[],int24[3][],bool,uint256)",
18173
- LeafDigest: "0xf5cc741985c1ce6b1af02be04696bd5944097198abf5ce09945a956143b14e6d",
18847
+ LeafDigest: "0x4e91b56ed66af11f559e469d2d2fd362ae4344e8e27ea088ecb69f6602917937",
18174
18848
  PackedArgumentAddresses: "0x",
18175
- TargetAddress: "0x00000000563b70d704f4c6675a5f6ac989fbae13"
18176
- },
18177
- {
18178
- AddressArguments: ["0x236d0558f06cd60780b232d4Ec4c92d2cb7e4D18", "0x236d0558f06cd60780b232d4Ec4c92d2cb7e4D18"],
18179
- CanSendValue: false,
18180
- DecoderAndSanitizerAddress: "0xC87c45d2dbE5acb56013e2591427ECC84Fa251E6",
18181
- Description: "Withdraw ETH from poETH",
18182
- FunctionSelector: "0xb460af94",
18183
- FunctionSignature: "withdraw(uint256,address,address)",
18184
- LeafDigest: "0xb5731bb52d9dccf49773020a8ddc59afbf937d6e203ef104e085f94f18b50e9b",
18185
- PackedArgumentAddresses: "0x236d0558f06cd60780b232d4ec4c92d2cb7e4d18236d0558f06cd60780b232d4ec4c92d2cb7e4d18",
18186
- TargetAddress: "0x1e46b0289B7E0F710E2Db8Ab87800dd782D624f7"
18849
+ TargetAddress: "0x03AFf7Be6A5afB2bC6830BC54778AF674006850A"
18187
18850
  },
18188
18851
  {
18189
- AddressArguments: ["0x236d0558f06cd60780b232d4Ec4c92d2cb7e4D18", "0x236d0558f06cd60780b232d4Ec4c92d2cb7e4D18"],
18190
- CanSendValue: false,
18191
- DecoderAndSanitizerAddress: "0xC87c45d2dbE5acb56013e2591427ECC84Fa251E6",
18192
- Description: "Withdraw ETH from poETH (with open positions)",
18193
- FunctionSelector: "0xe51161ba",
18194
- FunctionSignature: "withdraw(uint256,address,address,uint256[],bool)",
18195
- LeafDigest: "0xa600a5aea3b025f316a4cc99e16c188953aeca6e1bf347d6b2ea8f549b859689",
18196
- PackedArgumentAddresses: "0x236d0558f06cd60780b232d4ec4c92d2cb7e4d18236d0558f06cd60780b232d4ec4c92d2cb7e4d18",
18197
- TargetAddress: "0x1e46b0289B7E0F710E2Db8Ab87800dd782D624f7"
18198
- },
18199
- {
18200
- AddressArguments: ["0x141cc517a6276542B59732Fd85C1A2C536eF7aCA"],
18201
- CanSendValue: false,
18202
- DecoderAndSanitizerAddress: "0xC87c45d2dbE5acb56013e2591427ECC84Fa251E6",
18203
- Description: "Approve wSPCXx poUSDC to spend USDC",
18204
- FunctionSelector: "0x095ea7b3",
18205
- FunctionSignature: "approve(address,uint256)",
18206
- LeafDigest: "0x51f664e3fbdd3e6780eebf725f83871971fedbc1344987982349ae6d636e04df",
18207
- PackedArgumentAddresses: "0x141cc517a6276542b59732fd85c1a2c536ef7aca",
18208
- TargetAddress: "0xA0b86991c6218b36c1d19D4a2e9Eb0cE3606eB48"
18209
- },
18210
- {
18211
- AddressArguments: ["0x236d0558f06cd60780b232d4Ec4c92d2cb7e4D18"],
18212
- CanSendValue: false,
18213
- DecoderAndSanitizerAddress: "0xC87c45d2dbE5acb56013e2591427ECC84Fa251E6",
18214
- Description: "Deposit USDC for wSPCXx poUSDC",
18215
- FunctionSelector: "0x6e553f65",
18216
- FunctionSignature: "deposit(uint256,address)",
18217
- LeafDigest: "0xb8baaad70acd2686ec36c69277ae1e53e2e5f515a3a6087187cfb6c00ec9f322",
18218
- PackedArgumentAddresses: "0x236d0558f06cd60780b232d4ec4c92d2cb7e4d18",
18219
- TargetAddress: "0x141cc517a6276542B59732Fd85C1A2C536eF7aCA"
18220
- },
18221
- {
18222
- AddressArguments: ["0x236d0558f06cd60780b232d4Ec4c92d2cb7e4D18", "0x236d0558f06cd60780b232d4Ec4c92d2cb7e4D18"],
18223
- CanSendValue: false,
18224
- DecoderAndSanitizerAddress: "0xC87c45d2dbE5acb56013e2591427ECC84Fa251E6",
18225
- Description: "Withdraw USDC from wSPCXx poUSDC",
18226
- FunctionSelector: "0xb460af94",
18227
- FunctionSignature: "withdraw(uint256,address,address)",
18228
- LeafDigest: "0x4ede52d99a5e4722726abc80a939e2f94268cfb2a0584a184bcae79a1c6c82c2",
18229
- PackedArgumentAddresses: "0x236d0558f06cd60780b232d4ec4c92d2cb7e4d18236d0558f06cd60780b232d4ec4c92d2cb7e4d18",
18230
- TargetAddress: "0x141cc517a6276542B59732Fd85C1A2C536eF7aCA"
18231
- },
18232
- {
18233
- AddressArguments: [],
18234
- CanSendValue: false,
18235
- DecoderAndSanitizerAddress: "0x0000000000000000000000000000000000000000",
18236
- Description: "",
18237
- FunctionSelector: "0xc5d24601",
18238
- FunctionSignature: "",
18239
- LeafDigest: "0xa7a0fd846665d92e66be6155c6221b3acd7145ca7c4e4b67a594e4c516969400",
18240
- PackedArgumentAddresses: "0x",
18241
- TargetAddress: "0x0000000000000000000000000000000000000000"
18242
- },
18243
- {
18244
- AddressArguments: [],
18245
- CanSendValue: false,
18246
- DecoderAndSanitizerAddress: "0x0000000000000000000000000000000000000000",
18247
- Description: "",
18248
- FunctionSelector: "0xc5d24601",
18249
- FunctionSignature: "",
18250
- LeafDigest: "0xa7a0fd846665d92e66be6155c6221b3acd7145ca7c4e4b67a594e4c516969400",
18251
- PackedArgumentAddresses: "0x",
18252
- TargetAddress: "0x0000000000000000000000000000000000000000"
18253
- },
18254
- {
18255
- AddressArguments: [],
18256
- CanSendValue: false,
18257
- DecoderAndSanitizerAddress: "0x0000000000000000000000000000000000000000",
18258
- Description: "",
18259
- FunctionSelector: "0xc5d24601",
18260
- FunctionSignature: "",
18261
- LeafDigest: "0xa7a0fd846665d92e66be6155c6221b3acd7145ca7c4e4b67a594e4c516969400",
18262
- PackedArgumentAddresses: "0x",
18263
- TargetAddress: "0x0000000000000000000000000000000000000000"
18264
- },
18265
- {
18266
- AddressArguments: [],
18267
- CanSendValue: false,
18268
- DecoderAndSanitizerAddress: "0x0000000000000000000000000000000000000000",
18269
- Description: "",
18270
- FunctionSelector: "0xc5d24601",
18271
- FunctionSignature: "",
18272
- LeafDigest: "0xa7a0fd846665d92e66be6155c6221b3acd7145ca7c4e4b67a594e4c516969400",
18273
- PackedArgumentAddresses: "0x",
18274
- TargetAddress: "0x0000000000000000000000000000000000000000"
18275
- }
18276
- ],
18277
- MerkleTree: {
18278
- "0": ["0xed7d4ae055fd62c6edc93bd676456748f52fe4f4b78f60ab3ef6394bacc31b5d"],
18279
- "1": ["0xfdd68e4155c3f0143529939165390a7717848d745d5848b5de5dcbabc28e5bbb", "0x559d6a628cef4d55eabf143e84c270be2c3f61e236c2c36115fc29ebadc30bfa"],
18280
- "2": [
18281
- "0x03ddbd298d0afd4b181cc56a653fcd6c4cc6124edba7ffcea1cf9abc1396b34a",
18282
- "0x5a78f5fea4886abf9b990cb11d6c97d8d90fa3aef528289cd2c7da07f7188d15",
18283
- "0x67b572f27c64d564c387cf62d05e228ee073dedf11cfad4f95ca78d2673354ce",
18284
- "0x849eda7a295b642e5ddaf49a30eec4470cf507efa83b4104c0752d069c7638fe"
18285
- ],
18286
- "3": [
18287
- "0xa48323079d50b7688f97c97276fe33bcc23c3664b0a94aa9f24162ad63e4c622",
18288
- "0x9604e6ac6ac45ac3ec61d6ab2b52d96aeb9025c8e90cf93f7411b9c9a9dda29b",
18289
- "0xa22cac1a8d963fd80eecce587c5833c77d944bc1dfaace739c66421431823263",
18290
- "0x6bab63ba855d0ba1ef5fc9c8058253f278aec18f88be21d95b7cb11097d11e8a",
18291
- "0x20b3b7048a0735825b5cb83b931b60eb4bbbd1c68c8466d86df5ae72361d5da4",
18292
- "0xa0e8444c994231a2893a69086326624b42ad2973144580795d00406bb36b0b3f",
18293
- "0xc5a36f3b7b955966d5ed3135dcc612f978306d73bce3697e230afae57fbaeeba",
18294
- "0xc5a36f3b7b955966d5ed3135dcc612f978306d73bce3697e230afae57fbaeeba"
18295
- ],
18296
- "4": [
18297
- "0xa4ff0f9069d415056a5ca71d6f564b3cb9948639de45f81830c44c3c13d5c0d6",
18298
- "0xbb2c673192faea1e2c7bcf47132061066ff342c42176e91889a5876d9ae3ef77",
18299
- "0x174f9b40456f664fa1a0f9f2fb904df68f567720f7453dd62195297240bfcaf7",
18300
- "0x6c17d228bfbb30e970580cfaf2503a7a205836f8120b536fe94623204ac3d100",
18301
- "0xb47becce43e16f164eeebe57151b3a474a5810fad1bad8c8c502c82a534a0398",
18302
- "0xc91cc83e9b2230b47bb390d3be17407f42c3b9348cc6596803c269dec49e8d51",
18303
- "0xf5cc741985c1ce6b1af02be04696bd5944097198abf5ce09945a956143b14e6d",
18304
- "0xb5731bb52d9dccf49773020a8ddc59afbf937d6e203ef104e085f94f18b50e9b",
18305
- "0xa600a5aea3b025f316a4cc99e16c188953aeca6e1bf347d6b2ea8f549b859689",
18306
- "0x51f664e3fbdd3e6780eebf725f83871971fedbc1344987982349ae6d636e04df",
18307
- "0xb8baaad70acd2686ec36c69277ae1e53e2e5f515a3a6087187cfb6c00ec9f322",
18308
- "0x4ede52d99a5e4722726abc80a939e2f94268cfb2a0584a184bcae79a1c6c82c2",
18309
- "0xa7a0fd846665d92e66be6155c6221b3acd7145ca7c4e4b67a594e4c516969400",
18310
- "0xa7a0fd846665d92e66be6155c6221b3acd7145ca7c4e4b67a594e4c516969400",
18311
- "0xa7a0fd846665d92e66be6155c6221b3acd7145ca7c4e4b67a594e4c516969400",
18312
- "0xa7a0fd846665d92e66be6155c6221b3acd7145ca7c4e4b67a594e4c516969400"
18313
- ]
18314
- }
18315
- };
18316
-
18317
- //#endregion
18318
- //#region src/hypoVault/hypoVaultManagerArtifacts/MainnetWETHPLPStrategistLeaves.ts
18319
- const MainnetWETHPLPStrategistLeaves = {
18320
- metadata: {
18321
- AccountantAddress: "0x65aA902AE3135658587FFC36ED51B61c927114e1",
18322
- BoringVaultAddress: "0xd4e2c720a760049cc4151bcf61e3a9348db9cd92",
18323
- DecoderAndSanitizerAddress: "0xC87c45d2dbE5acb56013e2591427ECC84Fa251E6",
18324
- DigestComposition: [
18325
- "Bytes20(DECODER_AND_SANITIZER_ADDRESS)",
18326
- "Bytes20(TARGET_ADDRESS)",
18327
- "Bytes1(CAN_SEND_VALUE)",
18328
- "Bytes4(TARGET_FUNCTION_SELECTOR)",
18329
- "Bytes{N*20}(ADDRESS_ARGUMENT_0,...,ADDRESS_ARGUMENT_N)"
18330
- ],
18331
- LeafCount: 10,
18332
- ManageRoot: "0x14c4c96cc3730452ce71a447bdde6132f81acec862098a9ddd5e086805046a07",
18333
- ManagerAddress: "0xB6Fc48e658C9B1a7dbdFA51A5E153ab60BB2e04d",
18334
- TreeCapacity: 16
18335
- },
18336
- leafs: [
18337
- {
18338
- AddressArguments: ["0xd4e2c720a760049cc4151bcf61e3a9348db9cd92"],
18339
- CanSendValue: true,
18340
- DecoderAndSanitizerAddress: "0xC87c45d2dbE5acb56013e2591427ECC84Fa251E6",
18341
- Description: "Deposit ETH for poETH (payable)",
18342
- FunctionSelector: "0x6e553f65",
18343
- FunctionSignature: "deposit(uint256,address)",
18344
- LeafDigest: "0xcde717428f55a23f1c5590ae350e411a96f376207e4cd74f2ad261072915782c",
18345
- PackedArgumentAddresses: "0xd4e2c720a760049cc4151bcf61e3a9348db9cd92",
18346
- TargetAddress: "0x1e46b0289B7E0F710E2Db8Ab87800dd782D624f7"
18347
- },
18348
- {
18349
- AddressArguments: ["0xd4e2c720a760049cc4151bcf61e3a9348db9cd92", "0xd4e2c720a760049cc4151bcf61e3a9348db9cd92"],
18350
- CanSendValue: false,
18351
- DecoderAndSanitizerAddress: "0xC87c45d2dbE5acb56013e2591427ECC84Fa251E6",
18352
- Description: "Withdraw ETH from poETH",
18353
- FunctionSelector: "0xb460af94",
18354
- FunctionSignature: "withdraw(uint256,address,address)",
18355
- LeafDigest: "0xcebfac0106f9d33ca5766a2f6054eeb9df218af39b9f87a446a54674481caa4f",
18356
- PackedArgumentAddresses: "0xd4e2c720a760049cc4151bcf61e3a9348db9cd92d4e2c720a760049cc4151bcf61e3a9348db9cd92",
18357
- TargetAddress: "0x1e46b0289B7E0F710E2Db8Ab87800dd782D624f7"
18358
- },
18359
- {
18360
- AddressArguments: ["0xd4e2c720a760049cc4151bcf61e3a9348db9cd92", "0xd4e2c720a760049cc4151bcf61e3a9348db9cd92"],
18361
- CanSendValue: false,
18362
- DecoderAndSanitizerAddress: "0xC87c45d2dbE5acb56013e2591427ECC84Fa251E6",
18363
- Description: "Withdraw ETH from poETH (with open positions)",
18364
- FunctionSelector: "0xe51161ba",
18365
- FunctionSignature: "withdraw(uint256,address,address,uint256[],bool)",
18366
- LeafDigest: "0x6eacf89fb24e20afd26b47bc704571a6ae14675623678caf767ff4167b989b94",
18367
- PackedArgumentAddresses: "0xd4e2c720a760049cc4151bcf61e3a9348db9cd92d4e2c720a760049cc4151bcf61e3a9348db9cd92",
18368
- TargetAddress: "0x1e46b0289B7E0F710E2Db8Ab87800dd782D624f7"
18369
- },
18370
- {
18371
- AddressArguments: ["0xd4e2c720a760049cc4151bcf61e3a9348db9cd92"],
18372
- CanSendValue: true,
18373
- DecoderAndSanitizerAddress: "0xC87c45d2dbE5acb56013e2591427ECC84Fa251E6",
18374
- Description: "Mint poETH using ETH (payable)",
18375
- FunctionSelector: "0x94bf804d",
18376
- FunctionSignature: "mint(uint256,address)",
18377
- LeafDigest: "0x2393ae33b276888f3402cd9be5ac50c99f6c093ab26d76309fcde84f32ac5779",
18378
- PackedArgumentAddresses: "0xd4e2c720a760049cc4151bcf61e3a9348db9cd92",
18379
- TargetAddress: "0x1e46b0289B7E0F710E2Db8Ab87800dd782D624f7"
18380
- },
18381
- {
18382
- AddressArguments: ["0xd4e2c720a760049cc4151bcf61e3a9348db9cd92", "0xd4e2c720a760049cc4151bcf61e3a9348db9cd92"],
18383
- CanSendValue: false,
18384
- DecoderAndSanitizerAddress: "0xC87c45d2dbE5acb56013e2591427ECC84Fa251E6",
18385
- Description: "Redeem poETH for ETH",
18386
- FunctionSelector: "0xba087652",
18387
- FunctionSignature: "redeem(uint256,address,address)",
18388
- LeafDigest: "0x7560d3271ed5c3e12cf98e16f3e6810c35a9da7ade8642ce4f4047012f768ae4",
18389
- PackedArgumentAddresses: "0xd4e2c720a760049cc4151bcf61e3a9348db9cd92d4e2c720a760049cc4151bcf61e3a9348db9cd92",
18390
- TargetAddress: "0x1e46b0289B7E0F710E2Db8Ab87800dd782D624f7"
18391
- },
18392
- {
18393
- AddressArguments: [],
18394
- CanSendValue: false,
18395
- DecoderAndSanitizerAddress: "0xC87c45d2dbE5acb56013e2591427ECC84Fa251E6",
18396
- Description: "Dispatch mint/burn options on PanopticPool",
18397
- FunctionSelector: "0xc25813aa",
18398
- FunctionSignature: "dispatch(uint256[],uint256[],uint128[],int24[3][],bool,uint256)",
18399
- LeafDigest: "0xf5cc741985c1ce6b1af02be04696bd5944097198abf5ce09945a956143b14e6d",
18400
- PackedArgumentAddresses: "0x",
18401
- TargetAddress: "0x00000000563b70d704f4c6675a5f6ac989fbae13"
18402
- },
18403
- {
18404
- AddressArguments: [],
18405
- CanSendValue: true,
18406
- DecoderAndSanitizerAddress: "0xC87c45d2dbE5acb56013e2591427ECC84Fa251E6",
18407
- Description: "Wrap ETH to WETH",
18408
- FunctionSelector: "0xd0e30db0",
18409
- FunctionSignature: "deposit()",
18410
- LeafDigest: "0x89484d127bf05d2f4fcc56181335b8d87023e41ccc81c042e9f922f578f1471b",
18411
- PackedArgumentAddresses: "0x",
18412
- TargetAddress: "0xC02aaA39b223FE8D0A0e5C4F27eAD9083C756Cc2"
18413
- },
18414
- {
18415
- AddressArguments: [],
18416
- CanSendValue: false,
18417
- DecoderAndSanitizerAddress: "0xC87c45d2dbE5acb56013e2591427ECC84Fa251E6",
18418
- Description: "Unwrap WETH to ETH",
18419
- FunctionSelector: "0x2e1a7d4d",
18420
- FunctionSignature: "withdraw(uint256)",
18421
- LeafDigest: "0x7f94c593f64614a4739e3005bc02e9db203ded2796c3104cc7609ecbc89bc240",
18422
- PackedArgumentAddresses: "0x",
18423
- TargetAddress: "0xC02aaA39b223FE8D0A0e5C4F27eAD9083C756Cc2"
18424
- },
18425
- {
18426
- AddressArguments: ["0xd4e2c720a760049cc4151bcf61e3a9348db9cd92", "0xd4e2c720a760049cc4151bcf61e3a9348db9cd92"],
18427
- CanSendValue: false,
18428
- DecoderAndSanitizerAddress: "0xC87c45d2dbE5acb56013e2591427ECC84Fa251E6",
18429
- Description: "Withdraw USDC from poUSDC",
18430
- FunctionSelector: "0xb460af94",
18431
- FunctionSignature: "withdraw(uint256,address,address)",
18432
- LeafDigest: "0xa7b676c12e394da66e124d4611ddf107a1267f476fab0b3cbc3dc885a8e5a77c",
18433
- PackedArgumentAddresses: "0xd4e2c720a760049cc4151bcf61e3a9348db9cd92d4e2c720a760049cc4151bcf61e3a9348db9cd92",
18434
- TargetAddress: "0x12bF31955522BAC337D93e1bC0a39F68D8BDa216"
18435
- },
18436
- {
18437
- AddressArguments: ["0xd4e2c720a760049cc4151bcf61e3a9348db9cd92", "0xd4e2c720a760049cc4151bcf61e3a9348db9cd92"],
18438
- CanSendValue: false,
18439
- DecoderAndSanitizerAddress: "0xC87c45d2dbE5acb56013e2591427ECC84Fa251E6",
18440
- Description: "Withdraw USDC from poUSDC (with open positions)",
18441
- FunctionSelector: "0xe51161ba",
18442
- FunctionSignature: "withdraw(uint256,address,address,uint256[],bool)",
18443
- LeafDigest: "0x219732b5a811c3167d72323963327d5ea266e27575caecab2d1f35746f30a2f2",
18444
- PackedArgumentAddresses: "0xd4e2c720a760049cc4151bcf61e3a9348db9cd92d4e2c720a760049cc4151bcf61e3a9348db9cd92",
18445
- TargetAddress: "0x12bF31955522BAC337D93e1bC0a39F68D8BDa216"
18446
- },
18447
- {
18448
- AddressArguments: [],
18449
- CanSendValue: false,
18450
- DecoderAndSanitizerAddress: "0x0000000000000000000000000000000000000000",
18451
- Description: "",
18452
- FunctionSelector: "0xc5d24601",
18453
- FunctionSignature: "",
18454
- LeafDigest: "0xa7a0fd846665d92e66be6155c6221b3acd7145ca7c4e4b67a594e4c516969400",
18455
- PackedArgumentAddresses: "0x",
18456
- TargetAddress: "0x0000000000000000000000000000000000000000"
18457
- },
18458
- {
18459
- AddressArguments: [],
18460
- CanSendValue: false,
18461
- DecoderAndSanitizerAddress: "0x0000000000000000000000000000000000000000",
18462
- Description: "",
18463
- FunctionSelector: "0xc5d24601",
18464
- FunctionSignature: "",
18465
- LeafDigest: "0xa7a0fd846665d92e66be6155c6221b3acd7145ca7c4e4b67a594e4c516969400",
18466
- PackedArgumentAddresses: "0x",
18467
- TargetAddress: "0x0000000000000000000000000000000000000000"
18468
- },
18469
- {
18470
- AddressArguments: [],
18471
- CanSendValue: false,
18472
- DecoderAndSanitizerAddress: "0x0000000000000000000000000000000000000000",
18473
- Description: "",
18474
- FunctionSelector: "0xc5d24601",
18475
- FunctionSignature: "",
18476
- LeafDigest: "0xa7a0fd846665d92e66be6155c6221b3acd7145ca7c4e4b67a594e4c516969400",
18477
- PackedArgumentAddresses: "0x",
18478
- TargetAddress: "0x0000000000000000000000000000000000000000"
18479
- },
18480
- {
18481
- AddressArguments: [],
18482
- CanSendValue: false,
18483
- DecoderAndSanitizerAddress: "0x0000000000000000000000000000000000000000",
18484
- Description: "",
18485
- FunctionSelector: "0xc5d24601",
18486
- FunctionSignature: "",
18487
- LeafDigest: "0xa7a0fd846665d92e66be6155c6221b3acd7145ca7c4e4b67a594e4c516969400",
18488
- PackedArgumentAddresses: "0x",
18489
- TargetAddress: "0x0000000000000000000000000000000000000000"
18490
- },
18491
- {
18492
- AddressArguments: [],
18493
- CanSendValue: false,
18494
- DecoderAndSanitizerAddress: "0x0000000000000000000000000000000000000000",
18495
- Description: "",
18496
- FunctionSelector: "0xc5d24601",
18497
- FunctionSignature: "",
18498
- LeafDigest: "0xa7a0fd846665d92e66be6155c6221b3acd7145ca7c4e4b67a594e4c516969400",
18499
- PackedArgumentAddresses: "0x",
18500
- TargetAddress: "0x0000000000000000000000000000000000000000"
18501
- },
18502
- {
18503
- AddressArguments: [],
18504
- CanSendValue: false,
18505
- DecoderAndSanitizerAddress: "0x0000000000000000000000000000000000000000",
18506
- Description: "",
18507
- FunctionSelector: "0xc5d24601",
18508
- FunctionSignature: "",
18509
- LeafDigest: "0xa7a0fd846665d92e66be6155c6221b3acd7145ca7c4e4b67a594e4c516969400",
18510
- PackedArgumentAddresses: "0x",
18511
- TargetAddress: "0x0000000000000000000000000000000000000000"
18512
- }
18513
- ],
18514
- MerkleTree: {
18515
- "0": ["0x14c4c96cc3730452ce71a447bdde6132f81acec862098a9ddd5e086805046a07"],
18516
- "1": ["0xcd0defea21f2f5625ba2d231bce9500ad31a12181821c3e44a9eab8091726ef9", "0xb456d992b88713679d0f26a8212a362b552e0f1b8e8f4730ef9d93260658e6f4"],
18517
- "2": [
18518
- "0xd49b1154605f32b0e47658955ad9aa7f3fe8cd35358ee78a1cd96557e5c3aa4d",
18519
- "0x6522d66ec4944c055a9004873f1d3eab7c42ec8328cad32a43f7cf5626099576",
18520
- "0x106e1c4bfe0f35058431f70afe23aa18c131f9ed04c0e9442c15742800410377",
18521
- "0x849eda7a295b642e5ddaf49a30eec4470cf507efa83b4104c0752d069c7638fe"
18522
- ],
18523
- "3": [
18524
- "0xa6bf0406d4c1a9cc26bd7b8e443b3d933011eeed6f805e7f96c98f8ca7b6570c",
18525
- "0x1b4e0fc75d960683a9b652c9f9aa14ee22ba29685a3253a96bf65aea93934cee",
18526
- "0xc13cedfed63f868281097bfc4491f94573cf90c8d65c417aefc7c10ed03f60cf",
18527
- "0xe684b7c98715395e7d8478eb48587181872712495d41b47760ac5fe24211fc5e",
18528
- "0x9c00f68592aac90ff74b0f87e48d5a3f0ca6108c0af23ed83cbbdab4ea49ffb6",
18529
- "0xc5a36f3b7b955966d5ed3135dcc612f978306d73bce3697e230afae57fbaeeba",
18530
- "0xc5a36f3b7b955966d5ed3135dcc612f978306d73bce3697e230afae57fbaeeba",
18531
- "0xc5a36f3b7b955966d5ed3135dcc612f978306d73bce3697e230afae57fbaeeba"
18532
- ],
18533
- "4": [
18534
- "0xcde717428f55a23f1c5590ae350e411a96f376207e4cd74f2ad261072915782c",
18535
- "0xcebfac0106f9d33ca5766a2f6054eeb9df218af39b9f87a446a54674481caa4f",
18536
- "0x6eacf89fb24e20afd26b47bc704571a6ae14675623678caf767ff4167b989b94",
18537
- "0x2393ae33b276888f3402cd9be5ac50c99f6c093ab26d76309fcde84f32ac5779",
18538
- "0x7560d3271ed5c3e12cf98e16f3e6810c35a9da7ade8642ce4f4047012f768ae4",
18539
- "0xf5cc741985c1ce6b1af02be04696bd5944097198abf5ce09945a956143b14e6d",
18540
- "0x89484d127bf05d2f4fcc56181335b8d87023e41ccc81c042e9f922f578f1471b",
18541
- "0x7f94c593f64614a4739e3005bc02e9db203ded2796c3104cc7609ecbc89bc240",
18542
- "0xa7b676c12e394da66e124d4611ddf107a1267f476fab0b3cbc3dc885a8e5a77c",
18543
- "0x219732b5a811c3167d72323963327d5ea266e27575caecab2d1f35746f30a2f2",
18544
- "0xa7a0fd846665d92e66be6155c6221b3acd7145ca7c4e4b67a594e4c516969400",
18545
- "0xa7a0fd846665d92e66be6155c6221b3acd7145ca7c4e4b67a594e4c516969400",
18546
- "0xa7a0fd846665d92e66be6155c6221b3acd7145ca7c4e4b67a594e4c516969400",
18547
- "0xa7a0fd846665d92e66be6155c6221b3acd7145ca7c4e4b67a594e4c516969400",
18548
- "0xa7a0fd846665d92e66be6155c6221b3acd7145ca7c4e4b67a594e4c516969400",
18549
- "0xa7a0fd846665d92e66be6155c6221b3acd7145ca7c4e4b67a594e4c516969400"
18550
- ]
18551
- }
18552
- };
18553
-
18554
- //#endregion
18555
- //#region src/hypoVault/hypoVaultManagerArtifacts/SepoliaUSDCPLPStrategistLeaves.ts
18556
- const SepoliaUSDCPLPStrategistLeaves = {
18557
- metadata: {
18558
- AccountantAddress: "0x25BBef1DF262c24aa1AACD1F7eCeEcc1a7AD08ab",
18559
- BoringVaultAddress: "0xdd7a8d6c6975488e801129bC84302d74e2361208",
18560
- DecoderAndSanitizerAddress: "0xb899BE50BAF25BBB3A3ca3403256B3c703E5AB5d",
18561
- DigestComposition: [
18562
- "Bytes20(DECODER_AND_SANITIZER_ADDRESS)",
18563
- "Bytes20(TARGET_ADDRESS)",
18564
- "Bytes1(CAN_SEND_VALUE)",
18565
- "Bytes4(TARGET_FUNCTION_SELECTOR)",
18566
- "Bytes{N*20}(ADDRESS_ARGUMENT_0,...,ADDRESS_ARGUMENT_N)"
18567
- ],
18568
- LeafCount: 7,
18569
- ManageRoot: "0xa1b9500717e9d72ec1ccd50a4eba78b7d076bb7a528bec91ef95120057dddb09",
18570
- ManagerAddress: "0xFB5aa3e0b46F3859D90B14b52ffd287013b5Ec53",
18571
- TreeCapacity: 8
18572
- },
18573
- leafs: [
18574
- {
18575
- AddressArguments: ["0x7A5D178492dbdABcbBc6201D1021BEE145d48604"],
18576
- CanSendValue: false,
18577
- DecoderAndSanitizerAddress: "0xb899BE50BAF25BBB3A3ca3403256B3c703E5AB5d",
18578
- Description: "Approve poUSDC to spend USDC",
18579
- FunctionSelector: "0x095ea7b3",
18580
- FunctionSignature: "approve(address,uint256)",
18581
- LeafDigest: "0x9461e89d49750d5907202338d134c6daddb0896535eae9c430d55d2cee82f59e",
18582
- PackedArgumentAddresses: "0x7a5d178492dbdabcbbc6201d1021bee145d48604",
18583
- TargetAddress: "0xFFFeD8254566B7F800f6D8CDb843ec75AE49B07A"
18584
- },
18585
- {
18586
- AddressArguments: ["0xdd7a8d6c6975488e801129bC84302d74e2361208"],
18587
- CanSendValue: false,
18588
- DecoderAndSanitizerAddress: "0xb899BE50BAF25BBB3A3ca3403256B3c703E5AB5d",
18589
- Description: "Deposit USDC for poUSDC",
18590
- FunctionSelector: "0x6e553f65",
18591
- FunctionSignature: "deposit(uint256,address)",
18592
- LeafDigest: "0x9c93ec90c7ea88615dd65b6ff43ac7f98ed84b1c140101cc2ccdf098e608c9be",
18593
- PackedArgumentAddresses: "0xdd7a8d6c6975488e801129bc84302d74e2361208",
18594
- TargetAddress: "0x7A5D178492dbdABcbBc6201D1021BEE145d48604"
18595
- },
18596
- {
18597
- AddressArguments: ["0xdd7a8d6c6975488e801129bC84302d74e2361208", "0xdd7a8d6c6975488e801129bC84302d74e2361208"],
18598
- CanSendValue: false,
18599
- DecoderAndSanitizerAddress: "0xb899BE50BAF25BBB3A3ca3403256B3c703E5AB5d",
18600
- Description: "Withdraw USDC from poUSDC",
18601
- FunctionSelector: "0xb460af94",
18602
- FunctionSignature: "withdraw(uint256,address,address)",
18603
- LeafDigest: "0xad29e2070420c9e71c54289506f2bedf1db470c77e6162e1d6558e281ded2bff",
18604
- PackedArgumentAddresses: "0xdd7a8d6c6975488e801129bc84302d74e2361208dd7a8d6c6975488e801129bc84302d74e2361208",
18605
- TargetAddress: "0x7A5D178492dbdABcbBc6201D1021BEE145d48604"
18606
- },
18607
- {
18608
- AddressArguments: ["0xdd7a8d6c6975488e801129bC84302d74e2361208", "0xdd7a8d6c6975488e801129bC84302d74e2361208"],
18609
- CanSendValue: false,
18610
- DecoderAndSanitizerAddress: "0xb899BE50BAF25BBB3A3ca3403256B3c703E5AB5d",
18611
- Description: "Withdraw USDC from poUSDC (with open positions)",
18612
- FunctionSelector: "0xe51161ba",
18613
- FunctionSignature: "withdraw(uint256,address,address,uint256[],bool)",
18614
- LeafDigest: "0x38a43f1c9c27df6ee14372a33dd96c6a9bc3e2b401778d3ec21155a70cb513db",
18615
- PackedArgumentAddresses: "0xdd7a8d6c6975488e801129bc84302d74e2361208dd7a8d6c6975488e801129bc84302d74e2361208",
18616
- TargetAddress: "0x7A5D178492dbdABcbBc6201D1021BEE145d48604"
18617
- },
18618
- {
18619
- AddressArguments: ["0xdd7a8d6c6975488e801129bC84302d74e2361208"],
18620
- CanSendValue: false,
18621
- DecoderAndSanitizerAddress: "0xb899BE50BAF25BBB3A3ca3403256B3c703E5AB5d",
18622
- Description: "Mint poUSDC using USDC",
18623
- FunctionSelector: "0x94bf804d",
18624
- FunctionSignature: "mint(uint256,address)",
18625
- LeafDigest: "0x562c2d451550cc51d46d40c3dc94c3e087a52562fdc46b304dca2ab88f4e19a8",
18626
- PackedArgumentAddresses: "0xdd7a8d6c6975488e801129bc84302d74e2361208",
18627
- TargetAddress: "0x7A5D178492dbdABcbBc6201D1021BEE145d48604"
18628
- },
18629
- {
18630
- AddressArguments: ["0xdd7a8d6c6975488e801129bC84302d74e2361208", "0xdd7a8d6c6975488e801129bC84302d74e2361208"],
18631
- CanSendValue: false,
18632
- DecoderAndSanitizerAddress: "0xb899BE50BAF25BBB3A3ca3403256B3c703E5AB5d",
18633
- Description: "Redeem poUSDC for USDC",
18634
- FunctionSelector: "0xba087652",
18635
- FunctionSignature: "redeem(uint256,address,address)",
18636
- LeafDigest: "0xd02acf42be262c0a898ec5ac6d5915b9bdbc9ab17b6901e1724869dee69b8a77",
18637
- PackedArgumentAddresses: "0xdd7a8d6c6975488e801129bc84302d74e2361208dd7a8d6c6975488e801129bc84302d74e2361208",
18638
- TargetAddress: "0x7A5D178492dbdABcbBc6201D1021BEE145d48604"
18639
- },
18640
- {
18641
- AddressArguments: [],
18642
- CanSendValue: false,
18643
- DecoderAndSanitizerAddress: "0xb899BE50BAF25BBB3A3ca3403256B3c703E5AB5d",
18644
- Description: "Dispatch mint/burn options on PanopticPool",
18645
- FunctionSelector: "0xc25813aa",
18646
- FunctionSignature: "dispatch(uint256[],uint256[],uint128[],int24[3][],bool,uint256)",
18647
- LeafDigest: "0x4e91b56ed66af11f559e469d2d2fd362ae4344e8e27ea088ecb69f6602917937",
18648
- PackedArgumentAddresses: "0x",
18649
- TargetAddress: "0x03AFf7Be6A5afB2bC6830BC54778AF674006850A"
18650
- },
18651
- {
18652
- AddressArguments: [],
18852
+ AddressArguments: [],
18653
18853
  CanSendValue: false,
18654
18854
  DecoderAndSanitizerAddress: "0x0000000000000000000000000000000000000000",
18655
18855
  Description: "",
@@ -20147,7 +20347,13 @@ function createPlpManagerInputStrategy(minBlock) {
20147
20347
  minBlockNumber: minBlock,
20148
20348
  context: `PLP manager input for vault ${vault.id}`
20149
20349
  });
20150
- const poolInfos = getVaultPoolInfos(vaultAddress, chainId);
20350
+ const authorization = await resolveMainnetV3AuthorizationArtifacts({
20351
+ viemClient: client,
20352
+ chainId,
20353
+ vaultAddress,
20354
+ blockNumber
20355
+ });
20356
+ const poolInfos = authorization?.poolInfos ?? getVaultPoolInfos(vaultAddress, chainId);
20151
20357
  if (poolInfos.length === 0) return DEFAULT_MANAGER_INPUT;
20152
20358
  const tokenIds = candidates === void 0 ? await resolveVaultTokenIdsByPool({
20153
20359
  viemClient: client,
@@ -20159,7 +20365,13 @@ function createPlpManagerInputStrategy(minBlock) {
20159
20365
  }) : await verifyVaultOpenTokenIdsAtBlock({
20160
20366
  viemClient: client,
20161
20367
  vaultAddress,
20162
- candidatesByPool: candidates,
20368
+ candidatesByPool: poolInfos.map((poolInfo) => {
20369
+ const candidate = candidates.find((item) => item.poolAddress.toLowerCase() === poolInfo.pool.toLowerCase());
20370
+ return {
20371
+ poolAddress: poolInfo.pool,
20372
+ candidates: candidate?.candidates ?? []
20373
+ };
20374
+ }),
20163
20375
  blockNumber
20164
20376
  });
20165
20377
  const wethAddress = resolveChainWethAddress(chainId);
@@ -20530,6 +20742,17 @@ function findLeaf(artifact, description) {
20530
20742
  return leaf;
20531
20743
  }
20532
20744
  /**
20745
+ * Finds a pool-bound leaf by both its description and target contract.
20746
+ * Use this instead of findLeaf when an artifact can authorize the same action
20747
+ * on more than one Panoptic pool.
20748
+ */
20749
+ function findLeafForTarget(artifact, description, target) {
20750
+ const normalizedTarget = target.toLowerCase();
20751
+ const leaf = artifact.leafs.find((candidate) => candidate.Description === description && candidate.TargetAddress.toLowerCase() === normalizedTarget);
20752
+ if (!leaf) throw new Error(`Leaf not found: "${description}" for target ${target}`);
20753
+ return leaf;
20754
+ }
20755
+ /**
20533
20756
  * Transforms an array of ManageActions into the argument tuple required by
20534
20757
  * manageVaultWithMerkleVerification.
20535
20758
  *
@@ -20628,5 +20851,5 @@ function getAlchemyWsRpcUrl(chainId, alchemyApiKey) {
20628
20851
  }
20629
20852
 
20630
20853
  //#endregion
20631
- export { BASE_CHAIN_ID, BASE_DEPLOYMENT, BASE_ETH_USDC_5BPS_MARKET, BASE_HYPOVAULT_ADDRESSES, BASE_HYPOVAULT_CORE_ADDRESSES, BASE_HYPOVAULT_MANAGER_ADDRESSES, BASE_HYPOVAULT_MANAGER_TURNKEY_SIGNERS, BASE_PANOPTIC_POOL_ADDRESSES, BASE_PANOPTIC_V2_ADDRESSES, BORROW_INDEX_BITS, BPS_SCALE, BaseUSDCPLPStrategistLeaves, BaseUSDCPLPVaultPoolInfos, BaseWETHPLPStrategistLeaves, BaseWETHPLPVaultPoolInfos, CHAIN_DEPLOYMENTS, CollateralTrackerAbi, CollateralTrackerV1_1Abi, Erc1155Abi, Erc20Abi, HypoVaultAbi, HypoVaultManagerConfigSchema, HypoVaultManagerWithMerkleVerificationAbi, MAINNET_CHAIN_ID, MAINNET_DEPLOYMENT, MAINNET_PANOPTIC_V2_ADDRESSES, MARKET_EPOCH_BITS, MARKET_EPOCH_SHIFT, MainnetLegacyUSDCPLPStrategistLeaves, MainnetLegacyWETHPLPStrategistLeaves, MainnetUSDCPLPLegacyVaultPoolInfos, MainnetUSDCPLPStrategistLeaves, MainnetUSDCPLPVaultPoolInfos, MainnetWETHPLPLegacyVaultPoolInfos, MainnetWETHPLPStrategistLeaves, MainnetWETHPLPVaultPoolInfos, Multicall3Abi, NonFungiblePositionManagerAbi, PanopticFactoryV3Abi, PanopticFactoryV4Abi, PanopticHelperAbi, PanopticPoolAbi, PanopticPoolV1_1Abi, PanopticQueryV1_1Abi, PanopticVaultAccountantAbi, PanopticVaultAccountantManagerInputAbi, PoolManagerAbi, RATE_AT_TARGET_BITS, RescueDistributorAbi, SECONDS_PER_YEAR, SEPOLIA_CHAIN_ID, SEPOLIA_DEPLOYMENT, SEPOLIA_ETH_USDC_5BPS_MARKET, SEPOLIA_HYPOVAULT_ADDRESSES, SEPOLIA_HYPOVAULT_CORE_ADDRESSES, SEPOLIA_HYPOVAULT_MANAGER_ADDRESSES, SEPOLIA_HYPOVAULT_MANAGER_TURNKEY_SIGNERS, SEPOLIA_PANOPTIC_POOL_ADDRESSES, SEPOLIA_PANOPTIC_V2_ADDRESSES, SemiFungiblePositionManagerAbi, SemiFungiblePositionManagerV1_1Abi, SepoliaUSDCPLPStrategistLeaves, SepoliaUSDCPLPVaultPoolInfos, SepoliaWETHPLPStrategistLeaves, SepoliaWETHPLPVaultPoolInfos, Simple7702AccountAbi, StateViewAbi, UNREALIZED_INTEREST_BITS, UniswapHelperAbi, UniswapHelperV1_1Abi, UniswapMigratorAbi, UniswapV3FactoryAbi, UniswapV3PoolAbi, UsdcPlpVaultBaseProdConfig, UsdcPlpVaultMainnetLegacyConfig, UsdcPlpVaultMainnetProdConfig, UsdcPlpVaultSepoliaDevConfig, UsdcPlpVaultSepoliaProdConfig, VAULT_DISPLAY_NAMES_PER_CHAIN, VAULT_DISPLAY_NAME_RESOLVERS_PER_CHAIN, VaultApyPreInceptionBlockError, WAD, WETHAbi, WethPlpVaultBaseProdConfig, WethPlpVaultMainnetLegacyConfig, WethPlpVaultMainnetProdConfig, WethPlpVaultSepoliaDevConfig, WethPlpVaultSepoliaProdConfig, adjustUnderlyingIdleBalance, annualizePerSecondRateWad, buildClaimVaultShareCalldatas, buildExecuteDepositCalldatas, buildExecuteWithdrawalCalldatas, buildManageArgs, buildManagerInput, buildManagerInputAtBlock, buildRequestWithdrawalCalldatas, buildVaultManagerInput, buildVaultManagerInputAtBlock, builderFactoryAbi, builderWalletAbi, calculateAnnualizedApyPct, calculateAssetsFromShares, calculateAvailableShares, calculateClaimableAssetsFromQueuedWithdrawals, calculateClaimableSharesFromQueuedDeposits, calculateSharesFromAssets, calculateVaultNetLendingApyPctFromTrackerInputs, calculateVaultNetLendingYieldUnderlyingFromTrackerInputs, cancelDeposit, chainToHypoVaultGraphQlAPI, collateralTrackerV2Abi as collateralTrackerAbi, collateralTrackerV2Abi, computeSharePriceFromNavSnapshot, convertJsonTreeToArray, deriveSupplyRatePerSecWad, deriveVaultApyTimeseriesFromSharePrices, encodeApproveFunctionData, encodeCancelDepositFunctionData, encodeDepositFunctionData, encodeExecuteDepositFunctionData, encodeExecuteWithdrawalFunctionData, encodeExecuteWithdrawalMulticallFunctionData, encodeFulfillDepositsFunctionData, encodeFulfillWithdrawalsFunctionData, encodeRequestDepositFunctionData, encodeRequestWithdrawalFunctionData, encodeRequestWithdrawalMulticallFunctionData, encodeWithdrawFunctionData, executeWithdrawal, executeWithdrawalMulticall, fetchFirstDepositTimestampByVaultId, fetchVaultLendingAllocation, fetchVaultNetLendingApyPct, fetchVaultNetLendingYieldUnderlying, fetchVaultSharePriceSnapshot, findLeaf, formatPerSecondRateWadAsAprPct, formatPerSecondRateWadAsApyPct, generateProof, getAlchemyRpcUrl, getAlchemyWsRpcUrl, getCancelDepositContractConfig, getChainDeployment, getEthUsdcMarket, getExecuteWithdrawalContractConfig, getExecuteWithdrawalMulticallContractConfig, getHypoVaultConfigForVault, getHypoVaultGraphQLClient, getIrmCurrent, getIrmCurve, getLendingAllocationRows, getMinQueuedDepositEpoch, getProofsFromDigests, getProofsUsingTree, getRequestDepositContractConfig, getRequestWithdrawalContractConfig, getRequestWithdrawalMulticallContractConfig, getStaleOracleOverrideBytecodeForAccountant, getStaleOracleStateOverrideForAccountant, getVaultApyErrorMessage, getVaultApyStrategy, getVaultPoolInfos, isExpectedHistoricalReadMiss, isStaleOraclePriceError, isStaleOraclePriceReadError, isSupportedChain, packMarketState, panopticFactoryV4Abi as panopticFactoryAbi, panopticFactoryV3Abi, panopticFactoryV4Abi, panopticPoolV2Abi as panopticPoolAbi, panopticPoolV2Abi, panopticQueryAbi, parseCustomError, ratePerSecWadToAprPct, requestDeposit, requestWithdrawal, requestWithdrawalMulticall, requireChainDeployment, resolveVaultDisplayName, resolveVaultHistoricalCandidatesByPool, resolveVaultTokenIdsByPool, riskEngineAbi, semiFungiblePositionManagerV4Abi as semiFungiblePositionManagerAbi, semiFungiblePositionManagerV3Abi, semiFungiblePositionManagerV4Abi, setVaultApyStrategyOverride, simulateCancelDeposit, simulateExecuteWithdrawal, simulateExecuteWithdrawalMulticall, simulateRequestDeposit, simulateRequestWithdrawal, simulateRequestWithdrawalMulticall, useCancelDeposit, useClaimVaultShares, useExecuteWithdrawal, useRequestDeposit, useRequestWithdrawal, utilizationBpsToWad, utilizationPctToWad, verifyVaultOpenTokenIdsAtBlock };
20854
+ export { BASE_CHAIN_ID, BASE_DEPLOYMENT, BASE_ETH_USDC_5BPS_MARKET, BASE_HYPOVAULT_ADDRESSES, BASE_HYPOVAULT_CORE_ADDRESSES, BASE_HYPOVAULT_MANAGER_ADDRESSES, BASE_HYPOVAULT_MANAGER_TURNKEY_SIGNERS, BASE_PANOPTIC_POOL_ADDRESSES, BASE_PANOPTIC_V2_ADDRESSES, BORROW_INDEX_BITS, BPS_SCALE, BaseUSDCPLPStrategistLeaves, BaseUSDCPLPVaultPoolInfos, BaseWETHPLPStrategistLeaves, BaseWETHPLPVaultPoolInfos, CHAIN_DEPLOYMENTS, CollateralTrackerAbi, CollateralTrackerV1_1Abi, Erc1155Abi, Erc20Abi, HypoVaultAbi, HypoVaultManagerConfigSchema, HypoVaultManagerWithMerkleVerificationAbi, MAINNET_CHAIN_ID, MAINNET_DEPLOYMENT, MAINNET_ETH_USDC_5BPS_V3_PANOPTIC_POOL_ADDRESSES, MAINNET_PANOPTIC_V2_ADDRESSES, MAINNET_RISK_ENGINES, MARKET_EPOCH_BITS, MARKET_EPOCH_SHIFT, MainnetLegacyUSDCPLPStrategistLeaves, MainnetLegacyWETHPLPStrategistLeaves, MainnetUSDCPLPLegacyVaultPoolInfos, MainnetUSDCPLPPreviousStrategistLeaves, MainnetUSDCPLPPreviousVaultPoolInfos, MainnetUSDCPLPStrategistLeaves, MainnetUSDCPLPVaultPoolInfos, MainnetWETHPLPLegacyVaultPoolInfos, MainnetWETHPLPPreviousStrategistLeaves, MainnetWETHPLPPreviousVaultPoolInfos, MainnetWETHPLPStrategistLeaves, MainnetWETHPLPVaultPoolInfos, Multicall3Abi, NonFungiblePositionManagerAbi, PanopticFactoryV3Abi, PanopticFactoryV4Abi, PanopticHelperAbi, PanopticPoolAbi, PanopticPoolV1_1Abi, PanopticQueryV1_1Abi, PanopticVaultAccountantAbi, PanopticVaultAccountantManagerInputAbi, PoolManagerAbi, RATE_AT_TARGET_BITS, RescueDistributorAbi, SECONDS_PER_YEAR, SEPOLIA_CHAIN_ID, SEPOLIA_DEPLOYMENT, SEPOLIA_ETH_USDC_5BPS_MARKET, SEPOLIA_HYPOVAULT_ADDRESSES, SEPOLIA_HYPOVAULT_CORE_ADDRESSES, SEPOLIA_HYPOVAULT_MANAGER_ADDRESSES, SEPOLIA_HYPOVAULT_MANAGER_TURNKEY_SIGNERS, SEPOLIA_PANOPTIC_POOL_ADDRESSES, SEPOLIA_PANOPTIC_V2_ADDRESSES, SemiFungiblePositionManagerAbi, SemiFungiblePositionManagerV1_1Abi, SepoliaUSDCPLPStrategistLeaves, SepoliaUSDCPLPVaultPoolInfos, SepoliaWETHPLPStrategistLeaves, SepoliaWETHPLPVaultPoolInfos, Simple7702AccountAbi, StateViewAbi, UNREALIZED_INTEREST_BITS, UniswapHelperAbi, UniswapHelperV1_1Abi, UniswapMigratorAbi, UniswapV3FactoryAbi, UniswapV3PoolAbi, UsdcPlpVaultBaseProdConfig, UsdcPlpVaultMainnetLegacyConfig, UsdcPlpVaultMainnetProdConfig, UsdcPlpVaultSepoliaDevConfig, UsdcPlpVaultSepoliaProdConfig, VAULT_DISPLAY_NAMES_PER_CHAIN, VAULT_DISPLAY_NAME_RESOLVERS_PER_CHAIN, VaultApyPreInceptionBlockError, WAD, WETHAbi, WethPlpVaultBaseProdConfig, WethPlpVaultMainnetLegacyConfig, WethPlpVaultMainnetProdConfig, WethPlpVaultSepoliaDevConfig, WethPlpVaultSepoliaProdConfig, adjustUnderlyingIdleBalance, annualizePerSecondRateWad, buildClaimVaultShareCalldatas, buildExecuteDepositCalldatas, buildExecuteWithdrawalCalldatas, buildManageArgs, buildManagerInput, buildManagerInputAtBlock, buildRequestWithdrawalCalldatas, buildVaultManagerInput, buildVaultManagerInputAtBlock, builderFactoryAbi, builderWalletAbi, calculateAnnualizedApyPct, calculateAssetsFromShares, calculateAvailableShares, calculateClaimableAssetsFromQueuedWithdrawals, calculateClaimableSharesFromQueuedDeposits, calculateSharesFromAssets, calculateVaultNetLendingApyPctFromTrackerInputs, calculateVaultNetLendingYieldUnderlyingFromTrackerInputs, cancelDeposit, chainToHypoVaultGraphQlAPI, collateralTrackerV2Abi as collateralTrackerAbi, collateralTrackerV2Abi, computeSharePriceFromNavSnapshot, convertJsonTreeToArray, deriveSupplyRatePerSecWad, deriveVaultApyTimeseriesFromSharePrices, encodeApproveFunctionData, encodeCancelDepositFunctionData, encodeDepositFunctionData, encodeExecuteDepositFunctionData, encodeExecuteWithdrawalFunctionData, encodeExecuteWithdrawalMulticallFunctionData, encodeFulfillDepositsFunctionData, encodeFulfillWithdrawalsFunctionData, encodeRequestDepositFunctionData, encodeRequestWithdrawalFunctionData, encodeRequestWithdrawalMulticallFunctionData, encodeWithdrawFunctionData, executeWithdrawal, executeWithdrawalMulticall, fetchFirstDepositTimestampByVaultId, fetchVaultLendingAllocation, fetchVaultNetLendingApyPct, fetchVaultNetLendingYieldUnderlying, fetchVaultSharePriceSnapshot, findLeaf, findLeafForTarget, formatPerSecondRateWadAsAprPct, formatPerSecondRateWadAsApyPct, generateProof, getAlchemyRpcUrl, getAlchemyWsRpcUrl, getCancelDepositContractConfig, getChainDeployment, getEthUsdcMarket, getExecuteWithdrawalContractConfig, getExecuteWithdrawalMulticallContractConfig, getHypoVaultConfigForVault, getHypoVaultGraphQLClient, getIrmCurrent, getIrmCurve, getLendingAllocationRows, getMainnetV3AuthorizationGenerations, getMinQueuedDepositEpoch, getProofsFromDigests, getProofsUsingTree, getRequestDepositContractConfig, getRequestWithdrawalContractConfig, getRequestWithdrawalMulticallContractConfig, getStaleOracleOverrideBytecodeForAccountant, getStaleOracleStateOverrideForAccountant, getVaultApyErrorMessage, getVaultApyStrategy, getVaultPoolInfos, isExpectedHistoricalReadMiss, isStaleOraclePriceError, isStaleOraclePriceReadError, isSupportedChain, packMarketState, panopticFactoryV4Abi as panopticFactoryAbi, panopticFactoryV3Abi, panopticFactoryV4Abi, panopticPoolV2Abi as panopticPoolAbi, panopticPoolV2Abi, panopticQueryAbi, parseCustomError, ratePerSecWadToAprPct, requestDeposit, requestWithdrawal, requestWithdrawalMulticall, requireChainDeployment, resolveMainnetV3AuthorizationArtifacts, resolveVaultDisplayName, resolveVaultHistoricalCandidatesByPool, resolveVaultTokenIdsByPool, riskEngineAbi, semiFungiblePositionManagerV4Abi as semiFungiblePositionManagerAbi, semiFungiblePositionManagerV3Abi, semiFungiblePositionManagerV4Abi, setVaultApyStrategyOverride, simulateCancelDeposit, simulateExecuteWithdrawal, simulateExecuteWithdrawalMulticall, simulateRequestDeposit, simulateRequestWithdrawal, simulateRequestWithdrawalMulticall, useCancelDeposit, useClaimVaultShares, useExecuteWithdrawal, useRequestDeposit, useRequestWithdrawal, utilizationBpsToWad, utilizationPctToWad, verifyVaultOpenTokenIdsAtBlock };
20632
20855
  //# sourceMappingURL=index.js.map