@defisaver/positions-sdk 0.0.166-dev → 0.0.166

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 (85) hide show
  1. package/cjs/config/contracts.d.ts +0 -72
  2. package/cjs/config/contracts.js +0 -6
  3. package/cjs/contracts.d.ts +0 -1
  4. package/cjs/contracts.js +1 -2
  5. package/cjs/helpers/index.d.ts +0 -1
  6. package/cjs/helpers/index.js +1 -2
  7. package/cjs/index.d.ts +1 -2
  8. package/cjs/index.js +1 -3
  9. package/cjs/markets/compound/marketsAssets.js +3 -3
  10. package/cjs/markets/index.d.ts +0 -1
  11. package/cjs/markets/index.js +1 -3
  12. package/cjs/markets/morphoBlue/index.d.ts +4 -0
  13. package/cjs/markets/morphoBlue/index.js +36 -1
  14. package/cjs/markets/spark/marketAssets.js +1 -1
  15. package/cjs/services/utils.d.ts +0 -2
  16. package/cjs/services/utils.js +1 -4
  17. package/cjs/staking/staking.d.ts +1 -0
  18. package/cjs/staking/staking.js +31 -2
  19. package/cjs/types/contracts/generated/index.d.ts +0 -1
  20. package/cjs/types/index.d.ts +0 -1
  21. package/cjs/types/index.js +0 -1
  22. package/cjs/types/morphoBlue.d.ts +3 -1
  23. package/cjs/types/morphoBlue.js +2 -0
  24. package/esm/config/contracts.d.ts +0 -72
  25. package/esm/config/contracts.js +0 -6
  26. package/esm/contracts.d.ts +0 -1
  27. package/esm/contracts.js +0 -1
  28. package/esm/helpers/index.d.ts +0 -1
  29. package/esm/helpers/index.js +0 -1
  30. package/esm/index.d.ts +1 -2
  31. package/esm/index.js +1 -2
  32. package/esm/markets/compound/marketsAssets.js +3 -3
  33. package/esm/markets/index.d.ts +0 -1
  34. package/esm/markets/index.js +0 -1
  35. package/esm/markets/morphoBlue/index.d.ts +4 -0
  36. package/esm/markets/morphoBlue/index.js +33 -0
  37. package/esm/markets/spark/marketAssets.js +1 -1
  38. package/esm/services/utils.d.ts +0 -2
  39. package/esm/services/utils.js +0 -2
  40. package/esm/staking/staking.d.ts +1 -0
  41. package/esm/staking/staking.js +29 -1
  42. package/esm/types/contracts/generated/index.d.ts +0 -1
  43. package/esm/types/index.d.ts +0 -1
  44. package/esm/types/index.js +0 -1
  45. package/esm/types/morphoBlue.d.ts +3 -1
  46. package/esm/types/morphoBlue.js +2 -0
  47. package/package.json +10 -5
  48. package/src/config/contracts.js +0 -6
  49. package/src/contracts.ts +0 -2
  50. package/src/helpers/index.ts +1 -2
  51. package/src/index.ts +0 -2
  52. package/src/markets/compound/marketsAssets.ts +3 -3
  53. package/src/markets/index.ts +1 -3
  54. package/src/markets/morphoBlue/index.ts +37 -0
  55. package/src/markets/spark/marketAssets.ts +1 -1
  56. package/src/services/utils.ts +0 -3
  57. package/src/staking/staking.ts +31 -2
  58. package/src/types/contracts/generated/index.ts +0 -1
  59. package/src/types/index.ts +1 -2
  60. package/src/types/morphoBlue.ts +2 -0
  61. package/cjs/eulerV2/index.d.ts +0 -40
  62. package/cjs/eulerV2/index.js +0 -207
  63. package/cjs/helpers/eulerHelpers/index.d.ts +0 -27
  64. package/cjs/helpers/eulerHelpers/index.js +0 -232
  65. package/cjs/markets/euler/index.d.ts +0 -10
  66. package/cjs/markets/euler/index.js +0 -41
  67. package/cjs/types/contracts/generated/EulerV2View.d.ts +0 -333
  68. package/cjs/types/contracts/generated/EulerV2View.js +0 -5
  69. package/cjs/types/euler.d.ts +0 -148
  70. package/cjs/types/euler.js +0 -15
  71. package/esm/eulerV2/index.d.ts +0 -40
  72. package/esm/eulerV2/index.js +0 -199
  73. package/esm/helpers/eulerHelpers/index.d.ts +0 -27
  74. package/esm/helpers/eulerHelpers/index.js +0 -219
  75. package/esm/markets/euler/index.d.ts +0 -10
  76. package/esm/markets/euler/index.js +0 -34
  77. package/esm/types/contracts/generated/EulerV2View.d.ts +0 -333
  78. package/esm/types/contracts/generated/EulerV2View.js +0 -4
  79. package/esm/types/euler.d.ts +0 -148
  80. package/esm/types/euler.js +0 -12
  81. package/src/eulerV2/index.ts +0 -286
  82. package/src/helpers/eulerHelpers/index.ts +0 -231
  83. package/src/markets/euler/index.ts +0 -38
  84. package/src/types/contracts/generated/EulerV2View.ts +0 -434
  85. package/src/types/euler.ts +0 -171
@@ -6696,75 +6696,3 @@ export namespace LlamaLendControllerAbi {
6696
6696
  let networks_76: {};
6697
6697
  export { networks_76 as networks };
6698
6698
  }
