jspruance / aave-flash-loan-tutorial

Create an Aave Flash Loan arbitrage smart contract from scratch in this comprehensive flash loan tutorial from Block Explorer.
165 stars 122 forks source link

TypeError: Invalid type for argument in modifier invocation. #7

Open Devilla opened 10 months ago

Devilla commented 10 months ago

Issue Summary:

I encountered a TypeError in the code while trying to invoke a modifier in the flashloan.sol contract. The error message suggests an invalid type for the argument in the modifier invocation, specifically an invalid implicit conversion from contract IPoolAddressesProvider to contract IPoolAddressesProvider is being requested.

Steps to Reproduce:

Expected Behavior:

The code should compile without any errors, and the modifier should be invoked successfully without type conversion issues.

Actual Behavior:

Encountered a TypeError with the following details:

TypeError: Invalid type for argument in modifier invocation. Invalid implicit conversion from contract IPoolAddressesProvider to contract IPoolAddressesProvider requested.
  --> contracts/flashloan.sol:13:35:
   |
13 |     ) FlashLoanSimpleReceiverBase(IPoolAddressesProvider(_addressProvider)) {
   |                                   ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

Environment:

I also tried fixing the code with Remix Ide also, after spending times fixing it on local using Hardhat but no results unfortunately, please let me know how it can be fixed thanks!