2020-06-03 10:23:21 +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-03 10:23:21 +00:00
|
|
|
|
2020-08-07 17:29:13 +00:00
|
|
|
import { TransactionOverrides } from ".";
|
|
|
|
import { LendingPoolLiquidationManager } from "./LendingPoolLiquidationManager";
|
2020-06-03 10:23:21 +00:00
|
|
|
|
|
|
|
export class LendingPoolLiquidationManagerFactory extends ContractFactory {
|
2020-06-20 23:40:03 +00:00
|
|
|
constructor(
|
|
|
|
linkLibraryAddresses: LendingPoolLiquidationManagerLibraryAddresses,
|
|
|
|
signer?: Signer
|
|
|
|
) {
|
2020-08-07 17:29:13 +00:00
|
|
|
super(
|
|
|
|
_abi,
|
|
|
|
LendingPoolLiquidationManagerFactory.linkBytecode(linkLibraryAddresses),
|
|
|
|
signer
|
|
|
|
);
|
2020-06-20 23:40:03 +00:00
|
|
|
}
|
|
|
|
|
2020-08-07 17:29:13 +00:00
|
|
|
static linkBytecode(
|
|
|
|
linkLibraryAddresses: LendingPoolLiquidationManagerLibraryAddresses
|
|
|
|
): string {
|
2020-06-20 23:40:03 +00:00
|
|
|
let linkedBytecode = _bytecode;
|
|
|
|
|
|
|
|
linkedBytecode = linkedBytecode.replace(
|
2020-08-07 17:29:13 +00:00
|
|
|
new RegExp("__\\$7347ff53b2b46c21e26a37164ae7f6739f\\$__", "g"),
|
|
|
|
linkLibraryAddresses["__$7347ff53b2b46c21e26a37164ae7f6739f$__"]
|
|
|
|
.replace(/^0x/, "")
|
2020-06-20 23:40:03 +00:00
|
|
|
.toLowerCase()
|
|
|
|
);
|
|
|
|
|
|
|
|
return linkedBytecode;
|
2020-06-03 10:23:21 +00:00
|
|
|
}
|
|
|
|
|
2020-08-07 17:29:13 +00:00
|
|
|
deploy(
|
|
|
|
overrides?: TransactionOverrides
|
|
|
|
): Promise<LendingPoolLiquidationManager> {
|
2020-06-03 10:23:21 +00:00
|
|
|
return super.deploy(overrides) as Promise<LendingPoolLiquidationManager>;
|
|
|
|
}
|
|
|
|
getDeployTransaction(overrides?: TransactionOverrides): UnsignedTransaction {
|
|
|
|
return super.getDeployTransaction(overrides);
|
|
|
|
}
|
|
|
|
attach(address: string): LendingPoolLiquidationManager {
|
|
|
|
return super.attach(address) as LendingPoolLiquidationManager;
|
|
|
|
}
|
|
|
|
connect(signer: Signer): LendingPoolLiquidationManagerFactory {
|
|
|
|
return super.connect(signer) as LendingPoolLiquidationManagerFactory;
|
|
|
|
}
|
|
|
|
static connect(
|
|
|
|
address: string,
|
|
|
|
signerOrProvider: Signer | Provider
|
|
|
|
): LendingPoolLiquidationManager {
|
2020-08-07 17:29:13 +00:00
|
|
|
return new Contract(
|
|
|
|
address,
|
|
|
|
_abi,
|
|
|
|
signerOrProvider
|
|
|
|
) as LendingPoolLiquidationManager;
|
2020-06-03 10:23:21 +00:00
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
const _abi = [
|
|
|
|
{
|
|
|
|
anonymous: false,
|
|
|
|
inputs: [
|
|
|
|
{
|
|
|
|
indexed: true,
|
2020-08-07 17:29:13 +00:00
|
|
|
internalType: "address",
|
|
|
|
name: "_collateral",
|
|
|
|
type: "address"
|
2020-06-03 10:23:21 +00:00
|
|
|
},
|
|
|
|
{
|
|
|
|
indexed: true,
|
2020-08-07 17:29:13 +00:00
|
|
|
internalType: "address",
|
|
|
|
name: "_reserve",
|
|
|
|
type: "address"
|
2020-06-03 10:23:21 +00:00
|
|
|
},
|
|
|
|
{
|
|
|
|
indexed: true,
|
2020-08-07 17:29:13 +00:00
|
|
|
internalType: "address",
|
|
|
|
name: "_user",
|
|
|
|
type: "address"
|
2020-06-03 10:23:21 +00:00
|
|
|
},
|
|
|
|
{
|
|
|
|
indexed: false,
|
2020-08-07 17:29:13 +00:00
|
|
|
internalType: "uint256",
|
|
|
|
name: "_purchaseAmount",
|
|
|
|
type: "uint256"
|
2020-06-03 10:23:21 +00:00
|
|
|
},
|
|
|
|
{
|
|
|
|
indexed: false,
|
2020-08-07 17:29:13 +00:00
|
|
|
internalType: "uint256",
|
|
|
|
name: "_liquidatedCollateralAmount",
|
|
|
|
type: "uint256"
|
2020-06-03 10:23:21 +00:00
|
|
|
},
|
|
|
|
{
|
|
|
|
indexed: false,
|
2020-08-07 17:29:13 +00:00
|
|
|
internalType: "address",
|
|
|
|
name: "_liquidator",
|
|
|
|
type: "address"
|
2020-06-03 10:23:21 +00:00
|
|
|
},
|
|
|
|
{
|
|
|
|
indexed: false,
|
2020-08-07 17:29:13 +00:00
|
|
|
internalType: "bool",
|
|
|
|
name: "_receiveAToken",
|
|
|
|
type: "bool"
|
2020-06-03 10:23:21 +00:00
|
|
|
},
|
|
|
|
{
|
|
|
|
indexed: false,
|
2020-08-07 17:29:13 +00:00
|
|
|
internalType: "uint256",
|
|
|
|
name: "_timestamp",
|
|
|
|
type: "uint256"
|
|
|
|
}
|
2020-06-03 10:23:21 +00:00
|
|
|
],
|
2020-08-07 17:29:13 +00:00
|
|
|
name: "LiquidationCall",
|
|
|
|
type: "event"
|
2020-06-03 10:23:21 +00:00
|
|
|
},
|
|
|
|
{
|
|
|
|
inputs: [],
|
2020-08-07 17:29:13 +00:00
|
|
|
name: "addressesProvider",
|
2020-06-03 10:23:21 +00:00
|
|
|
outputs: [
|
|
|
|
{
|
2020-08-07 17:29:13 +00:00
|
|
|
internalType: "contract LendingPoolAddressesProvider",
|
|
|
|
name: "",
|
|
|
|
type: "address"
|
|
|
|
}
|
2020-06-03 10:23:21 +00:00
|
|
|
],
|
2020-08-07 17:29:13 +00:00
|
|
|
stateMutability: "view",
|
|
|
|
type: "function"
|
2020-06-03 10:23:21 +00:00
|
|
|
},
|
|
|
|
{
|
|
|
|
inputs: [
|
|
|
|
{
|
2020-08-07 17:29:13 +00:00
|
|
|
internalType: "address",
|
|
|
|
name: "_collateral",
|
|
|
|
type: "address"
|
2020-06-03 10:23:21 +00:00
|
|
|
},
|
|
|
|
{
|
2020-08-07 17:29:13 +00:00
|
|
|
internalType: "address",
|
|
|
|
name: "_reserve",
|
|
|
|
type: "address"
|
2020-06-03 10:23:21 +00:00
|
|
|
},
|
|
|
|
{
|
2020-08-07 17:29:13 +00:00
|
|
|
internalType: "address",
|
|
|
|
name: "_user",
|
|
|
|
type: "address"
|
2020-06-03 10:23:21 +00:00
|
|
|
},
|
|
|
|
{
|
2020-08-07 17:29:13 +00:00
|
|
|
internalType: "uint256",
|
|
|
|
name: "_purchaseAmount",
|
|
|
|
type: "uint256"
|
2020-06-03 10:23:21 +00:00
|
|
|
},
|
|
|
|
{
|
2020-08-07 17:29:13 +00:00
|
|
|
internalType: "bool",
|
|
|
|
name: "_receiveAToken",
|
|
|
|
type: "bool"
|
|
|
|
}
|
2020-06-03 10:23:21 +00:00
|
|
|
],
|
2020-08-07 17:29:13 +00:00
|
|
|
name: "liquidationCall",
|
2020-06-03 10:23:21 +00:00
|
|
|
outputs: [
|
|
|
|
{
|
2020-08-07 17:29:13 +00:00
|
|
|
internalType: "uint256",
|
|
|
|
name: "",
|
|
|
|
type: "uint256"
|
2020-06-03 10:23:21 +00:00
|
|
|
},
|
|
|
|
{
|
2020-08-07 17:29:13 +00:00
|
|
|
internalType: "string",
|
|
|
|
name: "",
|
|
|
|
type: "string"
|
|
|
|
}
|
2020-06-03 10:23:21 +00:00
|
|
|
],
|
2020-08-07 17:29:13 +00:00
|
|
|
stateMutability: "payable",
|
|
|
|
type: "function"
|
2020-06-20 23:40:03 +00:00
|
|
|
},
|
|
|
|
{
|
|
|
|
inputs: [
|
|
|
|
{
|
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
|
|
|
name: "reservesList",
|
2020-06-20 23:40:03 +00:00
|
|
|
outputs: [
|
|
|
|
{
|
2020-08-07 17:29:13 +00:00
|
|
|
internalType: "address",
|
|
|
|
name: "",
|
|
|
|
type: "address"
|
|
|
|
}
|
2020-06-20 23:40:03 +00:00
|
|
|
],
|
2020-08-07 17:29:13 +00:00
|
|
|
stateMutability: "view",
|
|
|
|
type: "function"
|
|
|
|
}
|
2020-06-03 10:23:21 +00:00
|
|
|
];
|
|
|
|
|
|
|
|
const _bytecode =
|
2020-08-07 17:29:13 +00:00
|
|
|
"0x6080604052600060015534801561001557600080fd5b506001600055611ed28061002a6000396000f3fe6080604052600436106100335760003560e01c8062a718a9146100385780634fe7a6e5146100fb578063c72c4d1014610141575b600080fd5b61007c600480360360a081101561004e57600080fd5b506001600160a01b038135811691602081013582169160408201351690606081013590608001351515610156565b6040518083815260200180602001828103825283818151815260200191508051906020019080838360005b838110156100bf5781810151838201526020016100a7565b50505050905090810190601f1680156100ec5780820380516001836020036101000a031916815260200191505b50935050505060405180910390f35b34801561010757600080fd5b506101256004803603602081101561011e57600080fd5b50356109ff565b604080516001600160a01b039092168252519081900360200190f35b34801561014d57600080fd5b50610125610a26565b6001600160a01b0380851660009081526037602090815260408083208985168085528285209589168552603884528285209085529092528220919260609261019c611ca1565b73__$7347ff53b2b46c21e26a37164ae7f6739f$__6392eeb05c8a603760386039603560009054906101000a90046001600160a01b03166001600160a01b031663fca513a86040518163ffffffff1660e01b815260040160206040518083038186803b15801561020b57600080fd5b505afa15801561021f573d6000803e3d6000fd5b505050506040513d602081101561023557600080fd5b50516040516001600160e01b031960e088901b1681526001600160a01b03808716600483019081526024830187905260448301869052908316608483015260a060648301908152845460a484018190529192909160c490910190859080156102c657602002820191906000526020600020905b81546001600160a01b031681526001909101906020018083116102a8575b5050965050505050505060a06040518083038186803b1580156102e857600080fd5b505af41580156102fc573d6000803e3d6000fd5b505050506040513d60a081101561031257600080fd5b50608001516101c08201819052670de0b6b3a764000011610355576004604051806060016040528060288152602001611e4b6028913995509550505050506109f5565b6006830154604080516370a0823160e01b81526001600160a01b038c81166004830152915191909216916370a08231916024808301926020929190829003018186803b1580156103a457600080fd5b505afa1580156103b8573d6000803e3d6000fd5b505050506040513d60208110156103ce57600080fd5b505180825261041c5760016040518060400160405280601f81526020017f496e76616c696420636f6c6c61746572616c20746f206c69717569646174650081525095509550505050506109f5565b600061042a84600501610a35565b1180156104385750815460ff165b1515610200820181905261046e5760026040518060600160405280602a8152602001611dcd602a913995509550505050506109f5565b6104788985610a4a565b60408301526020820181905215801561049357506040810151155b156104c05760036040518060600160405280602a8152602001611e73602a913995509550505050506109f5565b6104ed6113886104e183604001518460200151610b4d90919063ffffffff16565b9063ffffffff610bb016565b6060820181905288116105005787610506565b80606001515b60808201819052815161052191859187918f918f9190610bea565b6101a0830181905261018083019190915260808201511115610549576101a081015160808201525b60068301546001600160a01b03166101e0820152866105bf576000610585826101e001518d6001600160a01b0316610e7590919063ffffffff16565b90508161018001518110156105bd576005604051806060016040528060338152602001611d9a603391399650965050505050506109f5565b505b6105c884610f1f565b60808101516105e29085908c90600063ffffffff610fd716565b806080015181604001511061066b576008840154608082015160408051632770a7eb60e21b81526001600160a01b038d81166004830152602482019390935290519190921691639dc29fac91604480830192600092919082900301818387803b15801561064e57600080fd5b505af1158015610662573d6000803e3d6000fd5b50505050610772565b60088401546040808301518151632770a7eb60e21b81526001600160a01b038d8116600483015260248201929092529151921691639dc29fac9160448082019260009290919082900301818387803b1580156106c657600080fd5b505af11580156106da573d6000803e3d6000fd5b505050506007840154604082015160808301516001600160a01b0390921691639dc29fac918c9161070a916112c4565b6040518363ffffffff1660e01b815260040180836001600160a01b03166001600160a01b0316815260200182815260200192505050600060405180830381600087803b15801561075957600080fd5b505af115801561076d573d6000803e3d6000fd5b505050505b86156107fa576101e08101516101808201516040805163f866c31960e01b81526001600160a01b038d8116600483015233602483015260448201939093529051919092169163f866c31991606480830192600092919082900301818387803b15
|
2020-06-20 23:40:03 +00:00
|
|
|
|
|
|
|
export interface LendingPoolLiquidationManagerLibraryAddresses {
|
2020-08-07 17:29:13 +00:00
|
|
|
["__$7347ff53b2b46c21e26a37164ae7f6739f$__"]: string;
|
2020-06-20 23:40:03 +00:00
|
|
|
}
|