aave-protocol-v2/types/GenericLogicFactory.ts

115 lines
10 KiB
TypeScript
Raw Normal View History

2020-06-20 23:40:03 +00:00
/* 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(
linkLibraryAddresses: GenericLogicLibraryAddresses,
signer?: Signer
) {
super(_abi, GenericLogicFactory.linkBytecode(linkLibraryAddresses), signer);
}
static linkBytecode(
linkLibraryAddresses: GenericLogicLibraryAddresses
): string {
let linkedBytecode = _bytecode;
linkedBytecode = linkedBytecode.replace(
new RegExp("__\\$259b519ec4c35fa58681035973c79c801a\\$__", "g"),
linkLibraryAddresses["__$259b519ec4c35fa58681035973c79c801a$__"]
.replace(/^0x/, "")
.toLowerCase()
);
return linkedBytecode;
}
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: "totalFeesETH",
type: "uint256"
},
{
internalType: "uint256",
name: "ltv",
type: "uint256"
},
{
internalType: "address",
name: "_feeProvider",
type: "address"
}
],
name: "calculateAvailableBorrowsETH",
outputs: [
{
internalType: "uint256",
name: "",
type: "uint256"
}
],
stateMutability: "view",
type: "function"
}
];
const _bytecode =
2020-06-27 02:13:32 +00:00
"0x610f69610026600b82828239805160001a60731461001957fe5b30600052607381538281f3fe73000000000000000000000000000000000000000030146080604052600436106100565760003560e01c80634d9afd5e1461005b578063901d711414610114578063ab8bb39314610213578063c3525c2814610263575b600080fd5b610100600480360360e081101561007157600080fd5b6001600160a01b0382358116926020810135909116916040820135916060810135916080820135919081019060c0810160a08201356401000000008111156100b857600080fd5b8201836020820111156100ca57600080fd5b803590602001918460208302840111640100000000831117156100ec57600080fd5b9193509150356001600160a01b031661026b565b604080519115158252519081900360200190f35b6101de600480360360a081101561012a57600080fd5b6001600160a01b03823516916020810135916040820135919081019060808101606082013564010000000081111561016157600080fd5b82018360208201111561017357600080fd5b8035906020019184602083028401116401000000008311171561019557600080fd5b919080806020026020016040519081016040528093929190818152602001838360200280828437600092019190915250929550505090356001600160a01b031691506104d89050565b6040805196875260208701959095528585019390935260608501919091526080840152151560a0830152519081900360c00190f35b610251600480360360a081101561022957600080fd5b50803590602081013590604081013590606081013590608001356001600160a01b0316610a67565b60408051918252519081900360200190f35b610251610b52565b6000610275610e15565b6001600160a01b038a166000908152602088905260409020600d0154600160d01b900460ff1615806102d757506001600160a01b03898116600090815260208881526040808320938e168352929052206004015465010000000000900460ff16155b156102e65760019150506104cc565b6103278988888888808060200260200160405190810160405280939291908181526020018383602002808284376000920191909152508a92506104d8915050565b5060808601525060608401526040830181905260208301919091526103505760019150506104cc565b61041c8760008c6001600160a01b03166001600160a01b03168152602001908152602001600020600b0154600a0a6104108a866001600160a01b031663b3596f078f6040518263ffffffff1660e01b815260040180826001600160a01b03166001600160a01b0316815260200191505060206040518083038186803b1580156103d857600080fd5b505afa1580156103ec573d6000803e3d6000fd5b505050506040513d602081101561040257600080fd5b50519063ffffffff610b5e16565b9063ffffffff610bc016565b60c0820181905260208201516104379163ffffffff610c0216565b60e0820181905261044c5760009150506104cc565b6104978160e001516104106104728460a001518560c00151610b5e90919063ffffffff16565b6080850151602086015161048b9163ffffffff610b5e16565b9063ffffffff610c0216565b610100820181905260e0820151604083015160608401516000936104bd93929190610c44565b670de0b6b3a764000010925050505b98975050505050505050565b6000806000806000806104e9610e71565b60006101008201525b8851816101000151101561098d57888161010001518151811061051157fe5b60200260200101518161020001906001600160a01b031690816001600160a01b03168152505060008b60008361020001516001600160a01b03166001600160a01b03168152602001908152602001600020905080600c0160009054906101000a90046001600160a01b03166001600160a01b03166370a082318e6040518263ffffffff1660e01b815260040180826001600160a01b03166001600160a01b0316815260200191505060206040518083038186803b1580156105d157600080fd5b505afa1580156105e5573d6000803e3d6000fd5b505050506040513d60208110156105fb57600080fd5b50516040808401919091526001600160a01b038e16600090815260208d90529081206101008401518c519192918d9190811061063357fe5b60200260200101516001600160a01b03166001600160a01b0316815260200190815260200160002073__$259b519ec4c35fa58681035973c79c801a$__634b170a5a9091836040518363ffffffff1660e01b8152600401808381526020018281526020019250505060606040518083038186803b1580156106b357600080fd5b505af41580156106c7573d6000803e3d6000fd5b505050506040513d60608110156106dd57600080fd5b5060200151606083015260408201511580156106fb57506060820151155b15610706575061097c565b80600b0154600a0a826020018181525050886001600160a01b031663b3596f078b8461010001518151811061073757fe5b60200260200101516040518263ffffffff1660e01b815260040180826001600160a01b03166001600160a01b0316815260200191505060206040518083038186803b15801561078557600080fd5b505afa158015610799573d6000803e3d6000fd5b505050506040513d60208110156107af57600080fd5b505182526040820151156108f45760006107e2836020015161041085604001518660000151610b
2020-06-20 23:40:03 +00:00
export interface GenericLogicLibraryAddresses {
["__$259b519ec4c35fa58681035973c79c801a$__"]: string;
}