aave-protocol-v2/types/MockFlashLoanReceiverFactory.ts
2020-07-10 11:20:15 +02:00

170 lines
8.6 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 =
"0x60806040526000805460ff60a01b1916905534801561001d57600080fd5b50604051610a4b380380610a4b8339818101604052602081101561004057600080fd5b5051600080546001600160a01b039092166001600160a01b03199092169190911790556109d9806100726000396000f3fe6080604052600436106100385760003560e01c8063388f70f114610044578063c72c4d1014610072578063ee872558146100a35761003f565b3661003f57005b600080fd5b34801561005057600080fd5b506100706004803603602081101561006757600080fd5b50351515610172565b005b34801561007e57600080fd5b50610087610190565b604080516001600160a01b039092168252519081900360200190f35b3480156100af57600080fd5b50610070600480360360808110156100c657600080fd5b6001600160a01b0382351691602081013591604082013591908101906080810160608201356401000000008111156100fd57600080fd5b82018360208201111561010f57600080fd5b8035906020019184600183028401116401000000008311171561013157600080fd5b91908080601f01602080910402602001604051908101604052809392919081815260200183838082843760009201919091525092955061019f945050505050565b60008054911515600160a01b0260ff60a01b19909216919091179055565b6000546001600160a01b031681565b836101b96001600160a01b0382163063ffffffff61036116565b84111561020d576040805162461bcd60e51b815260206004820181905260248201527f496e76616c69642062616c616e636520666f722074686520636f6e7472616374604482015290519081900360640190fd5b600054600160a01b900460ff161561026e57604080516001600160a01b03871681526020810186905280820185905290517f816f6a6bc084e1996be1a831afa1af30763d0501b6b43b9e1922a11f347366d79181900360600190a15061035b565b610280856001600160a01b031661040d565b6102f757806001600160a01b031663a0712d68846040518263ffffffff1660e01b815260040180828152602001915050602060405180830381600087803b1580156102ca57600080fd5b505af11580156102de573d6000803e3d6000fd5b505050506040513d60208110156102f457600080fd5b50505b6103108561030b868663ffffffff61043216565b610493565b604080516001600160a01b03871681526020810186905280820185905290517f7d94e9d0c906b8d7b2b52a581b9e9ba728aa6f8cd8532bd87243d193f47401be9181900360600190a1505b50505050565b600061036c8361040d565b1561038257506001600160a01b03811631610407565b826001600160a01b03166370a08231836040518263ffffffff1660e01b815260040180826001600160a01b03166001600160a01b0316815260200191505060206040518083038186803b1580156103d857600080fd5b505afa1580156103ec573d6000803e3d6000fd5b505050506040513d602081101561040257600080fd5b505190505b92915050565b6001600160a01b03811673eeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeee14919050565b60008282018381101561048c576040805162461bcd60e51b815260206004820152601b60248201527f536166654d6174683a206164646974696f6e206f766572666c6f770000000000604482015290519081900360640190fd5b9392505050565b60008060009054906101000a90046001600160a01b03166001600160a01b0316630261bf8b6040518163ffffffff1660e01b815260040160206040518083038186803b1580156104e257600080fd5b505afa1580156104f6573d6000803e3d6000fd5b505050506040513d602081101561050c57600080fd5b5051905061051b818484610520565b505050565b610532826001600160a01b031661040d565b1561058d576040516001600160a01b038416908290600081818185875af1925050503d8060008114610580576040519150601f19603f3d011682016040523d82523d6000602084013e610585565b606091505b50505061051b565b61051b6001600160a01b038316848363ffffffff6105a716565b806105b15761051b565b6105ba8361040d565b15610666576040516000906001600160a01b0384169061c35090849084818181858888f193505050503d806000811461060f576040519150601f19603f3d011682016040523d82523d6000602084013e610614565b606091505b5050905080610660576040805162461bcd60e51b815260206004820152601360248201527211551217d514905394d1915497d19052531151606a1b604482015290519081900360640190fd5b5061051b565b61051b6001600160a01b038416838363ffffffff61068016565b604080516001600160a01b038416602482015260448082018490528251808303909101815260649091019091526020810180516001600160e01b031663a9059cbb60e01b17905261051b9084906060610722826040518060400160405280602081526020017f5361666545524332303a206c6f772d6c6576656c2063616c6c206661696c6564815250856001600160a01b031661077e9092919063ffffffff16565b80519091501561051b5780806020019051602081101561074157600080fd5b505161051b5760405162461bcd60e51b815260040180806020018281038252602a81526020018061097a602a913960400191505060405180910390fd5b606061078d8484600085610795565b949350505050565b60606107a085610940565b6107f1576040805162461bcd60e51b815260206004820152601d60248201527f416464726573733a2063616c6c20746f206e6f6e2d636f6e7472616374000000604482015290519081900360640190fd5b60006060866001600160a01b031685876040518082805190602001908083835b602083106108305780518252601f199092019160209182019101610811565b6001836020036101000a03801982511681845116808217855250505050505090500191505060006040518083038185875af1925050503d8060008114610892576040519150601f19603f3d011682016040523d82523d6000602084013e610897565b606091505b509150915081156108ab57915061078d9050565b8051156108bb5780518082602001fd5b8360405162461bcd60e51b81526004018080602001828103825283818151815260200191508051906020019080838360005b838110156109055781810151838201526020016108ed565b50505050905090810190601f1680156109325780820380516001836020036101000a031916815260200191505b509250505060405180910390fd5b6000813f7fc5d2460186f7233c927e7db2dcc703c0e500b653ca82273b7bfad8045d85a47081811480159061078d57505015159291505056fe5361666545524332303a204552433230206f7065726174696f6e20646964206e6f742073756363656564a2646970667358221220465484f6c9b8de2bda0cda9dd2cc8181ee7f910cbe26e3d3226c32373fd8603064736f6c63430006080033";