@q-dev/q-js-sdk
Version:
Typescript Library to interact with Q System Contracts
717 lines • 19.1 kB
JavaScript
"use strict";
/* Autogenerated file. Do not edit manually. */
/* tslint:disable */
/* eslint-disable */
Object.defineProperty(exports, "__esModule", { value: true });
exports.BorrowingCore__factory = void 0;
const ethers_1 = require("ethers");
const _abi = [
{
inputs: [],
stateMutability: "nonpayable",
type: "constructor",
},
{
anonymous: false,
inputs: [
{
indexed: true,
internalType: "address",
name: "_user",
type: "address",
},
{
indexed: true,
internalType: "uint256",
name: "_vaultId",
type: "uint256",
},
{
indexed: false,
internalType: "uint256",
name: "_amount",
type: "uint256",
},
],
name: "ColDeposited",
type: "event",
},
{
anonymous: false,
inputs: [
{
indexed: true,
internalType: "address",
name: "_user",
type: "address",
},
{
indexed: true,
internalType: "uint256",
name: "_vaultId",
type: "uint256",
},
{
indexed: false,
internalType: "uint256",
name: "_amount",
type: "uint256",
},
],
name: "ColWithdrawn",
type: "event",
},
{
anonymous: false,
inputs: [
{
indexed: true,
internalType: "address",
name: "_user",
type: "address",
},
{
indexed: true,
internalType: "uint256",
name: "_vaultId",
type: "uint256",
},
],
name: "Liquidated",
type: "event",
},
{
anonymous: false,
inputs: [
{
indexed: true,
internalType: "address",
name: "_user",
type: "address",
},
{
indexed: true,
internalType: "uint256",
name: "_vaultId",
type: "uint256",
},
{
indexed: false,
internalType: "uint256",
name: "_amount",
type: "uint256",
},
],
name: "StcGenerated",
type: "event",
},
{
anonymous: false,
inputs: [
{
indexed: true,
internalType: "address",
name: "_user",
type: "address",
},
{
indexed: true,
internalType: "uint256",
name: "_vaultId",
type: "uint256",
},
{
indexed: false,
internalType: "uint256",
name: "_burnt",
type: "uint256",
},
{
indexed: false,
internalType: "uint256",
name: "_surplus",
type: "uint256",
},
],
name: "StcRepaid",
type: "event",
},
{
anonymous: false,
inputs: [
{
indexed: true,
internalType: "address",
name: "_user",
type: "address",
},
{
indexed: true,
internalType: "uint256",
name: "_vaultId",
type: "uint256",
},
{
indexed: false,
internalType: "string",
name: "_colKey",
type: "string",
},
],
name: "VaultCreated",
type: "event",
},
{
inputs: [],
name: "aggregatedMintedAmount",
outputs: [
{
internalType: "uint256",
name: "",
type: "uint256",
},
],
stateMutability: "view",
type: "function",
},
{
inputs: [
{
internalType: "string",
name: "",
type: "string",
},
],
name: "aggregatedNormalizedDebts",
outputs: [
{
internalType: "uint256",
name: "",
type: "uint256",
},
],
stateMutability: "view",
type: "function",
},
{
inputs: [
{
internalType: "string",
name: "",
type: "string",
},
],
name: "compoundRateKeeper",
outputs: [
{
internalType: "contract CompoundRateKeeper",
name: "",
type: "address",
},
],
stateMutability: "view",
type: "function",
},
{
inputs: [
{
internalType: "address",
name: "",
type: "address",
},
],
name: "totalStcBackedByCol",
outputs: [
{
internalType: "uint256",
name: "",
type: "uint256",
},
],
stateMutability: "view",
type: "function",
},
{
inputs: [
{
internalType: "address",
name: "",
type: "address",
},
{
internalType: "uint256",
name: "",
type: "uint256",
},
],
name: "userVaults",
outputs: [
{
internalType: "string",
name: "colKey",
type: "string",
},
{
internalType: "uint256",
name: "colAsset",
type: "uint256",
},
{
internalType: "uint256",
name: "normalizedDebt",
type: "uint256",
},
{
internalType: "uint256",
name: "mintedAmount",
type: "uint256",
},
{
internalType: "bool",
name: "isLiquidated",
type: "bool",
},
{
internalType: "uint256",
name: "liquidationFullDebt",
type: "uint256",
},
],
stateMutability: "view",
type: "function",
},
{
inputs: [
{
internalType: "address",
name: "",
type: "address",
},
],
name: "userVaultsCount",
outputs: [
{
internalType: "uint256",
name: "",
type: "uint256",
},
],
stateMutability: "view",
type: "function",
},
{
inputs: [
{
internalType: "address",
name: "_registry",
type: "address",
},
{
internalType: "string",
name: "_stc",
type: "string",
},
],
name: "initialize",
outputs: [],
stateMutability: "nonpayable",
type: "function",
},
{
inputs: [
{
internalType: "string",
name: "_colKey",
type: "string",
},
],
name: "createVault",
outputs: [
{
internalType: "uint256",
name: "",
type: "uint256",
},
],
stateMutability: "nonpayable",
type: "function",
},
{
inputs: [
{
internalType: "uint256",
name: "_vaultId",
type: "uint256",
},
{
internalType: "uint256",
name: "_amount",
type: "uint256",
},
],
name: "depositCol",
outputs: [
{
internalType: "bool",
name: "",
type: "bool",
},
],
stateMutability: "nonpayable",
type: "function",
},
{
inputs: [
{
internalType: "uint256",
name: "_vaultId",
type: "uint256",
},
{
internalType: "uint256",
name: "_stcAmount",
type: "uint256",
},
],
name: "generateStc",
outputs: [
{
internalType: "bool",
name: "",
type: "bool",
},
],
stateMutability: "nonpayable",
type: "function",
},
{
inputs: [
{
internalType: "uint256",
name: "_vaultId",
type: "uint256",
},
{
internalType: "uint256",
name: "_amount",
type: "uint256",
},
],
name: "withdrawCol",
outputs: [
{
internalType: "bool",
name: "",
type: "bool",
},
],
stateMutability: "nonpayable",
type: "function",
},
{
inputs: [
{
internalType: "address",
name: "_user",
type: "address",
},
{
internalType: "uint256",
name: "_vaultId",
type: "uint256",
},
{
internalType: "uint256",
name: "_amount",
type: "uint256",
},
],
name: "clearVault",
outputs: [],
stateMutability: "nonpayable",
type: "function",
},
{
inputs: [
{
internalType: "address",
name: "_user",
type: "address",
},
{
internalType: "uint256",
name: "_vaultId",
type: "uint256",
},
],
name: "liquidate",
outputs: [
{
internalType: "bool",
name: "",
type: "bool",
},
],
stateMutability: "nonpayable",
type: "function",
},
{
inputs: [
{
internalType: "address",
name: "_user",
type: "address",
},
{
internalType: "uint256",
name: "_vaultId",
type: "uint256",
},
{
internalType: "address",
name: "_recepient",
type: "address",
},
],
name: "transferCol",
outputs: [],
stateMutability: "nonpayable",
type: "function",
},
{
inputs: [
{
internalType: "string",
name: "_colKey",
type: "string",
},
],
name: "updateCompoundRate",
outputs: [
{
internalType: "uint256",
name: "",
type: "uint256",
},
],
stateMutability: "nonpayable",
type: "function",
},
{
inputs: [
{
internalType: "uint256",
name: "_vaultId",
type: "uint256",
},
{
internalType: "uint256",
name: "_amount",
type: "uint256",
},
],
name: "payBackStc",
outputs: [],
stateMutability: "nonpayable",
type: "function",
},
{
inputs: [
{
internalType: "address",
name: "_user",
type: "address",
},
{
internalType: "uint256",
name: "_vaultId",
type: "uint256",
},
],
name: "getVaultStats",
outputs: [
{
components: [
{
components: [
{
internalType: "string",
name: "key",
type: "string",
},
{
internalType: "uint256",
name: "balance",
type: "uint256",
},
{
internalType: "uint256",
name: "price",
type: "uint256",
},
{
internalType: "uint256",
name: "withdrawableAmount",
type: "uint256",
},
{
internalType: "uint256",
name: "liquidationPrice",
type: "uint256",
},
],
internalType: "struct BorrowingCore.ColStats",
name: "colStats",
type: "tuple",
},
{
components: [
{
internalType: "string",
name: "key",
type: "string",
},
{
internalType: "uint256",
name: "outstandingDebt",
type: "uint256",
},
{
internalType: "uint256",
name: "normalizedDebt",
type: "uint256",
},
{
internalType: "uint256",
name: "compoundRate",
type: "uint256",
},
{
internalType: "uint256",
name: "lastUpdateOfCompoundRate",
type: "uint256",
},
{
internalType: "uint256",
name: "borrowingLimit",
type: "uint256",
},
{
internalType: "uint256",
name: "availableToBorrow",
type: "uint256",
},
{
internalType: "uint256",
name: "liquidationLimit",
type: "uint256",
},
{
internalType: "uint256",
name: "borrowingFee",
type: "uint256",
},
],
internalType: "struct BorrowingCore.StcStats",
name: "stcStats",
type: "tuple",
},
],
internalType: "struct BorrowingCore.VaultStats",
name: "",
type: "tuple",
},
],
stateMutability: "view",
type: "function",
},
{
inputs: [],
name: "getAggregatedTotals",
outputs: [
{
components: [
{
internalType: "uint256",
name: "outstandingDebt",
type: "uint256",
},
{
internalType: "uint256",
name: "mintedAmount",
type: "uint256",
},
{
internalType: "uint256",
name: "owedBorrowingFees",
type: "uint256",
},
],
internalType: "struct BorrowingCore.AggregatedTotalsInfo",
name: "",
type: "tuple",
},
],
stateMutability: "view",
type: "function",
},
{
inputs: [
{
internalType: "address",
name: "_user",
type: "address",
},
{
internalType: "uint256",
name: "_vaultId",
type: "uint256",
},
],
name: "getCurrentColRatio",
outputs: [
{
internalType: "uint256",
name: "",
type: "uint256",
},
],
stateMutability: "view",
type: "function",
},
{
inputs: [
{
internalType: "address",
name: "_user",
type: "address",
},
{
internalType: "uint256",
name: "_vaultId",
type: "uint256",
},
],
name: "getFullDebt",
outputs: [
{
internalType: "uint256",
name: "",
type: "uint256",
},
],
stateMutability: "view",
type: "function",
},
];
class BorrowingCore__factory {
static createInterface() {
return new ethers_1.utils.Interface(_abi);
}
static connect(address, signerOrProvider) {
return new ethers_1.Contract(address, _abi, signerOrProvider);
}
}
exports.BorrowingCore__factory = BorrowingCore__factory;
BorrowingCore__factory.abi = _abi;
//# sourceMappingURL=BorrowingCore__factory.js.map