Skip to content

Commit

Permalink
governance
Browse files Browse the repository at this point in the history
  • Loading branch information
rahxephon89 committed Jan 7, 2025
1 parent 706cbf7 commit f47a384
Showing 1 changed file with 15 additions and 3 deletions.
18 changes: 15 additions & 3 deletions crates/aptos/src/governance/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -915,17 +915,29 @@ pub struct CompileScriptFunction {
#[clap(long, default_value_if("move_2", "true", "7"))]
pub bytecode_version: Option<u32>,

/// Specify the version of the compiler.
/// Defaults to the latest stable compiler version (at least 2)
#[clap(long, value_parser = clap::value_parser!(CompilerVersion),
default_value_if("move_2", "true", LATEST_STABLE_COMPILER_VERSION))]
default_value = LATEST_STABLE_COMPILER_VERSION,
default_value_if("move_2", "true", LATEST_STABLE_COMPILER_VERSION),
default_value_if("move_1", "true", "1"),)]
pub compiler_version: Option<CompilerVersion>,

/// Specify the language version to be supported.
/// Defaults to the latest stable language version (at least 2)
#[clap(long, value_parser = clap::value_parser!(LanguageVersion),
default_value_if("move_2", "true", LATEST_STABLE_LANGUAGE_VERSION))]
default_value = LATEST_STABLE_LANGUAGE_VERSION,
default_value_if("move_2", "true", LATEST_STABLE_LANGUAGE_VERSION),
default_value_if("move_1", "true", "1"),)]
pub language_version: Option<LanguageVersion>,

/// Select bytecode, language, compiler for Move 2
#[clap(long)]
#[clap(long, default_value_t = true)]
pub move_2: bool,

/// Select bytecode, language, and compiler versions for Move 1.
#[clap(long, default_value_t = false)]
pub move_1: bool,
}

impl CompileScriptFunction {
Expand Down

0 comments on commit f47a384

Please sign in to comment.