@defisaver/positions-sdk 0.0.11 → 0.0.13
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/cjs/config/contracts.d.ts +183 -71
- package/cjs/config/contracts.js +16 -0
- package/cjs/markets/curveUsd/index.d.ts +2 -0
- package/cjs/markets/curveUsd/index.js +14 -1
- package/cjs/types/aave.d.ts +1 -1
- package/cjs/types/contracts/generated/CrvUSDtBTCAmm.d.ts +139 -0
- package/cjs/types/contracts/generated/CrvUSDtBTCAmm.js +5 -0
- package/cjs/types/contracts/generated/CrvUSDtBTCController.d.ts +204 -0
- package/cjs/types/contracts/generated/CrvUSDtBTCController.js +5 -0
- package/cjs/types/contracts/generated/index.d.ts +2 -0
- package/cjs/types/curveUsd.d.ts +2 -1
- package/cjs/types/curveUsd.js +1 -0
- package/cjs/types/spark.d.ts +1 -3
- package/esm/config/contracts.d.ts +183 -71
- package/esm/config/contracts.js +16 -0
- package/esm/markets/curveUsd/index.d.ts +2 -0
- package/esm/markets/curveUsd/index.js +12 -0
- package/esm/types/aave.d.ts +1 -1
- package/esm/types/contracts/generated/CrvUSDtBTCAmm.d.ts +139 -0
- package/esm/types/contracts/generated/CrvUSDtBTCAmm.js +4 -0
- package/esm/types/contracts/generated/CrvUSDtBTCController.d.ts +204 -0
- package/esm/types/contracts/generated/CrvUSDtBTCController.js +4 -0
- package/esm/types/contracts/generated/index.d.ts +2 -0
- package/esm/types/curveUsd.d.ts +2 -1
- package/esm/types/curveUsd.js +1 -0
- package/esm/types/spark.d.ts +1 -3
- package/package.json +40 -40
- package/src/aaveV2/index.ts +220 -220
- package/src/aaveV3/index.ts +550 -550
- package/src/assets/index.ts +60 -60
- package/src/chickenBonds/index.ts +123 -123
- package/src/compoundV2/index.ts +206 -206
- package/src/compoundV3/index.ts +269 -269
- package/src/config/contracts.js +635 -619
- package/src/constants/index.ts +3 -3
- package/src/contracts.ts +100 -100
- package/src/curveUsd/index.ts +228 -228
- package/src/exchange/index.ts +17 -17
- package/src/helpers/aaveHelpers/index.ts +134 -134
- package/src/helpers/chickenBondsHelpers/index.ts +23 -23
- package/src/helpers/compoundHelpers/index.ts +181 -181
- package/src/helpers/curveUsdHelpers/index.ts +32 -32
- package/src/helpers/index.ts +5 -5
- package/src/helpers/makerHelpers/index.ts +94 -94
- package/src/helpers/sparkHelpers/index.ts +106 -106
- package/src/index.ts +40 -40
- package/src/liquity/index.ts +103 -103
- package/src/maker/index.ts +101 -101
- package/src/markets/aave/index.ts +80 -80
- package/src/markets/aave/marketAssets.ts +32 -32
- package/src/markets/compound/index.ts +85 -85
- package/src/markets/compound/marketsAssets.ts +35 -35
- package/src/markets/curveUsd/index.ts +56 -42
- package/src/markets/index.ts +3 -3
- package/src/markets/spark/index.ts +29 -29
- package/src/markets/spark/marketAssets.ts +9 -9
- package/src/moneymarket/moneymarketCommonService.ts +75 -75
- package/src/morpho/markets.ts +39 -39
- package/src/morphoAaveV2/index.ts +254 -254
- package/src/morphoAaveV3/index.ts +614 -614
- package/src/multicall/index.ts +22 -22
- package/src/services/dsrService.ts +15 -15
- package/src/services/priceService.ts +21 -21
- package/src/services/utils.ts +34 -34
- package/src/spark/index.ts +413 -413
- package/src/staking/staking.ts +167 -167
- package/src/types/aave.ts +256 -256
- package/src/types/chickenBonds.ts +45 -45
- package/src/types/common.ts +83 -83
- package/src/types/compound.ts +121 -121
- package/src/types/contracts/generated/CrvUSDtBTCAmm.ts +286 -0
- package/src/types/contracts/generated/CrvUSDtBTCController.ts +397 -0
- package/src/types/contracts/generated/index.ts +2 -0
- package/src/types/curveUsd.ts +111 -110
- package/src/types/index.ts +6 -6
- package/src/types/liquity.ts +29 -29
- package/src/types/maker.ts +50 -50
- package/src/types/spark.ts +106 -106
- package/yarn-error.log +64 -0
package/cjs/config/contracts.js
CHANGED
|
@@ -449,6 +449,14 @@ module.exports = {
|
|
|
449
449
|
}
|
|
450
450
|
}
|
|
451
451
|
},
|
|
452
|
+
"crvUSDtBTCController": {
|
|
453
|
+
"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": "payable", "type": "fallback" }, { "stateMutability": "view", "type": "function", "name": "factory", "inputs": [], "outputs": [{ "name": "", "type": "address" }] }, { "stateMutability": "view", "type": "function", "name": "amm", "inputs": [], "outputs": [{ "name": "", "type": "address" }] }, { "stateMutability": "view", "type": "function", "name": "collateral_token", "inputs": [], "outputs": [{ "name": "", "type": "address" }] }, { "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": "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": "payable", "type": "function", "name": "create_loan", "inputs": [{ "name": "collateral", "type": "uint256" }, { "name": "debt", "type": "uint256" }, { "name": "N", "type": "uint256" }], "outputs": [] }, { "stateMutability": "payable", "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": "payable", "type": "function", "name": "add_collateral", "inputs": [{ "name": "collateral", "type": "uint256" }], "outputs": [] }, { "stateMutability": "payable", "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": "payable", "type": "function", "name": "borrow_more", "inputs": [{ "name": "collateral", "type": "uint256" }, { "name": "debt", "type": "uint256" }], "outputs": [] }, { "stateMutability": "payable", "type": "function", "name": "repay", "inputs": [{ "name": "_d_debt", "type": "uint256" }], "outputs": [] }, { "stateMutability": "payable", "type": "function", "name": "repay", "inputs": [{ "name": "_d_debt", "type": "uint256" }, { "name": "_for", "type": "address" }], "outputs": [] }, { "stateMutability": "payable", "type": "function", "name": "repay", "inputs": [{ "name": "_d_debt", "type": "uint256" }, { "name": "_for", "type": "address" }, { "name": "max_active_band", "type": "int256" }], "outputs": [] }, { "stateMutability": "payable", "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": "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" }] }],
|
|
454
|
+
"networks": {
|
|
455
|
+
"1": {
|
|
456
|
+
"address": "0x1c91da0223c763d2e0173243eadaa0a2ea47e704"
|
|
457
|
+
}
|
|
458
|
+
}
|
|
459
|
+
},
|
|
452
460
|
"crvUSDwstETHAmm": {
|
|
453
461
|
"abi": [{ "name": "TokenExchange", "inputs": [{ "name": "buyer", "type": "address", "indexed": true }, { "name": "sold_id", "type": "uint256", "indexed": false }, { "name": "tokens_sold", "type": "uint256", "indexed": false }, { "name": "bought_id", "type": "uint256", "indexed": false }, { "name": "tokens_bought", "type": "uint256", "indexed": false }], "anonymous": false, "type": "event" }, { "name": "Deposit", "inputs": [{ "name": "provider", "type": "address", "indexed": true }, { "name": "amount", "type": "uint256", "indexed": false }, { "name": "n1", "type": "int256", "indexed": false }, { "name": "n2", "type": "int256", "indexed": false }], "anonymous": false, "type": "event" }, { "name": "Withdraw", "inputs": [{ "name": "provider", "type": "address", "indexed": true }, { "name": "amount_borrowed", "type": "uint256", "indexed": false }, { "name": "amount_collateral", "type": "uint256", "indexed": false }], "anonymous": false, "type": "event" }, { "name": "SetRate", "inputs": [{ "name": "rate", "type": "uint256", "indexed": false }, { "name": "rate_mul", "type": "uint256", "indexed": false }, { "name": "time", "type": "uint256", "indexed": false }], "anonymous": false, "type": "event" }, { "name": "SetFee", "inputs": [{ "name": "fee", "type": "uint256", "indexed": false }], "anonymous": false, "type": "event" }, { "name": "SetAdminFee", "inputs": [{ "name": "fee", "type": "uint256", "indexed": false }], "anonymous": false, "type": "event" }, { "stateMutability": "nonpayable", "type": "constructor", "inputs": [{ "name": "_borrowed_token", "type": "address" }, { "name": "_borrowed_precision", "type": "uint256" }, { "name": "_collateral_token", "type": "address" }, { "name": "_collateral_precision", "type": "uint256" }, { "name": "_A", "type": "uint256" }, { "name": "_sqrt_band_ratio", "type": "uint256" }, { "name": "_log_A_ratio", "type": "int256" }, { "name": "_base_price", "type": "uint256" }, { "name": "fee", "type": "uint256" }, { "name": "admin_fee", "type": "uint256" }, { "name": "_price_oracle_contract", "type": "address" }], "outputs": [] }, { "stateMutability": "nonpayable", "type": "function", "name": "set_admin", "inputs": [{ "name": "_admin", "type": "address" }], "outputs": [] }, { "stateMutability": "pure", "type": "function", "name": "coins", "inputs": [{ "name": "i", "type": "uint256" }], "outputs": [{ "name": "", "type": "address" }] }, { "stateMutability": "view", "type": "function", "name": "price_oracle", "inputs": [], "outputs": [{ "name": "", "type": "uint256" }] }, { "stateMutability": "view", "type": "function", "name": "dynamic_fee", "inputs": [], "outputs": [{ "name": "", "type": "uint256" }] }, { "stateMutability": "view", "type": "function", "name": "get_rate_mul", "inputs": [], "outputs": [{ "name": "", "type": "uint256" }] }, { "stateMutability": "view", "type": "function", "name": "get_base_price", "inputs": [], "outputs": [{ "name": "", "type": "uint256" }] }, { "stateMutability": "view", "type": "function", "name": "p_current_up", "inputs": [{ "name": "n", "type": "int256" }], "outputs": [{ "name": "", "type": "uint256" }] }, { "stateMutability": "view", "type": "function", "name": "p_current_down", "inputs": [{ "name": "n", "type": "int256" }], "outputs": [{ "name": "", "type": "uint256" }] }, { "stateMutability": "view", "type": "function", "name": "p_oracle_up", "inputs": [{ "name": "n", "type": "int256" }], "outputs": [{ "name": "", "type": "uint256" }] }, { "stateMutability": "view", "type": "function", "name": "p_oracle_down", "inputs": [{ "name": "n", "type": "int256" }], "outputs": [{ "name": "", "type": "uint256" }] }, { "stateMutability": "view", "type": "function", "name": "get_p", "inputs": [], "outputs": [{ "name": "", "type": "uint256" }] }, { "stateMutability": "view", "type": "function", "name": "read_user_tick_numbers", "inputs": [{ "name": "user", "type": "address" }], "outputs": [{ "name": "", "type": "int256[2]" }] }, { "stateMutability": "view", "type": "function", "name": "can_skip_bands", "inputs": [{ "name": "n_end", "type": "int256" }], "outputs": [{ "name": "", "type": "bool" }] }, { "stateMutability": "view", "type": "function", "name": "active_band_with_skip", "inputs": [], "outputs": [{ "name": "", "type": "int256" }] }, { "stateMutability": "view", "type": "function", "name": "has_liquidity", "inputs": [{ "name": "user", "type": "address" }], "outputs": [{ "name": "", "type": "bool" }] }, { "stateMutability": "nonpayable", "type": "function", "name": "deposit_range", "inputs": [{ "name": "user", "type": "address" }, { "name": "amount", "type": "uint256" }, { "name": "n1", "type": "int256" }, { "name": "n2", "type": "int256" }], "outputs": [] }, { "stateMutability": "nonpayable", "type": "function", "name": "withdraw", "inputs": [{ "name": "user", "type": "address" }, { "name": "frac", "type": "uint256" }], "outputs": [{ "name": "", "type": "uint256[2]" }] }, { "stateMutability": "view", "type": "function", "name": "get_dy", "inputs": [{ "name": "i", "type": "uint256" }, { "name": "j", "type": "uint256" }, { "name": "in_amount", "type": "uint256" }], "outputs": [{ "name": "", "type": "uint256" }] }, { "stateMutability": "view", "type": "function", "name": "get_dxdy", "inputs": [{ "name": "i", "type": "uint256" }, { "name": "j", "type": "uint256" }, { "name": "in_amount", "type": "uint256" }], "outputs": [{ "name": "", "type": "uint256" }, { "name": "", "type": "uint256" }] }, { "stateMutability": "view", "type": "function", "name": "get_dx", "inputs": [{ "name": "i", "type": "uint256" }, { "name": "j", "type": "uint256" }, { "name": "out_amount", "type": "uint256" }], "outputs": [{ "name": "", "type": "uint256" }] }, { "stateMutability": "view", "type": "function", "name": "get_dydx", "inputs": [{ "name": "i", "type": "uint256" }, { "name": "j", "type": "uint256" }, { "name": "out_amount", "type": "uint256" }], "outputs": [{ "name": "", "type": "uint256" }, { "name": "", "type": "uint256" }] }, { "stateMutability": "nonpayable", "type": "function", "name": "exchange", "inputs": [{ "name": "i", "type": "uint256" }, { "name": "j", "type": "uint256" }, { "name": "in_amount", "type": "uint256" }, { "name": "min_amount", "type": "uint256" }], "outputs": [{ "name": "", "type": "uint256[2]" }] }, { "stateMutability": "nonpayable", "type": "function", "name": "exchange", "inputs": [{ "name": "i", "type": "uint256" }, { "name": "j", "type": "uint256" }, { "name": "in_amount", "type": "uint256" }, { "name": "min_amount", "type": "uint256" }, { "name": "_for", "type": "address" }], "outputs": [{ "name": "", "type": "uint256[2]" }] }, { "stateMutability": "nonpayable", "type": "function", "name": "exchange_dy", "inputs": [{ "name": "i", "type": "uint256" }, { "name": "j", "type": "uint256" }, { "name": "out_amount", "type": "uint256" }, { "name": "max_amount", "type": "uint256" }], "outputs": [{ "name": "", "type": "uint256[2]" }] }, { "stateMutability": "nonpayable", "type": "function", "name": "exchange_dy", "inputs": [{ "name": "i", "type": "uint256" }, { "name": "j", "type": "uint256" }, { "name": "out_amount", "type": "uint256" }, { "name": "max_amount", "type": "uint256" }, { "name": "_for", "type": "address" }], "outputs": [{ "name": "", "type": "uint256[2]" }] }, { "stateMutability": "view", "type": "function", "name": "get_y_up", "inputs": [{ "name": "user", "type": "address" }], "outputs": [{ "name": "", "type": "uint256" }] }, { "stateMutability": "view", "type": "function", "name": "get_x_down", "inputs": [{ "name": "user", "type": "address" }], "outputs": [{ "name": "", "type": "uint256" }] }, { "stateMutability": "view", "type": "function", "name": "get_sum_xy", "inputs": [{ "name": "user", "type": "address" }], "outputs": [{ "name": "", "type": "uint256[2]" }] }, { "stateMutability": "view", "type": "function", "name": "get_xy", "inputs": [{ "name": "user", "type": "address" }], "outputs": [{ "name": "", "type": "uint256[][2]" }] }, { "stateMutability": "view", "type": "function", "name": "get_amount_for_price", "inputs": [{ "name": "p", "type": "uint256" }], "outputs": [{ "name": "", "type": "uint256" }, { "name": "", "type": "bool" }] }, { "stateMutability": "nonpayable", "type": "function", "name": "set_rate", "inputs": [{ "name": "rate", "type": "uint256" }], "outputs": [{ "name": "", "type": "uint256" }] }, { "stateMutability": "nonpayable", "type": "function", "name": "set_fee", "inputs": [{ "name": "fee", "type": "uint256" }], "outputs": [] }, { "stateMutability": "nonpayable", "type": "function", "name": "set_admin_fee", "inputs": [{ "name": "fee", "type": "uint256" }], "outputs": [] }, { "stateMutability": "nonpayable", "type": "function", "name": "reset_admin_fees", "inputs": [], "outputs": [] }, { "stateMutability": "nonpayable", "type": "function", "name": "set_callback", "inputs": [{ "name": "liquidity_mining_callback", "type": "address" }], "outputs": [] }, { "stateMutability": "view", "type": "function", "name": "admin", "inputs": [], "outputs": [{ "name": "", "type": "address" }] }, { "stateMutability": "view", "type": "function", "name": "A", "inputs": [], "outputs": [{ "name": "", "type": "uint256" }] }, { "stateMutability": "view", "type": "function", "name": "fee", "inputs": [], "outputs": [{ "name": "", "type": "uint256" }] }, { "stateMutability": "view", "type": "function", "name": "admin_fee", "inputs": [], "outputs": [{ "name": "", "type": "uint256" }] }, { "stateMutability": "view", "type": "function", "name": "rate", "inputs": [], "outputs": [{ "name": "", "type": "uint256" }] }, { "stateMutability": "view", "type": "function", "name": "active_band", "inputs": [], "outputs": [{ "name": "", "type": "int256" }] }, { "stateMutability": "view", "type": "function", "name": "min_band", "inputs": [], "outputs": [{ "name": "", "type": "int256" }] }, { "stateMutability": "view", "type": "function", "name": "max_band", "inputs": [], "outputs": [{ "name": "", "type": "int256" }] }, { "stateMutability": "view", "type": "function", "name": "admin_fees_x", "inputs": [], "outputs": [{ "name": "", "type": "uint256" }] }, { "stateMutability": "view", "type": "function", "name": "admin_fees_y", "inputs": [], "outputs": [{ "name": "", "type": "uint256" }] }, { "stateMutability": "view", "type": "function", "name": "price_oracle_contract", "inputs": [], "outputs": [{ "name": "", "type": "address" }] }, { "stateMutability": "view", "type": "function", "name": "bands_x", "inputs": [{ "name": "arg0", "type": "int256" }], "outputs": [{ "name": "", "type": "uint256" }] }, { "stateMutability": "view", "type": "function", "name": "bands_y", "inputs": [{ "name": "arg0", "type": "int256" }], "outputs": [{ "name": "", "type": "uint256" }] }, { "stateMutability": "view", "type": "function", "name": "liquidity_mining_callback", "inputs": [], "outputs": [{ "name": "", "type": "address" }] }],
|
|
454
462
|
"networks": {
|
|
@@ -473,6 +481,14 @@ module.exports = {
|
|
|
473
481
|
}
|
|
474
482
|
}
|
|
475
483
|
},
|
|
484
|
+
"crvUSDtBTCAmm": {
|
|
485
|
+
"abi": [{ "name": "TokenExchange", "inputs": [{ "name": "buyer", "type": "address", "indexed": true }, { "name": "sold_id", "type": "uint256", "indexed": false }, { "name": "tokens_sold", "type": "uint256", "indexed": false }, { "name": "bought_id", "type": "uint256", "indexed": false }, { "name": "tokens_bought", "type": "uint256", "indexed": false }], "anonymous": false, "type": "event" }, { "name": "Deposit", "inputs": [{ "name": "provider", "type": "address", "indexed": true }, { "name": "amount", "type": "uint256", "indexed": false }, { "name": "n1", "type": "int256", "indexed": false }, { "name": "n2", "type": "int256", "indexed": false }], "anonymous": false, "type": "event" }, { "name": "Withdraw", "inputs": [{ "name": "provider", "type": "address", "indexed": true }, { "name": "amount_borrowed", "type": "uint256", "indexed": false }, { "name": "amount_collateral", "type": "uint256", "indexed": false }], "anonymous": false, "type": "event" }, { "name": "SetRate", "inputs": [{ "name": "rate", "type": "uint256", "indexed": false }, { "name": "rate_mul", "type": "uint256", "indexed": false }, { "name": "time", "type": "uint256", "indexed": false }], "anonymous": false, "type": "event" }, { "name": "SetFee", "inputs": [{ "name": "fee", "type": "uint256", "indexed": false }], "anonymous": false, "type": "event" }, { "name": "SetAdminFee", "inputs": [{ "name": "fee", "type": "uint256", "indexed": false }], "anonymous": false, "type": "event" }, { "stateMutability": "nonpayable", "type": "constructor", "inputs": [{ "name": "_borrowed_token", "type": "address" }, { "name": "_borrowed_precision", "type": "uint256" }, { "name": "_collateral_token", "type": "address" }, { "name": "_collateral_precision", "type": "uint256" }, { "name": "_A", "type": "uint256" }, { "name": "_sqrt_band_ratio", "type": "uint256" }, { "name": "_log_A_ratio", "type": "int256" }, { "name": "_base_price", "type": "uint256" }, { "name": "fee", "type": "uint256" }, { "name": "admin_fee", "type": "uint256" }, { "name": "_price_oracle_contract", "type": "address" }], "outputs": [] }, { "stateMutability": "nonpayable", "type": "function", "name": "set_admin", "inputs": [{ "name": "_admin", "type": "address" }], "outputs": [] }, { "stateMutability": "pure", "type": "function", "name": "coins", "inputs": [{ "name": "i", "type": "uint256" }], "outputs": [{ "name": "", "type": "address" }] }, { "stateMutability": "view", "type": "function", "name": "price_oracle", "inputs": [], "outputs": [{ "name": "", "type": "uint256" }] }, { "stateMutability": "view", "type": "function", "name": "dynamic_fee", "inputs": [], "outputs": [{ "name": "", "type": "uint256" }] }, { "stateMutability": "view", "type": "function", "name": "get_rate_mul", "inputs": [], "outputs": [{ "name": "", "type": "uint256" }] }, { "stateMutability": "view", "type": "function", "name": "get_base_price", "inputs": [], "outputs": [{ "name": "", "type": "uint256" }] }, { "stateMutability": "view", "type": "function", "name": "p_current_up", "inputs": [{ "name": "n", "type": "int256" }], "outputs": [{ "name": "", "type": "uint256" }] }, { "stateMutability": "view", "type": "function", "name": "p_current_down", "inputs": [{ "name": "n", "type": "int256" }], "outputs": [{ "name": "", "type": "uint256" }] }, { "stateMutability": "view", "type": "function", "name": "p_oracle_up", "inputs": [{ "name": "n", "type": "int256" }], "outputs": [{ "name": "", "type": "uint256" }] }, { "stateMutability": "view", "type": "function", "name": "p_oracle_down", "inputs": [{ "name": "n", "type": "int256" }], "outputs": [{ "name": "", "type": "uint256" }] }, { "stateMutability": "view", "type": "function", "name": "get_p", "inputs": [], "outputs": [{ "name": "", "type": "uint256" }] }, { "stateMutability": "view", "type": "function", "name": "read_user_tick_numbers", "inputs": [{ "name": "user", "type": "address" }], "outputs": [{ "name": "", "type": "int256[2]" }] }, { "stateMutability": "view", "type": "function", "name": "can_skip_bands", "inputs": [{ "name": "n_end", "type": "int256" }], "outputs": [{ "name": "", "type": "bool" }] }, { "stateMutability": "view", "type": "function", "name": "active_band_with_skip", "inputs": [], "outputs": [{ "name": "", "type": "int256" }] }, { "stateMutability": "view", "type": "function", "name": "has_liquidity", "inputs": [{ "name": "user", "type": "address" }], "outputs": [{ "name": "", "type": "bool" }] }, { "stateMutability": "nonpayable", "type": "function", "name": "deposit_range", "inputs": [{ "name": "user", "type": "address" }, { "name": "amount", "type": "uint256" }, { "name": "n1", "type": "int256" }, { "name": "n2", "type": "int256" }], "outputs": [] }, { "stateMutability": "nonpayable", "type": "function", "name": "withdraw", "inputs": [{ "name": "user", "type": "address" }, { "name": "frac", "type": "uint256" }], "outputs": [{ "name": "", "type": "uint256[2]" }] }, { "stateMutability": "view", "type": "function", "name": "get_dy", "inputs": [{ "name": "i", "type": "uint256" }, { "name": "j", "type": "uint256" }, { "name": "in_amount", "type": "uint256" }], "outputs": [{ "name": "", "type": "uint256" }] }, { "stateMutability": "view", "type": "function", "name": "get_dxdy", "inputs": [{ "name": "i", "type": "uint256" }, { "name": "j", "type": "uint256" }, { "name": "in_amount", "type": "uint256" }], "outputs": [{ "name": "", "type": "uint256" }, { "name": "", "type": "uint256" }] }, { "stateMutability": "view", "type": "function", "name": "get_dx", "inputs": [{ "name": "i", "type": "uint256" }, { "name": "j", "type": "uint256" }, { "name": "out_amount", "type": "uint256" }], "outputs": [{ "name": "", "type": "uint256" }] }, { "stateMutability": "view", "type": "function", "name": "get_dydx", "inputs": [{ "name": "i", "type": "uint256" }, { "name": "j", "type": "uint256" }, { "name": "out_amount", "type": "uint256" }], "outputs": [{ "name": "", "type": "uint256" }, { "name": "", "type": "uint256" }] }, { "stateMutability": "nonpayable", "type": "function", "name": "exchange", "inputs": [{ "name": "i", "type": "uint256" }, { "name": "j", "type": "uint256" }, { "name": "in_amount", "type": "uint256" }, { "name": "min_amount", "type": "uint256" }], "outputs": [{ "name": "", "type": "uint256[2]" }] }, { "stateMutability": "nonpayable", "type": "function", "name": "exchange", "inputs": [{ "name": "i", "type": "uint256" }, { "name": "j", "type": "uint256" }, { "name": "in_amount", "type": "uint256" }, { "name": "min_amount", "type": "uint256" }, { "name": "_for", "type": "address" }], "outputs": [{ "name": "", "type": "uint256[2]" }] }, { "stateMutability": "nonpayable", "type": "function", "name": "exchange_dy", "inputs": [{ "name": "i", "type": "uint256" }, { "name": "j", "type": "uint256" }, { "name": "out_amount", "type": "uint256" }, { "name": "max_amount", "type": "uint256" }], "outputs": [{ "name": "", "type": "uint256[2]" }] }, { "stateMutability": "nonpayable", "type": "function", "name": "exchange_dy", "inputs": [{ "name": "i", "type": "uint256" }, { "name": "j", "type": "uint256" }, { "name": "out_amount", "type": "uint256" }, { "name": "max_amount", "type": "uint256" }, { "name": "_for", "type": "address" }], "outputs": [{ "name": "", "type": "uint256[2]" }] }, { "stateMutability": "view", "type": "function", "name": "get_y_up", "inputs": [{ "name": "user", "type": "address" }], "outputs": [{ "name": "", "type": "uint256" }] }, { "stateMutability": "view", "type": "function", "name": "get_x_down", "inputs": [{ "name": "user", "type": "address" }], "outputs": [{ "name": "", "type": "uint256" }] }, { "stateMutability": "view", "type": "function", "name": "get_sum_xy", "inputs": [{ "name": "user", "type": "address" }], "outputs": [{ "name": "", "type": "uint256[2]" }] }, { "stateMutability": "view", "type": "function", "name": "get_xy", "inputs": [{ "name": "user", "type": "address" }], "outputs": [{ "name": "", "type": "uint256[][2]" }] }, { "stateMutability": "view", "type": "function", "name": "get_amount_for_price", "inputs": [{ "name": "p", "type": "uint256" }], "outputs": [{ "name": "", "type": "uint256" }, { "name": "", "type": "bool" }] }, { "stateMutability": "nonpayable", "type": "function", "name": "set_rate", "inputs": [{ "name": "rate", "type": "uint256" }], "outputs": [{ "name": "", "type": "uint256" }] }, { "stateMutability": "nonpayable", "type": "function", "name": "set_fee", "inputs": [{ "name": "fee", "type": "uint256" }], "outputs": [] }, { "stateMutability": "nonpayable", "type": "function", "name": "set_admin_fee", "inputs": [{ "name": "fee", "type": "uint256" }], "outputs": [] }, { "stateMutability": "nonpayable", "type": "function", "name": "reset_admin_fees", "inputs": [], "outputs": [] }, { "stateMutability": "nonpayable", "type": "function", "name": "set_callback", "inputs": [{ "name": "liquidity_mining_callback", "type": "address" }], "outputs": [] }, { "stateMutability": "view", "type": "function", "name": "admin", "inputs": [], "outputs": [{ "name": "", "type": "address" }] }, { "stateMutability": "view", "type": "function", "name": "A", "inputs": [], "outputs": [{ "name": "", "type": "uint256" }] }, { "stateMutability": "view", "type": "function", "name": "fee", "inputs": [], "outputs": [{ "name": "", "type": "uint256" }] }, { "stateMutability": "view", "type": "function", "name": "admin_fee", "inputs": [], "outputs": [{ "name": "", "type": "uint256" }] }, { "stateMutability": "view", "type": "function", "name": "rate", "inputs": [], "outputs": [{ "name": "", "type": "uint256" }] }, { "stateMutability": "view", "type": "function", "name": "active_band", "inputs": [], "outputs": [{ "name": "", "type": "int256" }] }, { "stateMutability": "view", "type": "function", "name": "min_band", "inputs": [], "outputs": [{ "name": "", "type": "int256" }] }, { "stateMutability": "view", "type": "function", "name": "max_band", "inputs": [], "outputs": [{ "name": "", "type": "int256" }] }, { "stateMutability": "view", "type": "function", "name": "admin_fees_x", "inputs": [], "outputs": [{ "name": "", "type": "uint256" }] }, { "stateMutability": "view", "type": "function", "name": "admin_fees_y", "inputs": [], "outputs": [{ "name": "", "type": "uint256" }] }, { "stateMutability": "view", "type": "function", "name": "price_oracle_contract", "inputs": [], "outputs": [{ "name": "", "type": "address" }] }, { "stateMutability": "view", "type": "function", "name": "bands_x", "inputs": [{ "name": "arg0", "type": "int256" }], "outputs": [{ "name": "", "type": "uint256" }] }, { "stateMutability": "view", "type": "function", "name": "bands_y", "inputs": [{ "name": "arg0", "type": "int256" }], "outputs": [{ "name": "", "type": "uint256" }] }, { "stateMutability": "view", "type": "function", "name": "liquidity_mining_callback", "inputs": [], "outputs": [{ "name": "", "type": "address" }] }],
|
|
486
|
+
"networks": {
|
|
487
|
+
"1": {
|
|
488
|
+
"address": "0xf9bd9da2427a50908c4c6d1599d8e62837c2bcb0"
|
|
489
|
+
}
|
|
490
|
+
}
|
|
491
|
+
},
|
|
476
492
|
"crvUSDView": {
|
|
477
493
|
"abi": [{ "inputs": [{ "internalType": "address", "name": "market", "type": "address" }, { "internalType": "uint256", "name": "collateral", "type": "uint256" }, { "internalType": "uint256", "name": "debt", "type": "uint256" }, { "internalType": "uint256", "name": "N", "type": "uint256" }], "name": "createLoanData", "outputs": [{ "components": [{ "internalType": "int256", "name": "health", "type": "int256" }, { "internalType": "uint256", "name": "minColl", "type": "uint256" }, { "internalType": "uint256", "name": "maxBorrow", "type": "uint256" }, { "components": [{ "internalType": "int256", "name": "id", "type": "int256" }, { "internalType": "uint256", "name": "lowPrice", "type": "uint256" }, { "internalType": "uint256", "name": "highPrice", "type": "uint256" }, { "internalType": "uint256", "name": "collAmount", "type": "uint256" }, { "internalType": "uint256", "name": "debtAmount", "type": "uint256" }], "internalType": "struct CurveUsdView.Band[]", "name": "bands", "type": "tuple[]" }], "internalType": "struct CurveUsdView.CreateLoanData", "name": "", "type": "tuple" }], "stateMutability": "view", "type": "function" }, { "inputs": [{ "internalType": "address", "name": "market", "type": "address" }, { "internalType": "int256", "name": "n", "type": "int256" }], "name": "getBandData", "outputs": [{ "components": [{ "internalType": "int256", "name": "id", "type": "int256" }, { "internalType": "uint256", "name": "lowPrice", "type": "uint256" }, { "internalType": "uint256", "name": "highPrice", "type": "uint256" }, { "internalType": "uint256", "name": "collAmount", "type": "uint256" }, { "internalType": "uint256", "name": "debtAmount", "type": "uint256" }], "internalType": "struct CurveUsdView.Band", "name": "", "type": "tuple" }], "stateMutability": "view", "type": "function" }, { "inputs": [{ "internalType": "address", "name": "market", "type": "address" }, { "internalType": "uint256", "name": "collateral", "type": "uint256" }, { "internalType": "uint256", "name": "debt", "type": "uint256" }, { "internalType": "uint256", "name": "N", "type": "uint256" }], "name": "getBandsData", "outputs": [{ "components": [{ "internalType": "int256", "name": "id", "type": "int256" }, { "internalType": "uint256", "name": "lowPrice", "type": "uint256" }, { "internalType": "uint256", "name": "highPrice", "type": "uint256" }, { "internalType": "uint256", "name": "collAmount", "type": "uint256" }, { "internalType": "uint256", "name": "debtAmount", "type": "uint256" }], "internalType": "struct CurveUsdView.Band[]", "name": "bands", "type": "tuple[]" }], "stateMutability": "view", "type": "function" }, { "inputs": [{ "internalType": "address", "name": "market", "type": "address" }, { "internalType": "int256", "name": "from", "type": "int256" }, { "internalType": "int256", "name": "to", "type": "int256" }], "name": "getBandsData", "outputs": [{ "components": [{ "internalType": "int256", "name": "id", "type": "int256" }, { "internalType": "uint256", "name": "lowPrice", "type": "uint256" }, { "internalType": "uint256", "name": "highPrice", "type": "uint256" }, { "internalType": "uint256", "name": "collAmount", "type": "uint256" }, { "internalType": "uint256", "name": "debtAmount", "type": "uint256" }], "internalType": "struct CurveUsdView.Band[]", "name": "", "type": "tuple[]" }], "stateMutability": "view", "type": "function" }, { "inputs": [{ "internalType": "address", "name": "market", "type": "address" }], "name": "globalData", "outputs": [{ "components": [{ "internalType": "address", "name": "collateral", "type": "address" }, { "internalType": "uint256", "name": "decimals", "type": "uint256" }, { "internalType": "int256", "name": "activeBand", "type": "int256" }, { "internalType": "uint256", "name": "A", "type": "uint256" }, { "internalType": "uint256", "name": "totalDebt", "type": "uint256" }, { "internalType": "uint256", "name": "ammPrice", "type": "uint256" }, { "internalType": "uint256", "name": "basePrice", "type": "uint256" }, { "internalType": "uint256", "name": "oraclePrice", "type": "uint256" }, { "internalType": "uint256", "name": "minted", "type": "uint256" }, { "internalType": "uint256", "name": "redeemed", "type": "uint256" }, { "internalType": "uint256", "name": "monetaryPolicyRate", "type": "uint256" }, { "internalType": "uint256", "name": "ammRate", "type": "uint256" }, { "internalType": "int256", "name": "minBand", "type": "int256" }, { "internalType": "int256", "name": "maxBand", "type": "int256" }], "internalType": "struct CurveUsdView.GlobalData", "name": "", "type": "tuple" }], "stateMutability": "view", "type": "function" }, { "inputs": [{ "internalType": "address", "name": "market", "type": "address" }, { "internalType": "address", "name": "user", "type": "address" }, { "internalType": "int256", "name": "collChange", "type": "int256" }, { "internalType": "int256", "name": "debtChange", "type": "int256" }, { "internalType": "bool", "name": "isFull", "type": "bool" }, { "internalType": "uint256", "name": "numBands", "type": "uint256" }], "name": "healthCalculator", "outputs": [{ "internalType": "int256", "name": "", "type": "int256" }], "stateMutability": "view", "type": "function" }, { "inputs": [{ "internalType": "address", "name": "market", "type": "address" }, { "internalType": "uint256", "name": "collateral", "type": "uint256" }, { "internalType": "uint256", "name": "N", "type": "uint256" }], "name": "maxBorrow", "outputs": [{ "internalType": "uint256", "name": "", "type": "uint256" }], "stateMutability": "view", "type": "function" }, { "inputs": [{ "internalType": "address", "name": "market", "type": "address" }, { "internalType": "uint256", "name": "debt", "type": "uint256" }, { "internalType": "uint256", "name": "N", "type": "uint256" }], "name": "minCollateral", "outputs": [{ "internalType": "uint256", "name": "", "type": "uint256" }], "stateMutability": "view", "type": "function" }, { "inputs": [{ "internalType": "address", "name": "market", "type": "address" }, { "internalType": "address", "name": "user", "type": "address" }], "name": "userData", "outputs": [{ "components": [{ "internalType": "bool", "name": "loanExists", "type": "bool" }, { "internalType": "uint256", "name": "collateralPrice", "type": "uint256" }, { "internalType": "uint256", "name": "marketCollateralAmount", "type": "uint256" }, { "internalType": "uint256", "name": "curveUsdCollateralAmount", "type": "uint256" }, { "internalType": "uint256", "name": "debtAmount", "type": "uint256" }, { "internalType": "uint256", "name": "N", "type": "uint256" }, { "internalType": "uint256", "name": "priceLow", "type": "uint256" }, { "internalType": "uint256", "name": "priceHigh", "type": "uint256" }, { "internalType": "uint256", "name": "liquidationDiscount", "type": "uint256" }, { "internalType": "int256", "name": "health", "type": "int256" }, { "internalType": "int256[2]", "name": "bandRange", "type": "int256[2]" }, { "internalType": "uint256[][2]", "name": "usersBands", "type": "uint256[][2]" }], "internalType": "struct CurveUsdView.UserData", "name": "", "type": "tuple" }], "stateMutability": "view", "type": "function" }],
|
|
478
494
|
"networks": {
|
|
@@ -3,8 +3,10 @@ import { NetworkNumber } from '../../types/common';
|
|
|
3
3
|
export declare const CRVUSD_WSTETH_MARKET: (networkId: NetworkNumber) => CrvUSDMarketData;
|
|
4
4
|
export declare const CRVUSD_ETH_MARKET: (networkId: NetworkNumber) => CrvUSDMarketData;
|
|
5
5
|
export declare const CRVUSD_WBTC_MARKET: (networkId: NetworkNumber) => CrvUSDMarketData;
|
|
6
|
+
export declare const CRVUSD_TBTC_MARKET: (networkId: NetworkNumber) => CrvUSDMarketData;
|
|
6
7
|
export declare const CrvUsdMarkets: (networkId: NetworkNumber) => {
|
|
7
8
|
readonly wstETH: CrvUSDMarketData;
|
|
8
9
|
readonly ETH: CrvUSDMarketData;
|
|
9
10
|
readonly WBTC: CrvUSDMarketData;
|
|
11
|
+
readonly tBTC: CrvUSDMarketData;
|
|
10
12
|
};
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.CrvUsdMarkets = exports.CRVUSD_WBTC_MARKET = exports.CRVUSD_ETH_MARKET = exports.CRVUSD_WSTETH_MARKET = void 0;
|
|
3
|
+
exports.CrvUsdMarkets = exports.CRVUSD_TBTC_MARKET = exports.CRVUSD_WBTC_MARKET = exports.CRVUSD_ETH_MARKET = exports.CRVUSD_WSTETH_MARKET = void 0;
|
|
4
4
|
const contracts_1 = require("../../contracts");
|
|
5
5
|
const types_1 = require("../../types");
|
|
6
6
|
const CRVUSD_WSTETH_MARKET = (networkId) => ({
|
|
@@ -39,9 +39,22 @@ const CRVUSD_WBTC_MARKET = (networkId) => ({
|
|
|
39
39
|
createCollAssets: ['WBTC'],
|
|
40
40
|
});
|
|
41
41
|
exports.CRVUSD_WBTC_MARKET = CRVUSD_WBTC_MARKET;
|
|
42
|
+
const CRVUSD_TBTC_MARKET = (networkId) => ({
|
|
43
|
+
chainIds: [1],
|
|
44
|
+
label: 'tBTC',
|
|
45
|
+
shortLabel: 'tBTC',
|
|
46
|
+
value: types_1.CrvUSDVersions.tBTC,
|
|
47
|
+
collAsset: 'tBTC',
|
|
48
|
+
baseAsset: 'crvUSD',
|
|
49
|
+
controllerAddress: (0, contracts_1.getConfigContractAddress)('crvUSDtBTCController', networkId),
|
|
50
|
+
ammAddress: (0, contracts_1.getConfigContractAddress)('crvUSDtBTCAmm', networkId),
|
|
51
|
+
createCollAssets: ['tBTC'],
|
|
52
|
+
});
|
|
53
|
+
exports.CRVUSD_TBTC_MARKET = CRVUSD_TBTC_MARKET;
|
|
42
54
|
const CrvUsdMarkets = (networkId) => ({
|
|
43
55
|
[types_1.CrvUSDVersions.wstETH]: (0, exports.CRVUSD_WSTETH_MARKET)(networkId),
|
|
44
56
|
[types_1.CrvUSDVersions.ETH]: (0, exports.CRVUSD_ETH_MARKET)(networkId),
|
|
45
57
|
[types_1.CrvUSDVersions.WBTC]: (0, exports.CRVUSD_WBTC_MARKET)(networkId),
|
|
58
|
+
[types_1.CrvUSDVersions.tBTC]: (0, exports.CRVUSD_TBTC_MARKET)(networkId),
|
|
46
59
|
});
|
|
47
60
|
exports.CrvUsdMarkets = CrvUsdMarkets;
|
package/cjs/types/aave.d.ts
CHANGED
|
@@ -219,7 +219,7 @@ export interface AaveV3AggregatedPositionData {
|
|
|
219
219
|
export interface AaveHelperCommon {
|
|
220
220
|
usedAssets: any;
|
|
221
221
|
eModeCategory: number;
|
|
222
|
-
eModeCategories?:
|
|
222
|
+
eModeCategories?: object;
|
|
223
223
|
assetsData: any;
|
|
224
224
|
selectedMarket: Partial<AaveMarketInfo>;
|
|
225
225
|
network?: NetworkNumber;
|
|
@@ -0,0 +1,139 @@
|
|
|
1
|
+
/// <reference types="node" />
|
|
2
|
+
import type BN from "bn.js";
|
|
3
|
+
import type { ContractOptions } from "web3-eth-contract";
|
|
4
|
+
import type { EventLog } from "web3-core";
|
|
5
|
+
import type { EventEmitter } from "events";
|
|
6
|
+
import type { Callback, NonPayableTransactionObject, BlockType, ContractEventLog, BaseContract } from "./types";
|
|
7
|
+
export interface EventOptions {
|
|
8
|
+
filter?: object;
|
|
9
|
+
fromBlock?: BlockType;
|
|
10
|
+
topics?: string[];
|
|
11
|
+
}
|
|
12
|
+
export type TokenExchange = ContractEventLog<{
|
|
13
|
+
buyer: string;
|
|
14
|
+
sold_id: string;
|
|
15
|
+
tokens_sold: string;
|
|
16
|
+
bought_id: string;
|
|
17
|
+
tokens_bought: string;
|
|
18
|
+
0: string;
|
|
19
|
+
1: string;
|
|
20
|
+
2: string;
|
|
21
|
+
3: string;
|
|
22
|
+
4: string;
|
|
23
|
+
}>;
|
|
24
|
+
export type Deposit = ContractEventLog<{
|
|
25
|
+
provider: string;
|
|
26
|
+
amount: string;
|
|
27
|
+
n1: string;
|
|
28
|
+
n2: string;
|
|
29
|
+
0: string;
|
|
30
|
+
1: string;
|
|
31
|
+
2: string;
|
|
32
|
+
3: string;
|
|
33
|
+
}>;
|
|
34
|
+
export type Withdraw = ContractEventLog<{
|
|
35
|
+
provider: string;
|
|
36
|
+
amount_borrowed: string;
|
|
37
|
+
amount_collateral: string;
|
|
38
|
+
0: string;
|
|
39
|
+
1: string;
|
|
40
|
+
2: string;
|
|
41
|
+
}>;
|
|
42
|
+
export type SetRate = ContractEventLog<{
|
|
43
|
+
rate: string;
|
|
44
|
+
rate_mul: string;
|
|
45
|
+
time: string;
|
|
46
|
+
0: string;
|
|
47
|
+
1: string;
|
|
48
|
+
2: string;
|
|
49
|
+
}>;
|
|
50
|
+
export type SetFee = ContractEventLog<{
|
|
51
|
+
fee: string;
|
|
52
|
+
0: string;
|
|
53
|
+
}>;
|
|
54
|
+
export type SetAdminFee = ContractEventLog<{
|
|
55
|
+
fee: string;
|
|
56
|
+
0: string;
|
|
57
|
+
}>;
|
|
58
|
+
export interface CrvUSDtBTCAmm extends BaseContract {
|
|
59
|
+
constructor(jsonInterface: any[], address?: string, options?: ContractOptions): CrvUSDtBTCAmm;
|
|
60
|
+
clone(): CrvUSDtBTCAmm;
|
|
61
|
+
methods: {
|
|
62
|
+
set_admin(_admin: string): NonPayableTransactionObject<void>;
|
|
63
|
+
coins(i: number | string | BN): NonPayableTransactionObject<string>;
|
|
64
|
+
price_oracle(): NonPayableTransactionObject<string>;
|
|
65
|
+
dynamic_fee(): NonPayableTransactionObject<string>;
|
|
66
|
+
get_rate_mul(): NonPayableTransactionObject<string>;
|
|
67
|
+
get_base_price(): NonPayableTransactionObject<string>;
|
|
68
|
+
p_current_up(n: number | string | BN): NonPayableTransactionObject<string>;
|
|
69
|
+
p_current_down(n: number | string | BN): NonPayableTransactionObject<string>;
|
|
70
|
+
p_oracle_up(n: number | string | BN): NonPayableTransactionObject<string>;
|
|
71
|
+
p_oracle_down(n: number | string | BN): NonPayableTransactionObject<string>;
|
|
72
|
+
get_p(): NonPayableTransactionObject<string>;
|
|
73
|
+
read_user_tick_numbers(user: string): NonPayableTransactionObject<[string, string]>;
|
|
74
|
+
can_skip_bands(n_end: number | string | BN): NonPayableTransactionObject<boolean>;
|
|
75
|
+
active_band_with_skip(): NonPayableTransactionObject<string>;
|
|
76
|
+
has_liquidity(user: string): NonPayableTransactionObject<boolean>;
|
|
77
|
+
deposit_range(user: string, amount: number | string | BN, n1: number | string | BN, n2: number | string | BN): NonPayableTransactionObject<void>;
|
|
78
|
+
withdraw(user: string, frac: number | string | BN): NonPayableTransactionObject<[string, string]>;
|
|
79
|
+
get_dy(i: number | string | BN, j: number | string | BN, in_amount: number | string | BN): NonPayableTransactionObject<string>;
|
|
80
|
+
get_dxdy(i: number | string | BN, j: number | string | BN, in_amount: number | string | BN): NonPayableTransactionObject<[string, string]>;
|
|
81
|
+
get_dx(i: number | string | BN, j: number | string | BN, out_amount: number | string | BN): NonPayableTransactionObject<string>;
|
|
82
|
+
get_dydx(i: number | string | BN, j: number | string | BN, out_amount: number | string | BN): NonPayableTransactionObject<[string, string]>;
|
|
83
|
+
"exchange(uint256,uint256,uint256,uint256)"(i: number | string | BN, j: number | string | BN, in_amount: number | string | BN, min_amount: number | string | BN): NonPayableTransactionObject<[string, string]>;
|
|
84
|
+
"exchange(uint256,uint256,uint256,uint256,address)"(i: number | string | BN, j: number | string | BN, in_amount: number | string | BN, min_amount: number | string | BN, _for: string): NonPayableTransactionObject<[string, string]>;
|
|
85
|
+
"exchange_dy(uint256,uint256,uint256,uint256)"(i: number | string | BN, j: number | string | BN, out_amount: number | string | BN, max_amount: number | string | BN): NonPayableTransactionObject<[string, string]>;
|
|
86
|
+
"exchange_dy(uint256,uint256,uint256,uint256,address)"(i: number | string | BN, j: number | string | BN, out_amount: number | string | BN, max_amount: number | string | BN, _for: string): NonPayableTransactionObject<[string, string]>;
|
|
87
|
+
get_y_up(user: string): NonPayableTransactionObject<string>;
|
|
88
|
+
get_x_down(user: string): NonPayableTransactionObject<string>;
|
|
89
|
+
get_sum_xy(user: string): NonPayableTransactionObject<[string, string]>;
|
|
90
|
+
get_xy(user: string): NonPayableTransactionObject<[string[], string[]]>;
|
|
91
|
+
get_amount_for_price(p: number | string | BN): NonPayableTransactionObject<[string, boolean]>;
|
|
92
|
+
set_rate(rate: number | string | BN): NonPayableTransactionObject<string>;
|
|
93
|
+
set_fee(fee: number | string | BN): NonPayableTransactionObject<void>;
|
|
94
|
+
set_admin_fee(fee: number | string | BN): NonPayableTransactionObject<void>;
|
|
95
|
+
reset_admin_fees(): NonPayableTransactionObject<void>;
|
|
96
|
+
set_callback(liquidity_mining_callback: string): NonPayableTransactionObject<void>;
|
|
97
|
+
admin(): NonPayableTransactionObject<string>;
|
|
98
|
+
A(): NonPayableTransactionObject<string>;
|
|
99
|
+
fee(): NonPayableTransactionObject<string>;
|
|
100
|
+
admin_fee(): NonPayableTransactionObject<string>;
|
|
101
|
+
rate(): NonPayableTransactionObject<string>;
|
|
102
|
+
active_band(): NonPayableTransactionObject<string>;
|
|
103
|
+
min_band(): NonPayableTransactionObject<string>;
|
|
104
|
+
max_band(): NonPayableTransactionObject<string>;
|
|
105
|
+
admin_fees_x(): NonPayableTransactionObject<string>;
|
|
106
|
+
admin_fees_y(): NonPayableTransactionObject<string>;
|
|
107
|
+
price_oracle_contract(): NonPayableTransactionObject<string>;
|
|
108
|
+
bands_x(arg0: number | string | BN): NonPayableTransactionObject<string>;
|
|
109
|
+
bands_y(arg0: number | string | BN): NonPayableTransactionObject<string>;
|
|
110
|
+
liquidity_mining_callback(): NonPayableTransactionObject<string>;
|
|
111
|
+
};
|
|
112
|
+
events: {
|
|
113
|
+
TokenExchange(cb?: Callback<TokenExchange>): EventEmitter;
|
|
114
|
+
TokenExchange(options?: EventOptions, cb?: Callback<TokenExchange>): EventEmitter;
|
|
115
|
+
Deposit(cb?: Callback<Deposit>): EventEmitter;
|
|
116
|
+
Deposit(options?: EventOptions, cb?: Callback<Deposit>): EventEmitter;
|
|
117
|
+
Withdraw(cb?: Callback<Withdraw>): EventEmitter;
|
|
118
|
+
Withdraw(options?: EventOptions, cb?: Callback<Withdraw>): EventEmitter;
|
|
119
|
+
SetRate(cb?: Callback<SetRate>): EventEmitter;
|
|
120
|
+
SetRate(options?: EventOptions, cb?: Callback<SetRate>): EventEmitter;
|
|
121
|
+
SetFee(cb?: Callback<SetFee>): EventEmitter;
|
|
122
|
+
SetFee(options?: EventOptions, cb?: Callback<SetFee>): EventEmitter;
|
|
123
|
+
SetAdminFee(cb?: Callback<SetAdminFee>): EventEmitter;
|
|
124
|
+
SetAdminFee(options?: EventOptions, cb?: Callback<SetAdminFee>): EventEmitter;
|
|
125
|
+
allEvents(options?: EventOptions, cb?: Callback<EventLog>): EventEmitter;
|
|
126
|
+
};
|
|
127
|
+
once(event: "TokenExchange", cb: Callback<TokenExchange>): void;
|
|
128
|
+
once(event: "TokenExchange", options: EventOptions, cb: Callback<TokenExchange>): void;
|
|
129
|
+
once(event: "Deposit", cb: Callback<Deposit>): void;
|
|
130
|
+
once(event: "Deposit", options: EventOptions, cb: Callback<Deposit>): void;
|
|
131
|
+
once(event: "Withdraw", cb: Callback<Withdraw>): void;
|
|
132
|
+
once(event: "Withdraw", options: EventOptions, cb: Callback<Withdraw>): void;
|
|
133
|
+
once(event: "SetRate", cb: Callback<SetRate>): void;
|
|
134
|
+
once(event: "SetRate", options: EventOptions, cb: Callback<SetRate>): void;
|
|
135
|
+
once(event: "SetFee", cb: Callback<SetFee>): void;
|
|
136
|
+
once(event: "SetFee", options: EventOptions, cb: Callback<SetFee>): void;
|
|
137
|
+
once(event: "SetAdminFee", cb: Callback<SetAdminFee>): void;
|
|
138
|
+
once(event: "SetAdminFee", options: EventOptions, cb: Callback<SetAdminFee>): void;
|
|
139
|
+
}
|
|
@@ -0,0 +1,204 @@
|
|
|
1
|
+
/// <reference types="node" />
|
|
2
|
+
import type BN from "bn.js";
|
|
3
|
+
import type { ContractOptions } from "web3-eth-contract";
|
|
4
|
+
import type { EventLog } from "web3-core";
|
|
5
|
+
import type { EventEmitter } from "events";
|
|
6
|
+
import type { Callback, PayableTransactionObject, NonPayableTransactionObject, BlockType, ContractEventLog, BaseContract } from "./types";
|
|
7
|
+
export interface EventOptions {
|
|
8
|
+
filter?: object;
|
|
9
|
+
fromBlock?: BlockType;
|
|
10
|
+
topics?: string[];
|
|
11
|
+
}
|
|
12
|
+
export type UserState = ContractEventLog<{
|
|
13
|
+
user: string;
|
|
14
|
+
collateral: string;
|
|
15
|
+
debt: string;
|
|
16
|
+
n1: string;
|
|
17
|
+
n2: string;
|
|
18
|
+
liquidation_discount: string;
|
|
19
|
+
0: string;
|
|
20
|
+
1: string;
|
|
21
|
+
2: string;
|
|
22
|
+
3: string;
|
|
23
|
+
4: string;
|
|
24
|
+
5: string;
|
|
25
|
+
}>;
|
|
26
|
+
export type Borrow = ContractEventLog<{
|
|
27
|
+
user: string;
|
|
28
|
+
collateral_increase: string;
|
|
29
|
+
loan_increase: string;
|
|
30
|
+
0: string;
|
|
31
|
+
1: string;
|
|
32
|
+
2: string;
|
|
33
|
+
}>;
|
|
34
|
+
export type Repay = ContractEventLog<{
|
|
35
|
+
user: string;
|
|
36
|
+
collateral_decrease: string;
|
|
37
|
+
loan_decrease: string;
|
|
38
|
+
0: string;
|
|
39
|
+
1: string;
|
|
40
|
+
2: string;
|
|
41
|
+
}>;
|
|
42
|
+
export type RemoveCollateral = ContractEventLog<{
|
|
43
|
+
user: string;
|
|
44
|
+
collateral_decrease: string;
|
|
45
|
+
0: string;
|
|
46
|
+
1: string;
|
|
47
|
+
}>;
|
|
48
|
+
export type Liquidate = ContractEventLog<{
|
|
49
|
+
liquidator: string;
|
|
50
|
+
user: string;
|
|
51
|
+
collateral_received: string;
|
|
52
|
+
stablecoin_received: string;
|
|
53
|
+
debt: string;
|
|
54
|
+
0: string;
|
|
55
|
+
1: string;
|
|
56
|
+
2: string;
|
|
57
|
+
3: string;
|
|
58
|
+
4: string;
|
|
59
|
+
}>;
|
|
60
|
+
export type SetMonetaryPolicy = ContractEventLog<{
|
|
61
|
+
monetary_policy: string;
|
|
62
|
+
0: string;
|
|
63
|
+
}>;
|
|
64
|
+
export type SetBorrowingDiscounts = ContractEventLog<{
|
|
65
|
+
loan_discount: string;
|
|
66
|
+
liquidation_discount: string;
|
|
67
|
+
0: string;
|
|
68
|
+
1: string;
|
|
69
|
+
}>;
|
|
70
|
+
export type CollectFees = ContractEventLog<{
|
|
71
|
+
amount: string;
|
|
72
|
+
new_supply: string;
|
|
73
|
+
0: string;
|
|
74
|
+
1: string;
|
|
75
|
+
}>;
|
|
76
|
+
export interface CrvUSDtBTCController extends BaseContract {
|
|
77
|
+
constructor(jsonInterface: any[], address?: string, options?: ContractOptions): CrvUSDtBTCController;
|
|
78
|
+
clone(): CrvUSDtBTCController;
|
|
79
|
+
methods: {
|
|
80
|
+
factory(): NonPayableTransactionObject<string>;
|
|
81
|
+
amm(): NonPayableTransactionObject<string>;
|
|
82
|
+
collateral_token(): NonPayableTransactionObject<string>;
|
|
83
|
+
debt(user: string): NonPayableTransactionObject<string>;
|
|
84
|
+
loan_exists(user: string): NonPayableTransactionObject<boolean>;
|
|
85
|
+
total_debt(): NonPayableTransactionObject<string>;
|
|
86
|
+
max_borrowable(collateral: number | string | BN, N: number | string | BN): NonPayableTransactionObject<string>;
|
|
87
|
+
min_collateral(debt: number | string | BN, N: number | string | BN): NonPayableTransactionObject<string>;
|
|
88
|
+
calculate_debt_n1(collateral: number | string | BN, debt: number | string | BN, N: number | string | BN): NonPayableTransactionObject<string>;
|
|
89
|
+
create_loan(collateral: number | string | BN, debt: number | string | BN, N: number | string | BN): PayableTransactionObject<void>;
|
|
90
|
+
create_loan_extended(collateral: number | string | BN, debt: number | string | BN, N: number | string | BN, callbacker: string, callback_args: number | string | BN[]): PayableTransactionObject<void>;
|
|
91
|
+
"add_collateral(uint256)"(collateral: number | string | BN): PayableTransactionObject<void>;
|
|
92
|
+
"add_collateral(uint256,address)"(collateral: number | string | BN, _for: string): PayableTransactionObject<void>;
|
|
93
|
+
"remove_collateral(uint256)"(collateral: number | string | BN): NonPayableTransactionObject<void>;
|
|
94
|
+
"remove_collateral(uint256,bool)"(collateral: number | string | BN, use_eth: boolean): NonPayableTransactionObject<void>;
|
|
95
|
+
borrow_more(collateral: number | string | BN, debt: number | string | BN): PayableTransactionObject<void>;
|
|
96
|
+
"repay(uint256)"(_d_debt: number | string | BN): PayableTransactionObject<void>;
|
|
97
|
+
"repay(uint256,address)"(_d_debt: number | string | BN, _for: string): PayableTransactionObject<void>;
|
|
98
|
+
"repay(uint256,address,int256)"(_d_debt: number | string | BN, _for: string, max_active_band: number | string | BN): PayableTransactionObject<void>;
|
|
99
|
+
"repay(uint256,address,int256,bool)"(_d_debt: number | string | BN, _for: string, max_active_band: number | string | BN, use_eth: boolean): PayableTransactionObject<void>;
|
|
100
|
+
repay_extended(callbacker: string, callback_args: number | string | BN[]): NonPayableTransactionObject<void>;
|
|
101
|
+
"health_calculator(address,int256,int256,bool)"(user: string, d_collateral: number | string | BN, d_debt: number | string | BN, full: boolean): NonPayableTransactionObject<string>;
|
|
102
|
+
"health_calculator(address,int256,int256,bool,uint256)"(user: string, d_collateral: number | string | BN, d_debt: number | string | BN, full: boolean, N: number | string | BN): NonPayableTransactionObject<string>;
|
|
103
|
+
"liquidate(address,uint256)"(user: string, min_x: number | string | BN): NonPayableTransactionObject<void>;
|
|
104
|
+
"liquidate(address,uint256,bool)"(user: string, min_x: number | string | BN, use_eth: boolean): NonPayableTransactionObject<void>;
|
|
105
|
+
liquidate_extended(user: string, min_x: number | string | BN, frac: number | string | BN, use_eth: boolean, callbacker: string, callback_args: number | string | BN[]): NonPayableTransactionObject<void>;
|
|
106
|
+
"tokens_to_liquidate(address)"(user: string): NonPayableTransactionObject<string>;
|
|
107
|
+
"tokens_to_liquidate(address,uint256)"(user: string, frac: number | string | BN): NonPayableTransactionObject<string>;
|
|
108
|
+
"health(address)"(user: string): NonPayableTransactionObject<string>;
|
|
109
|
+
"health(address,bool)"(user: string, full: boolean): NonPayableTransactionObject<string>;
|
|
110
|
+
"users_to_liquidate()"(): NonPayableTransactionObject<[
|
|
111
|
+
string,
|
|
112
|
+
string,
|
|
113
|
+
string,
|
|
114
|
+
string,
|
|
115
|
+
string
|
|
116
|
+
] & {
|
|
117
|
+
user: string;
|
|
118
|
+
x: string;
|
|
119
|
+
y: string;
|
|
120
|
+
debt: string;
|
|
121
|
+
health: string;
|
|
122
|
+
}[]>;
|
|
123
|
+
"users_to_liquidate(uint256)"(_from: number | string | BN): NonPayableTransactionObject<[
|
|
124
|
+
string,
|
|
125
|
+
string,
|
|
126
|
+
string,
|
|
127
|
+
string,
|
|
128
|
+
string
|
|
129
|
+
] & {
|
|
130
|
+
user: string;
|
|
131
|
+
x: string;
|
|
132
|
+
y: string;
|
|
133
|
+
debt: string;
|
|
134
|
+
health: string;
|
|
135
|
+
}[]>;
|
|
136
|
+
"users_to_liquidate(uint256,uint256)"(_from: number | string | BN, _limit: number | string | BN): NonPayableTransactionObject<[
|
|
137
|
+
string,
|
|
138
|
+
string,
|
|
139
|
+
string,
|
|
140
|
+
string,
|
|
141
|
+
string
|
|
142
|
+
] & {
|
|
143
|
+
user: string;
|
|
144
|
+
x: string;
|
|
145
|
+
y: string;
|
|
146
|
+
debt: string;
|
|
147
|
+
health: string;
|
|
148
|
+
}[]>;
|
|
149
|
+
amm_price(): NonPayableTransactionObject<string>;
|
|
150
|
+
user_prices(user: string): NonPayableTransactionObject<[string, string]>;
|
|
151
|
+
user_state(user: string): NonPayableTransactionObject<[string, string, string, string]>;
|
|
152
|
+
set_amm_fee(fee: number | string | BN): NonPayableTransactionObject<void>;
|
|
153
|
+
set_amm_admin_fee(fee: number | string | BN): NonPayableTransactionObject<void>;
|
|
154
|
+
set_monetary_policy(monetary_policy: string): NonPayableTransactionObject<void>;
|
|
155
|
+
set_borrowing_discounts(loan_discount: number | string | BN, liquidation_discount: number | string | BN): NonPayableTransactionObject<void>;
|
|
156
|
+
set_callback(cb: string): NonPayableTransactionObject<void>;
|
|
157
|
+
admin_fees(): NonPayableTransactionObject<string>;
|
|
158
|
+
collect_fees(): NonPayableTransactionObject<string>;
|
|
159
|
+
liquidation_discounts(arg0: string): NonPayableTransactionObject<string>;
|
|
160
|
+
loans(arg0: number | string | BN): NonPayableTransactionObject<string>;
|
|
161
|
+
loan_ix(arg0: string): NonPayableTransactionObject<string>;
|
|
162
|
+
n_loans(): NonPayableTransactionObject<string>;
|
|
163
|
+
minted(): NonPayableTransactionObject<string>;
|
|
164
|
+
redeemed(): NonPayableTransactionObject<string>;
|
|
165
|
+
monetary_policy(): NonPayableTransactionObject<string>;
|
|
166
|
+
liquidation_discount(): NonPayableTransactionObject<string>;
|
|
167
|
+
loan_discount(): NonPayableTransactionObject<string>;
|
|
168
|
+
};
|
|
169
|
+
events: {
|
|
170
|
+
UserState(cb?: Callback<UserState>): EventEmitter;
|
|
171
|
+
UserState(options?: EventOptions, cb?: Callback<UserState>): EventEmitter;
|
|
172
|
+
Borrow(cb?: Callback<Borrow>): EventEmitter;
|
|
173
|
+
Borrow(options?: EventOptions, cb?: Callback<Borrow>): EventEmitter;
|
|
174
|
+
Repay(cb?: Callback<Repay>): EventEmitter;
|
|
175
|
+
Repay(options?: EventOptions, cb?: Callback<Repay>): EventEmitter;
|
|
176
|
+
RemoveCollateral(cb?: Callback<RemoveCollateral>): EventEmitter;
|
|
177
|
+
RemoveCollateral(options?: EventOptions, cb?: Callback<RemoveCollateral>): EventEmitter;
|
|
178
|
+
Liquidate(cb?: Callback<Liquidate>): EventEmitter;
|
|
179
|
+
Liquidate(options?: EventOptions, cb?: Callback<Liquidate>): EventEmitter;
|
|
180
|
+
SetMonetaryPolicy(cb?: Callback<SetMonetaryPolicy>): EventEmitter;
|
|
181
|
+
SetMonetaryPolicy(options?: EventOptions, cb?: Callback<SetMonetaryPolicy>): EventEmitter;
|
|
182
|
+
SetBorrowingDiscounts(cb?: Callback<SetBorrowingDiscounts>): EventEmitter;
|
|
183
|
+
SetBorrowingDiscounts(options?: EventOptions, cb?: Callback<SetBorrowingDiscounts>): EventEmitter;
|
|
184
|
+
CollectFees(cb?: Callback<CollectFees>): EventEmitter;
|
|
185
|
+
CollectFees(options?: EventOptions, cb?: Callback<CollectFees>): EventEmitter;
|
|
186
|
+
allEvents(options?: EventOptions, cb?: Callback<EventLog>): EventEmitter;
|
|
187
|
+
};
|
|
188
|
+
once(event: "UserState", cb: Callback<UserState>): void;
|
|
189
|
+
once(event: "UserState", options: EventOptions, cb: Callback<UserState>): void;
|
|
190
|
+
once(event: "Borrow", cb: Callback<Borrow>): void;
|
|
191
|
+
once(event: "Borrow", options: EventOptions, cb: Callback<Borrow>): void;
|
|
192
|
+
once(event: "Repay", cb: Callback<Repay>): void;
|
|
193
|
+
once(event: "Repay", options: EventOptions, cb: Callback<Repay>): void;
|
|
194
|
+
once(event: "RemoveCollateral", cb: Callback<RemoveCollateral>): void;
|
|
195
|
+
once(event: "RemoveCollateral", options: EventOptions, cb: Callback<RemoveCollateral>): void;
|
|
196
|
+
once(event: "Liquidate", cb: Callback<Liquidate>): void;
|
|
197
|
+
once(event: "Liquidate", options: EventOptions, cb: Callback<Liquidate>): void;
|
|
198
|
+
once(event: "SetMonetaryPolicy", cb: Callback<SetMonetaryPolicy>): void;
|
|
199
|
+
once(event: "SetMonetaryPolicy", options: EventOptions, cb: Callback<SetMonetaryPolicy>): void;
|
|
200
|
+
once(event: "SetBorrowingDiscounts", cb: Callback<SetBorrowingDiscounts>): void;
|
|
201
|
+
once(event: "SetBorrowingDiscounts", options: EventOptions, cb: Callback<SetBorrowingDiscounts>): void;
|
|
202
|
+
once(event: "CollectFees", cb: Callback<CollectFees>): void;
|
|
203
|
+
once(event: "CollectFees", options: EventOptions, cb: Callback<CollectFees>): void;
|
|
204
|
+
}
|
|
@@ -56,6 +56,8 @@ export type { CrvUSDFactory } from "./CrvUSDFactory";
|
|
|
56
56
|
export type { CrvUSDView } from "./CrvUSDView";
|
|
57
57
|
export type { CrvUSDWBTCAmm } from "./CrvUSDWBTCAmm";
|
|
58
58
|
export type { CrvUSDWBTCController } from "./CrvUSDWBTCController";
|
|
59
|
+
export type { CrvUSDtBTCAmm } from "./CrvUSDtBTCAmm";
|
|
60
|
+
export type { CrvUSDtBTCController } from "./CrvUSDtBTCController";
|
|
59
61
|
export type { CrvUSDwstETHAmm } from "./CrvUSDwstETHAmm";
|
|
60
62
|
export type { CrvUSDwstETHController } from "./CrvUSDwstETHController";
|
|
61
63
|
export type { WstETH } from "./WstETH";
|
package/cjs/types/curveUsd.d.ts
CHANGED