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

Change to multitokens #1693

Merged
merged 25 commits into from
Jul 22, 2023
Merged
Show file tree
Hide file tree
Changes from 19 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
25 changes: 0 additions & 25 deletions apps/src/lib/cli.rs
Original file line number Diff line number Diff line change
Expand Up @@ -2382,7 +2382,6 @@ pub mod args {
pub const SOURCE: Arg<WalletAddress> = arg("source");
pub const SOURCE_OPT: ArgOpt<WalletAddress> = SOURCE.opt();
pub const STORAGE_KEY: Arg<storage::Key> = arg("storage-key");
pub const SUB_PREFIX: ArgOpt<String> = arg_opt("sub-prefix");
pub const SUSPEND_ACTION: ArgFlag = flag("suspend");
pub const TIMEOUT_HEIGHT: ArgOpt<u64> = arg_opt("timeout-height");
pub const TIMEOUT_SEC_OFFSET: ArgOpt<u64> = arg_opt("timeout-sec-offset");
Expand Down Expand Up @@ -3070,7 +3069,6 @@ pub mod args {
source: ctx.get_cached(&self.source),
target: ctx.get(&self.target),
token: ctx.get(&self.token),
sub_prefix: self.sub_prefix,
amount: self.amount,
native_token: ctx.native_token.clone(),
tx_code_path: self.tx_code_path.to_path_buf(),
Expand All @@ -3084,15 +3082,13 @@ pub mod args {
let source = TRANSFER_SOURCE.parse(matches);
let target = TRANSFER_TARGET.parse(matches);
let token = TOKEN.parse(matches);
let sub_prefix = SUB_PREFIX.parse(matches);
let amount = InputAmount::Unvalidated(AMOUNT.parse(matches));
let tx_code_path = PathBuf::from(TX_TRANSFER_WASM);
Self {
tx,
source,
target,
token,
sub_prefix,
amount,
native_token: (),
tx_code_path,
Expand All @@ -3110,7 +3106,6 @@ pub mod args {
to produce the signature.",
))
.arg(TOKEN.def().help("The transfer token."))
.arg(SUB_PREFIX.def().help("The token's sub prefix."))
.arg(AMOUNT.def().help("The amount to transfer in decimal."))
}
}
Expand All @@ -3122,7 +3117,6 @@ pub mod args {
source: ctx.get(&self.source),
receiver: self.receiver,
token: ctx.get(&self.token),
sub_prefix: self.sub_prefix,
amount: self.amount,
port_id: self.port_id,
channel_id: self.channel_id,
Expand All @@ -3139,7 +3133,6 @@ pub mod args {
let source = SOURCE.parse(matches);
let receiver = RECEIVER.parse(matches);
let token = TOKEN.parse(matches);
let sub_prefix = SUB_PREFIX.parse(matches);
let amount = AMOUNT.parse(matches);
let port_id = PORT_ID.parse(matches);
let channel_id = CHANNEL_ID.parse(matches);
Expand All @@ -3151,7 +3144,6 @@ pub mod args {
source,
receiver,
token,
sub_prefix,
amount: amount.amount,
port_id,
channel_id,
Expand All @@ -3171,7 +3163,6 @@ pub mod args {
"The receiver address on the destination chain as string.",
))
.arg(TOKEN.def().help("The transfer token."))
.arg(SUB_PREFIX.def().help("The token's sub prefix."))
.arg(AMOUNT.def().help("The amount to transfer in decimal."))
.arg(PORT_ID.def().help("The port ID."))
.arg(CHANNEL_ID.def().help("The channel ID."))
Expand Down Expand Up @@ -3864,7 +3855,6 @@ pub mod args {
owner: self.owner.map(|x| ctx.get_cached(&x)),
token: self.token.map(|x| ctx.get(&x)),
no_conversions: self.no_conversions,
sub_prefix: self.sub_prefix,
}
}
}
Expand All @@ -3875,13 +3865,11 @@ pub mod args {
let owner = BALANCE_OWNER.parse(matches);
let token = TOKEN_OPT.parse(matches);
let no_conversions = NO_CONVERSIONS.parse(matches);
let sub_prefix = SUB_PREFIX.parse(matches);
Self {
query,
owner,
token,
no_conversions,
sub_prefix,
}
}

Expand All @@ -3902,11 +3890,6 @@ pub mod args {
"Whether not to automatically perform conversions.",
),
)
.arg(
SUB_PREFIX
.def()
.help("The token's sub prefix whose balance to query."),
)
}
}

Expand All @@ -3916,7 +3899,6 @@ pub mod args {
query: self.query.to_sdk(ctx),
owner: self.owner.map(|x| ctx.get_cached(&x)),
token: self.token.map(|x| ctx.get(&x)),
sub_prefix: self.sub_prefix,
}
}
}
Expand All @@ -3926,12 +3908,10 @@ pub mod args {
let query = Query::parse(matches);
let owner = BALANCE_OWNER.parse(matches);
let token = TOKEN_OPT.parse(matches);
let sub_prefix = SUB_PREFIX.parse(matches);
Self {
query,
owner,
token,
sub_prefix,
}
}

Expand All @@ -3943,11 +3923,6 @@ pub mod args {
.arg(TOKEN_OPT.def().help(
"The token address that queried transfers must involve.",
))
.arg(
SUB_PREFIX
.def()
.help("The token's sub prefix whose balance to query."),
)
}
}

Expand Down
Loading