aave-protocol-v2/types/MockFlashLoanReceiverFactory.ts

170 lines
9.6 KiB
TypeScript
Raw Normal View History

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 { 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 =
"0x608060405260008060146101000a81548160ff02191690831515021790555034801561002a57600080fd5b50604051610c35380380610c358339818101604052602081101561004d57600080fd5b810190808051906020019092919050505080806000806101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff1602179055505050610b85806100b06000396000f3fe6080604052600436106100385760003560e01c8063388f70f114610044578063c72c4d1014610081578063ee872558146100d85761003f565b3661003f57005b600080fd5b34801561005057600080fd5b5061007f6004803603602081101561006757600080fd5b810190808035151590602001909291905050506101d4565b005b34801561008d57600080fd5b506100966101f1565b604051808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200191505060405180910390f35b3480156100e457600080fd5b506101d2600480360360808110156100fb57600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff16906020019092919080359060200190929190803590602001909291908035906020019064010000000081111561014c57600080fd5b82018360208201111561015e57600080fd5b8035906020019184600183028401116401000000008311171561018057600080fd5b91908080601f016020809104026020016040519081016040528093929190818152602001838380828437600081840152601f19601f820116905080830192505050505050509192919290505050610216565b005b80600060146101000a81548160ff02191690831515021790555050565b6000809054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b60008490506102253086610489565b84111561029a576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260208152602001807f496e76616c69642062616c616e636520666f722074686520636f6e747261637481525060200191505060405180910390fd5b600060149054906101000a900460ff1615610328577f816f6a6bc084e1996be1a831afa1af30763d0501b6b43b9e1922a11f347366d7858585604051808473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001838152602001828152602001935050505060405180910390a150610483565b6103306105a6565b73ffffffffffffffffffffffffffffffffffffffff168573ffffffffffffffffffffffffffffffffffffffff16146103f2578073ffffffffffffffffffffffffffffffffffffffff1663a0712d68846040518263ffffffff1660e01b815260040180828152602001915050602060405180830381600087803b1580156103b557600080fd5b505af11580156103c9573d6000803e3d6000fd5b505050506040513d60208110156103df57600080fd5b8101908080519060200190929190505050505b61040e8561040985876105c290919063ffffffff16565b61064a565b7f7d94e9d0c906b8d7b2b52a581b9e9ba728aa6f8cd8532bd87243d193f47401be858585604051808473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001838152602001828152602001935050505060405180910390a1505b50505050565b60006104936105a6565b73ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff1614156104e5578273ffffffffffffffffffffffffffffffffffffffff163190506105a0565b8173ffffffffffffffffffffffffffffffffffffffff166370a08231846040518263ffffffff1660e01b8152600401808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200191505060206040518083038186803b15801561056257600080fd5b505afa158015610576573d6000803e3d6000fd5b505050506040513d602081101561058c57600080fd5b810190808051906020019092919050505090505b92915050565b600073eeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeee905090565b600080828401905083811015610640576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252601b8152602001807f536166654d6174683a206164646974696f6e206f766572666c6f77000000000081525060200191505060405180910390fd5b8091505092915050565b60008060009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1663ed6ff7606040518163ffffffff1660e01b815260040160206040518083038186803b1580156106b357600080fd5b505afa1580156106c7573d6000803e3d6000fd5b505050506040513d60208110156106dd57600080fd5b810190808051906020019092919050505090506106fb818484610700565b505050565b6107086105a6565b73ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff1614156107a6578273ffffffffffffffffffffffffffffff