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

multitoken transfer #297

Closed
wants to merge 17 commits into from
Closed
2 changes: 2 additions & 0 deletions .changelog/unreleased/improvements/1168-pbkdf-iterations.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
- Wallet: Increase the number of iterations used for keys encryption to the
recommended value. ([#1168](https://github.com/anoma/anoma/issues/1168))
58 changes: 29 additions & 29 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 2 additions & 2 deletions apps/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -118,7 +118,7 @@ serde_json = {version = "1.0.62", features = ["raw_value"]}
serde_regex = "1.1.0"
sha2 = "0.9.3"
signal-hook = "0.3.9"
sparse-merkle-tree = {git = "https://github.com/heliaxdev/sparse-merkle-tree", branch = "yuji/prost-0.9", features = ["borsh"]}
sparse-merkle-tree = {git = "https://github.com/heliaxdev/sparse-merkle-tree", branch = "yuji/ics23_0.7", features = ["borsh"]}
# sysinfo with disabled multithread feature
sysinfo = {version = "=0.21.1", default-features = false}
tar = "0.4.37"
Expand All @@ -140,7 +140,7 @@ tower = "0.4"
# with a patch for https://github.com/penumbra-zone/tower-abci/issues/7.
tower-abci = {git = "https://github.com/heliaxdev/tower-abci", rev = "f6463388fc319b6e210503b43b3aecf6faf6b200", optional = true}
tower-abci-old = {package = "tower-abci", git = "https://github.com/heliaxdev/tower-abci", branch = "yuji/rebase_v0.23.5_tracing", optional = true}
tracing = "0.1.30"
tracing = "0.1.34"
tracing-log = "0.1.2"
tracing-subscriber = {version = "0.3.7", features = ["env-filter"]}
websocket = "0.26.2"
Expand Down
15 changes: 15 additions & 0 deletions apps/src/lib/cli.rs
Original file line number Diff line number Diff line change
Expand Up @@ -1469,6 +1469,7 @@ pub mod args {
const SOURCE: Arg<WalletAddress> = arg("source");
const SOURCE_OPT: ArgOpt<WalletAddress> = SOURCE.opt();
const STORAGE_KEY: Arg<storage::Key> = arg("storage-key");
const SUB_PREFIX: ArgOpt<String> = arg_opt("sub-prefix");
const TARGET: Arg<WalletAddress> = arg("target");
const TO_STDOUT: ArgFlag = flag("stdout");
const TOKEN_OPT: ArgOpt<WalletAddress> = TOKEN.opt();
Expand Down Expand Up @@ -1614,6 +1615,8 @@ pub mod args {
pub target: WalletAddress,
/// Transferred token address
pub token: WalletAddress,
/// Transferred token sub prefix
pub sub_prefix: Option<String>,
/// Transferred token amount
pub amount: token::Amount,
}
Expand All @@ -1624,12 +1627,14 @@ pub mod args {
let source = SOURCE.parse(matches);
let target = TARGET.parse(matches);
let token = TOKEN.parse(matches);
let sub_prefix = SUB_PREFIX.parse(matches);
let amount = AMOUNT.parse(matches);
Self {
tx,
source,
target,
token,
sub_prefix,
amount,
}
}
Expand All @@ -1642,6 +1647,7 @@ pub mod args {
))
.arg(TARGET.def().about("The target account address."))
.arg(TOKEN.def().about("The transfer token."))
.arg(SUB_PREFIX.def().about("The token's sub prefix."))
.arg(AMOUNT.def().about("The amount to transfer in decimal."))
}
}
Expand Down Expand Up @@ -2182,17 +2188,21 @@ pub mod args {
pub owner: Option<WalletAddress>,
/// Address of a token
pub token: Option<WalletAddress>,
/// Sub prefix of an account
pub sub_prefix: Option<String>,
}

impl Args for QueryBalance {
fn parse(matches: &ArgMatches) -> Self {
let query = Query::parse(matches);
let owner = OWNER.parse(matches);
let token = TOKEN_OPT.parse(matches);
let sub_prefix = SUB_PREFIX.parse(matches);
Self {
query,
owner,
token,
sub_prefix,
}
}

Expand All @@ -2208,6 +2218,11 @@ pub mod args {
.def()
.about("The token's address whose balance to query."),
)
.arg(
SUB_PREFIX.def().about(
"The token's sub prefix whose balance to query.",
),
)
}
}

Expand Down
Loading