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