mirror of
https://github.com/Instadapp/aave-protocol-v2.git
synced 2024-07-29 21:47:30 +00:00
192 lines
20 KiB
TypeScript
192 lines
20 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(
|
|
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()
|
|
);
|
|
|
|
return linkedBytecode;
|
|
}
|
|
|
|
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: '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',
|
|
},
|
|
{
|
|
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',
|
|
},
|
|
{
|
|
inputs: [
|
|
{
|
|
internalType: 'uint256',
|
|
name: '',
|
|
type: 'uint256',
|
|
},
|
|
],
|
|
name: 'reservesList',
|
|
outputs: [
|
|
{
|
|
internalType: 'address',
|
|
name: '',
|
|
type: 'address',
|
|
},
|
|
],
|
|
stateMutability: 'view',
|
|
type: 'function',
|
|
},
|
|
];
|
|
|
|
const _bytecode =
|
|
'0x6080604052600060015534801561001557600080fd5b506001600055611e848061002a6000396000f3fe6080604052600436106100335760003560e01c8062a718a9146100385780634fe7a6e5146100fb578063c72c4d1014610141575b600080fd5b61007c600480360360a081101561004e57600080fd5b506001600160a01b038135811691602081013582169160408201351690606081013590608001351515610156565b6040518083815260200180602001828103825283818151815260200191508051906020019080838360005b838110156100bf5781810151838201526020016100a7565b50505050905090810190601f1680156100ec5780820380516001836020036101000a031916815260200191505b50935050505060405180910390f35b34801561010757600080fd5b506101256004803603602081101561011e57600080fd5b5035610a0f565b604080516001600160a01b039092168252519081900360200190f35b34801561014d57600080fd5b50610125610a36565b6001600160a01b0380851660009081526037602090815260408083208985168085528285209589168552603884528285209085529092528220919260609261019c611c53565b73__$7347ff53b2b46c21e26a37164ae7f6739f$__6392eeb05c8a603760386039603560009054906101000a90046001600160a01b03166001600160a01b031663fca513a86040518163ffffffff1660e01b815260040160206040518083038186803b15801561020b57600080fd5b505afa15801561021f573d6000803e3d6000fd5b505050506040513d602081101561023557600080fd5b50516040516001600160e01b031960e088901b1681526001600160a01b03808716600483019081526024830187905260448301869052908316608483015260a060648301908152845460a484018190529192909160c490910190859080156102c657602002820191906000526020600020905b81546001600160a01b031681526001909101906020018083116102a8575b5050965050505050505060a06040518083038186803b1580156102e857600080fd5b505af41580156102fc573d6000803e3d6000fd5b505050506040513d60a081101561031257600080fd5b50608001516101c08201819052670de0b6b3a764000011610355576004604051806060016040528060288152602001611dfd602891399550955050505050610a05565b6006830154604080516370a0823160e01b81526001600160a01b038c81166004830152915191909216916370a08231916024808301926020929190829003018186803b1580156103a457600080fd5b505afa1580156103b8573d6000803e3d6000fd5b505050506040513d60208110156103ce57600080fd5b505180825261041c5760016040518060400160405280601f81526020017f496e76616c696420636f6c6c61746572616c20746f206c6971756964617465008152509550955050505050610a05565b600061042a84600501610a45565b1180156104385750815460ff165b1515610200820181905261046e5760026040518060600160405280602a8152602001611d7f602a91399550955050505050610a05565b6104788985610a5a565b60408301526020820181905215801561049357506040810151155b156104c05760036040518060600160405280602a8152602001611e25602a91399550955050505050610a05565b6104fd60646104f160326104e585604001518660200151610b5d90919063ffffffff16565b9063ffffffff610bc016565b9063ffffffff610c1916565b6060820181905288116105105787610516565b80606001515b60808201819052815161053191859187918f918f9190610c5b565b6101a0830181905261018083019190915260808201511115610559576101a081015160808201525b60068301546001600160a01b03166101e0820152866105cf576000610595826101e001518d6001600160a01b0316610edc90919063ffffffff16565b90508161018001518110156105cd576005604051806060016040528060338152602001611d4c60339139965096505050505050610a05565b505b6105d884610f86565b60808101516105f29085908c90600063ffffffff61103e16565b806080015181604001511061067b576008840154608082015160408051632770a7eb60e21b81526001600160a01b038d81166004830152602482019390935290519190921691639dc29fac91604480830192600092919082900301818387803b15801561065e57600080fd5b505af1158015610672573d6000803e3d6000fd5b50505050610782565b60088401546040808301518151632770a7eb60e21b81526001600160a01b038d8116600483015260248201929092529151921691639dc29fac9160448082019260009290919082900301818387803b1580156106d657600080fd5b505af11580156106ea573d6000803e3d6000fd5b505050506007840154604082015160808301516001600160a01b0390921691639dc29fac918c9161071a9161132b565b6040518363ffffffff1660e01b815260040180836001600160a01b03166001600160a01b0316815260200182815260200192505050600060405180830381600087803b15801561076957600080fd5b505af115801561077d573d6000803e3d6000fd5b505050505b861561080a576101e08101516101808201516040805163f866c31960e01b81526001600160a01b038d8116600483015233602483015260448201939093529051919092169163f866c31991606480830192600092919082900301818387803b1580156107ed57600080fd5b505af1158015610801573d6000803e3d6000fd5b5050505061093a565b61081383610f86565b61018081015161082f9084908d9060009063ffffffff61103e16565b806101e001516001600160a01b0316633edb7cb88a8361018001516040518363ffffffff1660e01b815260040180836001600160a01b03166001600160a01b0316815260200182815260200192505050600060405180830381600087803b15801561089957600080fd5b505af11580156108ad573d6000803e3d6000fd5b5050506101e082015161018083015160408051634efecaa560e01b81523360048201526024810192909252516001600160a01b039092169250634efecaa59160448083019260209291908290030181600087803b15801561090d57600080fd5b505af1158015610921573d6000803e3d6000fd5b505050506040513d602081101561093757600080fd5b50505b60068401546080820151610968916001600160a01b038d81169233929190911690600163ffffffff61136d16565b60808082015161018083015160408051928352602083019190915233828201528915156060830152429282019290925290516001600160a01b03808c16928d821692918f16917f54343dd5791108d018f6fb8def2c14d746f777c51e9924962237813a527528709181900360a00190a46000604051806040016040528060098152602001684e6f206572726f727360b81b81525095509550505050505b9550959350505050565b60398181548110610a1c57fe5b6000918252602090912001546001600160a01b0316905081565b6035546001600160a01b031681565b5460101c650fffffff0001600160f01b031690565b6007810154604080516370a0823160e01b81526001600160a01b0385811660048301529151600093849316916370a08231916024808301926020929190829003018186803b158015610aab57600080fd5b505afa158015610abf573d6000803e3d6000fd5b505050506040513d6020811015610ad557600080fd5b50516008840154604080516370a0823160e01b81526001600160a01b038881166004830152915191909216916370a08231916024808301926020929190829003018186803b158015610b2657600080fd5b505afa158015610b3a573d6000803e3d6000fd5b505050506040513d6020811015610b5057600080fd5b5051909590945092505050565b600082820183811015610bb7576040805162461bcd60e51b815260206004820152601b60248201527f536166654d6174683a206164646974696f6e206f766572666c6f770000000000604482015290519081900360640190fd5b90505b92915050565b600082610bcf57506000610bba565b82820282848281610bdc57fe5b0414610bb75760405162461bcd60e51b8152600401808060200182810382526021815260200180611d2b6021913960400191505060405180910390fd5b6000610bb783836040518060400160405280601a81526020017f536166654d6174683a206469766973696f6e206279207a65726f000000000000815250611560565b60355460408051631f94a27560e31b81529051600092839283926001600160a01b039092169163fca513a891600480820192602092909190829003018186803b158015610ca757600080fd5b505afa158015610cbb573d6000803e3d6000fd5b505050506040513d6020811015610cd157600080fd5b50519050610cdd611ced565b816001600160a01b031663b3596f07896040518263ffffffff1660e01b815260040180826001600160a01b03166001600160a01b0316815260200191505060206040518083038186803b158015610d3357600080fd5b505afa158015610d47573d6000803e3d6000fd5b505050506040513d6020811015610d5d57600080fd5b5051604080830191909152805163b3596f0760e01b81526001600160a01b03898116600483015291519184169163b3596f0791602480820192602092909190829003018186803b158015610db057600080fd5b505afa158015610dc4573d6000803e3d6000fd5b505050506040513d6020811015610dda57600080fd5b50516060820152610ded60058b01611602565b60c0850152602084015250610e06905060058a01611649565b60a0820181905260208201516040830151610e5c926064926104f19290916104e591610e3a91600a0a63ffffffff610bc016565b6104f18760c00151600a0a6104e58e8a60600151610bc090919063ffffffff16565b60808201819052851015610ec457849350610ebd81602001516104f160646104e5610e9b8660c00151600a0a8760600151610bc090919063ffffffff16565b6104f18760a00151600a0a6104e58c8a60400151610bc090919063ffffffff16565b9250610ecf565b806080015193508592505b5050965096945050505050565b6000610ee78361165a565b15610efd57506001600160a01b03811631610bba565b826001600160a01b03166370a08231836040518263ffffffff1660e01b815260040180826001600160a01b03166001600160a01b0316815260200191505060206040518083038186803b158015610f5357600080fd5b505afa158015610f67573d6000803e3d6000fd5b505050506040513d6020811015610f7d57600080fd5b50519050610bba565b6000610f918261167f565b9050801561101a5760018201546009830154600091610fbd91600160a01b900464ffffffffff1661177f565b8354909150610fd390829063ffffffff6117f416565b835560028301546009840154600091610ff991600160a01b900464ffffffffff1661182c565b90506110128460040154826117f490919063ffffffff16565b600485015550505b50600901805464ffffffffff60a01b1916600160a01b4264ffffffffff1602179055565b60078401546040805163487b7e7960e11b815290516000926001600160a01b0316916390f6fcf2916004808301926020929190829003018186803b15801561108557600080fd5b505afa158015611099573d6000803e3d6000fd5b505050506040513d60208110156110af57600080fd5b505160068601549091506000906110d8906001600160a01b03878116911663ffffffff610edc16565b6009870154909150600090819081906001600160a01b03166357e37af0896111168961110a898d63ffffffff610b5d16565b9063ffffffff61132b16565b8c60070160009054906101000a90046001600160a01b03166001600160a01b03166318160ddd6040518163ffffffff1660e01b815260040160206040518083038186803b15801561116657600080fd5b505afa15801561117a573d6000803e3d6000fd5b505050506040513d602081101561119057600080fd5b505160088e0154604080516318160ddd60e01b815290516001600160a01b03909216916318160ddd91600480820192602092909190829003018186803b1580156111d957600080fd5b505afa1580156111ed573d6000803e3d6000fd5b505050506040513d602081101561120357600080fd5b5051604080516001600160e01b031960e088901b1681526001600160a01b039095166004860152602485019390935260448401919091526064830152608482018990525160a4808301926060929190829003018186803b15801561126657600080fd5b505afa15801561127a573d6000803e3d6000fd5b505050506040513d606081101561129057600080fd5b50805160208083015160409384015160018e0184905560038e0182905560028e018190558d5460048f015486518681529485018490528487018c905260608501839052608085019190915260a0840152935192965094509192506001600160a01b038a16917f131cf1f61e39fd78f61f07d78533f5b6c13629c80ef6965983e92c72efbaa4a4919081900360c00190a2505050505050505050565b6000610bb783836040518060400160405280601e81526020017f536166654d6174683a207375627472616374696f6e206f766572666c6f770000815250611888565b8161137757611559565b6113808561165a565b1561153e57813410156113c45760405162461bcd60e51b815260040180806020018281038252602a815260200180611da9602a913960400191505060405180910390fd5b6001600160a01b0383163014611477576040516000906001600160a01b0385169061c35090859084818181858888f193505050503d8060008114611424576040519150601f19603f3d011682016040523d82523d6000602084013e611429565b606091505b5050905080611475576040805162461bcd60e51b815260206004820152601360248201527211551217d514905394d1915497d19052531151606a1b604482015290519081900360640190fd5b505b80801561148357508134115b156115395760006001600160a01b0385166114a4348563ffffffff61132b16565b60405161c35091906000818181858888f193505050503d80600081146114e6576040519150601f19603f3d011682016040523d82523d6000602084013e6114eb565b606091505b5050905080611537576040805162461bcd60e51b815260206004820152601360248201527211551217d514905394d1915497d19052531151606a1b604482015290519081900360640190fd5b505b611559565b6115596001600160a01b03861685858563ffffffff6118e216565b5050505050565b600081836115ec5760405162461bcd60e51b81526004018080602001828103825283818151815260200191508051906020019080838360005b838110156115b1578181015183820152602001611599565b50505050905090810190601f1680156115de5780820380516001836020036101000a031916815260200191505b509250505060405180910390fd5b5060008385816115f857fe5b0495945050505050565b54670fffffffffff000019811691601082901c650fffffff0001600160f01b031691602081901c630fff0001600160e01b03169160309190911c610100600160d01b031690565b5460301c610100600160d01b031690565b6001600160a01b03811673eeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeee14919050565b6000610bba8260080160009054906101000a90046001600160a01b03166001600160a01b03166318160ddd6040518163ffffffff1660e01b815260040160206040518083038186803b1580156116d457600080fd5b505afa1580156116e8573d6000803e3d6000fd5b505050506040513d60208110156116fe57600080fd5b50516007840154604080516318160ddd60e01b815290516001600160a01b03909216916318160ddd91600480820192602092909190829003018186803b15801561174757600080fd5b505afa15801561175b573d6000803e3d6000fd5b505050506040513d602081101561177157600080fd5b50519063ffffffff610b5d16565b6000806117994264ffffffffff851663ffffffff61132b16565b905060006117c26117ad6301e13380611942565b6117b684611942565b9063ffffffff61195816565b90506117eb6117cf611983565b6117df878463ffffffff6117f416565b9063ffffffff610b5d16565b95945050505050565b6000610bb76b033b2e3c9fd0803ce80000006104f1611819868663ffffffff610bc016565b6b019d971e4fe8401e7400000090610b5d565b6000806118464264ffffffffff851663ffffffff61132b16565b9050600061185e856301e1338063ffffffff610c1916565b90506117eb8261187c61186f611983565b849063ffffffff610b5d16565b9063ffffffff61199316565b600081848411156118da5760405162461bcd60e51b81526020600482018181528351602484015283519092839260449091019190850190808383600083156115b1578181015183820152602001611599565b505050900390565b604080516001600160a01b0380861660248301528416604482015260648082018490528251808303909101815260849091019091526020810180516001600160e01b03166323b872dd60e01b17905261193c9085906119ed565b50505050565b6000610bba82633b9aca0063ffffffff610bc016565b60006002820461197b836104f161186f876b033b2e3c9fd0803ce8000000610bc0565b949350505050565b6b033b2e3c9fd0803ce800000090565b6000600282066119af576b033b2e3c9fd0803ce80000006119b1565b825b90506002820491505b8115610bba576119ca83846117f4565b925060028206156119e2576119df81846117f4565b90505b6002820491506119ba565b6060611a42826040518060400160405280602081526020017f5361666545524332303a206c6f772d6c6576656c2063616c6c206661696c6564815250856001600160a01b0316611aa39092919063ffffffff16565b805190915015611a9e57808060200190516020811015611a6157600080fd5b5051611a9e5760405162461bcd60e51b815260040180806020018281038252602a815260200180611dd3602a913960400191505060405180910390fd5b505050565b606061197b84846000856060611ab885611c1a565b611b09576040805162461bcd60e51b815260206004820152601d60248201527f416464726573733a2063616c6c20746f206e6f6e2d636f6e7472616374000000604482015290519081900360640190fd5b60006060866001600160a01b031685876040518082805190602001908083835b60208310611b485780518252601f199092019160209182019101611b29565b6001836020036101000a03801982511681845116808217855250505050505090500191505060006040518083038185875af1925050503d8060008114611baa576040519150601f19603f3d011682016040523d82523d6000602084013e611baf565b606091505b50915091508115611bc357915061197b9050565b805115611bd35780518082602001fd5b60405162461bcd60e51b81526020600482018181528651602484015286518793919283926044019190850190808383600083156115b1578181015183820152602001611599565b6000813f7fc5d2460186f7233c927e7db2dcc703c0e500b653ca82273b7bfad8045d85a47081811480159061197b575050151592915050565b6040518061022001604052806000815260200160008152602001600081526020016000815260200160008152602001600081526020016000815260200160008152602001600081526020016000815260200160006002811115611cb257fe5b81526020016000815260200160008152602001600081526020016000815260200160006001600160a01b031681526020016000151581525090565b6040518060e0016040528060008152602001600081526020016000815260200160008152602001600081526020016000815260200160008152509056fe536166654d6174683a206d756c7469706c69636174696f6e206f766572666c6f7754686572652069736e277420656e6f756768206c697175696469747920617661696c61626c6520746f206c697175696461746554686520636f6c6c61746572616c2063686f73656e2063616e6e6f74206265206c69717569646174656457726f6e67207573616765206f66204554482e756e6976657273616c5472616e7366657246726f6d28295361666545524332303a204552433230206f7065726174696f6e20646964206e6f7420737563636565644865616c746820666163746f72206973206e6f742062656c6f7720746865207468726573686f6c645573657220646964206e6f7420626f72726f7720746865207370656369666965642063757272656e6379a26469706673582212208b1ee7a4d75ac55c3473a69bedf0630c2487c5658a274dbabc75554b85cfa99864736f6c63430006080033';
|
|
|
|
export interface LendingPoolLiquidationManagerLibraryAddresses {
|
|
['__$7347ff53b2b46c21e26a37164ae7f6739f$__']: string;
|
|
}
|