mirror of
https://github.com/Instadapp/aave-protocol-v2.git
synced 2024-07-29 21:47:30 +00:00
208 lines
15 KiB
TypeScript
208 lines
15 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 { LendingPoolLiquidationManager } from "./LendingPoolLiquidationManager";
|
|
|
|
export class LendingPoolLiquidationManagerFactory extends ContractFactory {
|
|
constructor(signer?: Signer) {
|
|
super(_abi, _bytecode, signer);
|
|
}
|
|
|
|
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"
|
|
}
|
|
];
|
|
|
|
const _bytecode =
|
|
"0x6080604052600060015534801561001557600080fd5b506000805460ff1916600117905561145f806100326000396000f3fe6080604052600436106100285760003560e01c8062a718a91461002d578063c72c4d10146100f0575b600080fd5b610071600480360360a081101561004357600080fd5b506001600160a01b038135811691602081013582169160408201351690606081013590608001351515610121565b6040518083815260200180602001828103825283818151815260200191508051906020019080838360005b838110156100b457818101518382015260200161009c565b50505050905090810190601f1680156100e15780820380516001836020036101000a031916815260200191505b50935050505060405180910390f35b3480156100fc57600080fd5b50610105610cd4565b604080516001600160a01b039092168252519081900360200190f35b6000606061012d6112a2565b60375460408051632c6d0e9b60e01b81526001600160a01b03898116600483015291519190921691632c6d0e9b91602480830192610100929190829003018186803b15801561017b57600080fd5b505afa15801561018f573d6000803e3d6000fd5b505050506040513d6101008110156101a657600080fd5b5060e0015115156101a082018190526101de5760046040518060600160405280602881526020016113d8602891399250925050610cca565b60365460408051630c526de560e11b81526001600160a01b038b811660048301528981166024830152915191909216916318a4dbca916044808301926020929190829003018186803b15801561023357600080fd5b505afa158015610247573d6000803e3d6000fd5b505050506040513d602081101561025d57600080fd5b50518082526102a557505060408051808201909152601f81527f496e76616c696420636f6c6c61746572616c20746f206c697175696461746500602082015260019150610cca565b60365460408051630c7cddd760e11b81526001600160a01b038b81166004830152915191909216916318f9bbae916024808301926020929190829003018186803b1580156102f257600080fd5b505afa158015610306573d6000803e3d6000fd5b505050506040513d602081101561031c57600080fd5b505180156103a7575060365460408051639e3c4f3b60e01b81526001600160a01b038b81166004830152898116602483015291519190921691639e3c4f3b916044808301926020929190829003018186803b15801561037a57600080fd5b505afa15801561038e573d6000803e3d6000fd5b505050506040513d60208110156103a457600080fd5b50515b151561018082018190526103da5760026040518060600160405280602a81526020016113ae602a91399250925050610cca565b60365460408051639fb8afcd60e01b81526001600160a01b038a81166004830152898116602483015291519190921691639fb8afcd916044808301926060929190829003018186803b15801561042f57600080fd5b505afa158015610443573d6000803e3d6000fd5b505050506040513d606081101561045957600080fd5b5060208082015160409283015192840192909252820181905261049b5760036040518060600160405280602a8152602001611400602a91399250925050610cca565b6104c460646104b860328460200151610ce390919063ffffffff16565b9063ffffffff610d4516565b6060820181905285116104d757846104dd565b80606001515b60808201819052815160009182916104f9918c918c9190610d87565b60365460408051633faacc6b60e21b81526001600160a01b038e811660048301528d811660248301529151949650929450169163feab31ac91604480820192602092909190829003018186803b15801561055257600080fd5b505afa158015610566573d6000803e3d6000fd5b505050506040513d602081101561057c57600080fd5b505160e08401819052156105bd576105b08a8a8560e001516105ab86886000015161116490919063ffffffff16565b610d87565b6101008501526101208401525b82608001518110156105d157608083018190525b85610687576036546040805163e240301960e01b81526001600160a01b038d811660048301529151600093929092169163e240301991602480820192602092909190829003018186803b15801561062757600080fd5b505afa15801561063b573d6000803e3d6000fd5b505050506040513d602081101561065157600080fd5b505190508281101561068557600560405180606001604052806033815260200161137b603391399550955050505050610cca565b505b603660009054906101000a90046001600160a01b03166001600160a01b03166368beb4d68a8c8b8760800151878961010001518a61012001518b604001518f6040518a63ffffffff1660e01b8152600401808a6001600160a01b03166001600160a01b03168152602001896001600160a01b03166001600160a01b03168152602001886001600160a01b03166001600160a01b03168152602001878152602001868152602001858152602001848152602001838152602001821515151581526020019950505050505050505050600060405180830381600087803b15801561076e57600080fd5b505af1158015610782573d6000803e3d6000fd5b505060365460408051631a59df7760e11b81526001600160a01b038f811660048301529151600095509190921692506334b3beee91602480820192602092909190829003018186803b1580156107d757600080fd5b505afa1580156107eb573d6000803e3d6000fd5b505050506040513d602081101561080157600080fd5b505190508615610880576040805163f866c31960e01b81526001600160a01b038b811660048301523360248301526044820186905291519183169163f866c3199160648082019260009290919082900301818387803b15801561086357600080fd5b505af1158015610877573d6000803e3d6000fd5b505050506109a0565b806001600160a01b0316633edb7cb88a856040518363ffffffff1660e01b815260040180836001600160a01b03166001600160a01b0316815260200182815260200192505050600060405180830381600087803b1580156108e057600080fd5b505af11580156108f4573d6000803e3d6000fd5b50505050603660009054906101000a90046001600160a01b03166001600160a01b031663fa93b2a58c33866040518463ffffffff1660e01b815260040180846001600160a01b03166001600160a01b03168152602001836001600160a01b03166001600160a01b031681526020018281526020019350505050600060405180830381600087803b15801561098757600080fd5b505af115801561099b573d6000803e3d6000fd5b505050505b6036546080850151604080516328fcf4d360e01b81526001600160a01b038e811660048301523360248301526044820193909352905191909216916328fcf4d391349160648082019260009290919082900301818588803b158015610a0457600080fd5b505af1158015610a18573d6000803e3d6000fd5b505050505060008461010001511115610c2b57806001600160a01b0316633edb7cb88a8661012001516040518363ffffffff1660e01b815260040180836001600160a01b03166001600160a01b0316815260200182815260200192505050600060405180830381600087803b158015610a9057600080fd5b505af1158015610aa4573d6000803e3d6000fd5b50505050603660009054906101000a90046001600160a01b03166001600160a01b0316638f385c228c866101200151603560009054906101000a90046001600160a01b03166001600160a01b031663ee8912966040518163ffffffff1660e01b815260040160206040518083038186803b158015610b2157600080fd5b505afa158015610b35573d6000803e3d6000fd5b505050506040513d6020811015610b4b57600080fd5b5051604080516001600160e01b031960e087901b1681526001600160a01b0394851660048201526024810193909352921660448201529051606480830192600092919082900301818387803b158015610ba357600080fd5b505af1158015610bb7573d6000803e3d6000fd5b50505050886001600160a01b03168a6001600160a01b03168c6001600160a01b03167f36ca8b16d61dc13b1062adff83e3778ab92d14f9e35bfe9fd1283e02b13fb0a18761010001518861012001514260405180848152602001838152602001828152602001935050505060405180910390a45b60808085015160408087015181519283526020830187905282820152336060830152891515928201929092524260a082015290516001600160a01b03808c16928d821692918f16917f56864757fd5b1fc9f38f5f3a981cd8ae512ce41b902cf73fc506ee369c6bc2379181900360c00190a46000604051806040016040528060098152602001684e6f206572726f727360b81b81525095509550505050505b9550959350505050565b6035546001600160a01b031681565b600082610cf257506000610d3f565b82820282848281610cff57fe5b0414610d3c5760405162461bcd60e51b815260040180806020018281038252602181526020018061135a6021913960400191505060405180910390fd5b90505b92915050565b6000610d3c83836040518060400160405280601a81526020017f536166654d6174683a206469766973696f6e206279207a65726f0000000000008152506111a6565b60355460408051631f94a27560e31b81529051600092839283926001600160a01b039092169163fca513a891600480820192602092909190829003018186803b158015610dd357600080fd5b505afa158015610de7573d6000803e3d6000fd5b505050506040513d6020811015610dfd57600080fd5b50519050610e0961131c565b816001600160a01b031663b3596f07896040518263ffffffff1660e01b815260040180826001600160a01b03166001600160a01b0316815260200191505060206040518083038186803b158015610e5f57600080fd5b505afa158015610e73573d6000803e3d6000fd5b505050506040513d6020811015610e8957600080fd5b5051604080830191909152805163b3596f0760e01b81526001600160a01b03898116600483015291519184169163b3596f0791602480820192602092909190829003018186803b158015610edc57600080fd5b505afa158015610ef0573d6000803e3d6000fd5b505050506040513d6020811015610f0657600080fd5b50516060820152603654604080516331da9b2760e21b81526001600160a01b038b811660048301529151919092169163c76a6c9c916024808301926020929190829003018186803b158015610f5a57600080fd5b505afa158015610f6e573d6000803e3d6000fd5b505050506040513d6020811015610f8457600080fd5b50516020828101919091526036546040805163288d4ff760e21b81526001600160a01b038b811660048301529151919092169263a2353fdc9260248082019391829003018186803b158015610fd857600080fd5b505afa158015610fec573d6000803e3d6000fd5b505050506040513d602081101561100257600080fd5b505160a08201526036546040805163288d4ff760e21b81526001600160a01b038b811660048301529151919092169163a2353fdc916024808301926020929190829003018186803b15801561105657600080fd5b505afa15801561106a573d6000803e3d6000fd5b505050506040513d602081101561108057600080fd5b505160c0820152602081015160a082015160408301516110e6926064926104b8926110da916110b89190600a0a63ffffffff610ce316565b6104b88760c00151600a0a6110da8e8a60600151610ce390919063ffffffff16565b9063ffffffff610ce316565b6080820181905285101561114e5784935061114781602001516104b860646110da6111258660c00151600a0a8760600151610ce390919063ffffffff16565b6104b88760a00151600a0a6110da8c8a60400151610ce390919063ffffffff16565b9250611159565b806080015193508592505b505094509492505050565b6000610d3c83836040518060400160405280601e81526020017f536166654d6174683a207375627472616374696f6e206f766572666c6f770000815250611248565b600081836112325760405162461bcd60e51b81526004018080602001828103825283818151815260200191508051906020019080838360005b838110156111f75781810151838201526020016111df565b50505050905090810190601f1680156112245780820380516001836020036101000a031916815260200191505b509250505060405180910390fd5b50600083858161123e57fe5b0495945050505050565b6000818484111561129a5760405162461bcd60e51b81526020600482018181528351602484015283519092839260449091019190850190808383600083156111f75781810151838201526020016111df565b505050900390565b604051806101c00160405280600081526020016000815260200160008152602001600081526020016000815260200160008152602001600081526020016000815260200160008152602001600081526020016000600281111561130157fe5b81526000602082018190526040820181905260609091015290565b6040518060e0016040528060008152602001600081526020016000815260200160008152602001600081526020016000815260200160008152509056fe536166654d6174683a206d756c7469706c69636174696f6e206f766572666c6f7754686572652069736e277420656e6f756768206c697175696469747920617661696c61626c6520746f206c697175696461746554686520636f6c6c61746572616c2063686f73656e2063616e6e6f74206265206c6971756964617465644865616c746820666163746f72206973206e6f742062656c6f7720746865207468726573686f6c645573657220646964206e6f7420626f72726f7720746865207370656369666965642063757272656e6379a264697066735822122027fd39fd7b7a695a4c6e0751b630a0a2c4d5a79b1039291af09f0cdb9586edfb64736f6c63430006080033";
|