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

Source verification fails when importing multiple objects from the same file #1778

Open
consol3cowboy opened this issue May 25, 2024 · 0 comments

Comments

@consol3cowboy
Copy link
Contributor

Environment information

  • brownie Version: 1.20.5
  • solc Version: 0.8.25
  • Python Version: 3.11

What was wrong?

Source verification fails when importing multiple objects from the same file, e.g.:

import {
    ILayerZeroEndpointV2,
    Origin,
    MessagingReceipt,
    MessagingParams
} from "@layerzerolabs/lz-evm-protocol-v2/contracts/interfaces/ILayerZeroEndpointV2.sol";

When attempting to verify I get the following error:

Verification complete. Result: Fail - Unable to verify. Solidity Compilation Error: Source "@layerzerolabs/lz-evm-protocol-v2/contracts/interfaces/ILayerZeroEndpointV2.sol" not found: File not found. Searched the following locations: "".

How can it be fixed?

When I modify the import statement so that it only imports a single object, or imports the entire file, verification is successful. I believe that the verification logic must not consider the possibility for multiple objects in a single statement, and so it misses further dependencies created by the import.

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