Skip to content

Commit

Permalink
client: rename zeth_helper commands to zeth-helper
Browse files Browse the repository at this point in the history
  • Loading branch information
dtebbs committed May 19, 2021
1 parent f2c1795 commit 09bad5e
Show file tree
Hide file tree
Showing 7 changed files with 18 additions and 17 deletions.
1 change: 0 additions & 1 deletion client/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,6 @@ grpc: $(PROTOBUF_OUTPUT)
syntax: ${PROTOBUF_OUTPUT}
flake8 `git ls-files '**.py'`
mypy -p zeth
mypy zeth/cli/zeth zeth/helper/zeth_helper
mypy -p tests
mypy -p test_commands
mypy -p test_contracts
Expand Down
12 changes: 6 additions & 6 deletions client/setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -60,10 +60,10 @@
"web3==4.8.2",
"websockets==6.0",
],
scripts=[
"test_commands/test_ether_mixing.py",
"test_commands/test_erc_token_mixing.py",
"zeth/helper/zeth_helper",
"zeth/cli/zeth",
]
entry_points={
'console_scripts': [
'zeth-helper=zeth.helper.zeth_helper:zeth_helper',
'zeth=zeth.cli.zeth:zeth',
],
}
)
3 changes: 2 additions & 1 deletion client/zeth/cli/zeth → client/zeth/cli/zeth.py
Original file line number Diff line number Diff line change
Expand Up @@ -19,9 +19,10 @@
from zeth.cli.zeth_ls_commits import ls_commits
from click import group, command, option, pass_context, ClickException, Context
from click_default_group import DefaultGroup # type: ignore
from typing import Optional, Any
from typing import Optional


# pylint: disable=redefined-builtin
@command()
@pass_context
def help(ctx: Context) -> None:
Expand Down
8 changes: 4 additions & 4 deletions client/zeth/helper/eth_gen_network_config.py
Original file line number Diff line number Diff line change
Expand Up @@ -38,23 +38,23 @@ def eth_gen_network_config(
\b
# Write default config for "ganache" to the default file
$ zeth_helper eth-gen-network-config ganache
$ zeth-helper eth-gen-network-config ganache
\b
# Write "geth" config with a custom endpoint to default file
$ zeth_helper eth-gen-network-config geth \\
$ zeth-helper eth-gen-network-config geth \\
--eth-rpc-endpoint http://localhost:8080
\b
# Write a custom https endpoint to file, specifying the certificate
$ zeth_helper eth-gen-network-config \\
$ zeth-helper eth-gen-network-config \\
my-network \\
--eth-rpc-endpoint https://rpc.my-network.io:8545 \\
--eth-rpc-certificate rpc.my-network.io.crt
\b
# Write default network and endpoint to file "default-network"
$ zeth_helper eth-gen-network-config --output-file default-network
$ zeth-helper eth-gen-network-config --output-file default-network
"""

if eth_rpc_endpoint is not None:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@
from click_default_group import DefaultGroup # type: ignore


# pylint: disable=redefined-builtin
@command()
@pass_context
def help(ctx: Context) -> None:
Expand Down
8 changes: 4 additions & 4 deletions scripts/test_zeth_cli_common.sh
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ function show_balances() {
for name in deployer alice bob charlie ; do
pushd ${name}
echo -n "${name}: "
zeth_helper eth-get-balance
zeth-helper eth-get-balance
popd
done
}
Expand All @@ -34,7 +34,7 @@ function setup_user_hosted_key() {
mkdir -p $1
pushd $1
! [ -e eth-network ] && \
(zeth_helper eth-gen-network-config)
(zeth-helper eth-gen-network-config)
! [ -e eth-address ] && \
(grep $1 ../accounts | grep -oe '0x.*' > eth-address)
! [ -e zeth-address.priv ] && \
Expand All @@ -48,9 +48,9 @@ function setup_user_local_key() {
mkdir -p $1
pushd $1
! [ -e eth-network ] && \
(zeth_helper eth-gen-network-config $2)
(zeth-helper eth-gen-network-config $2)
! [ -e eth-address ] && \
(zeth_helper eth-gen-address && zeth_helper eth-fund)
(zeth-helper eth-gen-address && zeth-helper eth-fund)
! [ -e zeth-address.priv ] && \
(zeth gen-address)

Expand Down
2 changes: 1 addition & 1 deletion scripts/test_zeth_cli_token
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@ copy_deployment_info deployer charlie
pushd alice
alice_pk=`cat zeth-address.pub`
if ! [ -e notes/state_zeth ] ; then
zeth_helper token-approve 200
zeth-helper token-approve 200
zeth mix --wait --vin 200 --out 200
fi
note_id=`zeth ls-notes | tail -n 1 | grep -oe '^[A-Za-z0-9]\+'`
Expand Down

0 comments on commit 09bad5e

Please sign in to comment.