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

Rename '--ledger-address' to '--node' #1000

Merged
merged 2 commits into from
Jan 16, 2023
Merged
Show file tree
Hide file tree
Changes from all 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
2 changes: 1 addition & 1 deletion apps/src/lib/cli.rs
Original file line number Diff line number Diff line change
Expand Up @@ -1588,7 +1588,7 @@ pub mod args {
TendermintAddress::from_str(raw).unwrap()
}));

const LEDGER_ADDRESS: Arg<TendermintAddress> = arg("ledger-address");
const LEDGER_ADDRESS: Arg<TendermintAddress> = arg("node");
const LOCALHOST: ArgFlag = flag("localhost");
const MASP_VALUE: Arg<MaspValue> = arg("value");
const MAX_COMMISSION_RATE_CHANGE: Arg<Decimal> =
Expand Down
8 changes: 4 additions & 4 deletions documentation/docs/src/user-guide/ibc.md
Original file line number Diff line number Diff line change
Expand Up @@ -243,9 +243,9 @@ killall namadan
## Transferring assets over IBC
This will make transfers across chains by Namada CLI. This assumes that a channel has been created and Hermes is running with the proper config.

In order to do this by Namada's `ibc-transfer` command, we will need to know the `base-dir` and `ledger-address` of each instance (and other transfer parameters).
In order to do this by Namada's `ibc-transfer` command, we will need to know the `base-dir` and `node` of each instance (and other transfer parameters).
`base-dir` is the base directory of each node. If you have used the script, the direcotry is `${IBC_RS}/data/namada-*/.namada`.
`ledger-address` is `rpc_addr` in the relevant hermes' config files.
`node` is `rpc_addr` in the relevant hermes' config files.
One can run `grep "rpc_addr" ${HERMES_CONFIG}`.


Expand Down Expand Up @@ -276,7 +276,7 @@ namadac --base-dir ${BASE_DIR_A}
--receiver ${RECEIVER_RAW_ADDRESS} \
--token ${TOKEN_ALIAS} \
--channel-id ${CHANNEL_ID} \
--ledger-address ${LEDGER_ADDRESS_A}
--node ${LEDGER_ADDRESS_A}
```
Where the above variables in `${VARIABLE}` must be substituted with appropriate values. The raw address of the receiver can be found by `namadaw --base-dir ${BASE_DIR_B} address find --alias ${RECEIVER}`.

Expand All @@ -290,5 +290,5 @@ namadac --base-dir ${BASE_DIR_A}
--receiver atest1d9khqw36g56nqwpkgezrvvejg3p5xv2z8y6nydehxprygvp5g4znj3phxfpyv3pcgcunws2x0wwa76 \
--token nam \
--channel-id channel-0 \
--ledger-address 127.0.0.1:27657
--node 127.0.0.1:27657
```
2 changes: 1 addition & 1 deletion tests/src/e2e/eth_bridge_tests.rs
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,7 @@ fn everything() {
&tx_code_path,
"--data-path",
&tx_data_path,
"--ledger-address",
"--node",
&ledger_addr,
];

Expand Down
6 changes: 3 additions & 3 deletions tests/src/e2e/helpers.rs
Original file line number Diff line number Diff line change
Expand Up @@ -127,7 +127,7 @@ pub fn find_bonded_stake(
"bonded-stake",
"--validator",
alias.as_ref(),
"--ledger-address",
"--node",
ledger_address
],
Some(10)
Expand All @@ -151,7 +151,7 @@ pub fn get_epoch(test: &Test, ledger_address: &str) -> Result<Epoch> {
let mut find = run!(
test,
Bin::Client,
&["epoch", "--ledger-address", ledger_address],
&["epoch", "--node", ledger_address],
Some(10)
)?;
let (unread, matched) = find.exp_regex("Last committed epoch: .*")?;
Expand All @@ -174,7 +174,7 @@ pub fn get_height(test: &Test, ledger_address: &str) -> Result<u64> {
let mut find = run!(
test,
Bin::Client,
&["block", "--ledger-address", ledger_address],
&["block", "--node", ledger_address],
Some(10)
)?;
let (unread, matched) = find.exp_regex("Last committed block ID: .*")?;
Expand Down
20 changes: 9 additions & 11 deletions tests/src/e2e/ibc_tests.rs
Original file line number Diff line number Diff line change
Expand Up @@ -774,7 +774,7 @@ fn transfer_received_token(
"0",
"--gas-token",
NAM,
"--ledger-address",
"--node",
&rpc,
];
let mut client = run!(test, Bin::Client, tx_args, Some(40))?;
Expand Down Expand Up @@ -1065,7 +1065,7 @@ fn submit_ibc_tx(
"0",
"--gas-token",
NAM,
"--ledger-address",
"--node",
&rpc
],
Some(40)
Expand Down Expand Up @@ -1107,7 +1107,7 @@ fn transfer(
&channel_id,
"--port-id",
&port_id,
"--ledger-address",
"--node",
&rpc,
];
let sp = sub_prefix.clone().unwrap_or_default();
Expand Down Expand Up @@ -1271,8 +1271,7 @@ fn check_balances(

// Check the balances on Chain A
let rpc_a = get_actor_rpc(test_a, &Who::Validator(0));
let query_args =
vec!["balance", "--token", NAM, "--ledger-address", &rpc_a];
let query_args = vec!["balance", "--token", NAM, "--node", &rpc_a];
let mut client = run!(test_a, Bin::Client, query_args, Some(40))?;
// Check the source balance
let expected = ": 900000, owned by albert".to_string();
Expand Down Expand Up @@ -1308,7 +1307,7 @@ fn check_balances(
NAM,
"--sub-prefix",
&sub_prefix,
"--ledger-address",
"--node",
&rpc_b,
];
let expected = format!("NAM with {}: 100000", sub_prefix);
Expand Down Expand Up @@ -1342,7 +1341,7 @@ fn check_balances_after_non_ibc(
NAM,
"--sub-prefix",
&sub_prefix,
"--ledger-address",
"--node",
&rpc,
];
let expected = format!("NAM with {}: 50000", sub_prefix);
Expand All @@ -1359,7 +1358,7 @@ fn check_balances_after_non_ibc(
NAM,
"--sub-prefix",
&sub_prefix,
"--ledger-address",
"--node",
&rpc,
];
let expected = format!("NAM with {}: 50000", sub_prefix);
Expand All @@ -1381,8 +1380,7 @@ fn check_balances_after_back(

// Check the balances on Chain A
let rpc_a = get_actor_rpc(test_a, &Who::Validator(0));
let query_args =
vec!["balance", "--token", NAM, "--ledger-address", &rpc_a];
let query_args = vec!["balance", "--token", NAM, "--node", &rpc_a];
let mut client = run!(test_a, Bin::Client, query_args, Some(40))?;
// Check the source balance
let expected = ": 950000, owned by albert".to_string();
Expand Down Expand Up @@ -1418,7 +1416,7 @@ fn check_balances_after_back(
NAM,
"--sub-prefix",
&sub_prefix,
"--ledger-address",
"--node",
&rpc_b,
];
let expected = format!("NAM with {}: 0", sub_prefix);
Expand Down
Loading