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

Bridge pool cli #729

Merged
merged 16 commits into from
Nov 8, 2022
Merged
Show file tree
Hide file tree
Changes from 13 commits
Commits
Show all changes
16 commits
Select commit Hold shift + click to select a range
bc09908
[feat]: Ethereum bridge vp allows escrowing nam
batconjurer Oct 31, 2022
07a6af3
Merge branch 'bat/ethbridge/bp-vp-wnam-address-from-storage' into bat…
batconjurer Oct 31, 2022
adaeb0b
[feat]: Initialized VP substorage
batconjurer Oct 31, 2022
73abdc9
[chore]: Added unit tests checking that the eth bridge vp allows escr…
batconjurer Oct 31, 2022
e03e3fc
[feat]: Added bridge pool defs to the cli
batconjurer Nov 1, 2022
123369d
Merge branch 'bat/ethbridge/bp-vp-escrow-wnam' into bat/ethbridge/eth…
batconjurer Nov 1, 2022
c17254f
Merge branch 'bat/ethbridge/bp-vp-wnam-address-from-storage' into bat…
batconjurer Nov 1, 2022
393527b
Merge branch 'bat/ethbridge/query-bridge-merkle-proofs' into bat/ethb…
batconjurer Nov 2, 2022
6831014
[feat]: Added a cli for interacting with the bridge pool. Needs testi…
batconjurer Nov 2, 2022
31e328c
[chore]: Merging in eth-bridge-integration
batconjurer Nov 2, 2022
3f0bc2d
Merge branch 'bat/ethbridge/bp-vp-wnam-address-from-storage' into bat…
batconjurer Nov 4, 2022
3a67de1
Update apps/src/lib/client/eth_bridge_pool.rs
batconjurer Nov 7, 2022
fd99767
[feat]: Migrated the add transfer to eth bridge pool command to namadac
batconjurer Nov 7, 2022
b6112b4
Merge branch 'eth-bridge-integration' into bat/ethbridge/bridge-pool-cli
batconjurer Nov 8, 2022
2674b64
[fix]: Enriched an error msg, removed stray wallet cmds from the nama…
batconjurer Nov 8, 2022
29eec13
Merge branch 'eth-bridge-integration' into bat/ethbridge/bridge-pool-cli
batconjurer Nov 8, 2022
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
6 changes: 6 additions & 0 deletions apps/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,12 @@ doc = false
name = "namadaw"
path = "src/bin/anoma-wallet/main.rs"

# Namada relayer
[[bin]]
doc = false
name = "namadar"
path = "src/bin/anoma-relayer/main.rs"

[features]
default = ["std", "abciplus"]
dev = ["namada/dev"]
Expand Down
6 changes: 5 additions & 1 deletion apps/src/bin/anoma-client/cli.rs
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
use color_eyre::eyre::Result;
use namada_apps::cli;
use namada_apps::cli::cmds::*;
use namada_apps::client::{rpc, tx, utils};
use namada_apps::client::{eth_bridge_pool, rpc, tx, utils};

pub async fn main() -> Result<()> {
match cli::anoma_client_cli()? {
Expand Down Expand Up @@ -48,6 +48,10 @@ pub async fn main() -> Result<()> {
Sub::Withdraw(Withdraw(args)) => {
tx::submit_withdraw(ctx, args).await;
}
// Eth bridge pool
Sub::AddToEthBridgePool(args) => {
eth_bridge_pool::add_to_eth_bridge_pool(ctx, args.0).await;
}
// Ledger queries
Sub::QueryEpoch(QueryEpoch(args)) => {
rpc::query_epoch(args).await;
Expand Down
20 changes: 20 additions & 0 deletions apps/src/bin/anoma-relayer/cli.rs
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
//! Anoma client CLI.

use color_eyre::eyre::Result;
use namada_apps::cli;
use namada_apps::cli::cmds;
use namada_apps::client::eth_bridge_pool;

pub async fn main() -> Result<()> {
let (cmd, _) = cli::anoma_relayer_cli()?;
use cmds::EthBridgePool as Sub;
match cmd {
Sub::ConstructProof(args) => {
eth_bridge_pool::construct_bridge_pool_proof(args).await;
}
Sub::QueryPool(query) => {
eth_bridge_pool::query_bridge_pool(query).await;
}
}
Ok(())
}
17 changes: 17 additions & 0 deletions apps/src/bin/anoma-relayer/main.rs
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
mod cli;

use color_eyre::eyre::Result;
use namada_apps::logging;
use tracing_subscriber::filter::LevelFilter;

#[tokio::main]
async fn main() -> Result<()> {
// init error reporting
color_eyre::install()?;

// init logging
logging::init_from_env_or(LevelFilter::INFO)?;

// run the CLI
cli::main().await
}
3 changes: 3 additions & 0 deletions apps/src/bin/anoma/cli.rs
Original file line number Diff line number Diff line change
Expand Up @@ -53,6 +53,9 @@ fn handle_command(cmd: cli::cmds::Anoma, raw_sub_cmd: String) -> Result<()> {
handle_subcommand("namadac", sub_args)
}
cli::cmds::Anoma::Wallet(_) => handle_subcommand("namadaw", sub_args),
cli::cmds::Anoma::EthBridgePool(_) => {
handle_subcommand("namadar", sub_args)
}
}
}

Expand Down
Loading