mirror of
https://github.com/logos-blockchain/lssa.git
synced 2026-01-04 06:13:10 +00:00
rename
This commit is contained in:
parent
8f874a6b4f
commit
313425f6f8
@ -467,17 +467,17 @@ pub async fn test_success_private_transfer_to_another_owned_account() {
|
||||
info!("Waiting for next block creation");
|
||||
tokio::time::sleep(Duration::from_secs(TIME_TO_WAIT_FOR_BLOCK_SECONDS)).await;
|
||||
|
||||
let command = Command::ClaimPrivateAccount {
|
||||
let command = Command::FetchPrivateAccount {
|
||||
tx_hash: tx_hash.clone(),
|
||||
acc_addr: from.to_string(),
|
||||
ciph_id: 0,
|
||||
output_id: 0,
|
||||
};
|
||||
wallet::execute_subcommand(command).await.unwrap();
|
||||
|
||||
let command = Command::ClaimPrivateAccount {
|
||||
let command = Command::FetchPrivateAccount {
|
||||
tx_hash,
|
||||
acc_addr: to.to_string(),
|
||||
ciph_id: 1,
|
||||
output_id: 1,
|
||||
};
|
||||
wallet::execute_subcommand(command).await.unwrap();
|
||||
|
||||
@ -519,10 +519,10 @@ pub async fn test_success_private_transfer_to_another_foreign_account() {
|
||||
info!("Waiting for next block creation");
|
||||
tokio::time::sleep(Duration::from_secs(TIME_TO_WAIT_FOR_BLOCK_SECONDS)).await;
|
||||
|
||||
let command = Command::ClaimPrivateAccount {
|
||||
let command = Command::FetchPrivateAccount {
|
||||
tx_hash: tx_hash.clone(),
|
||||
acc_addr: from.to_string(),
|
||||
ciph_id: 0,
|
||||
output_id: 0,
|
||||
};
|
||||
wallet::execute_subcommand(command).await.unwrap();
|
||||
|
||||
@ -582,10 +582,10 @@ pub async fn test_success_private_transfer_to_another_owned_account_claiming_pat
|
||||
|
||||
let tx = fetch_privacy_preserving_tx(&seq_client, tx_hash.clone()).await;
|
||||
|
||||
let command = Command::ClaimPrivateAccount {
|
||||
let command = Command::FetchPrivateAccount {
|
||||
tx_hash,
|
||||
acc_addr: to_addr.to_string(),
|
||||
ciph_id: 1,
|
||||
output_id: 1,
|
||||
};
|
||||
wallet::execute_subcommand(command).await.unwrap();
|
||||
let wallet_storage = WalletCore::start_from_config_update_chain(wallet_config).unwrap();
|
||||
@ -633,10 +633,10 @@ pub async fn test_success_deshielded_transfer_to_another_account() {
|
||||
info!("Waiting for next block creation");
|
||||
tokio::time::sleep(Duration::from_secs(TIME_TO_WAIT_FOR_BLOCK_SECONDS)).await;
|
||||
|
||||
let command = Command::ClaimPrivateAccount {
|
||||
let command = Command::FetchPrivateAccount {
|
||||
tx_hash,
|
||||
acc_addr: from.to_string(),
|
||||
ciph_id: 0,
|
||||
output_id: 0,
|
||||
};
|
||||
wallet::execute_subcommand(command).await.unwrap();
|
||||
let wallet_storage = WalletCore::start_from_config_update_chain(wallet_config).unwrap();
|
||||
@ -680,10 +680,10 @@ pub async fn test_success_shielded_transfer_to_another_owned_account() {
|
||||
info!("Waiting for next block creation");
|
||||
tokio::time::sleep(Duration::from_secs(TIME_TO_WAIT_FOR_BLOCK_SECONDS)).await;
|
||||
|
||||
let command = Command::ClaimPrivateAccount {
|
||||
let command = Command::FetchPrivateAccount {
|
||||
tx_hash,
|
||||
acc_addr: to.to_string(),
|
||||
ciph_id: 0,
|
||||
output_id: 0,
|
||||
};
|
||||
wallet::execute_subcommand(command).await.unwrap();
|
||||
let wallet_storage = WalletCore::start_from_config_update_chain(wallet_config).unwrap();
|
||||
@ -961,8 +961,8 @@ async fn verify_commitment_is_in_state(
|
||||
commitment: Commitment,
|
||||
seq_client: &SequencerClient,
|
||||
) -> bool {
|
||||
match seq_client.get_proof_for_commitment(commitment).await {
|
||||
Ok(Some(_)) => true,
|
||||
_ => false,
|
||||
}
|
||||
matches!(
|
||||
seq_client.get_proof_for_commitment(commitment).await,
|
||||
Ok(Some(_))
|
||||
)
|
||||
}
|
||||
|
||||
@ -304,16 +304,16 @@ pub enum Command {
|
||||
amount: u128,
|
||||
},
|
||||
///Claim account `acc_addr` generated in transaction `tx_hash`, using secret `sh_secret` at ciphertext id `ciph_id`
|
||||
ClaimPrivateAccount {
|
||||
FetchPrivateAccount {
|
||||
///tx_hash - valid 32 byte hex string
|
||||
#[arg(long)]
|
||||
tx_hash: String,
|
||||
///acc_addr - valid 32 byte hex string
|
||||
#[arg(long)]
|
||||
acc_addr: String,
|
||||
///ciph_id - id of cipher in transaction
|
||||
///output_id - id of the output in the transaction
|
||||
#[arg(long)]
|
||||
ciph_id: usize,
|
||||
output_id: usize,
|
||||
},
|
||||
///Get private account with `addr` from storage
|
||||
GetPrivateAccount {
|
||||
@ -330,17 +330,17 @@ pub enum Command {
|
||||
tx_hash: String,
|
||||
},
|
||||
///Get account `addr` balance
|
||||
GetAccountBalance {
|
||||
GetPublicAccountBalance {
|
||||
#[arg(short, long)]
|
||||
addr: String,
|
||||
},
|
||||
///Get account `addr` nonce
|
||||
GetAccountNonce {
|
||||
GetPublicAccountNonce {
|
||||
#[arg(short, long)]
|
||||
addr: String,
|
||||
},
|
||||
///Get account at address `addr`
|
||||
GetAccount {
|
||||
GetPublicAccount {
|
||||
#[arg(short, long)]
|
||||
addr: String,
|
||||
},
|
||||
@ -671,10 +671,10 @@ pub async fn execute_subcommand(command: Command) -> Result<SubcommandReturnValu
|
||||
|
||||
SubcommandReturnValue::PrivacyPreservingTransfer { tx_hash }
|
||||
}
|
||||
Command::ClaimPrivateAccount {
|
||||
Command::FetchPrivateAccount {
|
||||
tx_hash,
|
||||
acc_addr,
|
||||
ciph_id,
|
||||
output_id: ciph_id,
|
||||
} => {
|
||||
let acc_addr: Address = acc_addr.parse().unwrap();
|
||||
|
||||
@ -761,7 +761,7 @@ pub async fn execute_subcommand(command: Command) -> Result<SubcommandReturnValu
|
||||
|
||||
SubcommandReturnValue::Empty
|
||||
}
|
||||
Command::GetAccountBalance { addr } => {
|
||||
Command::GetPublicAccountBalance { addr } => {
|
||||
let addr = Address::from_str(&addr)?;
|
||||
|
||||
let balance = wallet_core.get_account_balance(addr).await?;
|
||||
@ -769,7 +769,7 @@ pub async fn execute_subcommand(command: Command) -> Result<SubcommandReturnValu
|
||||
|
||||
SubcommandReturnValue::Empty
|
||||
}
|
||||
Command::GetAccountNonce { addr } => {
|
||||
Command::GetPublicAccountNonce { addr } => {
|
||||
let addr = Address::from_str(&addr)?;
|
||||
|
||||
let nonce = wallet_core.get_accounts_nonces(vec![addr]).await?[0];
|
||||
@ -777,7 +777,7 @@ pub async fn execute_subcommand(command: Command) -> Result<SubcommandReturnValu
|
||||
|
||||
SubcommandReturnValue::Empty
|
||||
}
|
||||
Command::GetAccount { addr } => {
|
||||
Command::GetPublicAccount { addr } => {
|
||||
let addr: Address = addr.parse()?;
|
||||
let account = wallet_core.get_account_public(addr).await?;
|
||||
let account_hr: HumanReadableAccount = account.clone().into();
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user