@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.
Files changed (415) hide show
  1. package/esm/AccessLists/AaveAccessLists.d.ts +2 -0
  2. package/esm/AccessLists/AaveAccessLists.js +19 -0
  3. package/esm/AccessLists/BalancerAccessLists.d.ts +2 -0
  4. package/esm/AccessLists/BalancerAccessLists.js +14 -0
  5. package/esm/AccessLists/CompoundAccessLists.d.ts +2 -0
  6. package/esm/AccessLists/CompoundAccessLists.js +23 -0
  7. package/esm/AccessLists/DyDxAccessLists.d.ts +2 -0
  8. package/esm/AccessLists/DyDxAccessLists.js +6 -0
  9. package/esm/AccessLists/FlashLoanAccessLists.d.ts +2 -0
  10. package/esm/AccessLists/FlashLoanAccessLists.js +20 -0
  11. package/esm/AccessLists/GuniAccessLists.d.ts +2 -0
  12. package/esm/AccessLists/GuniAccessLists.js +10 -0
  13. package/esm/AccessLists/InstaAccessLists.d.ts +2 -0
  14. package/esm/AccessLists/InstaAccessLists.js +5 -0
  15. package/esm/AccessLists/LidoAccessLists.d.ts +2 -0
  16. package/esm/AccessLists/LidoAccessLists.js +15 -0
  17. package/esm/AccessLists/LiquityAccessLists.d.ts +2 -0
  18. package/esm/AccessLists/LiquityAccessLists.js +65 -0
  19. package/esm/AccessLists/MStableAccessLists.d.ts +2 -0
  20. package/esm/AccessLists/MStableAccessLists.js +12 -0
  21. package/esm/AccessLists/MakerAccessLists.d.ts +2 -0
  22. package/esm/AccessLists/MakerAccessLists.js +34 -0
  23. package/esm/AccessLists/RariAccessLists.d.ts +2 -0
  24. package/esm/AccessLists/RariAccessLists.js +8 -0
  25. package/esm/AccessLists/ReflexerAccessLists.d.ts +2 -0
  26. package/esm/AccessLists/ReflexerAccessLists.js +42 -0
  27. package/esm/AccessLists/UniswapAccessLists.d.ts +2 -0
  28. package/esm/AccessLists/UniswapAccessLists.js +31 -0
  29. package/esm/AccessLists/UtilsAccessLists.d.ts +2 -0
  30. package/esm/AccessLists/UtilsAccessLists.js +23 -0
  31. package/esm/AccessLists/YearnAccessLists.d.ts +2 -0
  32. package/esm/AccessLists/YearnAccessLists.js +9 -0
  33. package/esm/AccessLists/index.d.ts +3 -0
  34. package/esm/AccessLists/index.js +17 -0
  35. package/esm/src/Action.d.ts +77 -0
  36. package/esm/src/Action.js +193 -0
  37. package/esm/src/ActionWithL2.d.ts +20 -0
  38. package/esm/src/ActionWithL2.js +49 -0
  39. package/esm/src/DfsWeb3.d.ts +31 -0
  40. package/esm/src/DfsWeb3.js +124 -0
  41. package/esm/src/Recipe.d.ts +49 -0
  42. package/esm/src/Recipe.js +135 -0
  43. package/esm/src/Strategy.d.ts +19 -0
  44. package/esm/src/Strategy.js +47 -0
  45. package/esm/src/abis/Action.json +247 -0
  46. package/esm/src/abis/DFSProxyRegistry.json +193 -0
  47. package/esm/src/abis/DsProxy.json +218 -0
  48. package/esm/src/abis/Erc20.json +222 -0
  49. package/esm/src/abis/ProxyRegistry.json +65 -0
  50. package/esm/src/abis/Recipe.json +254 -0
  51. package/esm/src/actions/aave/AaveBorrowAction.d.ts +18 -0
  52. package/esm/src/actions/aave/AaveBorrowAction.js +22 -0
  53. package/esm/src/actions/aave/AaveClaimStkAaveAction.d.ts +15 -0
  54. package/esm/src/actions/aave/AaveClaimStkAaveAction.js +23 -0
  55. package/esm/src/actions/aave/AaveCollateralSwitchAction.d.ts +15 -0
  56. package/esm/src/actions/aave/AaveCollateralSwitchAction.js +18 -0
  57. package/esm/src/actions/aave/AavePaybackAction.d.ts +22 -0
  58. package/esm/src/actions/aave/AavePaybackAction.js +38 -0
  59. package/esm/src/actions/aave/AaveSupplyAction.d.ts +22 -0
  60. package/esm/src/actions/aave/AaveSupplyAction.js +45 -0
  61. package/esm/src/actions/aave/AaveWithdrawAction.d.ts +16 -0
  62. package/esm/src/actions/aave/AaveWithdrawAction.js +20 -0
  63. package/esm/src/actions/aave/index.d.ts +6 -0
  64. package/esm/src/actions/aave/index.js +6 -0
  65. package/esm/src/actions/aaveV3/AaveV3ATokenPaybackAction.d.ts +25 -0
  66. package/esm/src/actions/aaveV3/AaveV3ATokenPaybackAction.js +64 -0
  67. package/esm/src/actions/aaveV3/AaveV3BorrowAction.d.ts +21 -0
  68. package/esm/src/actions/aaveV3/AaveV3BorrowAction.js +59 -0
  69. package/esm/src/actions/aaveV3/AaveV3ClaimRewardsAction.d.ts +18 -0
  70. package/esm/src/actions/aaveV3/AaveV3ClaimRewardsAction.js +40 -0
  71. package/esm/src/actions/aaveV3/AaveV3CollateralSwitchAction.d.ts +18 -0
  72. package/esm/src/actions/aaveV3/AaveV3CollateralSwitchAction.js +39 -0
  73. package/esm/src/actions/aaveV3/AaveV3PaybackAction.d.ts +27 -0
  74. package/esm/src/actions/aaveV3/AaveV3PaybackAction.js +77 -0
  75. package/esm/src/actions/aaveV3/AaveV3SetEModeAction.d.ts +16 -0
  76. package/esm/src/actions/aaveV3/AaveV3SetEModeAction.js +33 -0
  77. package/esm/src/actions/aaveV3/AaveV3SupplyAction.d.ts +27 -0
  78. package/esm/src/actions/aaveV3/AaveV3SupplyAction.js +77 -0
  79. package/esm/src/actions/aaveV3/AaveV3SwapBorrowRateModeAction.d.ts +18 -0
  80. package/esm/src/actions/aaveV3/AaveV3SwapBorrowRateModeAction.js +38 -0
  81. package/esm/src/actions/aaveV3/AaveV3WithdrawAction.d.ts +18 -0
  82. package/esm/src/actions/aaveV3/AaveV3WithdrawAction.js +45 -0
  83. package/esm/src/actions/aaveV3/index.d.ts +9 -0
  84. package/esm/src/actions/aaveV3/index.js +9 -0
  85. package/esm/src/actions/balancer/BalancerV2ClaimAction.d.ts +20 -0
  86. package/esm/src/actions/balancer/BalancerV2ClaimAction.js +49 -0
  87. package/esm/src/actions/balancer/BalancerV2SupplyAction.d.ts +22 -0
  88. package/esm/src/actions/balancer/BalancerV2SupplyAction.js +52 -0
  89. package/esm/src/actions/balancer/BalancerV2WithdrawAction.d.ts +24 -0
  90. package/esm/src/actions/balancer/BalancerV2WithdrawAction.js +56 -0
  91. package/esm/src/actions/balancer/index.d.ts +3 -0
  92. package/esm/src/actions/balancer/index.js +3 -0
  93. package/esm/src/actions/basic/AutomationV2Unsub.d.ts +9 -0
  94. package/esm/src/actions/basic/AutomationV2Unsub.js +11 -0
  95. package/esm/src/actions/basic/ChangeProxyOwnerAction.d.ts +13 -0
  96. package/esm/src/actions/basic/ChangeProxyOwnerAction.js +15 -0
  97. package/esm/src/actions/basic/GasFeeAction.d.ts +14 -0
  98. package/esm/src/actions/basic/GasFeeAction.js +21 -0
  99. package/esm/src/actions/basic/GasFeeActionL2.d.ts +15 -0
  100. package/esm/src/actions/basic/GasFeeActionL2.js +22 -0
  101. package/esm/src/actions/basic/PullTokenAction.d.ts +19 -0
  102. package/esm/src/actions/basic/PullTokenAction.js +41 -0
  103. package/esm/src/actions/basic/SellAction.d.ts +23 -0
  104. package/esm/src/actions/basic/SellAction.js +61 -0
  105. package/esm/src/actions/basic/SendTokenAction.d.ts +15 -0
  106. package/esm/src/actions/basic/SendTokenAction.js +23 -0
  107. package/esm/src/actions/basic/SendTokenAndUnwrapAction.d.ts +15 -0
  108. package/esm/src/actions/basic/SendTokenAndUnwrapAction.js +23 -0
  109. package/esm/src/actions/basic/SubInputsAction.d.ts +10 -0
  110. package/esm/src/actions/basic/SubInputsAction.js +15 -0
  111. package/esm/src/actions/basic/SumInputsAction.d.ts +10 -0
  112. package/esm/src/actions/basic/SumInputsAction.js +15 -0
  113. package/esm/src/actions/basic/ToggleSubAction.d.ts +14 -0
  114. package/esm/src/actions/basic/ToggleSubAction.js +16 -0
  115. package/esm/src/actions/basic/TokenBalanceAction.d.ts +8 -0
  116. package/esm/src/actions/basic/TokenBalanceAction.js +13 -0
  117. package/esm/src/actions/basic/TransferNFTAction.d.ts +8 -0
  118. package/esm/src/actions/basic/TransferNFTAction.js +17 -0
  119. package/esm/src/actions/basic/UnwrapEthAction.d.ts +15 -0
  120. package/esm/src/actions/basic/UnwrapEthAction.js +30 -0
  121. package/esm/src/actions/basic/UpdateSubAction.d.ts +14 -0
  122. package/esm/src/actions/basic/UpdateSubAction.js +16 -0
  123. package/esm/src/actions/basic/WrapEthAction.d.ts +15 -0
  124. package/esm/src/actions/basic/WrapEthAction.js +36 -0
  125. package/esm/src/actions/basic/index.d.ts +16 -0
  126. package/esm/src/actions/basic/index.js +16 -0
  127. package/esm/src/actions/checkers/AaveV3RatioCheckAction.d.ts +14 -0
  128. package/esm/src/actions/checkers/AaveV3RatioCheckAction.js +20 -0
  129. package/esm/src/actions/checkers/CompoundV3RatioCheckAction.d.ts +16 -0
  130. package/esm/src/actions/checkers/CompoundV3RatioCheckAction.js +24 -0
  131. package/esm/src/actions/checkers/MakerRatioCheckAction.d.ts +17 -0
  132. package/esm/src/actions/checkers/MakerRatioCheckAction.js +25 -0
  133. package/esm/src/actions/checkers/index.d.ts +3 -0
  134. package/esm/src/actions/checkers/index.js +3 -0
  135. package/esm/src/actions/chickenBonds/CBChickenInAction.d.ts +14 -0
  136. package/esm/src/actions/chickenBonds/CBChickenInAction.js +18 -0
  137. package/esm/src/actions/chickenBonds/CBChickenOutAction.d.ts +15 -0
  138. package/esm/src/actions/chickenBonds/CBChickenOutAction.js +19 -0
  139. package/esm/src/actions/chickenBonds/CBCreateAction.d.ts +18 -0
  140. package/esm/src/actions/chickenBonds/CBCreateAction.js +32 -0
  141. package/esm/src/actions/chickenBonds/CBRedeemAction.d.ts +20 -0
  142. package/esm/src/actions/chickenBonds/CBRedeemAction.js +35 -0
  143. package/esm/src/actions/chickenBonds/index.d.ts +4 -0
  144. package/esm/src/actions/chickenBonds/index.js +4 -0
  145. package/esm/src/actions/compound/CompoundBorrowAction.d.ts +15 -0
  146. package/esm/src/actions/compound/CompoundBorrowAction.js +19 -0
  147. package/esm/src/actions/compound/CompoundClaimAction.d.ts +16 -0
  148. package/esm/src/actions/compound/CompoundClaimAction.js +24 -0
  149. package/esm/src/actions/compound/CompoundCollateralSwitchAction.d.ts +10 -0
  150. package/esm/src/actions/compound/CompoundCollateralSwitchAction.js +12 -0
  151. package/esm/src/actions/compound/CompoundGetDebtAction.d.ts +8 -0
  152. package/esm/src/actions/compound/CompoundGetDebtAction.js +13 -0
  153. package/esm/src/actions/compound/CompoundPaybackAction.d.ts +20 -0
  154. package/esm/src/actions/compound/CompoundPaybackAction.js +38 -0
  155. package/esm/src/actions/compound/CompoundSupplyAction.d.ts +20 -0
  156. package/esm/src/actions/compound/CompoundSupplyAction.js +43 -0
  157. package/esm/src/actions/compound/CompoundWithdrawAction.d.ts +15 -0
  158. package/esm/src/actions/compound/CompoundWithdrawAction.js +19 -0
  159. package/esm/src/actions/compound/index.d.ts +7 -0
  160. package/esm/src/actions/compound/index.js +7 -0
  161. package/esm/src/actions/compoundV3/CompoundV3AllowAction.d.ts +15 -0
  162. package/esm/src/actions/compoundV3/CompoundV3AllowAction.js +24 -0
  163. package/esm/src/actions/compoundV3/CompoundV3BorrowAction.d.ts +16 -0
  164. package/esm/src/actions/compoundV3/CompoundV3BorrowAction.js +26 -0
  165. package/esm/src/actions/compoundV3/CompoundV3ClaimAction.d.ts +16 -0
  166. package/esm/src/actions/compoundV3/CompoundV3ClaimAction.js +27 -0
  167. package/esm/src/actions/compoundV3/CompoundV3PaybackAction.d.ts +22 -0
  168. package/esm/src/actions/compoundV3/CompoundV3PaybackAction.js +48 -0
  169. package/esm/src/actions/compoundV3/CompoundV3SupplyAction.d.ts +22 -0
  170. package/esm/src/actions/compoundV3/CompoundV3SupplyAction.js +45 -0
  171. package/esm/src/actions/compoundV3/CompoundV3TransferAction.d.ts +17 -0
  172. package/esm/src/actions/compoundV3/CompoundV3TransferAction.js +30 -0
  173. package/esm/src/actions/compoundV3/CompoundV3WithdrawAction.d.ts +17 -0
  174. package/esm/src/actions/compoundV3/CompoundV3WithdrawAction.js +29 -0
  175. package/esm/src/actions/compoundV3/index.d.ts +7 -0
  176. package/esm/src/actions/compoundV3/index.js +7 -0
  177. package/esm/src/actions/convex/ConvexClaimAction.d.ts +17 -0
  178. package/esm/src/actions/convex/ConvexClaimAction.js +59 -0
  179. package/esm/src/actions/convex/ConvexDepositAction.d.ts +22 -0
  180. package/esm/src/actions/convex/ConvexDepositAction.js +66 -0
  181. package/esm/src/actions/convex/ConvexWithdrawAction.d.ts +22 -0
  182. package/esm/src/actions/convex/ConvexWithdrawAction.js +63 -0
  183. package/esm/src/actions/convex/index.d.ts +3 -0
  184. package/esm/src/actions/convex/index.js +3 -0
  185. package/esm/src/actions/curve/CurveClaimFeesAction.d.ts +13 -0
  186. package/esm/src/actions/curve/CurveClaimFeesAction.js +22 -0
  187. package/esm/src/actions/curve/CurveDepositAction.d.ts +18 -0
  188. package/esm/src/actions/curve/CurveDepositAction.js +78 -0
  189. package/esm/src/actions/curve/CurveGaugeDepositAction.d.ts +20 -0
  190. package/esm/src/actions/curve/CurveGaugeDepositAction.js +40 -0
  191. package/esm/src/actions/curve/CurveGaugeWithdrawAction.d.ts +14 -0
  192. package/esm/src/actions/curve/CurveGaugeWithdrawAction.js +22 -0
  193. package/esm/src/actions/curve/CurveMintCrvAction.d.ts +12 -0
  194. package/esm/src/actions/curve/CurveMintCrvAction.js +19 -0
  195. package/esm/src/actions/curve/CurveStethPoolDepositAction.d.ts +16 -0
  196. package/esm/src/actions/curve/CurveStethPoolDepositAction.js +27 -0
  197. package/esm/src/actions/curve/CurveStethPoolWithdrawAction.d.ts +17 -0
  198. package/esm/src/actions/curve/CurveStethPoolWithdrawAction.js +28 -0
  199. package/esm/src/actions/curve/CurveSwapAction.d.ts +22 -0
  200. package/esm/src/actions/curve/CurveSwapAction.js +43 -0
  201. package/esm/src/actions/curve/CurveWithdrawAction.d.ts +22 -0
  202. package/esm/src/actions/curve/CurveWithdrawAction.js +72 -0
  203. package/esm/src/actions/curve/index.d.ts +9 -0
  204. package/esm/src/actions/curve/index.js +9 -0
  205. package/esm/src/actions/dydx/DyDxWithdrawAction.d.ts +15 -0
  206. package/esm/src/actions/dydx/DyDxWithdrawAction.js +19 -0
  207. package/esm/src/actions/dydx/index.d.ts +1 -0
  208. package/esm/src/actions/dydx/index.js +1 -0
  209. package/esm/src/actions/flashloan/AaveV2FlashLoanAction.d.ts +18 -0
  210. package/esm/src/actions/flashloan/AaveV2FlashLoanAction.js +20 -0
  211. package/esm/src/actions/flashloan/AaveV2FlashLoanPaybackAction.d.ts +14 -0
  212. package/esm/src/actions/flashloan/AaveV2FlashLoanPaybackAction.js +16 -0
  213. package/esm/src/actions/flashloan/AaveV3FlashLoanAction.d.ts +18 -0
  214. package/esm/src/actions/flashloan/AaveV3FlashLoanAction.js +20 -0
  215. package/esm/src/actions/flashloan/AaveV3FlashLoanPaybackAction.d.ts +14 -0
  216. package/esm/src/actions/flashloan/AaveV3FlashLoanPaybackAction.js +16 -0
  217. package/esm/src/actions/flashloan/BalancerFlashLoanAction.d.ts +16 -0
  218. package/esm/src/actions/flashloan/BalancerFlashLoanAction.js +18 -0
  219. package/esm/src/actions/flashloan/BalancerFlashLoanPaybackAction.d.ts +14 -0
  220. package/esm/src/actions/flashloan/BalancerFlashLoanPaybackAction.js +16 -0
  221. package/esm/src/actions/flashloan/DyDxFlashLoanAction.d.ts +16 -0
  222. package/esm/src/actions/flashloan/DyDxFlashLoanAction.js +18 -0
  223. package/esm/src/actions/flashloan/DyDxFlashLoanPaybackAction.d.ts +14 -0
  224. package/esm/src/actions/flashloan/DyDxFlashLoanPaybackAction.js +16 -0
  225. package/esm/src/actions/flashloan/EulerFlashLoanAction.d.ts +16 -0
  226. package/esm/src/actions/flashloan/EulerFlashLoanAction.js +18 -0
  227. package/esm/src/actions/flashloan/EulerFlashLoanPaybackAction.d.ts +13 -0
  228. package/esm/src/actions/flashloan/EulerFlashLoanPaybackAction.js +15 -0
  229. package/esm/src/actions/flashloan/MakerFlashLoanAction.d.ts +15 -0
  230. package/esm/src/actions/flashloan/MakerFlashLoanAction.js +17 -0
  231. package/esm/src/actions/flashloan/MakerFlashLoanPaybackAction.d.ts +13 -0
  232. package/esm/src/actions/flashloan/MakerFlashLoanPaybackAction.js +15 -0
  233. package/esm/src/actions/flashloan/index.d.ts +12 -0
  234. package/esm/src/actions/flashloan/index.js +12 -0
  235. package/esm/src/actions/guni/GUniDeposit.d.ts +24 -0
  236. package/esm/src/actions/guni/GUniDeposit.js +47 -0
  237. package/esm/src/actions/guni/GUniWithdraw.d.ts +22 -0
  238. package/esm/src/actions/guni/GUniWithdraw.js +39 -0
  239. package/esm/src/actions/guni/index.d.ts +2 -0
  240. package/esm/src/actions/guni/index.js +2 -0
  241. package/esm/src/actions/index.d.ts +24 -0
  242. package/esm/src/actions/index.js +24 -0
  243. package/esm/src/actions/insta/InstPullTokensAction.d.ts +18 -0
  244. package/esm/src/actions/insta/InstPullTokensAction.js +36 -0
  245. package/esm/src/actions/insta/index.d.ts +1 -0
  246. package/esm/src/actions/insta/index.js +1 -0
  247. package/esm/src/actions/lido/LidoStakeAction.d.ts +19 -0
  248. package/esm/src/actions/lido/LidoStakeAction.js +34 -0
  249. package/esm/src/actions/lido/LidoUnwrapAction.d.ts +19 -0
  250. package/esm/src/actions/lido/LidoUnwrapAction.js +33 -0
  251. package/esm/src/actions/lido/LidoWrapAction.d.ts +20 -0
  252. package/esm/src/actions/lido/LidoWrapAction.js +45 -0
  253. package/esm/src/actions/lido/index.d.ts +3 -0
  254. package/esm/src/actions/lido/index.js +3 -0
  255. package/esm/src/actions/liquity/LiquityBorrowAction.d.ts +15 -0
  256. package/esm/src/actions/liquity/LiquityBorrowAction.js +24 -0
  257. package/esm/src/actions/liquity/LiquityClaimAction.d.ts +13 -0
  258. package/esm/src/actions/liquity/LiquityClaimAction.js +20 -0
  259. package/esm/src/actions/liquity/LiquityClaimSPRewardsAction.d.ts +14 -0
  260. package/esm/src/actions/liquity/LiquityClaimSPRewardsAction.js +18 -0
  261. package/esm/src/actions/liquity/LiquityClaimStakingRewardsAction.d.ts +14 -0
  262. package/esm/src/actions/liquity/LiquityClaimStakingRewardsAction.js +18 -0
  263. package/esm/src/actions/liquity/LiquityCloseAction.d.ts +18 -0
  264. package/esm/src/actions/liquity/LiquityCloseAction.js +38 -0
  265. package/esm/src/actions/liquity/LiquityEthGainToTroveAction.d.ts +13 -0
  266. package/esm/src/actions/liquity/LiquityEthGainToTroveAction.js +20 -0
  267. package/esm/src/actions/liquity/LiquityOpenAction.d.ts +21 -0
  268. package/esm/src/actions/liquity/LiquityOpenAction.js +44 -0
  269. package/esm/src/actions/liquity/LiquityPaybackAction.d.ts +18 -0
  270. package/esm/src/actions/liquity/LiquityPaybackAction.js +37 -0
  271. package/esm/src/actions/liquity/LiquityRedeemAction.d.ts +20 -0
  272. package/esm/src/actions/liquity/LiquityRedeemAction.js +42 -0
  273. package/esm/src/actions/liquity/LiquitySPDepositAction.d.ts +20 -0
  274. package/esm/src/actions/liquity/LiquitySPDepositAction.js +43 -0
  275. package/esm/src/actions/liquity/LiquitySPWithdrawAction.d.ts +16 -0
  276. package/esm/src/actions/liquity/LiquitySPWithdrawAction.js +28 -0
  277. package/esm/src/actions/liquity/LiquityStakeAction.d.ts +20 -0
  278. package/esm/src/actions/liquity/LiquityStakeAction.js +43 -0
  279. package/esm/src/actions/liquity/LiquitySupplyAction.d.ts +18 -0
  280. package/esm/src/actions/liquity/LiquitySupplyAction.js +37 -0
  281. package/esm/src/actions/liquity/LiquityUnstakeAction.d.ts +16 -0
  282. package/esm/src/actions/liquity/LiquityUnstakeAction.js +28 -0
  283. package/esm/src/actions/liquity/LiquityWithdrawAction.d.ts +14 -0
  284. package/esm/src/actions/liquity/LiquityWithdrawAction.js +22 -0
  285. package/esm/src/actions/liquity/index.d.ts +15 -0
  286. package/esm/src/actions/liquity/index.js +15 -0
  287. package/esm/src/actions/maker/MakerClaimAction.d.ts +15 -0
  288. package/esm/src/actions/maker/MakerClaimAction.js +24 -0
  289. package/esm/src/actions/maker/MakerGenerateAction.d.ts +16 -0
  290. package/esm/src/actions/maker/MakerGenerateAction.js +20 -0
  291. package/esm/src/actions/maker/MakerGiveAction.d.ts +16 -0
  292. package/esm/src/actions/maker/MakerGiveAction.js +25 -0
  293. package/esm/src/actions/maker/MakerMergeAction.d.ts +15 -0
  294. package/esm/src/actions/maker/MakerMergeAction.js +17 -0
  295. package/esm/src/actions/maker/MakerOpenVaultAction.d.ts +14 -0
  296. package/esm/src/actions/maker/MakerOpenVaultAction.js +16 -0
  297. package/esm/src/actions/maker/MakerPaybackAction.d.ts +20 -0
  298. package/esm/src/actions/maker/MakerPaybackAction.js +33 -0
  299. package/esm/src/actions/maker/MakerRatioAction.d.ts +13 -0
  300. package/esm/src/actions/maker/MakerRatioAction.js +15 -0
  301. package/esm/src/actions/maker/MakerSupplyAction.d.ts +21 -0
  302. package/esm/src/actions/maker/MakerSupplyAction.js +37 -0
  303. package/esm/src/actions/maker/MakerWithdrawAction.d.ts +17 -0
  304. package/esm/src/actions/maker/MakerWithdrawAction.js +21 -0
  305. package/esm/src/actions/maker/index.d.ts +9 -0
  306. package/esm/src/actions/maker/index.js +9 -0
  307. package/esm/src/actions/mstable/MStableClaimAction.d.ts +16 -0
  308. package/esm/src/actions/mstable/MStableClaimAction.js +25 -0
  309. package/esm/src/actions/mstable/MStableDepositAction.d.ts +25 -0
  310. package/esm/src/actions/mstable/MStableDepositAction.js +75 -0
  311. package/esm/src/actions/mstable/MStableWithdrawAction.d.ts +25 -0
  312. package/esm/src/actions/mstable/MStableWithdrawAction.js +74 -0
  313. package/esm/src/actions/mstable/index.d.ts +3 -0
  314. package/esm/src/actions/mstable/index.js +3 -0
  315. package/esm/src/actions/rari/RariDepositAction.d.ts +22 -0
  316. package/esm/src/actions/rari/RariDepositAction.js +41 -0
  317. package/esm/src/actions/rari/RariWithdrawAction.d.ts +23 -0
  318. package/esm/src/actions/rari/RariWithdrawAction.js +43 -0
  319. package/esm/src/actions/rari/index.d.ts +2 -0
  320. package/esm/src/actions/rari/index.js +2 -0
  321. package/esm/src/actions/reflexer/ReflexerGenerateAction.d.ts +15 -0
  322. package/esm/src/actions/reflexer/ReflexerGenerateAction.js +19 -0
  323. package/esm/src/actions/reflexer/ReflexerNativeUniV2SaviourDepositAction.d.ts +19 -0
  324. package/esm/src/actions/reflexer/ReflexerNativeUniV2SaviourDepositAction.js +37 -0
  325. package/esm/src/actions/reflexer/ReflexerNativeUniV2SaviourGetReservesAction.d.ts +14 -0
  326. package/esm/src/actions/reflexer/ReflexerNativeUniV2SaviourGetReservesAction.js +21 -0
  327. package/esm/src/actions/reflexer/ReflexerNativeUniV2SaviourWithdrawAction.d.ts +15 -0
  328. package/esm/src/actions/reflexer/ReflexerNativeUniV2SaviourWithdrawAction.js +23 -0
  329. package/esm/src/actions/reflexer/ReflexerOpenSafeAction.d.ts +13 -0
  330. package/esm/src/actions/reflexer/ReflexerOpenSafeAction.js +15 -0
  331. package/esm/src/actions/reflexer/ReflexerPaybackAction.d.ts +19 -0
  332. package/esm/src/actions/reflexer/ReflexerPaybackAction.js +32 -0
  333. package/esm/src/actions/reflexer/ReflexerSupplyAction.d.ts +21 -0
  334. package/esm/src/actions/reflexer/ReflexerSupplyAction.js +44 -0
  335. package/esm/src/actions/reflexer/ReflexerWithdrawAction.d.ts +16 -0
  336. package/esm/src/actions/reflexer/ReflexerWithdrawAction.js +20 -0
  337. package/esm/src/actions/reflexer/index.d.ts +8 -0
  338. package/esm/src/actions/reflexer/index.js +8 -0
  339. package/esm/src/actions/uniswap/UniswapSupplyAction.d.ts +26 -0
  340. package/esm/src/actions/uniswap/UniswapSupplyAction.js +65 -0
  341. package/esm/src/actions/uniswap/UniswapWithdrawAction.d.ts +25 -0
  342. package/esm/src/actions/uniswap/UniswapWithdrawAction.js +56 -0
  343. package/esm/src/actions/uniswap/index.d.ts +2 -0
  344. package/esm/src/actions/uniswap/index.js +2 -0
  345. package/esm/src/actions/uniswapV3/UniswapV3CollectAction.d.ts +24 -0
  346. package/esm/src/actions/uniswapV3/UniswapV3CollectAction.js +47 -0
  347. package/esm/src/actions/uniswapV3/UniswapV3CreatePoolAction.d.ts +30 -0
  348. package/esm/src/actions/uniswapV3/UniswapV3CreatePoolAction.js +69 -0
  349. package/esm/src/actions/uniswapV3/UniswapV3MintAction.d.ts +29 -0
  350. package/esm/src/actions/uniswapV3/UniswapV3MintAction.js +67 -0
  351. package/esm/src/actions/uniswapV3/UniswapV3SupplyAction.d.ts +26 -0
  352. package/esm/src/actions/uniswapV3/UniswapV3SupplyAction.js +60 -0
  353. package/esm/src/actions/uniswapV3/UniswapV3WithdrawAction.d.ts +28 -0
  354. package/esm/src/actions/uniswapV3/UniswapV3WithdrawAction.js +58 -0
  355. package/esm/src/actions/uniswapV3/index.d.ts +5 -0
  356. package/esm/src/actions/uniswapV3/index.js +5 -0
  357. package/esm/src/actions/yearn/YearnSupplyAction.d.ts +21 -0
  358. package/esm/src/actions/yearn/YearnSupplyAction.js +43 -0
  359. package/esm/src/actions/yearn/YearnWithdrawAction.d.ts +21 -0
  360. package/esm/src/actions/yearn/YearnWithdrawAction.js +43 -0
  361. package/esm/src/actions/yearn/index.d.ts +2 -0
  362. package/esm/src/actions/yearn/index.js +2 -0
  363. package/esm/src/addresses.d.ts +410 -0
  364. package/esm/src/addresses.js +257 -0
  365. package/esm/src/config.d.ts +20 -0
  366. package/esm/src/config.js +69 -0
  367. package/esm/src/index.d.ts +1549 -0
  368. package/esm/src/index.js +22 -0
  369. package/esm/src/triggers/AaveV3RatioTrigger.d.ts +10 -0
  370. package/esm/src/triggers/AaveV3RatioTrigger.js +12 -0
  371. package/esm/src/triggers/ChainLinkPriceTrigger.d.ts +10 -0
  372. package/esm/src/triggers/ChainLinkPriceTrigger.js +12 -0
  373. package/esm/src/triggers/CompV3RatioTrigger.d.ts +10 -0
  374. package/esm/src/triggers/CompV3RatioTrigger.js +12 -0
  375. package/esm/src/triggers/CompoundRatioTrigger.d.ts +10 -0
  376. package/esm/src/triggers/CompoundRatioTrigger.js +12 -0
  377. package/esm/src/triggers/GasPriceTrigger.d.ts +10 -0
  378. package/esm/src/triggers/GasPriceTrigger.js +12 -0
  379. package/esm/src/triggers/LiquityRatioTrigger.d.ts +10 -0
  380. package/esm/src/triggers/LiquityRatioTrigger.js +12 -0
  381. package/esm/src/triggers/MakerRatioTrigger.d.ts +10 -0
  382. package/esm/src/triggers/MakerRatioTrigger.js +12 -0
  383. package/esm/src/triggers/ReflexerRatioTrigger.d.ts +10 -0
  384. package/esm/src/triggers/ReflexerRatioTrigger.js +12 -0
  385. package/esm/src/triggers/TimestampTrigger.d.ts +10 -0
  386. package/esm/src/triggers/TimestampTrigger.js +12 -0
  387. package/esm/src/triggers/TrailingStopTrigger.d.ts +10 -0
  388. package/esm/src/triggers/TrailingStopTrigger.js +12 -0
  389. package/esm/src/triggers/UniV3CurrentTickTrigger.d.ts +10 -0
  390. package/esm/src/triggers/UniV3CurrentTickTrigger.js +12 -0
  391. package/esm/src/triggers/index.d.ts +11 -0
  392. package/esm/src/triggers/index.js +11 -0
  393. package/esm/src/types.d.ts +43 -0
  394. package/esm/src/types.js +1 -0
  395. package/esm/src/utils/convex-utils.d.ts +42 -0
  396. package/esm/src/utils/convex-utils.js +16 -0
  397. package/esm/src/utils/convexPoolInfo.json +1039 -0
  398. package/esm/src/utils/curve-utils.d.ts +4 -0
  399. package/esm/src/utils/curve-utils.js +6 -0
  400. package/esm/src/utils/curvePoolInfo.json +203 -0
  401. package/esm/src/utils/general.d.ts +17 -0
  402. package/esm/src/utils/general.js +39 -0
  403. package/esm/src/utils/index.d.ts +5 -0
  404. package/esm/src/utils/index.js +5 -0
  405. package/esm/src/utils/mstableAssetPairs.d.ts +9 -0
  406. package/esm/src/utils/mstableAssetPairs.js +8 -0
  407. package/esm/src/utils/uniswapLP.d.ts +19 -0
  408. package/esm/src/utils/uniswapLP.js +33 -0
  409. package/esm/src/utils/zeroExExchange.d.ts +39 -0
  410. package/esm/src/utils/zeroExExchange.js +169 -0
  411. package/package.json +3 -3
  412. package/{index.ts → src/index.ts} +13 -13
  413. package/tsconfig.json +1 -2
  414. package/umd/index.js +8639 -0
  415. 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,3 @@
1
+ export * from './LidoStakeAction';
2
+ export * from './LidoWrapAction';
3
+ export * from './LidoUnwrapAction';
@@ -0,0 +1,3 @@
1
+ export * from './LidoStakeAction';
2
+ export * from './LidoWrapAction';
3
+ export * from './LidoUnwrapAction';
@@ -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
+ }