Skip to content

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

@Devilla

Description

@Devilla

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:

  • Deploy the contract with the given code.
  • Attempt to invoke the modifier in the flashloan.sol contract.
  • Observe the TypeError mentioned in the error message.

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:

  • Solidity Compiler version: "0.8.10"
  • Operating system: Windows x64

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!

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions