◆ Purpose

to do flash loan

◆ Input & Return value

(address sender, uint amount0, uint amount1, bytes calldata data)

sender = 0xED98485593D5865E892f823e1f66FB99fE64F639(my wallet address) amount0 = 1000 amount1 = 974721890337 data = abi.encode(BORROW_TOKEN_ADDRESS, AMOUNT_OF_BORROW);

◆ Example

◆ Code and Explain

function swap(uint amount0Out, uint amount1Out, address to, bytes calldata data);

◆ Resources

https://github.com/Uniswap/v2-core/blob/master/contracts/interfaces/IUniswapV2Callee.sol

https://www.youtube.com/watch?v=MxTgk-kvtRM

https://docs.uniswap.org/protocol/V2/guides/smart-contract-integration/using-flash-swaps