@defisaver/sdk 1.0.0 → 1.0.1
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/esm/AccessLists/AaveAccessLists.d.ts +2 -0
- package/esm/AccessLists/AaveAccessLists.js +19 -0
- package/esm/AccessLists/BalancerAccessLists.d.ts +2 -0
- package/esm/AccessLists/BalancerAccessLists.js +14 -0
- package/esm/AccessLists/CompoundAccessLists.d.ts +2 -0
- package/esm/AccessLists/CompoundAccessLists.js +23 -0
- package/esm/AccessLists/DyDxAccessLists.d.ts +2 -0
- package/esm/AccessLists/DyDxAccessLists.js +6 -0
- package/esm/AccessLists/FlashLoanAccessLists.d.ts +2 -0
- package/esm/AccessLists/FlashLoanAccessLists.js +20 -0
- package/esm/AccessLists/GuniAccessLists.d.ts +2 -0
- package/esm/AccessLists/GuniAccessLists.js +10 -0
- package/esm/AccessLists/InstaAccessLists.d.ts +2 -0
- package/esm/AccessLists/InstaAccessLists.js +5 -0
- package/esm/AccessLists/LidoAccessLists.d.ts +2 -0
- package/esm/AccessLists/LidoAccessLists.js +15 -0
- package/esm/AccessLists/LiquityAccessLists.d.ts +2 -0
- package/esm/AccessLists/LiquityAccessLists.js +65 -0
- package/esm/AccessLists/MStableAccessLists.d.ts +2 -0
- package/esm/AccessLists/MStableAccessLists.js +12 -0
- package/esm/AccessLists/MakerAccessLists.d.ts +2 -0
- package/esm/AccessLists/MakerAccessLists.js +34 -0
- package/esm/AccessLists/RariAccessLists.d.ts +2 -0
- package/esm/AccessLists/RariAccessLists.js +8 -0
- package/esm/AccessLists/ReflexerAccessLists.d.ts +2 -0
- package/esm/AccessLists/ReflexerAccessLists.js +42 -0
- package/esm/AccessLists/UniswapAccessLists.d.ts +2 -0
- package/esm/AccessLists/UniswapAccessLists.js +31 -0
- package/esm/AccessLists/UtilsAccessLists.d.ts +2 -0
- package/esm/AccessLists/UtilsAccessLists.js +23 -0
- package/esm/AccessLists/YearnAccessLists.d.ts +2 -0
- package/esm/AccessLists/YearnAccessLists.js +9 -0
- package/esm/AccessLists/index.d.ts +3 -0
- package/esm/AccessLists/index.js +17 -0
- package/esm/src/Action.d.ts +77 -0
- package/esm/src/Action.js +193 -0
- package/esm/src/ActionWithL2.d.ts +20 -0
- package/esm/src/ActionWithL2.js +49 -0
- package/esm/src/DfsWeb3.d.ts +31 -0
- package/esm/src/DfsWeb3.js +124 -0
- package/esm/src/Recipe.d.ts +49 -0
- package/esm/src/Recipe.js +135 -0
- package/esm/src/Strategy.d.ts +19 -0
- package/esm/src/Strategy.js +47 -0
- package/esm/src/abis/Action.json +247 -0
- package/esm/src/abis/DFSProxyRegistry.json +193 -0
- package/esm/src/abis/DsProxy.json +218 -0
- package/esm/src/abis/Erc20.json +222 -0
- package/esm/src/abis/ProxyRegistry.json +65 -0
- package/esm/src/abis/Recipe.json +254 -0
- package/esm/src/actions/aave/AaveBorrowAction.d.ts +18 -0
- package/esm/src/actions/aave/AaveBorrowAction.js +22 -0
- package/esm/src/actions/aave/AaveClaimStkAaveAction.d.ts +15 -0
- package/esm/src/actions/aave/AaveClaimStkAaveAction.js +23 -0
- package/esm/src/actions/aave/AaveCollateralSwitchAction.d.ts +15 -0
- package/esm/src/actions/aave/AaveCollateralSwitchAction.js +18 -0
- package/esm/src/actions/aave/AavePaybackAction.d.ts +22 -0
- package/esm/src/actions/aave/AavePaybackAction.js +38 -0
- package/esm/src/actions/aave/AaveSupplyAction.d.ts +22 -0
- package/esm/src/actions/aave/AaveSupplyAction.js +45 -0
- package/esm/src/actions/aave/AaveWithdrawAction.d.ts +16 -0
- package/esm/src/actions/aave/AaveWithdrawAction.js +20 -0
- package/esm/src/actions/aave/index.d.ts +6 -0
- package/esm/src/actions/aave/index.js +6 -0
- package/esm/src/actions/aaveV3/AaveV3ATokenPaybackAction.d.ts +25 -0
- package/esm/src/actions/aaveV3/AaveV3ATokenPaybackAction.js +64 -0
- package/esm/src/actions/aaveV3/AaveV3BorrowAction.d.ts +21 -0
- package/esm/src/actions/aaveV3/AaveV3BorrowAction.js +59 -0
- package/esm/src/actions/aaveV3/AaveV3ClaimRewardsAction.d.ts +18 -0
- package/esm/src/actions/aaveV3/AaveV3ClaimRewardsAction.js +40 -0
- package/esm/src/actions/aaveV3/AaveV3CollateralSwitchAction.d.ts +18 -0
- package/esm/src/actions/aaveV3/AaveV3CollateralSwitchAction.js +39 -0
- package/esm/src/actions/aaveV3/AaveV3PaybackAction.d.ts +27 -0
- package/esm/src/actions/aaveV3/AaveV3PaybackAction.js +77 -0
- package/esm/src/actions/aaveV3/AaveV3SetEModeAction.d.ts +16 -0
- package/esm/src/actions/aaveV3/AaveV3SetEModeAction.js +33 -0
- package/esm/src/actions/aaveV3/AaveV3SupplyAction.d.ts +27 -0
- package/esm/src/actions/aaveV3/AaveV3SupplyAction.js +77 -0
- package/esm/src/actions/aaveV3/AaveV3SwapBorrowRateModeAction.d.ts +18 -0
- package/esm/src/actions/aaveV3/AaveV3SwapBorrowRateModeAction.js +38 -0
- package/esm/src/actions/aaveV3/AaveV3WithdrawAction.d.ts +18 -0
- package/esm/src/actions/aaveV3/AaveV3WithdrawAction.js +45 -0
- package/esm/src/actions/aaveV3/index.d.ts +9 -0
- package/esm/src/actions/aaveV3/index.js +9 -0
- package/esm/src/actions/balancer/BalancerV2ClaimAction.d.ts +20 -0
- package/esm/src/actions/balancer/BalancerV2ClaimAction.js +49 -0
- package/esm/src/actions/balancer/BalancerV2SupplyAction.d.ts +22 -0
- package/esm/src/actions/balancer/BalancerV2SupplyAction.js +52 -0
- package/esm/src/actions/balancer/BalancerV2WithdrawAction.d.ts +24 -0
- package/esm/src/actions/balancer/BalancerV2WithdrawAction.js +56 -0
- package/esm/src/actions/balancer/index.d.ts +3 -0
- package/esm/src/actions/balancer/index.js +3 -0
- package/esm/src/actions/basic/AutomationV2Unsub.d.ts +9 -0
- package/esm/src/actions/basic/AutomationV2Unsub.js +11 -0
- package/esm/src/actions/basic/ChangeProxyOwnerAction.d.ts +13 -0
- package/esm/src/actions/basic/ChangeProxyOwnerAction.js +15 -0
- package/esm/src/actions/basic/GasFeeAction.d.ts +14 -0
- package/esm/src/actions/basic/GasFeeAction.js +21 -0
- package/esm/src/actions/basic/GasFeeActionL2.d.ts +15 -0
- package/esm/src/actions/basic/GasFeeActionL2.js +22 -0
- package/esm/src/actions/basic/PullTokenAction.d.ts +19 -0
- package/esm/src/actions/basic/PullTokenAction.js +41 -0
- package/esm/src/actions/basic/SellAction.d.ts +23 -0
- package/esm/src/actions/basic/SellAction.js +61 -0
- package/esm/src/actions/basic/SendTokenAction.d.ts +15 -0
- package/esm/src/actions/basic/SendTokenAction.js +23 -0
- package/esm/src/actions/basic/SendTokenAndUnwrapAction.d.ts +15 -0
- package/esm/src/actions/basic/SendTokenAndUnwrapAction.js +23 -0
- package/esm/src/actions/basic/SubInputsAction.d.ts +10 -0
- package/esm/src/actions/basic/SubInputsAction.js +15 -0
- package/esm/src/actions/basic/SumInputsAction.d.ts +10 -0
- package/esm/src/actions/basic/SumInputsAction.js +15 -0
- package/esm/src/actions/basic/ToggleSubAction.d.ts +14 -0
- package/esm/src/actions/basic/ToggleSubAction.js +16 -0
- package/esm/src/actions/basic/TokenBalanceAction.d.ts +8 -0
- package/esm/src/actions/basic/TokenBalanceAction.js +13 -0
- package/esm/src/actions/basic/TransferNFTAction.d.ts +8 -0
- package/esm/src/actions/basic/TransferNFTAction.js +17 -0
- package/esm/src/actions/basic/UnwrapEthAction.d.ts +15 -0
- package/esm/src/actions/basic/UnwrapEthAction.js +30 -0
- package/esm/src/actions/basic/UpdateSubAction.d.ts +14 -0
- package/esm/src/actions/basic/UpdateSubAction.js +16 -0
- package/esm/src/actions/basic/WrapEthAction.d.ts +15 -0
- package/esm/src/actions/basic/WrapEthAction.js +36 -0
- package/esm/src/actions/basic/index.d.ts +16 -0
- package/esm/src/actions/basic/index.js +16 -0
- package/esm/src/actions/checkers/AaveV3RatioCheckAction.d.ts +14 -0
- package/esm/src/actions/checkers/AaveV3RatioCheckAction.js +20 -0
- package/esm/src/actions/checkers/CompoundV3RatioCheckAction.d.ts +16 -0
- package/esm/src/actions/checkers/CompoundV3RatioCheckAction.js +24 -0
- package/esm/src/actions/checkers/MakerRatioCheckAction.d.ts +17 -0
- package/esm/src/actions/checkers/MakerRatioCheckAction.js +25 -0
- package/esm/src/actions/checkers/index.d.ts +3 -0
- package/esm/src/actions/checkers/index.js +3 -0
- package/esm/src/actions/chickenBonds/CBChickenInAction.d.ts +14 -0
- package/esm/src/actions/chickenBonds/CBChickenInAction.js +18 -0
- package/esm/src/actions/chickenBonds/CBChickenOutAction.d.ts +15 -0
- package/esm/src/actions/chickenBonds/CBChickenOutAction.js +19 -0
- package/esm/src/actions/chickenBonds/CBCreateAction.d.ts +18 -0
- package/esm/src/actions/chickenBonds/CBCreateAction.js +32 -0
- package/esm/src/actions/chickenBonds/CBRedeemAction.d.ts +20 -0
- package/esm/src/actions/chickenBonds/CBRedeemAction.js +35 -0
- package/esm/src/actions/chickenBonds/index.d.ts +4 -0
- package/esm/src/actions/chickenBonds/index.js +4 -0
- package/esm/src/actions/compound/CompoundBorrowAction.d.ts +15 -0
- package/esm/src/actions/compound/CompoundBorrowAction.js +19 -0
- package/esm/src/actions/compound/CompoundClaimAction.d.ts +16 -0
- package/esm/src/actions/compound/CompoundClaimAction.js +24 -0
- package/esm/src/actions/compound/CompoundCollateralSwitchAction.d.ts +10 -0
- package/esm/src/actions/compound/CompoundCollateralSwitchAction.js +12 -0
- package/esm/src/actions/compound/CompoundGetDebtAction.d.ts +8 -0
- package/esm/src/actions/compound/CompoundGetDebtAction.js +13 -0
- package/esm/src/actions/compound/CompoundPaybackAction.d.ts +20 -0
- package/esm/src/actions/compound/CompoundPaybackAction.js +38 -0
- package/esm/src/actions/compound/CompoundSupplyAction.d.ts +20 -0
- package/esm/src/actions/compound/CompoundSupplyAction.js +43 -0
- package/esm/src/actions/compound/CompoundWithdrawAction.d.ts +15 -0
- package/esm/src/actions/compound/CompoundWithdrawAction.js +19 -0
- package/esm/src/actions/compound/index.d.ts +7 -0
- package/esm/src/actions/compound/index.js +7 -0
- package/esm/src/actions/compoundV3/CompoundV3AllowAction.d.ts +15 -0
- package/esm/src/actions/compoundV3/CompoundV3AllowAction.js +24 -0
- package/esm/src/actions/compoundV3/CompoundV3BorrowAction.d.ts +16 -0
- package/esm/src/actions/compoundV3/CompoundV3BorrowAction.js +26 -0
- package/esm/src/actions/compoundV3/CompoundV3ClaimAction.d.ts +16 -0
- package/esm/src/actions/compoundV3/CompoundV3ClaimAction.js +27 -0
- package/esm/src/actions/compoundV3/CompoundV3PaybackAction.d.ts +22 -0
- package/esm/src/actions/compoundV3/CompoundV3PaybackAction.js +48 -0
- package/esm/src/actions/compoundV3/CompoundV3SupplyAction.d.ts +22 -0
- package/esm/src/actions/compoundV3/CompoundV3SupplyAction.js +45 -0
- package/esm/src/actions/compoundV3/CompoundV3TransferAction.d.ts +17 -0
- package/esm/src/actions/compoundV3/CompoundV3TransferAction.js +30 -0
- package/esm/src/actions/compoundV3/CompoundV3WithdrawAction.d.ts +17 -0
- package/esm/src/actions/compoundV3/CompoundV3WithdrawAction.js +29 -0
- package/esm/src/actions/compoundV3/index.d.ts +7 -0
- package/esm/src/actions/compoundV3/index.js +7 -0
- package/esm/src/actions/convex/ConvexClaimAction.d.ts +17 -0
- package/esm/src/actions/convex/ConvexClaimAction.js +59 -0
- package/esm/src/actions/convex/ConvexDepositAction.d.ts +22 -0
- package/esm/src/actions/convex/ConvexDepositAction.js +66 -0
- package/esm/src/actions/convex/ConvexWithdrawAction.d.ts +22 -0
- package/esm/src/actions/convex/ConvexWithdrawAction.js +63 -0
- package/esm/src/actions/convex/index.d.ts +3 -0
- package/esm/src/actions/convex/index.js +3 -0
- package/esm/src/actions/curve/CurveClaimFeesAction.d.ts +13 -0
- package/esm/src/actions/curve/CurveClaimFeesAction.js +22 -0
- package/esm/src/actions/curve/CurveDepositAction.d.ts +18 -0
- package/esm/src/actions/curve/CurveDepositAction.js +78 -0
- package/esm/src/actions/curve/CurveGaugeDepositAction.d.ts +20 -0
- package/esm/src/actions/curve/CurveGaugeDepositAction.js +40 -0
- package/esm/src/actions/curve/CurveGaugeWithdrawAction.d.ts +14 -0
- package/esm/src/actions/curve/CurveGaugeWithdrawAction.js +22 -0
- package/esm/src/actions/curve/CurveMintCrvAction.d.ts +12 -0
- package/esm/src/actions/curve/CurveMintCrvAction.js +19 -0
- package/esm/src/actions/curve/CurveStethPoolDepositAction.d.ts +16 -0
- package/esm/src/actions/curve/CurveStethPoolDepositAction.js +27 -0
- package/esm/src/actions/curve/CurveStethPoolWithdrawAction.d.ts +17 -0
- package/esm/src/actions/curve/CurveStethPoolWithdrawAction.js +28 -0
- package/esm/src/actions/curve/CurveSwapAction.d.ts +22 -0
- package/esm/src/actions/curve/CurveSwapAction.js +43 -0
- package/esm/src/actions/curve/CurveWithdrawAction.d.ts +22 -0
- package/esm/src/actions/curve/CurveWithdrawAction.js +72 -0
- package/esm/src/actions/curve/index.d.ts +9 -0
- package/esm/src/actions/curve/index.js +9 -0
- package/esm/src/actions/dydx/DyDxWithdrawAction.d.ts +15 -0
- package/esm/src/actions/dydx/DyDxWithdrawAction.js +19 -0
- package/esm/src/actions/dydx/index.d.ts +1 -0
- package/esm/src/actions/dydx/index.js +1 -0
- package/esm/src/actions/flashloan/AaveV2FlashLoanAction.d.ts +18 -0
- package/esm/src/actions/flashloan/AaveV2FlashLoanAction.js +20 -0
- package/esm/src/actions/flashloan/AaveV2FlashLoanPaybackAction.d.ts +14 -0
- package/esm/src/actions/flashloan/AaveV2FlashLoanPaybackAction.js +16 -0
- package/esm/src/actions/flashloan/AaveV3FlashLoanAction.d.ts +18 -0
- package/esm/src/actions/flashloan/AaveV3FlashLoanAction.js +20 -0
- package/esm/src/actions/flashloan/AaveV3FlashLoanPaybackAction.d.ts +14 -0
- package/esm/src/actions/flashloan/AaveV3FlashLoanPaybackAction.js +16 -0
- package/esm/src/actions/flashloan/BalancerFlashLoanAction.d.ts +16 -0
- package/esm/src/actions/flashloan/BalancerFlashLoanAction.js +18 -0
- package/esm/src/actions/flashloan/BalancerFlashLoanPaybackAction.d.ts +14 -0
- package/esm/src/actions/flashloan/BalancerFlashLoanPaybackAction.js +16 -0
- package/esm/src/actions/flashloan/DyDxFlashLoanAction.d.ts +16 -0
- package/esm/src/actions/flashloan/DyDxFlashLoanAction.js +18 -0
- package/esm/src/actions/flashloan/DyDxFlashLoanPaybackAction.d.ts +14 -0
- package/esm/src/actions/flashloan/DyDxFlashLoanPaybackAction.js +16 -0
- package/esm/src/actions/flashloan/EulerFlashLoanAction.d.ts +16 -0
- package/esm/src/actions/flashloan/EulerFlashLoanAction.js +18 -0
- package/esm/src/actions/flashloan/EulerFlashLoanPaybackAction.d.ts +13 -0
- package/esm/src/actions/flashloan/EulerFlashLoanPaybackAction.js +15 -0
- package/esm/src/actions/flashloan/MakerFlashLoanAction.d.ts +15 -0
- package/esm/src/actions/flashloan/MakerFlashLoanAction.js +17 -0
- package/esm/src/actions/flashloan/MakerFlashLoanPaybackAction.d.ts +13 -0
- package/esm/src/actions/flashloan/MakerFlashLoanPaybackAction.js +15 -0
- package/esm/src/actions/flashloan/index.d.ts +12 -0
- package/esm/src/actions/flashloan/index.js +12 -0
- package/esm/src/actions/guni/GUniDeposit.d.ts +24 -0
- package/esm/src/actions/guni/GUniDeposit.js +47 -0
- package/esm/src/actions/guni/GUniWithdraw.d.ts +22 -0
- package/esm/src/actions/guni/GUniWithdraw.js +39 -0
- package/esm/src/actions/guni/index.d.ts +2 -0
- package/esm/src/actions/guni/index.js +2 -0
- package/esm/src/actions/index.d.ts +24 -0
- package/esm/src/actions/index.js +24 -0
- package/esm/src/actions/insta/InstPullTokensAction.d.ts +18 -0
- package/esm/src/actions/insta/InstPullTokensAction.js +36 -0
- package/esm/src/actions/insta/index.d.ts +1 -0
- package/esm/src/actions/insta/index.js +1 -0
- package/esm/src/actions/lido/LidoStakeAction.d.ts +19 -0
- package/esm/src/actions/lido/LidoStakeAction.js +34 -0
- package/esm/src/actions/lido/LidoUnwrapAction.d.ts +19 -0
- package/esm/src/actions/lido/LidoUnwrapAction.js +33 -0
- package/esm/src/actions/lido/LidoWrapAction.d.ts +20 -0
- package/esm/src/actions/lido/LidoWrapAction.js +45 -0
- package/esm/src/actions/lido/index.d.ts +3 -0
- package/esm/src/actions/lido/index.js +3 -0
- package/esm/src/actions/liquity/LiquityBorrowAction.d.ts +15 -0
- package/esm/src/actions/liquity/LiquityBorrowAction.js +24 -0
- package/esm/src/actions/liquity/LiquityClaimAction.d.ts +13 -0
- package/esm/src/actions/liquity/LiquityClaimAction.js +20 -0
- package/esm/src/actions/liquity/LiquityClaimSPRewardsAction.d.ts +14 -0
- package/esm/src/actions/liquity/LiquityClaimSPRewardsAction.js +18 -0
- package/esm/src/actions/liquity/LiquityClaimStakingRewardsAction.d.ts +14 -0
- package/esm/src/actions/liquity/LiquityClaimStakingRewardsAction.js +18 -0
- package/esm/src/actions/liquity/LiquityCloseAction.d.ts +18 -0
- package/esm/src/actions/liquity/LiquityCloseAction.js +38 -0
- package/esm/src/actions/liquity/LiquityEthGainToTroveAction.d.ts +13 -0
- package/esm/src/actions/liquity/LiquityEthGainToTroveAction.js +20 -0
- package/esm/src/actions/liquity/LiquityOpenAction.d.ts +21 -0
- package/esm/src/actions/liquity/LiquityOpenAction.js +44 -0
- package/esm/src/actions/liquity/LiquityPaybackAction.d.ts +18 -0
- package/esm/src/actions/liquity/LiquityPaybackAction.js +37 -0
- package/esm/src/actions/liquity/LiquityRedeemAction.d.ts +20 -0
- package/esm/src/actions/liquity/LiquityRedeemAction.js +42 -0
- package/esm/src/actions/liquity/LiquitySPDepositAction.d.ts +20 -0
- package/esm/src/actions/liquity/LiquitySPDepositAction.js +43 -0
- package/esm/src/actions/liquity/LiquitySPWithdrawAction.d.ts +16 -0
- package/esm/src/actions/liquity/LiquitySPWithdrawAction.js +28 -0
- package/esm/src/actions/liquity/LiquityStakeAction.d.ts +20 -0
- package/esm/src/actions/liquity/LiquityStakeAction.js +43 -0
- package/esm/src/actions/liquity/LiquitySupplyAction.d.ts +18 -0
- package/esm/src/actions/liquity/LiquitySupplyAction.js +37 -0
- package/esm/src/actions/liquity/LiquityUnstakeAction.d.ts +16 -0
- package/esm/src/actions/liquity/LiquityUnstakeAction.js +28 -0
- package/esm/src/actions/liquity/LiquityWithdrawAction.d.ts +14 -0
- package/esm/src/actions/liquity/LiquityWithdrawAction.js +22 -0
- package/esm/src/actions/liquity/index.d.ts +15 -0
- package/esm/src/actions/liquity/index.js +15 -0
- package/esm/src/actions/maker/MakerClaimAction.d.ts +15 -0
- package/esm/src/actions/maker/MakerClaimAction.js +24 -0
- package/esm/src/actions/maker/MakerGenerateAction.d.ts +16 -0
- package/esm/src/actions/maker/MakerGenerateAction.js +20 -0
- package/esm/src/actions/maker/MakerGiveAction.d.ts +16 -0
- package/esm/src/actions/maker/MakerGiveAction.js +25 -0
- package/esm/src/actions/maker/MakerMergeAction.d.ts +15 -0
- package/esm/src/actions/maker/MakerMergeAction.js +17 -0
- package/esm/src/actions/maker/MakerOpenVaultAction.d.ts +14 -0
- package/esm/src/actions/maker/MakerOpenVaultAction.js +16 -0
- package/esm/src/actions/maker/MakerPaybackAction.d.ts +20 -0
- package/esm/src/actions/maker/MakerPaybackAction.js +33 -0
- package/esm/src/actions/maker/MakerRatioAction.d.ts +13 -0
- package/esm/src/actions/maker/MakerRatioAction.js +15 -0
- package/esm/src/actions/maker/MakerSupplyAction.d.ts +21 -0
- package/esm/src/actions/maker/MakerSupplyAction.js +37 -0
- package/esm/src/actions/maker/MakerWithdrawAction.d.ts +17 -0
- package/esm/src/actions/maker/MakerWithdrawAction.js +21 -0
- package/esm/src/actions/maker/index.d.ts +9 -0
- package/esm/src/actions/maker/index.js +9 -0
- package/esm/src/actions/mstable/MStableClaimAction.d.ts +16 -0
- package/esm/src/actions/mstable/MStableClaimAction.js +25 -0
- package/esm/src/actions/mstable/MStableDepositAction.d.ts +25 -0
- package/esm/src/actions/mstable/MStableDepositAction.js +75 -0
- package/esm/src/actions/mstable/MStableWithdrawAction.d.ts +25 -0
- package/esm/src/actions/mstable/MStableWithdrawAction.js +74 -0
- package/esm/src/actions/mstable/index.d.ts +3 -0
- package/esm/src/actions/mstable/index.js +3 -0
- package/esm/src/actions/rari/RariDepositAction.d.ts +22 -0
- package/esm/src/actions/rari/RariDepositAction.js +41 -0
- package/esm/src/actions/rari/RariWithdrawAction.d.ts +23 -0
- package/esm/src/actions/rari/RariWithdrawAction.js +43 -0
- package/esm/src/actions/rari/index.d.ts +2 -0
- package/esm/src/actions/rari/index.js +2 -0
- package/esm/src/actions/reflexer/ReflexerGenerateAction.d.ts +15 -0
- package/esm/src/actions/reflexer/ReflexerGenerateAction.js +19 -0
- package/esm/src/actions/reflexer/ReflexerNativeUniV2SaviourDepositAction.d.ts +19 -0
- package/esm/src/actions/reflexer/ReflexerNativeUniV2SaviourDepositAction.js +37 -0
- package/esm/src/actions/reflexer/ReflexerNativeUniV2SaviourGetReservesAction.d.ts +14 -0
- package/esm/src/actions/reflexer/ReflexerNativeUniV2SaviourGetReservesAction.js +21 -0
- package/esm/src/actions/reflexer/ReflexerNativeUniV2SaviourWithdrawAction.d.ts +15 -0
- package/esm/src/actions/reflexer/ReflexerNativeUniV2SaviourWithdrawAction.js +23 -0
- package/esm/src/actions/reflexer/ReflexerOpenSafeAction.d.ts +13 -0
- package/esm/src/actions/reflexer/ReflexerOpenSafeAction.js +15 -0
- package/esm/src/actions/reflexer/ReflexerPaybackAction.d.ts +19 -0
- package/esm/src/actions/reflexer/ReflexerPaybackAction.js +32 -0
- package/esm/src/actions/reflexer/ReflexerSupplyAction.d.ts +21 -0
- package/esm/src/actions/reflexer/ReflexerSupplyAction.js +44 -0
- package/esm/src/actions/reflexer/ReflexerWithdrawAction.d.ts +16 -0
- package/esm/src/actions/reflexer/ReflexerWithdrawAction.js +20 -0
- package/esm/src/actions/reflexer/index.d.ts +8 -0
- package/esm/src/actions/reflexer/index.js +8 -0
- package/esm/src/actions/uniswap/UniswapSupplyAction.d.ts +26 -0
- package/esm/src/actions/uniswap/UniswapSupplyAction.js +65 -0
- package/esm/src/actions/uniswap/UniswapWithdrawAction.d.ts +25 -0
- package/esm/src/actions/uniswap/UniswapWithdrawAction.js +56 -0
- package/esm/src/actions/uniswap/index.d.ts +2 -0
- package/esm/src/actions/uniswap/index.js +2 -0
- package/esm/src/actions/uniswapV3/UniswapV3CollectAction.d.ts +24 -0
- package/esm/src/actions/uniswapV3/UniswapV3CollectAction.js +47 -0
- package/esm/src/actions/uniswapV3/UniswapV3CreatePoolAction.d.ts +30 -0
- package/esm/src/actions/uniswapV3/UniswapV3CreatePoolAction.js +69 -0
- package/esm/src/actions/uniswapV3/UniswapV3MintAction.d.ts +29 -0
- package/esm/src/actions/uniswapV3/UniswapV3MintAction.js +67 -0
- package/esm/src/actions/uniswapV3/UniswapV3SupplyAction.d.ts +26 -0
- package/esm/src/actions/uniswapV3/UniswapV3SupplyAction.js +60 -0
- package/esm/src/actions/uniswapV3/UniswapV3WithdrawAction.d.ts +28 -0
- package/esm/src/actions/uniswapV3/UniswapV3WithdrawAction.js +58 -0
- package/esm/src/actions/uniswapV3/index.d.ts +5 -0
- package/esm/src/actions/uniswapV3/index.js +5 -0
- package/esm/src/actions/yearn/YearnSupplyAction.d.ts +21 -0
- package/esm/src/actions/yearn/YearnSupplyAction.js +43 -0
- package/esm/src/actions/yearn/YearnWithdrawAction.d.ts +21 -0
- package/esm/src/actions/yearn/YearnWithdrawAction.js +43 -0
- package/esm/src/actions/yearn/index.d.ts +2 -0
- package/esm/src/actions/yearn/index.js +2 -0
- package/esm/src/addresses.d.ts +410 -0
- package/esm/src/addresses.js +257 -0
- package/esm/src/config.d.ts +20 -0
- package/esm/src/config.js +69 -0
- package/esm/src/index.d.ts +1549 -0
- package/esm/src/index.js +22 -0
- package/esm/src/triggers/AaveV3RatioTrigger.d.ts +10 -0
- package/esm/src/triggers/AaveV3RatioTrigger.js +12 -0
- package/esm/src/triggers/ChainLinkPriceTrigger.d.ts +10 -0
- package/esm/src/triggers/ChainLinkPriceTrigger.js +12 -0
- package/esm/src/triggers/CompV3RatioTrigger.d.ts +10 -0
- package/esm/src/triggers/CompV3RatioTrigger.js +12 -0
- package/esm/src/triggers/CompoundRatioTrigger.d.ts +10 -0
- package/esm/src/triggers/CompoundRatioTrigger.js +12 -0
- package/esm/src/triggers/GasPriceTrigger.d.ts +10 -0
- package/esm/src/triggers/GasPriceTrigger.js +12 -0
- package/esm/src/triggers/LiquityRatioTrigger.d.ts +10 -0
- package/esm/src/triggers/LiquityRatioTrigger.js +12 -0
- package/esm/src/triggers/MakerRatioTrigger.d.ts +10 -0
- package/esm/src/triggers/MakerRatioTrigger.js +12 -0
- package/esm/src/triggers/ReflexerRatioTrigger.d.ts +10 -0
- package/esm/src/triggers/ReflexerRatioTrigger.js +12 -0
- package/esm/src/triggers/TimestampTrigger.d.ts +10 -0
- package/esm/src/triggers/TimestampTrigger.js +12 -0
- package/esm/src/triggers/TrailingStopTrigger.d.ts +10 -0
- package/esm/src/triggers/TrailingStopTrigger.js +12 -0
- package/esm/src/triggers/UniV3CurrentTickTrigger.d.ts +10 -0
- package/esm/src/triggers/UniV3CurrentTickTrigger.js +12 -0
- package/esm/src/triggers/index.d.ts +11 -0
- package/esm/src/triggers/index.js +11 -0
- package/esm/src/types.d.ts +43 -0
- package/esm/src/types.js +1 -0
- package/esm/src/utils/convex-utils.d.ts +42 -0
- package/esm/src/utils/convex-utils.js +16 -0
- package/esm/src/utils/convexPoolInfo.json +1039 -0
- package/esm/src/utils/curve-utils.d.ts +4 -0
- package/esm/src/utils/curve-utils.js +6 -0
- package/esm/src/utils/curvePoolInfo.json +203 -0
- package/esm/src/utils/general.d.ts +17 -0
- package/esm/src/utils/general.js +39 -0
- package/esm/src/utils/index.d.ts +5 -0
- package/esm/src/utils/index.js +5 -0
- package/esm/src/utils/mstableAssetPairs.d.ts +9 -0
- package/esm/src/utils/mstableAssetPairs.js +8 -0
- package/esm/src/utils/uniswapLP.d.ts +19 -0
- package/esm/src/utils/uniswapLP.js +33 -0
- package/esm/src/utils/zeroExExchange.d.ts +39 -0
- package/esm/src/utils/zeroExExchange.js +169 -0
- package/package.json +3 -3
- package/{index.ts → src/index.ts} +13 -13
- package/tsconfig.json +1 -2
- package/umd/index.js +8639 -0
- package/webpack.umd.js +1 -1
|
@@ -0,0 +1,45 @@
|
|
|
1
|
+
var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
|
|
2
|
+
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
|
|
3
|
+
return new (P || (P = Promise))(function (resolve, reject) {
|
|
4
|
+
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
|
|
5
|
+
function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
|
|
6
|
+
function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
|
|
7
|
+
step((generator = generator.apply(thisArg, _arguments || [])).next());
|
|
8
|
+
});
|
|
9
|
+
};
|
|
10
|
+
import { Action } from "../../Action";
|
|
11
|
+
import { getAssetInfo } from "@defisaver/tokens";
|
|
12
|
+
import { getAddr } from '../../addresses';
|
|
13
|
+
import { requireAddress } from "../../utils/general";
|
|
14
|
+
/**
|
|
15
|
+
* LidoWrapAction - Turns WETH or StEth into WStEth
|
|
16
|
+
*
|
|
17
|
+
* @category Lido
|
|
18
|
+
*/
|
|
19
|
+
export class LidoWrapAction extends Action {
|
|
20
|
+
/**
|
|
21
|
+
* @param amount amount to pull and stake
|
|
22
|
+
* @param from tokens will be taken from this address
|
|
23
|
+
* @param to WStEth will be sent to this address
|
|
24
|
+
* @param useEth true for using WETH, false for using stEth
|
|
25
|
+
*/
|
|
26
|
+
constructor(amount, from, to, useEth) {
|
|
27
|
+
requireAddress(to);
|
|
28
|
+
super('LidoWrap', getAddr('LidoWrap'), ['uint256', 'address', 'address', 'bool'], [amount, from, to, useEth]);
|
|
29
|
+
this.mappableArgs = [
|
|
30
|
+
this.args[0],
|
|
31
|
+
this.args[1],
|
|
32
|
+
this.args[2],
|
|
33
|
+
];
|
|
34
|
+
}
|
|
35
|
+
getAssetsToApprove() {
|
|
36
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
37
|
+
if (this.args[3]) {
|
|
38
|
+
return [{ asset: getAssetInfo('WETH').address, owner: this.args[1] }];
|
|
39
|
+
}
|
|
40
|
+
else {
|
|
41
|
+
return [{ asset: '0xae7ab96520DE3A18E5e111B5EaAb095312D7fE84', owner: this.args[1] }];
|
|
42
|
+
}
|
|
43
|
+
});
|
|
44
|
+
}
|
|
45
|
+
}
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import { Action } from '../../Action';
|
|
2
|
+
import { EthAddress, uint256 } from '../../types';
|
|
3
|
+
/**
|
|
4
|
+
* LiquityBorrowAction - Borrows LUSD from the trove
|
|
5
|
+
*
|
|
6
|
+
* @category Liquity
|
|
7
|
+
*/
|
|
8
|
+
export declare class LiquityBorrowAction extends Action {
|
|
9
|
+
/**
|
|
10
|
+
* @param maxFeePercentage Highest borrowing fee to accept
|
|
11
|
+
* @param lusdAmount Amount of LUSD tokens to borrow
|
|
12
|
+
* @param to Address that will receive the borrowed tokens
|
|
13
|
+
*/
|
|
14
|
+
constructor(maxFeePercentage: uint256, lusdAmount: uint256, to: EthAddress, upperHint: EthAddress, lowerHint: EthAddress);
|
|
15
|
+
}
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
import { Action } from '../../Action';
|
|
2
|
+
import { requireAddress } from '../../utils/general';
|
|
3
|
+
import { getAddr } from '../../addresses';
|
|
4
|
+
/**
|
|
5
|
+
* LiquityBorrowAction - Borrows LUSD from the trove
|
|
6
|
+
*
|
|
7
|
+
* @category Liquity
|
|
8
|
+
*/
|
|
9
|
+
export class LiquityBorrowAction extends Action {
|
|
10
|
+
/**
|
|
11
|
+
* @param maxFeePercentage Highest borrowing fee to accept
|
|
12
|
+
* @param lusdAmount Amount of LUSD tokens to borrow
|
|
13
|
+
* @param to Address that will receive the borrowed tokens
|
|
14
|
+
*/
|
|
15
|
+
constructor(maxFeePercentage, lusdAmount, to, upperHint, lowerHint) {
|
|
16
|
+
requireAddress(to);
|
|
17
|
+
super('LiquityBorrow', getAddr('LiquityBorrow'), ['uint256', 'uint256', 'address', 'address', 'address'], [maxFeePercentage, lusdAmount, to, upperHint, lowerHint]);
|
|
18
|
+
this.mappableArgs = [
|
|
19
|
+
this.args[0],
|
|
20
|
+
this.args[1],
|
|
21
|
+
this.args[2],
|
|
22
|
+
];
|
|
23
|
+
}
|
|
24
|
+
}
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import { Action } from '../../Action';
|
|
2
|
+
import { EthAddress } from '../../types';
|
|
3
|
+
/**
|
|
4
|
+
* LiquityClaimAction - Claims collateral from the closed trove
|
|
5
|
+
*
|
|
6
|
+
* @category Liquity
|
|
7
|
+
*/
|
|
8
|
+
export declare class LiquityClaimAction extends Action {
|
|
9
|
+
/**
|
|
10
|
+
* @param to Address that will receive the collateral
|
|
11
|
+
*/
|
|
12
|
+
constructor(to: EthAddress);
|
|
13
|
+
}
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
import { Action } from '../../Action';
|
|
2
|
+
import { requireAddress } from '../../utils/general';
|
|
3
|
+
import { getAddr } from '../../addresses';
|
|
4
|
+
/**
|
|
5
|
+
* LiquityClaimAction - Claims collateral from the closed trove
|
|
6
|
+
*
|
|
7
|
+
* @category Liquity
|
|
8
|
+
*/
|
|
9
|
+
export class LiquityClaimAction extends Action {
|
|
10
|
+
/**
|
|
11
|
+
* @param to Address that will receive the collateral
|
|
12
|
+
*/
|
|
13
|
+
constructor(to) {
|
|
14
|
+
requireAddress(to);
|
|
15
|
+
super('LiquityClaim', getAddr('LiquityClaim'), ['address'], [to]);
|
|
16
|
+
this.mappableArgs = [
|
|
17
|
+
this.args[0],
|
|
18
|
+
];
|
|
19
|
+
}
|
|
20
|
+
}
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import { LiquitySPWithdrawAction } from './LiquitySPWithdrawAction';
|
|
2
|
+
import { EthAddress } from '../../types';
|
|
3
|
+
/**
|
|
4
|
+
* LiquityClaimSPRewardsAction - Claims rewards from LUSD Stability Pool
|
|
5
|
+
*
|
|
6
|
+
* @category Liquity
|
|
7
|
+
*/
|
|
8
|
+
export declare class LiquityClaimSPRewardsAction extends LiquitySPWithdrawAction {
|
|
9
|
+
/**
|
|
10
|
+
* @param wethTo Address that will receive ETH gains
|
|
11
|
+
* @param lqtyTo Address that will receive LQTY gains
|
|
12
|
+
*/
|
|
13
|
+
constructor(wethTo: EthAddress, lqtyTo: EthAddress);
|
|
14
|
+
}
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
import { LiquitySPWithdrawAction } from './LiquitySPWithdrawAction';
|
|
2
|
+
import { requireAddress } from '../../utils/general';
|
|
3
|
+
/**
|
|
4
|
+
* LiquityClaimSPRewardsAction - Claims rewards from LUSD Stability Pool
|
|
5
|
+
*
|
|
6
|
+
* @category Liquity
|
|
7
|
+
*/
|
|
8
|
+
export class LiquityClaimSPRewardsAction extends LiquitySPWithdrawAction {
|
|
9
|
+
/**
|
|
10
|
+
* @param wethTo Address that will receive ETH gains
|
|
11
|
+
* @param lqtyTo Address that will receive LQTY gains
|
|
12
|
+
*/
|
|
13
|
+
constructor(wethTo, lqtyTo) {
|
|
14
|
+
requireAddress(wethTo);
|
|
15
|
+
requireAddress(lqtyTo);
|
|
16
|
+
super("0", wethTo, wethTo, lqtyTo);
|
|
17
|
+
}
|
|
18
|
+
}
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import { LiquityUnstakeAction } from './LiquityUnstakeAction';
|
|
2
|
+
import { EthAddress } from '../../types';
|
|
3
|
+
/**
|
|
4
|
+
* LiquityClaimStakingRewardsAction - Claims rewards from LQTYStaking
|
|
5
|
+
*
|
|
6
|
+
* @category Liquity
|
|
7
|
+
*/
|
|
8
|
+
export declare class LiquityClaimStakingRewardsAction extends LiquityUnstakeAction {
|
|
9
|
+
/**
|
|
10
|
+
* @param wethTo Address that will receive ETH gains
|
|
11
|
+
* @param lusdTo Address that will receive LUSD gains
|
|
12
|
+
*/
|
|
13
|
+
constructor(wethTo: EthAddress, lusdTo: EthAddress);
|
|
14
|
+
}
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
import { LiquityUnstakeAction } from './LiquityUnstakeAction';
|
|
2
|
+
import { requireAddress } from '../../utils/general';
|
|
3
|
+
/**
|
|
4
|
+
* LiquityClaimStakingRewardsAction - Claims rewards from LQTYStaking
|
|
5
|
+
*
|
|
6
|
+
* @category Liquity
|
|
7
|
+
*/
|
|
8
|
+
export class LiquityClaimStakingRewardsAction extends LiquityUnstakeAction {
|
|
9
|
+
/**
|
|
10
|
+
* @param wethTo Address that will receive ETH gains
|
|
11
|
+
* @param lusdTo Address that will receive LUSD gains
|
|
12
|
+
*/
|
|
13
|
+
constructor(wethTo, lusdTo) {
|
|
14
|
+
requireAddress(wethTo);
|
|
15
|
+
requireAddress(lusdTo);
|
|
16
|
+
super("0", wethTo, wethTo, lusdTo);
|
|
17
|
+
}
|
|
18
|
+
}
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
import { Action } from '../../Action';
|
|
2
|
+
import { EthAddress } from '../../types';
|
|
3
|
+
/**
|
|
4
|
+
* LiquityCloseAction - Closes trove
|
|
5
|
+
*
|
|
6
|
+
* @category Liquity
|
|
7
|
+
*/
|
|
8
|
+
export declare class LiquityCloseAction extends Action {
|
|
9
|
+
/**
|
|
10
|
+
* @param from Address that will supply the LUSD needed to repay the debt
|
|
11
|
+
* @param to Address that will receive the freed collateral
|
|
12
|
+
*/
|
|
13
|
+
constructor(from: EthAddress, to: EthAddress);
|
|
14
|
+
getAssetsToApprove(): Promise<{
|
|
15
|
+
asset: string;
|
|
16
|
+
owner: any;
|
|
17
|
+
}[]>;
|
|
18
|
+
}
|
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
|
|
2
|
+
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
|
|
3
|
+
return new (P || (P = Promise))(function (resolve, reject) {
|
|
4
|
+
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
|
|
5
|
+
function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
|
|
6
|
+
function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
|
|
7
|
+
step((generator = generator.apply(thisArg, _arguments || [])).next());
|
|
8
|
+
});
|
|
9
|
+
};
|
|
10
|
+
import { getAssetInfo } from '@defisaver/tokens';
|
|
11
|
+
import { Action } from '../../Action';
|
|
12
|
+
import { requireAddress } from '../../utils/general';
|
|
13
|
+
import { getAddr } from '../../addresses';
|
|
14
|
+
/**
|
|
15
|
+
* LiquityCloseAction - Closes trove
|
|
16
|
+
*
|
|
17
|
+
* @category Liquity
|
|
18
|
+
*/
|
|
19
|
+
export class LiquityCloseAction extends Action {
|
|
20
|
+
/**
|
|
21
|
+
* @param from Address that will supply the LUSD needed to repay the debt
|
|
22
|
+
* @param to Address that will receive the freed collateral
|
|
23
|
+
*/
|
|
24
|
+
constructor(from, to) {
|
|
25
|
+
requireAddress(from);
|
|
26
|
+
requireAddress(to);
|
|
27
|
+
super('LiquityClose', getAddr('LiquityClose'), ['address', 'address'], [from, to]);
|
|
28
|
+
this.mappableArgs = [
|
|
29
|
+
this.args[0],
|
|
30
|
+
this.args[1],
|
|
31
|
+
];
|
|
32
|
+
}
|
|
33
|
+
getAssetsToApprove() {
|
|
34
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
35
|
+
return [{ asset: getAssetInfo('LUSD').address, owner: this.args[0] }];
|
|
36
|
+
});
|
|
37
|
+
}
|
|
38
|
+
}
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import { Action } from '../../Action';
|
|
2
|
+
import { EthAddress } from '../../types';
|
|
3
|
+
/**
|
|
4
|
+
* LiquityEthGainToTroveAction - Withdraws earned ETH gains to the users Trove
|
|
5
|
+
*
|
|
6
|
+
* @category Liquity
|
|
7
|
+
*/
|
|
8
|
+
export declare class LiquityEthGainToTroveAction extends Action {
|
|
9
|
+
/**
|
|
10
|
+
* @param lqtyTo Address that will receive LQTY gains
|
|
11
|
+
*/
|
|
12
|
+
constructor(lqtyTo: EthAddress, upperHint: EthAddress, lowerHint: EthAddress);
|
|
13
|
+
}
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
import { Action } from '../../Action';
|
|
2
|
+
import { requireAddress } from '../../utils/general';
|
|
3
|
+
import { getAddr } from '../../addresses';
|
|
4
|
+
/**
|
|
5
|
+
* LiquityEthGainToTroveAction - Withdraws earned ETH gains to the users Trove
|
|
6
|
+
*
|
|
7
|
+
* @category Liquity
|
|
8
|
+
*/
|
|
9
|
+
export class LiquityEthGainToTroveAction extends Action {
|
|
10
|
+
/**
|
|
11
|
+
* @param lqtyTo Address that will receive LQTY gains
|
|
12
|
+
*/
|
|
13
|
+
constructor(lqtyTo, upperHint, lowerHint) {
|
|
14
|
+
requireAddress(lqtyTo);
|
|
15
|
+
super('LiquityEthGainToTrove', getAddr('LiquityEthGainToTrove'), ['address', 'address', 'address'], [lqtyTo, upperHint, lowerHint]);
|
|
16
|
+
this.mappableArgs = [
|
|
17
|
+
this.args[0],
|
|
18
|
+
];
|
|
19
|
+
}
|
|
20
|
+
}
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
import { Action } from '../../Action';
|
|
2
|
+
import { EthAddress, uint256 } from '../../types';
|
|
3
|
+
/**
|
|
4
|
+
* LiquityOpenAction - Opens up a trove
|
|
5
|
+
*
|
|
6
|
+
* @category Liquity
|
|
7
|
+
*/
|
|
8
|
+
export declare class LiquityOpenAction extends Action {
|
|
9
|
+
/**
|
|
10
|
+
* @param maxFeePercentage Highest borrowing fee to accept
|
|
11
|
+
* @param collAmount Amount of WETH tokens to deposit as collateral
|
|
12
|
+
* @param lusdAmount Amount of LUSD tokens to borrow
|
|
13
|
+
* @param from Address where the tokens are pulled from
|
|
14
|
+
* @param to Address that will receive borrowed tokens
|
|
15
|
+
*/
|
|
16
|
+
constructor(maxFeePercentage: uint256, collAmount: uint256, lusdAmount: uint256, from: EthAddress, to: EthAddress, upperHint: EthAddress, lowerHint: EthAddress);
|
|
17
|
+
getAssetsToApprove(): Promise<{
|
|
18
|
+
asset: string;
|
|
19
|
+
owner: any;
|
|
20
|
+
}[]>;
|
|
21
|
+
}
|
|
@@ -0,0 +1,44 @@
|
|
|
1
|
+
var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
|
|
2
|
+
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
|
|
3
|
+
return new (P || (P = Promise))(function (resolve, reject) {
|
|
4
|
+
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
|
|
5
|
+
function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
|
|
6
|
+
function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
|
|
7
|
+
step((generator = generator.apply(thisArg, _arguments || [])).next());
|
|
8
|
+
});
|
|
9
|
+
};
|
|
10
|
+
import { getAssetInfo } from '@defisaver/tokens';
|
|
11
|
+
import { Action } from '../../Action';
|
|
12
|
+
import { requireAddress } from '../../utils/general';
|
|
13
|
+
import { getAddr } from '../../addresses';
|
|
14
|
+
/**
|
|
15
|
+
* LiquityOpenAction - Opens up a trove
|
|
16
|
+
*
|
|
17
|
+
* @category Liquity
|
|
18
|
+
*/
|
|
19
|
+
export class LiquityOpenAction extends Action {
|
|
20
|
+
/**
|
|
21
|
+
* @param maxFeePercentage Highest borrowing fee to accept
|
|
22
|
+
* @param collAmount Amount of WETH tokens to deposit as collateral
|
|
23
|
+
* @param lusdAmount Amount of LUSD tokens to borrow
|
|
24
|
+
* @param from Address where the tokens are pulled from
|
|
25
|
+
* @param to Address that will receive borrowed tokens
|
|
26
|
+
*/
|
|
27
|
+
constructor(maxFeePercentage, collAmount, lusdAmount, from, to, upperHint, lowerHint) {
|
|
28
|
+
requireAddress(from);
|
|
29
|
+
requireAddress(to);
|
|
30
|
+
super('LiquityOpen', getAddr('LiquityOpen'), ['uint256', 'uint256', 'uint256', 'address', 'address', 'address', 'address'], [maxFeePercentage, collAmount, lusdAmount, from, to, upperHint, lowerHint]);
|
|
31
|
+
this.mappableArgs = [
|
|
32
|
+
this.args[0],
|
|
33
|
+
this.args[1],
|
|
34
|
+
this.args[2],
|
|
35
|
+
this.args[3],
|
|
36
|
+
this.args[4],
|
|
37
|
+
];
|
|
38
|
+
}
|
|
39
|
+
getAssetsToApprove() {
|
|
40
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
41
|
+
return [{ asset: getAssetInfo('WETH').address, owner: this.args[3] }];
|
|
42
|
+
});
|
|
43
|
+
}
|
|
44
|
+
}
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
import { Action } from '../../Action';
|
|
2
|
+
import { EthAddress, uint256 } from '../../types';
|
|
3
|
+
/**
|
|
4
|
+
* LiquityPaybackAction - Repays LUSD to the trove
|
|
5
|
+
*
|
|
6
|
+
* @category Liquity
|
|
7
|
+
*/
|
|
8
|
+
export declare class LiquityPaybackAction extends Action {
|
|
9
|
+
/**
|
|
10
|
+
* @param lusdAmount Amount of LUSD tokens to repay
|
|
11
|
+
* @param from Address where the tokens are pulled from
|
|
12
|
+
*/
|
|
13
|
+
constructor(lusdAmount: uint256, from: EthAddress, upperHint: EthAddress, lowerHint: EthAddress);
|
|
14
|
+
getAssetsToApprove(): Promise<{
|
|
15
|
+
asset: string;
|
|
16
|
+
owner: any;
|
|
17
|
+
}[]>;
|
|
18
|
+
}
|
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
|
|
2
|
+
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
|
|
3
|
+
return new (P || (P = Promise))(function (resolve, reject) {
|
|
4
|
+
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
|
|
5
|
+
function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
|
|
6
|
+
function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
|
|
7
|
+
step((generator = generator.apply(thisArg, _arguments || [])).next());
|
|
8
|
+
});
|
|
9
|
+
};
|
|
10
|
+
import { getAssetInfo } from '@defisaver/tokens';
|
|
11
|
+
import { Action } from '../../Action';
|
|
12
|
+
import { requireAddress } from '../../utils/general';
|
|
13
|
+
import { getAddr } from '../../addresses';
|
|
14
|
+
/**
|
|
15
|
+
* LiquityPaybackAction - Repays LUSD to the trove
|
|
16
|
+
*
|
|
17
|
+
* @category Liquity
|
|
18
|
+
*/
|
|
19
|
+
export class LiquityPaybackAction extends Action {
|
|
20
|
+
/**
|
|
21
|
+
* @param lusdAmount Amount of LUSD tokens to repay
|
|
22
|
+
* @param from Address where the tokens are pulled from
|
|
23
|
+
*/
|
|
24
|
+
constructor(lusdAmount, from, upperHint, lowerHint) {
|
|
25
|
+
requireAddress(from);
|
|
26
|
+
super('LiquityPayback', getAddr('LiquityPayback'), ['uint256', 'address', 'address', 'address'], [lusdAmount, from, upperHint, lowerHint]);
|
|
27
|
+
this.mappableArgs = [
|
|
28
|
+
this.args[0],
|
|
29
|
+
this.args[1],
|
|
30
|
+
];
|
|
31
|
+
}
|
|
32
|
+
getAssetsToApprove() {
|
|
33
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
34
|
+
return [{ asset: getAssetInfo('LUSD').address, owner: this.args[1] }];
|
|
35
|
+
});
|
|
36
|
+
}
|
|
37
|
+
}
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
import { Action } from '../../Action';
|
|
2
|
+
import { EthAddress, uint256 } from '../../types';
|
|
3
|
+
/**
|
|
4
|
+
* LiquityRedeemAction - Redeems collateral from the liquity protocol
|
|
5
|
+
*
|
|
6
|
+
* @category Liquity
|
|
7
|
+
*/
|
|
8
|
+
export declare class LiquityRedeemAction extends Action {
|
|
9
|
+
/**
|
|
10
|
+
* @param lusdAmount Amount of LUSD tokens to send
|
|
11
|
+
* @param from Address where the tokens are pulled from
|
|
12
|
+
* @param to Address that will receive redeemed collateral
|
|
13
|
+
* @param maxFeePercentage Highest redemption fee to accept
|
|
14
|
+
*/
|
|
15
|
+
constructor(lusdAmount: uint256, from: EthAddress, to: EthAddress, firstRedemptionHint: EthAddress, upperPartialRedemptionHint: EthAddress, lowerPartialRedemptionHint: EthAddress, partialRedemptionHintNICR: uint256, maxIterations: uint256, maxFeePercentage: uint256);
|
|
16
|
+
getAssetsToApprove(): Promise<{
|
|
17
|
+
asset: string;
|
|
18
|
+
owner: any;
|
|
19
|
+
}[]>;
|
|
20
|
+
}
|
|
@@ -0,0 +1,42 @@
|
|
|
1
|
+
var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
|
|
2
|
+
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
|
|
3
|
+
return new (P || (P = Promise))(function (resolve, reject) {
|
|
4
|
+
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
|
|
5
|
+
function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
|
|
6
|
+
function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
|
|
7
|
+
step((generator = generator.apply(thisArg, _arguments || [])).next());
|
|
8
|
+
});
|
|
9
|
+
};
|
|
10
|
+
import { getAssetInfo } from '@defisaver/tokens';
|
|
11
|
+
import { Action } from '../../Action';
|
|
12
|
+
import { requireAddress } from '../../utils/general';
|
|
13
|
+
import { getAddr } from '../../addresses';
|
|
14
|
+
/**
|
|
15
|
+
* LiquityRedeemAction - Redeems collateral from the liquity protocol
|
|
16
|
+
*
|
|
17
|
+
* @category Liquity
|
|
18
|
+
*/
|
|
19
|
+
export class LiquityRedeemAction extends Action {
|
|
20
|
+
/**
|
|
21
|
+
* @param lusdAmount Amount of LUSD tokens to send
|
|
22
|
+
* @param from Address where the tokens are pulled from
|
|
23
|
+
* @param to Address that will receive redeemed collateral
|
|
24
|
+
* @param maxFeePercentage Highest redemption fee to accept
|
|
25
|
+
*/
|
|
26
|
+
constructor(lusdAmount, from, to, firstRedemptionHint, upperPartialRedemptionHint, lowerPartialRedemptionHint, partialRedemptionHintNICR, maxIterations, maxFeePercentage) {
|
|
27
|
+
requireAddress(from);
|
|
28
|
+
requireAddress(to);
|
|
29
|
+
super('LiquityRedeem', getAddr('LiquityRedeem'), ['uint256', 'address', 'address', 'address', 'address', 'address', 'uint256', 'uint256', 'uint256'], [lusdAmount, from, to, firstRedemptionHint, upperPartialRedemptionHint, lowerPartialRedemptionHint, partialRedemptionHintNICR, maxIterations, maxFeePercentage]);
|
|
30
|
+
this.mappableArgs = [
|
|
31
|
+
this.args[0],
|
|
32
|
+
this.args[1],
|
|
33
|
+
this.args[2],
|
|
34
|
+
this.args[8],
|
|
35
|
+
];
|
|
36
|
+
}
|
|
37
|
+
getAssetsToApprove() {
|
|
38
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
39
|
+
return [{ asset: getAssetInfo('LUSD').address, owner: this.args[1] }];
|
|
40
|
+
});
|
|
41
|
+
}
|
|
42
|
+
}
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
import { Action } from '../../Action';
|
|
2
|
+
import { EthAddress, uint256 } from '../../types';
|
|
3
|
+
/**
|
|
4
|
+
* LiquitySPDepositAction - Deposits LUSD to the stability pool
|
|
5
|
+
*
|
|
6
|
+
* @category Liquity
|
|
7
|
+
*/
|
|
8
|
+
export declare class LiquitySPDepositAction extends Action {
|
|
9
|
+
/**
|
|
10
|
+
* @param lusdAmount Amount of LUSD tokens to deposit
|
|
11
|
+
* @param from Address where the tokens are being pulled from
|
|
12
|
+
* @param wethTo Address that will receive ETH gains
|
|
13
|
+
* @param lqtyTo Address that will receive LQTY gains
|
|
14
|
+
*/
|
|
15
|
+
constructor(lusdAmount: uint256, from: EthAddress, wethTo: EthAddress, lqtyTo: EthAddress);
|
|
16
|
+
getAssetsToApprove(): Promise<{
|
|
17
|
+
asset: string;
|
|
18
|
+
owner: any;
|
|
19
|
+
}[]>;
|
|
20
|
+
}
|
|
@@ -0,0 +1,43 @@
|
|
|
1
|
+
var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
|
|
2
|
+
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
|
|
3
|
+
return new (P || (P = Promise))(function (resolve, reject) {
|
|
4
|
+
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
|
|
5
|
+
function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
|
|
6
|
+
function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
|
|
7
|
+
step((generator = generator.apply(thisArg, _arguments || [])).next());
|
|
8
|
+
});
|
|
9
|
+
};
|
|
10
|
+
import { getAssetInfo } from '@defisaver/tokens';
|
|
11
|
+
import { Action } from '../../Action';
|
|
12
|
+
import { requireAddress } from '../../utils/general';
|
|
13
|
+
import { getAddr } from '../../addresses';
|
|
14
|
+
/**
|
|
15
|
+
* LiquitySPDepositAction - Deposits LUSD to the stability pool
|
|
16
|
+
*
|
|
17
|
+
* @category Liquity
|
|
18
|
+
*/
|
|
19
|
+
export class LiquitySPDepositAction extends Action {
|
|
20
|
+
/**
|
|
21
|
+
* @param lusdAmount Amount of LUSD tokens to deposit
|
|
22
|
+
* @param from Address where the tokens are being pulled from
|
|
23
|
+
* @param wethTo Address that will receive ETH gains
|
|
24
|
+
* @param lqtyTo Address that will receive LQTY gains
|
|
25
|
+
*/
|
|
26
|
+
constructor(lusdAmount, from, wethTo, lqtyTo) {
|
|
27
|
+
requireAddress(from);
|
|
28
|
+
requireAddress(wethTo);
|
|
29
|
+
requireAddress(lqtyTo);
|
|
30
|
+
super('LiquitySPDeposit', getAddr('LiquitySPDeposit'), ['uint256', 'address', 'address', 'address'], [lusdAmount, from, wethTo, lqtyTo]);
|
|
31
|
+
this.mappableArgs = [
|
|
32
|
+
this.args[0],
|
|
33
|
+
this.args[1],
|
|
34
|
+
this.args[2],
|
|
35
|
+
this.args[3],
|
|
36
|
+
];
|
|
37
|
+
}
|
|
38
|
+
getAssetsToApprove() {
|
|
39
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
40
|
+
return [{ asset: getAssetInfo('LUSD').address, owner: this.args[1] }];
|
|
41
|
+
});
|
|
42
|
+
}
|
|
43
|
+
}
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import { Action } from '../../Action';
|
|
2
|
+
import { EthAddress, uint256 } from '../../types';
|
|
3
|
+
/**
|
|
4
|
+
* LiquitySPWithdrawAction - Withdraws a portion of deposited LUSD from the stability pool
|
|
5
|
+
*
|
|
6
|
+
* @category Liquity
|
|
7
|
+
*/
|
|
8
|
+
export declare class LiquitySPWithdrawAction extends Action {
|
|
9
|
+
/**
|
|
10
|
+
* @param lusdAmount Amount of LUSD tokens to withdraw
|
|
11
|
+
* @param to Address that will receive the LUSD tokens
|
|
12
|
+
* @param wethTo Address that will receive ETH gains
|
|
13
|
+
* @param lqtyTo Address that will receive LQTY gains
|
|
14
|
+
*/
|
|
15
|
+
constructor(lusdAmount: uint256, to: EthAddress, wethTo: EthAddress, lqtyTo: EthAddress);
|
|
16
|
+
}
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
import { Action } from '../../Action';
|
|
2
|
+
import { requireAddress } from '../../utils/general';
|
|
3
|
+
import { getAddr } from '../../addresses';
|
|
4
|
+
/**
|
|
5
|
+
* LiquitySPWithdrawAction - Withdraws a portion of deposited LUSD from the stability pool
|
|
6
|
+
*
|
|
7
|
+
* @category Liquity
|
|
8
|
+
*/
|
|
9
|
+
export class LiquitySPWithdrawAction extends Action {
|
|
10
|
+
/**
|
|
11
|
+
* @param lusdAmount Amount of LUSD tokens to withdraw
|
|
12
|
+
* @param to Address that will receive the LUSD tokens
|
|
13
|
+
* @param wethTo Address that will receive ETH gains
|
|
14
|
+
* @param lqtyTo Address that will receive LQTY gains
|
|
15
|
+
*/
|
|
16
|
+
constructor(lusdAmount, to, wethTo, lqtyTo) {
|
|
17
|
+
requireAddress(to);
|
|
18
|
+
requireAddress(wethTo);
|
|
19
|
+
requireAddress(lqtyTo);
|
|
20
|
+
super('LiquitySPWithdraw', getAddr('LiquitySPWithdraw'), ['uint256', 'address', 'address', 'address'], [lusdAmount, to, wethTo, lqtyTo]);
|
|
21
|
+
this.mappableArgs = [
|
|
22
|
+
this.args[0],
|
|
23
|
+
this.args[1],
|
|
24
|
+
this.args[2],
|
|
25
|
+
this.args[3],
|
|
26
|
+
];
|
|
27
|
+
}
|
|
28
|
+
}
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
import { Action } from '../../Action';
|
|
2
|
+
import { EthAddress, uint256 } from '../../types';
|
|
3
|
+
/**
|
|
4
|
+
* LiquityStakeAction - Stakes LQTY tokens
|
|
5
|
+
*
|
|
6
|
+
* @category Liquity
|
|
7
|
+
*/
|
|
8
|
+
export declare class LiquityStakeAction extends Action {
|
|
9
|
+
/**
|
|
10
|
+
* @param lqtyAmount Amount of LQTY tokens that will be staked
|
|
11
|
+
* @param from Address where the tokens are being pulled from
|
|
12
|
+
* @param wethTo Address that will receive ETH gains
|
|
13
|
+
* @param lusdTo Address that will receive LUSD gains
|
|
14
|
+
*/
|
|
15
|
+
constructor(lqtyAmount: uint256, from: EthAddress, wethTo: EthAddress, lusdTo: EthAddress);
|
|
16
|
+
getAssetsToApprove(): Promise<{
|
|
17
|
+
asset: string;
|
|
18
|
+
owner: any;
|
|
19
|
+
}[]>;
|
|
20
|
+
}
|