diff --git a/leo/cli/commands/deploy.rs b/leo/cli/commands/deploy.rs index 4a62a21169..64ed03fad1 100644 --- a/leo/cli/commands/deploy.rs +++ b/leo/cli/commands/deploy.rs @@ -97,6 +97,8 @@ impl Command for Deploy { self.compiler_options.endpoint.clone(), "--priority-fee".to_string(), self.fee_options.priority_fee.to_string(), + "--network".to_string(), + network.id().to_string(), "--path".to_string(), path.to_str().unwrap().parse().unwrap(), "--broadcast".to_string(), diff --git a/leo/cli/commands/execute.rs b/leo/cli/commands/execute.rs index 677e709255..ee60e34f9b 100644 --- a/leo/cli/commands/execute.rs +++ b/leo/cli/commands/execute.rs @@ -105,6 +105,8 @@ fn handle_execute(command: Execute, context: Context) -> Result< u16 { + match self { + NetworkName::TestnetV0 => TestnetV0::ID, + NetworkName::MainnetV0 => MainnetV0::ID, + } + } +} + impl TryFrom<&str> for NetworkName { type Error = LeoError;