aave-protocol-v2/types/GenericLogicFactory.ts
2020-08-07 19:29:13 +02:00

83 lines
9.3 KiB
TypeScript

/* Generated by ts-generator ver. 0.0.8 */
/* tslint:disable */
import { Contract, ContractFactory, Signer } from "ethers";
import { Provider } from "ethers/providers";
import { UnsignedTransaction } from "ethers/utils/transaction";
import { TransactionOverrides } from ".";
import { GenericLogic } from "./GenericLogic";
export class GenericLogicFactory extends ContractFactory {
constructor(signer?: Signer) {
super(_abi, _bytecode, signer);
}
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;
}
static connect(
address: string,
signerOrProvider: Signer | Provider
): GenericLogic {
return new Contract(address, _abi, signerOrProvider) as GenericLogic;
}
}
const _abi = [
{
inputs: [],
name: "HEALTH_FACTOR_LIQUIDATION_THRESHOLD",
outputs: [
{
internalType: "uint256",
name: "",
type: "uint256"
}
],
stateMutability: "view",
type: "function"
},
{
inputs: [
{
internalType: "uint256",
name: "collateralBalanceETH",
type: "uint256"
},
{
internalType: "uint256",
name: "borrowBalanceETH",
type: "uint256"
},
{
internalType: "uint256",
name: "ltv",
type: "uint256"
}
],
name: "calculateAvailableBorrowsETH",
outputs: [
{
internalType: "uint256",
name: "",
type: "uint256"
}
],
stateMutability: "view",
type: "function"
}
];
const _bytecode =
"0x610e94610026600b82828239805160001a60731461001957fe5b30600052607381538281f3fe73000000000000000000000000000000000000000030146080604052600436106100565760003560e01c806392eeb05c1461005b578063c3525c2814610150578063d609bd1b1461016a578063daae705514610193575b600080fd5b610125600480360360a081101561007157600080fd5b6001600160a01b0382351691602081013591604082013591908101906080810160608201356401000000008111156100a857600080fd5b8201836020820111156100ba57600080fd5b803590602001918460208302840111640100000000831117156100dc57600080fd5b919080806020026020016040519081016040528093929190818152602001838360200280828437600092019190915250929550505090356001600160a01b0316915061024c9050565b6040805195865260208601949094528484019290925260608401526080830152519081900360a00190f35b6101586107b7565b60408051918252519081900360200190f35b6101586004803603606081101561018057600080fd5b50803590602081013590604001356107c3565b610238600480360360e08110156101a957600080fd5b6001600160a01b0382358116926020810135909116916040820135916060810135916080820135919081019060c0810160a08201356401000000008111156101f057600080fd5b82018360208201111561020257600080fd5b8035906020019184602083028401116401000000008311171561022457600080fd5b9193509150356001600160a01b0316610805565b604080519115158252519081900360200190f35b600080600080600061025c610d40565b600060e08201525b87518160e00151101561070357878160e001518151811061028157fe5b60200260200101518161020001906001600160a01b031690816001600160a01b03168152505060008a60008361020001516001600160a01b03166001600160a01b0316815260200190815260200160002090508060060160009054906101000a90046001600160a01b03166001600160a01b03166370a082318d6040518263ffffffff1660e01b815260040180826001600160a01b03166001600160a01b0316815260200191505060206040518083038186803b15801561034157600080fd5b505afa158015610355573d6000803e3d6000fd5b505050506040513d602081101561036b57600080fd5b5051604080840191909152600782015481516370a0823160e01b81526001600160a01b038f81166004830152925192909116916370a0823191602480820192602092909190829003018186803b1580156103c457600080fd5b505afa1580156103d8573d6000803e3d6000fd5b505050506040513d60208110156103ee57600080fd5b505160608301526008810154604080516370a0823160e01b81526001600160a01b038f8116600483015291516104869392909216916370a0823191602480820192602092909190829003018186803b15801561044957600080fd5b505afa15801561045d573d6000803e3d6000fd5b505050506040513d602081101561047357600080fd5b505160608401519063ffffffff610a3516565b6060830152604082015115801561049f57506060820151155b156104aa57506106f3565b6104b681600501610a98565b6080860181905260c08601929092525060a0840191909152600a0a602083015260e082015189516001600160a01b038a169163b3596f07918c919081106104f957fe5b60200260200101516040518263ffffffff1660e01b815260040180826001600160a01b03166001600160a01b0316815260200191505060206040518083038186803b15801561054757600080fd5b505afa15801561055b573d6000803e3d6000fd5b505050506040513d602081101561057157600080fd5b505182526040820151156106a85760006105b083602001516105a485604001518660000151610adf90919063ffffffff16565b9063ffffffff610b3816565b90508260a0015160001415801561062057508a60008e6001600160a01b03166001600160a01b0316815260200190815260200160002060008b8560e00151815181106105f857fe5b6020908102919091018101516001600160a01b031682528101919091526040016000205460ff165b156106a65761012083015161063b908263ffffffff610a3516565b61012084015260a083015161066d9061065b90839063ffffffff610adf16565b6101808501519063ffffffff610a3516565b61018084015260c083015161069f9061068d90839063ffffffff610adf16565b6101a08501519063ffffffff610a3516565b6101a08401525b505b6060820151156106f1576106ea6106d883602001516105a485606001518660000151610adf90919063ffffffff16565b6101408401519063ffffffff610a3516565b6101408301525b505b60e0810180516001019052610264565b600081610120015111610717576000610732565b6101208101516101808201516107329163ffffffff610b3816565b610180820152610120810151610749576000610764565b6101208101516101a08201516107649163ffffffff610b3816565b6101a0820181905261012082015161014083015161078192610b7a565b61010082018190526101208201516101408301516101808401516101a090940151919e909d50929b509950975095505050505050565b670de0b6b3a764000081565b6000806107d6858463ffffffff610bb216565b9050838110156107ea5760009150506107fe565b6107fa818563ffffffff610bd616565b9150505b9392505050565b600061080f610de1565b6001600160a01b038a16600090815260208890526040902061083390600501610a98565b8452505060208201819052158061086e57506001600160a01b03808a16600090815260208881526040808320938e168352929052205460ff16155b1561087d576001915050610a29565b6108be8988888888808060200260200160405190810160405280939291908181526020018383602002808284376000920191909152508a925061024c915050565b506080850152506060830181905260408301919091526108e2576001915050610a29565b61097f8160000151600a0a6105a48a866001600160a01b031663b3596f078f6040518263ffffffff1660e01b815260040180826001600160a01b03166001600160a01b0316815260200191505060206040518083038186803b15801561094757600080fd5b505afa15801561095b573d6000803e3d6000fd5b505050506040513d602081101561097157600080fd5b50519063ffffffff610adf16565b60c08201819052604082015161099a9163ffffffff610bd616565b60e082018190526109af576000915050610a29565b6109fa8160e001516105a46109d58460a001518560c00151610adf90919063ffffffff16565b608085015160408601516109ee9163ffffffff610adf16565b9063ffffffff610bd616565b610100820181905260e08201516060830151600092610a1a929190610b7a565b670de0b6b3a764000010925050505b98975050505050505050565b600082820183811015610a8f576040805162461bcd60e51b815260206004820152601b60248201527f536166654d6174683a206164646974696f6e206f766572666c6f770000000000604482015290519081900360640190fd5b90505b92915050565b54670fffffffffff000019811691601082901c650fffffff0001600160f01b031691602081901c630fff0001600160e01b03169160309190911c610f01600160d01b031690565b600082610aee57506000610a92565b82820282848281610afb57fe5b0414610a8f5760405162461bcd60e51b8152600401808060200182810382526021815260200180610e3e6021913960400191505060405180910390fd5b6000610a8f83836040518060400160405280601a81526020017f536166654d6174683a206469766973696f6e206279207a65726f000000000000815250610c18565b600082610b8a57506000196107fe565b610baa83610b9e868563ffffffff610bb216565b9063ffffffff610cba16565b949350505050565b6000610a8f6127106105a4610bcd868663ffffffff610adf16565b61138890610a35565b6000610a8f83836040518060400160405280601e81526020017f536166654d6174683a207375627472616374696f6e206f766572666c6f770000815250610ce6565b60008183610ca45760405162461bcd60e51b81526004018080602001828103825283818151815260200191508051906020019080838360005b83811015610c69578181015183820152602001610c51565b50505050905090810190601f168015610c965780820380516001836020036101000a031916815260200191505b509250505060405180910390fd5b506000838581610cb057fe5b0495945050505050565b600060028204610baa836105a4610cd987670de0b6b3a7640000610adf565b849063ffffffff610a3516565b60008184841115610d385760405162461bcd60e51b8152602060048201818152835160248401528351909283926044909101919085019080838360008315610c69578181015183820152602001610c51565b505050900390565b60405180610260016040528060008152602001600081526020016000815260200160008152602001600081526020016000815260200160008152602001600081526020016000815260200160008152602001600081526020016000815260200160008152602001600081526020016000815260200160001515815260200160006001600160a01b031681526020016000151581526020016000151581525090565b60405180610160016040528060008152602001600081526020016000815260200160008152602001600081526020016000815260200160008152602001600081526020016000815260200160008152602001600015158152509056fe536166654d6174683a206d756c7469706c69636174696f6e206f766572666c6f77a264697066735822122081191d9499c232caefcd8b7ee9722ed83db470a143f1b0267c75f0cf36151e0064736f6c63430006080033";