-
Notifications
You must be signed in to change notification settings - Fork 371
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
ICS29: Add
fee transfer
command (#2682)
* WIP: Add `fee transfer` command * Added config override in order to change used to transfer tokens with fee * Added unit tests for command argument parsing * Updated command in order to send a pay message for each transfer message * Cargo fmt and cargo clippy fixes * Use main branch of `ibc-proto` * Update guide templates and fix script * Added changelog entry * Added comments in the body of the 'check_can_send_on_channel' function * Moved imports to top level in 'cli_utils.rs' * Removed branch specification for ibc-proto repo in no-std-check Cargo.toml * Added warning when not GNU sed is used Co-authored-by: Luca Joss <luca@informal.systems>
- Loading branch information
Showing
21 changed files
with
1,091 additions
and
136 deletions.
There are no files selected for viewing
2 changes: 2 additions & 0 deletions
2
.changelog/unreleased/features/ibc-relayer-cli/2714-fee-transfer-command.md
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
- New command `fee transfer` which transfers tokens with fees | ||
([#2714](https://github.com/informalsystems/ibc-rs/issues/2714)) |
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,19 +1,35 @@ | ||
//! `fee` subcommand | ||
use abscissa_core::clap::Parser; | ||
use abscissa_core::{Command, Runnable}; | ||
use abscissa_core::{config::Override, Command, Runnable}; | ||
use ibc_relayer::config::Config; | ||
|
||
use register_counterparty_payee::RegisterCounterpartyPayeeCmd; | ||
use register_payee::RegisterPayeeCmd; | ||
use self::register_counterparty_payee::RegisterCounterpartyPayeeCmd; | ||
use self::register_payee::RegisterPayeeCmd; | ||
use self::transfer::FeeTransferCmd; | ||
|
||
pub mod register_counterparty_payee; | ||
pub mod register_payee; | ||
pub mod transfer; | ||
|
||
#[allow(clippy::large_enum_variant)] | ||
#[derive(Command, Debug, Parser, Runnable)] | ||
pub enum FeeCmd { | ||
/// Register a payee for a channel | ||
RegisterPayee(RegisterPayeeCmd), | ||
|
||
/// Register a counterparty payee for a channel | ||
RegisterCounterpartyPayee(RegisterCounterpartyPayeeCmd), | ||
|
||
/// Perform a token transfer supported with a fee | ||
Transfer(FeeTransferCmd), | ||
} | ||
|
||
impl Override<Config> for FeeCmd { | ||
fn override_config(&self, config: Config) -> Result<Config, abscissa_core::FrameworkError> { | ||
match self { | ||
Self::Transfer(cmd) => cmd.override_config(config), | ||
_ => Ok(config), | ||
} | ||
} | ||
} |
Oops, something went wrong.