Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

cli: rename Tx arg tx_code_path to tx_reveal_code_path #1436

Merged
merged 1 commit into from
Jun 5, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions apps/src/lib/cli.rs
Original file line number Diff line number Diff line change
Expand Up @@ -3165,7 +3165,7 @@ pub mod args {
gas_limit: self.gas_limit,
signing_key: self.signing_key.map(|x| ctx.get_cached(&x)),
signer: self.signer.map(|x| ctx.get(&x)),
tx_code_path: ctx.read_wasm(self.tx_code_path),
tx_reveal_code_path: ctx.read_wasm(self.tx_reveal_code_path),
password: self.password,
expiration: self.expiration,
chain_id: self.chain_id,
Expand Down Expand Up @@ -3251,7 +3251,7 @@ pub mod args {
let expiration = EXPIRATION_OPT.parse(matches);
let signing_key = SIGNING_KEY_OPT.parse(matches);
let signer = SIGNER.parse(matches);
let tx_code_path = PathBuf::from(TX_REVEAL_PK);
let tx_reveal_code_path = PathBuf::from(TX_REVEAL_PK);
let chain_id = CHAIN_ID_OPT.parse(matches);
let password = None;
Self {
Expand All @@ -3268,7 +3268,7 @@ pub mod args {
expiration,
signing_key,
signer,
tx_code_path,
tx_reveal_code_path,
password,
chain_id,
}
Expand Down
4 changes: 2 additions & 2 deletions shared/src/ledger/args.rs
Original file line number Diff line number Diff line change
Expand Up @@ -400,8 +400,8 @@ pub struct Tx<C: NamadaTypes = SdkTypes> {
pub signing_key: Option<C::Keypair>,
/// Sign the tx with the keypair of the public key of the given address
pub signer: Option<C::Address>,
/// Path to the TX WASM code file
pub tx_code_path: C::Data,
/// Path to the TX WASM code file to reveal PK
pub tx_reveal_code_path: C::Data,
/// Password to decrypt key
pub password: Option<String>,
}
Expand Down
2 changes: 1 addition & 1 deletion shared/src/ledger/tx.rs
Original file line number Diff line number Diff line change
Expand Up @@ -285,7 +285,7 @@ pub async fn submit_reveal_pk_aux<
let addr: Address = public_key.into();
println!("Submitting a tx to reveal the public key for address {addr}...");
let tx_data = public_key.try_to_vec().map_err(Error::EncodeKeyFailure)?;
let tx_code = args.tx_code_path.clone();
let tx_code = args.tx_reveal_code_path.clone();
let tx = Tx::new(
tx_code,
Some(tx_data),
Expand Down