mirror of
https://github.com/Instadapp/aave-protocol-v2.git
synced 2024-07-29 21:47:30 +00:00
170 lines
8.2 KiB
TypeScript
170 lines
8.2 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 =
|
|
"0x60806040526000805460ff60a01b1916905534801561001d57600080fd5b5060405161097d38038061097d8339818101604052602081101561004057600080fd5b5051600080546001600160a01b039092166001600160a01b031990921691909117905561090b806100726000396000f3fe6080604052600436106100385760003560e01c8063388f70f114610044578063c72c4d1014610072578063ee872558146100a35761003f565b3661003f57005b600080fd5b34801561005057600080fd5b506100706004803603602081101561006757600080fd5b50351515610172565b005b34801561007e57600080fd5b50610087610190565b604080516001600160a01b039092168252519081900360200190f35b3480156100af57600080fd5b50610070600480360360808110156100c657600080fd5b6001600160a01b0382351691602081013591604082013591908101906080810160608201356401000000008111156100fd57600080fd5b82018360208201111561010f57600080fd5b8035906020019184600183028401116401000000008311171561013157600080fd5b91908080601f01602080910402602001604051908101604052809392919081815260200183838082843760009201919091525092955061019f945050505050565b60008054911515600160a01b0260ff60a01b19909216919091179055565b6000546001600160a01b031681565b836101aa308261035c565b8411156101fe576040805162461bcd60e51b815260206004820181905260248201527f496e76616c69642062616c616e636520666f722074686520636f6e7472616374604482015290519081900360640190fd5b600054600160a01b900460ff161561025f57604080516001600160a01b03871681526020810186905280820185905290517f816f6a6bc084e1996be1a831afa1af30763d0501b6b43b9e1922a11f347366d79181900360600190a150610356565b61026761041b565b6001600160a01b0316856001600160a01b0316146102f257806001600160a01b031663a0712d68846040518263ffffffff1660e01b815260040180828152602001915050602060405180830381600087803b1580156102c557600080fd5b505af11580156102d9573d6000803e3d6000fd5b505050506040513d60208110156102ef57600080fd5b50505b61030b85610306868663ffffffff61043316565b610494565b604080516001600160a01b03871681526020810186905280820185905290517f7d94e9d0c906b8d7b2b52a581b9e9ba728aa6f8cd8532bd87243d193f47401be9181900360600190a1505b50505050565b600061036661041b565b6001600160a01b0316826001600160a01b0316141561039057506001600160a01b03821631610415565b816001600160a01b03166370a08231846040518263ffffffff1660e01b815260040180826001600160a01b03166001600160a01b0316815260200191505060206040518083038186803b1580156103e657600080fd5b505afa1580156103fa573d6000803e3d6000fd5b505050506040513d602081101561041057600080fd5b505190505b92915050565b73eeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeee90565b60008282018381101561048d576040805162461bcd60e51b815260206004820152601b60248201527f536166654d6174683a206164646974696f6e206f766572666c6f770000000000604482015290519081900360640190fd5b9392505050565b60008060009054906101000a90046001600160a01b03166001600160a01b0316630261bf8b6040518163ffffffff1660e01b815260040160206040518083038186803b1580156104e357600080fd5b505afa1580156104f7573d6000803e3d6000fd5b505050506040513d602081101561050d57600080fd5b5051905061051c818484610521565b505050565b61052961041b565b6001600160a01b0316826001600160a01b03161415610598576040516001600160a01b038416908290600081818185875af1925050503d806000811461058b576040519150601f19603f3d011682016040523d82523d6000602084013e610590565b606091505b50505061051c565b61051c6001600160a01b038316848363ffffffff6105b216565b604080516001600160a01b038416602482015260448082018490528251808303909101815260649091019091526020810180516001600160e01b031663a9059cbb60e01b17905261051c9084906060610654826040518060400160405280602081526020017f5361666545524332303a206c6f772d6c6576656c2063616c6c206661696c6564815250856001600160a01b03166106b09092919063ffffffff16565b80519091501561051c5780806020019051602081101561067357600080fd5b505161051c5760405162461bcd60e51b815260040180806020018281038252602a8152602001806108ac602a913960400191505060405180910390fd5b60606106bf84846000856106c7565b949350505050565b60606106d285610872565b610723576040805162461bcd60e51b815260206004820152601d60248201527f416464726573733a2063616c6c20746f206e6f6e2d636f6e7472616374000000604482015290519081900360640190fd5b60006060866001600160a01b031685876040518082805190602001908083835b602083106107625780518252601f199092019160209182019101610743565b6001836020036101000a03801982511681845116808217855250505050505090500191505060006040518083038185875af1925050503d80600081146107c4576040519150601f19603f3d011682016040523d82523d6000602084013e6107c9565b606091505b509150915081156107dd5791506106bf9050565b8051156107ed5780518082602001fd5b8360405162461bcd60e51b81526004018080602001828103825283818151815260200191508051906020019080838360005b8381101561083757818101518382015260200161081f565b50505050905090810190601f1680156108645780820380516001836020036101000a031916815260200191505b509250505060405180910390fd5b6000813f7fc5d2460186f7233c927e7db2dcc703c0e500b653ca82273b7bfad8045d85a4708181148015906106bf57505015159291505056fe5361666545524332303a204552433230206f7065726174696f6e20646964206e6f742073756363656564a264697066735822122023de80bbbbbbaf12affd9536d6b8b029e9c0edc1d14c31a634e817ffe3d033db64736f6c63430006080033";
|