6699
- export namespace EulerV2View {
6700
- let abi_77: ({
6701
- inputs: {
6702
- internalType: string;
6703
- name: string;
6704
- type: string;
6705
- }[];
6706
- name: string;
6707
- outputs: {
6708
- internalType: string;
6709
- name: string;
6710
- type: string;
6711
- }[];
6712
- stateMutability: string;
6713
- type: string;
6714
- } | {
6715
- inputs: {
6716
- components: {
6717
- internalType: string;
6718
- name: string;
6719
- type: string;
6720
- }[];
6721
- internalType: string;
6722
- name: string;
6723
- type: string;
6724
- }[];
6725
- name: string;
6726
- outputs: {
6727
- internalType: string;
6728
- name: string;
6729
- type: string;
6730
- }[];
6731
- stateMutability: string;
6732
- type: string;
6733
- } | {
6734
- inputs: {
6735
- internalType: string;
6736
- name: string;
6737
- type: string;
6738
- }[];
6739
- name: string;
6740
- outputs: {
6741
- components: ({
6742
- internalType: string;
6743
- name: string;
6744
- type: string;
6745
- components?: undefined;
6746
- } | {
6747
- components: {
6748
- internalType: string;
6749
- name: string;
6750
- type: string;
6751
- }[];
6752
- internalType: string;
6753
- name: string;
6754
- type: string;
6755
- })[];
6756
- internalType: string;
6757
- name: string;
6758
- type: string;
6759
- }[];
6760
- stateMutability: string;
6761
- type: string;
6762
- })[];
6763
- export { abi_77 as abi };
6764
- let networks_77: {
6765
- "1": {
6766
- address: string;
6767
- };
6768
- };
6769
- export { networks_77 as networks };
6770
- }
@@ -1030,10 +1030,4 @@ module.exports = {
1030
1030
  "abi": [{ "name": "UserState", "inputs": [{ "name": "user", "type": "address", "indexed": true }, { "name": "collateral", "type": "uint256", "indexed": false }, { "name": "debt", "type": "uint256", "indexed": false }, { "name": "n1", "type": "int256", "indexed": false }, { "name": "n2", "type": "int256", "indexed": false }, { "name": "liquidation_discount", "type": "uint256", "indexed": false }], "anonymous": false, "type": "event" }, { "name": "Borrow", "inputs": [{ "name": "user", "type": "address", "indexed": true }, { "name": "collateral_increase", "type": "uint256", "indexed": false }, { "name": "loan_increase", "type": "uint256", "indexed": false }], "anonymous": false, "type": "event" }, { "name": "Repay", "inputs": [{ "name": "user", "type": "address", "indexed": true }, { "name": "collateral_decrease", "type": "uint256", "indexed": false }, { "name": "loan_decrease", "type": "uint256", "indexed": false }], "anonymous": false, "type": "event" }, { "name": "RemoveCollateral", "inputs": [{ "name": "user", "type": "address", "indexed": true }, { "name": "collateral_decrease", "type": "uint256", "indexed": false }], "anonymous": false, "type": "event" }, { "name": "Liquidate", "inputs": [{ "name": "liquidator", "type": "address", "indexed": true }, { "name": "user", "type": "address", "indexed": true }, { "name": "collateral_received", "type": "uint256", "indexed": false }, { "name": "stablecoin_received", "type": "uint256", "indexed": false }, { "name": "debt", "type": "uint256", "indexed": false }], "anonymous": false, "type": "event" }, { "name": "SetMonetaryPolicy", "inputs": [{ "name": "monetary_policy", "type": "address", "indexed": false }], "anonymous": false, "type": "event" }, { "name": "SetBorrowingDiscounts", "inputs": [{ "name": "loan_discount", "type": "uint256", "indexed": false }, { "name": "liquidation_discount", "type": "uint256", "indexed": false }], "anonymous": false, "type": "event" }, { "name": "CollectFees", "inputs": [{ "name": "amount", "type": "uint256", "indexed": false }, { "name": "new_supply", "type": "uint256", "indexed": false }], "anonymous": false, "type": "event" }, { "stateMutability": "nonpayable", "type": "constructor", "inputs": [{ "name": "collateral_token", "type": "address" }, { "name": "monetary_policy", "type": "address" }, { "name": "loan_discount", "type": "uint256" }, { "name": "liquidation_discount", "type": "uint256" }, { "name": "amm", "type": "address" }], "outputs": [] }, { "stateMutability": "pure", "type": "function", "name": "factory", "inputs": [], "outputs": [{ "name": "", "type": "address" }] }, { "stateMutability": "pure", "type": "function", "name": "amm", "inputs": [], "outputs": [{ "name": "", "type": "address" }] }, { "stateMutability": "pure", "type": "function", "name": "collateral_token", "inputs": [], "outputs": [{ "name": "", "type": "address" }] }, { "stateMutability": "pure", "type": "function", "name": "borrowed_token", "inputs": [], "outputs": [{ "name": "", "type": "address" }] }, { "stateMutability": "nonpayable", "type": "function", "name": "save_rate", "inputs": [], "outputs": [] }, { "stateMutability": "view", "type": "function", "name": "debt", "inputs": [{ "name": "user", "type": "address" }], "outputs": [{ "name": "", "type": "uint256" }] }, { "stateMutability": "view", "type": "function", "name": "loan_exists", "inputs": [{ "name": "user", "type": "address" }], "outputs": [{ "name": "", "type": "bool" }] }, { "stateMutability": "view", "type": "function", "name": "total_debt", "inputs": [], "outputs": [{ "name": "", "type": "uint256" }] }, { "stateMutability": "view", "type": "function", "name": "max_borrowable", "inputs": [{ "name": "collateral", "type": "uint256" }, { "name": "N", "type": "uint256" }], "outputs": [{ "name": "", "type": "uint256" }] }, { "stateMutability": "view", "type": "function", "name": "max_borrowable", "inputs": [{ "name": "collateral", "type": "uint256" }, { "name": "N", "type": "uint256" }, { "name": "current_debt", "type": "uint256" }], "outputs": [{ "name": "", "type": "uint256" }] }, { "stateMutability": "view", "type": "function", "name": "min_collateral", "inputs": [{ "name": "debt", "type": "uint256" }, { "name": "N", "type": "uint256" }], "outputs": [{ "name": "", "type": "uint256" }] }, { "stateMutability": "view", "type": "function", "name": "calculate_debt_n1", "inputs": [{ "name": "collateral", "type": "uint256" }, { "name": "debt", "type": "uint256" }, { "name": "N", "type": "uint256" }], "outputs": [{ "name": "", "type": "int256" }] }, { "stateMutability": "nonpayable", "type": "function", "name": "create_loan", "inputs": [{ "name": "collateral", "type": "uint256" }, { "name": "debt", "type": "uint256" }, { "name": "N", "type": "uint256" }], "outputs": [] }, { "stateMutability": "nonpayable", "type": "function", "name": "create_loan_extended", "inputs": [{ "name": "collateral", "type": "uint256" }, { "name": "debt", "type": "uint256" }, { "name": "N", "type": "uint256" }, { "name": "callbacker", "type": "address" }, { "name": "callback_args", "type": "uint256[]" }], "outputs": [] }, { "stateMutability": "nonpayable", "type": "function", "name": "add_collateral", "inputs": [{ "name": "collateral", "type": "uint256" }], "outputs": [] }, { "stateMutability": "nonpayable", "type": "function", "name": "add_collateral", "inputs": [{ "name": "collateral", "type": "uint256" }, { "name": "_for", "type": "address" }], "outputs": [] }, { "stateMutability": "nonpayable", "type": "function", "name": "remove_collateral", "inputs": [{ "name": "collateral", "type": "uint256" }], "outputs": [] }, { "stateMutability": "nonpayable", "type": "function", "name": "remove_collateral", "inputs": [{ "name": "collateral", "type": "uint256" }, { "name": "use_eth", "type": "bool" }], "outputs": [] }, { "stateMutability": "nonpayable", "type": "function", "name": "borrow_more", "inputs": [{ "name": "collateral", "type": "uint256" }, { "name": "debt", "type": "uint256" }], "outputs": [] }, { "stateMutability": "nonpayable", "type": "function", "name": "borrow_more_extended", "inputs": [{ "name": "collateral", "type": "uint256" }, { "name": "debt", "type": "uint256" }, { "name": "callbacker", "type": "address" }, { "name": "callback_args", "type": "uint256[]" }], "outputs": [] }, { "stateMutability": "nonpayable", "type": "function", "name": "repay", "inputs": [{ "name": "_d_debt", "type": "uint256" }], "outputs": [] }, { "stateMutability": "nonpayable", "type": "function", "name": "repay", "inputs": [{ "name": "_d_debt", "type": "uint256" }, { "name": "_for", "type": "address" }], "outputs": [] }, { "stateMutability": "nonpayable", "type": "function", "name": "repay", "inputs": [{ "name": "_d_debt", "type": "uint256" }, { "name": "_for", "type": "address" }, { "name": "max_active_band", "type": "int256" }], "outputs": [] }, { "stateMutability": "nonpayable", "type": "function", "name": "repay", "inputs": [{ "name": "_d_debt", "type": "uint256" }, { "name": "_for", "type": "address" }, { "name": "max_active_band", "type": "int256" }, { "name": "use_eth", "type": "bool" }], "outputs": [] }, { "stateMutability": "nonpayable", "type": "function", "name": "repay_extended", "inputs": [{ "name": "callbacker", "type": "address" }, { "name": "callback_args", "type": "uint256[]" }], "outputs": [] }, { "stateMutability": "view", "type": "function", "name": "health_calculator", "inputs": [{ "name": "user", "type": "address" }, { "name": "d_collateral", "type": "int256" }, { "name": "d_debt", "type": "int256" }, { "name": "full", "type": "bool" }], "outputs": [{ "name": "", "type": "int256" }] }, { "stateMutability": "view", "type": "function", "name": "health_calculator", "inputs": [{ "name": "user", "type": "address" }, { "name": "d_collateral", "type": "int256" }, { "name": "d_debt", "type": "int256" }, { "name": "full", "type": "bool" }, { "name": "N", "type": "uint256" }], "outputs": [{ "name": "", "type": "int256" }] }, { "stateMutability": "nonpayable", "type": "function", "name": "liquidate", "inputs": [{ "name": "user", "type": "address" }, { "name": "min_x", "type": "uint256" }], "outputs": [] }, { "stateMutability": "nonpayable", "type": "function", "name": "liquidate", "inputs": [{ "name": "user", "type": "address" }, { "name": "min_x", "type": "uint256" }, { "name": "use_eth", "type": "bool" }], "outputs": [] }, { "stateMutability": "nonpayable", "type": "function", "name": "liquidate_extended", "inputs": [{ "name": "user", "type": "address" }, { "name": "min_x", "type": "uint256" }, { "name": "frac", "type": "uint256" }, { "name": "use_eth", "type": "bool" }, { "name": "callbacker", "type": "address" }, { "name": "callback_args", "type": "uint256[]" }], "outputs": [] }, { "stateMutability": "view", "type": "function", "name": "tokens_to_liquidate", "inputs": [{ "name": "user", "type": "address" }], "outputs": [{ "name": "", "type": "uint256" }] }, { "stateMutability": "view", "type": "function", "name": "tokens_to_liquidate", "inputs": [{ "name": "user", "type": "address" }, { "name": "frac", "type": "uint256" }], "outputs": [{ "name": "", "type": "uint256" }] }, { "stateMutability": "view", "type": "function", "name": "health", "inputs": [{ "name": "user", "type": "address" }], "outputs": [{ "name": "", "type": "int256" }] }, { "stateMutability": "view", "type": "function", "name": "health", "inputs": [{ "name": "user", "type": "address" }, { "name": "full", "type": "bool" }], "outputs": [{ "name": "", "type": "int256" }] }, { "stateMutability": "view", "type": "function", "name": "users_to_liquidate", "inputs": [], "outputs": [{ "name": "", "type": "tuple[]", "components": [{ "name": "user", "type": "address" }, { "name": "x", "type": "uint256" }, { "name": "y", "type": "uint256" }, { "name": "debt", "type": "uint256" }, { "name": "health", "type": "int256" }] }] }, { "stateMutability": "view", "type": "function", "name": "users_to_liquidate", "inputs": [{ "name": "_from", "type": "uint256" }], "outputs": [{ "name": "", "type": "tuple[]", "components": [{ "name": "user", "type": "address" }, { "name": "x", "type": "uint256" }, { "name": "y", "type": "uint256" }, { "name": "debt", "type": "uint256" }, { "name": "health", "type": "int256" }] }] }, { "stateMutability": "view", "type": "function", "name": "users_to_liquidate", "inputs": [{ "name": "_from", "type": "uint256" }, { "name": "_limit", "type": "uint256" }], "outputs": [{ "name": "", "type": "tuple[]", "components": [{ "name": "user", "type": "address" }, { "name": "x", "type": "uint256" }, { "name": "y", "type": "uint256" }, { "name": "debt", "type": "uint256" }, { "name": "health", "type": "int256" }] }] }, { "stateMutability": "view", "type": "function", "name": "amm_price", "inputs": [], "outputs": [{ "name": "", "type": "uint256" }] }, { "stateMutability": "view", "type": "function", "name": "user_prices", "inputs": [{ "name": "user", "type": "address" }], "outputs": [{ "name": "", "type": "uint256[2]" }] }, { "stateMutability": "view", "type": "function", "name": "user_state", "inputs": [{ "name": "user", "type": "address" }], "outputs": [{ "name": "", "type": "uint256[4]" }] }, { "stateMutability": "nonpayable", "type": "function", "name": "set_amm_fee", "inputs": [{ "name": "fee", "type": "uint256" }], "outputs": [] }, { "stateMutability": "nonpayable", "type": "function", "name": "set_amm_admin_fee", "inputs": [{ "name": "fee", "type": "uint256" }], "outputs": [] }, { "stateMutability": "nonpayable", "type": "function", "name": "set_monetary_policy", "inputs": [{ "name": "monetary_policy", "type": "address" }], "outputs": [] }, { "stateMutability": "nonpayable", "type": "function", "name": "set_borrowing_discounts", "inputs": [{ "name": "loan_discount", "type": "uint256" }, { "name": "liquidation_discount", "type": "uint256" }], "outputs": [] }, { "stateMutability": "nonpayable", "type": "function", "name": "set_callback", "inputs": [{ "name": "cb", "type": "address" }], "outputs": [] }, { "stateMutability": "view", "type": "function", "name": "admin_fees", "inputs": [], "outputs": [{ "name": "", "type": "uint256" }] }, { "stateMutability": "nonpayable", "type": "function", "name": "collect_fees", "inputs": [], "outputs": [{ "name": "", "type": "uint256" }] }, { "stateMutability": "view", "type": "function", "name": "check_lock", "inputs": [], "outputs": [{ "name": "", "type": "bool" }] }, { "stateMutability": "view", "type": "function", "name": "liquidation_discounts", "inputs": [{ "name": "arg0", "type": "address" }], "outputs": [{ "name": "", "type": "uint256" }] }, { "stateMutability": "view", "type": "function", "name": "loans", "inputs": [{ "name": "arg0", "type": "uint256" }], "outputs": [{ "name": "", "type": "address" }] }, { "stateMutability": "view", "type": "function", "name": "loan_ix", "inputs": [{ "name": "arg0", "type": "address" }], "outputs": [{ "name": "", "type": "uint256" }] }, { "stateMutability": "view", "type": "function", "name": "n_loans", "inputs": [], "outputs": [{ "name": "", "type": "uint256" }] }, { "stateMutability": "view", "type": "function", "name": "minted", "inputs": [], "outputs": [{ "name": "", "type": "uint256" }] }, { "stateMutability": "view", "type": "function", "name": "redeemed", "inputs": [], "outputs": [{ "name": "", "type": "uint256" }] }, { "stateMutability": "view", "type": "function", "name": "monetary_policy", "inputs": [], "outputs": [{ "name": "", "type": "address" }] }, { "stateMutability": "view", "type": "function", "name": "liquidation_discount", "inputs": [], "outputs": [{ "name": "", "type": "uint256" }] }, { "stateMutability": "view", "type": "function", "name": "loan_discount", "inputs": [], "outputs": [{ "name": "", "type": "uint256" }] }],
1031
1031
  "networks": {}
1032
1032
  },
