Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Open
Devilla opened this issue Dec 23, 2023 · 0 comments
Open

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

Devilla opened this issue Dec 23, 2023 · 0 comments

Comments

@Devilla
Copy link

Devilla commented Dec 23, 2023

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!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant