@defisaver/positions-sdk 0.0.49 → 0.0.52
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 +62 -1
- package/cjs/config/contracts.js +10 -4
- package/cjs/markets/llamaLend/index.d.ts +2 -0
- package/cjs/markets/llamaLend/index.js +22 -7
- package/cjs/types/contracts/generated/LlamaLendCrvUSDCRVController.d.ts +209 -0
- package/cjs/types/contracts/generated/{LlamaLendCrvUSDCRVDController.d.ts → LlamaLendTBTCCrvUSDController.d.ts} +3 -3
- package/cjs/types/contracts/generated/LlamaLendTBTCCrvUSDController.js +5 -0
- package/cjs/types/contracts/generated/index.d.ts +2 -1
- package/cjs/types/llamaLend.d.ts +2 -1
- package/cjs/types/llamaLend.js +1 -0
- package/esm/config/contracts.d.ts +62 -1
- package/esm/config/contracts.js +10 -4
- package/esm/markets/llamaLend/index.d.ts +2 -0
- package/esm/markets/llamaLend/index.js +20 -6
- package/esm/types/contracts/generated/LlamaLendCrvUSDCRVController.d.ts +209 -0
- package/esm/types/contracts/generated/{LlamaLendCrvUSDCRVDController.d.ts → LlamaLendTBTCCrvUSDController.d.ts} +3 -3
- package/esm/types/contracts/generated/LlamaLendTBTCCrvUSDController.js +4 -0
- package/esm/types/contracts/generated/index.d.ts +2 -1
- package/esm/types/llamaLend.d.ts +2 -1
- package/esm/types/llamaLend.js +1 -0
- package/package.json +1 -1
- package/src/config/contracts.js +10 -4
- package/src/markets/llamaLend/index.ts +21 -7
- package/src/types/contracts/generated/LlamaLendCrvUSDCRVController.ts +416 -0
- package/src/types/contracts/generated/{LlamaLendCrvUSDCRVDController.ts → LlamaLendTBTCCrvUSDController.ts} +3 -3
- package/src/types/contracts/generated/index.ts +2 -1
- package/src/types/llamaLend.ts +1 -0
- package/yarn-error.log +64 -0
- /package/cjs/types/contracts/generated/{LlamaLendCrvUSDCRVDController.js → LlamaLendCrvUSDCRVController.js} +0 -0
- /package/esm/types/contracts/generated/{LlamaLendCrvUSDCRVDController.js → LlamaLendCrvUSDCRVController.js} +0 -0
|
@@ -4792,7 +4792,7 @@ export namespace LlamaLendCRVCrvUSDController {
|
|
|
4792
4792
|
};
|
|
4793
4793
|
export { networks_71 as networks };
|
|
4794
4794
|
}
|
|
4795
|
-
export namespace
|
|
4795
|
+
export namespace LlamaLendCrvUSDCRVController {
|
|
4796
4796
|
let abi_72: ({
|
|
4797
4797
|
name: string;
|
|
4798
4798
|
inputs: {
|
|
@@ -4853,3 +4853,64 @@ export namespace LlamaLendCrvUSDCRVDController {
|
|
|
4853
4853
|
};
|
|
4854
4854
|
export { networks_72 as networks };
|
|
4855
4855
|
}
|
|
4856
|
+
export namespace LlamaLendTBTCCrvUSDController {
|
|
4857
|
+
let abi_73: ({
|
|
4858
|
+
name: string;
|
|
4859
|
+
inputs: {
|
|
4860
|
+
name: string;
|
|
4861
|
+
type: string;
|
|
4862
|
+
indexed: boolean;
|
|
4863
|
+
}[];
|
|
4864
|
+
anonymous: boolean;
|
|
4865
|
+
type: string;
|
|
4866
|
+
stateMutability?: undefined;
|
|
4867
|
+
outputs?: undefined;
|
|
4868
|
+
} | {
|
|
4869
|
+
stateMutability: string;
|
|
4870
|
+
type: string;
|
|
4871
|
+
inputs: {
|
|
4872
|
+
name: string;
|
|
4873
|
+
type: string;
|
|
4874
|
+
}[];
|
|
4875
|
+
outputs: never[];
|
|
4876
|
+
name?: undefined;
|
|
4877
|
+
anonymous?: undefined;
|
|
4878
|
+
} | {
|
|
4879
|
+
stateMutability: string;
|
|
4880
|
+
type: string;
|
|
4881
|
+
name: string;
|
|
4882
|
+
inputs: {
|
|
4883
|
+
name: string;
|
|
4884
|
+
type: string;
|
|
4885
|
+
}[];
|
|
4886
|
+
outputs: {
|
|
4887
|
+
name: string;
|
|
4888
|
+
type: string;
|
|
4889
|
+
}[];
|
|
4890
|
+
anonymous?: undefined;
|
|
4891
|
+
} | {
|
|
4892
|
+
stateMutability: string;
|
|
4893
|
+
type: string;
|
|
4894
|
+
name: string;
|
|
4895
|
+
inputs: {
|
|
4896
|
+
name: string;
|
|
4897
|
+
type: string;
|
|
4898
|
+
}[];
|
|
4899
|
+
outputs: {
|
|
4900
|
+
name: string;
|
|
4901
|
+
type: string;
|
|
4902
|
+
components: {
|
|
4903
|
+
name: string;
|
|
4904
|
+
type: string;
|
|
4905
|
+
}[];
|
|
4906
|
+
}[];
|
|
4907
|
+
anonymous?: undefined;
|
|
4908
|
+
})[];
|
|
4909
|
+
export { abi_73 as abi };
|
|
4910
|
+
let networks_73: {
|
|
4911
|
+
"1": {
|
|
4912
|
+
address: string;
|
|
4913
|
+
};
|
|
4914
|
+
};
|
|
4915
|
+
export { networks_73 as networks };
|
|
4916
|
+
}
|
package/cjs/config/contracts.js
CHANGED
|
@@ -828,19 +828,25 @@ module.exports = {
|
|
|
828
828
|
"LlamaLendWstETHCrvUSDController": {
|
|
829
829
|
"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" }] }],
|
|
830
830
|
"networks": {
|
|
831
|
-
"1": { "address": "
|
|
831
|
+
"1": { "address": "0x1E0165DbD2019441aB7927C018701f3138114D71" }
|
|
832
832
|
}
|
|
833
833
|
},
|
|
834
834
|
"LlamaLendCRVCrvUSDController": {
|
|
835
835
|
"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" }] }],
|
|
836
836
|
"networks": {
|
|
837
|
-
"1": { "address": "
|
|
837
|
+
"1": { "address": "0xEdA215b7666936DEd834f76f3fBC6F323295110A" }
|
|
838
838
|
}
|
|
839
839
|
},
|
|
840
|
-
"
|
|
840
|
+
"LlamaLendCrvUSDCRVController": {
|
|
841
841
|
"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" }] }],
|
|
842
842
|
"networks": {
|
|
843
|
-
"1": { "address": "
|
|
843
|
+
"1": { "address": "0xC510d73Ad34BeDECa8978B6914461aA7b50CF3Fc" }
|
|
844
|
+
}
|
|
845
|
+
},
|
|
846
|
+
"LlamaLendTBTCCrvUSDController": {
|
|
847
|
+
"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" }] }],
|
|
848
|
+
"networks": {
|
|
849
|
+
"1": { "address": "0x413FD2511BAD510947a91f5c6c79EBD8138C29Fc" }
|
|
844
850
|
}
|
|
845
851
|
},
|
|
846
852
|
};
|
|
@@ -3,10 +3,12 @@ import { NetworkNumber } from '../../types/common';
|
|
|
3
3
|
export declare const LLAMALEND_WSTETH_CRVUSD_MARKET: (networkId: NetworkNumber) => LlamaLendMarketData;
|
|
4
4
|
export declare const LLAMALEND_CRVUSD_CRV_MARKET: (networkId: NetworkNumber) => LlamaLendMarketData;
|
|
5
5
|
export declare const LLAMALEND_CRV_CRVUSD_MARKET: (networkId: NetworkNumber) => LlamaLendMarketData;
|
|
6
|
+
export declare const LLAMALEND_TBTC_CRVUSD_MARKET: (networkId: NetworkNumber) => LlamaLendMarketData;
|
|
6
7
|
export declare const LlamaLendMarkets: (networkId: NetworkNumber) => {
|
|
7
8
|
readonly llamaLendwstETHcrvUSD: LlamaLendMarketData;
|
|
8
9
|
readonly llamaLendcrvUSDCRV: LlamaLendMarketData;
|
|
9
10
|
readonly llamaLendCRVcrvUSD: LlamaLendMarketData;
|
|
11
|
+
readonly llamaLendTBTCcrvUSD: LlamaLendMarketData;
|
|
10
12
|
};
|
|
11
13
|
export declare const LLAMALEND_ALL_VERSIONS: LlamaLendVersions[];
|
|
12
14
|
export declare const getLlamaLendMarketData: (market: LlamaLendVersions, network?: NetworkNumber) => LlamaLendMarketData;
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.getLlamaLendMarketData = exports.LLAMALEND_ALL_VERSIONS = exports.LlamaLendMarkets = exports.LLAMALEND_CRV_CRVUSD_MARKET = exports.LLAMALEND_CRVUSD_CRV_MARKET = exports.LLAMALEND_WSTETH_CRVUSD_MARKET = void 0;
|
|
3
|
+
exports.getLlamaLendMarketData = exports.LLAMALEND_ALL_VERSIONS = exports.LlamaLendMarkets = exports.LLAMALEND_TBTC_CRVUSD_MARKET = exports.LLAMALEND_CRV_CRVUSD_MARKET = exports.LLAMALEND_CRVUSD_CRV_MARKET = exports.LLAMALEND_WSTETH_CRVUSD_MARKET = void 0;
|
|
4
|
+
const contracts_1 = require("../../contracts");
|
|
4
5
|
const types_1 = require("../../types");
|
|
5
6
|
const LLAMALEND_WSTETH_CRVUSD_MARKET = (networkId) => ({
|
|
6
7
|
chainIds: [1],
|
|
@@ -9,8 +10,8 @@ const LLAMALEND_WSTETH_CRVUSD_MARKET = (networkId) => ({
|
|
|
9
10
|
value: types_1.LlamaLendVersions.LlamaLendwstETHcrvUSD,
|
|
10
11
|
collAsset: 'wstETH',
|
|
11
12
|
baseAsset: 'crvUSD',
|
|
12
|
-
controllerAddress: '
|
|
13
|
-
vaultAddress: '
|
|
13
|
+
controllerAddress: (0, contracts_1.getConfigContractAddress)('LlamaLendWstETHCrvUSDController', networkId),
|
|
14
|
+
vaultAddress: '0x8cf1DE26729cfB7137AF1A6B2a665e099EC319b5',
|
|
14
15
|
url: 'wstethcrvusd',
|
|
15
16
|
});
|
|
16
17
|
exports.LLAMALEND_WSTETH_CRVUSD_MARKET = LLAMALEND_WSTETH_CRVUSD_MARKET;
|
|
@@ -21,8 +22,8 @@ const LLAMALEND_CRVUSD_CRV_MARKET = (networkId) => ({
|
|
|
21
22
|
value: types_1.LlamaLendVersions.LlamaLendcrvUSDCRV,
|
|
22
23
|
collAsset: 'crvUSD',
|
|
23
24
|
baseAsset: 'CRV',
|
|
24
|
-
controllerAddress: '
|
|
25
|
-
vaultAddress: '
|
|
25
|
+
controllerAddress: (0, contracts_1.getConfigContractAddress)('LlamaLendCrvUSDCRVController', networkId),
|
|
26
|
+
vaultAddress: '0x4D2f44B0369f3C20c3d670D2C26b048985598450',
|
|
26
27
|
url: 'crvusdcrv',
|
|
27
28
|
});
|
|
28
29
|
exports.LLAMALEND_CRVUSD_CRV_MARKET = LLAMALEND_CRVUSD_CRV_MARKET;
|
|
@@ -33,21 +34,35 @@ const LLAMALEND_CRV_CRVUSD_MARKET = (networkId) => ({
|
|
|
33
34
|
value: types_1.LlamaLendVersions.LlamaLendCRVcrvUSD,
|
|
34
35
|
collAsset: 'CRV',
|
|
35
36
|
baseAsset: 'crvUSD',
|
|
36
|
-
controllerAddress: '
|
|
37
|
-
vaultAddress: '
|
|
37
|
+
controllerAddress: (0, contracts_1.getConfigContractAddress)('LlamaLendCRVCrvUSDController', networkId),
|
|
38
|
+
vaultAddress: '0xCeA18a8752bb7e7817F9AE7565328FE415C0f2cA',
|
|
38
39
|
url: 'crvcrvusd',
|
|
39
40
|
});
|
|
40
41
|
exports.LLAMALEND_CRV_CRVUSD_MARKET = LLAMALEND_CRV_CRVUSD_MARKET;
|
|
42
|
+
const LLAMALEND_TBTC_CRVUSD_MARKET = (networkId) => ({
|
|
43
|
+
chainIds: [1],
|
|
44
|
+
label: 'LlamaLend - TBTC/crvUSD',
|
|
45
|
+
shortLabel: 'TBTC/crvUSD',
|
|
46
|
+
value: types_1.LlamaLendVersions.LlamaLendTBTCcrvUSD,
|
|
47
|
+
collAsset: 'tBTC',
|
|
48
|
+
baseAsset: 'crvUSD',
|
|
49
|
+
controllerAddress: (0, contracts_1.getConfigContractAddress)('LlamaLendTBTCCrvUSDController', networkId),
|
|
50
|
+
vaultAddress: '0xb2b23C87a4B6d1b03Ba603F7C3EB9A81fDC0AAC9',
|
|
51
|
+
url: 'tbtccrvusd',
|
|
52
|
+
});
|
|
53
|
+
exports.LLAMALEND_TBTC_CRVUSD_MARKET = LLAMALEND_TBTC_CRVUSD_MARKET;
|
|
41
54
|
const LlamaLendMarkets = (networkId) => ({
|
|
42
55
|
[types_1.LlamaLendVersions.LlamaLendwstETHcrvUSD]: (0, exports.LLAMALEND_WSTETH_CRVUSD_MARKET)(networkId),
|
|
43
56
|
[types_1.LlamaLendVersions.LlamaLendcrvUSDCRV]: (0, exports.LLAMALEND_CRVUSD_CRV_MARKET)(networkId),
|
|
44
57
|
[types_1.LlamaLendVersions.LlamaLendCRVcrvUSD]: (0, exports.LLAMALEND_CRV_CRVUSD_MARKET)(networkId),
|
|
58
|
+
[types_1.LlamaLendVersions.LlamaLendTBTCcrvUSD]: (0, exports.LLAMALEND_TBTC_CRVUSD_MARKET)(networkId),
|
|
45
59
|
});
|
|
46
60
|
exports.LlamaLendMarkets = LlamaLendMarkets;
|
|
47
61
|
exports.LLAMALEND_ALL_VERSIONS = [
|
|
48
62
|
types_1.LlamaLendVersions.LlamaLendwstETHcrvUSD,
|
|
49
63
|
types_1.LlamaLendVersions.LlamaLendcrvUSDCRV,
|
|
50
64
|
types_1.LlamaLendVersions.LlamaLendCRVcrvUSD,
|
|
65
|
+
types_1.LlamaLendVersions.LlamaLendTBTCcrvUSD,
|
|
51
66
|
];
|
|
52
67
|
const getLlamaLendMarketData = (market, network = 1) => (0, exports.LlamaLendMarkets)(network)[market];
|
|
53
68
|
exports.getLlamaLendMarketData = getLlamaLendMarketData;
|
|
@@ -0,0 +1,209 @@
|
|
|
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 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 LlamaLendCrvUSDCRVController extends BaseContract {
|
|
77
|
+
constructor(jsonInterface: any[], address?: string, options?: ContractOptions): LlamaLendCrvUSDCRVController;
|
|
78
|
+
clone(): LlamaLendCrvUSDCRVController;
|
|
79
|
+
methods: {
|
|
80
|
+
factory(): NonPayableTransactionObject<string>;
|
|
81
|
+
amm(): NonPayableTransactionObject<string>;
|
|
82
|
+
collateral_token(): NonPayableTransactionObject<string>;
|
|
83
|
+
borrowed_token(): NonPayableTransactionObject<string>;
|
|
84
|
+
save_rate(): NonPayableTransactionObject<void>;
|
|
85
|
+
debt(user: string): NonPayableTransactionObject<string>;
|
|
86
|
+
loan_exists(user: string): NonPayableTransactionObject<boolean>;
|
|
87
|
+
total_debt(): NonPayableTransactionObject<string>;
|
|
88
|
+
"max_borrowable(uint256,uint256)"(collateral: number | string | BN, N: number | string | BN): NonPayableTransactionObject<string>;
|
|
89
|
+
"max_borrowable(uint256,uint256,uint256)"(collateral: number | string | BN, N: number | string | BN, current_debt: number | string | BN): NonPayableTransactionObject<string>;
|
|
90
|
+
min_collateral(debt: number | string | BN, N: number | string | BN): NonPayableTransactionObject<string>;
|
|
91
|
+
calculate_debt_n1(collateral: number | string | BN, debt: number | string | BN, N: number | string | BN): NonPayableTransactionObject<string>;
|
|
92
|
+
create_loan(collateral: number | string | BN, debt: number | string | BN, N: number | string | BN): NonPayableTransactionObject<void>;
|
|
93
|
+
create_loan_extended(collateral: number | string | BN, debt: number | string | BN, N: number | string | BN, callbacker: string, callback_args: number | string | BN[]): NonPayableTransactionObject<void>;
|
|
94
|
+
"add_collateral(uint256)"(collateral: number | string | BN): NonPayableTransactionObject<void>;
|
|
95
|
+
"add_collateral(uint256,address)"(collateral: number | string | BN, _for: string): NonPayableTransactionObject<void>;
|
|
96
|
+
"remove_collateral(uint256)"(collateral: number | string | BN): NonPayableTransactionObject<void>;
|
|
97
|
+
"remove_collateral(uint256,bool)"(collateral: number | string | BN, use_eth: boolean): NonPayableTransactionObject<void>;
|
|
98
|
+
borrow_more(collateral: number | string | BN, debt: number | string | BN): NonPayableTransactionObject<void>;
|
|
99
|
+
borrow_more_extended(collateral: number | string | BN, debt: number | string | BN, callbacker: string, callback_args: number | string | BN[]): NonPayableTransactionObject<void>;
|
|
100
|
+
"repay(uint256)"(_d_debt: number | string | BN): NonPayableTransactionObject<void>;
|
|
101
|
+
"repay(uint256,address)"(_d_debt: number | string | BN, _for: string): NonPayableTransactionObject<void>;
|
|
102
|
+
"repay(uint256,address,int256)"(_d_debt: number | string | BN, _for: string, max_active_band: number | string | BN): NonPayableTransactionObject<void>;
|
|
103
|
+
"repay(uint256,address,int256,bool)"(_d_debt: number | string | BN, _for: string, max_active_band: number | string | BN, use_eth: boolean): NonPayableTransactionObject<void>;
|
|
104
|
+
repay_extended(callbacker: string, callback_args: number | string | BN[]): NonPayableTransactionObject<void>;
|
|
105
|
+
"health_calculator(address,int256,int256,bool)"(user: string, d_collateral: number | string | BN, d_debt: number | string | BN, full: boolean): NonPayableTransactionObject<string>;
|
|
106
|
+
"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>;
|
|
107
|
+
"liquidate(address,uint256)"(user: string, min_x: number | string | BN): NonPayableTransactionObject<void>;
|
|
108
|
+
"liquidate(address,uint256,bool)"(user: string, min_x: number | string | BN, use_eth: boolean): NonPayableTransactionObject<void>;
|
|
109
|
+
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>;
|
|
110
|
+
"tokens_to_liquidate(address)"(user: string): NonPayableTransactionObject<string>;
|
|
111
|
+
"tokens_to_liquidate(address,uint256)"(user: string, frac: number | string | BN): NonPayableTransactionObject<string>;
|
|
112
|
+
"health(address)"(user: string): NonPayableTransactionObject<string>;
|
|
113
|
+
"health(address,bool)"(user: string, full: boolean): NonPayableTransactionObject<string>;
|
|
114
|
+
"users_to_liquidate()"(): NonPayableTransactionObject<[
|
|
115
|
+
string,
|
|
116
|
+
string,
|
|
117
|
+
string,
|
|
118
|
+
string,
|
|
119
|
+
string
|
|
120
|
+
] & {
|
|
121
|
+
user: string;
|
|
122
|
+
x: string;
|
|
123
|
+
y: string;
|
|
124
|
+
debt: string;
|
|
125
|
+
health: string;
|
|
126
|
+
}[]>;
|
|
127
|
+
"users_to_liquidate(uint256)"(_from: number | string | BN): NonPayableTransactionObject<[
|
|
128
|
+
string,
|
|
129
|
+
string,
|
|
130
|
+
string,
|
|
131
|
+
string,
|
|
132
|
+
string
|
|
133
|
+
] & {
|
|
134
|
+
user: string;
|
|
135
|
+
x: string;
|
|
136
|
+
y: string;
|
|
137
|
+
debt: string;
|
|
138
|
+
health: string;
|
|
139
|
+
}[]>;
|
|
140
|
+
"users_to_liquidate(uint256,uint256)"(_from: number | string | BN, _limit: number | string | BN): NonPayableTransactionObject<[
|
|
141
|
+
string,
|
|
142
|
+
string,
|
|
143
|
+
string,
|
|
144
|
+
string,
|
|
145
|
+
string
|
|
146
|
+
] & {
|
|
147
|
+
user: string;
|
|
148
|
+
x: string;
|
|
149
|
+
y: string;
|
|
150
|
+
debt: string;
|
|
151
|
+
health: string;
|
|
152
|
+
}[]>;
|
|
153
|
+
amm_price(): NonPayableTransactionObject<string>;
|
|
154
|
+
user_prices(user: string): NonPayableTransactionObject<[string, string]>;
|
|
155
|
+
user_state(user: string): NonPayableTransactionObject<[string, string, string, string]>;
|
|
156
|
+
set_amm_fee(fee: number | string | BN): NonPayableTransactionObject<void>;
|
|
157
|
+
set_amm_admin_fee(fee: number | string | BN): NonPayableTransactionObject<void>;
|
|
158
|
+
set_monetary_policy(monetary_policy: string): NonPayableTransactionObject<void>;
|
|
159
|
+
set_borrowing_discounts(loan_discount: number | string | BN, liquidation_discount: number | string | BN): NonPayableTransactionObject<void>;
|
|
160
|
+
set_callback(cb: string): NonPayableTransactionObject<void>;
|
|
161
|
+
admin_fees(): NonPayableTransactionObject<string>;
|
|
162
|
+
collect_fees(): NonPayableTransactionObject<string>;
|
|
163
|
+
check_lock(): NonPayableTransactionObject<boolean>;
|
|
164
|
+
liquidation_discounts(arg0: string): NonPayableTransactionObject<string>;
|
|
165
|
+
loans(arg0: number | string | BN): NonPayableTransactionObject<string>;
|
|
166
|
+
loan_ix(arg0: string): NonPayableTransactionObject<string>;
|
|
167
|
+
n_loans(): NonPayableTransactionObject<string>;
|
|
168
|
+
minted(): NonPayableTransactionObject<string>;
|
|
169
|
+
redeemed(): NonPayableTransactionObject<string>;
|
|
170
|
+
monetary_policy(): NonPayableTransactionObject<string>;
|
|
171
|
+
liquidation_discount(): NonPayableTransactionObject<string>;
|
|
172
|
+
loan_discount(): NonPayableTransactionObject<string>;
|
|
173
|
+
};
|
|
174
|
+
events: {
|
|
175
|
+
UserState(cb?: Callback<UserState>): EventEmitter;
|
|
176
|
+
UserState(options?: EventOptions, cb?: Callback<UserState>): EventEmitter;
|
|
177
|
+
Borrow(cb?: Callback<Borrow>): EventEmitter;
|
|
178
|
+
Borrow(options?: EventOptions, cb?: Callback<Borrow>): EventEmitter;
|
|
179
|
+
Repay(cb?: Callback<Repay>): EventEmitter;
|
|
180
|
+
Repay(options?: EventOptions, cb?: Callback<Repay>): EventEmitter;
|
|
181
|
+
RemoveCollateral(cb?: Callback<RemoveCollateral>): EventEmitter;
|
|
182
|
+
RemoveCollateral(options?: EventOptions, cb?: Callback<RemoveCollateral>): EventEmitter;
|
|
183
|
+
Liquidate(cb?: Callback<Liquidate>): EventEmitter;
|
|
184
|
+
Liquidate(options?: EventOptions, cb?: Callback<Liquidate>): EventEmitter;
|
|
185
|
+
SetMonetaryPolicy(cb?: Callback<SetMonetaryPolicy>): EventEmitter;
|
|
186
|
+
SetMonetaryPolicy(options?: EventOptions, cb?: Callback<SetMonetaryPolicy>): EventEmitter;
|
|
187
|
+
SetBorrowingDiscounts(cb?: Callback<SetBorrowingDiscounts>): EventEmitter;
|
|
188
|
+
SetBorrowingDiscounts(options?: EventOptions, cb?: Callback<SetBorrowingDiscounts>): EventEmitter;
|
|
189
|
+
CollectFees(cb?: Callback<CollectFees>): EventEmitter;
|
|
190
|
+
CollectFees(options?: EventOptions, cb?: Callback<CollectFees>): EventEmitter;
|
|
191
|
+
allEvents(options?: EventOptions, cb?: Callback<EventLog>): EventEmitter;
|
|
192
|
+
};
|
|
193
|
+
once(event: "UserState", cb: Callback<UserState>): void;
|
|
194
|
+
once(event: "UserState", options: EventOptions, cb: Callback<UserState>): void;
|
|
195
|
+
once(event: "Borrow", cb: Callback<Borrow>): void;
|
|
196
|
+
once(event: "Borrow", options: EventOptions, cb: Callback<Borrow>): void;
|
|
197
|
+
once(event: "Repay", cb: Callback<Repay>): void;
|
|
198
|
+
once(event: "Repay", options: EventOptions, cb: Callback<Repay>): void;
|
|
199
|
+
once(event: "RemoveCollateral", cb: Callback<RemoveCollateral>): void;
|
|
200
|
+
once(event: "RemoveCollateral", options: EventOptions, cb: Callback<RemoveCollateral>): void;
|
|
201
|
+
once(event: "Liquidate", cb: Callback<Liquidate>): void;
|
|
202
|
+
once(event: "Liquidate", options: EventOptions, cb: Callback<Liquidate>): void;
|
|
203
|
+
once(event: "SetMonetaryPolicy", cb: Callback<SetMonetaryPolicy>): void;
|
|
204
|
+
once(event: "SetMonetaryPolicy", options: EventOptions, cb: Callback<SetMonetaryPolicy>): void;
|
|
205
|
+
once(event: "SetBorrowingDiscounts", cb: Callback<SetBorrowingDiscounts>): void;
|
|
206
|
+
once(event: "SetBorrowingDiscounts", options: EventOptions, cb: Callback<SetBorrowingDiscounts>): void;
|
|
207
|
+
once(event: "CollectFees", cb: Callback<CollectFees>): void;
|
|
208
|
+
once(event: "CollectFees", options: EventOptions, cb: Callback<CollectFees>): void;
|
|
209
|
+
}
|