File tree Expand file tree Collapse file tree 1 file changed +4
-1
lines changed
core/lib/contract_verifier/src/resolver/github Expand file tree Collapse file tree 1 file changed +4
-1
lines changed Original file line number Diff line number Diff line change @@ -86,6 +86,7 @@ impl CompilerGitHubRelease {
8686 match self {
8787 Self :: Solc | Self :: Vyper => {
8888 // Solidity and Vyper releases are tagged with version numbers in form of `vX.Y.Z`.
89+ // Our API does not require the `v` prefix for solc/vyper, so we strip it.
8990 tag_name
9091 . strip_prefix ( 'v' )
9192 . filter ( |v| semver:: Version :: parse ( v) . is_ok ( ) )
@@ -94,6 +95,7 @@ impl CompilerGitHubRelease {
9495 Self :: ZkVmSolc => {
9596 // ZkVmSolc releases are tagged with version numbers in form of `X.Y.Z-A.B.C`, where
9697 // `X.Y.Z` is the version of the Solidity compiler, and `A.B.C` is the version of the ZkSync fork.
98+ // `v` prefix is not required.
9799 if let Some ( ( main, fork) ) = tag_name. split_once ( '-' ) {
98100 if semver:: Version :: parse ( main) . is_ok ( ) && semver:: Version :: parse ( fork) . is_ok ( )
99101 {
@@ -105,8 +107,9 @@ impl CompilerGitHubRelease {
105107 }
106108 Self :: ZkSolc | Self :: ZkVyper => {
107109 // zksolc and zkvyper releases are tagged with version numbers in form of `X.Y.Z` (without 'v').
110+ // Our API expects versions to be prefixed with `v` for zksolc/zkvyper, so we add it.
108111 if semver:: Version :: parse ( tag_name) . is_ok ( ) {
109- Some ( tag_name . to_string ( ) )
112+ Some ( format ! ( "v{tag_name}" ) )
110113 } else {
111114 None
112115 }
You can’t perform that action at this time.
0 commit comments