mirror of
https://github.com/Instadapp/aave-protocol-v2.git
synced 2024-07-29 21:47:30 +00:00
175 lines
7.6 KiB
TypeScript
175 lines
7.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: "address",
|
|
name: "_destination",
|
|
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 =
|
|
"0x60806040526000805460ff60a01b1916905534801561001d57600080fd5b506040516108073803806108078339818101604052602081101561004057600080fd5b5051600080546001600160a01b039092166001600160a01b0319909216919091179055610795806100726000396000f3fe6080604052600436106100385760003560e01c8063388f70f114610044578063405b019d14610072578063c72c4d101461014a5761003f565b3661003f57005b600080fd5b34801561005057600080fd5b506100706004803603602081101561006757600080fd5b5035151561017b565b005b34801561007e57600080fd5b50610070600480360360a081101561009557600080fd5b6001600160a01b03823581169260208101359091169160408201359160608101359181019060a0810160808201356401000000008111156100d557600080fd5b8201836020820111156100e757600080fd5b8035906020019184600183028401116401000000008311171561010957600080fd5b91908080601f016020809104026020016040519081016040528093929190818152602001838380828437600092019190915250929550610199945050505050565b34801561015657600080fd5b5061015f6103a2565b604080516001600160a01b039092168252519081900360200190f35b60008054911515600160a01b0260ff60a01b19909216919091179055565b604080516370a0823160e01b8152306004820152905186916001600160a01b038316916370a0823191602480820192602092909190829003018186803b1580156101e257600080fd5b505afa1580156101f6573d6000803e3d6000fd5b505050506040513d602081101561020c57600080fd5b5051841115610262576040805162461bcd60e51b815260206004820181905260248201527f496e76616c69642062616c616e636520666f722074686520636f6e7472616374604482015290519081900360640190fd5b600054600160a01b900460ff16156102c357604080516001600160a01b03881681526020810186905280820185905290517f816f6a6bc084e1996be1a831afa1af30763d0501b6b43b9e1922a11f347366d79181900360600190a15061039b565b806001600160a01b031663a0712d68846040518263ffffffff1660e01b815260040180828152602001915050602060405180830381600087803b15801561030957600080fd5b505af115801561031d573d6000803e3d6000fd5b505050506040513d602081101561033357600080fd5b506103509050868661034b878763ffffffff6103b116565b610412565b604080516001600160a01b03881681526020810186905280820185905290517f7d94e9d0c906b8d7b2b52a581b9e9ba728aa6f8cd8532bd87243d193f47401be9181900360600190a1505b5050505050565b6000546001600160a01b031681565b60008282018381101561040b576040805162461bcd60e51b815260206004820152601b60248201527f536166654d6174683a206164646974696f6e206f766572666c6f770000000000604482015290519081900360640190fd5b9392505050565b61041d828483610422565b505050565b61041d6001600160a01b038316848363ffffffff61043c16565b604080516001600160a01b038416602482015260448082018490528251808303909101815260649091019091526020810180516001600160e01b031663a9059cbb60e01b17905261041d90849060606104de826040518060400160405280602081526020017f5361666545524332303a206c6f772d6c6576656c2063616c6c206661696c6564815250856001600160a01b031661053a9092919063ffffffff16565b80519091501561041d578080602001905160208110156104fd57600080fd5b505161041d5760405162461bcd60e51b815260040180806020018281038252602a815260200180610736602a913960400191505060405180910390fd5b60606105498484600085610551565b949350505050565b606061055c856106fc565b6105ad576040805162461bcd60e51b815260206004820152601d60248201527f416464726573733a2063616c6c20746f206e6f6e2d636f6e7472616374000000604482015290519081900360640190fd5b60006060866001600160a01b031685876040518082805190602001908083835b602083106105ec5780518252601f1990920191602091820191016105cd565b6001836020036101000a03801982511681845116808217855250505050505090500191505060006040518083038185875af1925050503d806000811461064e576040519150601f19603f3d011682016040523d82523d6000602084013e610653565b606091505b509150915081156106675791506105499050565b8051156106775780518082602001fd5b8360405162461bcd60e51b81526004018080602001828103825283818151815260200191508051906020019080838360005b838110156106c15781810151838201526020016106a9565b50505050905090810190601f1680156106ee5780820380516001836020036101000a031916815260200191505b509250505060405180910390fd5b6000813f7fc5d2460186f7233c927e7db2dcc703c0e500b653ca82273b7bfad8045d85a47081811480159061054957505015159291505056fe5361666545524332303a204552433230206f7065726174696f6e20646964206e6f742073756363656564a2646970667358221220a2ae2dcf10cb7c76a949954c150b9f788279726674dc38c1c4d33c369af7ea6864736f6c63430006080033";
|