@defisaver/sdk 1.0.0 → 1.0.2
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/.babelrc +3 -0
- package/.eslintrc.js +100 -0
- 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 +10 -5
- package/src/Action.ts +47 -42
- package/src/ActionWithL2.ts +6 -6
- package/src/DfsWeb3.ts +20 -25
- package/src/Recipe.ts +18 -16
- package/src/Strategy.ts +10 -8
- package/src/actions/aave/AaveBorrowAction.ts +4 -4
- package/src/actions/aave/AaveClaimStkAaveAction.ts +5 -5
- package/src/actions/aave/AaveCollateralSwitchAction.ts +7 -7
- package/src/actions/aave/AavePaybackAction.ts +6 -6
- package/src/actions/aave/AaveSupplyAction.ts +7 -7
- package/src/actions/aave/AaveWithdrawAction.ts +6 -6
- package/src/actions/aaveV3/AaveV3ATokenPaybackAction.ts +13 -11
- package/src/actions/aaveV3/AaveV3BorrowAction.ts +11 -9
- package/src/actions/aaveV3/AaveV3ClaimRewardsAction.ts +7 -6
- package/src/actions/aaveV3/AaveV3CollateralSwitchAction.ts +8 -7
- package/src/actions/aaveV3/AaveV3PaybackAction.ts +20 -19
- package/src/actions/aaveV3/AaveV3SetEModeAction.ts +6 -6
- package/src/actions/aaveV3/AaveV3SupplyAction.ts +17 -18
- package/src/actions/aaveV3/AaveV3SwapBorrowRateModeAction.ts +10 -9
- package/src/actions/aaveV3/AaveV3WithdrawAction.ts +14 -13
- package/src/actions/balancer/BalancerV2ClaimAction.ts +14 -15
- package/src/actions/balancer/BalancerV2SupplyAction.ts +16 -14
- package/src/actions/balancer/BalancerV2WithdrawAction.ts +16 -14
- package/src/actions/balancer/index.ts +3 -3
- package/src/actions/basic/AutomationV2Unsub.ts +6 -6
- package/src/actions/basic/ChangeProxyOwnerAction.ts +5 -5
- package/src/actions/basic/GasFeeAction.ts +6 -7
- package/src/actions/basic/GasFeeActionL2.ts +6 -6
- package/src/actions/basic/PullTokenAction.ts +11 -11
- package/src/actions/basic/SellAction.ts +11 -12
- package/src/actions/basic/SendTokenAction.ts +8 -8
- package/src/actions/basic/SendTokenAndUnwrapAction.ts +8 -8
- package/src/actions/basic/SubInputsAction.ts +6 -6
- package/src/actions/basic/SumInputsAction.ts +6 -6
- package/src/actions/basic/ToggleSubAction.ts +5 -7
- package/src/actions/basic/TokenBalanceAction.ts +5 -5
- package/src/actions/basic/TransferNFTAction.ts +8 -8
- package/src/actions/basic/UnwrapEthAction.ts +11 -10
- package/src/actions/basic/UpdateSubAction.ts +8 -8
- package/src/actions/basic/WrapEthAction.ts +6 -6
- package/src/actions/checkers/AaveV3RatioCheckAction.ts +5 -5
- package/src/actions/checkers/CompoundV3RatioCheckAction.ts +6 -6
- package/src/actions/checkers/MakerRatioCheckAction.ts +5 -5
- package/src/actions/chickenBonds/CBChickenInAction.ts +6 -6
- package/src/actions/chickenBonds/CBChickenOutAction.ts +7 -7
- package/src/actions/chickenBonds/CBCreateAction.ts +6 -6
- package/src/actions/chickenBonds/CBRedeemAction.ts +6 -7
- package/src/actions/compound/CompoundBorrowAction.ts +5 -5
- package/src/actions/compound/CompoundClaimAction.ts +6 -6
- package/src/actions/compound/CompoundCollateralSwitchAction.ts +4 -4
- package/src/actions/compound/CompoundGetDebtAction.ts +5 -5
- package/src/actions/compound/CompoundPaybackAction.ts +8 -9
- package/src/actions/compound/CompoundSupplyAction.ts +8 -9
- package/src/actions/compound/CompoundWithdrawAction.ts +5 -5
- package/src/actions/compoundV3/CompoundV3AllowAction.ts +16 -16
- package/src/actions/compoundV3/CompoundV3BorrowAction.ts +17 -17
- package/src/actions/compoundV3/CompoundV3ClaimAction.ts +9 -9
- package/src/actions/compoundV3/CompoundV3PaybackAction.ts +32 -33
- package/src/actions/compoundV3/CompoundV3SupplyAction.ts +24 -25
- package/src/actions/compoundV3/CompoundV3TransferAction.ts +25 -25
- package/src/actions/compoundV3/CompoundV3WithdrawAction.ts +9 -9
- package/src/actions/compoundV3/index.ts +1 -1
- package/src/actions/convex/ConvexClaimAction.ts +51 -52
- package/src/actions/convex/ConvexDepositAction.ts +58 -59
- package/src/actions/convex/ConvexWithdrawAction.ts +55 -56
- package/src/actions/curve/CurveClaimFeesAction.ts +18 -19
- package/src/actions/curve/CurveDepositAction.ts +61 -62
- package/src/actions/curve/CurveGaugeDepositAction.ts +20 -21
- package/src/actions/curve/CurveGaugeWithdrawAction.ts +15 -16
- package/src/actions/curve/CurveMintCrvAction.ts +14 -15
- package/src/actions/curve/CurveStethPoolDepositAction.ts +27 -27
- package/src/actions/curve/CurveStethPoolWithdrawAction.ts +26 -26
- package/src/actions/curve/CurveSwapAction.ts +20 -21
- package/src/actions/curve/CurveWithdrawAction.ts +56 -57
- package/src/actions/dydx/DyDxWithdrawAction.ts +6 -6
- package/src/actions/flashloan/AaveV2FlashLoanAction.ts +6 -6
- package/src/actions/flashloan/AaveV2FlashLoanPaybackAction.ts +5 -5
- package/src/actions/flashloan/AaveV3FlashLoanAction.ts +6 -6
- package/src/actions/flashloan/AaveV3FlashLoanPaybackAction.ts +5 -5
- package/src/actions/flashloan/BalancerFlashLoanAction.ts +6 -6
- package/src/actions/flashloan/BalancerFlashLoanPaybackAction.ts +8 -8
- package/src/actions/flashloan/DyDxFlashLoanAction.ts +7 -7
- package/src/actions/flashloan/DyDxFlashLoanPaybackAction.ts +5 -5
- package/src/actions/flashloan/EulerFlashLoanAction.ts +6 -6
- package/src/actions/flashloan/EulerFlashLoanPaybackAction.ts +6 -5
- package/src/actions/flashloan/FLAction.ts +51 -0
- package/src/actions/flashloan/MakerFlashLoanAction.ts +6 -6
- package/src/actions/flashloan/MakerFlashLoanPaybackAction.ts +4 -4
- package/src/actions/flashloan/index.ts +3 -2
- package/src/actions/guni/GUniDeposit.ts +15 -15
- package/src/actions/guni/GUniWithdraw.ts +11 -11
- package/src/actions/index.ts +24 -24
- package/src/actions/insta/InstPullTokensAction.ts +9 -9
- package/src/actions/lido/LidoStakeAction.ts +7 -7
- package/src/actions/lido/LidoUnwrapAction.ts +6 -6
- package/src/actions/lido/LidoWrapAction.ts +9 -10
- package/src/actions/liquity/LiquityBorrowAction.ts +19 -17
- package/src/actions/liquity/LiquityClaimAction.ts +14 -14
- package/src/actions/liquity/LiquityClaimSPRewardsAction.ts +9 -9
- package/src/actions/liquity/LiquityClaimStakingRewardsAction.ts +9 -9
- package/src/actions/liquity/LiquityCloseAction.ts +19 -19
- package/src/actions/liquity/LiquityEthGainToTroveAction.ts +19 -17
- package/src/actions/liquity/LiquityOpenAction.ts +25 -23
- package/src/actions/liquity/LiquityPaybackAction.ts +21 -19
- package/src/actions/liquity/LiquityRedeemAction.ts +42 -37
- package/src/actions/liquity/LiquitySPDepositAction.ts +22 -22
- package/src/actions/liquity/LiquitySPWithdrawAction.ts +19 -19
- package/src/actions/liquity/LiquityStakeAction.ts +22 -22
- package/src/actions/liquity/LiquitySupplyAction.ts +21 -19
- package/src/actions/liquity/LiquityUnstakeAction.ts +19 -19
- package/src/actions/liquity/LiquityWithdrawAction.ts +18 -16
- package/src/actions/maker/MakerClaimAction.ts +8 -8
- package/src/actions/maker/MakerGenerateAction.ts +5 -5
- package/src/actions/maker/MakerGiveAction.ts +6 -6
- package/src/actions/maker/MakerMergeAction.ts +4 -4
- package/src/actions/maker/MakerOpenVaultAction.ts +4 -4
- package/src/actions/maker/MakerPaybackAction.ts +6 -6
- package/src/actions/maker/MakerRatioAction.ts +3 -3
- package/src/actions/maker/MakerSupplyAction.ts +6 -6
- package/src/actions/maker/MakerWithdrawAction.ts +5 -5
- package/src/actions/mstable/MStableClaimAction.ts +23 -23
- package/src/actions/mstable/MStableDepositAction.ts +60 -60
- package/src/actions/mstable/MStableWithdrawAction.ts +59 -59
- package/src/actions/rari/RariDepositAction.ts +4 -4
- package/src/actions/rari/RariWithdrawAction.ts +4 -4
- package/src/actions/reflexer/ReflexerGenerateAction.ts +6 -6
- package/src/actions/reflexer/ReflexerNativeUniV2SaviourDepositAction.ts +10 -11
- package/src/actions/reflexer/ReflexerNativeUniV2SaviourGetReservesAction.ts +7 -7
- package/src/actions/reflexer/ReflexerNativeUniV2SaviourWithdrawAction.ts +8 -8
- package/src/actions/reflexer/ReflexerOpenSafeAction.ts +3 -3
- package/src/actions/reflexer/ReflexerPaybackAction.ts +6 -6
- package/src/actions/reflexer/ReflexerSupplyAction.ts +6 -6
- package/src/actions/reflexer/ReflexerWithdrawAction.ts +5 -5
- package/src/actions/uniswap/UniswapSupplyAction.ts +18 -18
- package/src/actions/uniswap/UniswapWithdrawAction.ts +16 -16
- package/src/actions/uniswapV3/UniswapV3CollectAction.ts +9 -10
- package/src/actions/uniswapV3/UniswapV3CreatePoolAction.ts +22 -20
- package/src/actions/uniswapV3/UniswapV3MintAction.ts +21 -19
- package/src/actions/uniswapV3/UniswapV3SupplyAction.ts +15 -15
- package/src/actions/uniswapV3/UniswapV3WithdrawAction.ts +14 -15
- package/src/actions/yearn/YearnSupplyAction.ts +7 -7
- package/src/actions/yearn/YearnWithdrawAction.ts +7 -7
- package/src/addresses.ts +10 -7
- package/src/config.ts +6 -6
- package/{index.ts → src/index.ts} +36 -21
- package/src/triggers/AaveV3RatioTrigger.ts +6 -7
- package/src/triggers/ChainLinkPriceTrigger.ts +6 -8
- package/src/triggers/CompV3RatioTrigger.ts +6 -7
- package/src/triggers/CompoundRatioTrigger.ts +6 -7
- package/src/triggers/GasPriceTrigger.ts +6 -7
- package/src/triggers/LiquityRatioTrigger.ts +9 -10
- package/src/triggers/MakerRatioTrigger.ts +6 -7
- package/src/triggers/ReflexerRatioTrigger.ts +6 -7
- package/src/triggers/TimestampTrigger.ts +6 -7
- package/src/triggers/TrailingStopTrigger.ts +6 -7
- package/src/triggers/UniV3CurrentTickTrigger.ts +6 -6
- package/src/types.ts +9 -7
- package/src/utils/convex-utils.ts +9 -9
- package/src/utils/curve-utils.ts +11 -8
- package/src/utils/general.ts +4 -5
- package/src/utils/index.ts +7 -5
- package/src/utils/mstableAssetPairs.ts +6 -6
- package/src/utils/uniswapLP.ts +14 -16
- package/src/utils/uniswapV3LP.ts +5 -4
- package/src/utils/zeroExExchange.ts +9 -8
- package/tsconfig.json +1 -2
- package/umd/index.js +8639 -0
- package/webpack.umd.js +1 -1
- package/.eslintrc +0 -14
- package/src/triggers/CompV3Trigger.ts +0 -15
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
import { Action } from '../../Action';
|
|
2
|
+
import { requireAddress } from '../../utils/general';
|
|
3
|
+
import { getAddr } from '../../addresses';
|
|
4
|
+
/**
|
|
5
|
+
* MStableClaimAction
|
|
6
|
+
*
|
|
7
|
+
* @category MStable
|
|
8
|
+
*/
|
|
9
|
+
export class MStableClaimAction extends Action {
|
|
10
|
+
/**
|
|
11
|
+
* @param vaultAddress
|
|
12
|
+
* @param to
|
|
13
|
+
* @param first
|
|
14
|
+
* @param last
|
|
15
|
+
*/
|
|
16
|
+
constructor(vaultAddress, to, first, last) {
|
|
17
|
+
requireAddress(vaultAddress);
|
|
18
|
+
requireAddress(to);
|
|
19
|
+
super('MStableClaim', getAddr('MStableClaim'), ['address', 'address', 'uint256', 'uint256'], [vaultAddress, to, first, last]);
|
|
20
|
+
this.mappableArgs = [
|
|
21
|
+
this.args[0],
|
|
22
|
+
this.args[1],
|
|
23
|
+
];
|
|
24
|
+
}
|
|
25
|
+
}
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
import { Action } from '../../Action';
|
|
2
|
+
import { EthAddress, uint256 } from '../../types';
|
|
3
|
+
/**
|
|
4
|
+
* MStableDepositAction
|
|
5
|
+
*
|
|
6
|
+
* @category MStable
|
|
7
|
+
*/
|
|
8
|
+
export declare class MStableDepositAction extends Action {
|
|
9
|
+
/**
|
|
10
|
+
* @param bAsset
|
|
11
|
+
* @param mAsset
|
|
12
|
+
* @param saveAddress
|
|
13
|
+
* @param vaultAddress
|
|
14
|
+
* @param from
|
|
15
|
+
* @param to
|
|
16
|
+
* @param amount
|
|
17
|
+
* @param minOut
|
|
18
|
+
* @param assetPair
|
|
19
|
+
*/
|
|
20
|
+
constructor(bAsset: EthAddress, mAsset: EthAddress, saveAddress: EthAddress, vaultAddress: EthAddress, from: EthAddress, to: EthAddress, amount: uint256, minOut: uint256, assetPair: uint256);
|
|
21
|
+
getAssetsToApprove(): Promise<{
|
|
22
|
+
asset: any;
|
|
23
|
+
owner: any;
|
|
24
|
+
}[]>;
|
|
25
|
+
}
|
|
@@ -0,0 +1,75 @@
|
|
|
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 { requireAddress } from '../../utils/general';
|
|
12
|
+
import { getAddr } from '../../addresses';
|
|
13
|
+
import mstableAssetPairs from '../../utils/mstableAssetPairs';
|
|
14
|
+
/**
|
|
15
|
+
* MStableDepositAction
|
|
16
|
+
*
|
|
17
|
+
* @category MStable
|
|
18
|
+
*/
|
|
19
|
+
export class MStableDepositAction extends Action {
|
|
20
|
+
/**
|
|
21
|
+
* @param bAsset
|
|
22
|
+
* @param mAsset
|
|
23
|
+
* @param saveAddress
|
|
24
|
+
* @param vaultAddress
|
|
25
|
+
* @param from
|
|
26
|
+
* @param to
|
|
27
|
+
* @param amount
|
|
28
|
+
* @param minOut
|
|
29
|
+
* @param assetPair
|
|
30
|
+
*/
|
|
31
|
+
constructor(bAsset, mAsset, saveAddress, vaultAddress, from, to, amount, minOut, assetPair) {
|
|
32
|
+
requireAddress(bAsset);
|
|
33
|
+
requireAddress(mAsset);
|
|
34
|
+
requireAddress(saveAddress);
|
|
35
|
+
requireAddress(vaultAddress);
|
|
36
|
+
requireAddress(from);
|
|
37
|
+
requireAddress(to);
|
|
38
|
+
super('MStableDeposit', getAddr('MStableDeposit'), ['address', 'address', 'address', 'address', 'address', 'address', 'uint256', 'uint256', 'uint256'], [bAsset, mAsset, saveAddress, vaultAddress, from, to, amount, minOut, assetPair]);
|
|
39
|
+
this.mappableArgs = [
|
|
40
|
+
this.args[0],
|
|
41
|
+
this.args[1],
|
|
42
|
+
this.args[2],
|
|
43
|
+
this.args[3],
|
|
44
|
+
this.args[4],
|
|
45
|
+
this.args[5],
|
|
46
|
+
this.args[6],
|
|
47
|
+
this.args[7],
|
|
48
|
+
this.args[8],
|
|
49
|
+
];
|
|
50
|
+
}
|
|
51
|
+
getAssetsToApprove() {
|
|
52
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
53
|
+
const assetPair = this.args[8];
|
|
54
|
+
const owner = this.args[4];
|
|
55
|
+
let asset;
|
|
56
|
+
switch (assetPair) {
|
|
57
|
+
case mstableAssetPairs.BASSET_MASSET:
|
|
58
|
+
case mstableAssetPairs.BASSET_IMASSET:
|
|
59
|
+
case mstableAssetPairs.BASSET_IMASSETVAULT:
|
|
60
|
+
asset = this.args[0];
|
|
61
|
+
break;
|
|
62
|
+
case mstableAssetPairs.MASSET_IMASSET:
|
|
63
|
+
case mstableAssetPairs.MASSET_IMASSETVAULT:
|
|
64
|
+
asset = this.args[1];
|
|
65
|
+
break;
|
|
66
|
+
case mstableAssetPairs.IMASSET_IMASSETVAULT:
|
|
67
|
+
asset = this.args[2];
|
|
68
|
+
break;
|
|
69
|
+
default:
|
|
70
|
+
return [];
|
|
71
|
+
}
|
|
72
|
+
return [{ asset, owner }];
|
|
73
|
+
});
|
|
74
|
+
}
|
|
75
|
+
}
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
import { Action } from '../../Action';
|
|
2
|
+
import { EthAddress, uint256 } from '../../types';
|
|
3
|
+
/**
|
|
4
|
+
* MStableWithdrawAction
|
|
5
|
+
*
|
|
6
|
+
* @category MStable
|
|
7
|
+
*/
|
|
8
|
+
export declare class MStableWithdrawAction extends Action {
|
|
9
|
+
/**
|
|
10
|
+
* @param bAsset
|
|
11
|
+
* @param mAsset
|
|
12
|
+
* @param saveAddress
|
|
13
|
+
* @param vaultAddress
|
|
14
|
+
* @param from
|
|
15
|
+
* @param to
|
|
16
|
+
* @param amount
|
|
17
|
+
* @param minOut
|
|
18
|
+
* @param assetPair
|
|
19
|
+
*/
|
|
20
|
+
constructor(bAsset: EthAddress, mAsset: EthAddress, saveAddress: EthAddress, vaultAddress: EthAddress, from: EthAddress, to: EthAddress, amount: uint256, minOut: uint256, assetPair: uint256);
|
|
21
|
+
getAssetsToApprove(): Promise<{
|
|
22
|
+
asset: any;
|
|
23
|
+
owner: any;
|
|
24
|
+
}[]>;
|
|
25
|
+
}
|
|
@@ -0,0 +1,74 @@
|
|
|
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 { requireAddress } from '../../utils/general';
|
|
12
|
+
import { getAddr } from '../../addresses';
|
|
13
|
+
import mstableAssetPairs from '../../utils/mstableAssetPairs';
|
|
14
|
+
/**
|
|
15
|
+
* MStableWithdrawAction
|
|
16
|
+
*
|
|
17
|
+
* @category MStable
|
|
18
|
+
*/
|
|
19
|
+
export class MStableWithdrawAction extends Action {
|
|
20
|
+
/**
|
|
21
|
+
* @param bAsset
|
|
22
|
+
* @param mAsset
|
|
23
|
+
* @param saveAddress
|
|
24
|
+
* @param vaultAddress
|
|
25
|
+
* @param from
|
|
26
|
+
* @param to
|
|
27
|
+
* @param amount
|
|
28
|
+
* @param minOut
|
|
29
|
+
* @param assetPair
|
|
30
|
+
*/
|
|
31
|
+
constructor(bAsset, mAsset, saveAddress, vaultAddress, from, to, amount, minOut, assetPair) {
|
|
32
|
+
requireAddress(bAsset);
|
|
33
|
+
requireAddress(mAsset);
|
|
34
|
+
requireAddress(saveAddress);
|
|
35
|
+
requireAddress(vaultAddress);
|
|
36
|
+
requireAddress(from);
|
|
37
|
+
requireAddress(to);
|
|
38
|
+
super('MStableWithdraw', getAddr('MStableWithdraw'), ['address', 'address', 'address', 'address', 'address', 'address', 'uint256', 'uint256', 'uint256'], [bAsset, mAsset, saveAddress, vaultAddress, from, to, amount, minOut, assetPair]);
|
|
39
|
+
this.mappableArgs = [
|
|
40
|
+
this.args[0],
|
|
41
|
+
this.args[1],
|
|
42
|
+
this.args[2],
|
|
43
|
+
this.args[3],
|
|
44
|
+
this.args[4],
|
|
45
|
+
this.args[5],
|
|
46
|
+
this.args[6],
|
|
47
|
+
this.args[7],
|
|
48
|
+
this.args[8],
|
|
49
|
+
];
|
|
50
|
+
}
|
|
51
|
+
getAssetsToApprove() {
|
|
52
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
53
|
+
const assetPair = this.args[8];
|
|
54
|
+
const owner = this.args[4];
|
|
55
|
+
let asset;
|
|
56
|
+
switch (assetPair) {
|
|
57
|
+
case mstableAssetPairs.BASSET_IMASSETVAULT:
|
|
58
|
+
case mstableAssetPairs.MASSET_IMASSETVAULT:
|
|
59
|
+
case mstableAssetPairs.IMASSET_IMASSETVAULT:
|
|
60
|
+
return [];
|
|
61
|
+
case mstableAssetPairs.MASSET_IMASSET:
|
|
62
|
+
case mstableAssetPairs.BASSET_IMASSET:
|
|
63
|
+
asset = this.args[2];
|
|
64
|
+
break;
|
|
65
|
+
case mstableAssetPairs.BASSET_MASSET:
|
|
66
|
+
asset = this.args[1];
|
|
67
|
+
break;
|
|
68
|
+
default:
|
|
69
|
+
return [];
|
|
70
|
+
}
|
|
71
|
+
return [{ asset, owner }];
|
|
72
|
+
});
|
|
73
|
+
}
|
|
74
|
+
}
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
import { Action } from "../../Action";
|
|
2
|
+
import { EthAddress, uint256 } from '../../types';
|
|
3
|
+
/**
|
|
4
|
+
* RariDepositAction - action that deposits one stablecoin (DAI, USDC, USDT, TUSD, BUSD, and sUSD) and receives RSPT back
|
|
5
|
+
*
|
|
6
|
+
* @category Rari
|
|
7
|
+
*/
|
|
8
|
+
export declare class RariDepositAction extends Action {
|
|
9
|
+
/**
|
|
10
|
+
* @param fundManager fundManager for the pool which we want to deposit into
|
|
11
|
+
* @param stablecoinAddress stablecoin token address
|
|
12
|
+
* @param poolTokenAddress poolTokenAddress
|
|
13
|
+
* @param amount amount of stablecoin to pull and deposit
|
|
14
|
+
* @param from stablecoins will be taken from this address
|
|
15
|
+
* @param to RSPT will be sent to this address
|
|
16
|
+
*/
|
|
17
|
+
constructor(fundManager: EthAddress, stablecoinAddress: EthAddress, poolTokenAddress: EthAddress, amount: uint256, from: EthAddress, to: EthAddress);
|
|
18
|
+
getAssetsToApprove(): Promise<{
|
|
19
|
+
asset: any;
|
|
20
|
+
owner: any;
|
|
21
|
+
}[]>;
|
|
22
|
+
}
|
|
@@ -0,0 +1,41 @@
|
|
|
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 { getAddr } from '../../addresses';
|
|
12
|
+
import { requireAddress } from '../../utils/general';
|
|
13
|
+
/**
|
|
14
|
+
* RariDepositAction - action that deposits one stablecoin (DAI, USDC, USDT, TUSD, BUSD, and sUSD) and receives RSPT back
|
|
15
|
+
*
|
|
16
|
+
* @category Rari
|
|
17
|
+
*/
|
|
18
|
+
export class RariDepositAction extends Action {
|
|
19
|
+
/**
|
|
20
|
+
* @param fundManager fundManager for the pool which we want to deposit into
|
|
21
|
+
* @param stablecoinAddress stablecoin token address
|
|
22
|
+
* @param poolTokenAddress poolTokenAddress
|
|
23
|
+
* @param amount amount of stablecoin to pull and deposit
|
|
24
|
+
* @param from stablecoins will be taken from this address
|
|
25
|
+
* @param to RSPT will be sent to this address
|
|
26
|
+
*/
|
|
27
|
+
constructor(fundManager, stablecoinAddress, poolTokenAddress, amount, from, to) {
|
|
28
|
+
requireAddress(to);
|
|
29
|
+
super('RariDeposit', getAddr('RariDeposit'), ['address', 'address', 'address', 'uint256', 'address', 'address'], [fundManager, stablecoinAddress, poolTokenAddress, amount, from, to]);
|
|
30
|
+
this.mappableArgs = [
|
|
31
|
+
this.args[3],
|
|
32
|
+
this.args[4],
|
|
33
|
+
this.args[5],
|
|
34
|
+
];
|
|
35
|
+
}
|
|
36
|
+
getAssetsToApprove() {
|
|
37
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
38
|
+
return [{ asset: this.args[1], owner: this.args[4] }];
|
|
39
|
+
});
|
|
40
|
+
}
|
|
41
|
+
}
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
import { Action } from "../../Action";
|
|
2
|
+
import { EthAddress, uint256 } from '../../types';
|
|
3
|
+
/**
|
|
4
|
+
* RariWithdrawAction - Send pool tokens to fund manager which burns them, receive underlying stablecoin back
|
|
5
|
+
*
|
|
6
|
+
* @category Rari
|
|
7
|
+
*/
|
|
8
|
+
export declare class RariWithdrawAction extends Action {
|
|
9
|
+
/**
|
|
10
|
+
* @param fundManager fundManager for the pool which we want to withdraw from
|
|
11
|
+
* @param poolTokenAddress poolToken address
|
|
12
|
+
* @param poolTokensAmountToPull amount of tokens to pull to proxy
|
|
13
|
+
* @param from poolTokens will be taken from this address
|
|
14
|
+
* @param stablecoinAddress stablecoin token address
|
|
15
|
+
* @param stablecoinAmountToWithdraw amount of stablecoin to withdraw from Rari
|
|
16
|
+
* @param to stablecoins withdrawn will be sent to this address
|
|
17
|
+
*/
|
|
18
|
+
constructor(fundManager: EthAddress, poolTokenAddress: EthAddress, poolTokensAmountToPull: uint256, from: EthAddress, stablecoinAddress: EthAddress, stablecoinAmountToWithdraw: uint256, to: EthAddress);
|
|
19
|
+
getAssetsToApprove(): Promise<{
|
|
20
|
+
asset: any;
|
|
21
|
+
owner: any;
|
|
22
|
+
}[]>;
|
|
23
|
+
}
|
|
@@ -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 { Action } from "../../Action";
|
|
11
|
+
import { getAddr } from '../../addresses';
|
|
12
|
+
import { requireAddress } from '../../utils/general';
|
|
13
|
+
/**
|
|
14
|
+
* RariWithdrawAction - Send pool tokens to fund manager which burns them, receive underlying stablecoin back
|
|
15
|
+
*
|
|
16
|
+
* @category Rari
|
|
17
|
+
*/
|
|
18
|
+
export class RariWithdrawAction extends Action {
|
|
19
|
+
/**
|
|
20
|
+
* @param fundManager fundManager for the pool which we want to withdraw from
|
|
21
|
+
* @param poolTokenAddress poolToken address
|
|
22
|
+
* @param poolTokensAmountToPull amount of tokens to pull to proxy
|
|
23
|
+
* @param from poolTokens will be taken from this address
|
|
24
|
+
* @param stablecoinAddress stablecoin token address
|
|
25
|
+
* @param stablecoinAmountToWithdraw amount of stablecoin to withdraw from Rari
|
|
26
|
+
* @param to stablecoins withdrawn will be sent to this address
|
|
27
|
+
*/
|
|
28
|
+
constructor(fundManager, poolTokenAddress, poolTokensAmountToPull, from, stablecoinAddress, stablecoinAmountToWithdraw, to) {
|
|
29
|
+
requireAddress(to);
|
|
30
|
+
super('RariWithdraw', getAddr('RariWithdraw'), ['address', 'address', 'uint256', 'address', 'address', 'uint256', 'address'], [fundManager, poolTokenAddress, poolTokensAmountToPull, from, stablecoinAddress, stablecoinAmountToWithdraw, to]);
|
|
31
|
+
this.mappableArgs = [
|
|
32
|
+
this.args[2],
|
|
33
|
+
this.args[3],
|
|
34
|
+
this.args[5],
|
|
35
|
+
this.args[6],
|
|
36
|
+
];
|
|
37
|
+
}
|
|
38
|
+
getAssetsToApprove() {
|
|
39
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
40
|
+
return [{ asset: this.args[1], owner: this.args[3] }];
|
|
41
|
+
});
|
|
42
|
+
}
|
|
43
|
+
}
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import { Action } from "../../Action";
|
|
2
|
+
import { EthAddress, uint256 } from '../../types';
|
|
3
|
+
/**
|
|
4
|
+
* ReflexerGenerateAction - Generated Dai from a Safe
|
|
5
|
+
*
|
|
6
|
+
* @category Reflexer
|
|
7
|
+
*/
|
|
8
|
+
export declare class ReflexerGenerateAction extends Action {
|
|
9
|
+
/**
|
|
10
|
+
* @param safeId
|
|
11
|
+
* @param amount Amount of Rai to generate in wei
|
|
12
|
+
* @param to Generated Rai will be sent to this address
|
|
13
|
+
*/
|
|
14
|
+
constructor(safeId: uint256, amount: uint256, to: EthAddress);
|
|
15
|
+
}
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
import { Action } from "../../Action";
|
|
2
|
+
import { requireAddress } from "../../utils/general";
|
|
3
|
+
import { getAddr } from '../../addresses';
|
|
4
|
+
/**
|
|
5
|
+
* ReflexerGenerateAction - Generated Dai from a Safe
|
|
6
|
+
*
|
|
7
|
+
* @category Reflexer
|
|
8
|
+
*/
|
|
9
|
+
export class ReflexerGenerateAction extends Action {
|
|
10
|
+
/**
|
|
11
|
+
* @param safeId
|
|
12
|
+
* @param amount Amount of Rai to generate in wei
|
|
13
|
+
* @param to Generated Rai will be sent to this address
|
|
14
|
+
*/
|
|
15
|
+
constructor(safeId, amount, to) {
|
|
16
|
+
requireAddress(to);
|
|
17
|
+
super('ReflexerGenerate', getAddr('ReflexerGenerate'), ['uint256', 'uint256', 'address'], [safeId, amount, to]);
|
|
18
|
+
}
|
|
19
|
+
}
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
import { Action } from "../../Action";
|
|
2
|
+
import { EthAddress, uint256 } from '../../types';
|
|
3
|
+
/**
|
|
4
|
+
* ReflexerNativeUniV2SaviourDepositAction - Deposit lpToken in the contract in order to provide cover for a specific SAFE managed by the SAFE Manager
|
|
5
|
+
*
|
|
6
|
+
* @category Reflexer
|
|
7
|
+
*/
|
|
8
|
+
export declare class ReflexerNativeUniV2SaviourDepositAction extends Action {
|
|
9
|
+
/**
|
|
10
|
+
* @param from
|
|
11
|
+
* @param safeId
|
|
12
|
+
* @param lpTokenAmount
|
|
13
|
+
*/
|
|
14
|
+
constructor(from: EthAddress, safeId: uint256, lpTokenAmount: uint256);
|
|
15
|
+
getAssetsToApprove(): Promise<{
|
|
16
|
+
asset: string;
|
|
17
|
+
owner: any;
|
|
18
|
+
}[]>;
|
|
19
|
+
}
|
|
@@ -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 { Action } from "../../Action";
|
|
11
|
+
import { getAddr } from '../../addresses';
|
|
12
|
+
/**
|
|
13
|
+
* ReflexerNativeUniV2SaviourDepositAction - Deposit lpToken in the contract in order to provide cover for a specific SAFE managed by the SAFE Manager
|
|
14
|
+
*
|
|
15
|
+
* @category Reflexer
|
|
16
|
+
*/
|
|
17
|
+
export class ReflexerNativeUniV2SaviourDepositAction extends Action {
|
|
18
|
+
/**
|
|
19
|
+
* @param from
|
|
20
|
+
* @param safeId
|
|
21
|
+
* @param lpTokenAmount
|
|
22
|
+
*/
|
|
23
|
+
constructor(from, safeId, lpTokenAmount) {
|
|
24
|
+
super('ReflexerNativeUniV2SaviourDeposit', getAddr('ReflexerNativeUniV2SaviourDeposit'), ['address', 'uint256', 'uint256'], [from, safeId, lpTokenAmount]);
|
|
25
|
+
this.mappableArgs = [
|
|
26
|
+
this.args[0],
|
|
27
|
+
this.args[1],
|
|
28
|
+
this.args[2],
|
|
29
|
+
];
|
|
30
|
+
}
|
|
31
|
+
getAssetsToApprove() {
|
|
32
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
33
|
+
const tokenAddress = getAddr('RaiWethUniV2LPToken');
|
|
34
|
+
return [{ asset: tokenAddress, owner: this.args[0] }];
|
|
35
|
+
});
|
|
36
|
+
}
|
|
37
|
+
}
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import { Action } from "../../Action";
|
|
2
|
+
import { EthAddress, uint256 } from '../../types';
|
|
3
|
+
/**
|
|
4
|
+
* ReflexerNativeUniV2SaviourGetReservesAction - Get back system coins or collateral tokens that were withdrawn from Uniswap and not used to save a specific SAFE
|
|
5
|
+
*
|
|
6
|
+
* @category Reflexer
|
|
7
|
+
*/
|
|
8
|
+
export declare class ReflexerNativeUniV2SaviourGetReservesAction extends Action {
|
|
9
|
+
/**
|
|
10
|
+
* @param to
|
|
11
|
+
* @param safeId
|
|
12
|
+
*/
|
|
13
|
+
constructor(to: EthAddress, safeId: uint256);
|
|
14
|
+
}
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
import { Action } from "../../Action";
|
|
2
|
+
import { getAddr } from '../../addresses';
|
|
3
|
+
import { requireAddress } from "../../utils/general";
|
|
4
|
+
/**
|
|
5
|
+
* ReflexerNativeUniV2SaviourGetReservesAction - Get back system coins or collateral tokens that were withdrawn from Uniswap and not used to save a specific SAFE
|
|
6
|
+
*
|
|
7
|
+
* @category Reflexer
|
|
8
|
+
*/
|
|
9
|
+
export class ReflexerNativeUniV2SaviourGetReservesAction extends Action {
|
|
10
|
+
/**
|
|
11
|
+
* @param to
|
|
12
|
+
* @param safeId
|
|
13
|
+
*/
|
|
14
|
+
constructor(to, safeId) {
|
|
15
|
+
requireAddress(to);
|
|
16
|
+
super('ReflexerNativeUniV2SaviourGetReserves', getAddr('ReflexerNativeUniV2SaviourGetReserves'), ['address', 'uint256'], [to, safeId]);
|
|
17
|
+
this.mappableArgs = [
|
|
18
|
+
this.args[0],
|
|
19
|
+
];
|
|
20
|
+
}
|
|
21
|
+
}
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import { Action } from "../../Action";
|
|
2
|
+
import { EthAddress, uint256 } from '../../types';
|
|
3
|
+
/**
|
|
4
|
+
* ReflexerNativeUniV2SaviourWithdrawAction - Withdraw lpToken from the contract and provide less cover for a SAFE
|
|
5
|
+
*
|
|
6
|
+
* @category Reflexer
|
|
7
|
+
*/
|
|
8
|
+
export declare class ReflexerNativeUniV2SaviourWithdrawAction extends Action {
|
|
9
|
+
/**
|
|
10
|
+
* @param to
|
|
11
|
+
* @param safeId
|
|
12
|
+
* @param lpTokenAmount
|
|
13
|
+
*/
|
|
14
|
+
constructor(to: EthAddress, safeId: uint256, lpTokenAmount: uint256);
|
|
15
|
+
}
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
import { Action } from "../../Action";
|
|
2
|
+
import { getAddr } from '../../addresses';
|
|
3
|
+
import { requireAddress } from "../../utils/general";
|
|
4
|
+
/**
|
|
5
|
+
* ReflexerNativeUniV2SaviourWithdrawAction - Withdraw lpToken from the contract and provide less cover for a SAFE
|
|
6
|
+
*
|
|
7
|
+
* @category Reflexer
|
|
8
|
+
*/
|
|
9
|
+
export class ReflexerNativeUniV2SaviourWithdrawAction extends Action {
|
|
10
|
+
/**
|
|
11
|
+
* @param to
|
|
12
|
+
* @param safeId
|
|
13
|
+
* @param lpTokenAmount
|
|
14
|
+
*/
|
|
15
|
+
constructor(to, safeId, lpTokenAmount) {
|
|
16
|
+
requireAddress(to);
|
|
17
|
+
super('ReflexerNativeUniV2SaviourWithdraw', getAddr('ReflexerNativeUniV2SaviourWithdraw'), ['address', 'uint256', 'uint256',], [to, safeId, lpTokenAmount]);
|
|
18
|
+
this.mappableArgs = [
|
|
19
|
+
this.args[0],
|
|
20
|
+
this.args[2],
|
|
21
|
+
];
|
|
22
|
+
}
|
|
23
|
+
}
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import { Action } from "../../Action";
|
|
2
|
+
import { EthAddress } from '../../types';
|
|
3
|
+
/**
|
|
4
|
+
* ReflexerOpenSafeAction
|
|
5
|
+
*
|
|
6
|
+
* @category Reflexer
|
|
7
|
+
*/
|
|
8
|
+
export declare class ReflexerOpenSafeAction extends Action {
|
|
9
|
+
/**
|
|
10
|
+
* @param adapterAddr
|
|
11
|
+
*/
|
|
12
|
+
constructor(adapterAddr: EthAddress);
|
|
13
|
+
}
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import { Action } from "../../Action";
|
|
2
|
+
import { getAddr } from '../../addresses';
|
|
3
|
+
/**
|
|
4
|
+
* ReflexerOpenSafeAction
|
|
5
|
+
*
|
|
6
|
+
* @category Reflexer
|
|
7
|
+
*/
|
|
8
|
+
export class ReflexerOpenSafeAction extends Action {
|
|
9
|
+
/**
|
|
10
|
+
* @param adapterAddr
|
|
11
|
+
*/
|
|
12
|
+
constructor(adapterAddr) {
|
|
13
|
+
super('ReflexerOpen', getAddr('ReflexerOpen'), ['address'], [adapterAddr]);
|
|
14
|
+
}
|
|
15
|
+
}
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
import { Action } from "../../Action";
|
|
2
|
+
import { EthAddress, uint256 } from '../../types';
|
|
3
|
+
/**
|
|
4
|
+
* ReflexerPaybackAction - Payback RAI to a Safe
|
|
5
|
+
*
|
|
6
|
+
* @category Reflexer
|
|
7
|
+
*/
|
|
8
|
+
export declare class ReflexerPaybackAction extends Action {
|
|
9
|
+
/**
|
|
10
|
+
* @param safeId
|
|
11
|
+
* @param amount Amount of RAI to be payed back in wei
|
|
12
|
+
* @param from RAI will be sent from this address
|
|
13
|
+
*/
|
|
14
|
+
constructor(safeId: uint256, amount: uint256, from: EthAddress);
|
|
15
|
+
getAssetsToApprove(): Promise<{
|
|
16
|
+
asset: string;
|
|
17
|
+
owner: any;
|
|
18
|
+
}[]>;
|
|
19
|
+
}
|
|
@@ -0,0 +1,32 @@
|
|
|
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
|
+
/**
|
|
14
|
+
* ReflexerPaybackAction - Payback RAI to a Safe
|
|
15
|
+
*
|
|
16
|
+
* @category Reflexer
|
|
17
|
+
*/
|
|
18
|
+
export class ReflexerPaybackAction extends Action {
|
|
19
|
+
/**
|
|
20
|
+
* @param safeId
|
|
21
|
+
* @param amount Amount of RAI to be payed back in wei
|
|
22
|
+
* @param from RAI will be sent from this address
|
|
23
|
+
*/
|
|
24
|
+
constructor(safeId, amount, from) {
|
|
25
|
+
super('ReflexerPayback', getAddr('ReflexerPayback'), ['uint256', 'uint256', 'address'], [safeId, amount, from]);
|
|
26
|
+
}
|
|
27
|
+
getAssetsToApprove() {
|
|
28
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
29
|
+
return [{ asset: getAssetInfo('RAI').address, owner: this.args[2] }];
|
|
30
|
+
});
|
|
31
|
+
}
|
|
32
|
+
}
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
import { Action } from "../../Action";
|
|
2
|
+
import { EthAddress, uint256 } from '../../types';
|
|
3
|
+
/**
|
|
4
|
+
* ReflexerSupplyAction - Supply token to a Safe
|
|
5
|
+
*
|
|
6
|
+
* @category Reflexer
|
|
7
|
+
*/
|
|
8
|
+
export declare class ReflexerSupplyAction extends Action {
|
|
9
|
+
/**
|
|
10
|
+
* @param safeId
|
|
11
|
+
* @param amount
|
|
12
|
+
* @param adapterAddr
|
|
13
|
+
* @param from Tokens will be supplied from this address
|
|
14
|
+
*/
|
|
15
|
+
constructor(safeId: uint256, amount: uint256, adapterAddr: EthAddress, from: EthAddress);
|
|
16
|
+
getAssetsToApprove(): Promise<{
|
|
17
|
+
asset: string;
|
|
18
|
+
owner: any;
|
|
19
|
+
}[]>;
|
|
20
|
+
getEthValue(): Promise<any>;
|
|
21
|
+
}
|