From d73b479512d6d101f41657088193a6016a2040a5 Mon Sep 17 00:00:00 2001 From: WGB5445 <919603023@qq.com> Date: Wed, 13 Jul 2022 18:12:15 +0800 Subject: [PATCH 1/3] Fix #3527 allow dev deploy deploy the package to another address --- cmd/starcoin/src/dev/deploy_cmd.rs | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/cmd/starcoin/src/dev/deploy_cmd.rs b/cmd/starcoin/src/dev/deploy_cmd.rs index 2bbd8cc05c..4f737dd55d 100644 --- a/cmd/starcoin/src/dev/deploy_cmd.rs +++ b/cmd/starcoin/src/dev/deploy_cmd.rs @@ -41,9 +41,7 @@ impl CommandAction for DeployCommand { let package_address = package.package_address(); let mut transaction_opts = opt.transaction_opts.clone(); match transaction_opts.sender.as_ref() { - Some(sender) => { - ensure!(*sender == package_address, "please use package address({}) account to deploy package, currently sender is {}.", package_address,sender); - } + Some(sender) => {} None => { eprintln!( "Use package address ({}) as transaction sender", From fa92854351305718317edaaef78c9160e465ff6f Mon Sep 17 00:00:00 2001 From: WGB5445 <919603023@qq.com> Date: Wed, 13 Jul 2022 18:32:00 +0800 Subject: [PATCH 2/3] Fix warning --- cmd/starcoin/src/dev/deploy_cmd.rs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/cmd/starcoin/src/dev/deploy_cmd.rs b/cmd/starcoin/src/dev/deploy_cmd.rs index 4f737dd55d..b89a6565ae 100644 --- a/cmd/starcoin/src/dev/deploy_cmd.rs +++ b/cmd/starcoin/src/dev/deploy_cmd.rs @@ -5,7 +5,7 @@ use crate::cli_state::CliState; use crate::dev::dev_helper; use crate::view::{ExecuteResultView, TransactionOptions}; use crate::StarcoinOpt; -use anyhow::{ensure, Result}; +use anyhow::{ Result}; use clap::Parser; use scmd::{CommandAction, ExecContext}; use starcoin_vm_types::transaction::TransactionPayload; @@ -41,7 +41,7 @@ impl CommandAction for DeployCommand { let package_address = package.package_address(); let mut transaction_opts = opt.transaction_opts.clone(); match transaction_opts.sender.as_ref() { - Some(sender) => {} + Some(_sender) => {} None => { eprintln!( "Use package address ({}) as transaction sender", From bfef3295e9d4ace0c00596e139201df489e70aaa Mon Sep 17 00:00:00 2001 From: WGB5445 <919603023@qq.com> Date: Wed, 13 Jul 2022 18:45:21 +0800 Subject: [PATCH 3/3] fix fmt --- cmd/starcoin/src/dev/deploy_cmd.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/cmd/starcoin/src/dev/deploy_cmd.rs b/cmd/starcoin/src/dev/deploy_cmd.rs index b89a6565ae..06705693f8 100644 --- a/cmd/starcoin/src/dev/deploy_cmd.rs +++ b/cmd/starcoin/src/dev/deploy_cmd.rs @@ -5,7 +5,7 @@ use crate::cli_state::CliState; use crate::dev::dev_helper; use crate::view::{ExecuteResultView, TransactionOptions}; use crate::StarcoinOpt; -use anyhow::{ Result}; +use anyhow::Result; use clap::Parser; use scmd::{CommandAction, ExecContext}; use starcoin_vm_types::transaction::TransactionPayload;