flashloaner-contract
flashloaner-contract copied to clipboard
I need to know that what type of data i can pass in uniswapV2Call.
I successfully run this code in remix and I was confused about what type of value I can pass here to get the flash loan. I need an explanation about this contract.
You can send any data so that you can use it later using abi.decode() method. to send data make sure you use abi.encode() function.
bytes memory data = abi.encode(_tokenToBorrow, _amountToBorrow, msg.sender);