2020-06-03 10:23:21 +00:00
|
|
|
/* Generated by ts-generator ver. 0.0.8 */
|
|
|
|
/* tslint:disable */
|
|
|
|
|
2020-07-13 08:54:08 +00:00
|
|
|
import {Contract, ContractFactory, Signer} from 'ethers';
|
|
|
|
import {Provider} from 'ethers/providers';
|
|
|
|
import {UnsignedTransaction} from 'ethers/utils/transaction';
|
2020-06-03 10:23:21 +00:00
|
|
|
|
2020-07-13 08:54:08 +00:00
|
|
|
import {TransactionOverrides} from '.';
|
|
|
|
import {MockFlashLoanReceiver} from './MockFlashLoanReceiver';
|
2020-06-03 10:23:21 +00:00
|
|
|
|
|
|
|
export class MockFlashLoanReceiverFactory extends ContractFactory {
|
|
|
|
constructor(signer?: Signer) {
|
|
|
|
super(_abi, _bytecode, signer);
|
|
|
|
}
|
|
|
|
|
2020-07-13 08:54:08 +00:00
|
|
|
deploy(_provider: string, overrides?: TransactionOverrides): Promise<MockFlashLoanReceiver> {
|
2020-06-03 10:23:21 +00:00
|
|
|
return super.deploy(_provider, overrides) as Promise<MockFlashLoanReceiver>;
|
|
|
|
}
|
2020-07-13 08:54:08 +00:00
|
|
|
getDeployTransaction(_provider: string, overrides?: TransactionOverrides): UnsignedTransaction {
|
2020-06-03 10:23:21 +00:00
|
|
|
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;
|
|
|
|
}
|
2020-07-13 08:54:08 +00:00
|
|
|
static connect(address: string, signerOrProvider: Signer | Provider): MockFlashLoanReceiver {
|
|
|
|
return new Contract(address, _abi, signerOrProvider) as MockFlashLoanReceiver;
|
2020-06-03 10:23:21 +00:00
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
const _abi = [
|
|
|
|
{
|
|
|
|
inputs: [
|
|
|
|
{
|
2020-07-13 08:54:08 +00:00
|
|
|
internalType: 'contract ILendingPoolAddressesProvider',
|
|
|
|
name: '_provider',
|
|
|
|
type: 'address',
|
|
|
|
},
|
2020-06-03 10:23:21 +00:00
|
|
|
],
|
2020-07-13 08:54:08 +00:00
|
|
|
stateMutability: 'nonpayable',
|
|
|
|
type: 'constructor',
|
2020-06-03 10:23:21 +00:00
|
|
|
},
|
|
|
|
{
|
|
|
|
anonymous: false,
|
|
|
|
inputs: [
|
|
|
|
{
|
|
|
|
indexed: false,
|
2020-07-13 08:54:08 +00:00
|
|
|
internalType: 'address',
|
|
|
|
name: '_reserve',
|
|
|
|
type: 'address',
|
2020-06-03 10:23:21 +00:00
|
|
|
},
|
|
|
|
{
|
|
|
|
indexed: false,
|
2020-07-13 08:54:08 +00:00
|
|
|
internalType: 'uint256',
|
|
|
|
name: '_amount',
|
|
|
|
type: 'uint256',
|
2020-06-03 10:23:21 +00:00
|
|
|
},
|
|
|
|
{
|
|
|
|
indexed: false,
|
2020-07-13 08:54:08 +00:00
|
|
|
internalType: 'uint256',
|
|
|
|
name: '_fee',
|
|
|
|
type: 'uint256',
|
|
|
|
},
|
2020-06-03 10:23:21 +00:00
|
|
|
],
|
2020-07-13 08:54:08 +00:00
|
|
|
name: 'ExecutedWithFail',
|
|
|
|
type: 'event',
|
2020-06-03 10:23:21 +00:00
|
|
|
},
|
|
|
|
{
|
|
|
|
anonymous: false,
|
|
|
|
inputs: [
|
|
|
|
{
|
|
|
|
indexed: false,
|
2020-07-13 08:54:08 +00:00
|
|
|
internalType: 'address',
|
|
|
|
name: '_reserve',
|
|
|
|
type: 'address',
|
2020-06-03 10:23:21 +00:00
|
|
|
},
|
|
|
|
{
|
|
|
|
indexed: false,
|
2020-07-13 08:54:08 +00:00
|
|
|
internalType: 'uint256',
|
|
|
|
name: '_amount',
|
|
|
|
type: 'uint256',
|
2020-06-03 10:23:21 +00:00
|
|
|
},
|
|
|
|
{
|
|
|
|
indexed: false,
|
2020-07-13 08:54:08 +00:00
|
|
|
internalType: 'uint256',
|
|
|
|
name: '_fee',
|
|
|
|
type: 'uint256',
|
|
|
|
},
|
2020-06-03 10:23:21 +00:00
|
|
|
],
|
2020-07-13 08:54:08 +00:00
|
|
|
name: 'ExecutedWithSuccess',
|
|
|
|
type: 'event',
|
2020-06-03 10:23:21 +00:00
|
|
|
},
|
|
|
|
{
|
|
|
|
inputs: [],
|
2020-07-13 08:54:08 +00:00
|
|
|
name: 'addressesProvider',
|
2020-06-03 10:23:21 +00:00
|
|
|
outputs: [
|
|
|
|
{
|
2020-07-13 08:54:08 +00:00
|
|
|
internalType: 'contract ILendingPoolAddressesProvider',
|
|
|
|
name: '',
|
|
|
|
type: 'address',
|
|
|
|
},
|
2020-06-03 10:23:21 +00:00
|
|
|
],
|
2020-07-13 08:54:08 +00:00
|
|
|
stateMutability: 'view',
|
|
|
|
type: 'function',
|
2020-06-03 10:23:21 +00:00
|
|
|
},
|
|
|
|
{
|
|
|
|
inputs: [
|
|
|
|
{
|
2020-07-13 08:54:08 +00:00
|
|
|
internalType: 'address',
|
|
|
|
name: '_reserve',
|
|
|
|
type: 'address',
|
2020-06-03 10:23:21 +00:00
|
|
|
},
|
2020-07-23 15:18:06 +00:00
|
|
|
{
|
|
|
|
internalType: 'address',
|
|
|
|
name: '_destination',
|
|
|
|
type: 'address',
|
|
|
|
},
|
2020-06-03 10:23:21 +00:00
|
|
|
{
|
2020-07-13 08:54:08 +00:00
|
|
|
internalType: 'uint256',
|
|
|
|
name: '_amount',
|
|
|
|
type: 'uint256',
|
2020-06-03 10:23:21 +00:00
|
|
|
},
|
|
|
|
{
|
2020-07-13 08:54:08 +00:00
|
|
|
internalType: 'uint256',
|
|
|
|
name: '_fee',
|
|
|
|
type: 'uint256',
|
2020-06-03 10:23:21 +00:00
|
|
|
},
|
|
|
|
{
|
2020-07-13 08:54:08 +00:00
|
|
|
internalType: 'bytes',
|
|
|
|
name: '_params',
|
|
|
|
type: 'bytes',
|
|
|
|
},
|
2020-06-03 10:23:21 +00:00
|
|
|
],
|
2020-07-13 08:54:08 +00:00
|
|
|
name: 'executeOperation',
|
2020-06-03 10:23:21 +00:00
|
|
|
outputs: [],
|
2020-07-13 08:54:08 +00:00
|
|
|
stateMutability: 'nonpayable',
|
|
|
|
type: 'function',
|
2020-06-03 10:23:21 +00:00
|
|
|
},
|
|
|
|
{
|
|
|
|
inputs: [
|
|
|
|
{
|
2020-07-13 08:54:08 +00:00
|
|
|
internalType: 'bool',
|
|
|
|
name: '_fail',
|
|
|
|
type: 'bool',
|
|
|
|
},
|
2020-06-03 10:23:21 +00:00
|
|
|
],
|
2020-07-13 08:54:08 +00:00
|
|
|
name: 'setFailExecutionTransfer',
|
2020-06-03 10:23:21 +00:00
|
|
|
outputs: [],
|
2020-07-13 08:54:08 +00:00
|
|
|
stateMutability: 'nonpayable',
|
|
|
|
type: 'function',
|
2020-06-03 10:23:21 +00:00
|
|
|
},
|
|
|
|
{
|
2020-07-13 08:54:08 +00:00
|
|
|
stateMutability: 'payable',
|
|
|
|
type: 'receive',
|
|
|
|
},
|
2020-06-03 10:23:21 +00:00
|
|
|
];
|
|
|
|
|
|
|
|
const _bytecode =
|
2020-07-23 15:18:06 +00:00
|
|
|
'0x60806040526000805460ff60a01b1916905534801561001d57600080fd5b506040516109663803806109668339818101604052602081101561004057600080fd5b5051600080546001600160a01b039092166001600160a01b03199092169190911790556108f4806100726000396000f3fe6080604052600436106100385760003560e01c8063388f70f114610044578063405b019d14610072578063c72c4d101461014a5761003f565b3661003f57005b600080fd5b34801561005057600080fd5b506100706004803603602081101561006757600080fd5b5035151561017b565b005b34801561007e57600080fd5b50610070600480360360a081101561009557600080fd5b6001600160a01b03823581169260208101359091169160408201359160608101359181019060a0810160808201356401000000008111156100d557600080fd5b8201836020820111156100e757600080fd5b8035906020019184600183028401116401000000008311171561010957600080fd5b91908080601f016020809104026020016040519081016040528093929190818152602001838380828437600092019190915250929550610199945050505050565b34801561015657600080fd5b5061015f61034e565b604080516001600160a01b039092168252519081900360200190f35b60008054911515600160a01b0260ff60a01b19909216919091179055565b846101a4308261035d565b8411156101f8576040805162461bcd60e51b815260206004820181905260248201527f496e76616c69642062616c616e636520666f722074686520636f6e7472616374604482015290519081900360640190fd5b600054600160a01b900460ff161561025957604080516001600160a01b03881681526020810186905280820185905290517f816f6a6bc084e1996be1a831afa1af30763d0501b6b43b9e1922a11f347366d79181900360600190a150610347565b61026b866001600160a01b0316610412565b6102e257806001600160a01b031663a0712d68846040518263ffffffff1660e01b815260040180828152602001915050602060405180830381600087803b1580156102b557600080fd5b505af11580156102c9573d6000803e3d6000fd5b505050506040513d60208110156102df57600080fd5b50505b6102fc86866102f7878763ffffffff61043716565b610498565b604080516001600160a01b03881681526020810186905280820185905290517f7d94e9d0c906b8d7b2b52a581b9e9ba728aa6f8cd8532bd87243d193f47401be9181900360600190a1505b5050505050565b6000546001600160a01b031681565b6000610371826001600160a01b0316610412565b1561038757506001600160a01b0382163161040c565b816001600160a01b03166370a08231846040518263ffffffff1660e01b815260040180826001600160a01b03166001600160a01b0316815260200191505060206040518083038186803b1580156103dd57600080fd5b505afa1580156103f1573d6000803e3d6000fd5b505050506040513d602081101561040757600080fd5b505190505b92915050565b6001600160a01b03811673eeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeee14919050565b600082820183811015610491576040805162461bcd60e51b815260206004820152601b60248201527f536166654d6174683a206164646974696f6e206f766572666c6f770000000000604482015290519081900360640190fd5b9392505050565b6104a38284836104a8565b505050565b6104a36001600160a01b038316848363ffffffff6104c216565b806104cc576104a3565b6104d583610412565b15610581576040516000906001600160a01b0384169061c35090849084818181858888f193505050503d806000811461052a576040519150601f19603f3d011682016040523d82523d6000602084013e61052f565b606091505b505090508061057b576040805162461bcd60e51b815260206004820152601360248201527211551217d514905394d1915497d19052531151606a1b604482015290519081900360640190fd5b506104a3565b6104a36001600160a01b038416838363ffffffff61059b16565b604080516001600160a01b038416602482015260448082018490528251808303909101815260649091019091526020810180516001600160e01b031663a9059cbb60e01b1790526104a3908490606061063d826040518060400160405280602081526020017f5361666545524332303a206c6f772d6c6576656c2063616c6c206661696c6564815250856001600160a01b03166106999092919063ffffffff16565b8051909150156104a35780806020019051602081101561065c57600080fd5b50516104a35760405162461bcd60e51b815260040180806020018281038252602a815260200180610895602a913960400191505060405180910390fd5b60606106a884846000856106b0565b949350505050565b60606106bb8561085b565b61070c576040805162461bcd60e51b815260206004820152601d60248201527f416464726573733a2063616c6c20746f206e6f6e2d636f6e7472616374000000604482015290519081900360640190fd5b60006060866001600160a01b031685876040518082805190602001908083835b6020831061074b5780518252601f19909201916020918201910161072c565b6001836020036101000a03801982511681845116808217855250505050505090500191505060006040518083038185875af1925050503d80600081146107ad
|