@panoptic-eng/sdk 1.0.38 → 1.0.39
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/cow/index.d.ts +804 -5
- package/dist/cow/index.d.ts.map +1 -0
- package/dist/cow/index.js +5268 -5
- package/dist/cow/index.js.map +1 -0
- package/dist/{cow-DB8siv6M.js → cow-tRUtAUZy.js} +2 -3
- package/dist/{getTrackedPositionIds-zYPIs5dt.js → getTrackedPositionIds-ms3W9dYB.js} +1 -2
- package/dist/greeks-GysWXct-.js +1 -2
- package/dist/index.d.ts +5752 -4
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +11952 -2130
- package/dist/index.js.map +1 -1
- package/dist/{irm-ChkvYphK.js → irm-SPC2KxLA.js} +321 -3
- package/dist/panoptic/v2/greeks/index.d.ts +277 -4
- package/dist/panoptic/v2/greeks/index.d.ts.map +1 -0
- package/dist/panoptic/v2/greeks/index.js +620 -2
- package/dist/panoptic/v2/greeks/index.js.map +1 -0
- package/dist/panoptic/v2/index.d.ts +14633 -7
- package/dist/panoptic/v2/index.d.ts.map +1 -0
- package/dist/panoptic/v2/index.js +27875 -9
- package/dist/panoptic/v2/index.js.map +1 -0
- package/dist/panoptic/v2/react-public.d.ts +14779 -15
- package/dist/panoptic/v2/react-public.d.ts.map +1 -1
- package/dist/panoptic/v2/react-public.js +29463 -89
- package/dist/panoptic/v2/react-public.js.map +1 -1
- package/dist/{router-tCRa0ekE.js → router-BTfbaRfg.js} +2 -3
- package/dist/{router-BCUJkY8j.js → router-mLWy0MD9.js} +3 -4
- package/dist/test/index.d.ts +3 -3
- package/dist/test/index.d.ts.map +1 -1
- package/dist/test/index.js +2 -2
- package/dist/{transactionFees-CVi2TrJh.js → transactionFees-C_Qx07mx.js} +1 -2
- package/dist/uniswap/index.d.ts +813 -78
- package/dist/uniswap/index.d.ts.map +1 -1
- package/dist/uniswap/index.js +5884 -13
- package/dist/uniswap/index.js.map +1 -1
- package/dist/{v2-BxtzpUnV.js → v2-DG7qG6di.js} +4 -5
- package/dist/vault-transaction-fees.d.ts +63 -2
- package/dist/vault-transaction-fees.d.ts.map +1 -0
- package/dist/vault-transaction-fees.js +174 -2
- package/dist/vault-transaction-fees.js.map +1 -0
- package/dist/{writes-D3bj1wth.js → writes-Xp9Wa8GQ.js} +2 -3
- package/package.json +4 -3
- package/dist/cow/types.d.ts +0 -4
- package/dist/cow/types.js +0 -0
- package/dist/cow-DB8siv6M.js.map +0 -1
- package/dist/getTrackedPositionIds-zYPIs5dt.js.map +0 -1
- package/dist/greeks-GysWXct-.js.map +0 -1
- package/dist/hypoVault/vaultDisplayNames.d.ts +0 -2
- package/dist/hypoVault/vaultDisplayNames.js +0 -4
- package/dist/index-BhEBx83X.d.ts +0 -9760
- package/dist/index-BhEBx83X.d.ts.map +0 -1
- package/dist/index-Bo9tHtD7.d.ts +0 -1901
- package/dist/index-Bo9tHtD7.d.ts.map +0 -1
- package/dist/index-CttjEZ-S.d.ts +0 -275
- package/dist/index-CttjEZ-S.d.ts.map +0 -1
- package/dist/index-DktZq9Kb.d.ts +0 -261
- package/dist/index-DktZq9Kb.d.ts.map +0 -1
- package/dist/irm-ChkvYphK.js.map +0 -1
- package/dist/irm-D2WTHtuo.d.ts +0 -5667
- package/dist/irm-D2WTHtuo.d.ts.map +0 -1
- package/dist/irm-D5plRhpB.d.ts +0 -32
- package/dist/irm-D5plRhpB.d.ts.map +0 -1
- package/dist/panoptic/v2/types/index.d.ts +0 -3
- package/dist/panoptic/v2/types/index.js +0 -0
- package/dist/quote-DeHNUR0Z.d.ts +0 -52
- package/dist/quote-DeHNUR0Z.d.ts.map +0 -1
- package/dist/router-BCUJkY8j.js.map +0 -1
- package/dist/router-tCRa0ekE.js.map +0 -1
- package/dist/src-CRAtPwWk.js +0 -321
- package/dist/src-CRAtPwWk.js.map +0 -1
- package/dist/transactionFees-CVi2TrJh.js.map +0 -1
- package/dist/transactionFees-DzDyt50k.d.ts +0 -63
- package/dist/transactionFees-DzDyt50k.d.ts.map +0 -1
- package/dist/types-Cad5m4Td.d.ts +0 -246
- package/dist/types-Cad5m4Td.d.ts.map +0 -1
- package/dist/types-DM0nxlZr.d.ts +0 -128
- package/dist/types-DM0nxlZr.d.ts.map +0 -1
- package/dist/v2-BxtzpUnV.js.map +0 -1
- package/dist/vaultDisplayNames-CKpz51Hu.js +0 -0
- package/dist/vaultDisplayNames-Q6htUcch.d.ts +0 -2
- package/dist/writes-D3bj1wth.js.map +0 -1
package/dist/src-CRAtPwWk.js.map
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"src-CRAtPwWk.js","names":["chainDeploymentsData"],"sources":["../../deployments/src/chainDeployments.data.json","../../deployments/src/chainDeployments.js","../../deployments/src/vaultDisplayNames.js"],"sourcesContent":["{\n \"1\": {\n \"chainId\": 1,\n \"infrastructure\": {\n \"uniswapV3Factory\": \"0x1F98431c8aD98523631AE4a59f267346ea31F984\",\n \"poolManager\": \"0x000000000004444c5dc75cB358380D2e3dE08A90\",\n \"stateView\": \"0x7ffe42c4a5deea5b0fec41c94c136cf115597227\"\n },\n \"hypovault\": {\n \"core\": {\n \"hypoVaultImplementation\": \"0xF16714665955DBd0361D997eFc50fe391D96E8D0\",\n \"factory\": \"0xd5049B2647de57141dE7F65E5124707B99A452A3\",\n \"accountant\": \"0x65aA902AE3135658587FFC36ED51B61c927114e1\",\n \"rolesAuthority\": \"0xb952D345c413Ddb7850173422bAe4968e0330598\",\n \"collateralTrackerDecoderAndSanitizer\": \"0xC87c45d2dbE5acb56013e2591427ECC84Fa251E6\"\n },\n \"vaults\": {\n \"wethPlpVault\": \"0xd4e2c720a760049cc4151bcf61e3a9348db9cd92\",\n \"usdcPlpVault\": \"0x236d0558f06cd60780b232d4Ec4c92d2cb7e4D18\"\n },\n \"managers\": {\n \"wethPlpVaultManager\": \"0xB6Fc48e658C9B1a7dbdFA51A5E153ab60BB2e04d\",\n \"usdcPlpVaultManager\": \"0x2ce65016366ef7320078e0758D58Cf1038bc7C4e\"\n },\n \"turnkeySigners\": {\n \"wethPlpVaultManager\": \"0x8FfA6DAB99f8afc64F61BeF83F0966eD6362f24F\",\n \"usdcPlpVaultManager\": \"0x3c1c79d0cfc316Ba959194c89696a8382d7d283b\"\n }\n },\n \"panoptic\": {\n \"pool\": {\n \"version\": \"v4\",\n \"panopticPool\": \"0x00000000563b70d704f4c6675a5f6ac989fbae13\",\n \"collateralTracker0\": \"0x1e46b0289B7E0F710E2Db8Ab87800dd782D624f7\",\n \"collateralTracker1\": \"0x12bF31955522BAC337D93e1bC0a39F68D8BDa216\"\n },\n \"additionalPools\": {\n \"ethUsdc5bpsV3\": {\n \"version\": \"v3\",\n \"panopticPool\": \"0x00000000009C7B687e833559e34503f64d7ed7c4\",\n \"collateralTracker0\": \"0x3CCdA7d5E841d6543D90BcEc20b36a724C184DE9\",\n \"collateralTracker1\": \"0x69E9f9e44E5F52237493b980dd7306198C64A4E4\"\n }\n },\n \"v2\": {\n \"semiFungiblePositionManagerV4\": \"0x000000000000047534b9E1D528ED997169865a64\",\n \"semiFungiblePositionManagerV3\": \"0x000000000000031d296bBA22f188472157eEb01f\",\n \"builderFactory\": \"0x00000000000008D41F2cd5bF144F61cEB3661F98\",\n \"riskEngine\": \"0x0000000000000e673aECBDB5f5fE5DFAf4a8e9Ac\",\n \"panopticPoolImplementation\": \"0x00000000000010bb6695dAAC60D0515c0A01a948\",\n \"collateralTrackerImplementation\": \"0x0000000000002038055dB8f2B2Fd356598935C51\",\n \"panopticFactoryV4\": \"0x0000000000000c51d0f8cf4bd9adE7191372a625\",\n \"panopticFactoryV3\": \"0x0000000000000aDC9A108591e718F2aee963a2a7\",\n \"panopticHelper\": \"0x0000000000000000000000000000000000000000\",\n \"panopticMath\": \"0x000000000000301F5BC0171C75967b8e78a92b10\",\n \"panopticQuery\": \"0x0000000000000e1aE9c66C1c3B0A547D23389C93\",\n \"interactionHelper\": \"0x00000000000040ae7CD505F4E0e3F34195D8c08C\"\n }\n },\n \"riskEngines\": [\n \"0x000000000000075e29cdaa9cb640a69e148ca7da\",\n \"0x0000000000000fe1e261f66ce2f44def4f5ae0cb\",\n \"0x0000000000000e673aECBDB5f5fE5DFAf4a8e9Ac\"\n ],\n \"markets\": {\n \"ethUsdc30bps\": {\n \"currency0\": \"0x0000000000000000000000000000000000000000\",\n \"currency1\": \"0xA0b86991c6218b36c1d19D4a2e9Eb0cE3606eB48\",\n \"fee\": 3000,\n \"tickSpacing\": 60,\n \"poolId\": \"0x3C08AE4977F78D\"\n }\n },\n \"subgraphs\": {\n \"hypovault\": \"https://api.goldsky.com/api/public/project_cl9gc21q105380hxuh8ks53k3/subgraphs/hypovault-subgraph-mainnet/prod/gn\",\n \"panoptic\": \"https://api.goldsky.com/api/public/project_cl9gc21q105380hxuh8ks53k3/subgraphs/panoptic-subgraph-mainnet/v2_prod/gn\"\n },\n \"sfpmSwap\": {\n \"version\": \"v3\",\n \"sfpm\": \"0x00000000000005E4693aDc8Ec0f12D686f728198\",\n \"poolAddress\": \"0x88e6A0c2dDD26FEEb64F039a2c41296FcB3f5640\",\n \"poolId\": \"2824133844976349\",\n \"fee\": 500,\n \"weth\": \"0xC02aaA39b223FE8D0A0e5C4F27eAD9083C756Cc2\"\n }\n },\n \"8453\": {\n \"chainId\": 8453,\n \"infrastructure\": {\n \"uniswapV3Factory\": \"0x33128a8fC17869897dcE68Ed026d694621f6FDfD\",\n \"poolManager\": \"0x498581fF718922c3f8e6A244956aF099B2652b2b\",\n \"stateView\": \"0xA3c0c9b65baD0b08107Aa264b0f3dB444b867A71\"\n },\n \"hypovault\": {\n \"core\": {\n \"hypoVaultImplementation\": \"0xec311aE06486ad44Ba782133b502A34aCE0f479E\",\n \"factory\": \"0x9bE53b169a41030f1710A9B82e9eA6413f14D12E\",\n \"accountant\": \"0x345cA3407942f9d175c9eA8B90e83A36F570f852\",\n \"rolesAuthority\": \"0x278D37CaBFFB4B72D2866E30fEFE08aef773E0B6\",\n \"collateralTrackerDecoderAndSanitizer\": \"0x4A290b3EC46cF320421Bb2aaee96d445de31CF0b\"\n },\n \"vaults\": {\n \"wethPlpVault\": \"0x41b7D0515d709A4Fd2CF27f9d141D0c2F8713D04\",\n \"usdcPlpVault\": \"0xb452af299c565D04B05E601efF2840e000C922f1\"\n },\n \"managers\": {\n \"wethPlpVaultManager\": \"0x2a4923456c79E9ebD10F5Bf5305a5C742bBc1D7C\",\n \"usdcPlpVaultManager\": \"0xdd6E2406a044582463CFE9F0C774870eAf4A310B\"\n },\n \"turnkeySigners\": {\n \"wethPlpVaultManager\": \"0x8FfA6DAB99f8afc64F61BeF83F0966eD6362f24F\",\n \"usdcPlpVaultManager\": \"0x3c1c79d0cfc316Ba959194c89696a8382d7d283b\"\n }\n },\n \"panoptic\": {\n \"pool\": {\n \"version\": \"v4\",\n \"panopticPool\": \"0xB50e8bb68f5855DA742f4579274902a20454174a\",\n \"collateralTracker0\": \"0x0d82b189c96EbB1f44A7207e6A9cfB1e490f2869\",\n \"collateralTracker1\": \"0x9ba1082Ab3cb9edEA988697A14BBe543A3dABEd2\"\n },\n \"v2\": {\n \"semiFungiblePositionManagerV4\": \"0x8dcAa08cF298F8b4830FAf56d47930981AdE33af\",\n \"semiFungiblePositionManagerV3\": \"0xFB1c06B491305d618bb8a7a368C6e50c001C153A\",\n \"builderFactory\": \"0x6d26E916a18d522f7DdA2a26d9E1645564ccDcA5\",\n \"riskEngine\": \"0x8bbce8b1eb64118cfe6c1eab0afe13b80ea41481\",\n \"panopticPoolImplementation\": \"0x5BA68a018fF149c38ec52D181Dd24aBabE9a07DB\",\n \"collateralTrackerImplementation\": \"0x34B3a4e4F14f292575ECe3EF67886C4598af459f\",\n \"panopticFactoryV4\": \"0x9ac0317fcd124aff0b5429beb8de17020bc45f9a\",\n \"panopticFactoryV3\": \"0x687f616d68c483a7223e6922f59aef7452e26c1d\",\n \"panopticHelper\": \"0x0000000000000000000000000000000000000000\",\n \"panopticMath\": \"0x6d21699192f5aF112C87e53b32ff846782afF407\",\n \"panopticQuery\": \"0xd2586E1bbdd1169F597F3A370117EdF7372A7350\",\n \"interactionHelper\": \"0x643d8DD5372FD6c71f8fAbCce4Eb8857704F3E15\"\n }\n },\n \"riskEngines\": [\n \"0x8bbce8b1eb64118cfe6c1eab0afe13b80ea41481\"\n ],\n \"markets\": {\n \"ethUsdc5bps\": {\n \"currency0\": \"0x0000000000000000000000000000000000000000\",\n \"currency1\": \"0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913\",\n \"fee\": 500,\n \"tickSpacing\": 10,\n \"poolId\": \"0x96d4b53a38337a5733179751781178a2613306063c511b78cd02684739288c0a\"\n }\n },\n \"subgraphs\": {\n \"hypovault\": \"https://api.goldsky.com/api/public/project_cl9gc21q105380hxuh8ks53k3/subgraphs/hypovault-subgraph-base/prod/gn\",\n \"panoptic\": \"https://api.goldsky.com/api/public/project_cl9gc21q105380hxuh8ks53k3/subgraphs/panoptic-subgraph-base/v2_prod/gn\"\n }\n },\n \"11155111\": {\n \"chainId\": 11155111,\n \"infrastructure\": {\n \"uniswapV3Factory\": \"0x0227628f3F023bb0B980b67D528571c95c6DaC1c\",\n \"poolManager\": \"0xE03A1074c86CFeDd5C142C4F04F1a1536e203543\",\n \"stateView\": \"0xE1Dd9c3fA50EDB962E442f60DfBc432e24537E4C\"\n },\n \"hypovault\": {\n \"core\": {\n \"hypoVaultImplementation\": \"0xC5b415Db4087228Af817893769DC3a205160160B\",\n \"factory\": \"0x363a9d605ca45cBfF3b597350DeADb53cdC292c7\",\n \"accountant\": \"0x25BBef1DF262c24aa1AACD1F7eCeEcc1a7AD08ab\",\n \"rolesAuthority\": \"0x673BfafB4e2712215B422347c1571421B83E8A3d\",\n \"collateralTrackerDecoderAndSanitizer\": \"0xb899BE50BAF25BBB3A3ca3403256B3c703E5AB5d\"\n },\n \"vaults\": {\n \"wethPlpVault\": \"0xD58C4F9AEe5bBfcf28dC9a8d3D57b323fA6521b1\",\n \"usdcPlpVault\": \"0xdd7a8d6c6975488e801129bC84302d74e2361208\"\n },\n \"managers\": {\n \"wethPlpVaultManager\": \"0x95eC124FAAB70D7aE147c3BE0336E01a828AE2d5\",\n \"usdcPlpVaultManager\": \"0xFB5aa3e0b46F3859D90B14b52ffd287013b5Ec53\"\n },\n \"turnkeySigners\": {\n \"wethPlpVaultManager\": \"0x8FfA6DAB99f8afc64F61BeF83F0966eD6362f24F\",\n \"usdcPlpVaultManager\": \"0x3c1c79d0cfc316Ba959194c89696a8382d7d283b\"\n }\n },\n \"panoptic\": {\n \"pool\": {\n \"version\": \"v4\",\n \"panopticPool\": \"0x872b98C46b2062F663BEb2CC9D4cE046Da2a2918\",\n \"collateralTracker0\": \"0x09a60b78d06a03e5148faedd3bfee6f58b22012f\",\n \"collateralTracker1\": \"0x7365664c8101ff7e9422ae2b203822253c31e69c\"\n },\n \"v2\": {\n \"semiFungiblePositionManagerV3\": \"0x9DaD2C40107Db4B29a5450401BB7A28e6eA00e43\",\n \"semiFungiblePositionManagerV4\": \"0xD2615995A71644E122cC2FD7FeC2392b971220DE\",\n \"builderFactory\": \"0x55f3D2d9D065AA5Fcc11D94c55a6085849e8b6C3\",\n \"riskEngine\": \"0x1376aF5ca426B6B9fad6a712c21f6Cf58a94b93c\",\n \"panopticPoolImplementation\": \"0x969235B5830f13b58BB699305d9c70A8Cd3BD97C\",\n \"collateralTrackerImplementation\": \"0xafcd5F651Ae0403Ff668bb2dAc38BEa907a35Dba\",\n \"panopticFactoryV3\": \"0xd9FFCa53C0A6155001Ce8cbcAEfe89DB204690F1\",\n \"panopticFactoryV4\": \"0x8FCBb59b05779818D9BAD2686cc44B705603ce03\",\n \"panopticHelper\": \"0xfFEbB3A4ab793cB244209d4dA0Cb3e6B07133bd0\",\n \"panopticMath\": \"0x6d21699192f5aF112C87e53b32ff846782afF407\",\n \"panopticQuery\": \"0x74057945467Fb4eAE9193B46A60ae66a53f06A5b\",\n \"interactionHelper\": \"0x643d8DD5372FD6c71f8fAbCce4Eb8857704F3E15\"\n }\n },\n \"riskEngines\": [\n \"0x1376aF5ca426B6B9fad6a712c21f6Cf58a94b93c\"\n ],\n \"markets\": {\n \"ethUsdc5bps\": {\n \"currency0\": \"0x0000000000000000000000000000000000000000\",\n \"currency1\": \"0xFFFeD8254566B7F800f6D8CDb843ec75AE49B07A\",\n \"fee\": 500,\n \"tickSpacing\": 10,\n \"poolId\": \"0xba6673bcb27568a73a93dd23b20c8174fa16193cd90905be859144e8f13097a5\"\n }\n },\n \"subgraphs\": {\n \"hypovault\": \"https://api.goldsky.com/api/public/project_cl9gc21q105380hxuh8ks53k3/subgraphs/hypovault-subgraph-sepolia/prod/gn\",\n \"panoptic\": \"https://api.goldsky.com/api/public/project_cl9gc21q105380hxuh8ks53k3/subgraphs/panoptic-subgraph-sepolia/v2_prod/gn\"\n }\n }\n}\n","import chainDeploymentsData from './chainDeployments.data.json' with { type: 'json' }\n\nexport const MAINNET_CHAIN_ID = 1\nexport const SEPOLIA_CHAIN_ID = 11155111\nexport const BASE_CHAIN_ID = 8453\n\nexport const CHAIN_DEPLOYMENTS = chainDeploymentsData\n\nexport function getChainDeployment(chainId) {\n return CHAIN_DEPLOYMENTS[chainId]\n}\n\nexport function requireChainDeployment(chainId) {\n const deployment = getChainDeployment(chainId)\n if (deployment === undefined) {\n throw new Error(`Unsupported chain deployment for chainId ${chainId}`)\n }\n return deployment\n}\n\nexport function isSupportedChain(chainId) {\n return getChainDeployment(chainId) !== undefined\n}\n\nexport function getEthUsdcMarket(deployment) {\n const market = deployment.markets.ethUsdc5bps ?? deployment.markets.ethUsdc30bps\n if (market === undefined) {\n throw new Error(`Missing ETH/USDC market for chainId ${deployment.chainId}`)\n }\n return market\n}\n\n\nexport const MAINNET_DEPLOYMENT = CHAIN_DEPLOYMENTS[MAINNET_CHAIN_ID]\nexport const MAINNET_ETH_USDC_5BPS_V3_PANOPTIC_POOL_ADDRESSES =\n MAINNET_DEPLOYMENT.panoptic.additionalPools?.ethUsdc5bpsV3\nexport const MAINNET_PANOPTIC_V2_ADDRESSES = MAINNET_DEPLOYMENT.panoptic.v2\nexport const SEPOLIA_DEPLOYMENT = CHAIN_DEPLOYMENTS[SEPOLIA_CHAIN_ID]\nexport const SEPOLIA_HYPOVAULT_CORE_ADDRESSES = SEPOLIA_DEPLOYMENT.hypovault.core\nexport const SEPOLIA_HYPOVAULT_ADDRESSES = SEPOLIA_DEPLOYMENT.hypovault.vaults\nexport const SEPOLIA_HYPOVAULT_MANAGER_ADDRESSES = SEPOLIA_DEPLOYMENT.hypovault.managers\nexport const SEPOLIA_HYPOVAULT_MANAGER_TURNKEY_SIGNERS = SEPOLIA_DEPLOYMENT.hypovault.turnkeySigners\nexport const SEPOLIA_PANOPTIC_POOL_ADDRESSES = SEPOLIA_DEPLOYMENT.panoptic.pool\nexport const SEPOLIA_PANOPTIC_V2_ADDRESSES = SEPOLIA_DEPLOYMENT.panoptic.v2\nexport const BASE_DEPLOYMENT = CHAIN_DEPLOYMENTS[BASE_CHAIN_ID]\nexport const BASE_HYPOVAULT_CORE_ADDRESSES = BASE_DEPLOYMENT.hypovault.core\nexport const BASE_HYPOVAULT_ADDRESSES = BASE_DEPLOYMENT.hypovault.vaults\nexport const BASE_HYPOVAULT_MANAGER_ADDRESSES = BASE_DEPLOYMENT.hypovault.managers\nexport const BASE_HYPOVAULT_MANAGER_TURNKEY_SIGNERS = BASE_DEPLOYMENT.hypovault.turnkeySigners\nexport const BASE_PANOPTIC_POOL_ADDRESSES = BASE_DEPLOYMENT.panoptic.pool\nexport const BASE_PANOPTIC_V2_ADDRESSES = BASE_DEPLOYMENT.panoptic.v2\nexport const BASE_ETH_USDC_5BPS_MARKET = getEthUsdcMarket(BASE_DEPLOYMENT)\nexport const SEPOLIA_ETH_USDC_5BPS_MARKET = getEthUsdcMarket(SEPOLIA_DEPLOYMENT)\n\nexport const MAINNET_RISK_ENGINES = MAINNET_DEPLOYMENT.riskEngines\nexport const BASE_RISK_ENGINES = BASE_DEPLOYMENT.riskEngines\nexport const SEPOLIA_RISK_ENGINES = SEPOLIA_DEPLOYMENT.riskEngines\n","import {\n BASE_CHAIN_ID,\n MAINNET_CHAIN_ID,\n requireChainDeployment,\n SEPOLIA_CHAIN_ID,\n} from './chainDeployments.js'\n\nconst mainnetDeployment = requireChainDeployment(MAINNET_CHAIN_ID)\nconst mainnetVaults = mainnetDeployment.hypovault.vaults\nconst legacyMainnetVaults = {\n wethPlpVault: '0x779a2aa634A004b3a3f3b322083744869BBC6D66',\n usdcPlpVault: '0x963Fe9c93bc353602656ee4051A75114bA74d6c5',\n}\nconst sepoliaDeployment = requireChainDeployment(SEPOLIA_CHAIN_ID)\nconst sepoliaVaults = sepoliaDeployment.hypovault.vaults\nconst baseDeployment = requireChainDeployment(BASE_CHAIN_ID)\nconst baseVaults = baseDeployment.hypovault.vaults\n\nexport const VAULT_DISPLAY_NAMES_PER_CHAIN = {\n [MAINNET_CHAIN_ID]: {\n [mainnetVaults.wethPlpVault.toLowerCase()]: 'PLP Vault',\n [mainnetVaults.usdcPlpVault.toLowerCase()]: 'Unicorn Vault',\n [legacyMainnetVaults.wethPlpVault.toLowerCase()]: 'PLP Vault',\n [legacyMainnetVaults.usdcPlpVault.toLowerCase()]: 'Unicorn Vault',\n },\n [BASE_CHAIN_ID]: {\n [baseVaults.wethPlpVault.toLowerCase()]: 'PLP Vault',\n [baseVaults.usdcPlpVault.toLowerCase()]: 'Unicorn Vault',\n },\n [SEPOLIA_CHAIN_ID]: {\n [sepoliaVaults.wethPlpVault.toLowerCase()]: 'PLP Vault',\n [sepoliaVaults.usdcPlpVault.toLowerCase()]: 'Unicorn Vault',\n },\n}\n\nexport const VAULT_DISPLAY_NAME_RESOLVERS_PER_CHAIN = {\n [MAINNET_CHAIN_ID]: {\n [mainnetVaults.wethPlpVault.toLowerCase()]: () => 'PLP Vault',\n [mainnetVaults.usdcPlpVault.toLowerCase()]: () => 'Unicorn Vault',\n [legacyMainnetVaults.wethPlpVault.toLowerCase()]: () => 'PLP Vault',\n [legacyMainnetVaults.usdcPlpVault.toLowerCase()]: () => 'Unicorn Vault',\n },\n [BASE_CHAIN_ID]: {\n [baseVaults.wethPlpVault.toLowerCase()]: () => 'PLP Vault',\n [baseVaults.usdcPlpVault.toLowerCase()]: () => 'Unicorn Vault',\n },\n [SEPOLIA_CHAIN_ID]: {\n [sepoliaVaults.wethPlpVault.toLowerCase()]: () => 'PLP Vault',\n [sepoliaVaults.usdcPlpVault.toLowerCase()]: () => 'Unicorn Vault',\n },\n}\n\nexport function resolveVaultDisplayName({ chainId, vaultAddress, underlyingSymbol, fallbackName }) {\n const vaultAddressLower = vaultAddress.toLowerCase()\n const resolver = VAULT_DISPLAY_NAME_RESOLVERS_PER_CHAIN[chainId]?.[vaultAddressLower]\n if (resolver !== undefined) {\n return resolver({\n chainId,\n vaultAddress: vaultAddressLower,\n underlyingSymbol,\n fallbackName,\n })\n }\n\n const staticName = VAULT_DISPLAY_NAMES_PER_CHAIN[chainId]?.[vaultAddressLower]\n if (staticName !== undefined) {\n return staticName\n }\n\n if (fallbackName !== undefined && fallbackName !== null) {\n return fallbackName\n }\n\n return 'Vault'\n}\n"],"mappings":";SACO;CACH,WAAW;CACX,kBAAkB;EAChB,oBAAoB;EACpB,eAAe;EACf,aAAa;CACd;CACD,aAAa;EACX,QAAQ;GACN,2BAA2B;GAC3B,WAAW;GACX,cAAc;GACd,kBAAkB;GAClB,wCAAwC;EACzC;EACD,UAAU;GACR,gBAAgB;GAChB,gBAAgB;EACjB;EACD,YAAY;GACV,uBAAuB;GACvB,uBAAuB;EACxB;EACD,kBAAkB;GAChB,uBAAuB;GACvB,uBAAuB;EACxB;CACF;CACD,YAAY;EACV,QAAQ;GACN,WAAW;GACX,gBAAgB;GAChB,sBAAsB;GACtB,sBAAsB;EACvB;EACD,mBAAmB,EACjB,iBAAiB;GACf,WAAW;GACX,gBAAgB;GAChB,sBAAsB;GACtB,sBAAsB;EACvB,EACF;EACD,MAAM;GACJ,iCAAiC;GACjC,iCAAiC;GACjC,kBAAkB;GAClB,cAAc;GACd,8BAA8B;GAC9B,mCAAmC;GACnC,qBAAqB;GACrB,qBAAqB;GACrB,kBAAkB;GAClB,gBAAgB;GAChB,iBAAiB;GACjB,qBAAqB;EACtB;CACF;CACD,eAAe;EACb;EACA;EACA;CACD;CACD,WAAW,EACT,gBAAgB;EACd,aAAa;EACb,aAAa;EACb,OAAO;EACP,eAAe;EACf,UAAU;CACX,EACF;CACD,aAAa;EACX,aAAa;EACb,YAAY;CACb;CACD,YAAY;EACV,WAAW;EACX,QAAQ;EACR,eAAe;EACf,UAAU;EACV,OAAO;EACP,QAAQ;CACT;AACF;YACO;CACN,WAAW;CACX,kBAAkB;EAChB,oBAAoB;EACpB,eAAe;EACf,aAAa;CACd;CACD,aAAa;EACX,QAAQ;GACN,2BAA2B;GAC3B,WAAW;GACX,cAAc;GACd,kBAAkB;GAClB,wCAAwC;EACzC;EACD,UAAU;GACR,gBAAgB;GAChB,gBAAgB;EACjB;EACD,YAAY;GACV,uBAAuB;GACvB,uBAAuB;EACxB;EACD,kBAAkB;GAChB,uBAAuB;GACvB,uBAAuB;EACxB;CACF;CACD,YAAY;EACV,QAAQ;GACN,WAAW;GACX,gBAAgB;GAChB,sBAAsB;GACtB,sBAAsB;EACvB;EACD,MAAM;GACJ,iCAAiC;GACjC,iCAAiC;GACjC,kBAAkB;GAClB,cAAc;GACd,8BAA8B;GAC9B,mCAAmC;GACnC,qBAAqB;GACrB,qBAAqB;GACrB,kBAAkB;GAClB,gBAAgB;GAChB,iBAAiB;GACjB,qBAAqB;EACtB;CACF;CACD,eAAe,CACb,4CACD;CACD,WAAW,EACT,eAAe;EACb,aAAa;EACb,aAAa;EACb,OAAO;EACP,eAAe;EACf,UAAU;CACX,EACF;CACD,aAAa;EACX,aAAa;EACb,YAAY;CACb;AACF;gBACW;CACV,WAAW;CACX,kBAAkB;EAChB,oBAAoB;EACpB,eAAe;EACf,aAAa;CACd;CACD,aAAa;EACX,QAAQ;GACN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AG;GAC3C,cAAc,aAAa,aAAa,GAAG;CAC7C;AACF;AAED,MAAa,yCAAyC;EACnD,mBAAmB;GACjB,cAAc,aAAa,aAAa,GAAG,MAAM;GACjD,cAAc,aAAa,aAAa,GAAG,MAAM;GACjD,oBAAoB,aAAa,aAAa,GAAG,MAAM;GACvD,oBAAoB,aAAa,aAAa,GAAG,MAAM;CACzD;EACA,gBAAgB;GACd,WAAW,aAAa,aAAa,GAAG,MAAM;GAC9C,WAAW,aAAa,aAAa,GAAG,MAAM;CAChD;EACA,mBAAmB;GACjB,cAAc,aAAa,aAAa,GAAG,MAAM;GACjD,cAAc,aAAa,aAAa,GAAG,MAAM;CACnD;AACF;AAED,SAAgB,wBAAwB,EAAE,SAAS,cAAc,kBAAkB,cAAc,EAAE;CACjG,MAAM,oBAAoB,aAAa,aAAa;CACpD,MAAM,WAAW,uCAAuC,WAAW;AACnE,KAAI,oBACF,QAAO,SAAS;EACd;EACA,cAAc;EACd;EACA;CACD,EAAC;CAGJ,MAAM,aAAa,8BAA8B,WAAW;AAC5D,KAAI,sBACF,QAAO;AAGT,KAAI,2BAA8B,iBAAiB,KACjD,QAAO;AAGT,QAAO;AACR"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"transactionFees-CVi2TrJh.js","names":["value: bigint","numerator: bigint","denominator: bigint","values: readonly bigint[]","priorityFee: bigint","quote: VaultTransactionFeeQuote","gasLimit: bigint","gasEstimate: bigint","feeCaps: VaultSignedTransactionFeeCaps","quote?: VaultTransactionFeeQuote","feeHistoryError: unknown","client: Client<Transport, chain>"],"sources":["../src/hypoVault/transactionFees.ts"],"sourcesContent":["import type { Chain, Client, Transport } from 'viem'\nimport { estimateFeesPerGas, getFeeHistory } from 'viem/actions'\n\nexport const MIN_VAULT_PRIORITY_FEE_PER_GAS = 100_000_000n // 0.1 gwei\nexport const MAX_VAULT_PRIORITY_FEE_PER_GAS = 3_000_000_000n // 3 gwei\nexport const MAX_VAULT_TRANSACTION_GAS_COST = 15_000_000_000_000_000n // 0.015 ETH\n\nconst FEE_HISTORY_BLOCK_COUNT = 20\nconst FEE_HISTORY_REWARD_PERCENTILES = [90]\nconst BASE_FEE_BUFFER_NUMERATOR = 1_125n\nconst BASE_FEE_BUFFER_DENOMINATOR = 1_000n\nconst GAS_ESTIMATE_BUFFER_NUMERATOR = 3n\nconst GAS_ESTIMATE_BUFFER_DENOMINATOR = 2n\n\nexport type VaultTransactionFeeQuote = {\n maxFeePerGas: bigint\n maxPriorityFeePerGas: bigint\n minimumMaxFeePerGas: bigint\n source: 'fee_history' | 'viem_fallback'\n}\n\nexport type VaultSignedTransactionFeeCaps = {\n gasLimit?: bigint | null\n maxFeePerGas: bigint | null\n maxPriorityFeePerGas: bigint | null\n}\n\nexport type VaultSignedTransactionFeeValidationResult =\n | { valid: true }\n | {\n valid: false\n code:\n | 'MissingEip1559Fees'\n | 'InvalidFeeCaps'\n | 'PriorityFeeTooLow'\n | 'PriorityFeeTooHigh'\n | 'MaxFeeTooLow'\n | 'GasCostTooHigh'\n reason: string\n }\n\nexport class VaultTransactionFeeEstimationError extends Error {\n readonly feeHistoryError: unknown\n readonly fallbackError: unknown\n\n constructor({\n feeHistoryError,\n fallbackError,\n }: {\n feeHistoryError: unknown\n fallbackError: unknown\n }) {\n super('Unable to estimate EIP-1559 fees for vault transaction')\n this.name = 'VaultTransactionFeeEstimationError'\n this.feeHistoryError = feeHistoryError\n this.fallbackError = fallbackError\n }\n}\n\nexport class VaultTransactionGasCostLimitError extends Error {\n readonly gasLimit: bigint\n readonly maximumAffordableFeePerGas: bigint\n readonly minimumRequiredFeePerGas: bigint\n\n constructor({\n gasLimit,\n maximumAffordableFeePerGas,\n minimumRequiredFeePerGas,\n }: {\n gasLimit: bigint\n maximumAffordableFeePerGas: bigint\n minimumRequiredFeePerGas: bigint\n }) {\n super(\n `Vault transaction cannot fit the ${MAX_VAULT_TRANSACTION_GAS_COST.toString()} wei gas-cost limit: ` +\n `gasLimit=${gasLimit.toString()}, maximumAffordableFeePerGas=${maximumAffordableFeePerGas.toString()}, ` +\n `minimumRequiredFeePerGas=${minimumRequiredFeePerGas.toString()}`,\n )\n this.name = 'VaultTransactionGasCostLimitError'\n this.gasLimit = gasLimit\n this.maximumAffordableFeePerGas = maximumAffordableFeePerGas\n this.minimumRequiredFeePerGas = minimumRequiredFeePerGas\n }\n}\n\ntype FeeHistorySnapshot = {\n baseFeePerGas: readonly bigint[]\n reward?: readonly (readonly bigint[])[] | undefined\n}\n\ntype FallbackFeeEstimate = {\n maxFeePerGas: bigint\n maxPriorityFeePerGas: bigint\n}\n\nfunction ceilMultiplyFraction(value: bigint, numerator: bigint, denominator: bigint): bigint {\n return (value * numerator + denominator - 1n) / denominator\n}\n\nfunction medianBigInt(values: readonly bigint[]): bigint | undefined {\n if (values.length === 0) return undefined\n const sorted = [...values].sort((left, right) => (left < right ? -1 : left > right ? 1 : 0))\n const upperMiddleIndex = Math.floor(sorted.length / 2)\n const upperMiddle = sorted[upperMiddleIndex]\n if (upperMiddle === undefined) return undefined\n if (sorted.length % 2 === 1) return upperMiddle\n const lowerMiddle = sorted[upperMiddleIndex - 1]\n return lowerMiddle === undefined ? undefined : (lowerMiddle + upperMiddle) / 2n\n}\n\nfunction clampPriorityFee(priorityFee: bigint): bigint {\n if (priorityFee < MIN_VAULT_PRIORITY_FEE_PER_GAS) return MIN_VAULT_PRIORITY_FEE_PER_GAS\n if (priorityFee > MAX_VAULT_PRIORITY_FEE_PER_GAS) return MAX_VAULT_PRIORITY_FEE_PER_GAS\n return priorityFee\n}\n\nfunction resolveFeeHistoryQuote({\n baseFeePerGas,\n reward,\n}: {\n baseFeePerGas: readonly bigint[]\n reward?: readonly (readonly bigint[])[] | undefined\n}): VaultTransactionFeeQuote | null {\n // feeHistory includes one additional base fee for the next block. The\n // second-to-last entry is therefore the latest mined block's base fee.\n const latestBaseFeeIndex = baseFeePerGas.length - 2\n if (latestBaseFeeIndex < 0 || reward === undefined || reward.length === 0) return null\n\n const p90Rewards = reward.flatMap((blockRewards) => {\n const p90 = blockRewards[0]\n return p90 === undefined ? [] : [p90]\n })\n const sampledPriorityFee = medianBigInt(p90Rewards)\n if (sampledPriorityFee === undefined) return null\n\n const maxPriorityFeePerGas = clampPriorityFee(sampledPriorityFee)\n const bufferedBaseFee = ceilMultiplyFraction(\n baseFeePerGas[latestBaseFeeIndex],\n BASE_FEE_BUFFER_NUMERATOR,\n BASE_FEE_BUFFER_DENOMINATOR,\n )\n\n return {\n maxFeePerGas: bufferedBaseFee + maxPriorityFeePerGas,\n maxPriorityFeePerGas,\n minimumMaxFeePerGas: bufferedBaseFee + MIN_VAULT_PRIORITY_FEE_PER_GAS,\n source: 'fee_history',\n }\n}\n\nfunction resolveFallbackQuote({\n maxFeePerGas: estimatedMaxFeePerGas,\n maxPriorityFeePerGas: estimatedPriorityFeePerGas,\n}: {\n maxFeePerGas: bigint\n maxPriorityFeePerGas: bigint\n}): VaultTransactionFeeQuote {\n const maxPriorityFeePerGas = clampPriorityFee(estimatedPriorityFeePerGas)\n const estimatedBaseFeeAllowance =\n estimatedMaxFeePerGas > estimatedPriorityFeePerGas\n ? estimatedMaxFeePerGas - estimatedPriorityFeePerGas\n : 0n\n\n return {\n maxFeePerGas: estimatedBaseFeeAllowance + maxPriorityFeePerGas,\n maxPriorityFeePerGas,\n minimumMaxFeePerGas: estimatedBaseFeeAllowance + MIN_VAULT_PRIORITY_FEE_PER_GAS,\n source: 'viem_fallback',\n }\n}\n\nexport function applyVaultTransactionGasCostLimit(\n quote: VaultTransactionFeeQuote,\n gasLimit: bigint,\n): VaultTransactionFeeQuote {\n if (gasLimit <= 0n) {\n throw new Error(`Vault transaction gas limit must be positive, received ${gasLimit.toString()}`)\n }\n\n const maximumAffordableFeePerGas = MAX_VAULT_TRANSACTION_GAS_COST / gasLimit\n if (maximumAffordableFeePerGas < quote.minimumMaxFeePerGas) {\n throw new VaultTransactionGasCostLimitError({\n gasLimit,\n maximumAffordableFeePerGas,\n minimumRequiredFeePerGas: quote.minimumMaxFeePerGas,\n })\n }\n\n if (quote.maxFeePerGas <= maximumAffordableFeePerGas) return quote\n\n const bufferedBaseFee = quote.minimumMaxFeePerGas - MIN_VAULT_PRIORITY_FEE_PER_GAS\n const affordablePriorityFee = maximumAffordableFeePerGas - bufferedBaseFee\n return {\n ...quote,\n maxFeePerGas: maximumAffordableFeePerGas,\n maxPriorityFeePerGas:\n quote.maxPriorityFeePerGas < affordablePriorityFee\n ? quote.maxPriorityFeePerGas\n : affordablePriorityFee,\n }\n}\n\nexport function bufferVaultTransactionGasEstimate(gasEstimate: bigint): bigint {\n if (gasEstimate <= 0n) {\n throw new Error(\n `Vault transaction gas estimate must be positive, received ${gasEstimate.toString()}`,\n )\n }\n return ceilMultiplyFraction(\n gasEstimate,\n GAS_ESTIMATE_BUFFER_NUMERATOR,\n GAS_ESTIMATE_BUFFER_DENOMINATOR,\n )\n}\n\nexport function validateVaultSignedTransactionFeeCaps(\n feeCaps: VaultSignedTransactionFeeCaps,\n quote?: VaultTransactionFeeQuote,\n): VaultSignedTransactionFeeValidationResult {\n const { gasLimit, maxFeePerGas, maxPriorityFeePerGas } = feeCaps\n if (maxFeePerGas === null || maxPriorityFeePerGas === null) {\n return {\n valid: false,\n code: 'MissingEip1559Fees',\n reason: 'Signed transaction must include EIP-1559 max fee and priority fee caps.',\n }\n }\n if (maxPriorityFeePerGas > maxFeePerGas) {\n return {\n valid: false,\n code: 'InvalidFeeCaps',\n reason:\n `Signed transaction maxPriorityFeePerGas (${maxPriorityFeePerGas.toString()} wei) ` +\n `cannot exceed maxFeePerGas (${maxFeePerGas.toString()} wei).`,\n }\n }\n if (maxPriorityFeePerGas < MIN_VAULT_PRIORITY_FEE_PER_GAS) {\n return {\n valid: false,\n code: 'PriorityFeeTooLow',\n reason:\n `Signed transaction maxPriorityFeePerGas (${maxPriorityFeePerGas.toString()} wei) ` +\n `must be at least ${MIN_VAULT_PRIORITY_FEE_PER_GAS.toString()} wei (0.1 gwei).`,\n }\n }\n if (maxPriorityFeePerGas > MAX_VAULT_PRIORITY_FEE_PER_GAS) {\n return {\n valid: false,\n code: 'PriorityFeeTooHigh',\n reason:\n `Signed transaction maxPriorityFeePerGas (${maxPriorityFeePerGas.toString()} wei) ` +\n `must not exceed ${MAX_VAULT_PRIORITY_FEE_PER_GAS.toString()} wei (3 gwei).`,\n }\n }\n if (\n gasLimit !== undefined &&\n gasLimit !== null &&\n gasLimit * maxFeePerGas > MAX_VAULT_TRANSACTION_GAS_COST\n ) {\n return {\n valid: false,\n code: 'GasCostTooHigh',\n reason:\n `Signed transaction maximum gas cost (${(gasLimit * maxFeePerGas).toString()} wei) ` +\n `must not exceed ${MAX_VAULT_TRANSACTION_GAS_COST.toString()} wei (0.015 ETH).`,\n }\n }\n if (quote !== undefined && maxFeePerGas < quote.minimumMaxFeePerGas) {\n return {\n valid: false,\n code: 'MaxFeeTooLow',\n reason:\n `Signed transaction maxFeePerGas (${maxFeePerGas.toString()} wei) must be at least ` +\n `${quote.minimumMaxFeePerGas.toString()} wei for the buffered next-block base fee ` +\n 'and 0.1 gwei minimum priority fee.',\n }\n }\n return { valid: true }\n}\n\nasync function resolveVaultTransactionFeeQuote({\n readFeeHistory,\n readFallbackEstimate,\n}: {\n readFeeHistory: () => Promise<FeeHistorySnapshot>\n readFallbackEstimate: () => Promise<FallbackFeeEstimate>\n}): Promise<VaultTransactionFeeQuote> {\n let feeHistoryError: unknown\n try {\n const quote = resolveFeeHistoryQuote(await readFeeHistory())\n if (quote !== null) return quote\n feeHistoryError = new Error('eth_feeHistory returned incomplete base fee or reward data')\n } catch (error) {\n feeHistoryError = error\n }\n\n try {\n return resolveFallbackQuote(await readFallbackEstimate())\n } catch (fallbackError) {\n throw new VaultTransactionFeeEstimationError({ feeHistoryError, fallbackError })\n }\n}\n\n/**\n * Resolve explicit EIP-1559 fees for operator-controlled vault transactions.\n *\n * The normal path follows the median p90 priority fee from the last 20 blocks,\n * with a 0.1 gwei floor and 3 gwei ceiling. If fee history is unavailable,\n * Viem's estimate is used while preserving those bounds and its original\n * base-fee allowance.\n */\nexport async function getVaultTransactionFeeQuote<chain extends Chain | undefined>(\n client: Client<Transport, chain>,\n): Promise<VaultTransactionFeeQuote> {\n return resolveVaultTransactionFeeQuote({\n readFeeHistory: () =>\n getFeeHistory(client, {\n blockCount: FEE_HISTORY_BLOCK_COUNT,\n blockTag: 'latest',\n rewardPercentiles: FEE_HISTORY_REWARD_PERCENTILES,\n }),\n readFallbackEstimate: () => estimateFeesPerGas(client),\n })\n}\n\nexport const __transactionFeeTestUtils = {\n resolveFallbackQuote,\n resolveFeeHistoryQuote,\n resolveVaultTransactionFeeQuote,\n}\n"],"mappings":";;;AAGA,MAAa,iCAAiC;AAC9C,MAAa,iCAAiC;AAC9C,MAAa,iCAAiC;AAE9C,MAAM,0BAA0B;AAChC,MAAM,iCAAiC,CAAC,EAAG;AAC3C,MAAM,4BAA4B;AAClC,MAAM,8BAA8B;AACpC,MAAM,gCAAgC;AACtC,MAAM,kCAAkC;AA6BxC,IAAa,qCAAb,cAAwD,MAAM;CAC5D,AAAS;CACT,AAAS;CAET,YAAY,EACV,iBACA,eAID,EAAE;AACD,QAAM,yDAAyD;AAC/D,OAAK,OAAO;AACZ,OAAK,kBAAkB;AACvB,OAAK,gBAAgB;CACtB;AACF;AAED,IAAa,oCAAb,cAAuD,MAAM;CAC3D,AAAS;CACT,AAAS;CACT,AAAS;CAET,YAAY,EACV,UACA,4BACA,0BAKD,EAAE;AACD,SACG,mCAAmC,+BAA+B,UAAU,CAAC,gCAChE,SAAS,UAAU,CAAC,+BAA+B,2BAA2B,UAAU,CAAC,6BACzE,yBAAyB,UAAU,CAAC,EACnE;AACD,OAAK,OAAO;AACZ,OAAK,WAAW;AAChB,OAAK,6BAA6B;AAClC,OAAK,2BAA2B;CACjC;AACF;AAYD,SAAS,qBAAqBA,OAAeC,WAAmBC,aAA6B;AAC3F,SAAQ,QAAQ,YAAY,cAAc,MAAM;AACjD;AAED,S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CAChE;AAEH,KAAI,oBAAuB,eAAe,MAAM,oBAC9C,QAAO;EACL,OAAO;EACP,MAAM;EACN,SACG,mCAAmC,aAAa,UAAU,CAAC,yBACzD,MAAM,oBAAoB,UAAU,CAAC;CAE3C;AAEH,QAAO,EAAE,OAAO,KAAM;AACvB;AAED,eAAe,gCAAgC,EAC7C,gBACA,sBAID,EAAqC;CACpC,IAAIC;AACJ,KAAI;EACF,MAAM,QAAQ,uBAAuB,MAAM,gBAAgB,CAAC;AAC5D,MAAI,UAAU,KAAM,QAAO;AAC3B,oBAAkB,IAAI,MAAM;CAC7B,SAAQ,OAAO;AACd,oBAAkB;CACnB;AAED,KAAI;AACF,SAAO,qBAAqB,MAAM,sBAAsB,CAAC;CAC1D,SAAQ,eAAe;AACtB,QAAM,IAAI,mCAAmC;GAAE;GAAiB;EAAe;CAChF;AACF;;;;;;;;;AAUD,eAAsB,4BACpBC,QACmC;AACnC,QAAO,gCAAgC;EACrC,gBAAgB,MACd,cAAc,QAAQ;GACpB,YAAY;GACZ,UAAU;GACV,mBAAmB;EACpB,EAAC;EACJ,sBAAsB,MAAM,mBAAmB,OAAO;CACvD,EAAC;AACH"}
|
|
@@ -1,63 +0,0 @@
|
|
|
1
|
-
import { Chain, Client, Transport } from "viem";
|
|
2
|
-
|
|
3
|
-
//#region src/hypoVault/transactionFees.d.ts
|
|
4
|
-
declare const MIN_VAULT_PRIORITY_FEE_PER_GAS = 100000000n;
|
|
5
|
-
declare const MAX_VAULT_PRIORITY_FEE_PER_GAS = 3000000000n;
|
|
6
|
-
declare const MAX_VAULT_TRANSACTION_GAS_COST = 15000000000000000n;
|
|
7
|
-
type VaultTransactionFeeQuote = {
|
|
8
|
-
maxFeePerGas: bigint;
|
|
9
|
-
maxPriorityFeePerGas: bigint;
|
|
10
|
-
minimumMaxFeePerGas: bigint;
|
|
11
|
-
source: 'fee_history' | 'viem_fallback';
|
|
12
|
-
};
|
|
13
|
-
type VaultSignedTransactionFeeCaps = {
|
|
14
|
-
gasLimit?: bigint | null;
|
|
15
|
-
maxFeePerGas: bigint | null;
|
|
16
|
-
maxPriorityFeePerGas: bigint | null;
|
|
17
|
-
};
|
|
18
|
-
type VaultSignedTransactionFeeValidationResult = {
|
|
19
|
-
valid: true;
|
|
20
|
-
} | {
|
|
21
|
-
valid: false;
|
|
22
|
-
code: 'MissingEip1559Fees' | 'InvalidFeeCaps' | 'PriorityFeeTooLow' | 'PriorityFeeTooHigh' | 'MaxFeeTooLow' | 'GasCostTooHigh';
|
|
23
|
-
reason: string;
|
|
24
|
-
};
|
|
25
|
-
declare class VaultTransactionFeeEstimationError extends Error {
|
|
26
|
-
readonly feeHistoryError: unknown;
|
|
27
|
-
readonly fallbackError: unknown;
|
|
28
|
-
constructor({
|
|
29
|
-
feeHistoryError,
|
|
30
|
-
fallbackError
|
|
31
|
-
}: {
|
|
32
|
-
feeHistoryError: unknown;
|
|
33
|
-
fallbackError: unknown;
|
|
34
|
-
});
|
|
35
|
-
}
|
|
36
|
-
declare class VaultTransactionGasCostLimitError extends Error {
|
|
37
|
-
readonly gasLimit: bigint;
|
|
38
|
-
readonly maximumAffordableFeePerGas: bigint;
|
|
39
|
-
readonly minimumRequiredFeePerGas: bigint;
|
|
40
|
-
constructor({
|
|
41
|
-
gasLimit,
|
|
42
|
-
maximumAffordableFeePerGas,
|
|
43
|
-
minimumRequiredFeePerGas
|
|
44
|
-
}: {
|
|
45
|
-
gasLimit: bigint;
|
|
46
|
-
maximumAffordableFeePerGas: bigint;
|
|
47
|
-
minimumRequiredFeePerGas: bigint;
|
|
48
|
-
});
|
|
49
|
-
}
|
|
50
|
-
declare function applyVaultTransactionGasCostLimit(quote: VaultTransactionFeeQuote, gasLimit: bigint): VaultTransactionFeeQuote;
|
|
51
|
-
declare function bufferVaultTransactionGasEstimate(gasEstimate: bigint): bigint;
|
|
52
|
-
declare function validateVaultSignedTransactionFeeCaps(feeCaps: VaultSignedTransactionFeeCaps, quote?: VaultTransactionFeeQuote): VaultSignedTransactionFeeValidationResult;
|
|
53
|
-
/**
|
|
54
|
-
* Resolve explicit EIP-1559 fees for operator-controlled vault transactions.
|
|
55
|
-
*
|
|
56
|
-
* The normal path follows the median p90 priority fee from the last 20 blocks,
|
|
57
|
-
* with a 0.1 gwei floor and 3 gwei ceiling. If fee history is unavailable,
|
|
58
|
-
* Viem's estimate is used while preserving those bounds and its original
|
|
59
|
-
* base-fee allowance.
|
|
60
|
-
*/
|
|
61
|
-
declare function getVaultTransactionFeeQuote<chain extends Chain | undefined>(client: Client<Transport, chain>): Promise<VaultTransactionFeeQuote>; //#endregion
|
|
62
|
-
export { MAX_VAULT_PRIORITY_FEE_PER_GAS as MAX_VAULT_PRIORITY_FEE_PER_GAS$1, MAX_VAULT_TRANSACTION_GAS_COST as MAX_VAULT_TRANSACTION_GAS_COST$1, MIN_VAULT_PRIORITY_FEE_PER_GAS as MIN_VAULT_PRIORITY_FEE_PER_GAS$1, VaultSignedTransactionFeeCaps, VaultSignedTransactionFeeValidationResult, VaultTransactionFeeEstimationError as VaultTransactionFeeEstimationError$1, VaultTransactionFeeQuote, VaultTransactionGasCostLimitError as VaultTransactionGasCostLimitError$1, applyVaultTransactionGasCostLimit as applyVaultTransactionGasCostLimit$1, bufferVaultTransactionGasEstimate as bufferVaultTransactionGasEstimate$1, getVaultTransactionFeeQuote as getVaultTransactionFeeQuote$1, validateVaultSignedTransactionFeeCaps as validateVaultSignedTransactionFeeCaps$1 };
|
|
63
|
-
//# sourceMappingURL=transactionFees-DzDyt50k.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"transactionFees-DzDyt50k.d.ts","names":["Chain","Client","Transport","MIN_VAULT_PRIORITY_FEE_PER_GAS","MAX_VAULT_PRIORITY_FEE_PER_GAS","MAX_VAULT_TRANSACTION_GAS_COST","VaultTransactionFeeQuote","VaultSignedTransactionFeeCaps","VaultSignedTransactionFeeValidationResult","VaultTransactionFeeEstimationError","feeHistoryError","fallbackError","Error","VaultTransactionGasCostLimitError","gasLimit","maximumAffordableFeePerGas","minimumRequiredFeePerGas","FeeHistorySnapshot","FallbackFeeEstimate","resolveFeeHistoryQuote","baseFeePerGas","reward","resolveFallbackQuote","estimatedMaxFeePerGas","estimatedPriorityFeePerGas","applyVaultTransactionGasCostLimit","bufferVaultTransactionGasEstimate","validateVaultSignedTransactionFeeCaps","resolveVaultTransactionFeeQuote","readFeeHistory","readFallbackEstimate","Promise","getVaultTransactionFeeQuote","chain","__transactionFeeTestUtils"],"sources":["../src/hypoVault/transactionFees.d.ts"],"sourcesContent":null,"mappings":";;;cACqBG,8BAAAA;cACAC,8BAAAA;AADAD,cAEAE,8BAAAA,GAF8B,kBAAA;AAC9BD,KAETE,wBAAAA,GAFuC;EAC9BD,YAAAA,EAAAA,MAAAA;EACTC,oBAAAA,EAAAA,MAAwB;EAMxBC,mBAAAA,EAAAA,MAAAA;EAKAC,MAAAA,EAAAA,aAAAA,GAAAA,eAAAA;AAOZ,CAAA;AAAuD,KAZ3CD,6BAAAA,GAY2C;EAAA,QAGrCG,CAAAA,EAAAA,MAAAA,GAAAA,IAAAA;EAAe,YAAEC,EAAAA,MAAAA,GAAAA,IAAAA;EAAa,oBAHgBC,EAAAA,MAAAA,GAAAA,IAAAA;AAAK,CAAA;AAQhDC,KAfTL,yCAAAA,GAe0C;EAAA,KAAA,EAAA,IAAA;CAAA,GAAA;EAI5B,KAAEO,EAAAA,KAAAA;EAA0B,IAAEC,EAAAA,oBAAAA,GAAAA,gBAAAA,GAAAA,mBAAAA,GAAAA,oBAAAA,GAAAA,cAAAA,GAAAA,gBAAAA;EAAwB,MAJjBJ,EAAAA,MAAAA;AAAK,CAAA;AA0B5Ca,cAlCHhB,kCAAAA,SAA2CG,KAAAA,CAkCP;EAAA,SAAA,eAAA,EAAA,OAAA;EAAA,SAAQN,aAAAA,EAAAA,OAAAA;EAAwB,WAAqBA,CAAAA;IAAAA,eAAAA;IAAAA;EAEtFqB,CAFsFrB,EAAAA;IAAwB,eAAA,EAAA,OAAA;IAC9GoB,aAAAA,EAAAA,OAAAA;EACAC,CAAAA;;AAA+CpB,cA5BlDM,iCAAAA,SAA0CD,KAAAA,CA4BQL;EAA6B,SAAUD,QAAAA,EAAAA,MAAAA;EAAwB,SAAGE,0BAAAA,EAAAA,MAAAA;EAAyC,SAAA,wBAAA,EAAA,MAAA;;;;;;;;;;;iBAF1JiB,iCAAAA,QAAyCnB,6CAA6CA;iBACtFoB,iCAAAA;iBACAC,qCAAAA,UAA+CpB,uCAAuCD,2BAA2BE;;;;;;;;;iBAajHwB,0CAA0ChC,2BAA2BC,OAAOC,WAAW+B,SAASF,QAAQzB"}
|
package/dist/types-Cad5m4Td.d.ts
DELETED
|
@@ -1,246 +0,0 @@
|
|
|
1
|
-
import { PoolKey, TxOverrides } from "./index-Bo9tHtD7.js";
|
|
2
|
-
import { Address, PublicClient, WalletClient } from "viem";
|
|
3
|
-
|
|
4
|
-
//#region src/uniswap/v4/addresses.d.ts
|
|
5
|
-
/**
|
|
6
|
-
* Uniswap v4 contract addresses required for a Universal Router spot swap.
|
|
7
|
-
*/
|
|
8
|
-
|
|
9
|
-
/**
|
|
10
|
-
* Uniswap v4 contract addresses required for a Universal Router spot swap.
|
|
11
|
-
*/
|
|
12
|
-
interface UniswapV4Addresses {
|
|
13
|
-
/** Universal Router (v4-capable build) — entrypoint for `execute(...)`. */
|
|
14
|
-
universalRouter: Address;
|
|
15
|
-
/** V4Quoter — `quoteExactInputSingle` (revert/staticcall-based). */
|
|
16
|
-
v4Quoter: Address;
|
|
17
|
-
/** Uniswap v4 PoolManager (singleton). */
|
|
18
|
-
poolManager: Address;
|
|
19
|
-
/** Uniswap v4 PositionManager (posm) — ERC721 LP position NFTs. */
|
|
20
|
-
positionManager: Address;
|
|
21
|
-
/** Canonical Permit2 (same address on every chain). */
|
|
22
|
-
permit2: Address;
|
|
23
|
-
}
|
|
24
|
-
/**
|
|
25
|
-
* Canonical Permit2, identical across all chains.
|
|
26
|
-
*/
|
|
27
|
-
declare const PERMIT2_ADDRESS: Address;
|
|
28
|
-
/**
|
|
29
|
-
* Verified Uniswap v4 deployment addresses keyed by chainId.
|
|
30
|
-
*
|
|
31
|
-
* Sourced from the official Uniswap v4 deployments. Add a chain here only after
|
|
32
|
-
* verifying each address against the canonical Uniswap deployment listing —
|
|
33
|
-
* Universal Router in particular is NOT the same address across chains.
|
|
34
|
-
*/
|
|
35
|
-
declare const UNISWAP_V4_ADDRESSES: Record<number, UniswapV4Addresses>;
|
|
36
|
-
/**
|
|
37
|
-
* Resolve the Uniswap v4 addresses for a chain, applying optional overrides.
|
|
38
|
-
*
|
|
39
|
-
* @param chainId - Target chain ID.
|
|
40
|
-
* @param overrides - Partial override of any address (e.g. for fork tests).
|
|
41
|
-
* @returns Fully-resolved {@link UniswapV4Addresses}.
|
|
42
|
-
* @throws {UnsupportedChainError} when the chain is not listed and the
|
|
43
|
-
* overrides do not supply every required address.
|
|
44
|
-
*/
|
|
45
|
-
declare function getUniswapV4Addresses(chainId: bigint, overrides?: Partial<UniswapV4Addresses>): UniswapV4Addresses; //#endregion
|
|
46
|
-
//#region src/uniswap/v4/router/types.d.ts
|
|
47
|
-
/**
|
|
48
|
-
* Parameters for {@link swapExactInViaRouter}.
|
|
49
|
-
*/
|
|
50
|
-
interface SwapExactInViaRouterParams {
|
|
51
|
-
/** Public client for reads + receipts. */
|
|
52
|
-
client: PublicClient;
|
|
53
|
-
/** Wallet client for signing. */
|
|
54
|
-
walletClient: WalletClient;
|
|
55
|
-
/** Account address. */
|
|
56
|
-
account: Address;
|
|
57
|
-
/** PanopticPool address — used to resolve the underlying v4 PoolKey. */
|
|
58
|
-
poolAddress: Address;
|
|
59
|
-
/** Chain ID (selects per-chain Uniswap v4 addresses). */
|
|
60
|
-
chainId: bigint;
|
|
61
|
-
/** Token to sell. `address(0)` (zero address) for native ETH. */
|
|
62
|
-
tokenIn: Address;
|
|
63
|
-
/** Exact amount of `tokenIn` to spend (must fit uint128). */
|
|
64
|
-
amountIn: bigint;
|
|
65
|
-
/** Slippage tolerance in bps (e.g. 500n = 5%). */
|
|
66
|
-
slippageBps: bigint;
|
|
67
|
-
/** Absolute deadline (unix seconds). If omitted, derived from block timestamp. */
|
|
68
|
-
deadline?: bigint;
|
|
69
|
-
/** Recipient of the output. Defaults to `account`. */
|
|
70
|
-
recipient?: Address;
|
|
71
|
-
/** Gas and transaction overrides. */
|
|
72
|
-
txOverrides?: TxOverrides;
|
|
73
|
-
/** Override per-chain Uniswap v4 addresses (e.g. fork tests). */
|
|
74
|
-
addresses?: Partial<UniswapV4Addresses>;
|
|
75
|
-
}
|
|
76
|
-
/**
|
|
77
|
-
* Parameters for {@link quoteSwapExactInViaRouter}.
|
|
78
|
-
*/
|
|
79
|
-
interface QuoteSwapExactInViaRouterParams {
|
|
80
|
-
/** Public client. */
|
|
81
|
-
client: PublicClient;
|
|
82
|
-
/** PanopticPool address — used to resolve the underlying v4 PoolKey. */
|
|
83
|
-
poolAddress: Address;
|
|
84
|
-
/** Chain ID. */
|
|
85
|
-
chainId: bigint;
|
|
86
|
-
/** Token to sell. `address(0)` for native ETH. */
|
|
87
|
-
tokenIn: Address;
|
|
88
|
-
/** Exact amount of `tokenIn` to spend (must fit uint128). */
|
|
89
|
-
amountIn: bigint;
|
|
90
|
-
/** Slippage tolerance in bps (used to compute `amountOutMinimum`). */
|
|
91
|
-
slippageBps: bigint;
|
|
92
|
-
/** Optional block number for the quote. */
|
|
93
|
-
blockNumber?: bigint;
|
|
94
|
-
/** Override per-chain Uniswap v4 addresses (e.g. fork tests). */
|
|
95
|
-
addresses?: Partial<UniswapV4Addresses>;
|
|
96
|
-
}
|
|
97
|
-
/**
|
|
98
|
-
* Quote result data (carried inside a `SimulationResult`).
|
|
99
|
-
*/
|
|
100
|
-
interface SwapExactInQuote {
|
|
101
|
-
/** Quoted output amount of `tokenOut`. */
|
|
102
|
-
amountOut: bigint;
|
|
103
|
-
/** Minimum acceptable output after applying slippage. */
|
|
104
|
-
amountOutMinimum: bigint;
|
|
105
|
-
/** Whether the swap goes currency0 → currency1. */
|
|
106
|
-
zeroForOne: boolean;
|
|
107
|
-
/** Output token address (`address(0)` for native ETH). */
|
|
108
|
-
tokenOut: Address;
|
|
109
|
-
/** Resolved v4 PoolKey (reused by the swap calldata builder). */
|
|
110
|
-
poolKey: PoolKey;
|
|
111
|
-
/** Quoter's gas estimate. */
|
|
112
|
-
gasEstimate: bigint;
|
|
113
|
-
}
|
|
114
|
-
/**
|
|
115
|
-
* Parameters for {@link swapExactOutViaRouter}.
|
|
116
|
-
*/
|
|
117
|
-
interface SwapExactOutViaRouterParams {
|
|
118
|
-
/** Public client for reads + receipts. */
|
|
119
|
-
client: PublicClient;
|
|
120
|
-
/** Wallet client for signing. */
|
|
121
|
-
walletClient: WalletClient;
|
|
122
|
-
/** Account address. */
|
|
123
|
-
account: Address;
|
|
124
|
-
/** PanopticPool address — used to resolve the underlying v4 PoolKey. */
|
|
125
|
-
poolAddress: Address;
|
|
126
|
-
/** Chain ID (selects per-chain Uniswap v4 addresses). */
|
|
127
|
-
chainId: bigint;
|
|
128
|
-
/** Token to sell (the pay token). `address(0)` (zero address) for native ETH. */
|
|
129
|
-
tokenIn: Address;
|
|
130
|
-
/** Exact amount of the output token to receive (must fit uint128). */
|
|
131
|
-
amountOut: bigint;
|
|
132
|
-
/** Slippage tolerance in bps (e.g. 500n = 5%); caps the input. */
|
|
133
|
-
slippageBps: bigint;
|
|
134
|
-
/** Absolute deadline (unix seconds). If omitted, derived from block timestamp. */
|
|
135
|
-
deadline?: bigint;
|
|
136
|
-
/** Recipient of the output. Defaults to `account`. */
|
|
137
|
-
recipient?: Address;
|
|
138
|
-
/** Gas and transaction overrides. */
|
|
139
|
-
txOverrides?: TxOverrides;
|
|
140
|
-
/** Override per-chain Uniswap v4 addresses (e.g. fork tests). */
|
|
141
|
-
addresses?: Partial<UniswapV4Addresses>;
|
|
142
|
-
}
|
|
143
|
-
/**
|
|
144
|
-
* Parameters for {@link quoteSwapExactOutViaRouter}.
|
|
145
|
-
*/
|
|
146
|
-
interface QuoteSwapExactOutViaRouterParams {
|
|
147
|
-
/** Public client. */
|
|
148
|
-
client: PublicClient;
|
|
149
|
-
/** PanopticPool address — used to resolve the underlying v4 PoolKey. */
|
|
150
|
-
poolAddress: Address;
|
|
151
|
-
/** Chain ID. */
|
|
152
|
-
chainId: bigint;
|
|
153
|
-
/** Token to sell (the pay token). `address(0)` for native ETH. */
|
|
154
|
-
tokenIn: Address;
|
|
155
|
-
/** Exact amount of the output token to receive (must fit uint128). */
|
|
156
|
-
amountOut: bigint;
|
|
157
|
-
/** Slippage tolerance in bps (used to compute `amountInMaximum`). */
|
|
158
|
-
slippageBps: bigint;
|
|
159
|
-
/** Optional block number for the quote. */
|
|
160
|
-
blockNumber?: bigint;
|
|
161
|
-
/** Override per-chain Uniswap v4 addresses (e.g. fork tests). */
|
|
162
|
-
addresses?: Partial<UniswapV4Addresses>;
|
|
163
|
-
}
|
|
164
|
-
/**
|
|
165
|
-
* Quote result data for an exact-out swap (carried inside a `SimulationResult`).
|
|
166
|
-
*/
|
|
167
|
-
interface SwapExactOutQuote {
|
|
168
|
-
/** Quoted input amount of `tokenIn` required for the exact output. */
|
|
169
|
-
amountIn: bigint;
|
|
170
|
-
/** Maximum acceptable input after applying slippage. */
|
|
171
|
-
amountInMaximum: bigint;
|
|
172
|
-
/** Whether the swap goes currency0 → currency1. */
|
|
173
|
-
zeroForOne: boolean;
|
|
174
|
-
/** Output token address (`address(0)` for native ETH). */
|
|
175
|
-
tokenOut: Address;
|
|
176
|
-
/** Resolved v4 PoolKey (reused by the swap calldata builder). */
|
|
177
|
-
poolKey: PoolKey;
|
|
178
|
-
/** Quoter's gas estimate. */
|
|
179
|
-
gasEstimate: bigint;
|
|
180
|
-
}
|
|
181
|
-
/**
|
|
182
|
-
* Parameters for {@link checkRouterApproval}.
|
|
183
|
-
*/
|
|
184
|
-
interface CheckRouterApprovalParams {
|
|
185
|
-
/** Public client. */
|
|
186
|
-
client: PublicClient;
|
|
187
|
-
/** Chain ID. */
|
|
188
|
-
chainId: bigint;
|
|
189
|
-
/** ERC20 token being spent (must not be native ETH). */
|
|
190
|
-
tokenIn: Address;
|
|
191
|
-
/** Token owner. */
|
|
192
|
-
owner: Address;
|
|
193
|
-
/** Amount that must be spendable. */
|
|
194
|
-
amount: bigint;
|
|
195
|
-
/** Override per-chain Uniswap v4 addresses (e.g. fork tests). */
|
|
196
|
-
addresses?: Partial<UniswapV4Addresses>;
|
|
197
|
-
}
|
|
198
|
-
/**
|
|
199
|
-
* Result of {@link checkRouterApproval}.
|
|
200
|
-
*/
|
|
201
|
-
interface RouterApprovalStatus {
|
|
202
|
-
/** ERC20 → Permit2 allowance is insufficient. */
|
|
203
|
-
needsErc20Approval: boolean;
|
|
204
|
-
/** Permit2 → Universal Router allowance is insufficient or expired. */
|
|
205
|
-
needsPermit2Approval: boolean;
|
|
206
|
-
/** Current ERC20 → Permit2 allowance. */
|
|
207
|
-
erc20Allowance: bigint;
|
|
208
|
-
/** Current Permit2 → router allowance amount. */
|
|
209
|
-
permit2Amount: bigint;
|
|
210
|
-
/** Current Permit2 → router allowance expiration (unix seconds). */
|
|
211
|
-
permit2Expiration: bigint;
|
|
212
|
-
}
|
|
213
|
-
/**
|
|
214
|
-
* Parameters for {@link approveErc20ForPermit2}.
|
|
215
|
-
*/
|
|
216
|
-
interface ApproveErc20ForPermit2Params {
|
|
217
|
-
client: PublicClient;
|
|
218
|
-
walletClient: WalletClient;
|
|
219
|
-
account: Address;
|
|
220
|
-
chainId: bigint;
|
|
221
|
-
/** ERC20 token to approve to Permit2. */
|
|
222
|
-
tokenIn: Address;
|
|
223
|
-
/** Amount to approve. Defaults to uint256 max. */
|
|
224
|
-
amount?: bigint;
|
|
225
|
-
txOverrides?: TxOverrides;
|
|
226
|
-
addresses?: Partial<UniswapV4Addresses>;
|
|
227
|
-
}
|
|
228
|
-
/**
|
|
229
|
-
* Parameters for {@link approveRouterViaPermit2}.
|
|
230
|
-
*/
|
|
231
|
-
interface ApproveRouterViaPermit2Params {
|
|
232
|
-
client: PublicClient;
|
|
233
|
-
walletClient: WalletClient;
|
|
234
|
-
account: Address;
|
|
235
|
-
chainId: bigint;
|
|
236
|
-
/** ERC20 token the router is allowed to spend via Permit2. */
|
|
237
|
-
tokenIn: Address;
|
|
238
|
-
/** Amount to approve (must fit uint160). Defaults to uint160 max. */
|
|
239
|
-
amount?: bigint;
|
|
240
|
-
/** Allowance expiration (unix seconds, uint48). If omitted, block timestamp + 30 days. */
|
|
241
|
-
expiration?: bigint;
|
|
242
|
-
txOverrides?: TxOverrides;
|
|
243
|
-
addresses?: Partial<UniswapV4Addresses>;
|
|
244
|
-
} //#endregion
|
|
245
|
-
export { ApproveErc20ForPermit2Params, ApproveRouterViaPermit2Params, CheckRouterApprovalParams, PERMIT2_ADDRESS as PERMIT2_ADDRESS$1, QuoteSwapExactInViaRouterParams, QuoteSwapExactOutViaRouterParams, RouterApprovalStatus, SwapExactInQuote, SwapExactInViaRouterParams, SwapExactOutQuote, SwapExactOutViaRouterParams, UNISWAP_V4_ADDRESSES as UNISWAP_V4_ADDRESSES$1, UniswapV4Addresses, getUniswapV4Addresses as getUniswapV4Addresses$1 };
|
|
246
|
-
//# sourceMappingURL=types-Cad5m4Td.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"types-Cad5m4Td.d.ts","names":["Address","UniswapV4Addresses","PERMIT2_ADDRESS","UNISWAP_V4_ADDRESSES","Record","getUniswapV4Addresses","Partial","Address","PublicClient","WalletClient","PoolKey","TxOverrides","UniswapV4Addresses","SwapExactInViaRouterParams","Partial","QuoteSwapExactInViaRouterParams","SwapExactInQuote","SwapExactOutViaRouterParams","QuoteSwapExactOutViaRouterParams","SwapExactOutQuote","CheckRouterApprovalParams","RouterApprovalStatus","ApproveErc20ForPermit2Params","ApproveRouterViaPermit2Params"],"sources":["../src/uniswap/v4/addresses.d.ts","../src/uniswap/v4/router/types.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, WalletClient } from "viem";
|
|
3
|
-
|
|
4
|
-
//#region src/cow/types.d.ts
|
|
5
|
-
/** Order kind: 'sell' = exact-in, 'buy' = exact-out. */
|
|
6
|
-
|
|
7
|
-
/** Order kind: 'sell' = exact-in, 'buy' = exact-out. */
|
|
8
|
-
type CowOrderKind = 'sell' | 'buy';
|
|
9
|
-
/** Order-book lifecycle states. */
|
|
10
|
-
type CowOrderStatus = 'presignaturePending' | 'open' | 'fulfilled' | 'cancelled' | 'expired';
|
|
11
|
-
/** Parameters for {@link quoteCowSwap}. */
|
|
12
|
-
interface QuoteCowSwapParams {
|
|
13
|
-
/** Chain ID (selects the order-book API). */
|
|
14
|
-
chainId: bigint;
|
|
15
|
-
/** ERC20 token to sell (native ETH not supported). */
|
|
16
|
-
sellToken: Address;
|
|
17
|
-
/** Token to buy. The zero address (native ETH) maps to the CoW buy sentinel. */
|
|
18
|
-
buyToken: Address;
|
|
19
|
-
/** 'sell' = exact-in (amount is sellAmountBeforeFee), 'buy' = exact-out (amount is buyAmountAfterFee). */
|
|
20
|
-
kind: CowOrderKind;
|
|
21
|
-
/** Exact amount being quoted (see `kind`). */
|
|
22
|
-
amount: bigint;
|
|
23
|
-
/** Order owner — the API validates balances/fees against this account. */
|
|
24
|
-
from: Address;
|
|
25
|
-
/** Slippage tolerance in bps applied to the signed limit amounts. */
|
|
26
|
-
slippageBps: bigint;
|
|
27
|
-
/** Order validity window in seconds (drives `validTo`). Defaults to 30 minutes. */
|
|
28
|
-
validForSeconds?: bigint;
|
|
29
|
-
/** Override the order-book API base URL (e.g. tests). */
|
|
30
|
-
apiUrl?: string;
|
|
31
|
-
}
|
|
32
|
-
/**
|
|
33
|
-
* Quote result data (carried inside a `SimulationResult`).
|
|
34
|
-
*
|
|
35
|
-
* `orderSellAmount`/`orderBuyAmount` are the limit amounts to sign: fee folded
|
|
36
|
-
* into the sell side (`feeAmount` is signed as 0 per the current fee model)
|
|
37
|
-
* and slippage applied to the non-exact side.
|
|
38
|
-
*/
|
|
39
|
-
interface CowQuote {
|
|
40
|
-
kind: CowOrderKind;
|
|
41
|
-
sellToken: Address;
|
|
42
|
-
buyToken: Address;
|
|
43
|
-
/** Quoted sell amount, excluding fee. */
|
|
44
|
-
sellAmount: bigint;
|
|
45
|
-
/** Quoted buy amount (net). */
|
|
46
|
-
buyAmount: bigint;
|
|
47
|
-
/** Quoted protocol fee, in the sell token. */
|
|
48
|
-
feeAmount: bigint;
|
|
49
|
-
/** Total sell-token outflow at the quoted price (sellAmount + feeAmount). */
|
|
50
|
-
sellAmountTotal: bigint;
|
|
51
|
-
/** Sell amount to sign (sell orders: gross; buy orders: slippage-padded max). */
|
|
52
|
-
orderSellAmount: bigint;
|
|
53
|
-
/** Buy amount to sign (sell orders: slippage-reduced min; buy orders: exact). */
|
|
54
|
-
orderBuyAmount: bigint;
|
|
55
|
-
/** Order expiry (unix seconds, uint32). */
|
|
56
|
-
validTo: bigint;
|
|
57
|
-
/** Order-book quote id, echoed on order submission for tracing. */
|
|
58
|
-
quoteId: number | null;
|
|
59
|
-
}
|
|
60
|
-
/** Parameters for {@link signAndSubmitCowOrder}. */
|
|
61
|
-
interface SignAndSubmitCowOrderParams {
|
|
62
|
-
walletClient: WalletClient;
|
|
63
|
-
/** Order owner (signer). */
|
|
64
|
-
account: Address;
|
|
65
|
-
chainId: bigint;
|
|
66
|
-
/** Quote to turn into a signed order. */
|
|
67
|
-
quote: CowQuote;
|
|
68
|
-
/** Recipient of the buy token. Defaults to `account`. */
|
|
69
|
-
receiver?: Address;
|
|
70
|
-
/** Override the order-book API base URL (e.g. tests). */
|
|
71
|
-
apiUrl?: string;
|
|
72
|
-
}
|
|
73
|
-
/** Result of posting an order: the order-book UID (not a tx hash). */
|
|
74
|
-
interface CowOrderResult {
|
|
75
|
-
orderUid: Hex;
|
|
76
|
-
}
|
|
77
|
-
/** Parameters for {@link cancelCowOrder}. */
|
|
78
|
-
interface CancelCowOrderParams {
|
|
79
|
-
walletClient: WalletClient;
|
|
80
|
-
account: Address;
|
|
81
|
-
chainId: bigint;
|
|
82
|
-
orderUid: Hex;
|
|
83
|
-
apiUrl?: string;
|
|
84
|
-
}
|
|
85
|
-
/** Parameters for {@link getCowOrderStatus}. */
|
|
86
|
-
interface GetCowOrderStatusParams {
|
|
87
|
-
chainId: bigint;
|
|
88
|
-
orderUid: Hex;
|
|
89
|
-
apiUrl?: string;
|
|
90
|
-
}
|
|
91
|
-
/** Result of {@link getCowOrderStatus}. */
|
|
92
|
-
interface CowOrderState {
|
|
93
|
-
status: CowOrderStatus;
|
|
94
|
-
/** Cumulative executed amounts (partial fills included). */
|
|
95
|
-
executedSellAmount: bigint;
|
|
96
|
-
executedBuyAmount: bigint;
|
|
97
|
-
/** Settlement tx hash, available once at least one trade has executed. */
|
|
98
|
-
settlementTxHash?: Hex;
|
|
99
|
-
}
|
|
100
|
-
/** Parameters for {@link checkCowApproval}. */
|
|
101
|
-
interface CheckCowApprovalParams {
|
|
102
|
-
client: PublicClient;
|
|
103
|
-
/** ERC20 token being sold. */
|
|
104
|
-
sellToken: Address;
|
|
105
|
-
/** Token owner. */
|
|
106
|
-
owner: Address;
|
|
107
|
-
/** Amount that must be spendable by the vault relayer. */
|
|
108
|
-
amount: bigint;
|
|
109
|
-
}
|
|
110
|
-
/** Result of {@link checkCowApproval}. */
|
|
111
|
-
interface CowApprovalStatus {
|
|
112
|
-
needsApproval: boolean;
|
|
113
|
-
/** Current ERC20 → VaultRelayer allowance. */
|
|
114
|
-
allowance: bigint;
|
|
115
|
-
}
|
|
116
|
-
/** Parameters for {@link approveErc20ForCow}. */
|
|
117
|
-
interface ApproveErc20ForCowParams {
|
|
118
|
-
client: PublicClient;
|
|
119
|
-
walletClient: WalletClient;
|
|
120
|
-
account: Address;
|
|
121
|
-
/** ERC20 token to approve to the vault relayer. */
|
|
122
|
-
sellToken: Address;
|
|
123
|
-
/** Amount to approve. Defaults to uint256 max. */
|
|
124
|
-
amount?: bigint;
|
|
125
|
-
txOverrides?: TxOverrides;
|
|
126
|
-
} //#endregion
|
|
127
|
-
export { ApproveErc20ForCowParams, CancelCowOrderParams, CheckCowApprovalParams, CowApprovalStatus, CowOrderKind, CowOrderResult, CowOrderState, CowOrderStatus, CowQuote, GetCowOrderStatusParams, QuoteCowSwapParams, SignAndSubmitCowOrderParams };
|
|
128
|
-
//# sourceMappingURL=types-DM0nxlZr.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"types-DM0nxlZr.d.ts","names":["Address","Hex","PublicClient","WalletClient","TxOverrides","CowOrderKind","CowOrderStatus","QuoteCowSwapParams","CowQuote","SignAndSubmitCowOrderParams","CowOrderResult","CancelCowOrderParams","GetCowOrderStatusParams","CowOrderState","CheckCowApprovalParams","CowApprovalStatus","ApproveErc20ForCowParams"],"sources":["../src/cow/types.d.ts"],"sourcesContent":null,"mappings":";;;;;;;AASYM,KAFAD,YAAAA,GAEc,MAAA,GAAA,KAAA;;AAETE,KAFLD,cAAAA,GAEuB,qBAAA,GAAA,MAAA,GAAA,WAAA,GAAA,WAAA,GAAA,SAAA;;AAIpBN,UAJEO,kBAAAA,CAIFP;EAAO;EAED,OAEXK,EAAAA,MAAAA;EAAY;EAIL,SAAA,EARFL,OAQE;;YANHA;;QAEJK;;;;EAmBOG,IAAAA,EAfPR,OAee;EAAA;EAAA,WACfK,EAAAA,MAAAA;EAAY;EACA,eACRL,CAAAA,EAAAA,MAAAA;EAAO;;AAmBrB;;;;;;AAQsB;;AAKLU,UAnCAF,QAAAA,CAmCc;QAlCrBH;EAsCOM,SAAAA,EArCFX,OAqCEW;EAAoB,QAAA,EApCvBX,OAoCuB;EAAA;EACP,UACjBA,EAAAA,MAAAA;EAAO;EAEH,SAAA,EAAA,MAAA;;EAIAY,SAAAA,EAAAA,MAAAA;;EAMAC,eAAAA,EAAa,MAAA;EAAA;EAAA,eAClBP,EAAAA,MAAAA;EAAc;EAKA,cAAA,EAAA,MAAA;;EAGTQ,OAAAA,EAAAA,MAAAA;E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