@guru-fund/sdk 0.1.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/LICENSE +21 -0
- package/README.md +226 -0
- package/dist/GuruProtocol.d.ts +44 -0
- package/dist/GuruProtocol.js +75 -0
- package/dist/addresses.d.ts +40 -0
- package/dist/addresses.js +111 -0
- package/dist/constants.d.ts +22 -0
- package/dist/constants.js +23 -0
- package/dist/helpers/FundDataFetcher.d.ts +24 -0
- package/dist/helpers/FundDataFetcher.js +66 -0
- package/dist/helpers/ReceiptParser.d.ts +23 -0
- package/dist/helpers/ReceiptParser.js +59 -0
- package/dist/helpers/Token.d.ts +18 -0
- package/dist/helpers/Token.js +43 -0
- package/dist/helpers/compareAddresses.d.ts +1 -0
- package/dist/helpers/compareAddresses.js +15 -0
- package/dist/index.d.ts +17 -0
- package/dist/index.js +3 -0
- package/dist/quotes/quoteDeposit.d.ts +41 -0
- package/dist/quotes/quoteDeposit.js +186 -0
- package/dist/quotes/quoteHarvest.d.ts +34 -0
- package/dist/quotes/quoteHarvest.js +105 -0
- package/dist/quotes/quoteRebalance.d.ts +51 -0
- package/dist/quotes/quoteRebalance.js +201 -0
- package/dist/quotes/quoteTrade.d.ts +18 -0
- package/dist/quotes/quoteTrade.js +51 -0
- package/dist/quotes/quoteWithdrawal.d.ts +41 -0
- package/dist/quotes/quoteWithdrawal.js +113 -0
- package/dist/router/constants.d.ts +18 -0
- package/dist/router/constants.js +25 -0
- package/dist/router/finalizeRoute.d.ts +16 -0
- package/dist/router/finalizeRoute.js +29 -0
- package/dist/router/getFallbackRoutes.d.ts +10 -0
- package/dist/router/getFallbackRoutes.js +91 -0
- package/dist/router/getUniswapV4Route.d.ts +42 -0
- package/dist/router/getUniswapV4Route.js +324 -0
- package/dist/router/getVeloraRoute.d.ts +10 -0
- package/dist/router/getVeloraRoute.js +68 -0
- package/dist/router/helpers.d.ts +11 -0
- package/dist/router/helpers.js +30 -0
- package/dist/router/index.d.ts +22 -0
- package/dist/router/index.js +135 -0
- package/dist/router/pathCache.d.ts +16 -0
- package/dist/router/pathCache.js +116 -0
- package/dist/router/poolHelper.d.ts +126 -0
- package/dist/router/poolHelper.js +807 -0
- package/dist/router/quoteWethTrade.d.ts +14 -0
- package/dist/router/quoteWethTrade.js +125 -0
- package/dist/router/simulation.d.ts +43 -0
- package/dist/router/simulation.js +70 -0
- package/dist/router/types.d.ts +149 -0
- package/dist/router/types.js +1 -0
- package/dist/router/v4PoolDiscovery.d.ts +30 -0
- package/dist/router/v4PoolDiscovery.js +147 -0
- package/dist/router/velora.d.ts +42 -0
- package/dist/router/velora.js +279 -0
- package/dist/schemas/index.d.ts +6 -0
- package/dist/schemas/index.js +6 -0
- package/dist/schemas/primitives.d.ts +3 -0
- package/dist/schemas/primitives.js +9 -0
- package/dist/schemas/quoteDeposit.d.ts +23 -0
- package/dist/schemas/quoteDeposit.js +10 -0
- package/dist/schemas/quoteHarvest.d.ts +17 -0
- package/dist/schemas/quoteHarvest.js +8 -0
- package/dist/schemas/quoteRebalance.d.ts +29 -0
- package/dist/schemas/quoteRebalance.js +10 -0
- package/dist/schemas/quoteTrade.d.ts +20 -0
- package/dist/schemas/quoteTrade.js +9 -0
- package/dist/schemas/quoteWithdrawal.d.ts +23 -0
- package/dist/schemas/quoteWithdrawal.js +10 -0
- package/dist/txBuilders/buildDepositTx.d.ts +17 -0
- package/dist/txBuilders/buildDepositTx.js +18 -0
- package/dist/txBuilders/buildHarvestTx.d.ts +16 -0
- package/dist/txBuilders/buildHarvestTx.js +17 -0
- package/dist/txBuilders/buildTradeTx.d.ts +9 -0
- package/dist/txBuilders/buildTradeTx.js +9 -0
- package/dist/txBuilders/buildWithdrawTx.d.ts +16 -0
- package/dist/txBuilders/buildWithdrawTx.js +17 -0
- package/dist/txBuilders/index.d.ts +8 -0
- package/dist/txBuilders/index.js +4 -0
- package/dist/typechain/common.d.ts +50 -0
- package/dist/typechain/common.js +1 -0
- package/dist/typechain/factories/include/IPancakeQuoterV2__factory.d.ts +225 -0
- package/dist/typechain/factories/include/IPancakeQuoterV2__factory.js +295 -0
- package/dist/typechain/factories/include/ISwapRouter02__factory.d.ts +826 -0
- package/dist/typechain/factories/include/ISwapRouter02__factory.js +1073 -0
- package/dist/typechain/factories/include/index.d.ts +2 -0
- package/dist/typechain/factories/include/index.js +2 -0
- package/dist/typechain/factories/index.d.ts +2 -0
- package/dist/typechain/factories/index.js +2 -0
- package/dist/typechain/factories/out/Adapter__factory.d.ts +31 -0
- package/dist/typechain/factories/out/Adapter__factory.js +43 -0
- package/dist/typechain/factories/out/AerodromeV2Adapter__factory.d.ts +179 -0
- package/dist/typechain/factories/out/AerodromeV2Adapter__factory.js +237 -0
- package/dist/typechain/factories/out/AerodromeV3Adapter__factory.d.ts +162 -0
- package/dist/typechain/factories/out/AerodromeV3Adapter__factory.js +215 -0
- package/dist/typechain/factories/out/AssetManager.sol/LedgerAssetManager__factory.d.ts +1032 -0
- package/dist/typechain/factories/out/AssetManager.sol/LedgerAssetManager__factory.js +1357 -0
- package/dist/typechain/factories/out/AssetManager.sol/index.d.ts +1 -0
- package/dist/typechain/factories/out/AssetManager.sol/index.js +1 -0
- package/dist/typechain/factories/out/Bookkeeper.sol/LedgerBookkeeper__factory.d.ts +950 -0
- package/dist/typechain/factories/out/Bookkeeper.sol/LedgerBookkeeper__factory.js +1250 -0
- package/dist/typechain/factories/out/Bookkeeper.sol/index.d.ts +1 -0
- package/dist/typechain/factories/out/Bookkeeper.sol/index.js +1 -0
- package/dist/typechain/factories/out/Checkpoint.sol/CheckpointController__factory.d.ts +33 -0
- package/dist/typechain/factories/out/Checkpoint.sol/CheckpointController__factory.js +47 -0
- package/dist/typechain/factories/out/Checkpoint.sol/index.d.ts +1 -0
- package/dist/typechain/factories/out/Checkpoint.sol/index.js +1 -0
- package/dist/typechain/factories/out/Closure.sol/ClosureController__factory.d.ts +459 -0
- package/dist/typechain/factories/out/Closure.sol/ClosureController__factory.js +603 -0
- package/dist/typechain/factories/out/Closure.sol/index.d.ts +1 -0
- package/dist/typechain/factories/out/Closure.sol/index.js +1 -0
- package/dist/typechain/factories/out/ContextBuilder__factory.d.ts +671 -0
- package/dist/typechain/factories/out/ContextBuilder__factory.js +870 -0
- package/dist/typechain/factories/out/Control.sol/Controllable__factory.d.ts +107 -0
- package/dist/typechain/factories/out/Control.sol/Controllable__factory.js +141 -0
- package/dist/typechain/factories/out/Control.sol/Controller__factory.d.ts +21 -0
- package/dist/typechain/factories/out/Control.sol/Controller__factory.js +30 -0
- package/dist/typechain/factories/out/Control.sol/index.d.ts +2 -0
- package/dist/typechain/factories/out/Control.sol/index.js +2 -0
- package/dist/typechain/factories/out/Controller.sol/ClosureDelegate__factory.d.ts +57 -0
- package/dist/typechain/factories/out/Controller.sol/ClosureDelegate__factory.js +77 -0
- package/dist/typechain/factories/out/Controller.sol/CreationDelegate__factory.d.ts +58 -0
- package/dist/typechain/factories/out/Controller.sol/CreationDelegate__factory.js +77 -0
- package/dist/typechain/factories/out/Controller.sol/DepositDelegate__factory.d.ts +55 -0
- package/dist/typechain/factories/out/Controller.sol/DepositDelegate__factory.js +74 -0
- package/dist/typechain/factories/out/Controller.sol/FundController__factory.d.ts +703 -0
- package/dist/typechain/factories/out/Controller.sol/FundController__factory.js +911 -0
- package/dist/typechain/factories/out/Controller.sol/HarvestDelegate__factory.d.ts +234 -0
- package/dist/typechain/factories/out/Controller.sol/HarvestDelegate__factory.js +303 -0
- package/dist/typechain/factories/out/Controller.sol/TradeDelegate__factory.d.ts +61 -0
- package/dist/typechain/factories/out/Controller.sol/TradeDelegate__factory.js +81 -0
- package/dist/typechain/factories/out/Controller.sol/TransferDelegate__factory.d.ts +29 -0
- package/dist/typechain/factories/out/Controller.sol/TransferDelegate__factory.js +40 -0
- package/dist/typechain/factories/out/Controller.sol/WithdrawalDelegate__factory.d.ts +51 -0
- package/dist/typechain/factories/out/Controller.sol/WithdrawalDelegate__factory.js +69 -0
- package/dist/typechain/factories/out/Controller.sol/index.d.ts +8 -0
- package/dist/typechain/factories/out/Controller.sol/index.js +8 -0
- package/dist/typechain/factories/out/Cooldown.sol/LedgerCooldown__factory.d.ts +747 -0
- package/dist/typechain/factories/out/Cooldown.sol/LedgerCooldown__factory.js +982 -0
- package/dist/typechain/factories/out/Cooldown.sol/index.d.ts +1 -0
- package/dist/typechain/factories/out/Cooldown.sol/index.js +1 -0
- package/dist/typechain/factories/out/Creation.sol/CreationController__factory.d.ts +172 -0
- package/dist/typechain/factories/out/Creation.sol/CreationController__factory.js +225 -0
- package/dist/typechain/factories/out/Creation.sol/index.d.ts +1 -0
- package/dist/typechain/factories/out/Creation.sol/index.js +1 -0
- package/dist/typechain/factories/out/Deposit.sol/DepositController__factory.d.ts +162 -0
- package/dist/typechain/factories/out/Deposit.sol/DepositController__factory.js +223 -0
- package/dist/typechain/factories/out/Deposit.sol/index.d.ts +1 -0
- package/dist/typechain/factories/out/Deposit.sol/index.js +1 -0
- package/dist/typechain/factories/out/Error__factory.d.ts +318 -0
- package/dist/typechain/factories/out/Error__factory.js +423 -0
- package/dist/typechain/factories/out/Harvest.sol/HarvestController__factory.d.ts +401 -0
- package/dist/typechain/factories/out/Harvest.sol/HarvestController__factory.js +527 -0
- package/dist/typechain/factories/out/Harvest.sol/index.d.ts +1 -0
- package/dist/typechain/factories/out/Harvest.sol/index.js +1 -0
- package/dist/typechain/factories/out/IAerodromeRouter__factory.d.ts +85 -0
- package/dist/typechain/factories/out/IAerodromeRouter__factory.js +113 -0
- package/dist/typechain/factories/out/IAerodromeSwapRouter__factory.d.ts +89 -0
- package/dist/typechain/factories/out/IAerodromeSwapRouter__factory.js +119 -0
- package/dist/typechain/factories/out/IUniswapV4.sol/IPermit2__factory.d.ts +29 -0
- package/dist/typechain/factories/out/IUniswapV4.sol/IPermit2__factory.js +40 -0
- package/dist/typechain/factories/out/IUniswapV4.sol/IUniversalRouter__factory.d.ts +25 -0
- package/dist/typechain/factories/out/IUniswapV4.sol/IUniversalRouter__factory.js +35 -0
- package/dist/typechain/factories/out/IUniswapV4.sol/index.d.ts +2 -0
- package/dist/typechain/factories/out/IUniswapV4.sol/index.js +2 -0
- package/dist/typechain/factories/out/IV0Fund__factory.d.ts +129 -0
- package/dist/typechain/factories/out/IV0Fund__factory.js +173 -0
- package/dist/typechain/factories/out/IV3SwapRouter__factory.d.ts +38 -0
- package/dist/typechain/factories/out/IV3SwapRouter__factory.js +53 -0
- package/dist/typechain/factories/out/Initializer.sol/LedgerInitializer__factory.d.ts +655 -0
- package/dist/typechain/factories/out/Initializer.sol/LedgerInitializer__factory.js +859 -0
- package/dist/typechain/factories/out/Initializer.sol/VaultInitializer__factory.d.ts +141 -0
- package/dist/typechain/factories/out/Initializer.sol/VaultInitializer__factory.js +185 -0
- package/dist/typechain/factories/out/Initializer.sol/index.d.ts +2 -0
- package/dist/typechain/factories/out/Initializer.sol/index.js +2 -0
- package/dist/typechain/factories/out/Ledger.sol/FundLedger__factory.d.ts +1502 -0
- package/dist/typechain/factories/out/Ledger.sol/FundLedger__factory.js +1959 -0
- package/dist/typechain/factories/out/Ledger.sol/index.d.ts +1 -0
- package/dist/typechain/factories/out/Ledger.sol/index.js +1 -0
- package/dist/typechain/factories/out/LotusP2P__factory.d.ts +847 -0
- package/dist/typechain/factories/out/LotusP2P__factory.js +1095 -0
- package/dist/typechain/factories/out/MulticallStatic__factory.d.ts +29 -0
- package/dist/typechain/factories/out/MulticallStatic__factory.js +42 -0
- package/dist/typechain/factories/out/Operator.sol/VaultOperator__factory.d.ts +235 -0
- package/dist/typechain/factories/out/Operator.sol/VaultOperator__factory.js +308 -0
- package/dist/typechain/factories/out/Operator.sol/index.d.ts +1 -0
- package/dist/typechain/factories/out/Operator.sol/index.js +1 -0
- package/dist/typechain/factories/out/P2PAdapter__factory.d.ts +216 -0
- package/dist/typechain/factories/out/P2PAdapter__factory.js +287 -0
- package/dist/typechain/factories/out/ProtocolMigrationExtension__factory.d.ts +1084 -0
- package/dist/typechain/factories/out/ProtocolMigrationExtension__factory.js +1409 -0
- package/dist/typechain/factories/out/ProtocolProvider__factory.d.ts +21 -0
- package/dist/typechain/factories/out/ProtocolProvider__factory.js +30 -0
- package/dist/typechain/factories/out/Protocol__factory.d.ts +1095 -0
- package/dist/typechain/factories/out/Protocol__factory.js +1424 -0
- package/dist/typechain/factories/out/Registrar.sol/LedgerRegistrar__factory.d.ts +1375 -0
- package/dist/typechain/factories/out/Registrar.sol/LedgerRegistrar__factory.js +1791 -0
- package/dist/typechain/factories/out/Registrar.sol/index.d.ts +1 -0
- package/dist/typechain/factories/out/Registrar.sol/index.js +1 -0
- package/dist/typechain/factories/out/Settings.sol/SettingsController__factory.d.ts +143 -0
- package/dist/typechain/factories/out/Settings.sol/SettingsController__factory.js +188 -0
- package/dist/typechain/factories/out/Settings.sol/index.d.ts +1 -0
- package/dist/typechain/factories/out/Settings.sol/index.js +1 -0
- package/dist/typechain/factories/out/Shares.sol/ICheckpointController__factory.d.ts +21 -0
- package/dist/typechain/factories/out/Shares.sol/ICheckpointController__factory.js +31 -0
- package/dist/typechain/factories/out/Shares.sol/ITransferController__factory.d.ts +25 -0
- package/dist/typechain/factories/out/Shares.sol/ITransferController__factory.js +35 -0
- package/dist/typechain/factories/out/Shares.sol/LedgerShares__factory.d.ts +829 -0
- package/dist/typechain/factories/out/Shares.sol/LedgerShares__factory.js +1089 -0
- package/dist/typechain/factories/out/Shares.sol/index.d.ts +3 -0
- package/dist/typechain/factories/out/Shares.sol/index.js +3 -0
- package/dist/typechain/factories/out/SignatureVerifier__factory.d.ts +171 -0
- package/dist/typechain/factories/out/SignatureVerifier__factory.js +224 -0
- package/dist/typechain/factories/out/Storage.sol/LedgerStorage__factory.d.ts +527 -0
- package/dist/typechain/factories/out/Storage.sol/LedgerStorage__factory.js +695 -0
- package/dist/typechain/factories/out/Storage.sol/index.d.ts +1 -0
- package/dist/typechain/factories/out/Storage.sol/index.js +1 -0
- package/dist/typechain/factories/out/Trade.sol/TradeController__factory.d.ts +200 -0
- package/dist/typechain/factories/out/Trade.sol/TradeController__factory.js +262 -0
- package/dist/typechain/factories/out/Trade.sol/index.d.ts +1 -0
- package/dist/typechain/factories/out/Trade.sol/index.js +1 -0
- package/dist/typechain/factories/out/Transfer.sol/TransferController__factory.d.ts +100 -0
- package/dist/typechain/factories/out/Transfer.sol/TransferController__factory.js +141 -0
- package/dist/typechain/factories/out/Transfer.sol/index.d.ts +1 -0
- package/dist/typechain/factories/out/Transfer.sol/index.js +1 -0
- package/dist/typechain/factories/out/UniswapV2Adapter__factory.d.ts +162 -0
- package/dist/typechain/factories/out/UniswapV2Adapter__factory.js +215 -0
- package/dist/typechain/factories/out/UniswapV3Adapter__factory.d.ts +162 -0
- package/dist/typechain/factories/out/UniswapV3Adapter__factory.js +215 -0
- package/dist/typechain/factories/out/UniswapV3SwapRouter02Adapter__factory.d.ts +162 -0
- package/dist/typechain/factories/out/UniswapV3SwapRouter02Adapter__factory.js +215 -0
- package/dist/typechain/factories/out/UniswapV4Adapter__factory.d.ts +203 -0
- package/dist/typechain/factories/out/UniswapV4Adapter__factory.js +268 -0
- package/dist/typechain/factories/out/V0ToLotusMigrator__factory.d.ts +216 -0
- package/dist/typechain/factories/out/V0ToLotusMigrator__factory.js +284 -0
- package/dist/typechain/factories/out/Vault.sol/FundVault__factory.d.ts +258 -0
- package/dist/typechain/factories/out/Vault.sol/FundVault__factory.js +339 -0
- package/dist/typechain/factories/out/Vault.sol/index.d.ts +1 -0
- package/dist/typechain/factories/out/Vault.sol/index.js +1 -0
- package/dist/typechain/factories/out/Withdrawal.sol/WithdrawalController__factory.d.ts +285 -0
- package/dist/typechain/factories/out/Withdrawal.sol/WithdrawalController__factory.js +377 -0
- package/dist/typechain/factories/out/Withdrawal.sol/index.d.ts +1 -0
- package/dist/typechain/factories/out/Withdrawal.sol/index.js +1 -0
- package/dist/typechain/factories/out/index.d.ts +43 -0
- package/dist/typechain/factories/out/index.js +43 -0
- package/dist/typechain/include/IPancakeQuoterV2.d.ts +223 -0
- package/dist/typechain/include/IPancakeQuoterV2.js +1 -0
- package/dist/typechain/include/ISwapRouter02.d.ts +682 -0
- package/dist/typechain/include/ISwapRouter02.js +1 -0
- package/dist/typechain/include/index.d.ts +2 -0
- package/dist/typechain/include/index.js +1 -0
- package/dist/typechain/index.d.ts +119 -0
- package/dist/typechain/index.js +58 -0
- package/dist/typechain/out/Adapter.d.ts +29 -0
- package/dist/typechain/out/Adapter.js +1 -0
- package/dist/typechain/out/AerodromeV2Adapter.d.ts +106 -0
- package/dist/typechain/out/AerodromeV2Adapter.js +1 -0
- package/dist/typechain/out/AerodromeV3Adapter.d.ts +87 -0
- package/dist/typechain/out/AerodromeV3Adapter.js +1 -0
- package/dist/typechain/out/AssetManager.sol/LedgerAssetManager.d.ts +604 -0
- package/dist/typechain/out/AssetManager.sol/LedgerAssetManager.js +1 -0
- package/dist/typechain/out/AssetManager.sol/index.d.ts +1 -0
- package/dist/typechain/out/AssetManager.sol/index.js +1 -0
- package/dist/typechain/out/Bookkeeper.sol/LedgerBookkeeper.d.ts +548 -0
- package/dist/typechain/out/Bookkeeper.sol/LedgerBookkeeper.js +1 -0
- package/dist/typechain/out/Bookkeeper.sol/index.d.ts +1 -0
- package/dist/typechain/out/Bookkeeper.sol/index.js +1 -0
- package/dist/typechain/out/Checkpoint.sol/CheckpointController.d.ts +29 -0
- package/dist/typechain/out/Checkpoint.sol/CheckpointController.js +1 -0
- package/dist/typechain/out/Checkpoint.sol/index.d.ts +1 -0
- package/dist/typechain/out/Checkpoint.sol/index.js +1 -0
- package/dist/typechain/out/Closure.sol/ClosureController.d.ts +273 -0
- package/dist/typechain/out/Closure.sol/ClosureController.js +1 -0
- package/dist/typechain/out/Closure.sol/index.d.ts +1 -0
- package/dist/typechain/out/Closure.sol/index.js +1 -0
- package/dist/typechain/out/ContextBuilder.d.ts +403 -0
- package/dist/typechain/out/ContextBuilder.js +1 -0
- package/dist/typechain/out/Control.sol/Controllable.d.ts +97 -0
- package/dist/typechain/out/Control.sol/Controllable.js +1 -0
- package/dist/typechain/out/Control.sol/Controller.d.ts +25 -0
- package/dist/typechain/out/Control.sol/Controller.js +1 -0
- package/dist/typechain/out/Control.sol/index.d.ts +2 -0
- package/dist/typechain/out/Control.sol/index.js +1 -0
- package/dist/typechain/out/Controller.sol/ClosureDelegate.d.ts +61 -0
- package/dist/typechain/out/Controller.sol/ClosureDelegate.js +1 -0
- package/dist/typechain/out/Controller.sol/CreationDelegate.d.ts +61 -0
- package/dist/typechain/out/Controller.sol/CreationDelegate.js +1 -0
- package/dist/typechain/out/Controller.sol/DepositDelegate.d.ts +56 -0
- package/dist/typechain/out/Controller.sol/DepositDelegate.js +1 -0
- package/dist/typechain/out/Controller.sol/FundController.d.ts +464 -0
- package/dist/typechain/out/Controller.sol/FundController.js +1 -0
- package/dist/typechain/out/Controller.sol/HarvestDelegate.d.ts +163 -0
- package/dist/typechain/out/Controller.sol/HarvestDelegate.js +1 -0
- package/dist/typechain/out/Controller.sol/TradeDelegate.d.ts +67 -0
- package/dist/typechain/out/Controller.sol/TradeDelegate.js +1 -0
- package/dist/typechain/out/Controller.sol/TransferDelegate.d.ts +37 -0
- package/dist/typechain/out/Controller.sol/TransferDelegate.js +1 -0
- package/dist/typechain/out/Controller.sol/WithdrawalDelegate.d.ts +53 -0
- package/dist/typechain/out/Controller.sol/WithdrawalDelegate.js +1 -0
- package/dist/typechain/out/Controller.sol/index.d.ts +8 -0
- package/dist/typechain/out/Controller.sol/index.js +1 -0
- package/dist/typechain/out/Cooldown.sol/LedgerCooldown.d.ts +446 -0
- package/dist/typechain/out/Cooldown.sol/LedgerCooldown.js +1 -0
- package/dist/typechain/out/Cooldown.sol/index.d.ts +1 -0
- package/dist/typechain/out/Cooldown.sol/index.js +1 -0
- package/dist/typechain/out/Creation.sol/CreationController.d.ts +102 -0
- package/dist/typechain/out/Creation.sol/CreationController.js +1 -0
- package/dist/typechain/out/Creation.sol/index.d.ts +1 -0
- package/dist/typechain/out/Creation.sol/index.js +1 -0
- package/dist/typechain/out/Deposit.sol/DepositController.d.ts +68 -0
- package/dist/typechain/out/Deposit.sol/DepositController.js +1 -0
- package/dist/typechain/out/Deposit.sol/index.d.ts +1 -0
- package/dist/typechain/out/Deposit.sol/index.js +1 -0
- package/dist/typechain/out/Error.d.ts +20 -0
- package/dist/typechain/out/Error.js +1 -0
- package/dist/typechain/out/Harvest.sol/HarvestController.d.ts +241 -0
- package/dist/typechain/out/Harvest.sol/HarvestController.js +1 -0
- package/dist/typechain/out/Harvest.sol/index.d.ts +1 -0
- package/dist/typechain/out/Harvest.sol/index.js +1 -0
- package/dist/typechain/out/IAerodromeRouter.d.ts +80 -0
- package/dist/typechain/out/IAerodromeRouter.js +1 -0
- package/dist/typechain/out/IAerodromeSwapRouter.d.ts +96 -0
- package/dist/typechain/out/IAerodromeSwapRouter.js +1 -0
- package/dist/typechain/out/IUniswapV4.sol/IPermit2.d.ts +39 -0
- package/dist/typechain/out/IUniswapV4.sol/IPermit2.js +1 -0
- package/dist/typechain/out/IUniswapV4.sol/IUniversalRouter.d.ts +37 -0
- package/dist/typechain/out/IUniswapV4.sol/IUniversalRouter.js +1 -0
- package/dist/typechain/out/IUniswapV4.sol/index.d.ts +2 -0
- package/dist/typechain/out/IUniswapV4.sol/index.js +1 -0
- package/dist/typechain/out/IV0Fund.d.ts +69 -0
- package/dist/typechain/out/IV0Fund.js +1 -0
- package/dist/typechain/out/IV3SwapRouter.d.ts +52 -0
- package/dist/typechain/out/IV3SwapRouter.js +1 -0
- package/dist/typechain/out/Initializer.sol/LedgerInitializer.d.ts +379 -0
- package/dist/typechain/out/Initializer.sol/LedgerInitializer.js +1 -0
- package/dist/typechain/out/Initializer.sol/VaultInitializer.d.ts +129 -0
- package/dist/typechain/out/Initializer.sol/VaultInitializer.js +1 -0
- package/dist/typechain/out/Initializer.sol/index.d.ts +2 -0
- package/dist/typechain/out/Initializer.sol/index.js +1 -0
- package/dist/typechain/out/Ledger.sol/FundLedger.d.ts +926 -0
- package/dist/typechain/out/Ledger.sol/FundLedger.js +1 -0
- package/dist/typechain/out/Ledger.sol/index.d.ts +1 -0
- package/dist/typechain/out/Ledger.sol/index.js +1 -0
- package/dist/typechain/out/LotusP2P.d.ts +610 -0
- package/dist/typechain/out/LotusP2P.js +1 -0
- package/dist/typechain/out/MulticallStatic.d.ts +25 -0
- package/dist/typechain/out/MulticallStatic.js +1 -0
- package/dist/typechain/out/Operator.sol/VaultOperator.d.ts +197 -0
- package/dist/typechain/out/Operator.sol/VaultOperator.js +1 -0
- package/dist/typechain/out/Operator.sol/index.d.ts +1 -0
- package/dist/typechain/out/Operator.sol/index.js +1 -0
- package/dist/typechain/out/P2PAdapter.d.ts +100 -0
- package/dist/typechain/out/P2PAdapter.js +1 -0
- package/dist/typechain/out/Protocol.d.ts +815 -0
- package/dist/typechain/out/Protocol.js +1 -0
- package/dist/typechain/out/ProtocolMigrationExtension.d.ts +806 -0
- package/dist/typechain/out/ProtocolMigrationExtension.js +1 -0
- package/dist/typechain/out/ProtocolProvider.d.ts +25 -0
- package/dist/typechain/out/ProtocolProvider.js +1 -0
- package/dist/typechain/out/Registrar.sol/LedgerRegistrar.d.ts +866 -0
- package/dist/typechain/out/Registrar.sol/LedgerRegistrar.js +1 -0
- package/dist/typechain/out/Registrar.sol/index.d.ts +1 -0
- package/dist/typechain/out/Registrar.sol/index.js +1 -0
- package/dist/typechain/out/Settings.sol/SettingsController.d.ts +97 -0
- package/dist/typechain/out/Settings.sol/SettingsController.js +1 -0
- package/dist/typechain/out/Settings.sol/index.d.ts +1 -0
- package/dist/typechain/out/Settings.sol/index.js +1 -0
- package/dist/typechain/out/Shares.sol/ICheckpointController.d.ts +29 -0
- package/dist/typechain/out/Shares.sol/ICheckpointController.js +1 -0
- package/dist/typechain/out/Shares.sol/ITransferController.d.ts +37 -0
- package/dist/typechain/out/Shares.sol/ITransferController.js +1 -0
- package/dist/typechain/out/Shares.sol/LedgerShares.d.ts +494 -0
- package/dist/typechain/out/Shares.sol/LedgerShares.js +1 -0
- package/dist/typechain/out/Shares.sol/index.d.ts +3 -0
- package/dist/typechain/out/Shares.sol/index.js +1 -0
- package/dist/typechain/out/SignatureVerifier.d.ts +139 -0
- package/dist/typechain/out/SignatureVerifier.js +1 -0
- package/dist/typechain/out/Storage.sol/LedgerStorage.d.ts +281 -0
- package/dist/typechain/out/Storage.sol/LedgerStorage.js +1 -0
- package/dist/typechain/out/Storage.sol/index.d.ts +1 -0
- package/dist/typechain/out/Storage.sol/index.js +1 -0
- package/dist/typechain/out/Trade.sol/TradeController.d.ts +137 -0
- package/dist/typechain/out/Trade.sol/TradeController.js +1 -0
- package/dist/typechain/out/Trade.sol/index.d.ts +1 -0
- package/dist/typechain/out/Trade.sol/index.js +1 -0
- package/dist/typechain/out/Transfer.sol/TransferController.d.ts +49 -0
- package/dist/typechain/out/Transfer.sol/TransferController.js +1 -0
- package/dist/typechain/out/Transfer.sol/index.d.ts +1 -0
- package/dist/typechain/out/Transfer.sol/index.js +1 -0
- package/dist/typechain/out/UniswapV2Adapter.d.ts +87 -0
- package/dist/typechain/out/UniswapV2Adapter.js +1 -0
- package/dist/typechain/out/UniswapV3Adapter.d.ts +87 -0
- package/dist/typechain/out/UniswapV3Adapter.js +1 -0
- package/dist/typechain/out/UniswapV3SwapRouter02Adapter.d.ts +87 -0
- package/dist/typechain/out/UniswapV3SwapRouter02Adapter.js +1 -0
- package/dist/typechain/out/UniswapV4Adapter.d.ts +110 -0
- package/dist/typechain/out/UniswapV4Adapter.js +1 -0
- package/dist/typechain/out/V0ToLotusMigrator.d.ts +94 -0
- package/dist/typechain/out/V0ToLotusMigrator.js +1 -0
- package/dist/typechain/out/Vault.sol/FundVault.d.ts +197 -0
- package/dist/typechain/out/Vault.sol/FundVault.js +1 -0
- package/dist/typechain/out/Vault.sol/index.d.ts +1 -0
- package/dist/typechain/out/Vault.sol/index.js +1 -0
- package/dist/typechain/out/Withdrawal.sol/WithdrawalController.d.ts +152 -0
- package/dist/typechain/out/Withdrawal.sol/WithdrawalController.js +1 -0
- package/dist/typechain/out/Withdrawal.sol/index.d.ts +1 -0
- package/dist/typechain/out/Withdrawal.sol/index.js +1 -0
- package/dist/typechain/out/index.d.ts +65 -0
- package/dist/typechain/out/index.js +1 -0
- package/dist/types/Fund.d.ts +27 -0
- package/dist/types/Fund.js +1 -0
- package/package.json +67 -0
|
@@ -0,0 +1,234 @@
|
|
|
1
|
+
import { type ContractRunner } from "ethers";
|
|
2
|
+
import type { HarvestDelegate, HarvestDelegateInterface } from "../../../out/Controller.sol/HarvestDelegate";
|
|
3
|
+
export declare class HarvestDelegate__factory {
|
|
4
|
+
static readonly abi: readonly [{
|
|
5
|
+
readonly type: "function";
|
|
6
|
+
readonly name: "computeHarvestableFees";
|
|
7
|
+
readonly inputs: readonly [{
|
|
8
|
+
readonly name: "";
|
|
9
|
+
readonly type: "tuple";
|
|
10
|
+
readonly internalType: "struct HarvestContext";
|
|
11
|
+
readonly components: readonly [{
|
|
12
|
+
readonly name: "harvest";
|
|
13
|
+
readonly type: "tuple";
|
|
14
|
+
readonly internalType: "struct Harvest";
|
|
15
|
+
readonly components: readonly [{
|
|
16
|
+
readonly name: "ledger";
|
|
17
|
+
readonly type: "address";
|
|
18
|
+
readonly internalType: "contract FundLedger";
|
|
19
|
+
}, {
|
|
20
|
+
readonly name: "coin";
|
|
21
|
+
readonly type: "address";
|
|
22
|
+
readonly internalType: "contract IERC20";
|
|
23
|
+
}, {
|
|
24
|
+
readonly name: "fraction";
|
|
25
|
+
readonly type: "uint64";
|
|
26
|
+
readonly internalType: "uint64";
|
|
27
|
+
}, {
|
|
28
|
+
readonly name: "isManagementFeeEligible";
|
|
29
|
+
readonly type: "bool";
|
|
30
|
+
readonly internalType: "bool";
|
|
31
|
+
}, {
|
|
32
|
+
readonly name: "extCalls";
|
|
33
|
+
readonly type: "tuple[]";
|
|
34
|
+
readonly internalType: "struct ExternalCall[]";
|
|
35
|
+
readonly components: readonly [{
|
|
36
|
+
readonly name: "adapter";
|
|
37
|
+
readonly type: "address";
|
|
38
|
+
readonly internalType: "address";
|
|
39
|
+
}, {
|
|
40
|
+
readonly name: "callData";
|
|
41
|
+
readonly type: "bytes";
|
|
42
|
+
readonly internalType: "bytes";
|
|
43
|
+
}];
|
|
44
|
+
}];
|
|
45
|
+
}, {
|
|
46
|
+
readonly name: "vault";
|
|
47
|
+
readonly type: "address";
|
|
48
|
+
readonly internalType: "contract FundVault";
|
|
49
|
+
}, {
|
|
50
|
+
readonly name: "isFinal";
|
|
51
|
+
readonly type: "bool";
|
|
52
|
+
readonly internalType: "bool";
|
|
53
|
+
}, {
|
|
54
|
+
readonly name: "referrer";
|
|
55
|
+
readonly type: "address";
|
|
56
|
+
readonly internalType: "address";
|
|
57
|
+
}, {
|
|
58
|
+
readonly name: "coinSlot";
|
|
59
|
+
readonly type: "uint256";
|
|
60
|
+
readonly internalType: "uint256";
|
|
61
|
+
}, {
|
|
62
|
+
readonly name: "latestManagementFeeTimestamp";
|
|
63
|
+
readonly type: "uint256";
|
|
64
|
+
readonly internalType: "uint256";
|
|
65
|
+
}, {
|
|
66
|
+
readonly name: "normalizedTvl";
|
|
67
|
+
readonly type: "uint256";
|
|
68
|
+
readonly internalType: "uint256";
|
|
69
|
+
}, {
|
|
70
|
+
readonly name: "normalizer";
|
|
71
|
+
readonly type: "uint256";
|
|
72
|
+
readonly internalType: "uint256";
|
|
73
|
+
}, {
|
|
74
|
+
readonly name: "proceeds";
|
|
75
|
+
readonly type: "uint256";
|
|
76
|
+
readonly internalType: "uint256";
|
|
77
|
+
}, {
|
|
78
|
+
readonly name: "totalSupply";
|
|
79
|
+
readonly type: "uint256";
|
|
80
|
+
readonly internalType: "uint256";
|
|
81
|
+
}, {
|
|
82
|
+
readonly name: "managerBalance";
|
|
83
|
+
readonly type: "uint256";
|
|
84
|
+
readonly internalType: "uint256";
|
|
85
|
+
}, {
|
|
86
|
+
readonly name: "ledgerBalance";
|
|
87
|
+
readonly type: "uint256";
|
|
88
|
+
readonly internalType: "uint256";
|
|
89
|
+
}, {
|
|
90
|
+
readonly name: "totalVirtualPrincipal";
|
|
91
|
+
readonly type: "uint256";
|
|
92
|
+
readonly internalType: "uint256";
|
|
93
|
+
}, {
|
|
94
|
+
readonly name: "managerProfitFeeBps";
|
|
95
|
+
readonly type: "uint256";
|
|
96
|
+
readonly internalType: "uint256";
|
|
97
|
+
}, {
|
|
98
|
+
readonly name: "profitFeeBps";
|
|
99
|
+
readonly type: "uint256";
|
|
100
|
+
readonly internalType: "uint256";
|
|
101
|
+
}, {
|
|
102
|
+
readonly name: "assets";
|
|
103
|
+
readonly type: "address[]";
|
|
104
|
+
readonly internalType: "contract IERC20[]";
|
|
105
|
+
}, {
|
|
106
|
+
readonly name: "managerFeeBasis";
|
|
107
|
+
readonly type: "uint128";
|
|
108
|
+
readonly internalType: "uint128";
|
|
109
|
+
}, {
|
|
110
|
+
readonly name: "watermark";
|
|
111
|
+
readonly type: "uint128";
|
|
112
|
+
readonly internalType: "uint128";
|
|
113
|
+
}, {
|
|
114
|
+
readonly name: "epochBufferDelta";
|
|
115
|
+
readonly type: "uint128";
|
|
116
|
+
readonly internalType: "uint128";
|
|
117
|
+
}, {
|
|
118
|
+
readonly name: "upcomingEpoch";
|
|
119
|
+
readonly type: "tuple";
|
|
120
|
+
readonly internalType: "struct Epoch";
|
|
121
|
+
readonly components: readonly [{
|
|
122
|
+
readonly name: "watermark";
|
|
123
|
+
readonly type: "uint128";
|
|
124
|
+
readonly internalType: "uint128";
|
|
125
|
+
}, {
|
|
126
|
+
readonly name: "priceBefore";
|
|
127
|
+
readonly type: "uint128";
|
|
128
|
+
readonly internalType: "uint128";
|
|
129
|
+
}];
|
|
130
|
+
}, {
|
|
131
|
+
readonly name: "fees";
|
|
132
|
+
readonly type: "tuple";
|
|
133
|
+
readonly internalType: "struct HarvestFees";
|
|
134
|
+
readonly components: readonly [{
|
|
135
|
+
readonly name: "managerProfitFee";
|
|
136
|
+
readonly type: "uint256";
|
|
137
|
+
readonly internalType: "uint256";
|
|
138
|
+
}, {
|
|
139
|
+
readonly name: "referrerProfitFee";
|
|
140
|
+
readonly type: "uint256";
|
|
141
|
+
readonly internalType: "uint256";
|
|
142
|
+
}, {
|
|
143
|
+
readonly name: "managementFee";
|
|
144
|
+
readonly type: "uint256";
|
|
145
|
+
readonly internalType: "uint256";
|
|
146
|
+
}];
|
|
147
|
+
}, {
|
|
148
|
+
readonly name: "referrerManagementFeeBps";
|
|
149
|
+
readonly type: "uint256";
|
|
150
|
+
readonly internalType: "uint256";
|
|
151
|
+
}, {
|
|
152
|
+
readonly name: "managerManagementFeeBps";
|
|
153
|
+
readonly type: "uint256";
|
|
154
|
+
readonly internalType: "uint256";
|
|
155
|
+
}];
|
|
156
|
+
}, {
|
|
157
|
+
readonly name: "";
|
|
158
|
+
readonly type: "uint256";
|
|
159
|
+
readonly internalType: "uint256";
|
|
160
|
+
}];
|
|
161
|
+
readonly outputs: readonly [{
|
|
162
|
+
readonly name: "";
|
|
163
|
+
readonly type: "uint256";
|
|
164
|
+
readonly internalType: "uint256";
|
|
165
|
+
}, {
|
|
166
|
+
readonly name: "";
|
|
167
|
+
readonly type: "uint256";
|
|
168
|
+
readonly internalType: "uint256";
|
|
169
|
+
}, {
|
|
170
|
+
readonly name: "";
|
|
171
|
+
readonly type: "uint256";
|
|
172
|
+
readonly internalType: "uint256";
|
|
173
|
+
}, {
|
|
174
|
+
readonly name: "";
|
|
175
|
+
readonly type: "uint128";
|
|
176
|
+
readonly internalType: "uint128";
|
|
177
|
+
}, {
|
|
178
|
+
readonly name: "";
|
|
179
|
+
readonly type: "uint128";
|
|
180
|
+
readonly internalType: "uint128";
|
|
181
|
+
}, {
|
|
182
|
+
readonly name: "";
|
|
183
|
+
readonly type: "uint256";
|
|
184
|
+
readonly internalType: "uint256";
|
|
185
|
+
}];
|
|
186
|
+
readonly stateMutability: "nonpayable";
|
|
187
|
+
}, {
|
|
188
|
+
readonly type: "function";
|
|
189
|
+
readonly name: "harvest";
|
|
190
|
+
readonly inputs: readonly [{
|
|
191
|
+
readonly name: "";
|
|
192
|
+
readonly type: "tuple";
|
|
193
|
+
readonly internalType: "struct Harvest";
|
|
194
|
+
readonly components: readonly [{
|
|
195
|
+
readonly name: "ledger";
|
|
196
|
+
readonly type: "address";
|
|
197
|
+
readonly internalType: "contract FundLedger";
|
|
198
|
+
}, {
|
|
199
|
+
readonly name: "coin";
|
|
200
|
+
readonly type: "address";
|
|
201
|
+
readonly internalType: "contract IERC20";
|
|
202
|
+
}, {
|
|
203
|
+
readonly name: "fraction";
|
|
204
|
+
readonly type: "uint64";
|
|
205
|
+
readonly internalType: "uint64";
|
|
206
|
+
}, {
|
|
207
|
+
readonly name: "isManagementFeeEligible";
|
|
208
|
+
readonly type: "bool";
|
|
209
|
+
readonly internalType: "bool";
|
|
210
|
+
}, {
|
|
211
|
+
readonly name: "extCalls";
|
|
212
|
+
readonly type: "tuple[]";
|
|
213
|
+
readonly internalType: "struct ExternalCall[]";
|
|
214
|
+
readonly components: readonly [{
|
|
215
|
+
readonly name: "adapter";
|
|
216
|
+
readonly type: "address";
|
|
217
|
+
readonly internalType: "address";
|
|
218
|
+
}, {
|
|
219
|
+
readonly name: "callData";
|
|
220
|
+
readonly type: "bytes";
|
|
221
|
+
readonly internalType: "bytes";
|
|
222
|
+
}];
|
|
223
|
+
}];
|
|
224
|
+
}];
|
|
225
|
+
readonly outputs: readonly [];
|
|
226
|
+
readonly stateMutability: "nonpayable";
|
|
227
|
+
}, {
|
|
228
|
+
readonly type: "error";
|
|
229
|
+
readonly name: "InvalidAddress";
|
|
230
|
+
readonly inputs: readonly [];
|
|
231
|
+
}];
|
|
232
|
+
static createInterface(): HarvestDelegateInterface;
|
|
233
|
+
static connect(address: string, runner?: ContractRunner | null): HarvestDelegate;
|
|
234
|
+
}
|
|
@@ -0,0 +1,303 @@
|
|
|
1
|
+
import { Contract, Interface } from "ethers";
|
|
2
|
+
const _abi = [
|
|
3
|
+
{
|
|
4
|
+
type: "function",
|
|
5
|
+
name: "computeHarvestableFees",
|
|
6
|
+
inputs: [
|
|
7
|
+
{
|
|
8
|
+
name: "",
|
|
9
|
+
type: "tuple",
|
|
10
|
+
internalType: "struct HarvestContext",
|
|
11
|
+
components: [
|
|
12
|
+
{
|
|
13
|
+
name: "harvest",
|
|
14
|
+
type: "tuple",
|
|
15
|
+
internalType: "struct Harvest",
|
|
16
|
+
components: [
|
|
17
|
+
{
|
|
18
|
+
name: "ledger",
|
|
19
|
+
type: "address",
|
|
20
|
+
internalType: "contract FundLedger",
|
|
21
|
+
},
|
|
22
|
+
{
|
|
23
|
+
name: "coin",
|
|
24
|
+
type: "address",
|
|
25
|
+
internalType: "contract IERC20",
|
|
26
|
+
},
|
|
27
|
+
{
|
|
28
|
+
name: "fraction",
|
|
29
|
+
type: "uint64",
|
|
30
|
+
internalType: "uint64",
|
|
31
|
+
},
|
|
32
|
+
{
|
|
33
|
+
name: "isManagementFeeEligible",
|
|
34
|
+
type: "bool",
|
|
35
|
+
internalType: "bool",
|
|
36
|
+
},
|
|
37
|
+
{
|
|
38
|
+
name: "extCalls",
|
|
39
|
+
type: "tuple[]",
|
|
40
|
+
internalType: "struct ExternalCall[]",
|
|
41
|
+
components: [
|
|
42
|
+
{
|
|
43
|
+
name: "adapter",
|
|
44
|
+
type: "address",
|
|
45
|
+
internalType: "address",
|
|
46
|
+
},
|
|
47
|
+
{
|
|
48
|
+
name: "callData",
|
|
49
|
+
type: "bytes",
|
|
50
|
+
internalType: "bytes",
|
|
51
|
+
},
|
|
52
|
+
],
|
|
53
|
+
},
|
|
54
|
+
],
|
|
55
|
+
},
|
|
56
|
+
{
|
|
57
|
+
name: "vault",
|
|
58
|
+
type: "address",
|
|
59
|
+
internalType: "contract FundVault",
|
|
60
|
+
},
|
|
61
|
+
{
|
|
62
|
+
name: "isFinal",
|
|
63
|
+
type: "bool",
|
|
64
|
+
internalType: "bool",
|
|
65
|
+
},
|
|
66
|
+
{
|
|
67
|
+
name: "referrer",
|
|
68
|
+
type: "address",
|
|
69
|
+
internalType: "address",
|
|
70
|
+
},
|
|
71
|
+
{
|
|
72
|
+
name: "coinSlot",
|
|
73
|
+
type: "uint256",
|
|
74
|
+
internalType: "uint256",
|
|
75
|
+
},
|
|
76
|
+
{
|
|
77
|
+
name: "latestManagementFeeTimestamp",
|
|
78
|
+
type: "uint256",
|
|
79
|
+
internalType: "uint256",
|
|
80
|
+
},
|
|
81
|
+
{
|
|
82
|
+
name: "normalizedTvl",
|
|
83
|
+
type: "uint256",
|
|
84
|
+
internalType: "uint256",
|
|
85
|
+
},
|
|
86
|
+
{
|
|
87
|
+
name: "normalizer",
|
|
88
|
+
type: "uint256",
|
|
89
|
+
internalType: "uint256",
|
|
90
|
+
},
|
|
91
|
+
{
|
|
92
|
+
name: "proceeds",
|
|
93
|
+
type: "uint256",
|
|
94
|
+
internalType: "uint256",
|
|
95
|
+
},
|
|
96
|
+
{
|
|
97
|
+
name: "totalSupply",
|
|
98
|
+
type: "uint256",
|
|
99
|
+
internalType: "uint256",
|
|
100
|
+
},
|
|
101
|
+
{
|
|
102
|
+
name: "managerBalance",
|
|
103
|
+
type: "uint256",
|
|
104
|
+
internalType: "uint256",
|
|
105
|
+
},
|
|
106
|
+
{
|
|
107
|
+
name: "ledgerBalance",
|
|
108
|
+
type: "uint256",
|
|
109
|
+
internalType: "uint256",
|
|
110
|
+
},
|
|
111
|
+
{
|
|
112
|
+
name: "totalVirtualPrincipal",
|
|
113
|
+
type: "uint256",
|
|
114
|
+
internalType: "uint256",
|
|
115
|
+
},
|
|
116
|
+
{
|
|
117
|
+
name: "managerProfitFeeBps",
|
|
118
|
+
type: "uint256",
|
|
119
|
+
internalType: "uint256",
|
|
120
|
+
},
|
|
121
|
+
{
|
|
122
|
+
name: "profitFeeBps",
|
|
123
|
+
type: "uint256",
|
|
124
|
+
internalType: "uint256",
|
|
125
|
+
},
|
|
126
|
+
{
|
|
127
|
+
name: "assets",
|
|
128
|
+
type: "address[]",
|
|
129
|
+
internalType: "contract IERC20[]",
|
|
130
|
+
},
|
|
131
|
+
{
|
|
132
|
+
name: "managerFeeBasis",
|
|
133
|
+
type: "uint128",
|
|
134
|
+
internalType: "uint128",
|
|
135
|
+
},
|
|
136
|
+
{
|
|
137
|
+
name: "watermark",
|
|
138
|
+
type: "uint128",
|
|
139
|
+
internalType: "uint128",
|
|
140
|
+
},
|
|
141
|
+
{
|
|
142
|
+
name: "epochBufferDelta",
|
|
143
|
+
type: "uint128",
|
|
144
|
+
internalType: "uint128",
|
|
145
|
+
},
|
|
146
|
+
{
|
|
147
|
+
name: "upcomingEpoch",
|
|
148
|
+
type: "tuple",
|
|
149
|
+
internalType: "struct Epoch",
|
|
150
|
+
components: [
|
|
151
|
+
{
|
|
152
|
+
name: "watermark",
|
|
153
|
+
type: "uint128",
|
|
154
|
+
internalType: "uint128",
|
|
155
|
+
},
|
|
156
|
+
{
|
|
157
|
+
name: "priceBefore",
|
|
158
|
+
type: "uint128",
|
|
159
|
+
internalType: "uint128",
|
|
160
|
+
},
|
|
161
|
+
],
|
|
162
|
+
},
|
|
163
|
+
{
|
|
164
|
+
name: "fees",
|
|
165
|
+
type: "tuple",
|
|
166
|
+
internalType: "struct HarvestFees",
|
|
167
|
+
components: [
|
|
168
|
+
{
|
|
169
|
+
name: "managerProfitFee",
|
|
170
|
+
type: "uint256",
|
|
171
|
+
internalType: "uint256",
|
|
172
|
+
},
|
|
173
|
+
{
|
|
174
|
+
name: "referrerProfitFee",
|
|
175
|
+
type: "uint256",
|
|
176
|
+
internalType: "uint256",
|
|
177
|
+
},
|
|
178
|
+
{
|
|
179
|
+
name: "managementFee",
|
|
180
|
+
type: "uint256",
|
|
181
|
+
internalType: "uint256",
|
|
182
|
+
},
|
|
183
|
+
],
|
|
184
|
+
},
|
|
185
|
+
{
|
|
186
|
+
name: "referrerManagementFeeBps",
|
|
187
|
+
type: "uint256",
|
|
188
|
+
internalType: "uint256",
|
|
189
|
+
},
|
|
190
|
+
{
|
|
191
|
+
name: "managerManagementFeeBps",
|
|
192
|
+
type: "uint256",
|
|
193
|
+
internalType: "uint256",
|
|
194
|
+
},
|
|
195
|
+
],
|
|
196
|
+
},
|
|
197
|
+
{
|
|
198
|
+
name: "",
|
|
199
|
+
type: "uint256",
|
|
200
|
+
internalType: "uint256",
|
|
201
|
+
},
|
|
202
|
+
],
|
|
203
|
+
outputs: [
|
|
204
|
+
{
|
|
205
|
+
name: "",
|
|
206
|
+
type: "uint256",
|
|
207
|
+
internalType: "uint256",
|
|
208
|
+
},
|
|
209
|
+
{
|
|
210
|
+
name: "",
|
|
211
|
+
type: "uint256",
|
|
212
|
+
internalType: "uint256",
|
|
213
|
+
},
|
|
214
|
+
{
|
|
215
|
+
name: "",
|
|
216
|
+
type: "uint256",
|
|
217
|
+
internalType: "uint256",
|
|
218
|
+
},
|
|
219
|
+
{
|
|
220
|
+
name: "",
|
|
221
|
+
type: "uint128",
|
|
222
|
+
internalType: "uint128",
|
|
223
|
+
},
|
|
224
|
+
{
|
|
225
|
+
name: "",
|
|
226
|
+
type: "uint128",
|
|
227
|
+
internalType: "uint128",
|
|
228
|
+
},
|
|
229
|
+
{
|
|
230
|
+
name: "",
|
|
231
|
+
type: "uint256",
|
|
232
|
+
internalType: "uint256",
|
|
233
|
+
},
|
|
234
|
+
],
|
|
235
|
+
stateMutability: "nonpayable",
|
|
236
|
+
},
|
|
237
|
+
{
|
|
238
|
+
type: "function",
|
|
239
|
+
name: "harvest",
|
|
240
|
+
inputs: [
|
|
241
|
+
{
|
|
242
|
+
name: "",
|
|
243
|
+
type: "tuple",
|
|
244
|
+
internalType: "struct Harvest",
|
|
245
|
+
components: [
|
|
246
|
+
{
|
|
247
|
+
name: "ledger",
|
|
248
|
+
type: "address",
|
|
249
|
+
internalType: "contract FundLedger",
|
|
250
|
+
},
|
|
251
|
+
{
|
|
252
|
+
name: "coin",
|
|
253
|
+
type: "address",
|
|
254
|
+
internalType: "contract IERC20",
|
|
255
|
+
},
|
|
256
|
+
{
|
|
257
|
+
name: "fraction",
|
|
258
|
+
type: "uint64",
|
|
259
|
+
internalType: "uint64",
|
|
260
|
+
},
|
|
261
|
+
{
|
|
262
|
+
name: "isManagementFeeEligible",
|
|
263
|
+
type: "bool",
|
|
264
|
+
internalType: "bool",
|
|
265
|
+
},
|
|
266
|
+
{
|
|
267
|
+
name: "extCalls",
|
|
268
|
+
type: "tuple[]",
|
|
269
|
+
internalType: "struct ExternalCall[]",
|
|
270
|
+
components: [
|
|
271
|
+
{
|
|
272
|
+
name: "adapter",
|
|
273
|
+
type: "address",
|
|
274
|
+
internalType: "address",
|
|
275
|
+
},
|
|
276
|
+
{
|
|
277
|
+
name: "callData",
|
|
278
|
+
type: "bytes",
|
|
279
|
+
internalType: "bytes",
|
|
280
|
+
},
|
|
281
|
+
],
|
|
282
|
+
},
|
|
283
|
+
],
|
|
284
|
+
},
|
|
285
|
+
],
|
|
286
|
+
outputs: [],
|
|
287
|
+
stateMutability: "nonpayable",
|
|
288
|
+
},
|
|
289
|
+
{
|
|
290
|
+
type: "error",
|
|
291
|
+
name: "InvalidAddress",
|
|
292
|
+
inputs: [],
|
|
293
|
+
},
|
|
294
|
+
];
|
|
295
|
+
export class HarvestDelegate__factory {
|
|
296
|
+
static abi = _abi;
|
|
297
|
+
static createInterface() {
|
|
298
|
+
return new Interface(_abi);
|
|
299
|
+
}
|
|
300
|
+
static connect(address, runner) {
|
|
301
|
+
return new Contract(address, _abi, runner);
|
|
302
|
+
}
|
|
303
|
+
}
|
|
@@ -0,0 +1,61 @@
|
|
|
1
|
+
import { type ContractRunner } from "ethers";
|
|
2
|
+
import type { TradeDelegate, TradeDelegateInterface } from "../../../out/Controller.sol/TradeDelegate";
|
|
3
|
+
export declare class TradeDelegate__factory {
|
|
4
|
+
static readonly abi: readonly [{
|
|
5
|
+
readonly type: "function";
|
|
6
|
+
readonly name: "executeTrade";
|
|
7
|
+
readonly inputs: readonly [{
|
|
8
|
+
readonly name: "";
|
|
9
|
+
readonly type: "address";
|
|
10
|
+
readonly internalType: "contract FundLedger";
|
|
11
|
+
}, {
|
|
12
|
+
readonly name: "";
|
|
13
|
+
readonly type: "address";
|
|
14
|
+
readonly internalType: "address";
|
|
15
|
+
}, {
|
|
16
|
+
readonly name: "";
|
|
17
|
+
readonly type: "bytes";
|
|
18
|
+
readonly internalType: "bytes";
|
|
19
|
+
}];
|
|
20
|
+
readonly outputs: readonly [];
|
|
21
|
+
readonly stateMutability: "nonpayable";
|
|
22
|
+
}, {
|
|
23
|
+
readonly type: "function";
|
|
24
|
+
readonly name: "executeTrades";
|
|
25
|
+
readonly inputs: readonly [{
|
|
26
|
+
readonly name: "";
|
|
27
|
+
readonly type: "address";
|
|
28
|
+
readonly internalType: "contract FundLedger";
|
|
29
|
+
}, {
|
|
30
|
+
readonly name: "";
|
|
31
|
+
readonly type: "address[]";
|
|
32
|
+
readonly internalType: "address[]";
|
|
33
|
+
}, {
|
|
34
|
+
readonly name: "";
|
|
35
|
+
readonly type: "bytes[]";
|
|
36
|
+
readonly internalType: "bytes[]";
|
|
37
|
+
}];
|
|
38
|
+
readonly outputs: readonly [];
|
|
39
|
+
readonly stateMutability: "nonpayable";
|
|
40
|
+
}, {
|
|
41
|
+
readonly type: "function";
|
|
42
|
+
readonly name: "pruneAsset";
|
|
43
|
+
readonly inputs: readonly [{
|
|
44
|
+
readonly name: "";
|
|
45
|
+
readonly type: "address";
|
|
46
|
+
readonly internalType: "contract FundLedger";
|
|
47
|
+
}, {
|
|
48
|
+
readonly name: "";
|
|
49
|
+
readonly type: "address";
|
|
50
|
+
readonly internalType: "contract IERC20";
|
|
51
|
+
}];
|
|
52
|
+
readonly outputs: readonly [];
|
|
53
|
+
readonly stateMutability: "nonpayable";
|
|
54
|
+
}, {
|
|
55
|
+
readonly type: "error";
|
|
56
|
+
readonly name: "InvalidAddress";
|
|
57
|
+
readonly inputs: readonly [];
|
|
58
|
+
}];
|
|
59
|
+
static createInterface(): TradeDelegateInterface;
|
|
60
|
+
static connect(address: string, runner?: ContractRunner | null): TradeDelegate;
|
|
61
|
+
}
|
|
@@ -0,0 +1,81 @@
|
|
|
1
|
+
import { Contract, Interface } from "ethers";
|
|
2
|
+
const _abi = [
|
|
3
|
+
{
|
|
4
|
+
type: "function",
|
|
5
|
+
name: "executeTrade",
|
|
6
|
+
inputs: [
|
|
7
|
+
{
|
|
8
|
+
name: "",
|
|
9
|
+
type: "address",
|
|
10
|
+
internalType: "contract FundLedger",
|
|
11
|
+
},
|
|
12
|
+
{
|
|
13
|
+
name: "",
|
|
14
|
+
type: "address",
|
|
15
|
+
internalType: "address",
|
|
16
|
+
},
|
|
17
|
+
{
|
|
18
|
+
name: "",
|
|
19
|
+
type: "bytes",
|
|
20
|
+
internalType: "bytes",
|
|
21
|
+
},
|
|
22
|
+
],
|
|
23
|
+
outputs: [],
|
|
24
|
+
stateMutability: "nonpayable",
|
|
25
|
+
},
|
|
26
|
+
{
|
|
27
|
+
type: "function",
|
|
28
|
+
name: "executeTrades",
|
|
29
|
+
inputs: [
|
|
30
|
+
{
|
|
31
|
+
name: "",
|
|
32
|
+
type: "address",
|
|
33
|
+
internalType: "contract FundLedger",
|
|
34
|
+
},
|
|
35
|
+
{
|
|
36
|
+
name: "",
|
|
37
|
+
type: "address[]",
|
|
38
|
+
internalType: "address[]",
|
|
39
|
+
},
|
|
40
|
+
{
|
|
41
|
+
name: "",
|
|
42
|
+
type: "bytes[]",
|
|
43
|
+
internalType: "bytes[]",
|
|
44
|
+
},
|
|
45
|
+
],
|
|
46
|
+
outputs: [],
|
|
47
|
+
stateMutability: "nonpayable",
|
|
48
|
+
},
|
|
49
|
+
{
|
|
50
|
+
type: "function",
|
|
51
|
+
name: "pruneAsset",
|
|
52
|
+
inputs: [
|
|
53
|
+
{
|
|
54
|
+
name: "",
|
|
55
|
+
type: "address",
|
|
56
|
+
internalType: "contract FundLedger",
|
|
57
|
+
},
|
|
58
|
+
{
|
|
59
|
+
name: "",
|
|
60
|
+
type: "address",
|
|
61
|
+
internalType: "contract IERC20",
|
|
62
|
+
},
|
|
63
|
+
],
|
|
64
|
+
outputs: [],
|
|
65
|
+
stateMutability: "nonpayable",
|
|
66
|
+
},
|
|
67
|
+
{
|
|
68
|
+
type: "error",
|
|
69
|
+
name: "InvalidAddress",
|
|
70
|
+
inputs: [],
|
|
71
|
+
},
|
|
72
|
+
];
|
|
73
|
+
export class TradeDelegate__factory {
|
|
74
|
+
static abi = _abi;
|
|
75
|
+
static createInterface() {
|
|
76
|
+
return new Interface(_abi);
|
|
77
|
+
}
|
|
78
|
+
static connect(address, runner) {
|
|
79
|
+
return new Contract(address, _abi, runner);
|
|
80
|
+
}
|
|
81
|
+
}
|