It is recommended to implement and adopt [https://eips.ethereum.org/EIPS/eip-3156] where there are views function for external user to call to query if the flashloan can be used:
