I am trying to build a test contract for flash loan arbitrage in solidity for polygon blockchain. Contract deployed successfully, but when I am calling the function : fn_RequestFlashLoan I am getting error : Warning! Error encountered during contract execution [execution reverted]
and nothing specific. As very new to solidity, may anyone plz advice me on the issue ?
this is _token : “0xc2132D05D31c914a87C6611C10748AEb04B58e8F” and _amount : 100000 I have passed in the contract and this is the transaction hash: https://polygonscan.com/tx/0x16ef4d524e490058e36578ff5857ce1957c60f693b522fac7f6c87dbee6bda03
and the solidity code is here:
https://pastebin.com/0GJ9ZeYr