Skip to content

Commit

Permalink
improve wording
Browse files Browse the repository at this point in the history
  • Loading branch information
elfedy committed Jan 16, 2025
1 parent 449e14e commit 84294af
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 7 deletions.
8 changes: 4 additions & 4 deletions crates/zksync/compilers/src/compilers/zksolc/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -413,8 +413,8 @@ impl ZkSolc {
}
}

/// Get available zksolc versions
pub fn zksolc_available_versions() -> Vec<Version> {
/// Get supported zksolc versions
pub fn zksolc_supported_versions() -> Vec<Version> {
let mut ret = vec![];
let min_max_patch_by_minor_versions = vec![
(5, 6, 7), // 1.5.x
Expand All @@ -430,12 +430,12 @@ impl ZkSolc {

/// Get zksolc minimum supported version
pub fn zksolc_minimum_supported_version() -> Version {
ZkSolc::zksolc_available_versions().remove(0)
ZkSolc::zksolc_supported_versions().remove(0)
}

/// Get zksolc minimum supported version
pub fn zksolc_latest_supported_version() -> Version {
ZkSolc::zksolc_available_versions().pop().expect("No supported zksolc versions")
ZkSolc::zksolc_supported_versions().pop().expect("No supported zksolc versions")
}

/// Get available zksync solc versions
Expand Down
6 changes: 3 additions & 3 deletions crates/zksync/compilers/tests/zksync_tests.rs
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,7 @@ fn zksync_can_compile_dapp_sample() {

#[test]
fn zksync_can_compile_dapp_sample_with_supported_zksolc_versions() {
for version in ZkSolc::zksolc_available_versions() {
for version in ZkSolc::zksolc_supported_versions() {
let root = PathBuf::from(env!("CARGO_MANIFEST_DIR")).join("test-data/dapp-sample");
let paths = ProjectPathsConfig::builder().sources(root.join("src")).lib(root.join("lib"));
let mut project = TempProject::<ZkSolcCompiler, ZkArtifactOutput>::new(paths).unwrap();
Expand Down Expand Up @@ -87,7 +87,7 @@ fn zksync_can_compile_dapp_sample_with_supported_zksolc_versions() {

#[test]
fn zksync_can_set_hash_type_with_supported_versions() {
for version in ZkSolc::zksolc_available_versions() {
for version in ZkSolc::zksolc_supported_versions() {
let mut project = TempProject::<ZkSolcCompiler, ZkArtifactOutput>::dapptools().unwrap();
let compiler = ZkSolcCompiler {
zksolc: ZkSolc::get_path_for_version(&version).unwrap(),
Expand Down Expand Up @@ -124,7 +124,7 @@ fn zksync_can_set_hash_type_with_supported_versions() {
let contract_keccak = compiled.find_first("Contract").unwrap();
let bytecode_keccak =
contract_keccak.bytecode.as_ref().map(|b| b.object().into_bytes()).unwrap().unwrap();
// NOTE: "none" value seems to pad 32 bytes of 0s at the end
// NOTE: "none" value seems to pad 32 bytes of 0s at the end in this particular case
assert_eq!(bytecode_none.len(), bytecode_keccak.len(), "zksolc {version}");
assert_ne!(bytecode_none, bytecode_keccak, "zksolc {version}");

Expand Down

0 comments on commit 84294af

Please sign in to comment.