2020-06-20 23:40:03 +00:00
|
|
|
/* Generated by ts-generator ver. 0.0.8 */
|
|
|
|
/* tslint:disable */
|
|
|
|
|
2020-08-07 17:29:13 +00:00
|
|
|
import { Contract, ContractFactory, Signer } from "ethers";
|
|
|
|
import { Provider } from "ethers/providers";
|
|
|
|
import { UnsignedTransaction } from "ethers/utils/transaction";
|
2020-06-20 23:40:03 +00:00
|
|
|
|
2020-08-07 17:29:13 +00:00
|
|
|
import { TransactionOverrides } from ".";
|
|
|
|
import { GenericLogic } from "./GenericLogic";
|
2020-06-20 23:40:03 +00:00
|
|
|
|
|
|
|
export class GenericLogicFactory extends ContractFactory {
|
2020-06-30 12:09:28 +00:00
|
|
|
constructor(signer?: Signer) {
|
|
|
|
super(_abi, _bytecode, signer);
|
2020-06-20 23:40:03 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
deploy(overrides?: TransactionOverrides): Promise<GenericLogic> {
|
|
|
|
return super.deploy(overrides) as Promise<GenericLogic>;
|
|
|
|
}
|
|
|
|
getDeployTransaction(overrides?: TransactionOverrides): UnsignedTransaction {
|
|
|
|
return super.getDeployTransaction(overrides);
|
|
|
|
}
|
|
|
|
attach(address: string): GenericLogic {
|
|
|
|
return super.attach(address) as GenericLogic;
|
|
|
|
}
|
|
|
|
connect(signer: Signer): GenericLogicFactory {
|
|
|
|
return super.connect(signer) as GenericLogicFactory;
|
|
|
|
}
|
2020-08-07 17:29:13 +00:00
|
|
|
static connect(
|
|
|
|
address: string,
|
|
|
|
signerOrProvider: Signer | Provider
|
|
|
|
): GenericLogic {
|
2020-06-20 23:40:03 +00:00
|
|
|
return new Contract(address, _abi, signerOrProvider) as GenericLogic;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
const _abi = [
|
|
|
|
{
|
|
|
|
inputs: [],
|
2020-08-07 17:29:13 +00:00
|
|
|
name: "HEALTH_FACTOR_LIQUIDATION_THRESHOLD",
|
2020-06-20 23:40:03 +00:00
|
|
|
outputs: [
|
|
|
|
{
|
2020-08-07 17:29:13 +00:00
|
|
|
internalType: "uint256",
|
|
|
|
name: "",
|
|
|
|
type: "uint256"
|
|
|
|
}
|
2020-06-20 23:40:03 +00:00
|
|
|
],
|
2020-08-07 17:29:13 +00:00
|
|
|
stateMutability: "view",
|
|
|
|
type: "function"
|
2020-06-20 23:40:03 +00:00
|
|
|
},
|
|
|
|
{
|
|
|
|
inputs: [
|
|
|
|
{
|
2020-08-07 17:29:13 +00:00
|
|
|
internalType: "uint256",
|
|
|
|
name: "collateralBalanceETH",
|
|
|
|
type: "uint256"
|
2020-06-20 23:40:03 +00:00
|
|
|
},
|
|
|
|
{
|
2020-08-07 17:29:13 +00:00
|
|
|
internalType: "uint256",
|
|
|
|
name: "borrowBalanceETH",
|
|
|
|
type: "uint256"
|
2020-06-20 23:40:03 +00:00
|
|
|
},
|
|
|
|
{
|
2020-08-07 17:29:13 +00:00
|
|
|
internalType: "uint256",
|
|
|
|
name: "ltv",
|
|
|
|
type: "uint256"
|
|
|
|
}
|
2020-06-20 23:40:03 +00:00
|
|
|
],
|
2020-08-07 17:29:13 +00:00
|
|
|
name: "calculateAvailableBorrowsETH",
|
2020-06-20 23:40:03 +00:00
|
|
|
outputs: [
|
|
|
|
{
|
2020-08-07 17:29:13 +00:00
|
|
|
internalType: "uint256",
|
|
|
|
name: "",
|
|
|
|
type: "uint256"
|
|
|
|
}
|
2020-06-20 23:40:03 +00:00
|
|
|
],
|
2020-08-07 17:29:13 +00:00
|
|
|
stateMutability: "view",
|
|
|
|
type: "function"
|
|
|
|
}
|
2020-06-20 23:40:03 +00:00
|
|
|
];
|
|
|
|
|
|
|
|
const _bytecode =
|
2020-08-09 22:11:06 +00:00
|
|
|
"0x610e9f610026600b82828239805160001a60731461001957fe5b30600052607381538281f3fe730000000000000000000000000000000000000000301460806040526004361061004b5760003560e01c8063865cb0ce14610050578063c3525c2814610079578063d609bd1b1461008e575b600080fd5b61006361005e366004610c0b565b6100a1565b6040516100709190610d72565b60405180910390f35b610081610326565b6040516100709190610e48565b61008161009c366004610d33565b610332565b60006100ba6100b536879003870187610cde565b610374565b158061010857506001600160a01b03891660009081526020879052604090206009015461010690600160d01b900460ff166100fa36889003880188610cde565b9063ffffffff61039c16565b155b156101155750600161031a565b61011d610af7565b6001600160a01b038a166000908152602088905260409020610141906005016103b4565b845250506020820181905261015a57600191505061031a565b6101a9898861016e368a90038a018a610cde565b8888808060200260200160405190810160405280939291908181526020018383602002808284376000920191909152508a92506103fb915050565b506080850152506060830181905260408301919091526101cd57600191505061031a565b6102708160000151600a0a6102648a866001600160a01b031663b3596f078f6040518263ffffffff1660e01b81526004016102089190610d5e565b60206040518083038186803b15801561022057600080fd5b505afa158015610234573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906102589190610d1b565b9063ffffffff6108fb16565b9063ffffffff61093e16565b60c08201819052604082015161028b9163ffffffff61098016565b60e082018190526102a057600091505061031a565b6102eb8160e001516102646102c68460a001518560c001516108fb90919063ffffffff16565b608085015160408601516102df9163ffffffff6108fb16565b9063ffffffff61098016565b610100820181905260e0820151606083015160009261030b9291906109c2565b670de0b6b3a764000010925050505b98975050505050505050565b670de0b6b3a764000081565b600080610345858463ffffffff6109fa16565b90508381101561035957600091505061036d565b610369818563ffffffff61098016565b9150505b9392505050565b517f555555555555555555555555555555555555555555555555555555555555555516151590565b815160016002830281019190911c1615155b92915050565b54670fffffffffff000019811691601082901c650fffffff0001600160f01b031691602081901c630fff0001600160e01b03169160309190911c610f01600160d01b031690565b600080600080600061040b610b53565b61041489610a1e565b1561043157506000945084935083925082915060001990506108ee565b600060e08201525b87518160e0015110156108415760e081015161045c908a9063ffffffff610a2316565b61046557610831565b878160e001518151811061047557fe5b6020908102919091018101516001600160a01b031661020083018190526000908152908b9052604090206104ab600582016103b4565b6080860181905260c08601929092525060a0840191909152600a0a602083015261020082015160405163b3596f0760e01b81526001600160a01b038a169163b3596f07916104fc9190600401610d5e565b60206040518083038186803b15801561051457600080fd5b505afa158015610528573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061054c9190610d1b565b825260a082015115801590610572575060e0820151610572908b9063ffffffff61039c16565b156106a35760068101546040516370a0823160e01b81526001600160a01b03909116906370a08231906105a9908f90600401610d5e565b60206040518083038186803b1580156105c157600080fd5b505afa1580156105d5573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906105f99190610d1b565b604083018190526020830151835160009261061e92916102649163ffffffff6108fb16565b610120840151909150610637908263ffffffff610a3316565b61012084015260a08301516106699061065790839063ffffffff6108fb16565b6101808501519063ffffffff610a3316565b61018084015260c083015161069b9061068990839063ffffffff6108fb16565b6101a08501519063ffffffff610a3316565b6101a0840152505b60e08201516106b9908b9063ffffffff610a5816565b1561082f5760078101546040516370a0823160e01b81526001600160a01b03909116906370a08231906106f0908f90600401610d5e565b60206040518083038186803b15801561070857600080fd5b505afa15801561071c573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906107409190610d1b565b8260600181815250506107f08160080160009054906101000a90046001600160a01b03166001600160a01b03166370a082318e6040518263ffffffff1660e01b815260040161078f9190610d5e565b60206040518083038186803b1580156107a757600080fd5b505afa1580156107bb573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061
|