1033
- "EulerV2View": {
1034
- "abi": [{ "inputs": [], "name": "USD", "outputs": [{ "internalType": "address", "name": "", "type": "address" }], "stateMutability": "view", "type": "function" }, { "inputs": [], "name": "feedRegistry", "outputs": [{ "internalType": "contract IFeedRegistry", "name": "", "type": "address" }], "stateMutability": "view", "type": "function" }, { "inputs": [{ "internalType": "address", "name": "_account", "type": "address" }, { "internalType": "uint256", "name": "_page", "type": "uint256" }, { "internalType": "uint256", "name": "_perPage", "type": "uint256" }], "name": "fetchUsedAccounts", "outputs": [{ "internalType": "address", "name": "owner", "type": "address" }, { "internalType": "address[]", "name": "accounts", "type": "address[]" }], "stateMutability": "view", "type": "function" }, { "inputs": [{ "internalType": "address", "name": "_tokenAddr", "type": "address" }], "name": "getAaveTokenPriceInETH", "outputs": [{ "internalType": "uint256", "name": "price", "type": "uint256" }], "stateMutability": "view", "type": "function" }, { "inputs": [{ "internalType": "address", "name": "_tokenAddr", "type": "address" }], "name": "getAaveTokenPriceInUSD", "outputs": [{ "internalType": "uint256", "name": "", "type": "uint256" }], "stateMutability": "view", "type": "function" }, { "inputs": [{ "internalType": "address", "name": "_tokenAddr", "type": "address" }], "name": "getAaveV3TokenPriceInETH", "outputs": [{ "internalType": "uint256", "name": "", "type": "uint256" }], "stateMutability": "view", "type": "function" }, { "inputs": [{ "internalType": "address", "name": "_tokenAddr", "type": "address" }], "name": "getAaveV3TokenPriceInUSD", "outputs": [{ "internalType": "uint256", "name": "price", "type": "uint256" }], "stateMutability": "view", "type": "function" }, { "inputs": [{ "internalType": "address", "name": "_inputTokenAddr", "type": "address" }], "name": "getAddrForChainlinkOracle", "outputs": [{ "internalType": "address", "name": "tokenAddrForChainlinkUsage", "type": "address" }], "stateMutability": "pure", "type": "function" }, { "inputs": [{ "components": [{ "internalType": "address", "name": "vault", "type": "address" }, { "internalType": "bool", "name": "isBorrowOperation", "type": "bool" }, { "internalType": "uint256", "name": "liquidityAdded", "type": "uint256" }, { "internalType": "uint256", "name": "liquidityRemoved", "type": "uint256" }], "internalType": "struct EulerV2View.LiquidityChangeParams[]", "name": "params", "type": "tuple[]" }], "name": "getApyAfterValuesEstimation", "outputs": [{ "internalType": "uint256[]", "name": "estimatedBorrowRates", "type": "uint256[]" }], "stateMutability": "nonpayable", "type": "function" }, { "inputs": [{ "internalType": "address", "name": "_inputTokenAddr", "type": "address" }], "name": "getChainlinkPriceInETH", "outputs": [{ "internalType": "int256", "name": "chainlinkPriceInETH", "type": "int256" }], "stateMutability": "view", "type": "function" }, { "inputs": [{ "internalType": "address", "name": "_inputTokenAddr", "type": "address" }, { "internalType": "bool", "name": "_useFallback", "type": "bool" }], "name": "getChainlinkPriceInUSD", "outputs": [{ "internalType": "int256", "name": "chainlinkPriceInUSD", "type": "int256" }], "stateMutability": "view", "type": "function" }, { "inputs": [{ "internalType": "address", "name": "_inputTokenAddr", "type": "address" }], "name": "getPriceInETH", "outputs": [{ "internalType": "uint256", "name": "", "type": "uint256" }], "stateMutability": "view", "type": "function" }, { "inputs": [{ "internalType": "address", "name": "_inputTokenAddr", "type": "address" }], "name": "getPriceInUSD", "outputs": [{ "internalType": "uint256", "name": "", "type": "uint256" }], "stateMutability": "view", "type": "function" }, { "inputs": [{ "internalType": "address", "name": "_inputTokenAddr", "type": "address" }, { "internalType": "uint80", "name": "_roundId", "type": "uint80" }, { "internalType": "contract IAggregatorV3", "name": "aggregator", "type": "address" }], "name": "getRoundInfo", "outputs": [{ "internalType": "uint256", "name": "", "type": "uint256" }, { "internalType": "uint256", "name": "updateTimestamp", "type": "uint256" }], "stateMutability": "view", "type": "function" }, { "inputs": [{ "internalType": "address", "name": "_inputTokenAddr", "type": "address" }, { "internalType": "uint80", "name": "_roundId", "type": "uint80" }], "name": "getRoundInfo", "outputs": [{ "internalType": "uint256", "name": "", "type": "uint256" }, { "internalType": "uint256", "name": "updateTimestamp", "type": "uint256" }], "stateMutability": "view", "type": "function" }, { "inputs": [{ "internalType": "address", "name": "_tokenAddr", "type": "address" }], "name": "getSparkTokenPriceInETH", "outputs": [{ "internalType": "uint256", "name": "", "type": "uint256" }], "stateMutability": "view", "type": "function" }, { "inputs": [{ "internalType": "address", "name": "_tokenAddr", "type": "address" }], "name": "getSparkTokenPriceInUSD", "outputs": [{ "internalType": "uint256", "name": "price", "type": "uint256" }], "stateMutability": "view", "type": "function" }, { "inputs": [{ "internalType": "address", "name": "_user", "type": "address" }], "name": "getUserData", "outputs": [{ "components": [{ "internalType": "address", "name": "user", "type": "address" }, { "internalType": "address", "name": "owner", "type": "address" }, { "internalType": "bool", "name": "inLockDownMode", "type": "bool" }, { "internalType": "bool", "name": "inPermitDisabledMode", "type": "bool" }, { "internalType": "address", "name": "borrowVault", "type": "address" }, { "internalType": "uint256", "name": "borrowAmountInUnit", "type": "uint256" }, { "internalType": "uint256", "name": "borrowAmountInAsset", "type": "uint256" }, { "components": [{ "internalType": "address", "name": "collateralVault", "type": "address" }, { "internalType": "bool", "name": "usedInBorrow", "type": "bool" }, { "internalType": "uint256", "name": "collateralAmountInUnit", "type": "uint256" }, { "internalType": "uint256", "name": "collateralAmountInAsset", "type": "uint256" }, { "internalType": "uint256", "name": "collateralAmountInUSD", "type": "uint256" }], "internalType": "struct EulerV2View.UserCollateralInfo[]", "name": "collaterals", "type": "tuple[]" }], "internalType": "struct EulerV2View.UserData", "name": "data", "type": "tuple" }], "stateMutability": "view", "type": "function" }, { "inputs": [{ "internalType": "address[]", "name": "_users", "type": "address[]" }], "name": "getUsersData", "outputs": [{ "components": [{ "internalType": "address", "name": "user", "type": "address" }, { "internalType": "address", "name": "owner", "type": "address" }, { "internalType": "bool", "name": "inLockDownMode", "type": "bool" }, { "internalType": "bool", "name": "inPermitDisabledMode", "type": "bool" }, { "internalType": "address", "name": "borrowVault", "type": "address" }, { "internalType": "uint256", "name": "borrowAmountInUnit", "type": "uint256" }, { "internalType": "uint256", "name": "borrowAmountInAsset", "type": "uint256" }, { "components": [{ "internalType": "address", "name": "collateralVault", "type": "address" }, { "internalType": "bool", "name": "usedInBorrow", "type": "bool" }, { "internalType": "uint256", "name": "collateralAmountInUnit", "type": "uint256" }, { "internalType": "uint256", "name": "collateralAmountInAsset", "type": "uint256" }, { "internalType": "uint256", "name": "collateralAmountInUSD", "type": "uint256" }], "internalType": "struct EulerV2View.UserCollateralInfo[]", "name": "collaterals", "type": "tuple[]" }], "internalType": "struct EulerV2View.UserData[]", "name": "data", "type": "tuple[]" }], "stateMutability": "view", "type": "function" }, { "inputs": [{ "internalType": "address", "name": "_vault", "type": "address" }], "name": "getVaultCollaterals", "outputs": [{ "components": [{ "internalType": "address", "name": "vaultAddr", "type": "address" }, { "internalType": "address", "name": "assetAddr", "type": "address" }, { "internalType": "string", "name": "vaultSymbol", "type": "string" }, { "internalType": "uint256", "name": "decimals", "type": "uint256" }, { "internalType": "uint256", "name": "sharePriceInUnit", "type": "uint256" }, { "internalType": "uint256", "name": "assetPriceInUnit", "type": "uint256" }, { "internalType": "uint256", "name": "cash", "type": "uint256" }, { "internalType": "uint256", "name": "totalBorrows", "type": "uint256" }, { "internalType": "uint256", "name": "supplyCap", "type": "uint256" }, { "internalType": "uint16", "name": "borrowLTV", "type": "uint16" }, { "internalType": "uint16", "name": "liquidationLTV", "type": "uint16" }, { "internalType": "uint16", "name": "initialLiquidationLTV", "type": "uint16" }, { "internalType": "uint48", "name": "targetTimestamp", "type": "uint48" }, { "internalType": "uint32", "name": "rampDuration", "type": "uint32" }, { "internalType": "uint256", "name": "interestFee", "type": "uint256" }, { "internalType": "uint256", "name": "interestRate", "type": "uint256" }], "internalType": "struct EulerV2View.CollateralInfo[]", "name": "collateralsInfo", "type": "tuple[]" }], "stateMutability": "view", "type": "function" }, { "inputs": [{ "internalType": "address", "name": "_vault", "type": "address" }], "name": "getVaultInfoFull", "outputs": [{ "components": [{ "internalType": "address", "name": "vaultAddr", "type": "address" }, { "internalType": "address", "name": "assetAddr", "type": "address" }, { "internalType": "string", "name": "name", "type": "string" }, { "internalType": "string", "name": "symbol", "type": "string" }, { "internalType": "uint256", "name": "decimals", "type": "uint256" }, { "internalType": "uint256", "name": "totalSupplyShares", "type": "uint256" }, { "internalType": "uint256", "name": "cash", "type": "uint256" }, { "internalType": "uint256", "name": "totalBorrows", "type": "uint256" }, { "internalType": "uint256", "name": "totalAssets", "type": "uint256" }, { "internalType": "uint256", "name": "supplyCap", "type": "uint256" }, { "internalType": "uint256", "name": "borrowCap", "type": "uint256" }, { "components": [{ "internalType": "address", "name": "vaultAddr", "type": "address" }, { "internalType": "address", "name": "assetAddr", "type": "address" }, { "internalType": "string", "name": "vaultSymbol", "type": "string" }, { "internalType": "uint256", "name": "decimals", "type": "uint256" }, { "internalType": "uint256", "name": "sharePriceInUnit", "type": "uint256" }, { "internalType": "uint256", "name": "assetPriceInUnit", "type": "uint256" }, { "internalType": "uint256", "name": "cash", "type": "uint256" }, { "internalType": "uint256", "name": "totalBorrows", "type": "uint256" }, { "internalType": "uint256", "name": "supplyCap", "type": "uint256" }, { "internalType": "uint16", "name": "borrowLTV", "type": "uint16" }, { "internalType": "uint16", "name": "liquidationLTV", "type": "uint16" }, { "internalType": "uint16", "name": "initialLiquidationLTV", "type": "uint16" }, { "internalType": "uint48", "name": "targetTimestamp", "type": "uint48" }, { "internalType": "uint32", "name": "rampDuration", "type": "uint32" }, { "internalType": "uint256", "name": "interestFee", "type": "uint256" }, { "internalType": "uint256", "name": "interestRate", "type": "uint256" }], "internalType": "struct EulerV2View.CollateralInfo[]", "name": "collaterals", "type": "tuple[]" }, { "internalType": "uint16", "name": "maxLiquidationDiscount", "type": "uint16" }, { "internalType": "uint256", "name": "liquidationCoolOffTime", "type": "uint256" }, { "internalType": "bool", "name": "badDebtSocializationEnabled", "type": "bool" }, { "internalType": "address", "name": "unitOfAccount", "type": "address" }, { "internalType": "uint256", "name": "unitOfAccountInUsd", "type": "uint256" }, { "internalType": "address", "name": "oracle", "type": "address" }, { "internalType": "uint256", "name": "assetPriceInUnit", "type": "uint256" }, { "internalType": "uint256", "name": "sharePriceInUnit", "type": "uint256" }, { "internalType": "uint256", "name": "interestRate", "type": "uint256" }, { "internalType": "address", "name": "irm", "type": "address" }, { "internalType": "address", "name": "balanceTrackerAddress", "type": "address" }, { "internalType": "address", "name": "creator", "type": "address" }, { "internalType": "address", "name": "governorAdmin", "type": "address" }, { "internalType": "uint256", "name": "interestFee", "type": "uint256" }], "internalType": "struct EulerV2View.VaultInfoFull", "name": "data", "type": "tuple" }], "stateMutability": "view", "type": "function" }, { "inputs": [{ "internalType": "address[]", "name": "_vaults", "type": "address[]" }], "name": "getVaultsInfosFull", "outputs": [{ "components": [{ "internalType": "address", "name": "vaultAddr", "type": "address" }, { "internalType": "address", "name": "assetAddr", "type": "address" }, { "internalType": "string", "name": "name", "type": "string" }, { "internalType": "string", "name": "symbol", "type": "string" }, { "internalType": "uint256", "name": "decimals", "type": "uint256" }, { "internalType": "uint256", "name": "totalSupplyShares", "type": "uint256" }, { "internalType": "uint256", "name": "cash", "type": "uint256" }, { "internalType": "uint256", "name": "totalBorrows", "type": "uint256" }, { "internalType": "uint256", "name": "totalAssets", "type": "uint256" }, { "internalType": "uint256", "name": "supplyCap", "type": "uint256" }, { "internalType": "uint256", "name": "borrowCap", "type": "uint256" }, { "components": [{ "internalType": "address", "name": "vaultAddr", "type": "address" }, { "internalType": "address", "name": "assetAddr", "type": "address" }, { "internalType": "string", "name": "vaultSymbol", "type": "string" }, { "internalType": "uint256", "name": "decimals", "type": "uint256" }, { "internalType": "uint256", "name": "sharePriceInUnit", "type": "uint256" }, { "internalType": "uint256", "name": "assetPriceInUnit", "type": "uint256" }, { "internalType": "uint256", "name": "cash", "type": "uint256" }, { "internalType": "uint256", "name": "totalBorrows", "type": "uint256" }, { "internalType": "uint256", "name": "supplyCap", "type": "uint256" }, { "internalType": "uint16", "name": "borrowLTV", "type": "uint16" }, { "internalType": "uint16", "name": "liquidationLTV", "type": "uint16" }, { "internalType": "uint16", "name": "initialLiquidationLTV", "type": "uint16" }, { "internalType": "uint48", "name": "targetTimestamp", "type": "uint48" }, { "internalType": "uint32", "name": "rampDuration", "type": "uint32" }, { "internalType": "uint256", "name": "interestFee", "type": "uint256" }, { "internalType": "uint256", "name": "interestRate", "type": "uint256" }], "internalType": "struct EulerV2View.CollateralInfo[]", "name": "collaterals", "type": "tuple[]" }, { "internalType": "uint16", "name": "maxLiquidationDiscount", "type": "uint16" }, { "internalType": "uint256", "name": "liquidationCoolOffTime", "type": "uint256" }, { "internalType": "bool", "name": "badDebtSocializationEnabled", "type": "bool" }, { "internalType": "address", "name": "unitOfAccount", "type": "address" }, { "internalType": "uint256", "name": "unitOfAccountInUsd", "type": "uint256" }, { "internalType": "address", "name": "oracle", "type": "address" }, { "internalType": "uint256", "name": "assetPriceInUnit", "type": "uint256" }, { "internalType": "uint256", "name": "sharePriceInUnit", "type": "uint256" }, { "internalType": "uint256", "name": "interestRate", "type": "uint256" }, { "internalType": "address", "name": "irm", "type": "address" }, { "internalType": "address", "name": "balanceTrackerAddress", "type": "address" }, { "internalType": "address", "name": "creator", "type": "address" }, { "internalType": "address", "name": "governorAdmin", "type": "address" }, { "internalType": "uint256", "name": "interestFee", "type": "uint256" }], "internalType": "struct EulerV2View.VaultInfoFull[]", "name": "data", "type": "tuple[]" }], "stateMutability": "view", "type": "function" }, { "inputs": [{ "internalType": "int256", "name": "_btcPrice", "type": "int256" }], "name": "getWBtcPrice", "outputs": [{ "internalType": "int256", "name": "wBtcPrice", "type": "int256" }], "stateMutability": "view", "type": "function" }, { "inputs": [{ "internalType": "int256", "name": "_stEthPrice", "type": "int256" }], "name": "getWStEthPrice", "outputs": [{ "internalType": "int256", "name": "wStEthPrice", "type": "int256" }], "stateMutability": "view", "type": "function" }],
1035
- "networks": {
1036
- "1": { "address": "0x25eCA04532C085F77Ea6CE92C94E9e69896686E6" }
1037
- }
1038
- }
1039
1033
  };
