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

Universal tool rewrite #80

Merged
merged 25 commits into from
Jan 28, 2025
Merged

Conversation

jkopanski
Copy link
Contributor

This basically rewrites the cli to be much simpler, hence making it work independent of the scrab/cairo version. It achieves that by changing how we gather files to be sent to the backend. Instead of using scarb as a library it utilizes scarb metadata and gathers all the files, plus the files of the local dependencies.

Other major change is that the application is no longer interactive, but all the parameters are passed as an command line arguments.

cwkang1998 and others added 19 commits July 5, 2024 18:43
Also wrap most options in newtype wrapper and parse them instead of
validating.  Right now the network selection is as Subcommand but that
should be implemented using ValueEnum.
Made api module use the type defined in the args instead of the custom
one.
Seems much cleaner than concatenating string.  Additionally retry with
exponential back off, by the way of external dependency.

Still there are 2 possible clients, public and private and not all
endpoints are available at both, but this is going to ba tackled in
the future.
This lets us use this later without worrying and error checking.
GitHub workflows that were placeholders, config files for tools that
weren't used.
@stranger80
Copy link

In the README.md, can you please add a "Quick Start" section, with steps and CLI command examples to illustrate the verification process?

Copy link

@stranger80 stranger80 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

Also sneak in the license name mapping for our current backend.
README.md Outdated Show resolved Hide resolved
- [x] Cairo 2.8.2 & Scarb 2.8.2
- [x] Cairo 2.8.2 & Scarb 2.8.3
- [x] Cairo 2.8.4 & Scarb 2.8.4
Contract verifier works with [Scarb](https://docs.swmansion.com/scarb) based projects. The tool assumes that `scarb` command is available in the envirenment and project is building properly by executing `scarb bulid`.
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It would be useful to know which versions are currently supported by the backend, or at least what is the latest supported version

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

That one is a bit tricky I think. The exact supported versions are defined by the backend and mentioning it here will surely lead to misleading information down the line. In any case if the version is not yet supported by the backend, we get ok error messae saying that it's not supported

@@ -88,87 +25,69 @@ sierra = true

# Add the following section
[tool.voyager]
my_contract = { path = "main.cairo" }
my_contract = { path = "src/main.cairo" }
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It's important to add here that my_contract MUST match the actual name of the contract in the project

@jkopanski jkopanski requested a review from amanusk January 8, 2025 15:08
@liam-nethermind liam-nethermind merged commit ba40c4c into NethermindEth:main Jan 28, 2025
4 checks passed
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

Successfully merging this pull request may close these issues.

5 participants