diff --git a/vm/move-package-manager/src/compatibility_check_cmd.rs b/vm/move-package-manager/src/compatibility_check_cmd.rs index 6ea1e23dd5..2242180f03 100644 --- a/vm/move-package-manager/src/compatibility_check_cmd.rs +++ b/vm/move-package-manager/src/compatibility_check_cmd.rs @@ -156,7 +156,7 @@ fn handle_pre_version_compatibility_check( ); std::process::exit(1); } else { - eprintln!("All previous modules is full compatible with current modules!", ); + eprintln!("All previous modules is full compatible with current modules!"); } Ok(()) diff --git a/vm/stdlib/compiled/latest/error_descriptions/error_descriptions.errmap b/vm/stdlib/compiled/latest/error_descriptions/error_descriptions.errmap index c9783afd06..20e1f30ec0 100644 Binary files a/vm/stdlib/compiled/latest/error_descriptions/error_descriptions.errmap and b/vm/stdlib/compiled/latest/error_descriptions/error_descriptions.errmap differ diff --git a/vm/stdlib/compiled/latest/stdlib/007_Vector.mv b/vm/stdlib/compiled/latest/stdlib/007_Vector.mv index 6deae25d48..2caec61d0b 100644 Binary files a/vm/stdlib/compiled/latest/stdlib/007_Vector.mv and b/vm/stdlib/compiled/latest/stdlib/007_Vector.mv differ diff --git a/vm/stdlib/compiled/latest/stdlib/009_ACL.mv b/vm/stdlib/compiled/latest/stdlib/009_ACL.mv index 89c46c5234..e596988f97 100644 Binary files a/vm/stdlib/compiled/latest/stdlib/009_ACL.mv and b/vm/stdlib/compiled/latest/stdlib/009_ACL.mv differ diff --git a/vm/stdlib/compiled/latest/stdlib/011_Math.mv b/vm/stdlib/compiled/latest/stdlib/011_Math.mv index 034dad6d3e..2d856ff651 100644 Binary files a/vm/stdlib/compiled/latest/stdlib/011_Math.mv and b/vm/stdlib/compiled/latest/stdlib/011_Math.mv differ diff --git a/vm/stdlib/compiled/latest/stdlib/017_Option.mv b/vm/stdlib/compiled/latest/stdlib/017_Option.mv index 340a58f50f..9a0dae2f25 100644 Binary files a/vm/stdlib/compiled/latest/stdlib/017_Option.mv and b/vm/stdlib/compiled/latest/stdlib/017_Option.mv differ diff --git a/vm/stdlib/compiled/latest/stdlib/020_VMConfig.mv b/vm/stdlib/compiled/latest/stdlib/020_VMConfig.mv index ecd23444b4..f8ac0e7fbf 100644 Binary files a/vm/stdlib/compiled/latest/stdlib/020_VMConfig.mv and b/vm/stdlib/compiled/latest/stdlib/020_VMConfig.mv differ diff --git a/vm/stdlib/compiled/latest/stdlib/035_Authenticator.mv b/vm/stdlib/compiled/latest/stdlib/035_Authenticator.mv index 2b6f62520e..87df0d3581 100644 Binary files a/vm/stdlib/compiled/latest/stdlib/035_Authenticator.mv and b/vm/stdlib/compiled/latest/stdlib/035_Authenticator.mv differ diff --git a/vm/stdlib/compiled/latest/stdlib/036_Account.mv b/vm/stdlib/compiled/latest/stdlib/036_Account.mv index aa65760485..efeae909ae 100644 Binary files a/vm/stdlib/compiled/latest/stdlib/036_Account.mv and b/vm/stdlib/compiled/latest/stdlib/036_Account.mv differ diff --git a/vm/stdlib/compiled/latest/stdlib/038_Block.mv b/vm/stdlib/compiled/latest/stdlib/038_Block.mv index 15c0743d52..4118d794f0 100644 Binary files a/vm/stdlib/compiled/latest/stdlib/038_Block.mv and b/vm/stdlib/compiled/latest/stdlib/038_Block.mv differ diff --git a/vm/stdlib/compiled/latest/stdlib/040_BlockReward.mv b/vm/stdlib/compiled/latest/stdlib/040_BlockReward.mv index f2b272971c..533de2359e 100644 Binary files a/vm/stdlib/compiled/latest/stdlib/040_BlockReward.mv and b/vm/stdlib/compiled/latest/stdlib/040_BlockReward.mv differ diff --git a/vm/stdlib/compiled/latest/stdlib/041_Collection.mv b/vm/stdlib/compiled/latest/stdlib/041_Collection.mv index 306c01fc8c..14cb6885c1 100644 Binary files a/vm/stdlib/compiled/latest/stdlib/041_Collection.mv and b/vm/stdlib/compiled/latest/stdlib/041_Collection.mv differ diff --git a/vm/stdlib/compiled/latest/stdlib/042_Collection2.mv b/vm/stdlib/compiled/latest/stdlib/042_Collection2.mv index ab314639e1..18a0ceb494 100644 Binary files a/vm/stdlib/compiled/latest/stdlib/042_Collection2.mv and b/vm/stdlib/compiled/latest/stdlib/042_Collection2.mv differ diff --git a/vm/stdlib/compiled/latest/stdlib/043_Compare.mv b/vm/stdlib/compiled/latest/stdlib/043_Compare.mv index 4c8e6794b2..f089e1a6d5 100644 Binary files a/vm/stdlib/compiled/latest/stdlib/043_Compare.mv and b/vm/stdlib/compiled/latest/stdlib/043_Compare.mv differ diff --git a/vm/stdlib/compiled/latest/stdlib/048_EVMAddress.mv b/vm/stdlib/compiled/latest/stdlib/048_EVMAddress.mv index 37daf894b8..553e5c0c59 100644 Binary files a/vm/stdlib/compiled/latest/stdlib/048_EVMAddress.mv and b/vm/stdlib/compiled/latest/stdlib/048_EVMAddress.mv differ diff --git a/vm/stdlib/compiled/latest/stdlib/055_Oracle.mv b/vm/stdlib/compiled/latest/stdlib/055_Oracle.mv index 348476de27..7e71bf7c21 100644 Binary files a/vm/stdlib/compiled/latest/stdlib/055_Oracle.mv and b/vm/stdlib/compiled/latest/stdlib/055_Oracle.mv differ diff --git a/vm/stdlib/compiled/latest/stdlib/059_NFT.mv b/vm/stdlib/compiled/latest/stdlib/059_NFT.mv index 496fb0c5d2..8434b0f529 100644 Binary files a/vm/stdlib/compiled/latest/stdlib/059_NFT.mv and b/vm/stdlib/compiled/latest/stdlib/059_NFT.mv differ diff --git a/vm/stdlib/compiled/latest/stdlib/061_MerkleProof.mv b/vm/stdlib/compiled/latest/stdlib/061_MerkleProof.mv index 27c43e894a..078282555e 100644 Binary files a/vm/stdlib/compiled/latest/stdlib/061_MerkleProof.mv and b/vm/stdlib/compiled/latest/stdlib/061_MerkleProof.mv differ diff --git a/vm/stdlib/compiled/latest/stdlib/062_MerkleNFTDistributor.mv b/vm/stdlib/compiled/latest/stdlib/062_MerkleNFTDistributor.mv index 21a56f784b..4f145afcea 100644 Binary files a/vm/stdlib/compiled/latest/stdlib/062_MerkleNFTDistributor.mv and b/vm/stdlib/compiled/latest/stdlib/062_MerkleNFTDistributor.mv differ diff --git a/vm/stdlib/compiled/latest/stdlib/065_StdlibUpgradeScripts.mv b/vm/stdlib/compiled/latest/stdlib/065_StdlibUpgradeScripts.mv index 86f4eb7797..33d6fd410d 100644 Binary files a/vm/stdlib/compiled/latest/stdlib/065_StdlibUpgradeScripts.mv and b/vm/stdlib/compiled/latest/stdlib/065_StdlibUpgradeScripts.mv differ diff --git a/vm/stdlib/compiled/latest/stdlib/066_Genesis.mv b/vm/stdlib/compiled/latest/stdlib/066_Genesis.mv index 62fd8b2d17..72e117fb06 100644 Binary files a/vm/stdlib/compiled/latest/stdlib/066_Genesis.mv and b/vm/stdlib/compiled/latest/stdlib/066_Genesis.mv differ diff --git a/vm/stdlib/compiled/latest/stdlib/071_NFTGallery.mv b/vm/stdlib/compiled/latest/stdlib/071_NFTGallery.mv index ad57a31114..96fadf2a9d 100644 Binary files a/vm/stdlib/compiled/latest/stdlib/071_NFTGallery.mv and b/vm/stdlib/compiled/latest/stdlib/071_NFTGallery.mv differ diff --git a/vm/stdlib/compiled/latest/stdlib/074_PriceOracleAggregator.mv b/vm/stdlib/compiled/latest/stdlib/074_PriceOracleAggregator.mv index 51dc465f66..2dbc3133f6 100644 Binary files a/vm/stdlib/compiled/latest/stdlib/074_PriceOracleAggregator.mv and b/vm/stdlib/compiled/latest/stdlib/074_PriceOracleAggregator.mv differ diff --git a/vm/stdlib/compiled/latest/stdlib/079_TransactionManager.mv b/vm/stdlib/compiled/latest/stdlib/079_TransactionManager.mv index facda148d0..1a770f5255 100644 Binary files a/vm/stdlib/compiled/latest/stdlib/079_TransactionManager.mv and b/vm/stdlib/compiled/latest/stdlib/079_TransactionManager.mv differ diff --git a/vm/stdlib/compiled/latest/stdlib/080_TransferScripts.mv b/vm/stdlib/compiled/latest/stdlib/080_TransferScripts.mv index 5a5eaf7940..dca83ebaca 100644 Binary files a/vm/stdlib/compiled/latest/stdlib/080_TransferScripts.mv and b/vm/stdlib/compiled/latest/stdlib/080_TransferScripts.mv differ diff --git a/vm/stdlib/compiled/latest/stdlib/083_U256.mv b/vm/stdlib/compiled/latest/stdlib/083_U256.mv index fbb223ad10..85e94525dd 100644 Binary files a/vm/stdlib/compiled/latest/stdlib/083_U256.mv and b/vm/stdlib/compiled/latest/stdlib/083_U256.mv differ diff --git a/vm/stdlib/src/main.rs b/vm/stdlib/src/main.rs index 2bb853cd9b..b465f8704f 100644 --- a/vm/stdlib/src/main.rs +++ b/vm/stdlib/src/main.rs @@ -171,14 +171,14 @@ fn main() { .arg( Arg::new("debug") .long("debug") - .takes_value(false) + .num_args(0) .help("print debug log") ) .arg( Arg::new("version") .short('v') .long("version") - .takes_value(true) + .num_args(1) .value_name("VERSION") .help("version number for compiled stdlib, for example 1. don't forget to record the release note"), ) @@ -186,7 +186,7 @@ fn main() { Arg::new("pre-version") .short('p') .long("pre-version") - .takes_value(true) + .num_args(1) .value_name("PRE_VERSION") .help("pre version of stdlib to generate diff and check compatibility with")) .arg( @@ -199,36 +199,34 @@ fn main() { Arg::new("init-script-module") .short('m') .long("init-script-module") - .takes_value(true) + .num_args(1) .value_name("MODULE") .help("module name of init script function"), ).arg( Arg::new("init-script-function") .short('f') .long("init-script-function") - .takes_value(true) + .num_args(1) .value_name("FUNC") .help("function name of init script function"), ).arg( Arg::new("init-script-type-args") .short('t') .long("init-script-type-args") - .multiple_occurrences(true) - .takes_value(true) + .num_args(1..) .value_name("TYPE_ARGS") .help("type args of init script function"), ).arg( Arg::new("init-script-args") .short('a') .long("init-script-args") - .multiple_occurrences(true) - .takes_value(true) + .num_args(1..) .value_name("ARGS") .help("args of init script function"), ); let matches = cli.get_matches(); - let log_level = if matches.is_present("debug") { + let log_level = if matches.contains_id("debug") { LevelFilter::Debug } else { LevelFilter::Info @@ -237,18 +235,14 @@ fn main() { let mut generate_new_version = false; let mut version_number: u64 = 0; - if matches.is_present("version") { + if matches.contains_id("version") { generate_new_version = true; - version_number = matches.value_of("version").unwrap().parse::().unwrap(); + version_number = *matches.get_one("version").unwrap(); } let pre_version = if version_number > 0 { - Some(if matches.is_present("pre-version") { - matches - .value_of("pre-version") - .unwrap() - .parse::() - .unwrap() + Some(if matches.contains_id("pre-version") { + *matches.get_one("pre-version").unwrap() } else { version_number - 1 }) @@ -256,16 +250,17 @@ fn main() { None }; - let no_check_compatibility = matches.is_present("no-check-compatibility"); + let no_check_compatibility = matches.contains_id("no-check-compatibility"); let has_init_script = - matches.is_present("init-script-module") && matches.is_present("init-script-function"); + matches.contains_id("init-script-module") && matches.contains_id("init-script-function"); let init_script = if has_init_script { - let module_name = matches.value_of("init-script-module").unwrap(); - let function_name = matches.value_of("init-script-function").unwrap(); - let type_args = if matches.is_present("init-script-type-args") { + let module_name: &str = *matches.get_one("init-script-module").unwrap(); + let function_name: &str = *matches.get_one("init-script-function").unwrap(); + let type_args = if matches.contains_id("init-script-type-args") { let type_args_str: Vec<&str> = matches - .values_of("init-script-type-args") + .get_many("init-script-type-args") .unwrap() + .copied() .collect(); let type_args: Vec = type_args_str .iter() @@ -275,8 +270,12 @@ fn main() { } else { vec![] }; - let args = if matches.is_present("init-script-args") { - let args_strings: Vec<&str> = matches.values_of("init-script-args").unwrap().collect(); + let args = if matches.contains_id("init-script-args") { + let args_strings: Vec<&str> = matches + .get_many("init-script-args") + .unwrap() + .copied() + .collect(); let args: Vec = args_strings .iter() .map(|s| parse_transaction_argument(s).unwrap())