aave-protocol-v2/types/MockFlashLoanReceiverFactory.ts
2020-06-21 01:40:03 +02:00

170 lines
7.9 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 { MockFlashLoanReceiver } from "./MockFlashLoanReceiver";
export class MockFlashLoanReceiverFactory extends ContractFactory {
constructor(signer?: Signer) {
super(_abi, _bytecode, signer);
}
deploy(
_provider: string,
overrides?: TransactionOverrides
): Promise<MockFlashLoanReceiver> {
return super.deploy(_provider, overrides) as Promise<MockFlashLoanReceiver>;
}
getDeployTransaction(
_provider: string,
overrides?: TransactionOverrides
): UnsignedTransaction {
return super.getDeployTransaction(_provider, overrides);
}
attach(address: string): MockFlashLoanReceiver {
return super.attach(address) as MockFlashLoanReceiver;
}
connect(signer: Signer): MockFlashLoanReceiverFactory {
return super.connect(signer) as MockFlashLoanReceiverFactory;
}
static connect(
address: string,
signerOrProvider: Signer | Provider
): MockFlashLoanReceiver {
return new Contract(
address,
_abi,
signerOrProvider
) as MockFlashLoanReceiver;
}
}
const _abi = [
{
inputs: [
{
internalType: "contract ILendingPoolAddressesProvider",
name: "_provider",
type: "address"
}
],
stateMutability: "nonpayable",
type: "constructor"
},
{
anonymous: false,
inputs: [
{
indexed: false,
internalType: "address",
name: "_reserve",
type: "address"
},
{
indexed: false,
internalType: "uint256",
name: "_amount",
type: "uint256"
},
{
indexed: false,
internalType: "uint256",
name: "_fee",
type: "uint256"
}
],
name: "ExecutedWithFail",
type: "event"
},
{
anonymous: false,
inputs: [
{
indexed: false,
internalType: "address",
name: "_reserve",
type: "address"
},
{
indexed: false,
internalType: "uint256",
name: "_amount",
type: "uint256"
},
{
indexed: false,
internalType: "uint256",
name: "_fee",
type: "uint256"
}
],
name: "ExecutedWithSuccess",
type: "event"
},
{
inputs: [],
name: "addressesProvider",
outputs: [
{
internalType: "contract ILendingPoolAddressesProvider",
name: "",
type: "address"
}
],
stateMutability: "view",
type: "function"
},
{
inputs: [
{
internalType: "address",
name: "_reserve",
type: "address"
},
{
internalType: "uint256",
name: "_amount",
type: "uint256"
},
{
internalType: "uint256",
name: "_fee",
type: "uint256"
},
{
internalType: "bytes",
name: "_params",
type: "bytes"
}
],
name: "executeOperation",
outputs: [],
stateMutability: "nonpayable",
type: "function"
},
{
inputs: [
{
internalType: "bool",
name: "_fail",
type: "bool"
}
],
name: "setFailExecutionTransfer",
outputs: [],
stateMutability: "nonpayable",
type: "function"
},
{
stateMutability: "payable",
type: "receive"
}
];
const _bytecode =
"0x60806040526000805460ff60a01b1916905534801561001d57600080fd5b506040516108c53803806108c58339818101604052602081101561004057600080fd5b5051600080546001600160a01b039092166001600160a01b0319909216919091179055610853806100726000396000f3fe6080604052600436106100385760003560e01c8063388f70f114610044578063c72c4d1014610072578063ee872558146100a35761003f565b3661003f57005b600080fd5b34801561005057600080fd5b506100706004803603602081101561006757600080fd5b50351515610172565b005b34801561007e57600080fd5b50610087610190565b604080516001600160a01b039092168252519081900360200190f35b3480156100af57600080fd5b50610070600480360360808110156100c657600080fd5b6001600160a01b0382351691602081013591604082013591908101906080810160608201356401000000008111156100fd57600080fd5b82018360208201111561010f57600080fd5b8035906020019184600183028401116401000000008311171561013157600080fd5b91908080601f01602080910402602001604051908101604052809392919081815260200183838082843760009201919091525092955061019f945050505050565b60008054911515600160a01b0260ff60a01b19909216919091179055565b6000546001600160a01b031681565b836101aa308261035c565b8411156101fe576040805162461bcd60e51b815260206004820181905260248201527f496e76616c69642062616c616e636520666f722074686520636f6e7472616374604482015290519081900360640190fd5b600054600160a01b900460ff161561025f57604080516001600160a01b03871681526020810186905280820185905290517f816f6a6bc084e1996be1a831afa1af30763d0501b6b43b9e1922a11f347366d79181900360600190a150610356565b61026761041b565b6001600160a01b0316856001600160a01b0316146102f257806001600160a01b031663a0712d68846040518263ffffffff1660e01b815260040180828152602001915050602060405180830381600087803b1580156102c557600080fd5b505af11580156102d9573d6000803e3d6000fd5b505050506040513d60208110156102ef57600080fd5b50505b61030b85610306868663ffffffff61043316565b610494565b604080516001600160a01b03871681526020810186905280820185905290517f7d94e9d0c906b8d7b2b52a581b9e9ba728aa6f8cd8532bd87243d193f47401be9181900360600190a1505b50505050565b600061036661041b565b6001600160a01b0316826001600160a01b0316141561039057506001600160a01b03821631610415565b816001600160a01b03166370a08231846040518263ffffffff1660e01b815260040180826001600160a01b03166001600160a01b0316815260200191505060206040518083038186803b1580156103e657600080fd5b505afa1580156103fa573d6000803e3d6000fd5b505050506040513d602081101561041057600080fd5b505190505b92915050565b73eeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeee90565b60008282018381101561048d576040805162461bcd60e51b815260206004820152601b60248201527f536166654d6174683a206164646974696f6e206f766572666c6f770000000000604482015290519081900360640190fd5b9392505050565b60008060009054906101000a90046001600160a01b03166001600160a01b0316630261bf8b6040518163ffffffff1660e01b815260040160206040518083038186803b1580156104e357600080fd5b505afa1580156104f7573d6000803e3d6000fd5b505050506040513d602081101561050d57600080fd5b5051905061051c818484610521565b505050565b61052961041b565b6001600160a01b0316826001600160a01b03161415610598576040516001600160a01b038416908290600081818185875af1925050503d806000811461058b576040519150601f19603f3d011682016040523d82523d6000602084013e610590565b606091505b50505061051c565b61051c6001600160a01b038316848363ffffffff6105b216565b604080516001600160a01b038416602482015260448082018490528251808303909101815260649091019091526020810180516001600160e01b031663a9059cbb60e01b17905261051c908490610611826001600160a01b03166107b7565b610662576040805162461bcd60e51b815260206004820152601f60248201527f5361666545524332303a2063616c6c20746f206e6f6e2d636f6e747261637400604482015290519081900360640190fd5b60006060836001600160a01b0316836040518082805190602001908083835b602083106106a05780518252601f199092019160209182019101610681565b6001836020036101000a0380198251168184511680821785525050505050509050019150506000604051808303816000865af19150503d8060008114610702576040519150601f19603f3d011682016040523d82523d6000602084013e610707565b606091505b50915091508161075e576040805162461bcd60e51b815260206004820181905260248201527f5361666545524332303a206c6f772d6c6576656c2063616c6c206661696c6564604482015290519081900360640190fd5b8051156103565780806020019051602081101561077a57600080fd5b50516103565760405162461bcd60e51b815260040180806020018281038252602a8152602001806107f4602a913960400191505060405180910390fd5b6000813f7fc5d2460186f7233c927e7db2dcc703c0e500b653ca82273b7bfad8045d85a4708181148015906107eb57508115155b94935050505056fe5361666545524332303a204552433230206f7065726174696f6e20646964206e6f742073756363656564a2646970667358221220d7b37dd94d5f3606332633199b3128ca2d6f0fef114884da808c8d9dec540e6364736f6c63430006080033";