Skip to content

Commit

Permalink
Merge branch 'origin/yuji/ibc-multitoken' (#1693)
Browse files Browse the repository at this point in the history
* origin/yuji/ibc-multitoken:
  remove test_invalid_sender
  remove negative check
  remove vp_token
  fix client_connections encoding
  add comments
  fix according to feedback
  fix a test
  fix for tx signing
  for clippy
  fix multitoken vp to check the minter
  for clippy
  modify EthBridge VP and EthBridgePool VP for multitoken
  revert unexpected changes
  change eth_bridge balance keys to multitoken keys
  add unit tests
  remove InternalAddress::Minted
  rename
  fix token decoding
  fix balance print
  add multitoken VP file
  change to multitokens
  change multitoken
  clean denom validation
  • Loading branch information
tzemanovic committed Jul 19, 2023
2 parents d828cd4 + cd95787 commit 6a52f7d
Show file tree
Hide file tree
Showing 73 changed files with 1,860 additions and 4,757 deletions.
25 changes: 0 additions & 25 deletions apps/src/lib/cli.rs
Original file line number Diff line number Diff line change
Expand Up @@ -2465,7 +2465,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 @@ -3153,7 +3152,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 @@ -3167,15 +3165,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 @@ -3193,7 +3189,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 @@ -3205,7 +3200,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 @@ -3222,7 +3216,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 @@ -3234,7 +3227,6 @@ pub mod args {
source,
receiver,
token,
sub_prefix,
amount: amount.amount,
port_id,
channel_id,
Expand All @@ -3254,7 +3246,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 @@ -3947,7 +3938,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 @@ -3958,13 +3948,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 @@ -3985,11 +3973,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 @@ -3999,7 +3982,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 @@ -4009,12 +3991,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 @@ -4026,11 +4006,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

0 comments on commit 6a52f7d

Please sign in to comment.