@@ -45,4 +45,3 @@ export declare const USDCPriceFeedContract: (web3: Web3, network: NetworkNumber,
45
45
  export declare const FeedRegistryContract: (web3: Web3, network: NetworkNumber, block?: Blockish) => ContractTypes.FeedRegistry;
46
46
  export declare const MorphoBlueViewContract: (web3: Web3, network: NetworkNumber, block?: Blockish) => ContractTypes.MorphoBlueView;
47
47
  export declare const LlamaLendViewContract: (web3: Web3, network: NetworkNumber, block?: Blockish) => ContractTypes.LlamaLendView;
48
- export declare const EulerV2ViewContract: (web3: Web3, network: NetworkNumber, block?: Blockish) => ContractTypes.EulerV2View;
package/esm/contracts.js CHANGED
@@ -77,4 +77,3 @@ export const USDCPriceFeedContract = createContractFromConfigFunc('USDCPriceFeed
77
77
  export const FeedRegistryContract = createContractFromConfigFunc('FeedRegistry');
78
78
  export const MorphoBlueViewContract = createContractFromConfigFunc('MorphoBlueView');
79
79
  export const LlamaLendViewContract = createContractFromConfigFunc('LlamaLendView');
80
- export const EulerV2ViewContract = createContractFromConfigFunc('EulerV2View');
@@ -6,4 +6,3 @@ export * as makerHelpers from './makerHelpers';
6
6
  export * as chickenBondsHelpers from './chickenBondsHelpers';
7
7
  export * as morphoBlueHelpers from './morphoBlueHelpers';
8
8
  export * as llamaLendHelpers from './llamaLendHelpers';
9
- export * as eulerV2Helpers from './eulerHelpers';
@@ -6,4 +6,3 @@ export * as makerHelpers from './makerHelpers';
6
6
  export * as chickenBondsHelpers from './chickenBondsHelpers';
7
7
  export * as morphoBlueHelpers from './morphoBlueHelpers';
8
8
  export * as llamaLendHelpers from './llamaLendHelpers';
9
- export * as eulerV2Helpers from './eulerHelpers';
package/esm/index.d.ts CHANGED
@@ -18,6 +18,5 @@ import * as chickenBonds from './chickenBonds';
18
18
  import * as exchange from './exchange';
19
19
  import * as morphoBlue from './morphoBlue';
20
20
  import * as llamaLend from './llamaLend';
21
- import * as eulerV2 from './eulerV2';
22
21
  export * from './types';
23
- export { aaveV2, aaveV3, morphoAaveV2, morphoAaveV3, compoundV2, compoundV3, spark, curveUsd, liquity, maker, chickenBonds, exchange, staking, multicall, moneymarket, markets, helpers, morphoBlue, llamaLend, eulerV2, };
22
+ export { aaveV2, aaveV3, morphoAaveV2, morphoAaveV3, compoundV2, compoundV3, spark, curveUsd, liquity, maker, chickenBonds, exchange, staking, multicall, moneymarket, markets, helpers, morphoBlue, llamaLend, };
package/esm/index.js CHANGED
@@ -18,6 +18,5 @@ import * as chickenBonds from './chickenBonds';
18
18
  import * as exchange from './exchange';
19
19
  import * as morphoBlue from './morphoBlue';
20
20
  import * as llamaLend from './llamaLend';
21
- import * as eulerV2 from './eulerV2';
22
21
  export * from './types';
23
- export { aaveV2, aaveV3, morphoAaveV2, morphoAaveV3, compoundV2, compoundV3, spark, curveUsd, liquity, maker, chickenBonds, exchange, staking, multicall, moneymarket, markets, helpers, morphoBlue, llamaLend, eulerV2, };
22
+ export { aaveV2, aaveV3, morphoAaveV2, morphoAaveV3, compoundV2, compoundV3, spark, curveUsd, liquity, maker, chickenBonds, exchange, staking, multicall, moneymarket, markets, helpers, morphoBlue, llamaLend, };
@@ -4,7 +4,7 @@ export const compoundV2CollateralAssets = [
4
4
  'cETH', 'cDAI', 'cBAT', 'cZRX', 'cUSDC', 'cWBTC Legacy', 'cWBTC', 'cUSDT',
5
5
  'cTUSD', 'cLINK', 'cUSDP', 'cUNI', 'cCOMP', 'cMKR', 'cSUSHI', 'cAAVE', 'cYFI',
6
6
  ].map((symbol) => getAssetInfo(symbol));
7
- export const v3USDCCollAssetsEth = ['COMP', 'WBTC', 'ETH', 'UNI', 'LINK', 'wstETH', 'cbBTC', 'rswETH'];
7
+ export const v3USDCCollAssetsEth = ['COMP', 'WBTC', 'ETH', 'UNI', 'LINK', 'wstETH', 'cbBTC', 'tBTC'];
8
8
  export const v3USDCCollAssetsArb = ['ARB', 'ETH', 'GMX', 'WBTC', 'wstETH', 'ezETH'];
9
9
  export const v3USDCCollAssetsBase = ['ETH', 'cbETH', 'wstETH', 'cbBTC'];
10
10
  export const v3USDCCollAssetsOpt = ['ETH', 'OP', 'WBTC', 'wstETH'];
@@ -23,7 +23,7 @@ export const v3USDCeCollAssets = {
23
23
  [NetworkNumber.Arb]: v3USDCeCollAssetsArb,
24
24
  [NetworkNumber.Base]: [],
25
25
  };
26
- export const v3ETHCollAssetsEth = ['cbETH', 'wstETH', 'rETH', 'rsETH', 'weETH', 'osETH', 'WBTC', 'ezETH', 'cbBTC', 'rswETH'];
26
+ export const v3ETHCollAssetsEth = ['cbETH', 'wstETH', 'rETH', 'rsETH', 'weETH', 'osETH', 'WBTC', 'ezETH', 'cbBTC', 'rswETH', 'tBTC'];
27
27
  export const v3ETHCollAssetsBase = ['cbETH', 'ezETH', 'wstETH', 'USDC', 'weETH', 'wrsETH', 'cbBTC'];
28
28
  export const v3ETHCollAssetsArb = ['weETH', 'rETH', 'wstETH', 'WBTC', 'rsETH', 'ezETH', 'USDC', 'USDT'];
29
29
  export const v3ETHCollAssetsOpt = ['rETH', 'wstETH', 'WBTC', 'ezETH', 'USDC', 'USDT', 'weETH', 'wrsETH'];
@@ -42,7 +42,7 @@ export const v3USDbCCollAssets = {
42
42
  [NetworkNumber.Arb]: [],
43
43
  [NetworkNumber.Base]: v3USDbCCollAssetsBase,
44
44
  };
45
- export const v3USDTCollAssetsEth = ['ETH', 'WBTC', 'wstETH', 'COMP', 'UNI', 'LINK', 'cbBTC'];
45
+ export const v3USDTCollAssetsEth = ['COMP', 'ETH', 'WBTC', 'UNI', 'LINK', 'wstETH', 'cbBTC', 'tBTC'];
46
46
  export const v3USDTCollAssetsArb = ['ETH', 'WBTC', 'wstETH', 'ARB', 'GMX'];
47
47
  export const v3USDTCollAssetsOpt = ['ETH', 'WBTC', 'OP', 'wstETH'];
48
48
  // @dev Keep assets in array, do not assign directly, so we can parse it and edit it programmatically with `scripts/updateMarkets`
@@ -4,4 +4,3 @@ export { SparkMarkets } from './spark';
4
4
  export { CrvUsdMarkets } from './curveUsd';
5
5
  export { MorphoBlueMarkets, findMorphoBlueMarket } from './morphoBlue';
6
6
  export { LlamaLendMarkets } from './llamaLend';
7
- export { EulerV2Markets } from './euler';
@@ -4,4 +4,3 @@ export { SparkMarkets } from './spark';
4
4
  export { CrvUsdMarkets } from './curveUsd';
5
5
  export { MorphoBlueMarkets, findMorphoBlueMarket } from './morphoBlue';
6
6
  export { LlamaLendMarkets } from './llamaLend';
7
- export { EulerV2Markets } from './euler';
@@ -30,6 +30,7 @@ export declare const MORPHO_BLUE_USDE_DAI_770: (networkId?: NetworkNumber) => Mo
30
30
  export declare const MORPHO_BLUE_USDE_DAI_860: (networkId?: NetworkNumber) => MorphoBlueMarketData;
31
31
  export declare const MORPHO_BLUE_USDE_DAI_915: (networkId?: NetworkNumber) => MorphoBlueMarketData;
32
32
  export declare const MORPHO_BLUE_USDE_DAI_945: (networkId?: NetworkNumber) => MorphoBlueMarketData;
33
+ export declare const MORPHO_BLUE_RETH_ETH_945: (networkId?: NetworkNumber) => MorphoBlueMarketData;
33
34
  export declare const MORPHO_BLUE_CBETH_USDC_860_BASE: (networkId?: NetworkNumber) => MorphoBlueMarketData;
34
35
  export declare const MORPHO_BLUE_WSTETH_ETH_945_BASE: (networkId?: NetworkNumber) => MorphoBlueMarketData;
35
36
  export declare const MORPHO_BLUE_WSTETH_ETH_965_BASE: (networkId?: NetworkNumber) => MorphoBlueMarketData;
@@ -41,6 +42,7 @@ export declare const MORPHO_BLUE_RETH_USDC_860_BASE: (networkId?: NetworkNumber)
41
42
  export declare const MORPHO_BLUE_RETH_ETH_945_BASE: (networkId?: NetworkNumber) => MorphoBlueMarketData;
42
43
  export declare const MORPHO_BLUE_CBBTC_ETH_915_BASE: (networkId?: NetworkNumber) => MorphoBlueMarketData;
43
44
  export declare const MORPHO_BLUE_CBBTC_USDC_860_BASE: (networkId?: NetworkNumber) => MorphoBlueMarketData;
45
+ export declare const MORPHO_BLUE_WSUPEROETHB_WETH_915_BASE: (networkId?: NetworkNumber) => MorphoBlueMarketData;
44
46
  export declare const MorphoBlueMarkets: (networkId: NetworkNumber) => {
45
47
  readonly morphobluewstethusdc: MorphoBlueMarketData;
46
48
  readonly morphobluesdaiusdc: MorphoBlueMarketData;
@@ -61,6 +63,7 @@ export declare const MorphoBlueMarkets: (networkId: NetworkNumber) => {
61
63
  readonly morphobluetbtcusdc: MorphoBlueMarketData;
62
64
  readonly morphobluecbbtceth: MorphoBlueMarketData;
63
65
  readonly morphobluecbbtcusdc: MorphoBlueMarketData;
66
+ readonly morphoblueretheth_945: MorphoBlueMarketData;
64
67
  readonly morphobluewstetheth_945: MorphoBlueMarketData;
65
68
  readonly morphobluewstetheth_945_exchange_rate: MorphoBlueMarketData;
66
69
  readonly morphobluewstetheth_965_exchange_rate: MorphoBlueMarketData;
@@ -79,6 +82,7 @@ export declare const MorphoBlueMarkets: (networkId: NetworkNumber) => {
79
82
  readonly morphoblueretheth_945_base: MorphoBlueMarketData;
80
83
  readonly morphobluecbbtceth_915_base: MorphoBlueMarketData;
81
84
  readonly morphobluecbbtcusdc_860_base: MorphoBlueMarketData;
85
+ readonly morphobluewsuperoethbweth_915_base: MorphoBlueMarketData;
82
86
  readonly morphobluecbetheth_945_base: MorphoBlueMarketData;
83
87
  readonly morphobluecbetheth_965_base: MorphoBlueMarketData;
84
88
  readonly morphobluewstetheth_945_base: MorphoBlueMarketData;
@@ -454,6 +454,21 @@ export const MORPHO_BLUE_USDE_DAI_945 = (networkId = NetworkNumber.Eth) => ({
454
454
  marketId: '0xdb760246f6859780f6c1b272d47a8f64710777121118e56e0cdb4b8b744a3094',
455
455
  protocolName: 'morpho-blue',
456
456
  });
457
+ export const MORPHO_BLUE_RETH_ETH_945 = (networkId = NetworkNumber.Eth) => ({
458
+ chainIds: [1],
459
+ label: 'Morpho',
460
+ shortLabel: 'rETH/ETH',
461
+ value: MorphoBlueVersions.MorphoBlueREthEth_945,
462
+ url: 'retheth-3c83f77b',
463
+ loanToken: '0xC02aaA39b223FE8D0A0e5C4F27eAD9083C756Cc2',
464
+ collateralToken: '0xae78736Cd615f374D3085123A210448E74Fc6393',
465
+ oracle: '0x1b4A3F92e5Fffd1d35A98751c9FE4472483579bB',
466
+ oracleType: MorphoBlueOracleType.MARKET_RATE,
467
+ irm: '0x870aC11D48B15DB9a138Cf899d20F13F79Ba00BC',
468
+ lltv: 0.945,
469
+ marketId: '0x3c83f77bde9541f8d3d82533b19bbc1f97eb2f1098bb991728acbfbede09cc5d',
470
+ protocolName: 'morpho-blue',
471
+ });
457
472
  // BASE
458
473
  export const MORPHO_BLUE_CBETH_USDC_860_BASE = (networkId = NetworkNumber.Eth) => ({
459
474
  chainIds: [NetworkNumber.Base],
@@ -620,6 +635,21 @@ export const MORPHO_BLUE_CBBTC_USDC_860_BASE = (networkId = NetworkNumber.Eth) =
620
635
  marketId: '0x9103c3b4e834476c9a62ea009ba2c884ee42e94e6e314a26f04d312434191836',
621
636
  protocolName: 'morpho-blue',
622
637
  });
638
+ export const MORPHO_BLUE_WSUPEROETHB_WETH_915_BASE = (networkId = NetworkNumber.Eth) => ({
639
+ chainIds: [NetworkNumber.Base],
640
+ label: 'Morpho',
641
+ shortLabel: 'wsuperOETHb/WETH',
642
+ value: MorphoBlueVersions.MorphoBlueWsuperOETHbWETH_915_Base,
643
+ url: 'wsuperoethbweth-144bf18d',
644
+ loanToken: '0x4200000000000000000000000000000000000006',
645
+ collateralToken: '0x7FcD174E80f264448ebeE8c88a7C4476AAF58Ea6',
646
+ oracle: '0x28C964c985fe84736fAdc7Cf0bBd58B54bc7CF93',
647
+ oracleType: MorphoBlueOracleType.MARKET_RATE,
648
+ irm: '0x46415998764C29aB2a25CbeA6254146D50D22687',
649
+ lltv: 0.915,
650
+ marketId: '0x144bf18d6bf4c59602548a825034f73bf1d20177fc5f975fc69d5a5eba929b45',
651
+ protocolName: 'morpho-blue',
652
+ });
623
653
  export const MorphoBlueMarkets = (networkId) => ({
624
654
  [MorphoBlueVersions.MorphoBlueWstEthUSDC]: MORPHO_BLUE_WSTETH_USDC(networkId),
625
655
  [MorphoBlueVersions.MorphoBlueSDAIUSDC]: MORPHO_BLUE_SDAI_USDC(networkId),
@@ -640,6 +670,7 @@ export const MorphoBlueMarkets = (networkId) => ({
640
670
  [MorphoBlueVersions.MorphoBlueTBTCUSDC]: MORPHO_BLUE_TBTC_USDC(networkId),
641
671
  [MorphoBlueVersions.MorphoBlueCbBTCEth_915]: MORPHO_BLUE_CBBTC_ETH_915(networkId),
642
672
  [MorphoBlueVersions.MorphoBlueCbBTCUSDC_860]: MORPHO_BLUE_CBBTC_USDC_860(networkId),
673
+ [MorphoBlueVersions.MorphoBlueREthEth_945]: MORPHO_BLUE_RETH_ETH_945(networkId),
643
674
  // wstETH/WETH
644
675
  [MorphoBlueVersions.MorphoBlueWstEthEth_945]: MORPHO_BLUE_WSTETH_ETH_945(networkId),
645
676
  [MorphoBlueVersions.MorphoBlueWstEthEth_945_Exchange_Rate]: MORPHO_BLUE_WSTETH_ETH_945_EXCHANGE_RATE(networkId),
@@ -662,6 +693,8 @@ export const MorphoBlueMarkets = (networkId) => ({
662
693
  [MorphoBlueVersions.MorphoBlueREthEth_945_Base]: MORPHO_BLUE_RETH_ETH_945_BASE(networkId),
663
694
  [MorphoBlueVersions.MorphoBlueCbBTCEth_915_Base]: MORPHO_BLUE_CBBTC_ETH_915_BASE(networkId),
664
695
  [MorphoBlueVersions.MorphoBlueCbBTCUSDC_860_Base]: MORPHO_BLUE_CBBTC_USDC_860_BASE(networkId),
696
+ // wsuperOETHb/WETH Base
697
+ [MorphoBlueVersions.MorphoBlueWsuperOETHbWETH_915_Base]: MORPHO_BLUE_WSUPEROETHB_WETH_915_BASE(networkId),
665
698
  // cbETH/WETH Base
666
699
  [MorphoBlueVersions.MorphoBlueCbEthEth_945_Base]: MORPHO_BLUE_CBETH_ETH_945_BASE(networkId),
667
700
  [MorphoBlueVersions.MorphoBlueCbEthEth_965_Base]: MORPHO_BLUE_CBETH_ETH_965_BASE(networkId),
@@ -1,5 +1,5 @@
1
1
  import { NetworkNumber } from '../../types/common';
2
- export const sparkAssetsDefaultMarketEth = ['DAI', 'sDAI', 'USDC', 'ETH', 'wstETH', 'WBTC', 'GNO', 'rETH', 'USDT', 'weETH', 'cbBTC'];
2
+ export const sparkAssetsDefaultMarketEth = ['DAI', 'sDAI', 'USDC', 'ETH', 'wstETH', 'WBTC', 'GNO', 'rETH', 'USDT', 'weETH', 'cbBTC', 'sUSDS'];
3
3
  // @dev Keep assets in array, do not assign directly, so we can parse it and edit it programmatically with `scripts/updateMarkets`
4
4
  export const sparkAssetsDefaultMarket = {
5
5
  [NetworkNumber.Eth]: sparkAssetsDefaultMarketEth,
@@ -20,5 +20,3 @@ export declare const bytesToString: (hex: string) => string;
20
20
  */
21
21
  export declare const mapRange: (input: number | string, minInput: number | string, maxInput: number | string, minOutput: number | string, maxOutput: number | string) => number;
22
22
  export declare const isEnabledOnBitmap: (bitmap: number, assetId: number) => bigint;
23
- export declare const MAXUINT: string;
24
- export declare const isMaxuint: (amount: string) => boolean;
@@ -33,5 +33,3 @@ export const mapRange = (input, minInput, maxInput, minOutput, maxOutput) => {
33
33
  };
34
34
  // eslint-disable-next-line no-bitwise
35
35
  export const isEnabledOnBitmap = (bitmap, assetId) => (BigInt(bitmap) >> BigInt(assetId)) & BigInt(1);
36
- export const MAXUINT = '115792089237316195423570985008687907853269984665640564039457584007913129639935';
37
- export const isMaxuint = (amount) => compareAddresses(MAXUINT, amount);
@@ -4,6 +4,7 @@ export declare const getStETHApr: (web3: Web3, fromBlock?: number, blockNumber?:
4
4
  export declare const getCbETHApr: (web3: Web3, blockNumber?: 'latest' | number) => Promise<string>;
5
5
  export declare const getREthApr: (web3: Web3, blockNumber?: 'latest' | number) => Promise<string>;
6
6
  export declare const getDsrApy: (web3: Web3, blockNumber?: 'latest' | number) => Promise<string>;
7
+ export declare const getSsrApy: () => Promise<string>;
7
8
  export declare const STAKING_ASSETS: string[];
8
9
  export declare const getStakingApy: (asset: string, web3: Web3, blockNumber?: 'latest' | number, fromBlock?: number | undefined) => Promise<any> | "0" | undefined;
9
10
  export declare const calculateInterestEarned: (principal: string, interest: string, type: string, apy?: boolean) => number;
@@ -76,13 +76,37 @@ export const getDsrApy = (web3, blockNumber = 'latest') => __awaiter(void 0, voi
76
76
  .mul(100)
77
77
  .toString();
78
78
  });
79
+ export const getSsrApy = () => __awaiter(void 0, void 0, void 0, function* () {
80
+ const res = yield fetch('https://app.defisaver.com/api/sky/data');
81
+ const data = yield res.json();
82
+ return new Dec(data.data.skyData[0].sky_savings_rate_apy).mul(100).toString();
83
+ });
84
+ const getSuperOETHApy = () => __awaiter(void 0, void 0, void 0, function* () {
85
+ console.log('getSuperOETHApy');
86
+ const res = yield fetch('https://origin.squids.live/origin-squid/graphql', {
87
+ method: 'POST',
88
+ headers: {
89
+ 'Content-Type': 'application/json',
90
+ },
91
+ body: JSON.stringify({
92
+ query: '\n query OTokenApy($chainId: Int!, $token: String!) {\n oTokenApies(\n limit: 1\n orderBy: timestamp_DESC\n where: {chainId_eq: $chainId, otoken_containsInsensitive: $token}\n ) {\n apy7DayAvg\n apy14DayAvg\n apy30DayAvg\n apr\n apy\n }\n}\n ',
93
+ variables: {
94
+ token: '0xdbfefd2e8460a6ee4955a68582f85708baea60a3',
95
+ chainId: 8453,
96
+ },
97
+ }),
98
+ });
99
+ const data = yield res.json();
100
+ return new Dec(data.data.oTokenApies[0].apy).mul(100).toString();
101
+ });
79
102
  const getApyFromDfsApi = (asset) => __awaiter(void 0, void 0, void 0, function* () {
80
103
  const res = yield fetch(`https://app.defisaver.com/api/staking/apy?asset=${asset}`);
81
104
  const data = yield res.json();
82
105
  return data.apy;
83
106
  });
84
- export const STAKING_ASSETS = ['cbETH', 'wstETH', 'cbETH', 'rETH', 'sDAI', 'weETH', 'sUSDe', 'osETH', 'ezETH', 'ETHx', 'rsETH', 'pufETH', 'wrsETH'];
107
+ export const STAKING_ASSETS = ['cbETH', 'wstETH', 'cbETH', 'rETH', 'sDAI', 'weETH', 'sUSDe', 'osETH', 'ezETH', 'ETHx', 'rsETH', 'pufETH', 'wrsETH', 'wsuperOETHb', 'sUSDS'];
85
108
  export const getStakingApy = (asset, web3, blockNumber = 'latest', fromBlock = undefined) => {
109
+ console.log('getStakingApy', asset, blockNumber, fromBlock);
86
110
  try {
87
111
  if (asset === 'stETH' || asset === 'wstETH')
88
112
  return getStETHApr(web3, fromBlock, blockNumber);
@@ -106,6 +130,10 @@ export const getStakingApy = (asset, web3, blockNumber = 'latest', fromBlock = u
106
130
  return getApyFromDfsApi('rsETH');
107
131
  if (asset === 'pufETH')
108
132
  return getApyFromDfsApi('pufETH');
133
+ if (asset === 'wsuperOETHb')
134
+ return getSuperOETHApy();
135
+ if (asset === 'sUSDS')
136
+ return getSsrApy();
109
137
  }
110
138
  catch (e) {
111
139
  console.error(`Failed to fetch APY for ${asset}`);
@@ -26,7 +26,6 @@ export type { CompoundLoanInfo } from "./CompoundLoanInfo";
26
26
  export type { Comptroller } from "./Comptroller";
27
27
  export type { ETHPriceFeed } from "./ETHPriceFeed";
28
28
  export type { Erc20 } from "./Erc20";
29
- export type { EulerV2View } from "./EulerV2View";
30
29
  export type { FeedRegistry } from "./FeedRegistry";
31
30
  export type { GHO } from "./GHO";
32
31
  export type { GhoDiscountRateStrategy } from "./GhoDiscountRateStrategy";
@@ -7,4 +7,3 @@ export * from './maker';
7
7
  export * from './chickenBonds';
8
8
  export * from './morphoBlue';
9
9
  export * from './llamaLend';
10
- export * from './euler';
@@ -7,4 +7,3 @@ export * from './maker';
7
7
  export * from './chickenBonds';
8
8
  export * from './morphoBlue';
9
9
  export * from './llamaLend';
10
- export * from './euler';
@@ -9,6 +9,7 @@ export declare enum MorphoBlueVersions {
9
9
  MorphoBlueWstEthUSDA_Exchange_Rate = "morphobluewstethusda_exchange_rate",
10
10
  MorphoBlueWstEthPYUSD = "morphobluwstethpyusd",
11
11
  MorphoBlueWeEthEth = "morphoblueweetheth",
12
+ MorphoBlueREthEth_945 = "morphoblueretheth_945",
12
13
  MorphoBlueWBTCPYUSD = "morphobluewbtcpyusd",
13
14
  MorphoBlueWBTCEth = "morphobluewbtceth",
14
15
  MorphoBlueUSDeUSDT = "morphoblueusdeusdt",
@@ -40,7 +41,8 @@ export declare enum MorphoBlueVersions {
40
41
  MorphoBlueREthUSDC_860_Base = "morphobluerethusdc_860_base",
41
42
  MorphoBlueREthEth_945_Base = "morphoblueretheth_945_base",
42
43
  MorphoBlueCbBTCEth_915_Base = "morphobluecbbtceth_915_base",
43
- MorphoBlueCbBTCUSDC_860_Base = "morphobluecbbtcusdc_860_base"
44
+ MorphoBlueCbBTCUSDC_860_Base = "morphobluecbbtcusdc_860_base",
45
+ MorphoBlueWsuperOETHbWETH_915_Base = "morphobluewsuperoethbweth_915_base"
44
46
  }
45
47
  export declare enum MorphoBlueOracleType {
46
48
  MARKET_RATE = "Market rate",
@@ -10,6 +10,7 @@ export var MorphoBlueVersions;
10
10
  MorphoBlueVersions["MorphoBlueWstEthUSDA_Exchange_Rate"] = "morphobluewstethusda_exchange_rate";
11
11
  MorphoBlueVersions["MorphoBlueWstEthPYUSD"] = "morphobluwstethpyusd";
12
12
  MorphoBlueVersions["MorphoBlueWeEthEth"] = "morphoblueweetheth";
13
+ MorphoBlueVersions["MorphoBlueREthEth_945"] = "morphoblueretheth_945";
13
14
  MorphoBlueVersions["MorphoBlueWBTCPYUSD"] = "morphobluewbtcpyusd";
14
15
  MorphoBlueVersions["MorphoBlueWBTCEth"] = "morphobluewbtceth";
15
16
  MorphoBlueVersions["MorphoBlueUSDeUSDT"] = "morphoblueusdeusdt";
@@ -46,6 +47,7 @@ export var MorphoBlueVersions;
46
47
  MorphoBlueVersions["MorphoBlueREthEth_945_Base"] = "morphoblueretheth_945_base";
47
48
  MorphoBlueVersions["MorphoBlueCbBTCEth_915_Base"] = "morphobluecbbtceth_915_base";
48
49
  MorphoBlueVersions["MorphoBlueCbBTCUSDC_860_Base"] = "morphobluecbbtcusdc_860_base";
50
+ MorphoBlueVersions["MorphoBlueWsuperOETHbWETH_915_Base"] = "morphobluewsuperoethbweth_915_base";
49
51
  })(MorphoBlueVersions || (MorphoBlueVersions = {}));
50
52
  export var MorphoBlueOracleType;
51
53
  (function (MorphoBlueOracleType) {
package/package.json CHANGED
@@ -1,37 +1,42 @@
1
1
  {
2
2
  "name": "@defisaver/positions-sdk",
3
- "version": "0.0.166-dev",
3
+ "version": "0.0.166",
4
4
  "description": "",
5
5
  "main": "./cjs/index.js",
6
6
  "module": "./esm/index.js",
7
7
  "types": "./esm/index.d.ts",
8
8
  "scripts": {
9
9
  "build:esm": "rm -rf esm && tsc -p tsconfig.esm.json",
10
- "build:cjs": "rm -rf cjs && tsc -p tsconfig.json",
10
+ "build:cjs": "rm -rf cjs && tsc -p tsconfig.cjs.json",
11
11
  "build": "npm run lint && npm run generate-contracts && npm run build:cjs && npm run build:esm",
12
12
  "dev": "npm run generate-contracts && tsc -p tsconfig.json --watch",
13
13
  "lint": "eslint src/ --fix",
14
14
  "lint-check": "eslint src/",
15
15
  "generate-contracts": "node scripts/generateContracts.js",
16
16
  "test": "mocha tests/*",
17
- "test-single": "mocha ./tests/$npm_config_name.js",
17
+ "test-single": "mocha ./tests/$npm_config_name.ts",
18
18
  "test:debugger": "mocha --inspect-brk tests/*",
19
- "build-test": "npm run build && npm run test"
19
+ "build-test": "npm run build && npm run test",
20
+ "version-bump": "git commit -am \"Version bump to $(npm version patch | cut -c 2-)\""
20
21
  },
21
22
  "keywords": [],
22
23
  "author": "",
23
24
  "license": "ISC",
24
25
  "dependencies": {
25
- "@defisaver/tokens": "^1.5.37",
26
+ "@defisaver/tokens": "^1.5.45",
26
27
  "@ethersproject/bignumber": "^5.7.0",
27
28
  "@morpho-org/morpho-aave-v3-sdk": "^1.5.3",
28
29
  "decimal.js": "^10.4.3"
29
30
  },
30
31
  "devDependencies": {
31
32
  "@defisaver/eslint-config": "^1.0.1",
33
+ "@types/chai": "^5.0.0",
34
+ "@types/mocha": "^10.0.9",
35
+ "@types/web3": "^1.0.20",
32
36
  "chai": "^4.3.8",
33
37
  "dotenv": "^16.3.1",
34
38
  "eslint": "^8.49.0",
39
+ "eslint-plugin-import": "^2.31.0",
35
40
  "mocha": "^10.2.0",
36
41
  "ts-node": "^10.9.2",
37
42
  "typechain": "^8.3.1",