NethermindEth / starknet-contract-verifier

CLI to verify your starknet contracts classes on block explorers!
Apache License 2.0
19 stars 10 forks source link

fix: inline submodule imports resolving incorrectly #66

Closed cwkang1998 closed 2 months ago

cwkang1998 commented 2 months ago

In cairo, a file is considered a module. Resolving file modules are pretty simple as they are usually tied to a single file. However, when attempting to resolve submodules with the resolver, specifically those that are inline submodules, the resolver fails to link the imports with the correct files. This causes a few issues:

Most issues comes down to the lack of context during the resolving stage.

This PR attempts to fix that by adding more context on the resolving stage for both the use statements and also for each file modules by adding inline submodule information.

Closes #11