{"id":18357165,"url":"https://github.com/nethermindeth/starknet-contract-verifier","last_synced_at":"2025-04-06T12:32:35.308Z","repository":{"id":238482446,"uuid":"625832059","full_name":"NethermindEth/starknet-contract-verifier","owner":"NethermindEth","description":"CLI to verify your starknet contracts classes on block explorers!","archived":false,"fork":false,"pushed_at":"2025-03-12T10:04:37.000Z","size":1322,"stargazers_count":25,"open_issues_count":6,"forks_count":11,"subscribers_count":10,"default_branch":"main","last_synced_at":"2025-03-22T00:34:01.627Z","etag":null,"topics":["nubia"],"latest_commit_sha":null,"homepage":"","language":"Rust","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/NethermindEth.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2023-04-10T07:41:33.000Z","updated_at":"2025-03-12T10:04:41.000Z","dependencies_parsed_at":"2024-05-31T13:29:34.959Z","dependency_job_id":"06b2a175-4ea4-4ddc-8ca0-799282ddcf5a","html_url":"https://github.com/NethermindEth/starknet-contract-verifier","commit_stats":null,"previous_names":["nethermindeth/starknet-contract-verifier"],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/NethermindEth%2Fstarknet-contract-verifier","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/NethermindEth%2Fstarknet-contract-verifier/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/NethermindEth%2Fstarknet-contract-verifier/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/NethermindEth%2Fstarknet-contract-verifier/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/NethermindEth","download_url":"https://codeload.github.com/NethermindEth/starknet-contract-verifier/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":247484544,"owners_count":20946388,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["nubia"],"created_at":"2024-11-05T22:13:06.512Z","updated_at":"2025-04-06T12:32:30.296Z","avatar_url":"https://github.com/NethermindEth.png","language":"Rust","funding_links":[],"categories":[],"sub_categories":[],"readme":"# starknet-contract-verifier\n\n`starknet-contract-verifier` is a contract class verification cli that allows you to verify your starknet classes on a block explorer.\n\n#### The list of the block explorer we currently support are:\n- [Voyager Starknet block explorer](https://voyager.online).\n\n\n#### We currently support the following Cairo version \u0026 Scarb version.\n\u003c!-- - [x] Cairo 1.1.0 (Scarb v0.4.0)\n- [x] Cairo 1.1.1 (Scarb v0.4.1)\n- [x] Cairo 2.0.1 (Scarb v0.5.1)\n- [x] Cairo 2.0.2 (Scarb v0.5.2)\n- [x] Cairo 2.1.0 (Scarb v0.6.1)\n- [x] Cairo 2.1.1 (Scarb v0.6.2)\n- [x] Cairo 2.2.0 (Scarb v0.7.0)\n- [x] Cairo \u0026 Scarb 2.3.0 --\u003e\n- [x] Cairo \u0026 Scarb 2.3.1\n- [x] Cairo \u0026 Scarb 2.4.0\n- [x] Cairo \u0026 Scarb 2.4.1\n- [x] Cairo \u0026 Scarb 2.4.2\n- [x] Cairo \u0026 Scarb 2.4.3\n- [x] Cairo \u0026 Scarb 2.4.4\n- [x] Cairo \u0026 Scarb 2.5.0\n- [x] Cairo \u0026 Scarb 2.5.1\n- [x] Cairo \u0026 Scarb 2.5.2\n- [x] Cairo \u0026 Scarb 2.5.3\n- [x] Cairo \u0026 Scarb 2.5.4\n- [x] Cairo \u0026 Scarb 2.6.0\n- [x] Cairo \u0026 Scarb 2.6.1\n- [x] Cairo \u0026 Scarb 2.6.2\n- [x] Cairo \u0026 Scarb 2.6.3\n- [x] Cairo 2.6.3 \u0026 Scarb 2.6.4\n- [x] Cairo 2.6.4 \u0026 Scarb 2.6.5\n\nThe source code release for each version is available at their respective branch at `release/2.\u003cmajor_version\u003e.\u003cminor_version\u003e`. For example, the release for `2.4.3` would live at `release/2.4.3`.\n\n\n## Getting started\n\n### Prerequisite\n\n#### Installing Scarb\n\nThis CLI relies upon Scarb for dependencies resolving during compilation and thus require you to have Scarb installed for it to work properly. You can install Scarb following the instruction on their documentation at https://docs.swmansion.com/scarb.\n\nNote that CLI version that you install should follow the version of the Scarb you have installed for it to work as expected.\n\n\u003c!-- #### Getting an api key\n\nThe verification CLI uses the public API of the block explorer under the hood, as such you will have to obtain your API key in order to start using the verifier.\n\nYou can get an API key from Voyager here with this form [https://forms.gle/34RE6d4aiiv16HoW6](https://forms.gle/34RE6d4aiiv16HoW6).\n\nYou can then set the api key via setting the environment variables.\n\n```\nAPI_KEY=\u003cYour api key\u003e\n```\n\nIf you want to set the api key manually on each verifier call, you can also attach the variables like so:\n\n```\nAPI_KEY=\u003cYour api key\u003e starknet-contract-verifier\n``` --\u003e\n\n#### Adding configuration for the verification\n\nIn order to start verification, you'll need to add a table in your `Scarb.toml` as such:\n\n```toml\n[package]\nname = \"my_project\"\nversion = \"0.1.0\"\n\n[dependencies]\nstarknet = \"\u003e=2.4.0\"\n\n[[target.starknet-contract]]\nsierra = true\n\n# Add the following section\n[tool.voyager]\nmy_contract = { path = \"main.cairo\" }\n```\n\nThe path should be set to the path of whichever contract you would like to verify, relative to your `src` directory. For the example above, the cairo contract is located at `src/main.cairo` and as such the path should be set to `main.cairo`.\n\nNote that only one contract should be provided in this section as multi contract verification is not supported yet.\n\n### Verification\n\nFirst do a clone of this repository.\n\n```bash\ngit clone git@github.com:NethermindEth/starknet-contract-verifier.git\n```\n\nAfter cloning the repository, checkout to the release branch corresponding to the cairo version that your contract uses. For example, if you write your contract in `cairo 2.5.4`, you would do the following:\n\n```bash\ncd starknet-contract-verifier\ngit checkout release/2.5.4\n```\n\nTo start the verifier, you can do the following command, and a prompt should guide you through the verification process.\n\n```bash\ncargo run --bin starknet-contract-verifier\n```\n\nIf you are using `asdf` for the management of scarb binary on a project basis, you should make sure that the verifier runs in the directory of the project so that the verifier will detect and use the correct `scarb` binary for that project.\n\nYou can build the binaries and add it to path to make it easier to use the verifier.\n\n```bash\n# build all binaries\ncargo build --all --release\n\n# then add build target directory to path \n# depending on your shell this might be different.\n# Add the following to the end of your shell configuration file\nexport PATH=\"$PATH:/path/to/starknet-contract-verifier/target/release\"\n\n# you should now be able to call the verifier directly if build succeeds.\nstarknet-contract-verifier\n```\n\nYou should be greeted with prompts that asks for the details of your cairo project \u0026 contracts, and will be guided step by step through the verification process.\n\n## Building from source\n\nIf you are developing and building the project from source, you will first need to install rust.\n\n```bash\ncurl https://sh.rustup.rs -sSf | sh -s\n```\n\n\u003e Note: Builds for 2.4.3 and below only works with \u003c Rust 1.77. As such please make sure that you have the correct rust version before building.\n\nTo build the project, simply do\n\n```bash\ncargo build\n```\n\nand the project should start building.\n\n## Limitations and Known Issues\n\nThere's a few known issue with the current implementation of this verifier.\n\n\n### 1. Rearranging and restructure of the resulting verified files\n\nIt's possible that your modules get re-arranged after verification as the verifier tries to resolve your dependencies from the main contract and re-generate them into a new project. This is known and we are working towards making the generated project look as closely as possible with the original module structure.\n\n\n### 2. Scarb.toml specified starknet versioning affects which binaries work with the verifier\n\nThe verifier would usually work cairo compiler versions that are lower than its version given no breaking changes between compiler versions, meaning using a `2.4.3` verifier with a compiler version of less than 2.4.3 would work as long as you specify in your `Scarb.toml` file the starknet version with a range including the verifier version (for example, `\u003e=2.4.0` \u0026 `2.2.0` usually works for verifier `2.4.3`) If you use strict versioning for your starknet version in form of `=2.4.3` for example, it would stop working with verifier of other versions.\n\n## Contributing\n\nWe welcome any form of contribution to this project! \n\nTo start, you can take a look at the issues that's available for taking and work on whichever you might be interested in. Do leave a comment so we can assign the issue to you!\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fnethermindeth%2Fstarknet-contract-verifier","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fnethermindeth%2Fstarknet-contract-verifier","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fnethermindeth%2Fstarknet-contract-verifier/lists"}