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

Alternative draft + multisig #1742

Closed
wants to merge 143 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
143 commits
Select commit Hold shift + click to select a range
89fe260
apps: add namadac epoch-sleep
juped Jun 27, 2023
e7cc5e3
tests/e2e: change epoch_sleep to use namadac epoch-sleep
juped Jun 27, 2023
5c34343
tests/e2e: replace PoS test epoch waits with epoch-sleeps
juped Jun 27, 2023
9a6724f
[feat]: Removed unused associated type from ShieldedUtils
batconjurer Jul 5, 2023
f6a2ce1
[chore]: Removed unnecessary trait bounds
batconjurer Jul 6, 2023
67c9b44
Add MAX value for EthBridgeVotingPower
sug0 Jul 9, 2023
2425cce
Use new const in From impl
sug0 Jul 9, 2023
8df0a04
Replace From<u64> with TryFrom<u64> impl on EthBridgeVotingPower
sug0 Jul 9, 2023
9187d2e
Call try_into() instead of into() on EthBridgeVotingPower
sug0 Jul 9, 2023
cfdf73a
clean denom validation
yito88 May 31, 2023
0e5d22b
change multitoken
yito88 Jun 2, 2023
8f62edd
change to multitokens
yito88 Jun 8, 2023
fc5eab4
add multitoken VP file
yito88 Jun 8, 2023
9995a20
fix balance print
yito88 Jun 13, 2023
db117cf
fix token decoding
yito88 Jun 15, 2023
818cced
rename
yito88 Jun 15, 2023
9759185
remove InternalAddress::Minted
yito88 Jun 19, 2023
aa0cbba
add unit tests
yito88 Jun 29, 2023
eeb09af
change eth_bridge balance keys to multitoken keys
yito88 Jul 2, 2023
ba65482
revert unexpected changes
yito88 Jul 2, 2023
381dc76
modify EthBridge VP and EthBridgePool VP for multitoken
yito88 Jul 4, 2023
c441ad5
for clippy
yito88 Jul 5, 2023
d46513f
fix multitoken vp to check the minter
yito88 Jul 5, 2023
13f66dc
for clippy
yito88 Jul 6, 2023
74eee2d
fix for tx signing
yito88 Jul 10, 2023
713dee1
fix a test
yito88 Jul 10, 2023
6e18520
pos: add a function to get genesis validator consensus set for TM
tzemanovic Jul 7, 2023
feda19a
app/ledger/init_chain: get genesis validator set using the new fn
tzemanovic Jul 7, 2023
5fead6a
app/ledger/finalize_block: refactor validator set update for re-use
tzemanovic Jul 7, 2023
eaebb7b
changelog: add #1686
tzemanovic Jul 7, 2023
1a4eb06
improve error handling for `set_initial_validators`
brentstone Jul 10, 2023
8009548
deps: update sysinfo to latest 0.29.4
tzemanovic Jul 10, 2023
c265cc4
changelog: add #1695
tzemanovic Jul 10, 2023
5a0dd99
apps: use fd-lock instead of file-lock for cross-platform support
tzemanovic Jun 21, 2023
8726bbe
changelog: add #1605
tzemanovic Jul 10, 2023
ce0e751
query bonded-stake and order
bengtlofgren Jul 4, 2023
cb48c51
CLI query a validator's state
brentstone Jul 4, 2023
23a78b2
Expanding and fixing slashes query
brentstone Jul 6, 2023
c2cfd34
feat: store total consensus stake; garbage collect validator sets
karbyshev Jul 5, 2023
363aa47
add test case
karbyshev Jul 9, 2023
c7dab48
refactor: introduce name for magic constant
karbyshev Jul 9, 2023
e43d5f7
refactor: simplify code
karbyshev Jul 9, 2023
9dc5fff
add changelog
karbyshev Jul 10, 2023
4abcc9b
refactor: fix formatting
karbyshev Jul 10, 2023
2a908a0
fix according to feedback
yito88 Jul 10, 2023
93b6679
add comments
yito88 Jul 10, 2023
b3b1f26
pos: return sorted validator sets and code re-use for queries
tzemanovic Jul 11, 2023
141ce4b
Merge branch 'tomas/win-build' (#1605)
tzemanovic Jul 11, 2023
8f7a1b0
apps: add namadac epoch-sleep
juped Jun 27, 2023
ab08395
tests/e2e: change epoch_sleep to use namadac epoch-sleep
juped Jun 27, 2023
4de68f7
tests/e2e: replace PoS test epoch waits with epoch-sleeps
juped Jun 27, 2023
9702dd9
changelog: add #1656
tzemanovic Jul 11, 2023
1f27630
apps: move epoch-sleep client cmd under utils
tzemanovic Jul 11, 2023
28a6362
changelog: add #1621
tzemanovic Jul 11, 2023
23de497
ci/test/e2e: add new test
tzemanovic Jul 11, 2023
119210b
Merge branch 'ray/utils-next-epoch' (#1621)
tzemanovic Jul 11, 2023
3dd7245
Merge branch 'bengt/pos-cli-queries' (#1656)
tzemanovic Jul 11, 2023
25e1c0d
Merge branch 'origin/aleks/clear-out-validator-sets-for-old-epochs' (…
tzemanovic Jul 11, 2023
62ce559
Revert "Merge branch 'ray/utils-next-epoch' (#1621)"
juped Jul 11, 2023
b06b603
CLI query a validator's state
brentstone Jul 4, 2023
5a6a92a
Expanding and fixing slashes query
brentstone Jul 6, 2023
214735c
pos: return sorted validator sets and code re-use for queries
tzemanovic Jul 11, 2023
ce14a4c
changelog: add #1656
tzemanovic Jul 11, 2023
532659d
apps: move epoch-sleep client cmd under utils
tzemanovic Jul 11, 2023
ff692ab
ci/test/e2e: add new test
tzemanovic Jul 11, 2023
45d0813
changelog: add #1621
tzemanovic Jul 11, 2023
3debe6b
Merge branch 'ray/utils-next-epoch' (#1621) into draft
juped Jul 11, 2023
49bb263
fixup! Merge branch 'ray/utils-next-epoch' (#1621) into draft
juped Jul 11, 2023
e0287ea
add unjail tx at CLI
bengtlofgren Jul 4, 2023
fc528cc
expand and fix e2e test `double_signing_gets_slashed`
brentstone Jul 4, 2023
a5d2237
handle errors for unjail-validator tx in the client
brentstone Jul 6, 2023
079d5c1
fix client_connections encoding
yito88 Jul 11, 2023
7f45cb2
Revert "Merge branch 'bengt/pos-cli-queries' (#1656)"
brentstone Jul 12, 2023
85256e8
query bonded-stake and order
bengtlofgren Jul 4, 2023
8ca6ceb
CLI query a validator's state
brentstone Jul 4, 2023
aae3f54
Expanding and fixing slashes query
brentstone Jul 6, 2023
b39d3ef
pos: return sorted validator sets and code re-use for queries
tzemanovic Jul 11, 2023
86638ec
changelog: add #1656
tzemanovic Jul 11, 2023
c0b1e20
Merge branch 'bengt/pos-cli-queries' (#1656)
brentstone Jul 12, 2023
ef41240
Merge branch 'bengt/add-unjail-validator' (#1654)
brentstone Jul 12, 2023
b34387d
converts faucet_withdrawal_limit to be correct
bengtlofgren Jul 5, 2023
340b4ad
[fix]: Fixed the faucet to use uint instead of amount. This makes it …
batconjurer Jul 6, 2023
52b882a
Update apps/src/lib/config/genesis.rs
batconjurer Jul 10, 2023
42b5335
Update core/src/types/uint.rs
batconjurer Jul 10, 2023
7fd0f6e
[chore]: Incorporating in review comments
batconjurer Jul 10, 2023
5de784e
[fix]: Fixing errors introduced by merging in main
batconjurer Jul 10, 2023
5ca0eab
changelog: add #1667
tzemanovic Jul 12, 2023
91ae10d
Merge branch 'bengt/faucet-0.18-fix' (#1667)
tzemanovic Jul 12, 2023
a22eacb
changelog: add #1670
tzemanovic Jul 12, 2023
6205c37
Merge branch 'bat/remove-unused-assoc-ty' (#1670)
tzemanovic Jul 12, 2023
3147e22
Merge branch 'tomas/fix-init-chain-validator-set' (#1686)
tzemanovic Jul 12, 2023
c0cbacb
changelog: add #1692
tzemanovic Jul 12, 2023
24b18ef
Merge branch 'tiago/rm-from-u64-on-ethbridge-stake' (#1692)
tzemanovic Jul 12, 2023
00926b4
Merge branch 'tomas/update-sysinfo' (#1695)
tzemanovic Jul 12, 2023
9ed7177
shared/ledger/queries: add token balance client-only method
tzemanovic Feb 22, 2023
223753f
client/rpc: use the new token balance method
tzemanovic Feb 22, 2023
d03df95
changelog: add #1173
tzemanovic Jul 12, 2023
e65ffeb
remove vp_token
yito88 Jul 12, 2023
59a7fcc
fix changes in finalize_block
yito88 Jul 12, 2023
f1669e7
add changelog
yito88 Jul 12, 2023
49fd38d
refactor: remove duplicated code
karbyshev Jul 13, 2023
c4fcad6
refactor: use immutable reference
karbyshev Jul 13, 2023
32a10a4
refactor: use immutable reference
karbyshev Jul 13, 2023
749a8ec
remove negative check
yito88 Jul 14, 2023
cd95787
remove test_invalid_sender
yito88 Jul 14, 2023
20a110f
refactor: rename method
karbyshev Jul 14, 2023
5483cdc
refactor: rename function
karbyshev Jul 14, 2023
810ba71
Merge branch 'tomas/token-balance-query' (#1173)
tzemanovic Jul 14, 2023
d87df2a
test/shell/finalize_block: add some txs to DB commit test
tzemanovic Jul 13, 2023
47e4fe1
Merge branch 'yuji/fix_changes_before_commit' (#1709)
tzemanovic Jul 14, 2023
37bbbdc
changelog: add #1717
tzemanovic Jul 14, 2023
d9809da
Merge branch 'aleks/refactor' (#1717)
tzemanovic Jul 14, 2023
2dcd6d6
Remove `ADDR` associated type from native VPs
sug0 Jul 15, 2023
5af1f94
pos: error out if validator is not in expected state for rewards
tzemanovic Jul 17, 2023
ca02d26
test/e2e/slashing: extend the test to discover rewards issues
tzemanovic Jul 17, 2023
2afb27c
app/ledger/finalize_block: log block rewards before recording slashes
tzemanovic Jul 17, 2023
6552a5a
changelog: add #1725
tzemanovic Jul 18, 2023
9448c85
Merge branch 'tiago/remove-native-vp-addr' (#1725)
tzemanovic Jul 18, 2023
ed57e33
pos/slash: fix the validator state update to be in sync with set changes
tzemanovic Jul 18, 2023
0c16a19
test/ledger/finalize_block: fix slashing tests
tzemanovic Jul 18, 2023
4e52936
changelog: add #1729
tzemanovic Jul 18, 2023
670f7e4
pos/epoched: keep 2 past epochs of data by default
tzemanovic Jul 18, 2023
641f9e0
changelog: add #1733
tzemanovic Jul 18, 2023
681b24b
Merge branch 'main' into drafty
tzemanovic Jul 19, 2023
316cfed
Merge branch 'bat/remove-unused-assoc-ty' into bat/feature/refactor-cli
batconjurer Jul 19, 2023
6906e5b
Merge branch 'tomas/pos-fix-rewards-boundary' (#1729)
tzemanovic Jul 19, 2023
1f18bf7
Merge branch 'tomas/pos-data-history' (#1733)
tzemanovic Jul 19, 2023
ca154cd
[feat]: Moved cli commands common to testing, cli, and sdk out into apps
batconjurer Jul 19, 2023
aff4d3c
Merge branch 'bat/feature/refactor-cli' (#1738)
tzemanovic Jul 19, 2023
432ea9f
fixup! Merge branch 'bat/feature/refactor-cli' (#1738)
tzemanovic Jul 19, 2023
d828cd4
wasm: update checksums
tzemanovic Jul 19, 2023
6a52f7d
Merge branch 'origin/yuji/ibc-multitoken' (#1693)
tzemanovic Jul 19, 2023
23b4af4
fixup! Merge branch 'origin/yuji/ibc-multitoken' (#1693)
tzemanovic Jul 19, 2023
f166f0c
wasm: update checksums
tzemanovic Jul 19, 2023
bc39e05
core: added multisignature tx format, refacctor account storage api, …
Fraccaman Jul 20, 2023
9f498bf
apps,shared: added cli tx and query methods
Fraccaman Jul 20, 2023
673d161
docs: update tx definitions
Fraccaman Jul 20, 2023
a56ae26
wasm: added new account methods to tx_prelude, refactor signature ver…
Fraccaman Jul 20, 2023
60fc86c
test: fix unit tests
Fraccaman Jul 20, 2023
85c7559
test: fix e2e test
Fraccaman Jul 20, 2023
39113c6
added changelog
Fraccaman Jul 20, 2023
53f4896
Merge branch 'fraccaman/multisignature-draft-rebase' (#1606)
Fraccaman Jul 20, 2023
9091325
fixup! Merge branch 'fraccaman/multisignature-draft-rebase' (#1606)
Fraccaman Jul 20, 2023
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: 2 additions & 0 deletions .changelog/unreleased/bug-fixes/1667-faucet-limit-fix.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
- Fix genesis `faucet_withdrawal_limit` parser to respect tokens' denomination.
([\#1667](https://github.com/anoma/namada/pull/1667))
3 changes: 3 additions & 0 deletions .changelog/unreleased/bug-fixes/1686-delete-prefix.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
- PoS: ensure that the size of genesis validator set
is limited by the `max_validator_slots` parameter.
([\#1686](https://github.com/anoma/namada/pull/1686))
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
- Fix inconsistency state before commit
([\#1709](https://github.com/anoma/namada/issues/1709))
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
- PoS: Fixed an epoch boundary issue in which a validator who's being slashed
on a start of a new epoch is disregarded during processing of block votes.
([\#1729](https://github.com/anoma/namada/pull/1729))
2 changes: 2 additions & 0 deletions .changelog/unreleased/features/1606-multisignature-draft.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
- Introduce multisignature account and transaction format.
([\#1606](https://github.com/anoma/namada/pull/1606))
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
- PoS: purge validator sets for old epochs from the storage; store total
validator stake ([\#1129](https://github.com/anoma/namada/issues/1129))
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
- Added a reusable token balance query method.
([\#1173](https://github.com/anoma/namada/pull/1173))
2 changes: 2 additions & 0 deletions .changelog/unreleased/improvements/1605-win-build.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
- Replaced file-lock with fd-lock dependency to support Windows build.
([\#1605](https://github.com/anoma/namada/pull/1605))
2 changes: 2 additions & 0 deletions .changelog/unreleased/improvements/1621-utils-next-epoch.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
- Added a command to wait for the next epoch: `client utils epoch-sleep`.
([\#1621](https://github.com/anoma/namada/pull/1621))
2 changes: 2 additions & 0 deletions .changelog/unreleased/improvements/1656-pos-cli-queries.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
- Added a client query for `validator-state` and improved the slashes query to
show more info. ([\#1656](https://github.com/anoma/namada/pull/1656))
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
- Removed associated type on `masp::ShieldedUtils`. This type was an
attempt to reduce the number of generic parameters needed when interacting
with MASP but resulted in making code re-use extremely difficult.
([\#1670](https://github.com/anoma/namada/pull/1670))
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
- Removed `impl From<u64> for EthBridgeVotingPower` and replaced it with a
`TryFrom`. ([\#1692](https://github.com/anoma/namada/pull/1692))
2 changes: 2 additions & 0 deletions .changelog/unreleased/improvements/1695-update-sysinfo.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
- Updated sysinfo dependency.
([\#1695](https://github.com/anoma/namada/pull/1695))
2 changes: 2 additions & 0 deletions .changelog/unreleased/improvements/1717-storage-refactor.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
- Refactored storage code to only use an immutable reference when reading and
writing to a batch. ([\#1717](https://github.com/anoma/namada/pull/1717))
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
- Removed the associated type for an address from `trait NativeVp`.
([\#1725](https://github.com/anoma/namada/pull/1725))
2 changes: 2 additions & 0 deletions .changelog/unreleased/miscellaneous/1733-pos-data-history.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
- PoS: Keep the data for last two epochs by default.
([\#1733](https://github.com/anoma/namada/pull/1733))
2 changes: 2 additions & 0 deletions .github/workflows/scripts/e2e.json
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@
"e2e::ledger_tests::masp_pinned_txs": 75,
"e2e::ledger_tests::masp_txs_and_queries": 282,
"e2e::ledger_tests::pos_bonds": 77,
"e2e::ledger_tests::implicit_account_reveal_pk": 30,
"e2e::ledger_tests::pos_init_validator": 40,
"e2e::ledger_tests::proposal_offline": 21,
"e2e::ledger_tests::pgf_governance_proposal": 100,
Expand All @@ -20,6 +21,7 @@
"e2e::ledger_tests::test_namada_shuts_down_if_tendermint_dies": 2,
"e2e::ledger_tests::test_genesis_validators": 14,
"e2e::ledger_tests::test_node_connectivity_and_consensus": 28,
"e2e::ledger_tests::test_epoch_sleep": 12,
"e2e::wallet_tests::wallet_address_cmds": 1,
"e2e::wallet_tests::wallet_encrypted_key_cmds": 1,
"e2e::wallet_tests::wallet_encrypted_key_cmds_env_var": 1,
Expand Down
57 changes: 18 additions & 39 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 2 additions & 2 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -68,9 +68,9 @@ ethabi = "18.0.0"
ethers = "2.0.0"
expectrl = "0.7.0"
eyre = "0.6.5"
fd-lock = "3.0.12"
ferveo = {git = "https://github.com/anoma/ferveo", rev = "e5abd0acc938da90140351a65a26472eb495ce4d"}
ferveo-common = {git = "https://github.com/anoma/ferveo", rev = "e5abd0acc938da90140351a65a26472eb495ce4d"}
file-lock = "2.0.2"
file-serve = "0.2.0"
flate2 = "1.0.22"
fs_extra = "1.2.0"
Expand Down Expand Up @@ -116,7 +116,7 @@ sha2 = "0.9.3"
signal-hook = "0.3.9"
slip10_ed25519 = "0.1.3"
# sysinfo with disabled multithread feature
sysinfo = {version = "=0.21.1", default-features = false}
sysinfo = {version = "0.29.4", default-features = false}
tar = "0.4.37"
tempfile = {version = "3.2.0"}
tendermint-config = {git = "https://github.com/heliaxdev/tendermint-rs.git", rev = "b7d1e5afc6f2ccb3fd1545c2174bab1cc48d7fa7"}
Expand Down
2 changes: 1 addition & 1 deletion apps/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -90,9 +90,9 @@ ethbridge-bridge-events = {git = "https://github.com/heliaxdev/ethbridge-rs", ta
ethbridge-events = {git = "https://github.com/heliaxdev/ethbridge-rs", tag = "v0.18.0"}
ethbridge-governance-events = {git = "https://github.com/heliaxdev/ethbridge-rs", tag = "v0.18.0"}
eyre.workspace = true
fd-lock.workspace = true
ferveo-common.workspace = true
ferveo.workspace = true
file-lock.workspace = true
flate2.workspace = true
futures.workspace = true
itertools.workspace = true
Expand Down
94 changes: 80 additions & 14 deletions apps/src/bin/namada-client/cli.rs
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,7 @@ pub async fn main() -> Result<()> {
tx::submit_ibc_transfer::<HttpClient>(&client, ctx, args)
.await?;
}
Sub::TxUpdateVp(TxUpdateVp(mut args)) => {
Sub::TxUpdateAccount(TxUpdateAccount(mut args)) => {
let client = HttpClient::new(utils::take_config_address(
&mut args.tx.ledger_address,
))
Expand All @@ -76,8 +76,10 @@ pub async fn main() -> Result<()> {
.await
.proceed_or_else(error)?;
let args = args.to_sdk(&mut ctx);
tx::submit_update_vp::<HttpClient>(&client, &mut ctx, args)
.await?;
tx::submit_update_account::<HttpClient>(
&client, &mut ctx, args,
)
.await?;
}
Sub::TxInitAccount(TxInitAccount(mut args)) => {
let client = HttpClient::new(utils::take_config_address(
Expand Down Expand Up @@ -213,27 +215,56 @@ pub async fn main() -> Result<()> {
.proceed_or_else(error)?;
let args = args.to_sdk(&mut ctx);
let tx_args = args.tx.clone();
let (mut tx, addr, pk) = bridge_pool::build_bridge_pool_tx(
&client,
&mut ctx.wallet,
args,
)
.await
.unwrap();
let (mut tx, addr, public_keys) =
bridge_pool::build_bridge_pool_tx(
&client,
&mut ctx.wallet,
args,
)
.await
.unwrap();
tx::submit_reveal_aux(
&client,
&mut ctx,
&tx_args,
addr,
pk.clone(),
addr.clone(),
&public_keys,
&mut tx,
)
.await?;
signing::sign_tx(&mut ctx.wallet, &mut tx, &tx_args, &pk)
.await?;
let (account_public_keys_map, threshold) =
signing::aux_signing_data(
&client,
addr,
public_keys.clone(),
)
.await;
signing::sign_tx(
&mut ctx.wallet,
&mut tx,
&tx_args,
&account_public_keys_map,
&public_keys,
threshold,
)
.await?;
sdk_tx::process_tx(&client, &mut ctx.wallet, &tx_args, tx)
.await?;
}
Sub::TxUnjailValidator(TxUnjailValidator(mut args)) => {
let client = HttpClient::new(utils::take_config_address(
&mut args.tx.ledger_address,
))
.unwrap();
wait_until_node_is_synched(&client)
.await
.proceed_or_else(error)?;
let args = args.to_sdk(&mut ctx);
tx::submit_unjail_validator::<HttpClient>(
&client, ctx, args,
)
.await?;
}
// Ledger queries
Sub::QueryEpoch(QueryEpoch(mut args)) => {
let client = HttpClient::new(utils::take_config_address(
Expand Down Expand Up @@ -325,6 +356,22 @@ pub async fn main() -> Result<()> {
let args = args.to_sdk(&mut ctx);
rpc::query_bonded_stake(&client, args).await;
}
Sub::QueryValidatorState(QueryValidatorState(mut args)) => {
let client = HttpClient::new(utils::take_config_address(
&mut args.query.ledger_address,
))
.unwrap();
wait_until_node_is_synched(&client)
.await
.proceed_or_else(error)?;
let args = args.to_sdk(&mut ctx);
rpc::query_and_print_validator_state(
&client,
&mut ctx.wallet,
args,
)
.await;
}
Sub::QueryCommissionRate(QueryCommissionRate(mut args)) => {
let client = HttpClient::new(utils::take_config_address(
&mut args.query.ledger_address,
Expand Down Expand Up @@ -433,6 +480,16 @@ pub async fn main() -> Result<()> {
let args = args.to_sdk(&mut ctx);
rpc::query_protocol_parameters(&client, args).await;
}
Sub::QueryAccount(QueryAccount(args)) => {
let client =
HttpClient::new(args.query.ledger_address.clone())
.unwrap();
wait_until_node_is_synched(&client)
.await
.proceed_or_else(error)?;
let args = args.to_sdk(&mut ctx);
rpc::query_account(&client, args).await;
}
}
}
cli::NamadaClient::WithoutContext(cmd, global_args) => match cmd {
Expand All @@ -455,6 +512,15 @@ pub async fn main() -> Result<()> {
Utils::DefaultBaseDir(DefaultBaseDir(args)) => {
utils::default_base_dir(global_args, args)
}
Utils::EpochSleep(EpochSleep(args)) => {
let mut ctx = cli::Context::new(global_args)
.expect("expected to construct a context");
let ledger_address = args.ledger_address.clone();
let client = HttpClient::new(ledger_address).unwrap();
wait_until_node_is_synched(&client).await;
let args = args.to_sdk(&mut ctx);
rpc::epoch_sleep(&client, args).await;
}
},
}
Ok(())
Expand Down
Loading
Loading