flashloaner-contract icon indicating copy to clipboard operation
flashloaner-contract copied to clipboard

I need to know that what type of data i can pass in uniswapV2Call.

Open vamsichilukuri opened this issue 3 years ago • 1 comments

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.

vamsichilukuri avatar Sep 02 '21 03:09 vamsichilukuri

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);

aamir-067 avatar Apr 09 '24 09:04 aamir-067